diff --git a/tags/semmelstatzR_1_0_0_beta/_psd/statzR_small_sfnet.psd b/tags/semmelstatzR_1_0_0_beta/_psd/statzR_small_sfnet.psd new file mode 100644 index 0000000..b58221f Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/_psd/statzR_small_sfnet.psd differ diff --git a/tags/semmelstatzR_1_0_0_beta/_psd/statz_small.psd b/tags/semmelstatzR_1_0_0_beta/_psd/statz_small.psd new file mode 100644 index 0000000..a8a08bf Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/_psd/statz_small.psd differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/arin.png b/tags/semmelstatzR_1_0_0_beta/img/arin.png new file mode 100644 index 0000000..cdf3081 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/arin.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/icon_observe.png b/tags/semmelstatzR_1_0_0_beta/img/icon_observe.png new file mode 100644 index 0000000..14fbffc Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/icon_observe.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/icon_template.png b/tags/semmelstatzR_1_0_0_beta/img/icon_template.png new file mode 100644 index 0000000..ad4fc9a Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/icon_template.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/ripe.png b/tags/semmelstatzR_1_0_0_beta/img/ripe.png new file mode 100644 index 0000000..8da70ba Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/ripe.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/statz.png b/tags/semmelstatzR_1_0_0_beta/img/statz.png new file mode 100644 index 0000000..af8bfdd Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/statz.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/statzR.png b/tags/semmelstatzR_1_0_0_beta/img/statzR.png new file mode 100644 index 0000000..5d86720 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/statzR.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/statz_small.png b/tags/semmelstatzR_1_0_0_beta/img/statz_small.png new file mode 100644 index 0000000..eee9f5c Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/statz_small.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/img/utrace.png b/tags/semmelstatzR_1_0_0_beta/img/utrace.png new file mode 100644 index 0000000..f59a10d Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/img/utrace.png differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/class.agents.php b/tags/semmelstatzR_1_0_0_beta/includes/class.agents.php new file mode 100644 index 0000000..f4cb741 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/class.agents.php @@ -0,0 +1,207 @@ +. + * + * $Id$ + * + */ + +class Agents { + + private $_sAgent; + + private $_aBots = array( + 'aipbot', + 'amfibibot', + 'appie', + 'ask jeeves/teoma', + 'aspseek', + 'axadine', + 'baiduspider', + 'becomebot', + 'blogcorpuscrawler', + 'blogpulse', + 'blogsnowbot', + 'boitho.com', + 'bruinbot', + 'cerberian', + 'cfnetwork', + 'check_http', + 'cipinetbot', + 'claymont', + 'cometsearch@cometsystems.com', + 'converacrawler', + 'cydralspider', + 'digger', + 'es.net_crawler', + 'eventax', + 'everyfeed-spider', + 'exabot@exava.com', + 'faxobot', + 'findlinks', + 'fireball', + 'francis', + 'gaisbot', + 'gamekitbot', + 'gazz@nttr.co.jp', + 'geonabot', + 'getrax crawler', + 'gigabot', + 'girafa.com', + 'goforitbot', + 'googlebot', + 'grub-client', + 'holmes', + 'houxoucrawler', + 'http://www.almaden.ibm.com/cs/crawler', + 'http://www.istarthere.com', + 'http://www.relevantnoise.com', + 'httrack ?', + 'ia_archiver', + 'ichiro', + 'iltrovatore-setaccio', + 'inelabot', + 'infoseek', + 'inktomi.com', + 'irlbot', + 'jetbot', + 'jobspider_ba', + 'kazoombot', + 'larbin', + 'libwww', + 'linkwalker', + 'lmspider', + 'mackster', + 'mediapartners-google', + 'microsoft url control', + 'mj12bot', + 'moreoverbot', + 'mozdex', + 'msnbot', + 'msrbot', + 'naverbot', + 'netresearchserver', + 'ng/2.0', + 'np(bot)', + 'nutch', + 'objectssearch', + 'ocelli', + 'omniexplorer_bot', + 'openbot', + 'overture', + 'patwebbot', + 'php', + 'phpdig', + 'pilgrim html-crawler', + 'pipeliner', + 'pompos', + 'psbot', + 'python-urllib', + 'quepasacreep', + 'robozilla', + 'rpt-httpclient', + 'savvybot', + 'scooter', + 'search.ch', + 'seekbot', + 'semager', + 'seznambot', + 'sherlock', + 'shelob', + 'sitesearch', + 'snapbot', + 'snappreviewbot', + 'speedy spider', + 'sphere scout', + 'stackrambler', + 'steeler', + 'surveybot', + 'szukacz', + 'technoratibot', + 'telnet', + 'themiragorobot', + 'thesubot', + 'thumbshots-de-bot', + 'topicblogs', + 'turnitinbot', + 'tutorgigbot', + 'tutorial crawler', + 'twiceler', + 'vagabondo', + 'versus', + 'voilabot', + 'w3c_css_validator', + 'w3c_validator', + 'w3c-checklink', + 'web downloader', + 'webcopier', + 'webcrawler', + 'webfilter robot', + 'west wind internet protocols', + 'wget', + 'wwweasel robot', + 'wwwster', + 'xaldon webspider', + 'xenu', + 'yahoo! slurp', + 'yahoofeedseeker', + 'yahoo-mmcrawler', + 'zao', + 'zipppbot', + 'zyborg', + ); + + public function __construct($sAgent = null) { + if(!is_null($sAgent)) { + $this->_sAgent = $sAgent; + } + $this->_getIniFile(); + } + + public function isBot($sAgent = null) { + if(is_null($sAgent) && empty($this->_sAgent)) return false; + $sAgent = (is_null($sAgent))?$this->_sAgent:$sAgent; + + foreach($this->_aBots as $bot) { + if(stristr($sAgent, $bot) !== false) { + return true; + } + } + return false; + } + + private function _getIniFile($sFile = null) { + if(is_null($sFile)) $sFile = dirname(__FILE__)."/data/uas_20110628-02.ini"; // default ini + + if(is_file($sFile) && is_readable($sFile)) { + $aTmpIni = parse_ini_file($sFile, true); + $this->_aBots = array(); + foreach($aTmpIni['robots'] as $value) { + $this->_aBots[] = $value[2]; + } + //print_r($this->_aBots); + } + } +} +?> diff --git a/tags/semmelstatzR_1_0_0_beta/includes/class.semmelstatzR.php b/tags/semmelstatzR_1_0_0_beta/includes/class.semmelstatzR.php new file mode 100644 index 0000000..60f18b3 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/class.semmelstatzR.php @@ -0,0 +1,72 @@ +. + * + * $Id$ + * + */ + +/** + * + */ +class semmelstatzR { + + protected $_oDb; + + + /** + * + * @global type $wpdb + */ + public function __construct() { + $this->_initDb(); + } + + /* public */ + + + /* protected */ + + + /* private */ + + /** + * + * @global wpdb $wpdb + * @return boolean + */ + private function _initDb() { + global $wpdb; + + if($this->_oDb instanceof $wpdb) { + return true; + } else if($wpdb instanceof wpdb) { + $this->_oDb = $wpdb; + return true; + } else { + return false; + } + } +} +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/class.upgrademe.php b/tags/semmelstatzR_1_0_0_beta/includes/class.upgrademe.php new file mode 100644 index 0000000..66c2e71 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/class.upgrademe.php @@ -0,0 +1,198 @@ +getMethods(ReflectionMethod::IS_PUBLIC); +foreach($methods as $m) +{ +/** @var ReflectionMethod $m */ +if ($m->isStatic() && strpos($m->getName(), self::$WP_FILTER_PREFIX) === 0) { +add_filter(substr($m->getName(), strlen(self::$WP_FILTER_PREFIX)), array(get_class(), $m->getName()), +10, $m->getNumberOfParameters()); +} +} +} + +public static function wpFilter_http_response($response, $args, $url) +{ +# Control recursion +static $recursion = false; +if ($recursion) +return $response; + +if (empty($response) || !is_array($response) || !isset($response['body'])) +return $response; + +# Guess if it's time to take action +if ($url == 'http://api.wordpress.org/plugins/update-check/1.0/') +$showTime = true; +# Prevent failures if WordPress changes url for updates; we will detect if it still contains "update-check" token +# and called from withing wp_update_plugins() function +elseif (stripos($url, 'update-check') !== false) +{ +$showTime = false; +$trace = debug_backtrace(false); +foreach($trace as $t) +# http request made from within wp_update_plugins +if (isset($t['function']) && $t['function'] == 'wp_update_plugins') +{ +$showTime = true; +break; +} +unset($trace, $t); +} +else +$showTime = false; +if (!$showTime) +return $response; + +# Loop over plugins who provided _upgrademe() function and use returned url to request for up-to-date version signature. +# Collect retrieved (only valid) data into $upgrademe +$plugins = get_plugins(); +$upgrademe = array(); +foreach($plugins as $file => $info) +{ +# Get url if function exists +$slugName = str_replace('-', '_', basename($file, '.php')); + +# Request latest version signature from custom url (non-WP plugins repository api) && validate response variables +$recursion = true; +$vars = self::loadPluginData($slugName); +$recursion = false; +if (empty($vars)) +continue; + +$upgrademe[$file] = $vars; +} +if (!count($upgrademe)) +return $response; + +$body = $response['body']; +if (!empty($body)) +$body = unserialize($body); +if (empty($body)) +$body = array(); +foreach($upgrademe as $file => $upgradeVars) +{ +# Do not override data returned by official WP plugins repository API +if (isset($body[$file])) +continue; + +# If new version is different then current one, only then add info +if (!isset($plugins[$file]['Version']) || $plugins[$file]['Version'] == $upgradeVars['new_version']) +continue; + +$upgradeInfo = new stdClass(); +$upgradeInfo->id = $upgradeVars['id']; +$upgradeInfo->slug = $upgradeVars['slug']; +$upgradeInfo->new_version = $upgradeVars['new_version']; +$upgradeInfo->url = $upgradeVars['url']; +$upgradeInfo->package = $upgradeVars['package']; +$body[$file] = $upgradeInfo; +} +$response['body'] = serialize($body); +return $response; +} + +public static function wpFilter_plugins_api($value, $action, $args) +{ +// If for some reason value available already, do not change it +if (!empty($value)) +return $value; + +if ($action != 'plugin_information' || !is_object($args) || !isset($args->slug) || empty($args->slug)) +return $value; + +$vars = self::loadPluginData($args->slug); +if (empty($vars)) +return $value; + +return (object)$vars['info']; +} + +public static function wpFilter_http_request_args($args, $url) +{ +if (strpos($url, 'wp-upgrademe') === false || !is_array($args)) +return $args; + +$args['sslverify'] = false; +return $args; +} + +private static function loadPluginData($slug) +{ +if (isset(self::$data[$slug])) +return self::$data[$slug]; + +$funcName = $slug.'_upgrademe'; +if (!function_exists($funcName)) +return self::$data[$slug] = null; + +$upgradeUrl = filter_var(call_user_func($funcName), FILTER_VALIDATE_URL); +if (empty($upgradeUrl)) +return self::$data[$slug] = null; + +# Request latest version signature from custom url (non-WP plugins repository api) && validate response variables +$r = wp_remote_post($upgradeUrl, array('method' => 'POST', 'timeout' => 4, 'redirection' => 5, 'httpversion' => '1.0', 'blocking' => true, +'headers' => array(), 'body' => null, 'cookies' => array(), 'sslverify' => false)); + +if( is_wp_error($r) || !isset($r['body']) || empty($r['body'])) +return self::$data[$slug] = null; + +$vars = json_decode($r['body'], true); +if (empty($vars) || !is_array($vars) || count($vars) > 4 +|| !isset($vars['new_version']) || !isset($vars['url']) || !isset($vars['package']) || !isset($vars['info'])) +return self::$data[$slug] = null; + +# 2 147 483 648 - max int32 +# 16 777 215 - ffffff = max possible value of 6-letters hex +# 50 000 000 - reasonable offset +# Finally generate ID between 50 000 000 and 66 777 215 +$vars['id'] = 50000000 + hexdec(substr(md5($slug), 1, 6)); + +$vars['slug'] = $slug; + +# Sanitize variables of "info" +if (!is_array($vars['info'])) +$vars['info'] = array(); + +$info = array(); +foreach($vars['info'] as $key => $val) +{ +if (!in_array($key, array('name','slug','version','author','author_profile','contributors','requires','tested', +'compatibility','rating','rating','num_ratings','downloaded','last_updated','added','homepage', +'sections','download_link','tags'))) +continue; +$info[$key] = $val; +} +$info['slug'] = $slug; +$info['version'] = $vars['new_version']; +$info['download_link'] = $vars['url']; +$vars['info'] = $info; + +return self::$data[$slug] = $vars; +} +} +Upgrademe::register(); +} # class_exists() \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/data/uas_20110628-02.ini b/tags/semmelstatzR_1_0_0_beta/includes/data/uas_20110628-02.ini new file mode 100644 index 0000000..6befacf --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/data/uas_20110628-02.ini @@ -0,0 +1,11077 @@ +; Data (format ini) for UASparser - http://user-agent-string.info/download/UASparser +; Version: 20110628-02 +; Checksum: +; MD5 - http://user-agent-string.info/rpc/get_data.php?format=ini&md5=y +; SHA1 - http://user-agent-string.info/rpc/get_data.php?format=ini&sha1=y +; +[robots] +; bot_id[] = "bot useragentstring" +; bot_id[] = "bot Family" +; bot_id[] = "bot Name" +; bot_id[] = "bot URL" +; bot_id[] = "bot Company" +; bot_id[] = "bot Company URL" +; bot_id[] = "bot ico" +; bot_id[] = "bot OS id" +; bot_id[] = "bot info URL" +1490[] = "192.comAgent" +1490[] = "192.comAgent" +1490[] = "192.comAgent" +1490[] = "http://www.192.com/support/web-crawler.cfm" +1490[] = "i-CD Publishing (UK) Limited" +1490[] = "http://www.icdpublishing.co.uk/" +1490[] = "bot.png" +1490[] = "" +1490[] = "/list-of-ua/bot-detail?bot=192.comAgent" +1773[] = "50.nu/0.01 ( +http://50.nu/bot.html )" +1773[] = "50.nu" +1773[] = "50.nu/0.01" +1773[] = "http://50.nu/bot.html" +1773[] = "Innovate it" +1773[] = "http://innovateit.com/" +1773[] = "bot.png" +1773[] = "" +1773[] = "/list-of-ua/bot-detail?bot=50.nu" +1633[] = "Mozilla/5.0 (compatible; 80bot/0.71; http://www.80legs.com/spider.html;) Gecko/2008032620" +1633[] = "80legs" +1633[] = "80legs/0.71" +1633[] = "http://www.80legs.com/webcrawler.html" +1633[] = "Computational Crawling, LP " +1633[] = "http://compucrawl.com/" +1633[] = "bot.png" +1633[] = "" +1633[] = "/list-of-ua/bot-detail?bot=80legs" +1871[] = "Mozilla/5.0 (compatible; 008/0.83; http://www.80legs.com/spider.html;) Gecko/2008032620" +1871[] = "80legs" +1871[] = "80legs/0.83" +1871[] = "http://www.80legs.com/webcrawler.html" +1871[] = "Computational Crawling, LP" +1871[] = "http://compucrawl.com/" +1871[] = "bot.png" +1871[] = "" +1871[] = "/list-of-ua/bot-detail?bot=80legs" +5311[] = "Mozilla/5.0 (compatible; 008/0.83; http://www.80legs.com/webcrawler.html;) Gecko/2008032620" +5311[] = "80legs" +5311[] = "80legs/0.83 b" +5311[] = "http://www.80legs.com/webcrawler.html" +5311[] = "Computational Crawling, LP" +5311[] = "http://compucrawl.com/" +5311[] = "bot.png" +5311[] = "" +5311[] = "/list-of-ua/bot-detail?bot=80legs" +3422[] = "Mozilla/5.0 (compatible; abby/1.0; +http://www.ellerdale.com/crawler.html)" +3422[] = "abby" +3422[] = "abby/1.0" +3422[] = "http://www.ellerdale.com/crawler.html" +3422[] = "Ellerdale Inc." +3422[] = "http://www.ellerdale.com/" +3422[] = "bot_abby.png" +3422[] = "" +3422[] = "/list-of-ua/bot-detail?bot=abby" +1941[] = "AboutUsBot" +1941[] = "AboutUsBot" +1941[] = "AboutUsBot" +1941[] = "http://www.aboutus.org/AboutUs:Bot" +1941[] = "AboutUs, Inc. " +1941[] = "http://www.aboutus.org/AboutUs.org" +1941[] = "bot_AboutUsBot.png" +1941[] = "" +1941[] = "/list-of-ua/bot-detail?bot=AboutUsBot" +1735[] = "Mozilla/5.0 (compatible; AboutUsBot/0.9; +http://www.aboutus.org/AboutUsBot)" +1735[] = "AboutUsBot" +1735[] = "AboutUsBot/0.9" +1735[] = "http://www.aboutus.org/AboutUs:Bot" +1735[] = "AboutUs, Inc." +1735[] = "http://www.aboutus.org/AboutUs.org" +1735[] = "bot_AboutUsBot.png" +1735[] = "" +1735[] = "/list-of-ua/bot-detail?bot=AboutUsBot" +5077[] = "Mozilla/5.0 (compatible; AboutUsBot Johnny5/2.0; +http://www.AboutUs.org/)" +5077[] = "AboutUsBot" +5077[] = "AboutUsBot Johnny5/2.0" +5077[] = "http://www.aboutus.org/AboutUs:Bot" +5077[] = "AboutUs, Inc." +5077[] = "http://www.aboutus.org/AboutUs.org" +5077[] = "bot_AboutUsBot.png" +5077[] = "" +5077[] = "/list-of-ua/bot-detail?bot=AboutUsBot" +6246[] = "Abrave Spider v4 Robot 1 (http://robot.abrave.co.uk)" +6246[] = "Abrave Spider" +6246[] = "Abrave Spider/4-1" +6246[] = "http://robot.abrave.co.uk/" +6246[] = "Gallent Limited" +6246[] = "http://www.gallent.co.uk/" +6246[] = "bot.png" +6246[] = "" +6246[] = "/list-of-ua/bot-detail?bot=Abrave Spider" +6247[] = "Abrave Spider v4 Robot 2 (http://robot.abrave.co.uk)" +6247[] = "Abrave Spider" +6247[] = "Abrave Spider/4-2" +6247[] = "http://robot.abrave.co.uk/" +6247[] = "Gallent Limited" +6247[] = "http://www.gallent.co.uk/" +6247[] = "bot.png" +6247[] = "" +6247[] = "/list-of-ua/bot-detail?bot=Abrave Spider" +892[] = "Accelobot" +892[] = "Accelobot" +892[] = "Accelobot" +892[] = "http://www.accelobot.com/" +892[] = "Accelovation, Inc." +892[] = "http://www.accelovation.com/" +892[] = "bot.png" +892[] = "" +892[] = "/list-of-ua/bot-detail?bot=Accelobot" +162[] = "Accoona-AI-Agent/1.1.1 (crawler at accoona dot com)" +162[] = "Accoona-AI-Agent" +162[] = "Accoona-AI-Agent/1.1.1" +162[] = "" +162[] = "Accoona Corp." +162[] = "http://accoona.com/" +162[] = "bot_accoona-ai-agent.png" +162[] = "" +162[] = "/list-of-ua/bot-detail?bot=Accoona-AI-Agent" +512[] = "Accoona-AI-Agent/1.1.2 (aicrawler at accoonabot dot com)" +512[] = "Accoona-AI-Agent" +512[] = "Accoona-AI-Agent/1.1.2" +512[] = "" +512[] = "Accoona Corp." +512[] = "" +512[] = "bot_accoona-ai-agent.png" +512[] = "" +512[] = "/list-of-ua/bot-detail?bot=Accoona-AI-Agent" +1273[] = "Acoon-Robot 4.0.0RC2 (http://www.acoon.de)" +1273[] = "Acoon-Robot" +1273[] = "Acoon-Robot 4.0.0RC2" +1273[] = "" +1273[] = "Acoon GmbH" +1273[] = "http://www.acoon.com/" +1273[] = "bot.png" +1273[] = "" +1273[] = "/list-of-ua/bot-detail?bot=Acoon-Robot" +1282[] = "Acoon-Robot 4.0.1 (http://www.acoon.de)" +1282[] = "Acoon-Robot" +1282[] = "Acoon-Robot 4.0.1" +1282[] = "" +1282[] = "Acoon GmbH" +1282[] = "http://www.acoon.com/" +1282[] = "bot.png" +1282[] = "" +1282[] = "/list-of-ua/bot-detail?bot=Acoon-Robot" +1287[] = "Acoon-Robot 4.0.2 (http://www.acoon.de)" +1287[] = "Acoon-Robot" +1287[] = "Acoon-Robot 4.0.2" +1287[] = "" +1287[] = "Acoon GmbH" +1287[] = "http://www.acoon.com/" +1287[] = "bot.png" +1287[] = "" +1287[] = "/list-of-ua/bot-detail?bot=Acoon-Robot" +1297[] = "Acoon-Robot 4.0.2.17 (http://www.acoon.de)" +1297[] = "Acoon-Robot" +1297[] = "Acoon-Robot 4.0.2.17" +1297[] = "" +1297[] = "Acoon GmbH" +1297[] = "http://www.acoon.com/" +1297[] = "bot.png" +1297[] = "" +1297[] = "/list-of-ua/bot-detail?bot=Acoon-Robot" +1685[] = "OpenAcoon v4.1.0 (www.openacoon.de)" +1685[] = "Acoon-Robot" +1685[] = "OpenAcoon v4.1.0" +1685[] = "http://www.openacoon.de/" +1685[] = "Acoon GmbH" +1685[] = "http://www.acoon.com/" +1685[] = "bot.png" +1685[] = "" +1685[] = "/list-of-ua/bot-detail?bot=Acoon-Robot" +829[] = "Acorn/Nutch-0.9 (Non-Profit Search Engine; acorn.isara.org; acorn at isara dot org)" +829[] = "Acorn" +829[] = "Acorn/Nutch-0.9" +829[] = "http://acorn.isara.org/" +829[] = "Isara" +829[] = "http://www.isara.org/" +829[] = "bot.png" +829[] = "" +829[] = "/list-of-ua/bot-detail?bot=Acorn" +494[] = "www.adressendeutschland.de" +494[] = "adressendeutschland.de" +494[] = "adressendeutschland.de" +494[] = "http://www.adressendeutschland.de/konzept.html" +494[] = "http://www.arktosmedia.de/" +494[] = "Arktos MEDIA GmbH" +494[] = "bot.png" +494[] = "" +494[] = "/list-of-ua/bot-detail?bot=adressendeutschland.de" +676[] = "AdsBot-Google (+http://www.google.com/adsbot.html)" +676[] = "AdsBot-Google" +676[] = "AdsBot-Google" +676[] = "http://www.google.com/adsbot.html" +676[] = "Google Inc." +676[] = "http://www.google.com/" +676[] = "bot.png" +676[] = "" +676[] = "/list-of-ua/bot-detail?bot=AdsBot-Google" +715[] = "AdsBot-Google" +715[] = "AdsBot-Google" +715[] = "AdsBot-Google b" +715[] = "http://www.google.com/adsbot.html" +715[] = "Google Inc." +715[] = "http://www.google.com/" +715[] = "bot.png" +715[] = "" +715[] = "/list-of-ua/bot-detail?bot=AdsBot-Google" +2102[] = "Mozilla/5.0 (compatible; aiHitBot-DM/2.0.2 +http://www.aihit.com)" +2102[] = "aiHitBot" +2102[] = "aiHitBot-DM/2.0.2" +2102[] = "" +2102[] = "aiHit Ltd." +2102[] = "http://www.aihit.com/" +2102[] = "bot.png" +2102[] = "" +2102[] = "/list-of-ua/bot-detail?bot=aiHitBot" +2188[] = "Mozilla/5.0 (compatible; aiHitBot/1.0-DS; +http://www.aihit.com/)" +2188[] = "aiHitBot" +2188[] = "aiHitBot/1.0-DS" +2188[] = "" +2188[] = "aiHit Ltd." +2188[] = "http://www.aihit.com/" +2188[] = "bot.png" +2188[] = "" +2188[] = "/list-of-ua/bot-detail?bot=aiHitBot" +2223[] = "Mozilla/5.0 (compatible; aiHitBot/1.0; +http://www.aihit.com/)" +2223[] = "aiHitBot" +2223[] = "aiHitBot/1.0" +2223[] = "" +2223[] = "aiHit Ltd." +2223[] = "http://www.aihit.com/" +2223[] = "bot.png" +2223[] = "" +2223[] = "/list-of-ua/bot-detail?bot=aiHitBot" +89[] = "appie 1.1 (www.walhello.com)" +89[] = "aippie" +89[] = "appie 1.1" +89[] = "http://www.walhello.com/aboutgl.html" +89[] = "Walhello.com" +89[] = "http://www.walhello.com/" +89[] = "bot.png" +89[] = "" +89[] = "/list-of-ua/bot-detail?bot=aippie" +1555[] = "Mozilla/5.0 (compatible; akula/k311; +http://k311.fd.cvut.cz/)" +1555[] = "akula" +1555[] = "akula/k311" +1555[] = "http://k311.fd.cvut.cz/" +1555[] = "ÄŒVUT Fakulta dopravní" +1555[] = "http://www.fd.cvut.cz/" +1555[] = "bot.png" +1555[] = "" +1555[] = "/list-of-ua/bot-detail?bot=akula" +1550[] = "Mozilla/5.0 (compatible; akula/12.0rc-2; +http://k311.fd.cvut.cz/)" +1550[] = "akula" +1550[] = "akula/12.0rc-2" +1550[] = "http://k311.fd.cvut.cz/" +1550[] = "ÄŒVUT Fakulta dopravní" +1550[] = "http://www.fd.cvut.cz/" +1550[] = "bot.png" +1550[] = "" +1550[] = "/list-of-ua/bot-detail?bot=akula" +90[] = "http://www.almaden.ibm.com/cs/crawler [bc22]" +90[] = "Almaden" +90[] = "Almaden bc22" +90[] = "http://www.almaden.ibm.com/cs/crawler/" +90[] = "IBM Almaden Research Center" +90[] = "http://www.almaden.ibm.com/" +90[] = "bot.png" +90[] = "" +90[] = "/list-of-ua/bot-detail?bot=Almaden" +148[] = "http://www.almaden.ibm.com/cs/crawler [hc4]" +148[] = "Almaden" +148[] = "Almaden hc4" +148[] = "http://www.almaden.ibm.com/cs/crawler/" +148[] = "IBM Almaden Research Center" +148[] = "http://www.almaden.ibm.com/" +148[] = "bot.png" +148[] = "" +148[] = "/list-of-ua/bot-detail?bot=Almaden" +214[] = "http://www.almaden.ibm.com/cs/crawler [bc14]" +214[] = "Almaden" +214[] = "Almaden bc14" +214[] = "http://www.almaden.ibm.com/cs/crawler/" +214[] = "IBM Almaden Research Center" +214[] = "http://www.almaden.ibm.com/" +214[] = "bot.png" +214[] = "" +214[] = "/list-of-ua/bot-detail?bot=Almaden" +236[] = "http://www.almaden.ibm.com/cs/crawler [bc5]" +236[] = "Almaden" +236[] = "Almaden bc5" +236[] = "http://www.almaden.ibm.com/cs/crawler/" +236[] = "IBM Almaden Research Center" +236[] = "http://www.almaden.ibm.com/" +236[] = "bot.png" +236[] = "" +236[] = "/list-of-ua/bot-detail?bot=Almaden" +278[] = "http://www.almaden.ibm.com/cs/crawler [fc13]" +278[] = "Almaden" +278[] = "Almaden fc13" +278[] = "http://www.almaden.ibm.com/cs/crawler/" +278[] = "IBM Almaden Research Center" +278[] = "http://www.almaden.ibm.com/" +278[] = "bot.png" +278[] = "" +278[] = "/list-of-ua/bot-detail?bot=Almaden" +394[] = "http://www.almaden.ibm.com/cs/crawler [bc6]" +394[] = "Almaden" +394[] = "Almaden bc6" +394[] = "http://www.almaden.ibm.com/cs/crawler/" +394[] = "IBM Almaden Research Center" +394[] = "http://www.almaden.ibm.com/" +394[] = "bot.png" +394[] = "" +394[] = "/list-of-ua/bot-detail?bot=Almaden" +471[] = "http://www.almaden.ibm.com/cs/crawler [bc12]" +471[] = "Almaden" +471[] = "Almaden bc12" +471[] = "http://www.almaden.ibm.com/cs/crawler/" +471[] = "IBM Almaden Research Center" +471[] = "http://www.almaden.ibm.com/" +471[] = "bot.png" +471[] = "" +471[] = "/list-of-ua/bot-detail?bot=Almaden" +671[] = "http://www.almaden.ibm.com/cs/crawler" +671[] = "Almaden" +671[] = "Almaden" +671[] = "http://www.almaden.ibm.com/cs/crawler/" +671[] = "IBM Almaden Research Center" +671[] = "http://www.almaden.ibm.com/" +671[] = "bot.png" +671[] = "" +671[] = "/list-of-ua/bot-detail?bot=Almaden" +1849[] = "http://www.amagit.com/" +1849[] = "Amagit.COM" +1849[] = "Amagit.COM" +1849[] = "" +1849[] = "Joshua Schwarz" +1849[] = "http://contacts.joshuaschwarz.com/" +1849[] = "bot.png" +1849[] = "" +1849[] = "/list-of-ua/bot-detail?bot=Amagit.COM" +128[] = "Amfibibot/0.07 (Amfibi Robot; http://www.amfibi.com; agent@amfibi.com)" +128[] = "Amfibibot" +128[] = "Amfibibot/0.07" +128[] = "http://www.amfibi.com/" +128[] = "Barcelona Internet Telecom" +128[] = "http://www.bcntelecom.com/" +128[] = "bot.png" +128[] = "" +128[] = "/list-of-ua/bot-detail?bot=Amfibibot" +2110[] = "amibot - http://www.amidalla.de - tech@amidalla.com libwww-perl/5.831" +2110[] = "amibot" +2110[] = "amibot" +2110[] = "http://www.amidalla.de/info.htm" +2110[] = "amidalla.de" +2110[] = "http://www.amidalla.de/" +2110[] = "bot_amibot.png" +2110[] = "" +2110[] = "/list-of-ua/bot-detail?bot=amibot" +5623[] = "Mozilla/5.0 (compatible; AntBot/1.0; +http://www.ant.com/)" +5623[] = "AntBot" +5623[] = "AntBot/1.0" +5623[] = "" +5623[] = "Ant.com" +5623[] = "http://www.ant.com/" +5623[] = "bot_AntBot.png" +5623[] = "" +5623[] = "/list-of-ua/bot-detail?bot=AntBot" +3236[] = "Mozilla/5.0 (compatible; AportWorm/3.2; +http://www.aport.ru/help)" +3236[] = "AportWorm" +3236[] = "AportWorm/3.2" +3236[] = "http://www.aport.ru/help/" +3236[] = "Golden Telecom" +3236[] = "http://goldentelecom.ru/" +3236[] = "bot.png" +3236[] = "" +3236[] = "/list-of-ua/bot-detail?bot=AportWorm" +2057[] = "http://arachnode.net 1.2" +2057[] = "arachnode.net" +2057[] = "arachnode.net/1.2" +2057[] = "http://arachnode.codeplex.com/" +2057[] = "arachnode.net, llc" +2057[] = "http://arachnode.net/" +2057[] = "bot.png" +2057[] = "" +2057[] = "/list-of-ua/bot-detail?bot=arachnode.net" +6237[] = "http://arachnode.net 2.5" +6237[] = "arachnode.net" +6237[] = "arachnode.net/2.5" +6237[] = "http://arachnode.codeplex.com/" +6237[] = "arachnode.net, llc" +6237[] = "http://arachnode.net/" +6237[] = "bot.png" +6237[] = "" +6237[] = "/list-of-ua/bot-detail?bot=arachnode.net" +5272[] = "Mozilla/5.0 (compatible; archive.org_bot +http://www.archive.org/details/archive.org_bot)" +5272[] = "archive.org_bot" +5272[] = "archive.org_bot" +5272[] = "http://www.archive.org/details/archive.org_bot" +5272[] = "Internet Archive" +5272[] = "http://www.archive.org/" +5272[] = "bot.png" +5272[] = "" +5272[] = "/list-of-ua/bot-detail?bot=archive.org_bot" +1042[] = "ASAHA Search Engine Turkey V.001 (http://www.asaha.com/)" +1042[] = "ASAHA Search Engine Turkey" +1042[] = "ASAHA Search Engine Turkey V.001" +1042[] = "http://www.asaha.com/beta/" +1042[] = "asaha.com" +1042[] = "http://www.asaha.com/" +1042[] = "bot.png" +1042[] = "" +1042[] = "/list-of-ua/bot-detail?bot=ASAHA Search Engine Turkey" +37[] = "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)" +37[] = "Ask Jeeves/Teoma" +37[] = "Ask Jeeves/Teoma - b" +37[] = "http://about.ask.com/en/docs/about/webmasters.shtml" +37[] = "Ask Jeeves Inc." +37[] = "http://about.ask.com/en/docs/about/index.shtml" +37[] = "bot_AskJeeves.png" +37[] = "" +37[] = "/list-of-ua/bot-detail?bot=Ask Jeeves/Teoma" +131[] = "Mozilla/2.0 (compatible; Ask Jeeves/Teoma)" +131[] = "Ask Jeeves/Teoma" +131[] = "Ask Jeeves/Teoma" +131[] = "http://about.ask.com/en/docs/about/webmasters.shtml" +131[] = "Ask Jeeves Inc." +131[] = "http://about.ask.com/en/docs/about/index.shtml" +131[] = "bot_AskJeeves.png" +131[] = "" +131[] = "/list-of-ua/bot-detail?bot=Ask Jeeves/Teoma" +411[] = "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://about.ask.com/en/docs/about/webmasters.shtml)" +411[] = "Ask Jeeves/Teoma" +411[] = "Ask Jeeves/Teoma - c" +411[] = "http://about.ask.com/en/docs/about/webmasters.shtml" +411[] = "Ask Jeeves Inc." +411[] = "http://about.ask.com/en/docs/about/index.shtml" +411[] = "bot_AskJeeves.png" +411[] = "" +411[] = "/list-of-ua/bot-detail?bot=Ask Jeeves/Teoma" +694[] = "Mozilla/5.0 (compatible; Ask Jeeves/Teoma; +http://about.ask.com/en/docs/about/webmasters.shtml)" +694[] = "Ask Jeeves/Teoma" +694[] = "Ask Jeeves/Teoma" +694[] = "http://about.ask.com/en/docs/about/webmasters.shtml" +694[] = "Ask Jeeves Inc." +694[] = "http://about.ask.com/en/docs/about/index.shtml" +694[] = "bot_AskJeeves.png" +694[] = "" +694[] = "/list-of-ua/bot-detail?bot=Ask Jeeves/Teoma" +890[] = "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; http://about.ask.com/en/docs/about/webmasters.shtml)" +890[] = "Ask Jeeves/Teoma" +890[] = "Ask Jeeves/Teoma - d" +890[] = "http://about.ask.com/en/docs/about/webmasters.shtml" +890[] = "Ask Jeeves Inc." +890[] = "http://about.ask.com/en/docs/about/index.shtml" +890[] = "bot_AskJeeves.png" +890[] = "" +890[] = "/list-of-ua/bot-detail?bot=Ask Jeeves/Teoma" +2050[] = "BabalooSpider/1.3 (BabalooSpider; http://www.babaloo.si; spider@babaloo.si)" +2050[] = "BabalooSpider" +2050[] = "BabalooSpider/1.3" +2050[] = "" +2050[] = "Babaloo d.o.o." +2050[] = "http://www.babaloo.si/" +2050[] = "bot_BabalooSpider.png" +2050[] = "" +2050[] = "/list-of-ua/bot-detail?bot=BabalooSpider" +6231[] = "BacklinkCrawler (http://www.backlinktest.com/crawler.html)" +6231[] = "BacklinkCrawler" +6231[] = "BacklinkCrawler" +6231[] = "http://www.backlinktest.com/crawler.html" +6231[] = "2.0Promotion GbR" +6231[] = "http://2.0promotion.de/" +6231[] = "bot.png" +6231[] = "" +6231[] = "/list-of-ua/bot-detail?bot=BacklinkCrawler" +14[] = "Baiduspider+(+http://www.baidu.com/search/spider.htm)" +14[] = "Baiduspider" +14[] = "Baiduspider" +14[] = "http://www.baidu.com/search/spider.htm" +14[] = "Baidu" +14[] = "http://www.baidu.com/" +14[] = "bot_baiduspider.png" +14[] = "" +14[] = "/list-of-ua/bot-detail?bot=Baiduspider" +1474[] = "Baiduspider+(+http://www.baidu.jp/spider/)" +1474[] = "Baiduspider" +1474[] = "Baiduspider japan" +1474[] = "" +1474[] = "Baidu Japan Inc" +1474[] = "http://www.baidu.jp/" +1474[] = "bot_baiduspider.png" +1474[] = "" +1474[] = "/list-of-ua/bot-detail?bot=Baiduspider" +2125[] = "baypup/colbert (Baypup; http://sf.baypup.com/webmasters; jason@baypup.com)" +2125[] = "baypup" +2125[] = "baypup/colbert" +2125[] = "http://www.baypup.com/webmasters" +2125[] = "Flatland Industries, Inc." +2125[] = "http://www.flatlandindustries.com/" +2125[] = "bot_Baypup.png" +2125[] = "" +2125[] = "/list-of-ua/bot-detail?bot=baypup" +1770[] = "baypup/1.1 (Baypup; http://www.baypup.com/; jason@baypup.com)" +1770[] = "baypup" +1770[] = "baypup/1.1" +1770[] = "" +1770[] = "Flatland Industries, Inc." +1770[] = "http://www.flatlandindustries.com/" +1770[] = "bot_Baypup.png" +1770[] = "" +1770[] = "/list-of-ua/bot-detail?bot=baypup" +2162[] = "baypup/colbert (Baypup; http://www.baypup.com/webmasters; jason@baypup.com)" +2162[] = "baypup" +2162[] = "baypup/colbert" +2162[] = "http://www.baypup.com/webmasters" +2162[] = "Flatland Industries, Inc." +2162[] = "http://www.flatlandindustries.com/" +2162[] = "bot_Baypup.png" +2162[] = "" +2162[] = "/list-of-ua/bot-detail?bot=baypup" +2063[] = "BDFetch" +2063[] = "BDFetch" +2063[] = "BDFetch" +2063[] = "" +2063[] = "BDProtect Inc." +2063[] = "http://www.brandprotect.com/" +2063[] = "bot_BDFetch.png" +2063[] = "" +2063[] = "/list-of-ua/bot-detail?bot=BDFetch" +285[] = "Mozilla/5.0 (compatible; BecomeBot/2.3; MSIE 6.0 compatible; +http://www.become.com/site_owners.html)" +285[] = "BecomeBot" +285[] = "BecomeBot/2.3" +285[] = "http://www.become.com/site_owners.html" +285[] = "Become, Inc." +285[] = "http://www.become.com/" +285[] = "bot_becomebot.png" +285[] = "" +285[] = "/list-of-ua/bot-detail?bot=BecomeBot" +360[] = "Mozilla/5.0 (compatible; BecomeBot/3.0; MSIE 6.0 compatible; +http://www.become.com/site_owners.html)" +360[] = "BecomeBot" +360[] = "BecomeBot/3.0" +360[] = "http://www.become.com/site_owners.html" +360[] = "Become, Inc." +360[] = "http://www.become.com/" +360[] = "bot_becomebot.png" +360[] = "" +360[] = "/list-of-ua/bot-detail?bot=BecomeBot" +566[] = "Mozilla/5.0 (compatible; BecomeBot/3.0; +http://www.become.com/site_owners.html)" +566[] = "BecomeBot" +566[] = "BecomeBot/3.0 b" +566[] = "http://www.become.com/site_owners.html" +566[] = "Become, Inc." +566[] = "http://www.become.com/" +566[] = "bot.png" +566[] = "" +566[] = "/list-of-ua/bot-detail?bot=BecomeBot" +712[] = "Mozilla/5.0 (compatible; BecomeJPBot/2.3; MSIE 6.0 compatible; +http://www.become.co.jp/site_owners.html)" +712[] = "BecomeBot" +712[] = "BecomeBot/2.3 b" +712[] = "http://www.become.com/site_owners.html" +712[] = "Become, Inc." +712[] = "http://www.become.com/" +712[] = "bot.png" +712[] = "" +712[] = "/list-of-ua/bot-detail?bot=BecomeBot" +602[] = "Bigsearch.ca/Nutch-0.9-dev (Bigsearch.ca Internet Spider; http://www.bigsearch.ca/; info@enhancededge.com)" +602[] = "Bigsearch.ca" +602[] = "Bigsearch.ca/Nutch-0.9-dev" +602[] = "" +602[] = "bigsearch.ca" +602[] = "http://www.bigsearch.ca/" +602[] = "bot.png" +602[] = "" +602[] = "/list-of-ua/bot-detail?bot=Bigsearch.ca" +789[] = "Bigsearch.ca/Nutch-1.0-dev (Bigsearch.ca Internet Spider; http://www.bigsearch.ca/; info@enhancededge.com)" +789[] = "Bigsearch.ca" +789[] = "Bigsearch.ca/Nutch-1.0-dev" +789[] = "" +789[] = "bigsearch.ca" +789[] = "http://www.bigsearch.ca/" +789[] = "bot.png" +789[] = "" +789[] = "/list-of-ua/bot-detail?bot=Bigsearch.ca" +5357[] = "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)" +5357[] = "bingbot" +5357[] = "bingbot/2.0" +5357[] = "http://www.bing.com/bingbot.htm" +5357[] = "Microsoft Corporation" +5357[] = "http://www.microsoft.com/" +5357[] = "bot_msnbot.png" +5357[] = "" +5357[] = "/list-of-ua/bot-detail?bot=bingbot" +2022[] = "bitlybot" +2022[] = "bitlybot" +2022[] = "bitlybot" +2022[] = "http://code.google.com/p/bitly-bot/" +2022[] = "Rahul Garg" +2022[] = "http://www.google.com/profiles/mr.rahulgarg" +2022[] = "bot.png" +2022[] = "" +2022[] = "/list-of-ua/bot-detail?bot=bitlybot" +4733[] = "Mozilla/5.0 (compatible; bixolabs/1.0; +http://bixolabs.com/crawler/general; crawler@bixolabs.com)" +4733[] = "bixolabs" +4733[] = "bixolabs/1.0" +4733[] = "http://bixolabs.com/crawler/general/" +4733[] = "Bixo Labs" +4733[] = "http://bixolabs.com/" +4733[] = "bot.png" +4733[] = "" +4733[] = "/list-of-ua/bot-detail?bot=bixolabs" +5238[] = "Mozilla/5.0 (compatible; bixolabs/1.0; +http://bixolabs.com/crawler/general; crawler@mail.bixolabs.com)" +5238[] = "bixolabs" +5238[] = "bixolabs/1.0 b" +5238[] = "http://bixolabs.com/crawler/general/" +5238[] = "Bixo Labs" +5238[] = "http://bixolabs.com/" +5238[] = "bot.png" +5238[] = "" +5238[] = "/list-of-ua/bot-detail?bot=bixolabs" +548[] = "Blaiz-Bee/2.00.5622 (+http://www.blaiz.net)" +548[] = "Blaiz-Bee" +548[] = "Blaiz-Bee/2.00.5622" +548[] = "http://www.rawgrunt.com/index.html" +548[] = "Blaiz Enterprises" +548[] = "http://www.blaiz.net/" +548[] = "bot.png" +548[] = "" +548[] = "/list-of-ua/bot-detail?bot=Blaiz-Bee" +580[] = "Blaiz-Bee/2.00.5655 (+http://www.blaiz.net)" +580[] = "Blaiz-Bee" +580[] = "Blaiz-Bee/2.00.5655" +580[] = "http://www.rawgrunt.com/index.html" +580[] = "Blaiz Enterprises" +580[] = "http://www.blaiz.net/" +580[] = "bot.png" +580[] = "" +580[] = "/list-of-ua/bot-detail?bot=Blaiz-Bee" +665[] = "Blaiz-Bee/2.00.6082 (+http://www.blaiz.net)" +665[] = "Blaiz-Bee" +665[] = "Blaiz-Bee/2.00.6082" +665[] = "http://www.rawgrunt.com/index.html" +665[] = "Blaiz Enterprises" +665[] = "" +665[] = "bot.png" +665[] = "" +665[] = "/list-of-ua/bot-detail?bot=Blaiz-Bee" +749[] = "Blaiz-Bee/2.00.8315 (BE Internet Search Engine http://www.rawgrunt.com)" +749[] = "Blaiz-Bee" +749[] = "Blaiz-Bee/2.00.8315" +749[] = "http://www.rawgrunt.com/index.html" +749[] = "Blaiz Enterprises" +749[] = "" +749[] = "bot.png" +749[] = "" +749[] = "/list-of-ua/bot-detail?bot=Blaiz-Bee" +4519[] = "Mozilla/5.0 (compatible; BlinkaCrawler/1.0; +http://www.blinka.jp/crawler/)" +4519[] = "BlinkaCrawler" +4519[] = "BlinkaCrawler/1.0" +4519[] = "http://www.blinka.jp/crawler/" +4519[] = "Blinka project" +4519[] = "http://www.blinka.jp/" +4519[] = "bot.png" +4519[] = "" +4519[] = "/list-of-ua/bot-detail?bot=BlinkaCrawler" +1726[] = "Bloggsi/1.0 (http://bloggsi.com/)" +1726[] = "Bloggsi" +1726[] = "Bloggsi/1.0" +1726[] = "http://bloggsi.com/" +1726[] = "Stefan Fischerländer" +1726[] = "" +1726[] = "bot.png" +1726[] = "" +1726[] = "/list-of-ua/bot-detail?bot=Bloggsi" +1637[] = "BlogPulseLive (support@blogpulse.com)" +1637[] = "BlogPulse" +1637[] = "BlogPulseLive" +1637[] = "http://www.blogpulse.com/" +1637[] = "Nielsen Company" +1637[] = "http://www.nielsen-online.com/" +1637[] = "bot.png" +1637[] = "" +1637[] = "/list-of-ua/bot-detail?bot=BlogPulse" +1754[] = "BlogPulse (ISSpider-3.0)" +1754[] = "BlogPulse" +1754[] = "BlogPulse" +1754[] = "http://www.blogpulse.com/" +1754[] = "Nielsen Company" +1754[] = "http://www.nielsen-online.com/" +1754[] = "bot.png" +1754[] = "" +1754[] = "/list-of-ua/bot-detail?bot=BlogPulse" +146[] = "boitho.com-dc/0.83 ( http://www.boitho.com/dcbot.html )" +146[] = "boitho.com-dc" +146[] = "boitho.com-dc/0.83" +146[] = "http://www.boitho.com/dcbot.html" +146[] = "Boitho" +146[] = "http://www.boitho.com/" +146[] = "bot.png" +146[] = "" +146[] = "/list-of-ua/bot-detail?bot=boitho.com-dc" +328[] = "boitho.com-dc/0.79 ( http://www.boitho.com/dcbot.html )" +328[] = "boitho.com-dc" +328[] = "boitho.com-dc/0.79" +328[] = "http://www.boitho.com/dcbot.html" +328[] = "Boitho" +328[] = "http://www.boitho.com/" +328[] = "bot.png" +328[] = "" +328[] = "/list-of-ua/bot-detail?bot=boitho.com-dc" +456[] = "boitho.com-dc/0.85 ( http://www.boitho.com/dcbot.html )" +456[] = "boitho.com-dc" +456[] = "boitho.com-dc/0.85" +456[] = "http://www.boitho.com/dcbot.html" +456[] = "Boitho" +456[] = "http://www.boitho.com/" +456[] = "bot.png" +456[] = "" +456[] = "/list-of-ua/bot-detail?bot=boitho.com-dc" +833[] = "boitho.com-dc/0.86 ( http://www.boitho.com/dcbot.html )" +833[] = "boitho.com-dc" +833[] = "boitho.com-dc/0.86" +833[] = "http://www.boitho.com/dcbot.html" +833[] = "Boitho" +833[] = "http://www.boitho.com/" +833[] = "bot.png" +833[] = "" +833[] = "/list-of-ua/bot-detail?bot=boitho.com-dc" +1479[] = "boitho.com-dc/0.82 ( http://www.boitho.com/dcbot.html )" +1479[] = "boitho.com-dc" +1479[] = "boitho.com-dc/0.82" +1479[] = "http://www.boitho.com/dcbot.html" +1479[] = "Boitho" +1479[] = "http://www.boitho.com/" +1479[] = "bot.png" +1479[] = "" +1479[] = "/list-of-ua/bot-detail?bot=boitho.com-dc" +1733[] = "Nokia6680/1.0 (4.04.07) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 (botmobi find.mobi/bot.html find@mtld.mobi)" +1733[] = "botmobi" +1733[] = "botmobi" +1733[] = "http://find.mobi/bot.html" +1733[] = "mTLD, Ltd." +1733[] = "http://mtld.mobi/" +1733[] = "bot.png" +1733[] = "" +1733[] = "/list-of-ua/bot-detail?bot=botmobi" +1753[] = "BotOnParade, http://www.bots-on-para.de/bot.html" +1753[] = "BotOnParade" +1753[] = "BotOnParade" +1753[] = "http://www.bots-on-para.de/bot.html" +1753[] = "Angus Internetmarketing" +1753[] = "http://www.angus.co.uk/" +1753[] = "bot.png" +1753[] = "" +1753[] = "/list-of-ua/bot-detail?bot=BotOnParade" +1752[] = "Browsershots" +1752[] = "Browsershots" +1752[] = "Browsershots" +1752[] = "http://trac.browsershots.org/wiki/PrivacyPolicy" +1752[] = "Browsershots.org" +1752[] = "http://browsershots.org/" +1752[] = "bot.png" +1752[] = "" +1752[] = "/list-of-ua/bot-detail?bot=Browsershots" +237[] = "btbot/0.4 (+http://www.btbot.com/btbot.html)" +237[] = "btbot" +237[] = "btbot/0.4" +237[] = "http://www.btbot.com/btbot.html" +237[] = "btbot.com" +237[] = "http://www.btbot.com/" +237[] = "bot.png" +237[] = "" +237[] = "/list-of-ua/bot-detail?bot=btbot" +1516[] = "Mozilla/5.0 (compatible; Butterfly/1.0; +http://labs.topsy.com/butterfly.html) Gecko/2009032608 Firefox/3.0.8" +1516[] = "Butterfly" +1516[] = "Butterfly/1.0" +1516[] = "http://labs.topsy.com/butterfly.html" +1516[] = "Topsy Labs" +1516[] = "http://labs.topsy.com/" +1516[] = "bot.png" +1516[] = "" +1516[] = "/list-of-ua/bot-detail?bot=Butterfly" +5100[] = "Mozilla/5.0 (compatible; Butterfly/1.0; +http://labs.topsy.com/butterfly/) Gecko/2009032608 Firefox/3.0.8" +5100[] = "Butterfly" +5100[] = "Butterfly/1.0 a" +5100[] = "http://labs.topsy.com/butterfly.html" +5100[] = "Topsy Labs" +5100[] = "http://labs.topsy.com/" +5100[] = "bot.png" +5100[] = "" +5100[] = "/list-of-ua/bot-detail?bot=Butterfly" +817[] = "Mozilla/5.0 (compatible; BuzzRankingBot/1.0; +http://www.buzzrankingbot.com/)" +817[] = "BuzzRankingBot" +817[] = "BuzzRankingBot/1.0" +817[] = "http://www.buzzrankingbot.com/" +817[] = "Matthieu Aubry" +817[] = "http://giik.net/" +817[] = "bot.png" +817[] = "" +817[] = "/list-of-ua/bot-detail?bot=BuzzRankingBot" +4939[] = "CamontSpider/1.0 +http://epweb2.ph.bham.ac.uk/user/slater/camont/info.html" +4939[] = "CamontSpider" +4939[] = "CamontSpider/1.0" +4939[] = "http://epweb2.ph.bham.ac.uk/user/slater/camont/info.html" +4939[] = "Camtology consortium" +4939[] = "http://www.hep.phy.cam.ac.uk/~parker/camtology/about.html" +4939[] = "bot.png" +4939[] = "" +4939[] = "/list-of-ua/bot-detail?bot=CamontSpider" +1481[] = "CatchBot/1.0; +http://www.catchbot.com" +1481[] = "CatchBot" +1481[] = "CatchBot/1.0" +1481[] = "http://www.catchbot.com/" +1481[] = "Reed Business Information Pty Limited" +1481[] = "http://www.reedbusiness.com/" +1481[] = "bot_CatchBot.png" +1481[] = "" +1481[] = "/list-of-ua/bot-detail?bot=CatchBot" +5665[] = "CatchBot/3.0; +http://www.catchbot.com" +5665[] = "CatchBot" +5665[] = "CatchBot/3.0" +5665[] = "http://www.catchbot.com/" +5665[] = "Reed Business Information Pty Limited" +5665[] = "http://www.reedbusiness.com/" +5665[] = "bot_CatchBot.png" +5665[] = "" +5665[] = "/list-of-ua/bot-detail?bot=CatchBot" +4977[] = "CatchBot/2.0; +http://www.catchbot.com" +4977[] = "CatchBot" +4977[] = "CatchBot/2.0" +4977[] = "http://www.catchbot.com/" +4977[] = "Reed Business Information Pty Limited" +4977[] = "http://www.reedbusiness.com/" +4977[] = "bot_CatchBot.png" +4977[] = "" +4977[] = "/list-of-ua/bot-detail?bot=CatchBot" +499[] = "Cazoodle/Nutch-0.9-dev (Cazoodle Nutch Crawler; http://www.cazoodle.com; mqbot@cazoodle.com)" +499[] = "CazoodleBot" +499[] = "CazoodleBot a" +499[] = "http://www.cazoodle.com/cazoodlebot.php" +499[] = "Cazoodle Inc." +499[] = "http://www.cazoodle.com/" +499[] = "bot.png" +499[] = "" +499[] = "/list-of-ua/bot-detail?bot=CazoodleBot" +588[] = "CazoodleBot/Nutch-0.9-dev (CazoodleBot Crawler; http://www.cazoodle.com; mqbot@cazoodle.com)" +588[] = "CazoodleBot" +588[] = "CazoodleBot d" +588[] = "http://www.cazoodle.com/cazoodlebot.php" +588[] = "Cazoodle Inc." +588[] = "http://www.cazoodle.com/" +588[] = "bot.png" +588[] = "" +588[] = "/list-of-ua/bot-detail?bot=CazoodleBot" +742[] = "CazoodleBot/0.1 (CazoodleBot Crawler; http://www.cazoodle.com; mqbot@cazoodle.com)" +742[] = "CazoodleBot" +742[] = "CazoodleBot b" +742[] = "http://www.cazoodle.com/cazoodlebot.php" +742[] = "Cazoodle Inc." +742[] = "http://www.cazoodle.com/" +742[] = "bot.png" +742[] = "" +742[] = "/list-of-ua/bot-detail?bot=CazoodleBot" +928[] = "CazoodleBot/Nutch-0.9-dev (CazoodleBot Crawler; http://www.cazoodle.com/cazoodlebot; cazoodlebot@cazoodle.com)" +928[] = "CazoodleBot" +928[] = "CazoodleBot c" +928[] = "http://www.cazoodle.com/cazoodlebot.php" +928[] = "Cazoodle Inc." +928[] = "http://www.cazoodle.com/" +928[] = "bot.png" +928[] = "" +928[] = "/list-of-ua/bot-detail?bot=CazoodleBot" +969[] = "CazoodleBot/CazoodleBot-0.1 (CazoodleBot Crawler; http://www.cazoodle.com/cazoodlebot; cazoodlebot@cazoodle.com)" +969[] = "CazoodleBot" +969[] = "CazoodleBot-0.1" +969[] = "http://www.cazoodle.com/cazoodlebot.php" +969[] = "Cazoodle Inc." +969[] = "http://www.cazoodle.com/" +969[] = "bot.png" +969[] = "" +969[] = "/list-of-ua/bot-detail?bot=CazoodleBot" +1482[] = "CazoodleBot/0.0.2 (http://www.cazoodle.com/contact.php; cbot@cazoodle.com)" +1482[] = "CazoodleBot" +1482[] = "CazoodleBot/0.0.2" +1482[] = "http://www.cazoodle.com/cazoodlebot.php" +1482[] = "Cazoodle Inc." +1482[] = "http://www.cazoodle.com/" +1482[] = "bot.png" +1482[] = "" +1482[] = "/list-of-ua/bot-detail?bot=CazoodleBot" +1238[] = "CCBot/1.0 (+http://www.commoncrawl.org/bot.html)" +1238[] = "CCBot" +1238[] = "CCBot/1.0" +1238[] = "http://www.commoncrawl.org/faq.htm" +1238[] = "CommonCrawl Foundation" +1238[] = "http://www.commoncrawl.org/" +1238[] = "bot.png" +1238[] = "" +1238[] = "/list-of-ua/bot-detail?bot=CCBot" +184[] = "ccubee/3.2" +184[] = "ccubee" +184[] = "ccubee/3.2" +184[] = "http://empyreum.com/technologies/platforms/ccubee/" +184[] = "EMPYREUM k. s." +184[] = "http://empyreum.com/" +184[] = "bot.png" +184[] = "" +184[] = "/list-of-ua/bot-detail?bot=ccubee" +200[] = "ccubee/3.3" +200[] = "ccubee" +200[] = "ccubee/3.3" +200[] = "http://empyreum.com/technologies/platforms/ccubee/" +200[] = "EMPYREUM k. s." +200[] = "http://empyreum.com/" +200[] = "bot.png" +200[] = "" +200[] = "/list-of-ua/bot-detail?bot=ccubee" +207[] = "ccubee/3.7" +207[] = "ccubee" +207[] = "ccubee/3.7" +207[] = "http://empyreum.com/technologies/platforms/ccubee/" +207[] = "EMPYREUM k. s." +207[] = "http://empyreum.com/" +207[] = "bot.png" +207[] = "" +207[] = "/list-of-ua/bot-detail?bot=ccubee" +263[] = "ccubee/4.0" +263[] = "ccubee" +263[] = "ccubee/4.0" +263[] = "http://empyreum.com/technologies/platforms/ccubee/" +263[] = "EMPYREUM k. s." +263[] = "http://empyreum.com/" +263[] = "bot.png" +263[] = "" +263[] = "/list-of-ua/bot-detail?bot=ccubee" +327[] = "ccubee/3.5" +327[] = "ccubee" +327[] = "ccubee/3.5" +327[] = "http://empyreum.com/technologies/platforms/ccubee/" +327[] = "EMPYREUM k. s." +327[] = "http://empyreum.com/" +327[] = "bot.png" +327[] = "" +327[] = "/list-of-ua/bot-detail?bot=ccubee" +560[] = "ccubee/9.0" +560[] = "ccubee" +560[] = "ccubee/9.0" +560[] = "http://empyreum.com/technologies/platforms/ccubee/" +560[] = "EMPYREUM k. s." +560[] = "http://empyreum.com/" +560[] = "bot.png" +560[] = "" +560[] = "/list-of-ua/bot-detail?bot=ccubee" +594[] = "ccubee/10.0" +594[] = "ccubee" +594[] = "ccubee/10.0" +594[] = "http://empyreum.com/technologies/platforms/ccubee/" +594[] = "EMPYREUM k. s." +594[] = "http://empyreum.com/" +594[] = "bot.png" +594[] = "" +594[] = "/list-of-ua/bot-detail?bot=ccubee" +824[] = "ccubee/3.5" +824[] = "ccubee" +824[] = "ccubee/3.5" +824[] = "http://empyreum.com/technologies/platforms/ccubee/" +824[] = "EMPYREUM k. s." +824[] = "http://empyreum.com/" +824[] = "bot.png" +824[] = "" +824[] = "/list-of-ua/bot-detail?bot=ccubee" +1023[] = "ccubee/2008" +1023[] = "ccubee" +1023[] = "ccubee/2008" +1023[] = "http://empyreum.com/technologies/platforms/ccubee/" +1023[] = "EMPYREUM k. s." +1023[] = "http://empyreum.com/" +1023[] = "bot.png" +1023[] = "" +1023[] = "/list-of-ua/bot-detail?bot=ccubee" +812[] = "mozilla/4.0 (compatible; changedetection/1.0 (admin@changedetection.com))" +812[] = "changedetection" +812[] = "changedetection/1.0" +812[] = "" +812[] = "FreeFind.com" +812[] = "http://www.freefind.com/" +812[] = "bot.png" +812[] = "" +812[] = "/list-of-ua/bot-detail?bot=changedetection" +959[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://www.changedetection.com/bot.html )" +959[] = "ChangeDetection" +959[] = "ChangeDetection" +959[] = "http://www.changedetection.com/bot.html" +959[] = "FreeFind.com" +959[] = "http://www.freefind.com/" +959[] = "bot.png" +959[] = "" +959[] = "/list-of-ua/bot-detail?bot=ChangeDetection" +1270[] = "Mozilla/5.0 (compatible; Charlotte/1.1; http://www.searchme.com/support/)" +1270[] = "Charlotte" +1270[] = "Charlotte/1.1" +1270[] = "http://www.searchme.com/support/)" +1270[] = "Searchme, Inc." +1270[] = "http://www.searchme.com/" +1270[] = "bot.png" +1270[] = "" +1270[] = "/list-of-ua/bot-detail?bot=Charlotte" +76[] = "City4you/1.3 Cesky (+http://www.city4you.pl)" +76[] = "City4you" +76[] = "City4you/1.3 Cesky" +76[] = "" +76[] = "city4you" +76[] = "http://www.city4you.pl/" +76[] = "bot.png" +76[] = "" +76[] = "/list-of-ua/bot-detail?bot=City4you" +3409[] = "Cityreview Robot (+http://www.cityreview.org/crawler/)" +3409[] = "cityreview" +3409[] = "cityreview" +3409[] = "http://www.cityreview.org/crawler/" +3409[] = "SISTRIX GmbH" +3409[] = "http://www.sistrix.com/" +3409[] = "bot_cityreview.png" +3409[] = "" +3409[] = "/list-of-ua/bot-detail?bot=cityreview" +393[] = "CJB.NET Proxy" +393[] = "CJB.NET Proxy" +393[] = "CJB.NET Proxy" +393[] = "http://proxy.cjb.net/" +393[] = "CJB.NET" +393[] = "http://www.cjb.net/" +393[] = "bot.png" +393[] = "" +393[] = "/list-of-ua/bot-detail?bot=CJB.NET Proxy" +5909[] = "Mozilla/5.0 (compatible; CligooRobot/2.0; +http://www.cligoo.de/wk/technik.php)" +5909[] = "CligooRobot" +5909[] = "CligooRobot/2.0" +5909[] = "http://www.cligoo.de/wk/technik.php" +5909[] = "cligoo medien service UG" +5909[] = "http://www.cligoo.de/" +5909[] = "bot.png" +5909[] = "" +5909[] = "/list-of-ua/bot-detail?bot=CligooRobot" +608[] = "Combine/3 http://combine.it.lth.se/" +608[] = "Combine" +608[] = "Combine/3" +608[] = "http://combine.it.lth.se/" +608[] = "Lunds universitet" +608[] = "http://www.lu.se/" +608[] = "bot.png" +608[] = "" +608[] = "/list-of-ua/bot-detail?bot=Combine" +32[] = "ConveraMultiMediaCrawler/0.1 (+http://www.authoritativeweb.com/crawl)" +32[] = "ConveraCrawler" +32[] = "ConveraMultiMediaCrawler/0.1" +32[] = "http://www.authoritativeweb.com/crawl" +32[] = "Convera Corporation" +32[] = "http://www.authoritativeweb.com/" +32[] = "bot.png" +32[] = "" +32[] = "/list-of-ua/bot-detail?bot=ConveraCrawler" +80[] = "ConveraCrawler/0.9d (+http://www.authoritativeweb.com/crawl)" +80[] = "ConveraCrawler" +80[] = "ConveraCrawler 0.9d" +80[] = "http://www.authoritativeweb.com/crawl" +80[] = "Convera Corporation" +80[] = "http://www.authoritativeweb.com/" +80[] = "bot.png" +80[] = "" +80[] = "/list-of-ua/bot-detail?bot=ConveraCrawler" +688[] = "ConveraCrawler/0.9e (+http://www.authoritativeweb.com/crawl)" +688[] = "ConveraCrawler" +688[] = "ConveraCrawler 0.9e" +688[] = "http://www.authoritativeweb.com/crawl" +688[] = "Convera Corporation" +688[] = "http://www.authoritativeweb.com/" +688[] = "bot.png" +688[] = "" +688[] = "/list-of-ua/bot-detail?bot=ConveraCrawler" +1495[] = "copyright sheriff (+http://www.copyrightsheriff.com/)" +1495[] = "copyright sheriff" +1495[] = "copyright sheriff" +1495[] = "" +1495[] = "CopyrightSheriff .Com" +1495[] = "http://www.copyrightsheriff.com/" +1495[] = "bot.png" +1495[] = "" +1495[] = "/list-of-ua/bot-detail?bot=copyright sheriff" +2170[] = "CorpusCrawler 2.0.0 (http://corpora.fi.muni.cz/crawler/)" +2170[] = "CorpusCrawler" +2170[] = "CorpusCrawler 2.0.0" +2170[] = "http://corpora.fi.muni.cz/crawler/" +2170[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2170[] = "http://nlp.fi.muni.cz/en/nlplab" +2170[] = "bot_CorpusCrawler.png" +2170[] = "" +2170[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2181[] = "CorpusCrawler 2.0.8 (http://corpora.fi.muni.cz/crawler/)" +2181[] = "CorpusCrawler" +2181[] = "CorpusCrawler 2.0.8" +2181[] = "http://corpora.fi.muni.cz/crawler/" +2181[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2181[] = "http://nlp.fi.muni.cz/en/nlplab" +2181[] = "bot_CorpusCrawler.png" +2181[] = "" +2181[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2194[] = "CorpusCrawler 2.0.9 (http://corpora.fi.muni.cz/crawler/)" +2194[] = "CorpusCrawler" +2194[] = "CorpusCrawler 2.0.9" +2194[] = "http://corpora.fi.muni.cz/crawler/" +2194[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2194[] = "http://nlp.fi.muni.cz/en/nlplab" +2194[] = "bot_CorpusCrawler.png" +2194[] = "" +2194[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2212[] = "CorpusCrawler 2.0.10 (http://corpora.fi.muni.cz/crawler/)" +2212[] = "CorpusCrawler" +2212[] = "CorpusCrawler 2.0.10" +2212[] = "http://corpora.fi.muni.cz/crawler/" +2212[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2212[] = "http://nlp.fi.muni.cz/en/nlplab" +2212[] = "bot_CorpusCrawler.png" +2212[] = "" +2212[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2242[] = "CorpusCrawler 2.0.15 (http://corpora.fi.muni.cz/crawler/)" +2242[] = "CorpusCrawler" +2242[] = "CorpusCrawler 2.0.15" +2242[] = "http://corpora.fi.muni.cz/crawler/" +2242[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2242[] = "http://nlp.fi.muni.cz/en/nlplab" +2242[] = "bot_CorpusCrawler.png" +2242[] = "" +2242[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2235[] = "CorpusCrawler 2.0.12 (http://corpora.fi.muni.cz/crawler/)" +2235[] = "CorpusCrawler" +2235[] = "CorpusCrawler 2.0.12" +2235[] = "http://corpora.fi.muni.cz/crawler/" +2235[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2235[] = "http://nlp.fi.muni.cz/en/nlplab" +2235[] = "bot_CorpusCrawler.png" +2235[] = "" +2235[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2239[] = "CorpusCrawler 2.0.13 (http://corpora.fi.muni.cz/crawler/)" +2239[] = "CorpusCrawler" +2239[] = "CorpusCrawler 2.0.13" +2239[] = "http://corpora.fi.muni.cz/crawler/" +2239[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2239[] = "http://nlp.fi.muni.cz/en/nlplab" +2239[] = "bot_CorpusCrawler.png" +2239[] = "" +2239[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2241[] = "CorpusCrawler 2.0.14 (http://corpora.fi.muni.cz/crawler/)" +2241[] = "CorpusCrawler" +2241[] = "CorpusCrawler 2.0.14" +2241[] = "http://corpora.fi.muni.cz/crawler/" +2241[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2241[] = "http://nlp.fi.muni.cz/en/nlplab" +2241[] = "bot_CorpusCrawler.png" +2241[] = "" +2241[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2952[] = "CorpusCrawler 2.0.22 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +2952[] = "CorpusCrawler" +2952[] = "CorpusCrawler 2.0.22" +2952[] = "http://corpora.fi.muni.cz/crawler/" +2952[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2952[] = "http://nlp.fi.muni.cz/en/nlplab" +2952[] = "bot_CorpusCrawler.png" +2952[] = "" +2952[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2999[] = "CorpusCrawler 2.0.24 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +2999[] = "CorpusCrawler" +2999[] = "CorpusCrawler 2.0.24" +2999[] = "http://corpora.fi.muni.cz/crawler/" +2999[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2999[] = "http://nlp.fi.muni.cz/en/nlplab" +2999[] = "bot_CorpusCrawler.png" +2999[] = "" +2999[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +3003[] = "CorpusCrawler 2.0.25 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +3003[] = "CorpusCrawler" +3003[] = "CorpusCrawler 2.0.25" +3003[] = "http://corpora.fi.muni.cz/crawler/" +3003[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +3003[] = "http://nlp.fi.muni.cz/en/nlplab" +3003[] = "bot_CorpusCrawler.png" +3003[] = "" +3003[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2773[] = "CorpusCrawler 2.0.17 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +2773[] = "CorpusCrawler" +2773[] = "CorpusCrawler 2.0.17" +2773[] = "http://corpora.fi.muni.cz/crawler/" +2773[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2773[] = "http://nlp.fi.muni.cz/en/nlplab" +2773[] = "bot_CorpusCrawler.png" +2773[] = "" +2773[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2844[] = "CorpusCrawler 2.0.19 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +2844[] = "CorpusCrawler" +2844[] = "CorpusCrawler 2.0.19" +2844[] = "http://corpora.fi.muni.cz/crawler/" +2844[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2844[] = "http://nlp.fi.muni.cz/en/nlplab" +2844[] = "bot_CorpusCrawler.png" +2844[] = "" +2844[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2937[] = "CorpusCrawler 2.0.20 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +2937[] = "CorpusCrawler" +2937[] = "CorpusCrawler 2.0.20" +2937[] = "http://corpora.fi.muni.cz/crawler/" +2937[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2937[] = "http://nlp.fi.muni.cz/en/nlplab" +2937[] = "bot_CorpusCrawler.png" +2937[] = "" +2937[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +2948[] = "CorpusCrawler 2.0.21 (http://corpora.fi.muni.cz/crawler/);Project:CzCorpus" +2948[] = "CorpusCrawler" +2948[] = "CorpusCrawler 2.0.21" +2948[] = "http://corpora.fi.muni.cz/crawler/" +2948[] = "NLP - at the Faculty of Informatics, Masaryk University, Brno" +2948[] = "http://nlp.fi.muni.cz/en/nlplab" +2948[] = "bot_CorpusCrawler.png" +2948[] = "" +2948[] = "/list-of-ua/bot-detail?bot=CorpusCrawler" +5860[] = "Covario-IDS/1.0 (Covario; http://www.covario.com/ids; support at covario dot com)" +5860[] = "Covario-IDS" +5860[] = "Covario-IDS/1.0" +5860[] = "http://www.covario.com/ids" +5860[] = "Covario Inc." +5860[] = "http://www.covario.com/" +5860[] = "bot.png" +5860[] = "" +5860[] = "/list-of-ua/bot-detail?bot=Covario-IDS" +317[] = "csci_b659/0.13" +317[] = "csci_b659" +317[] = "csci_b659/0.13" +317[] = "http://informatics.indiana.edu/fil/Class/b659/" +317[] = "Indiana University" +317[] = "http://www.indiana.edu/" +317[] = "bot.png" +317[] = "" +317[] = "/list-of-ua/bot-detail?bot=csci_b659" +725[] = "DataFountains/Dmoz Downloader (http://ivia.ucr.edu/useragents.shtml)" +725[] = "DataFountains" +725[] = "DataFountains at Dmoz" +725[] = "http://ivia.ucr.edu/useragents.shtml" +725[] = "University of California" +725[] = "http://www.universityofcalifornia.edu/" +725[] = "bot.png" +725[] = "" +725[] = "/list-of-ua/bot-detail?bot=DataFountains" +755[] = "DataFountains/DMOZ Feature Vector Corpus Creator (http://ivia.ucr.edu/useragents.shtml)" +755[] = "DataFountains" +755[] = "DataFountains at Dmoz b" +755[] = "http://ivia.ucr.edu/useragents.shtml" +755[] = "University of California" +755[] = "http://www.universityofcalifornia.edu/" +755[] = "bot.png" +755[] = "" +755[] = "/list-of-ua/bot-detail?bot=DataFountains" +422[] = "DataparkSearch/4.40.1 (+http://www.dataparksearch.org/)" +422[] = "DataparkSearch" +422[] = "DataparkSearch/4.40" +422[] = "http://www.dataparksearch.org/" +422[] = "DataPark" +422[] = "http://www.datapark.ru/" +422[] = "bot.png" +422[] = "" +422[] = "/list-of-ua/bot-detail?bot=DataparkSearch" +630[] = "Mozilla/4.0 (compatible; MSIE is not me; DAUMOA/1.0.0; DAUM Web Robot; Daum Communications Corp., Korea)" +630[] = "Daumoa" +630[] = "DAUMOA/1.0.0" +630[] = "http://ws.daum.net/aboutWebSearch_en.html" +630[] = "Daum Communications Corp." +630[] = "http://info.daum.net/" +630[] = "bot.png" +630[] = "" +630[] = "/list-of-ua/bot-detail?bot=Daumoa" +807[] = "Mozilla/4.0 (compatible; MSIE is not me; DAUMOA/1.0.1; DAUM Web Robot; Daum Communications Corp., Korea)" +807[] = "Daumoa" +807[] = "DAUMOA/1.0.1" +807[] = "http://ws.daum.net/aboutWebSearch_en.html" +807[] = "Daum Communications Corp." +807[] = "http://info.daum.net/" +807[] = "bot.png" +807[] = "" +807[] = "/list-of-ua/bot-detail?bot=Daumoa" +967[] = "Mozilla/4.0 (compatible; MSIE enviable; DAUMOA/1.0.1; DAUM Web Robot; Daum Communications Corp., Korea; +http://ws.daum.net/aboutkr.html)" +967[] = "Daumoa" +967[] = "DAUMOA/1.0.1 b" +967[] = "http://ws.daum.net/aboutWebSearch_en.html" +967[] = "Daum Communications Corp." +967[] = "http://info.daum.net/" +967[] = "bot.png" +967[] = "" +967[] = "/list-of-ua/bot-detail?bot=Daumoa" +1150[] = "Mozilla/4.0 (compatible; MSIE enviable; DAUMOA 2.0; DAUM Web Robot; Daum Communications Corp., Korea; +http://ws.daum.net/aboutkr.html)" +1150[] = "Daumoa" +1150[] = "Daumoa/2.0" +1150[] = "http://ws.daum.net/aboutWebSearch_en.html" +1150[] = "Daum Communications Corp." +1150[] = "http://info.daum.net/" +1150[] = "bot.png" +1150[] = "" +1150[] = "/list-of-ua/bot-detail?bot=Daumoa" +1466[] = "Mozilla/5.0 (compatible; MSIE or Firefox mutant; not on Windows server; +http://ws.daum.net/aboutWebSearch.html) Daumoa/2.0" +1466[] = "Daumoa" +1466[] = "Daumoa/2.0 b" +1466[] = "http://ws.daum.net/aboutWebSearch_en.html" +1466[] = "Daum Communications Corp." +1466[] = "http://info.daum.net/" +1466[] = "bot.png" +1466[] = "" +1466[] = "/list-of-ua/bot-detail?bot=Daumoa" +1530[] = "Mozilla/5.0 (compatible; DBLBot/1.0; +http://www.dontbuylists.com/)" +1530[] = "DBLBot" +1530[] = "DBLBot/1.0" +1530[] = "http://www.dontbuylists.com/faq.htm" +1530[] = "Dontbuylists.com" +1530[] = "http://www.dontbuylists.com/team.htm" +1530[] = "bot.png" +1530[] = "" +1530[] = "/list-of-ua/bot-detail?bot=DBLBot" +1568[] = "DealGates Bot/1.1 by Luc Michalski (http://spider.dealgates.com/bot.html)" +1568[] = "DealGates Bot" +1568[] = "DealGates Bot/1.1" +1568[] = "http://www.dealgates.net/bot.html" +1568[] = "Luc Michalski" +1568[] = "http://www.dealgates.net/" +1568[] = "bot.png" +1568[] = "" +1568[] = "/list-of-ua/bot-detail?bot=DealGates Bot" +731[] = "Mozilla/5.0 (compatible; del.icio.us-thumbnails/1.0; FreeBSD) KHTML/4.3.2 (like Gecko)" +731[] = "del.icio.us-thumbnails" +731[] = "del.icio.us-thumbnails/1.0" +731[] = "" +731[] = "Yahoo! Inc" +731[] = "http://www.yahoo.com/" +731[] = "bot.png" +731[] = "" +731[] = "/list-of-ua/bot-detail?bot=del.icio.us-thumbnails" +752[] = "del.icio.us-thumbnails/1.0 Mozilla/5.0 (compatible; Konqueror/3.4; FreeBSD) KHTML/3.4.2 (like Gecko)" +752[] = "del.icio.us-thumbnails" +752[] = "del.icio.us-thumbnails/1.0" +752[] = "" +752[] = "Yahoo!" +752[] = "http://www.yahoo.com/" +752[] = "bot.png" +752[] = "" +752[] = "/list-of-ua/bot-detail?bot=del.icio.us-thumbnails" +652[] = "Mozilla/4.0 (compatible; DepSpid/5.07; +http://about.depspid.net)" +652[] = "DepSpid" +652[] = "DepSpid/5.07" +652[] = "http://about.depspid.net/" +652[] = "Bjoern Henke" +652[] = "http://www.bjoernhenke.de/" +652[] = "bot.png" +652[] = "" +652[] = "/list-of-ua/bot-detail?bot=DepSpid" +811[] = "depspid - the dependency spider" +811[] = "DepSpid" +811[] = "DepSpid" +811[] = "http://about.depspid.net/" +811[] = "Bjoern Henke" +811[] = "http://www.bjoernhenke.de/" +811[] = "bot.png" +811[] = "" +811[] = "/list-of-ua/bot-detail?bot=DepSpid" +938[] = "Mozilla/4.0 (compatible; DepSpid/5.10; +http://about.depspid.net)" +938[] = "DepSpid" +938[] = "DepSpid/5.10" +938[] = "http://about.depspid.net/" +938[] = "Bjoern Henke" +938[] = "http://www.bjoernhenke.de/" +938[] = "bot.png" +938[] = "" +938[] = "/list-of-ua/bot-detail?bot=DepSpid" +1137[] = "Mozilla/4.0 (compatible; DepSpid/5.24; +http://about.depspid.net)" +1137[] = "DepSpid" +1137[] = "DepSpid/5.24" +1137[] = "http://about.depspid.net/" +1137[] = "Bjoern Henke" +1137[] = "http://www.bjoernhenke.de/" +1137[] = "bot.png" +1137[] = "" +1137[] = "/list-of-ua/bot-detail?bot=DepSpid" +1164[] = "Mozilla/4.0 (compatible; DepSpid/5.25; +http://about.depspid.net)" +1164[] = "DepSpid" +1164[] = "DepSpid/5.25" +1164[] = "http://about.depspid.net/" +1164[] = "Bjoern Henke" +1164[] = "http://www.bjoernhenke.de/" +1164[] = "bot.png" +1164[] = "" +1164[] = "/list-of-ua/bot-detail?bot=DepSpid" +1214[] = "Mozilla/4.0 (compatible; DepSpid/5.26; +http://about.depspid.net)" +1214[] = "DepSpid" +1214[] = "DepSpid/5.26" +1214[] = "http://about.depspid.net/" +1214[] = "Bjoern Henke" +1214[] = "http://www.bjoernhenke.de/" +1214[] = "bot.png" +1214[] = "" +1214[] = "/list-of-ua/bot-detail?bot=DepSpid" +1771[] = "mozilla/5.0 (compatible; discobot/1.1; +http://discoveryengine.com/discobot.html)" +1771[] = "discobot" +1771[] = "discobot/1.1" +1771[] = "http://www.discoveryengine.com/discobot.html" +1771[] = "discoveryengine.com. " +1771[] = "http://www.discoveryengine.com/" +1771[] = "bot.png" +1771[] = "" +1771[] = "/list-of-ua/bot-detail?bot=discobot" +6244[] = "Mozilla/5.0 (compatible; discobot/1.0; +http://discoveryengine.com/discobot.html)" +6244[] = "discobot" +6244[] = "discobot/1.0" +6244[] = "http://www.discoveryengine.com/discobot.html" +6244[] = "" +6244[] = "http://www.discoveryengine.com/" +6244[] = "bot.png" +6244[] = "" +6244[] = "/list-of-ua/bot-detail?bot=discobot" +1650[] = "Mozilla/5.0 (compatible; DKIMRepBot/1.0; +http://www.dkim-reputation.org)" +1650[] = "DKIMRepBot" +1650[] = "DKIMRepBot/1.0" +1650[] = "http://www.dkim-reputation.org/" +1650[] = "DKIM" +1650[] = "http://www.dkim.org/" +1650[] = "bot.png" +1650[] = "" +1650[] = "/list-of-ua/bot-detail?bot=DKIMRepBot" +1731[] = "Mozilla/5.0 (compatible; DNS-Digger-Explorer/1.0; +http://www.dnsdigger.com)" +1731[] = "DNS-Digger-Explorer" +1731[] = "DNS-Digger-Explorer/1.0" +1731[] = "" +1731[] = "DNSDigger" +1731[] = "http://www.dnsdigger.com/" +1731[] = "bot.png" +1731[] = "" +1731[] = "/list-of-ua/bot-detail?bot=DNS-Digger-Explorer" +5218[] = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; DomainDB-1.1; http://domaindb.com/crawler/)" +5218[] = "DomainDB" +5218[] = "DomainDB/1.1" +5218[] = "http://domaindb.com/crawler/" +5218[] = "Triop AB" +5218[] = "http://triop.se/" +5218[] = "bot.png" +5218[] = "" +5218[] = "/list-of-ua/bot-detail?bot=DomainDB" +1459[] = "Mozilla/5.0 (compatible; DotBot/1.1; http://www.dotnetdotcom.org/, crawler@dotnetdotcom.org)" +1459[] = "DotBot" +1459[] = "DotBot/1.1" +1459[] = "http://www.dotnetdotcom.org/" +1459[] = "dotnetdotcom.org" +1459[] = "http://www.dotnetdotcom.org/#cont" +1459[] = "bot.png" +1459[] = "" +1459[] = "/list-of-ua/bot-detail?bot=DotBot" +3333[] = "Mozilla/5.0 (compatible; dotSemantic/1.0; +http://www.dotsemantic.org)" +3333[] = "dotSemantic" +3333[] = "dotSemantic/1.0" +3333[] = "http://www.dotsemantic.org" +3333[] = "dotSemantic Projekt" +3333[] = "" +3333[] = "bot.png" +3333[] = "" +3333[] = "/list-of-ua/bot-detail?bot=dotSemantic" +1225[] = "DuckDuckBot/1.0; (+http://duckduckgo.com/duckduckbot.html)" +1225[] = "DuckDuckBot" +1225[] = "DuckDuckBot/1.0" +1225[] = "http://duckduckgo.com/duckduckbot.html" +1225[] = "Duck Duck Go, Inc." +1225[] = "http://duckduckgo.com/blog/" +1225[] = "bot.png" +1225[] = "" +1225[] = "/list-of-ua/bot-detail?bot=DuckDuckBot" +117[] = "e-SocietyRobot(http://www.yama.info.waseda.ac.jp/~yamana/es/)" +117[] = "e-SocietyRobot" +117[] = "e-SocietyRobot" +117[] = "http://www.yama.info.waseda.ac.jp/~yamana/es" +117[] = "Waseda University Yamana Laboratory" +117[] = "http://www.yama.info.waseda.ac.jp/" +117[] = "bot.png" +117[] = "" +117[] = "/list-of-ua/bot-detail?bot=e-SocietyRobot" +5187[] = "eCairn-Grabber/1.0 (+http://ecairn.com/grabber) curl/7.15" +5187[] = "eCairn-Grabber" +5187[] = "eCairn-Grabber/1.0" +5187[] = "http://ecairn.com/grabber" +5187[] = "eCairn Inc." +5187[] = "http://ecairn.com/" +5187[] = "bot_eCairn-Grabber.png" +5187[] = "" +5187[] = "/list-of-ua/bot-detail?bot=eCairn-Grabber" +556[] = "EDI/1.6.5 (Edacious & Intelligent Web Robot, Daum Communications Corp.)" +556[] = "EDI" +556[] = "EDI/1.6.5" +556[] = "" +556[] = "Daum Communications Corp." +556[] = "http://info.daum.net/" +556[] = "bot.png" +556[] = "" +556[] = "/list-of-ua/bot-detail?bot=EDI" +569[] = "Mozilla/4.0 (compatible; EDI/1.6.6; Edacious & Intelligent Web Robot; Daum Communications Corp., Korea)" +569[] = "EDI" +569[] = "EDI/1.6.6" +569[] = "" +569[] = "Daum Communications Corp." +569[] = "http://info.daum.net/" +569[] = "bot.png" +569[] = "" +569[] = "/list-of-ua/bot-detail?bot=EDI" +600[] = "Mozilla/4.0 (compatible; MSIE is not me; EDI/1.6.6; Edacious & Intelligent Web Robot; Daum Communications Corp., Korea)" +600[] = "EDI" +600[] = "EDI/1.6.6 b" +600[] = "" +600[] = "Daum Communications Corp." +600[] = "http://info.daum.net/" +600[] = "bot.png" +600[] = "" +600[] = "/list-of-ua/bot-detail?bot=EDI" +488[] = "egothor/8.0f (+http://ego.ms.mff.cuni.cz/)" +488[] = "egothor" +488[] = "egothor/8.0f" +488[] = "http://ego.ms.mff.cuni.cz/" +488[] = "Katedra softwarového inženýrství Univerzity Karlovi" +488[] = "http://kocour.ms.mff.cuni.cz/cs/" +488[] = "bot.png" +488[] = "" +488[] = "/list-of-ua/bot-detail?bot=egothor" +597[] = "Mozilla/5.0 (compatible; egothor/8.0g; +http://ego.ms.mff.cuni.cz/)" +597[] = "egothor" +597[] = "egothor/8.0g" +597[] = "https://kocour.ms.mff.cuni.cz/ego/" +597[] = "Katedra softwarového inženýrství Univerzity Karlovi" +597[] = "http://kocour.ms.mff.cuni.cz/cs/" +597[] = "bot.png" +597[] = "" +597[] = "/list-of-ua/bot-detail?bot=egothor" +1115[] = "Mozilla/5.0 (compatible; egothor/11.0d; +http://ego.ms.mff.cuni.cz/)" +1115[] = "egothor" +1115[] = "egothor/11.0d" +1115[] = "https://kocour.ms.mff.cuni.cz/ego/" +1115[] = "Katedra softwarového inženýrství Univerzity Karlovi" +1115[] = "http://kocour.ms.mff.cuni.cz/cs/" +1115[] = "bot.png" +1115[] = "" +1115[] = "/list-of-ua/bot-detail?bot=egothor" +1169[] = "Mozilla/5.0 (compatible; egothor/11.0d; +https://kocour.ms.mff.cuni.cz/ego/)" +1169[] = "egothor" +1169[] = "egothor/11.0d b" +1169[] = "https://kocour.ms.mff.cuni.cz/ego/" +1169[] = "Katedra softwarového inženýrství Univerzity Karlovi" +1169[] = "http://kocour.ms.mff.cuni.cz/cs/" +1169[] = "bot.png" +1169[] = "" +1169[] = "/list-of-ua/bot-detail?bot=egothor" +1323[] = "Mozilla/5.0 (compatible; egothor/12.0rc-2; +http://ego.ms.mff.cuni.cz/)" +1323[] = "egothor" +1323[] = "egothor/12.0rc-2" +1323[] = "https://kocour.ms.mff.cuni.cz/ego/" +1323[] = "Katedra softwarového inženýrství Univerzity Karlovi" +1323[] = "http://kocour.ms.mff.cuni.cz/cs/" +1323[] = "bot.png" +1323[] = "" +1323[] = "/list-of-ua/bot-detail?bot=egothor" +192[] = "ejupiter.com" +192[] = "ejupiter.com" +192[] = "ejupiter.com" +192[] = "http://robot.ejupiter.com/16/robot_privacy.html" +192[] = "eJupiter Inc" +192[] = "http://www.ejupiter.com/" +192[] = "bot.png" +192[] = "" +192[] = "/list-of-ua/bot-detail?bot=ejupiter.com" +564[] = "crawler43.ejupiter.com" +564[] = "ejupiter.com" +564[] = "ejupiter.com 43" +564[] = "http://robot.ejupiter.com/16/robot_privacy.html" +564[] = "eJupiter Inc" +564[] = "http://www.ejupiter.com/" +564[] = "bot.png" +564[] = "" +564[] = "/list-of-ua/bot-detail?bot=ejupiter.com" +1198[] = "EnaBot/1.1 (http://www.enaball.com/crawler.html)" +1198[] = "EnaBot" +1198[] = "EnaBot/1.1" +1198[] = "http://www.enaball.com/crawler.html" +1198[] = "Enaball Inc." +1198[] = "http://www.enaball.com/" +1198[] = "bot.png" +1198[] = "" +1198[] = "/list-of-ua/bot-detail?bot=EnaBot" +1205[] = "EnaBot/1.2 (http://www.enaball.com/crawler.html)" +1205[] = "EnaBot" +1205[] = "EnaBot/1.2" +1205[] = "http://www.enaball.com/crawler.html" +1205[] = "Enaball Inc." +1205[] = "http://www.enaball.com/" +1205[] = "bot.png" +1205[] = "" +1205[] = "/list-of-ua/bot-detail?bot=EnaBot" +1027[] = "Enterprise_Search/1.00.143;MSSQL (http://www.innerprise.net/es-spider.asp)" +1027[] = "Enterprise_Search" +1027[] = "Enterprise_Search/1.00.143" +1027[] = "http://www.innerprise.net/hosted-bi.asp" +1027[] = "Innerprise" +1027[] = "http://www.innerprise.net/" +1027[] = "bot.png" +1027[] = "" +1027[] = "/list-of-ua/bot-detail?bot=Enterprise_Search" +547[] = "envolk/1.7 (+http://www.envolk.com/envolkspiderinfo.html)" +547[] = "envolk" +547[] = "envolk/1.7" +547[] = "http://www.envolk.com/envolkspiderinfo.html" +547[] = "Envolk" +547[] = "http://www.envolk.com/" +547[] = "bot.png" +547[] = "" +547[] = "/list-of-ua/bot-detail?bot=envolk" +5806[] = "EuripBot/1.1 (+http://www.eurip.com) GetRobots" +5806[] = "EuripBot" +5806[] = "EuripBot/1.1" +5806[] = "http://www.eurip.com/service/webmaster/euripbot.html" +5806[] = "EURIP - European Internet Portal" +5806[] = "http://www.eurip.com/" +5806[] = "bot.png" +5806[] = "" +5806[] = "/list-of-ua/bot-detail?bot=EuripBot" +1500[] = "Eurobot/1.1 (http://eurobot.ayell.eu)" +1500[] = "Eurobot" +1500[] = "Eurobot/1.1" +1500[] = "http://eurobot.ayell.de/" +1500[] = "Ayell Euronet" +1500[] = "http://www.ayell.eu/" +1500[] = "bot_eurobot.png" +1500[] = "" +1500[] = "/list-of-ua/bot-detail?bot=Eurobot" +4730[] = "Eurobot/1.2 (http://eurobot.ayell.eu)" +4730[] = "Eurobot" +4730[] = "Eurobot/1.2" +4730[] = "http://eurobot.ayell.eu/" +4730[] = "Ayell Euronet" +4730[] = "http://www.ayell.eu/" +4730[] = "bot_eurobot.png" +4730[] = "" +4730[] = "/list-of-ua/bot-detail?bot=Eurobot" +6243[] = "Mozilla/5.0 (compatible; Evrinid Iudex 1.0.0; +http://www.evri.com/evrinid)" +6243[] = "EvriNid" +6243[] = "EvriNid/1.0.0" +6243[] = "http://corporate.evri.com/about-us/evrinid/" +6243[] = "Evri Inc." +6243[] = "http://corporate.evri.com/" +6243[] = "bot.png" +6243[] = "" +6243[] = "/list-of-ua/bot-detail?bot=EvriNid" +679[] = "Mozilla/5.0 (compatible; Exabot/3.0; +http://www.exabot.com/go/robot)" +679[] = "Exabot" +679[] = "Exabot/3.0" +679[] = "http://www.exabot.com/go/robot" +679[] = "Exalead S.A." +679[] = "http://www.exalead.com/" +679[] = "bot_Exabot.png" +679[] = "" +679[] = "/list-of-ua/bot-detail?bot=Exabot" +753[] = "Mozilla/5.0 (compatible; Exabot-Images/3.0; +http://www.exabot.com/go/robot)" +753[] = "Exabot" +753[] = "Exabot-Images/3.0" +753[] = "http://www.exabot.com/go/robot" +753[] = "Exalead S.A." +753[] = "http://www.exalead.com/" +753[] = "bot_Exabot.png" +753[] = "" +753[] = "/list-of-ua/bot-detail?bot=Exabot" +1994[] = "Mozilla/5.0 (compatible; Exabot/3.0 (BiggerBetter); +http://www.exabot.com/go/robot)" +1994[] = "Exabot" +1994[] = "Exabot/3.0/BiggerBetter" +1994[] = "http://www.exabot.com/go/robot" +1994[] = "Exalead S.A." +1994[] = "http://www.exalead.com/" +1994[] = "bot_Exabot.png" +1994[] = "" +1994[] = "/list-of-ua/bot-detail?bot=Exabot" +425[] = "exactseek.com" +425[] = "ExactSEEK" +425[] = "ExactSEEK" +425[] = "http://www.exactseek.com/" +425[] = "Jayde Online, Inc." +425[] = "http://www.jaydeonlineinc.com/" +425[] = "bot.png" +425[] = "" +425[] = "/list-of-ua/bot-detail?bot=ExactSEEK" +1523[] = "facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)" +1523[] = "FacebookExternalHit" +1523[] = "FacebookExternalHit/1.0" +1523[] = "http://www.facebook.com/externalhit_uatext.php" +1523[] = "Facebook" +1523[] = "http://www.facebook.com/" +1523[] = "bot_facebook.png" +1523[] = "" +1523[] = "/list-of-ua/bot-detail?bot=FacebookExternalHit" +5611[] = "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" +5611[] = "FacebookExternalHit" +5611[] = "FacebookExternalHit/1.1" +5611[] = "http://www.facebook.com/externalhit_uatext.php" +5611[] = "Facebook" +5611[] = "http://www.facebook.com/" +5611[] = "bot_facebook.png" +5611[] = "" +5611[] = "/list-of-ua/bot-detail?bot=FacebookExternalHit" +1061[] = "Factbot 1.09" +1061[] = "factbot" +1061[] = "Factbot 1.09" +1061[] = "http://www.factbites.com/webmasters.php" +1061[] = "Rapid Intelligence Pty Ltd" +1061[] = "http://www.rapint.com/" +1061[] = "bot.png" +1061[] = "" +1061[] = "/list-of-ua/bot-detail?bot=factbot" +4501[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1 + FairShare-http://fairshare.cc)" +4501[] = "FairShare" +4501[] = "FairShare" +4501[] = "http://support.attributor.com/kbfairshare/doku.php" +4501[] = "Attributor Corporation" +4501[] = "http://www.attributor.com/" +4501[] = "bot_FairShare.png" +4501[] = "" +4501[] = "/list-of-ua/bot-detail?bot=FairShare" +1717[] = "Mozilla/5.0 (compatible; Falconsbot; +http://iws.seu.edu.cn/services/falcons/contact_us.jsp)" +1717[] = "Falconsbot" +1717[] = "Falconsbot" +1717[] = "http://ws.nju.edu.cn/falcons/contact_us.jsp" +1717[] = "Institute of Web Science" +1717[] = "http://iws.seu.edu.cn/page/english/" +1717[] = "bot.png" +1717[] = "" +1717[] = "/list-of-ua/bot-detail?bot=Falconsbot" +3703[] = "Mozilla/5.0 (compatible; Falconsbot; +http://ws.nju.edu.cn/falcons/)" +3703[] = "Falconsbot" +3703[] = "Falconsbot" +3703[] = "http://ws.nju.edu.cn/falcons/contact_us.jsp" +3703[] = "Institute of Web Science" +3703[] = "http://iws.seu.edu.cn/page/english/" +3703[] = "bot.png" +3703[] = "" +3703[] = "/list-of-ua/bot-detail?bot=Falconsbot" +312[] = "FAST Enterprise Crawler/6.4 (crawler@fast.no)" +312[] = "FAST Enterprise Crawler" +312[] = "FAST Enterprise Crawler/6.4" +312[] = "http://www.fast.no/glossary.aspx?m=48&amid=415" +312[] = "Fast Search & Transfer" +312[] = "http://www.fastsearch.com/" +312[] = "bot.png" +312[] = "" +312[] = "/list-of-ua/bot-detail?bot=FAST Enterprise Crawler" +809[] = "FAST Enterprise Crawler 6 used by FAST (jim.mosher@fastsearch.com)" +809[] = "FAST Enterprise Crawler" +809[] = "FAST Enterprise Crawler/6" +809[] = "http://www.fast.no/glossary.aspx?m=48&amid=415" +809[] = "Fast Search & Transfer" +809[] = "http://www.fastsearch.com/" +809[] = "bot.png" +809[] = "" +809[] = "/list-of-ua/bot-detail?bot=FAST Enterprise Crawler" +1005[] = "FAST Enterprise Crawler 6 used by Virk.dk - udvikling (thomas.bentzen@capgemini.com)" +1005[] = "FAST Enterprise Crawler" +1005[] = "FAST Enterprise Crawler 6 at virk.dk" +1005[] = "http://www.fast.no/glossary.aspx?m=48&amid=415" +1005[] = "Fast Search & Transfer" +1005[] = "http://www.fastsearch.com/" +1005[] = "bot.png" +1005[] = "" +1005[] = "/list-of-ua/bot-detail?bot=FAST Enterprise Crawler" +47[] = "FAST MetaWeb Crawler (helpdesk at fastsearch dot com)" +47[] = "FAST MetaWeb Crawler" +47[] = "FAST MetaWeb Crawler" +47[] = "http://www.fast.no/glossary.aspx?m=48&amid=415" +47[] = "Fast Search & Transfer" +47[] = "http://www.fastsearch.com/" +47[] = "bot.png" +47[] = "" +47[] = "/list-of-ua/bot-detail?bot=FAST MetaWeb Crawler" +4722[] = "Mozilla/5.0 (FauBot/0.1; +http://buzzvolume.com/fau/)" +4722[] = "FauBot" +4722[] = "FauBot/0.1" +4722[] = "http://buzzvolume.com/fau" +4722[] = "BuzzVolume" +4722[] = "http://buzzvolume.com/" +4722[] = "bot.png" +4722[] = "" +4722[] = "/list-of-ua/bot-detail?bot=FauBot" +808[] = "favorstarbot/1.0 (+http://favorstar.com/bot.html)" +808[] = "favorstarbot" +808[] = "favorstarbot/1.0" +808[] = "http://favorstar.com/bot.html" +808[] = "favorstar.com" +808[] = "http://favorstar.com/" +808[] = "bot.png" +808[] = "" +808[] = "/list-of-ua/bot-detail?bot=favorstarbot" +1595[] = "FeedCatBot/3.0 (+http://www.feedcat.net/)" +1595[] = "FeedCatBot" +1595[] = "FeedCatBot/3.0" +1595[] = "http://www.feedcat.net/" +1595[] = "FEEDCAT.NET" +1595[] = "" +1595[] = "bot.png" +1595[] = "" +1595[] = "/list-of-ua/bot-detail?bot=FeedCatBot" +3002[] = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FeedFinder-2.0; http://bloggz.se/crawler)" +3002[] = "FeedFinder/bloggz.se" +3002[] = "FeedFinder-2.0" +3002[] = "http://bloggz.se/crawler/" +3002[] = "Triop AB" +3002[] = "http://triop.se/" +3002[] = "bot_FeedFinder_bloggz.png" +3002[] = "" +3002[] = "/list-of-ua/bot-detail?bot=FeedFinder/bloggz.se" +118[] = "Findexa Crawler (http://www.findexa.no/gulesider/article26548.ece)" +118[] = "Findexa Crawler" +118[] = "Findexa Crawler" +118[] = "http://www.findexa.no/gulesider/article26548.ece" +118[] = "Findexa AS" +118[] = "http://www.findexa.no/" +118[] = "bot.png" +118[] = "" +118[] = "/list-of-ua/bot-detail?bot=Findexa Crawler" +1856[] = "findlinks/1.1.5-beta7 (+http://wortschatz.uni-leipzig.de/findlinks/)" +1856[] = "findlinks" +1856[] = "findlinks/1.1.4-beta7" +1856[] = "http://wortschatz.uni-leipzig.de/findlinks/" +1856[] = "Universität Leipzig" +1856[] = "http://www.uni-leipzig.de/" +1856[] = "bot_findlinks.png" +1856[] = "" +1856[] = "/list-of-ua/bot-detail?bot=findlinks" +5292[] = "findlinks/1.1.6-beta4 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5292[] = "findlinks" +5292[] = "findlinks/1.1.6-beta4" +5292[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5292[] = "Universität Leipzig" +5292[] = "http://www.uni-leipzig.de/" +5292[] = "bot_findlinks.png" +5292[] = "" +5292[] = "/list-of-ua/bot-detail?bot=findlinks" +5352[] = "findlinks/1.1.6-beta5 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5352[] = "findlinks" +5352[] = "findlinks/1.1.6-beta5" +5352[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5352[] = "Universität Leipzig" +5352[] = "http://www.uni-leipzig.de/" +5352[] = "bot_findlinks.png" +5352[] = "" +5352[] = "/list-of-ua/bot-detail?bot=findlinks" +5646[] = "findlinks/2.0 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5646[] = "findlinks" +5646[] = "findlinks/2.0" +5646[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5646[] = "Universität Leipzig" +5646[] = "http://www.uni-leipzig.de/" +5646[] = "bot_findlinks.png" +5646[] = "" +5646[] = "/list-of-ua/bot-detail?bot=findlinks" +5685[] = "findlinks/1.1.6-beta6 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5685[] = "findlinks" +5685[] = "findlinks/1.1.6-beta6" +5685[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5685[] = "Universität Leipzig" +5685[] = "http://www.uni-leipzig.de/" +5685[] = "bot_findlinks.png" +5685[] = "" +5685[] = "/list-of-ua/bot-detail?bot=findlinks" +5715[] = "findlinks/2.0.1 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5715[] = "findlinks" +5715[] = "findlinks/2.0.1" +5715[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5715[] = "Universität Leipzig" +5715[] = "http://www.uni-leipzig.de/" +5715[] = "bot_findlinks.png" +5715[] = "" +5715[] = "/list-of-ua/bot-detail?bot=findlinks" +4853[] = "findlinks/1.1.6-beta1 (+http://wortschatz.uni-leipzig.de/findlinks/)" +4853[] = "findlinks" +4853[] = "findlinks/1.1.6-beta1" +4853[] = "http://wortschatz.uni-leipzig.de/findlinks/" +4853[] = "Universität Leipzig" +4853[] = "http://www.uni-leipzig.de/" +4853[] = "bot_findlinks.png" +4853[] = "" +4853[] = "/list-of-ua/bot-detail?bot=findlinks" +5052[] = "findlinks/1.1.6-beta2 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5052[] = "findlinks" +5052[] = "findlinks/1.1.6-beta2" +5052[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5052[] = "Universität Leipzig" +5052[] = "http://www.uni-leipzig.de/" +5052[] = "bot_findlinks.png" +5052[] = "" +5052[] = "/list-of-ua/bot-detail?bot=findlinks" +5243[] = "findlinks/1.1.6-beta1 (+http://wortschatz.uni-leipzig.de/findlinks/; YaCy 0.1; yacy.net)" +5243[] = "findlinks" +5243[] = "findlinks/1.1.6-beta1 Yacy" +5243[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5243[] = "Universität Leipzig" +5243[] = "http://www.uni-leipzig.de/" +5243[] = "bot_findlinks.png" +5243[] = "" +5243[] = "/list-of-ua/bot-detail?bot=findlinks" +5277[] = "findlinks/1.1.6-beta3 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5277[] = "findlinks" +5277[] = "findlinks/1.1.6-beta3" +5277[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5277[] = "Universität Leipzig" +5277[] = "http://www.uni-leipzig.de/" +5277[] = "bot_findlinks.png" +5277[] = "" +5277[] = "/list-of-ua/bot-detail?bot=findlinks" +5843[] = "findlinks/2.0.2 (+http://wortschatz.uni-leipzig.de/findlinks/)" +5843[] = "findlinks" +5843[] = "findlinks/2.0.2" +5843[] = "http://wortschatz.uni-leipzig.de/findlinks/" +5843[] = "Universität Leipzig" +5843[] = "http://www.uni-leipzig.de/" +5843[] = "bot_findlinks.png" +5843[] = "" +5843[] = "/list-of-ua/bot-detail?bot=findlinks" +6011[] = "findlinks/2.0.4 (+http://wortschatz.uni-leipzig.de/findlinks/)" +6011[] = "findlinks" +6011[] = "findlinks/2.0.4" +6011[] = "http://wortschatz.uni-leipzig.de/findlinks/" +6011[] = "Universität Leipzig" +6011[] = "http://www.uni-leipzig.de/" +6011[] = "bot_findlinks.png" +6011[] = "" +6011[] = "/list-of-ua/bot-detail?bot=findlinks" +6177[] = "findlinks/1.1.3-beta9 (+http://wortschatz.uni-leipzig.de/findlinks/)" +6177[] = "findlinks" +6177[] = "findlinks/1.1.3-beta9" +6177[] = "http://wortschatz.uni-leipzig.de/findlinks/" +6177[] = "Universität Leipzig" +6177[] = "http://www.uni-leipzig.de/" +6177[] = "bot_findlinks.png" +6177[] = "" +6177[] = "/list-of-ua/bot-detail?bot=findlinks" +1582[] = "flatlandbot/baypup (Flatland Industries Web Spider; http://www.flatlandindustries.com/flatlandbot; jason@flatlandindustries.com)" +1582[] = "Flatland Industries Web Spider" +1582[] = "flatlandbot/baypup" +1582[] = "http://www.flatlandindustries.com/flatlandbot" +1582[] = "Flatland Industries, Inc." +1582[] = "http://www.flatlandindustries.com/" +1582[] = "bot.png" +1582[] = "" +1582[] = "/list-of-ua/bot-detail?bot=Flatland Industries Web Spider" +844[] = "great-plains-web-spider/gpws (Flatland Industries Web Spider; http://www.flatlandindustries.com/flatlandbot.php; jason@flatlandindustries.com)" +844[] = "flatlandbot" +844[] = "flatlandbot c" +844[] = "http://www.flatlandindustries.com/flatlandbot.php" +844[] = "Flatland Industries, Inc." +844[] = "http://www.flatlandindustries.com/" +844[] = "bot.png" +844[] = "" +844[] = "/list-of-ua/bot-detail?bot=flatlandbot" +876[] = "great-plains-web-spider/flatlandbot (Flatland Industries Web Robot; http://www.flatlandindustries.com/flatlandbot.php; jason@flatlandindustries.com)" +876[] = "flatlandbot" +876[] = "flatlandbot b" +876[] = "http://www.flatlandindustries.com/flatlandbot.php" +876[] = "Flatland Industries, Inc." +876[] = "http://www.flatlandindustries.com/" +876[] = "bot.png" +876[] = "" +876[] = "/list-of-ua/bot-detail?bot=flatlandbot" +877[] = "flatlandbot/flatlandbot (Flatland Industries Web Spider; http://www.flatlandindustries.com/flatlandbot.php; jason@flatlandindustries.com)" +877[] = "flatlandbot" +877[] = "flatlandbot" +877[] = "http://www.flatlandindustries.com/flatlandbot.php" +877[] = "Flatland Industries, Inc." +877[] = "http://www.flatlandindustries.com/" +877[] = "bot.png" +877[] = "" +877[] = "/list-of-ua/bot-detail?bot=flatlandbot" +925[] = "great-plains-web-spider/flatlandbot (Flatland Industries Web Spider; http://www.flatlandindustries.com/flatlandbot.php; jason@flatlandindustries.com)" +925[] = "flatlandbot" +925[] = "flatlandbot d" +925[] = "http://www.flatlandindustries.com/flatlandbot.php" +925[] = "Flatland Industries, Inc." +925[] = "http://www.flatlandindustries.com/" +925[] = "bot.png" +925[] = "" +925[] = "/list-of-ua/bot-detail?bot=flatlandbot" +6202[] = "FlightDeckReportsBot/2.0 (http://www.flightdeckreports.com/pages/bot)" +6202[] = "FlightDeckReportsBot" +6202[] = "FlightDeckReportsBot/2.0" +6202[] = "http://www.flightdeckreports.com/pages/bot" +6202[] = "Flight Deck Reports, LLC." +6202[] = "http://www.flightdeckreports.com/" +6202[] = "bot.png" +6202[] = "" +6202[] = "/list-of-ua/bot-detail?bot=FlightDeckReportsBot" +6068[] = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (FlipboardProxy/0.0.5; +http://flipboard.com/browserproxy)" +6068[] = "FlipboardProxy" +6068[] = "FlipboardProxy/0.0.5" +6068[] = "http://flipboard.com/browserproxy" +6068[] = "Flipboard, Inc." +6068[] = "http://flipboard.com/" +6068[] = "bot.png" +6068[] = "" +6068[] = "/list-of-ua/bot-detail?bot=FlipboardProxy" +1536[] = "http://www.uni-koblenz.de/~flocke/robot-info.txt" +1536[] = "Flocke bot" +1536[] = "Flocke bot" +1536[] = "http://www.uni-koblenz.de/~flocke/robot-info.txt" +1536[] = "" +1536[] = "" +1536[] = "bot.png" +1536[] = "" +1536[] = "/list-of-ua/bot-detail?bot=Flocke bot" +1870[] = "FollowSite Bot ( http://www.followsite.com/bot.html )" +1870[] = "FollowSite Bot" +1870[] = "FollowSite Bot" +1870[] = "http://www.followsite.com/bot.html" +1870[] = "ASX Networks ApS" +1870[] = "http://asxnetworks.com/" +1870[] = "bot.png" +1870[] = "" +1870[] = "/list-of-ua/bot-detail?bot=FollowSite Bot" +1663[] = "Mozilla/4.0 (compatible; Fooooo_Web_Video_Crawl http://fooooo.com/bot.html)" +1663[] = "Fooooo_Web_Video_Crawl" +1663[] = "Fooooo_Web_Video_Crawl" +1663[] = "http://fooooo.com/bot.html" +1663[] = "Bank of innvation Inc." +1663[] = "http://en.boi.jp/" +1663[] = "bot.png" +1663[] = "" +1663[] = "/list-of-ua/bot-detail?bot=Fooooo_Web_Video_Crawl" +306[] = "Forschungsportal/0.8-dev (Testinstallation; http://www.forschungsportal.net/; fpcrawler@rrzn.uni-hannover.de)" +306[] = "Forschungsportal" +306[] = "Forschungsportal/0.8-dev" +306[] = "http://www.forschungsportal.net/" +306[] = "Bundesministerium für Bildung und Forschung" +306[] = "http://www.bmbf.de/" +306[] = "bot.png" +306[] = "" +306[] = "/list-of-ua/bot-detail?bot=Forschungsportal" +804[] = "Francis/2.0 (francis@neomo.de http://www.neomo.de/pages/crawler.php)" +804[] = "Francis" +804[] = "Francis/2.0" +804[] = "http://www.neomo.de/pages/crawler.php" +804[] = "Neomo GmbH & Co. KG." +804[] = "http://www.neomo.de/" +804[] = "bot.png" +804[] = "" +804[] = "/list-of-ua/bot-detail?bot=Francis" +851[] = "Mozilla/5.0 (compatible; FunnelBack; http://cyan.funnelback.com/robot.html)" +851[] = "FunnelBack" +851[] = "FunnelBack" +851[] = "http://cyan.funnelback.com/robot.html" +851[] = "Funnelback Pty Ltd" +851[] = "http://www.funnelback.com/" +851[] = "bot.png" +851[] = "" +851[] = "/list-of-ua/bot-detail?bot=FunnelBack" +531[] = "Mozilla/4.0 compatible FurlBot/Furl Search 2.0 (FurlBot; http://www.furl.net; wn.furlbot@looksmart.net)" +531[] = "FurlBot" +531[] = "FurlBot/Furl Search 2.0" +531[] = "" +531[] = "LookSmart, Ltd." +531[] = "http://search.looksmart.com/" +531[] = "bot.png" +531[] = "" +531[] = "/list-of-ua/bot-detail?bot=FurlBot" +1035[] = "FyberSpider/1.2 (http://www.fybersearch.com/fyberspider.php)" +1035[] = "FyberSpider" +1035[] = "FyberSpider/1.2" +1035[] = "http://www.fybersearch.com/fyberspider.php" +1035[] = "FyberSearch" +1035[] = "http://www.fybersearch.com/" +1035[] = "bot.png" +1035[] = "" +1035[] = "/list-of-ua/bot-detail?bot=FyberSpider" +4946[] = "FyberSpider/1.3 (http://www.fybersearch.com/fyberspider.php)" +4946[] = "FyberSpider" +4946[] = "FyberSpider/1.3" +4946[] = "http://www.fybersearch.com/fyberspider.php" +4946[] = "FyberSearch" +4946[] = "http://www.fybersearch.com/" +4946[] = "bot_FyberSpider.png" +4946[] = "" +4946[] = "/list-of-ua/bot-detail?bot=FyberSpider" +217[] = "g2Crawler (nobody@airmail.net)" +217[] = "g2crawler" +217[] = "g2crawler" +217[] = "http://g2crawler.blogspot.com/" +217[] = "" +217[] = "" +217[] = "bot.png" +217[] = "" +217[] = "/list-of-ua/bot-detail?bot=g2crawler" +137[] = "Gaisbot/3.0+(robot@gais.cs.ccu.edu.tw;+http://gais.cs.ccu.edu.tw/robot.php)" +137[] = "Gaisbot" +137[] = "Gaisbot/3.0" +137[] = "http://gais.cs.ccu.edu.tw/robot.php" +137[] = "National Chung Cheng University" +137[] = "http://www.ccu.edu.tw/index_e.htm" +137[] = "bot_gaisbot.png" +137[] = "" +137[] = "/list-of-ua/bot-detail?bot=Gaisbot" +303[] = "Gaisbot/3.0+(robot06@gais.cs.ccu.edu.tw;+http://gais.cs.ccu.edu.tw/robot.php)" +303[] = "Gaisbot" +303[] = "Gaisbot/3.0 - 06" +303[] = "http://gais.cs.ccu.edu.tw/robot.php" +303[] = "National Chung Cheng University" +303[] = "http://www.ccu.edu.tw/index_e.htm" +303[] = "bot_gaisbot.png" +303[] = "" +303[] = "/list-of-ua/bot-detail?bot=Gaisbot" +741[] = "Gallent Search Spider v1.4 Robot 3 (http://www.GallentSearch.com/robot)" +741[] = "Gallent Search Spider" +741[] = "Gallent Search Spider v1.4 Robot 3" +741[] = "" +741[] = "Gallent Limited" +741[] = "http://www.gallentsearch.com/" +741[] = "bot.png" +741[] = "" +741[] = "/list-of-ua/bot-detail?bot=Gallent Search Spider" +6226[] = "GarlikCrawler/1.1 (http://garlik.com/, crawler@garik.com)" +6226[] = "GarlikCrawler" +6226[] = "GarlikCrawler/1.1" +6226[] = "" +6226[] = "Garlik" +6226[] = "http://garlik.com/" +6226[] = "bot.png" +6226[] = "" +6226[] = "/list-of-ua/bot-detail?bot=GarlikCrawler" +190[] = "genieBot (wgao@genieknows.com)" +190[] = "genieBot" +190[] = "genieBot a" +190[] = "http://64.5.245.11/faq/faq.html" +190[] = "IT Interactive Services Inc." +190[] = "http://www.genieknows.com/" +190[] = "bot.png" +190[] = "" +190[] = "/list-of-ua/bot-detail?bot=genieBot" +215[] = "genieBot ((http://64.5.245.11/faq/faq.html))" +215[] = "genieBot" +215[] = "genieBot b" +215[] = "http://64.5.245.11/faq/faq.html" +215[] = "IT Interactive Services Inc." +215[] = "http://www.genieknows.com/" +215[] = "bot.png" +215[] = "" +215[] = "/list-of-ua/bot-detail?bot=genieBot" +1133[] = "GeonaBot/1.2; http://www.geona.com/" +1133[] = "GeonaBot" +1133[] = "GeonaBot/1.2" +1133[] = "http://www.geona.net/about.htm" +1133[] = "Gold Vision Communications" +1133[] = "http://www.goldvision.com/" +1133[] = "bot.png" +1133[] = "" +1133[] = "/list-of-ua/bot-detail?bot=GeonaBot" +1052[] = "Giant/1.0 (Openmaru bot; robot@openmaru.com)" +1052[] = "Giant/1.0" +1052[] = "Giant/1.0" +1052[] = "" +1052[] = "openmaru studio" +1052[] = "http://www.openmaru.com/" +1052[] = "bot.png" +1052[] = "" +1052[] = "/list-of-ua/bot-detail?bot=Giant/1.0" +920[] = "Gigabot/3.0 (http://www.gigablast.com/spider.html)" +920[] = "Gigabot" +920[] = "Gigabot/3.0" +920[] = "http://www.gigablast.com/spider.html" +920[] = "Gigablast Inc" +920[] = "http://www.gigablast.com/" +920[] = "bot_gigabot.png" +920[] = "" +920[] = "/list-of-ua/bot-detail?bot=Gigabot" +1573[] = "GingerCrawler/1.0 (Language Assistant for Dyslexics; www.gingersoftware.com/crawler_agent.htm; support at ginger software dot com)" +1573[] = "GingerCrawler" +1573[] = "GingerCrawler/1.0" +1573[] = "http://www.gingersoftware.com/crawler_agent.htm" +1573[] = "Ginger Software" +1573[] = "http://www.gingersoftware.com/" +1573[] = "bot.png" +1573[] = "" +1573[] = "/list-of-ua/bot-detail?bot=GingerCrawler" +45[] = "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; Girafabot; girafabot at girafa dot com; http://www.girafa.com)" +45[] = "Girafabot" +45[] = "Girafabot" +45[] = "" +45[] = "Girafa Inc." +45[] = "http://www.girafa.com/" +45[] = "bot_girafabot.png" +45[] = "" +45[] = "/list-of-ua/bot-detail?bot=Girafabot" +656[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Girafabot; girafabot at girafa dot com; http://www.girafa.com)" +656[] = "Girafabot" +656[] = "Girafabot b" +656[] = "" +656[] = "Girafa Inc." +656[] = "http://www.girafa.com/" +656[] = "bot_girafabot.png" +656[] = "" +656[] = "/list-of-ua/bot-detail?bot=Girafabot" +657[] = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; Girafabot [girafa.com])" +657[] = "Girafabot" +657[] = "Girafabot c" +657[] = "" +657[] = "Girafa Inc." +657[] = "http://www.girafa.com/" +657[] = "bot_girafabot.png" +657[] = "" +657[] = "/list-of-ua/bot-detail?bot=Girafabot" +226[] = "GOFORITBOT ( http://www.goforit.com/about/ )" +226[] = "GOFORITBOT" +226[] = "GOFORITBOT" +226[] = "http://www.goforit.com/about/" +226[] = "GoForIt Entertainment LLC" +226[] = "http://www.goforit.com/" +226[] = "bot.png" +226[] = "" +226[] = "/list-of-ua/bot-detail?bot=GOFORITBOT" +2133[] = "gonzo2[P] +http://www.suchen.de/faq.html" +2133[] = "gonzo" +2133[] = "gonzo2" +2133[] = "http://www.suchen.de/faq.html" +2133[] = "SEARCHTEQ" +2133[] = "http://www.searchteq.de/" +2133[] = "bot_gonzo.png" +2133[] = "" +2133[] = "/list-of-ua/bot-detail?bot=gonzo" +2132[] = "gonzo1[P] +http://www.suchen.de/faq.html" +2132[] = "gonzo" +2132[] = "gonzo1" +2132[] = "http://www.suchen.de/faq.html" +2132[] = "SEARCHTEQ" +2132[] = "http://www.searchteq.de/" +2132[] = "bot_gonzo.png" +2132[] = "" +2132[] = "/list-of-ua/bot-detail?bot=gonzo" +5380[] = "gonzo/1[P] (+http://www.suchen.de/faq.html)" +5380[] = "gonzo" +5380[] = "gonzo/1" +5380[] = "http://www.suchen.de/faq.html" +5380[] = "SEARCHTEQ" +5380[] = "http://www.searchteq.de/" +5380[] = "bot_gonzo.png" +5380[] = "" +5380[] = "/list-of-ua/bot-detail?bot=gonzo" +25[] = "Googlebot-Image/1.0" +25[] = "Googlebot" +25[] = "Googlebot-Image/1.0" +25[] = "http://www.google.com/bot.html" +25[] = "Google Inc." +25[] = "http://www.google.com/" +25[] = "bot_googlebot.png" +25[] = "" +25[] = "/list-of-ua/bot-detail?bot=Googlebot" +31[] = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" +31[] = "Googlebot" +31[] = "Googlebot/2.1" +31[] = "http://www.google.com/bot.html" +31[] = "Google Inc." +31[] = "http://www.google.com/" +31[] = "bot_googlebot.png" +31[] = "" +31[] = "/list-of-ua/bot-detail?bot=Googlebot" +982[] = "Mediapartners-Google" +982[] = "Googlebot" +982[] = "Mediapartners-Google" +982[] = "http://www.google.com/bot.html" +982[] = "Google Inc." +982[] = "http://www.google.com/" +982[] = "bot_googlebot.png" +982[] = "" +982[] = "/list-of-ua/bot-detail?bot=Googlebot" +4726[] = "Googlebot-Video/1.0" +4726[] = "Googlebot" +4726[] = "Googlebot-Video/1.0" +4726[] = "http://www.google.com/bot.html" +4726[] = "Google Inc." +4726[] = "http://www.google.com/" +4726[] = "bot_googlebot.png" +4726[] = "" +4726[] = "/list-of-ua/bot-detail?bot=Googlebot" +1932[] = "Mozilla/5.0 (compatible; GurujiBot/1.0; +http://www.guruji.com/en/WebmasterFAQ.html)" +1932[] = "GurujiBot" +1932[] = "GurujiBot/1.0" +1932[] = "http://www.guruji.com/en/WebmasterFAQ.html" +1932[] = "Guruji.com Software Private Limited" +1932[] = "http://www.guruji.com/" +1932[] = "bot.png" +1932[] = "" +1932[] = "/list-of-ua/bot-detail?bot=GurujiBot" +5165[] = "Mozilla/5.0 (compatible; Hailoobot/1.2; +http://www.hailoo.com/spider.html)" +5165[] = "Hailoobot" +5165[] = "Hailoobot/1.2" +5165[] = "http://www.hailoo.com/spider.html" +5165[] = "Hailoo" +5165[] = "http://www.hailoo.com/" +5165[] = "bot.png" +5165[] = "" +5165[] = "/list-of-ua/bot-detail?bot=Hailoobot" +756[] = "HatenaScreenshot/1.0 (checker)" +756[] = "HatenaScreenshot" +756[] = "HatenaScreenshot/1.0 (checker)" +756[] = "http://screenshot.hatena.ne.jp/help" +756[] = "hatena" +756[] = "http://www.hatena.ne.jp/company/" +756[] = "bot.png" +756[] = "" +756[] = "/list-of-ua/bot-detail?bot=HatenaScreenshot" +1872[] = "Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.20) Gecko/20090429 HeartRails_Capture/0.6 (+http://capture.heartrails.com/) BonEcho/2.0.0.20" +1872[] = "HeartRails_Capture" +1872[] = "HeartRails_Capture/0.6" +1872[] = "http://capture.heartrails.com/help/question" +1872[] = "HeartRails Inc." +1872[] = "http://www.heartrails.com/" +1872[] = "bot.png" +1872[] = "" +1872[] = "/list-of-ua/bot-detail?bot=HeartRails_Capture" +1546[] = "Mozilla/5.0 (compatible; heritrix/1.12.1 +http://www.webarchiv.cz)" +1546[] = "heritrix" +1546[] = "heritrix/1.12.1" +1546[] = "http://crawler.archive.org/" +1546[] = "Internet Archive" +1546[] = "http://www.archive.org/" +1546[] = "bot_heritrix.png" +1546[] = "" +1546[] = "/list-of-ua/bot-detail?bot=heritrix" +859[] = "Mozilla/5.0 (compatible; heritrix/1.12.0 +http://www.accelobot.com)" +859[] = "heritrix" +859[] = "heritrix/1.12.0" +859[] = "http://crawler.archive.org/" +859[] = "Internet Archive" +859[] = "http://www.archive.org/" +859[] = "bot_heritrix.png" +859[] = "" +859[] = "/list-of-ua/bot-detail?bot=heritrix" +1658[] = "Mozilla/5.0 (compatible; heritrix/1.14.3 +http://archive.org)" +1658[] = "heritrix" +1658[] = "heritrix/1.14.3" +1658[] = "http://crawler.archive.org/" +1658[] = "Internet Archive" +1658[] = "http://www.archive.org/" +1658[] = "bot_heritrix.png" +1658[] = "" +1658[] = "/list-of-ua/bot-detail?bot=heritrix" +1704[] = "Mozilla/5.0 (compatible; heritrix/2.0.2 +http://seekda.com)" +1704[] = "heritrix" +1704[] = "heritrix/2.0.2" +1704[] = "http://crawler.archive.org/" +1704[] = "Internet Archive" +1704[] = "http://www.archive.org/" +1704[] = "bot_heritrix.png" +1704[] = "" +1704[] = "/list-of-ua/bot-detail?bot=heritrix" +1887[] = "Mozilla/5.0 (compatible; heritrix/1.14.2 +http://rjpower.org)" +1887[] = "heritrix" +1887[] = "heritrix/1.14.2" +1887[] = "http://crawler.archive.org/" +1887[] = "Internet Archive" +1887[] = "http://www.archive.org/" +1887[] = "bot_heritrix.png" +1887[] = "" +1887[] = "/list-of-ua/bot-detail?bot=heritrix" +2026[] = "Mozilla/5.0 (compatible; heritrix/2.0.2 +http://aihit.com)" +2026[] = "heritrix" +2026[] = "heritrix/2.0.2" +2026[] = "http://crawler.archive.org/" +2026[] = "Internet Archive" +2026[] = "http://www.archive.org/" +2026[] = "bot_heritrix.png" +2026[] = "" +2026[] = "/list-of-ua/bot-detail?bot=heritrix" +2016[] = "Mozilla/5.0 (compatible; heritrix/1.12.1b +http://netarkivet.dk/website/info.html)" +2016[] = "heritrix" +2016[] = "heritrix/1.12.1b" +2016[] = "http://crawler.archive.org/" +2016[] = "Internet Archive" +2016[] = "http://www.archive.org/" +2016[] = "bot_heritrix.png" +2016[] = "" +2016[] = "/list-of-ua/bot-detail?bot=heritrix" +2021[] = "Mozilla/5.0 (compatible; heritrix/1.14.3 +http://www.webarchiv.cz)" +2021[] = "heritrix" +2021[] = "heritrix/1.14.3" +2021[] = "http://crawler.archive.org/" +2021[] = "Internet Archive" +2021[] = "http://www.archive.org/" +2021[] = "bot_heritrix.png" +2021[] = "" +2021[] = "/list-of-ua/bot-detail?bot=heritrix" +2081[] = "Mozilla/5.0 (compatible; heritrix/1.14.3.r6601 +http://www.buddybuzz.net/yptrino)" +2081[] = "heritrix" +2081[] = "heritrix/1.14.3.r6601" +2081[] = "http://crawler.archive.org/" +2081[] = "Internet Archive" +2081[] = "http://www.archive.org/" +2081[] = "bot_heritrix.png" +2081[] = "" +2081[] = "/list-of-ua/bot-detail?bot=heritrix" +2079[] = "Mozilla/5.0 (compatible; heritrix/3.0.0-SNAPSHOT-20091120.021634 +http://crawler.archive.org)" +2079[] = "heritrix" +2079[] = "heritrix/3.0.0" +2079[] = "http://crawler.archive.org/" +2079[] = "Internet Archive" +2079[] = "http://www.archive.org/" +2079[] = "bot_heritrix.png" +2079[] = "" +2079[] = "/list-of-ua/bot-detail?bot=heritrix" +2947[] = "Mozilla/5.0 (compatible; heritrix/1.14.2 +http://www.webarchiv.cz)" +2947[] = "heritrix" +2947[] = "heritrix/1.14.2" +2947[] = "http://crawler.archive.org/" +2947[] = "Internet Archive" +2947[] = "http://www.archive.org/" +2947[] = "bot_heritrix.png" +2947[] = "" +2947[] = "/list-of-ua/bot-detail?bot=heritrix" +623[] = "HiddenMarket-1.0-beta (www.hiddenmarket.net/crawler.php)" +623[] = "HiddenMarket" +623[] = "HiddenMarket-1.0-beta" +623[] = "http://www.hiddenmarket.net/crawler.php" +623[] = "HiddenMarket Group, Inc." +623[] = "http://www.hiddenmarket.net/" +623[] = "bot.png" +623[] = "" +623[] = "/list-of-ua/bot-detail?bot=HiddenMarket" +1519[] = "holmes/3.12.4 (http://morfeo.centrum.cz/bot)" +1519[] = "Holmes" +1519[] = "holmes/3.12.4 - morfeo" +1519[] = "http://www.ucw.cz/holmes/" +1519[] = "Martin MareÅ¡ and Robert Å palek" +1519[] = "http://www.ucw.cz/holmes/" +1519[] = "bot.png" +1519[] = "" +1519[] = "/list-of-ua/bot-detail?bot=Holmes" +1583[] = "holmes/3.11 (http://morfeo.centrum.cz/bot)" +1583[] = "Holmes" +1583[] = "holmes/3.11" +1583[] = "http://www.ucw.cz/holmes/" +1583[] = "Martin MareÅ¡ and Robert Å palek" +1583[] = "http://www.ucw.cz/holmes/" +1583[] = "bot.png" +1583[] = "" +1583[] = "/list-of-ua/bot-detail?bot=Holmes" +517[] = "holmes/3.9 (onet.pl)" +517[] = "Holmes" +517[] = "holmes/3.9 - onet.pl" +517[] = "http://www.ucw.cz/holmes/" +517[] = "Martin MareÅ¡ and Robert Å palek" +517[] = "http://www.ucw.cz/holmes/" +517[] = "bot.png" +517[] = "" +517[] = "/list-of-ua/bot-detail?bot=Holmes" +554[] = "holmes/3.9 (OnetSzukaj/5.0; +http://szukaj.onet.pl)" +554[] = "Holmes" +554[] = "holmes/3.9 - onet.pl b" +554[] = "http://www.ucw.cz/holmes/" +554[] = "Martin MareÅ¡ and Robert Å palek" +554[] = "http://www.ucw.cz/holmes/" +554[] = "bot.png" +554[] = "" +554[] = "/list-of-ua/bot-detail?bot=Holmes" +669[] = "holmes/3.10.1 (OnetSzukaj/5.0; +http://szukaj.onet.pl)" +669[] = "Holmes" +669[] = "holmes/3.10.1 - onet.pl" +669[] = "http://www.ucw.cz/holmes/" +669[] = "Martin MareÅ¡ and Robert Å palek" +669[] = "http://www.ucw.cz/holmes/" +669[] = "bot.png" +669[] = "" +669[] = "/list-of-ua/bot-detail?bot=Holmes" +927[] = "holmes/3.11 (OnetSzukaj/5.0; +http://szukaj.onet.pl)" +927[] = "Holmes" +927[] = "holmes/3.11 - onet.pl" +927[] = "http://www.ucw.cz/holmes/" +927[] = "Martin MareÅ¡ and Robert Å palek" +927[] = "http://www.ucw.cz/holmes/" +927[] = "bot.png" +927[] = "" +927[] = "/list-of-ua/bot-detail?bot=Holmes" +3600[] = "HolmesBot (http://holmes.ge)" +3600[] = "HolmesBot" +3600[] = "HolmesBot" +3600[] = "" +3600[] = "Georgian Railway Telecom" +3600[] = "http://grt.ge/" +3600[] = "bot.png" +3600[] = "" +3600[] = "/list-of-ua/bot-detail?bot=HolmesBot" +281[] = "HooWWWer/2.1.3 (debugging run) (+http://cosco.hiit.fi/search/hoowwwer/ | mailto:crawler-infohiit.fi)" +281[] = "HooWWWer" +281[] = "HooWWWer/2.1.3" +281[] = "http://cosco.hiit.fi/search/hoowwwer/" +281[] = "CoSCo" +281[] = "http://cosco.hiit.fi/" +281[] = "bot.png" +281[] = "" +281[] = "/list-of-ua/bot-detail?bot=HooWWWer" +307[] = "HooWWWer/2.2.0 (debugging run) (+http://cosco.hiit.fi/search/hoowwwer/ | mailto:crawler-infohiit.fi)" +307[] = "HooWWWer" +307[] = "HooWWWer/2.2.0" +307[] = "http://cosco.hiit.fi/search/hoowwwer/" +307[] = "CoSCo" +307[] = "http://cosco.hiit.fi/" +307[] = "bot.png" +307[] = "" +307[] = "/list-of-ua/bot-detail?bot=HooWWWer" +3235[] = "Mozilla/4.0 (compatible; HostTracker.com/1.0;+http://host-tracker.com/)" +3235[] = "HostTracker.com" +3235[] = "HostTracker.com/1.0" +3235[] = "http://host-tracker.com/" +3235[] = "host-tracker.com " +3235[] = "" +3235[] = "bot_HostTracker.com.png" +3235[] = "" +3235[] = "/list-of-ua/bot-detail?bot=HostTracker.com" +805[] = "cinetic_htdig" +805[] = "ht://Dig" +805[] = "ht://Dig" +805[] = "" +805[] = "The ht://Dig Group" +805[] = "http://htdig.sourceforge.net/" +805[] = "bot.png" +805[] = "" +805[] = "/list-of-ua/bot-detail?bot=ht://Dig" +5302[] = "HuaweiSymantecSpider/1.0+DSE-support@huaweisymantec.com+(compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR ; http://www.huaweisymantec.com/en/IRL/spider)" +5302[] = "HuaweiSymantecSpider" +5302[] = "HuaweiSymantecSpider/1.0" +5302[] = "http://www.huaweisymantec.com/en/IRL/spider/" +5302[] = "Huawei Symantec Technologies Co.,Ltd." +5302[] = "http://www.huaweisymantec.com/" +5302[] = "bot.png" +5302[] = "" +5302[] = "/list-of-ua/bot-detail?bot=HuaweiSymantecSpider" +761[] = "iaskspider/2.0(+http://iask.com/help/help_index.html)" +761[] = "iaskspider" +761[] = "iaskspider/2.0" +761[] = "http://iask.com/help/help_index.html" +761[] = "SINA Corporation" +761[] = "http://corp.sina.com.cn/eng/" +761[] = "bot.png" +761[] = "" +761[] = "/list-of-ua/bot-detail?bot=iaskspider" +155[] = "ia_archiver-web.archive.org" +155[] = "ia_archiver" +155[] = "ia_archiver" +155[] = "http://www.alexa.com/site/help/webmasters" +155[] = "Alexa Internet, Inc." +155[] = "http://www.alexa.com/" +155[] = "bot_ia_archiver.png" +155[] = "" +155[] = "/list-of-ua/bot-detail?bot=ia_archiver" +1461[] = "ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)" +1461[] = "ia_archiver" +1461[] = "ia_archiver alexa" +1461[] = "http://www.alexa.com/site/help/webmasters" +1461[] = "Alexa Internet, Inc." +1461[] = "http://www.alexa.com/" +1461[] = "bot_ia_archiver.png" +1461[] = "" +1461[] = "/list-of-ua/bot-detail?bot=ia_archiver" +1738[] = "ICC-Crawler(Mozilla-compatible; ; http://kc.nict.go.jp/project1/crawl.html)" +1738[] = "ICC-Crawler" +1738[] = "ICC-Crawler" +1738[] = "http://kc.nict.go.jp/project1/crawl.html" +1738[] = "NICT" +1738[] = "http://nict.go.jp/" +1738[] = "bot.png" +1738[] = "" +1738[] = "/list-of-ua/bot-detail?bot=ICC-Crawler" +1765[] = "ICC-Crawler/2.0 (Mozilla-compatible; ; http://kc.nict.go.jp/project1/crawl.html)" +1765[] = "ICC-Crawler" +1765[] = "ICC-Crawler/2.0" +1765[] = "http://kc.nict.go.jp/project1/crawl.html" +1765[] = "NICT" +1765[] = "http://nict.go.jp/" +1765[] = "bot.png" +1765[] = "" +1765[] = "/list-of-ua/bot-detail?bot=ICC-Crawler" +1044[] = "ICF_Site_Crawler+(see+http://www.infocenter.fi/spiderinfo.html)" +1044[] = "ICF_Site_Crawler" +1044[] = "ICF_Site_Crawler" +1044[] = "http://www.infocenter.fi/spiderinfo.html" +1044[] = "Info Center Finland Ltd." +1044[] = "http://www.infocenter.fi/" +1044[] = "bot.png" +1044[] = "" +1044[] = "/list-of-ua/bot-detail?bot=ICF_Site_Crawler" +124[] = "ichiro/1.0 (ichiro@nttr.co.jp)" +124[] = "ichiro" +124[] = "ichiro/1.0" +124[] = "http://help.goo.ne.jp/door/crawler.html" +124[] = "NTT-Resonant Inc." +124[] = "http://www.nttr.co.jp/" +124[] = "bot_ichiro.png" +124[] = "" +124[] = "/list-of-ua/bot-detail?bot=ichiro" +144[] = "ichiro/2.0 (ichiro@nttr.co.jp)" +144[] = "ichiro" +144[] = "ichiro/2.0" +144[] = "http://help.goo.ne.jp/door/crawler.html" +144[] = "NTT-Resonant Inc." +144[] = "http://www.nttr.co.jp/" +144[] = "bot_ichiro.png" +144[] = "" +144[] = "/list-of-ua/bot-detail?bot=ichiro" +223[] = "ichiro/2.0 (http://help.goo.ne.jp/door/crawler.html)" +223[] = "ichiro" +223[] = "ichiro/2.0" +223[] = "http://help.goo.ne.jp/door/crawler.html" +223[] = "NTT-Resonant Inc." +223[] = "http://www.nttr.co.jp/" +223[] = "bot_ichiro.png" +223[] = "" +223[] = "/list-of-ua/bot-detail?bot=ichiro" +540[] = "ichiro/2.01 (http://help.goo.ne.jp/door/crawler.html)" +540[] = "ichiro" +540[] = "ichiro/2.01" +540[] = "http://help.goo.ne.jp/door/crawler.html" +540[] = "NTT-Resonant Inc." +540[] = "http://www.nttr.co.jp/" +540[] = "bot_ichiro.png" +540[] = "" +540[] = "/list-of-ua/bot-detail?bot=ichiro" +1197[] = "ichiro/3.0 (http://help.goo.ne.jp/door/crawler.html)" +1197[] = "ichiro" +1197[] = "ichiro/3.0" +1197[] = "http://help.goo.ne.jp/door/crawler.html" +1197[] = "NTT-Resonant Inc." +1197[] = "http://www.nttr.co.jp/" +1197[] = "bot_ichiro.png" +1197[] = "" +1197[] = "/list-of-ua/bot-detail?bot=ichiro" +3445[] = "ichiro/4.0 (http://help.goo.ne.jp/door/crawler.html)" +3445[] = "ichiro" +3445[] = "ichiro/4.0" +3445[] = "http://help.goo.ne.jp/door/crawler.html" +3445[] = "NTT-Resonant Inc." +3445[] = "http://www.nttr.co.jp/" +3445[] = "bot_ichiro.png" +3445[] = "" +3445[] = "/list-of-ua/bot-detail?bot=ichiro" +5902[] = "ichiro/5.0 (http://help.goo.ne.jp/door/crawler.html)" +5902[] = "ichiro" +5902[] = "ichiro/5.0" +5902[] = "http://help.goo.ne.jp/door/crawler.html" +5902[] = "NTT-Resonant Inc." +5902[] = "http://www.nttr.co.jp/" +5902[] = "bot_ichiro.png" +5902[] = "" +5902[] = "/list-of-ua/bot-detail?bot=ichiro" +5862[] = "Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.1; compatible; iCjobs Stellenangebote Jobs; http://www.icjobs.de) Gecko/20100401 iCjobs/3.2.3" +5862[] = "iCjobs" +5862[] = "iCjobs/3.2.3" +5862[] = "http://www.icjobs.de/bot.htm" +5862[] = "Intelligence Competence Center AG" +5862[] = "http://www.iccenter.net/" +5862[] = "bot.png" +5862[] = "" +5862[] = "/list-of-ua/bot-detail?bot=iCjobs" +764[] = "IlseBot/1.1" +764[] = "IlseBot" +764[] = "IlseBot/1.1" +764[] = "" +764[] = "ilse.nl" +764[] = "http://ilse.nl/" +764[] = "bot.png" +764[] = "" +764[] = "/list-of-ua/bot-detail?bot=IlseBot" +378[] = "IlTrovatore/1.2 (IlTrovatore; http://www.iltrovatore.it/bot.html; bot@iltrovatore.it)" +378[] = "IlTrovatore" +378[] = "IlTrovatore/1.2" +378[] = "http://www.iltrovatore.it/bot.html" +378[] = "Il Trovatore" +378[] = "http://www.iltrovatore.it/" +378[] = "bot.png" +378[] = "" +378[] = "/list-of-ua/bot-detail?bot=IlTrovatore" +81[] = "IlTrovatore-Setaccio/1.2 (It search engine; http://www.iltrovatore.it/bot.html; bot@iltrovatore.it)" +81[] = "IlTrovatore-Setaccio" +81[] = "IlTrovatore-Setaccio/1.2" +81[] = "http://www.iltrovatore.it/bot.html" +81[] = "Il Trovatore" +81[] = "http://www.iltrovatore.it/" +81[] = "bot.png" +81[] = "" +81[] = "/list-of-ua/bot-detail?bot=IlTrovatore-Setaccio" +168[] = "IlTrovatore-Setaccio/1.2 (Italy search engine; http://www.iltrovatore.it/bot.html; bot@iltrovatore.it)" +168[] = "IlTrovatore-Setaccio" +168[] = "IlTrovatore-Setaccio/1.2 b" +168[] = "http://www.iltrovatore.it/bot.html" +168[] = "Il Trovatore" +168[] = "http://www.iltrovatore.it/" +168[] = "bot.png" +168[] = "" +168[] = "/list-of-ua/bot-detail?bot=IlTrovatore-Setaccio" +85[] = "InfociousBot (+http://corp.infocious.com/tech_crawler.php)" +85[] = "InfociousBot" +85[] = "InfociousBot b" +85[] = "http://corp.infocious.com/tech_craw.php" +85[] = "Infocious Inc." +85[] = "http://corp.infocious.com/" +85[] = "bot.png" +85[] = "" +85[] = "/list-of-ua/bot-detail?bot=InfociousBot" +882[] = "InternetSeer.com" +882[] = "InternetSeer" +882[] = "InternetSeer (Web Monitor)" +882[] = "" +882[] = "InternetSeer" +882[] = "http://internetseer.com/" +882[] = "bot.png" +882[] = "" +882[] = "/list-of-ua/bot-detail?bot=InternetSeer" +167[] = "Ipselonbot/0.47-beta (Ipselon; http://www.ipselon.com/intl/en/ipselonbot.html; ipselonbot@ipselon.com)" +167[] = "Ipselonbot" +167[] = "Ipselonbot/0.47-beta" +167[] = "http://www.ipselon.com/intl/en/ipselonbot.html" +167[] = "Ipselon Networks s.l." +167[] = "http://www.ipselon.com/" +167[] = "bot.png" +167[] = "" +167[] = "/list-of-ua/bot-detail?bot=Ipselonbot" +197[] = "Ipselonbot/1.0-beta (+; http://www.ipselon.com/intl/en/ipselonbot.html)" +197[] = "Ipselonbot" +197[] = "Ipselonbot/1.0-beta" +197[] = "http://www.ipselon.com/intl/en/ipselonbot.html" +197[] = "Ipselon Networks s.l." +197[] = "http://www.ipselon.com/" +197[] = "bot.png" +197[] = "" +197[] = "/list-of-ua/bot-detail?bot=Ipselonbot" +242[] = "IRLbot/2.0 (+http://irl.cs.tamu.edu/crawler)" +242[] = "IRLbot" +242[] = "IRLbot/2.0" +242[] = "http://irl.cs.tamu.edu/crawler/" +242[] = "Texas A&M University" +242[] = "http://www.tamu.edu/" +242[] = "bot.png" +242[] = "" +242[] = "/list-of-ua/bot-detail?bot=IRLbot" +267[] = "IRLbot/2.0 (compatible; MSIE 6.0; http://irl.cs.tamu.edu/crawler)" +267[] = "IRLbot" +267[] = "IRLbot/2.0 b" +267[] = "http://irl.cs.tamu.edu/crawler/" +267[] = "Texas A&M University" +267[] = "http://www.tamu.edu/" +267[] = "bot.png" +267[] = "" +267[] = "/list-of-ua/bot-detail?bot=IRLbot" +729[] = "IRLbot/3.0 (compatible; MSIE 6.0; http://irl.cs.tamu.edu/crawler)" +729[] = "IRLbot" +729[] = "IRLbot/3.0" +729[] = "http://irl.cs.tamu.edu/crawler/" +729[] = "Texas A&M University" +729[] = "http://www.tamu.edu/" +729[] = "bot.png" +729[] = "" +729[] = "/list-of-ua/bot-detail?bot=IRLbot" +1220[] = "IRLbot/3.0 (compatible; MSIE 6.0; http://irl.cs.tamu.edu/crawler/)" +1220[] = "IRLbot" +1220[] = "IRLbot/3.0 b" +1220[] = "http://irl.cs.tamu.edu/crawler/" +1220[] = "Texas A&M University" +1220[] = "http://www.tamu.edu/" +1220[] = "bot.png" +1220[] = "" +1220[] = "/list-of-ua/bot-detail?bot=IRLbot" +1540[] = "JadynAve - http://www.jadynave.com/robot" +1540[] = "JadynAve" +1540[] = "JadynAve" +1540[] = "" +1540[] = "Yesup Ecommerce Solutions Inc" +1540[] = "http://www.yesup.net/" +1540[] = "bot.png" +1540[] = "" +1540[] = "/list-of-ua/bot-detail?bot=JadynAve" +1859[] = "Mozilla/5.0 (compatible; JadynAveBot; +http://www.jadynave.com/robot)" +1859[] = "JadynAveBot" +1859[] = "JadynAveBot" +1859[] = "http://www.jadynave.com/robot" +1859[] = "Yesup Ecommerce Solutions Inc." +1859[] = "http://www.yesup.net/" +1859[] = "bot.png" +1859[] = "" +1859[] = "/list-of-ua/bot-detail?bot=JadynAveBot" +797[] = "Jambot/0.1.1 (Jambot; http://www.jambot.com/blog; crawler@jambot.com)" +797[] = "Jambot" +797[] = "Jambot/0.1.1" +797[] = "http://www.jambot.com/blog/static.php?page=webmaster-robot" +797[] = "" +797[] = "" +797[] = "bot.png" +797[] = "" +797[] = "/list-of-ua/bot-detail?bot=Jambot" +5202[] = "JUST-CRAWLER(+http://www.justsystems.com/jp/tech/crawler/)" +5202[] = "JUST-CRAWLER" +5202[] = "JUST-CRAWLER" +5202[] = "http://www.justsystems.com/jp/tech/crawler/" +5202[] = "JustSystems Corporation" +5202[] = "http://www.justsystems.com/" +5202[] = "bot.png" +5202[] = "" +5202[] = "/list-of-ua/bot-detail?bot=JUST-CRAWLER" +5[] = "Jyxobot/1" +5[] = "Jyxobot" +5[] = "Jyxobot" +5[] = "" +5[] = "Jyxo s.r.o." +5[] = "http://jyxo.cz/" +5[] = "bot_Jyxobot.png" +5[] = "" +5[] = "/list-of-ua/bot-detail?bot=Jyxobot" +1599[] = "JyxobotRSS/0.06" +1599[] = "Jyxobot" +1599[] = "JyxobotRSS/0.06" +1599[] = "" +1599[] = "Jyxo s.r.o." +1599[] = "http://jyxo.cz/" +1599[] = "bot_Jyxobot.png" +1599[] = "" +1599[] = "/list-of-ua/bot-detail?bot=Jyxobot" +391[] = "kakle-spider/0.1 (kakle-spider; http://www.kakle.com/bot.html; support@kakle.com)" +391[] = "Kakle Bot" +391[] = "kakle-spider/0.1" +391[] = "http://www.kakle.com/bot.html" +391[] = "Kakle Inc." +391[] = "http://www.kakle.com" +391[] = "bot.png" +391[] = "" +391[] = "/list-of-ua/bot-detail?bot=Kakle Bot" +1524[] = "kalooga/KaloogaBot (Kalooga; http://www.kalooga.com/info.html?page=crawler)" +1524[] = "Kalooga" +1524[] = "Kalooga" +1524[] = "http://www.kalooga.com/info.html?page=crawler" +1524[] = "Kalooga" +1524[] = "http://www.kalooga.com/" +1524[] = "bot.png" +1524[] = "" +1524[] = "/list-of-ua/bot-detail?bot=Kalooga" +1484[] = "kalooga/KaloogaBot (Kalooga; http://www.kalooga.com/info.html?page=crawler; crawler@kalooga.com)" +1484[] = "Kalooga" +1484[] = "Kalooga" +1484[] = "http://www.kalooga.com/info.html?page=crawler" +1484[] = "Kalooga" +1484[] = "http://www.kalooga.com/" +1484[] = "bot.png" +1484[] = "" +1484[] = "/list-of-ua/bot-detail?bot=Kalooga" +3292[] = "Karneval-Bot (Version: 1.06, powered by www.karnevalsuchmaschine.de +http://www.karnevalsuchmaschine.de/bot.html)" +3292[] = "Karneval-Bot" +3292[] = "Karneval-Bot/1.06" +3292[] = "http://www.karnevalsuchmaschine.de/zeige/bot.html" +3292[] = "Föderation Europäischer Narren" +3292[] = "http://www.fen-sued.de/" +3292[] = "bot.png" +3292[] = "" +3292[] = "/list-of-ua/bot-detail?bot=Karneval-Bot" +1542[] = "KeywenBot/4.1 http://www.keywen.com/Encyclopedia/Links" +1542[] = "KeywenBot" +1542[] = "KeywenBot/4.1" +1542[] = "http://www.keywen.com/Encyclopedia/Links/" +1542[] = "Michael Charnine" +1542[] = "" +1542[] = "bot.png" +1542[] = "" +1542[] = "/list-of-ua/bot-detail?bot=KeywenBot" +539[] = "Kongulo v0.1 personal web crawler" +539[] = "Kongulo" +539[] = "Kongulo v0.1" +539[] = "http://goog-kongulo.sourceforge.net/" +539[] = "Google Inc." +539[] = "http://www.google.com/" +539[] = "bot.png" +539[] = "" +539[] = "/list-of-ua/bot-detail?bot=Kongulo" +479[] = "KRetrieve/1.1/dbsearchexpert.com" +479[] = "KRetrieve" +479[] = "KRetrieve/1.1" +479[] = "http://www.dbsearchexpert.com/" +479[] = "" +479[] = "" +479[] = "bot.png" +479[] = "" +479[] = "/list-of-ua/bot-detail?bot=KRetrieve" +396[] = "Krugle/Krugle,Nutch/0.8+ (Krugle web crawler; http://www.krugle.com/crawler/info.html; webcrawler@krugle.com)" +396[] = "Krugle" +396[] = "Krugle (Nutch/0.8+)" +396[] = "http://corp.krugle.com/crawler/info.html" +396[] = "Steve Larsen" +396[] = "http://blog.krugle.com/?page_id=5" +396[] = "bot.png" +396[] = "" +396[] = "/list-of-ua/bot-detail?bot=Krugle" +633[] = "Krugle/Krugle,Nutch/0.8+ (Krugle web crawler; http://corp.krugle.com/crawler/info.html; webcrawler@krugle.com)" +633[] = "Krugle" +633[] = "Krugle (Nutch/0.8+) b" +633[] = "http://corp.krugle.com/crawler/info.html" +633[] = "Steve Larsen" +633[] = "http://blog.krugle.com/?page_id=5" +633[] = "bot.png" +633[] = "" +633[] = "/list-of-ua/bot-detail?bot=Krugle" +83[] = "ksibot/5.2m (+http://ego.ms.mff.cuni.cz/)" +83[] = "ksibot" +83[] = "ksibot/5.2m" +83[] = "http://ego.ms.mff.cuni.cz/" +83[] = "Katedra softwarového inženýrství" +83[] = "http://kocour.ms.mff.cuni.cz/" +83[] = "bot.png" +83[] = "" +83[] = "/list-of-ua/bot-detail?bot=ksibot" +266[] = "ksibot/7.0d (+http://ego.ms.mff.cuni.cz/)" +266[] = "ksibot" +266[] = "ksibot/7.0d" +266[] = "http://ego.ms.mff.cuni.cz/" +266[] = "Katedra softwarového inženýrství" +266[] = "http://kocour.ms.mff.cuni.cz/" +266[] = "bot.png" +266[] = "" +266[] = "/list-of-ua/bot-detail?bot=ksibot" +405[] = "ksibot/8.0a (+http://ego.ms.mff.cuni.cz/)" +405[] = "ksibot" +405[] = "ksibot/8.0a" +405[] = "http://ego.ms.mff.cuni.cz/" +405[] = "Katedra softwarového inženýrství" +405[] = "http://kocour.ms.mff.cuni.cz/" +405[] = "bot.png" +405[] = "" +405[] = "/list-of-ua/bot-detail?bot=ksibot" +4264[] = "L.webis/0.50 (http://webalgo.iit.cnr.it/index.php?pg=lwebis)" +4264[] = "L.webis" +4264[] = "L.webis/0.50" +4264[] = "http://webalgo.iit.cnr.it/index.php?pg=lwebis" +4264[] = "Institute of Informatics and Telematics (IIT)" +4264[] = "http://www.iit.cnr.it/" +4264[] = "bot_L.webis.png" +4264[] = "" +4264[] = "/list-of-ua/bot-detail?bot=L.webis" +4590[] = "L.webis/0.51 (http://webalgo.iit.cnr.it/index.php?pg=lwebis)" +4590[] = "L.webis" +4590[] = "L.webis/0.51" +4590[] = "http://webalgo.iit.cnr.it/index.php?pg=lwebis" +4590[] = "Institute of Informatics and Telematics (IIT)" +4590[] = "http://www.iit.cnr.it/" +4590[] = "bot_L.webis.png" +4590[] = "" +4590[] = "/list-of-ua/bot-detail?bot=L.webis" +4591[] = "L.webis/0.53 (http://webalgo.iit.cnr.it/index.php?pg=lwebis)" +4591[] = "L.webis" +4591[] = "L.webis/0.53" +4591[] = "http://webalgo.iit.cnr.it/index.php?pg=lwebis" +4591[] = "Institute of Informatics and Telematics (IIT)" +4591[] = "http://www.iit.cnr.it/" +4591[] = "bot_L.webis.png" +4591[] = "" +4591[] = "/list-of-ua/bot-detail?bot=L.webis" +3398[] = "L.webis/0.44 (http://webalgo.iit.cnr.it/index.php?pg=lwebis)" +3398[] = "L.webis" +3398[] = "L.webis/0.44" +3398[] = "http://webalgo.iit.cnr.it/index.php?pg=lwebis" +3398[] = "Institute of Informatics and Telematics (IIT)" +3398[] = "http://www.iit.cnr.it/" +3398[] = "bot_L.webis.png" +3398[] = "" +3398[] = "/list-of-ua/bot-detail?bot=L.webis" +631[] = "LapozzBot/1.4 (+http://robot.lapozz.hu)" +631[] = "LapozzBot" +631[] = "LapozzBot/1.4 hu" +631[] = "http://robot.lapozz.hu/" +631[] = "lapozz.hu" +631[] = "http://www.lapozz.hu/" +631[] = "bot.png" +631[] = "" +631[] = "/list-of-ua/bot-detail?bot=LapozzBot" +632[] = "LapozzBot/1.4 (+http://robot.lapozz.com)" +632[] = "LapozzBot" +632[] = "LapozzBot/1.4 com" +632[] = "http://robot.lapozz.com/" +632[] = "lapozz.hu" +632[] = "http://www.lapozz.hu/" +632[] = "bot_lapozzbot.png" +632[] = "" +632[] = "/list-of-ua/bot-detail?bot=LapozzBot" +881[] = "Larbin (larbin2.6.3@unspecified.mail)" +881[] = "Larbin" +881[] = "Larbin/2.6.3" +881[] = "" +881[] = "Sebastien Ailleret" +881[] = "http://larbin.sourceforge.net/" +881[] = "bot.png" +881[] = "" +881[] = "/list-of-ua/bot-detail?bot=Larbin" +778[] = "LarbinWebCrawler (spider@download11.com)" +778[] = "LarbinWebCrawler" +778[] = "LarbinWebCrawler" +778[] = "" +778[] = "Download11.com" +778[] = "http://download11.com/" +778[] = "bot.png" +778[] = "" +778[] = "/list-of-ua/bot-detail?bot=LarbinWebCrawler" +1780[] = "LexxeBot/1.0 (lexxebot@lexxe.com)" +1780[] = "LexxeBot" +1780[] = "LexxeBot/1.0" +1780[] = "http://lexxe.com/about/webmasters.cfm" +1780[] = "Lexxe Pty Ltd" +1780[] = "http://lexxe.com/" +1780[] = "bot.png" +1780[] = "" +1780[] = "/list-of-ua/bot-detail?bot=LexxeBot" +5180[] = "Lijit Crawler (+http://www.lijit.com/robot/crawler)" +5180[] = "Lijit" +5180[] = "Lijit" +5180[] = "http://www.lijit.com/robot/crawler" +5180[] = "Lijit Networks Inc." +5180[] = "http://www.lijit.com/" +5180[] = "bot.png" +5180[] = "" +5180[] = "/list-of-ua/bot-detail?bot=Lijit" +1504[] = "LinguaBot/v0.001-dev (MultiLinual Sarch Engine v0.001; LinguaSeek; admin at linguaseek dot com)" +1504[] = "LinguaBot" +1504[] = "LinguaBot/v0.001-dev" +1504[] = "" +1504[] = "linguaseek.com " +1504[] = "http://linguaseek.com/" +1504[] = "bot.png" +1504[] = "" +1504[] = "/list-of-ua/bot-detail?bot=LinguaBot" +2155[] = "Linguee Bot (http://www.linguee.com/bot)" +2155[] = "Linguee Bot" +2155[] = "Linguee Bot" +2155[] = "http://www.linguee.com/bot" +2155[] = "Linguee GmbH" +2155[] = "http://www.linguee.com/" +2155[] = "bot_Linguee.png" +2155[] = "" +2155[] = "/list-of-ua/bot-detail?bot=Linguee Bot" +481[] = "Link Valet Online 1.1" +481[] = "Link Valet Online" +481[] = "Link Valet Online 1.1" +481[] = "http://valet.htmlhelp.com/" +481[] = "Web Design Group" +481[] = "http://www.htmlhelp.com/" +481[] = "bot.png" +481[] = "" +481[] = "/list-of-ua/bot-detail?bot=Link Valet Online" +483[] = "Link Valet Online 1.2" +483[] = "Link Valet Online" +483[] = "Link Valet Online 1.2" +483[] = "http://valet.htmlhelp.com/" +483[] = "Web Design Group" +483[] = "http://www.htmlhelp.com/" +483[] = "bot.png" +483[] = "" +483[] = "/list-of-ua/bot-detail?bot=Link Valet Online" +1798[] = "LinkAider (http://linkaider.com/crawler/)" +1798[] = "LinkAider" +1798[] = "LinkAider" +1798[] = "http://linkaider.com/crawler/" +1798[] = "Ivinco" +1798[] = "http://linkaider.com/" +1798[] = "bot.png" +1798[] = "" +1798[] = "/list-of-ua/bot-detail?bot=LinkAider" +6044[] = "linkdex.com/v2.0" +6044[] = "linkdex.com" +6044[] = "linkdex.com/v2.0" +6044[] = "" +6044[] = "Linkdex Limited" +6044[] = "http://www.linkdex.com/" +6044[] = "bot.png" +6044[] = "" +6044[] = "/list-of-ua/bot-detail?bot=linkdex.com" +774[] = "Mozilla/5.0 (compatible; LinksManager.com_bot +http://linksmanager.com/linkchecker.html)" +774[] = "linksmanager_bot" +774[] = "linksmanager_bot" +774[] = "http://linksmanager.com/linkchecker.html" +774[] = "CreativeNetVentures, Inc." +774[] = "http://cnvi.com/" +774[] = "bot.png" +774[] = "" +774[] = "/list-of-ua/bot-detail?bot=linksmanager_bot" +130[] = "LinkWalker" +130[] = "LinkWalker" +130[] = "LinkWalker" +130[] = "" +130[] = "SEVENtwentyfour Inc." +130[] = "http://www.seventwentyfour.com/" +130[] = "bot.png" +130[] = "" +130[] = "/list-of-ua/bot-detail?bot=LinkWalker" +678[] = "LinkWalker/2.0" +678[] = "LinkWalker" +678[] = "LinkWalker/2.0" +678[] = "" +678[] = "SEVENtwentyfour Inc." +678[] = "http://www.seventwentyfour.com/" +678[] = "bot.png" +678[] = "" +678[] = "/list-of-ua/bot-detail?bot=LinkWalker" +4844[] = "livedoor ScreenShot/0.10" +4844[] = "livedoor ScreenShot" +4844[] = "livedoor ScreenShot/0.10" +4844[] = "http://helpguide.livedoor.com/help/screenshot/qa/grp584?id=3042" +4844[] = "livedoor Co.,Ltd." +4844[] = "http://corp.livedoor.com/" +4844[] = "bot.png" +4844[] = "" +4844[] = "/list-of-ua/bot-detail?bot=livedoor ScreenShot" +20[] = "lmspider (lmspider@scansoft.com)" +20[] = "lmspider" +20[] = "lmspider" +20[] = "http://www.nuance.com/" +20[] = "Nuance Communications, Inc." +20[] = "http://www.nuance.com/" +20[] = "bot.png" +20[] = "" +20[] = "/list-of-ua/bot-detail?bot=lmspider" +820[] = "lmspider/Nutch-0.9-dev (For research purposes.; www.nuance.com)" +820[] = "lmspider" +820[] = "lmspider b" +820[] = "http://www.nuance.com/" +820[] = "Nuance Communications, Inc." +820[] = "http://www.nuance.com/" +820[] = "bot.png" +820[] = "" +820[] = "/list-of-ua/bot-detail?bot=lmspider" +4996[] = "magpie-crawler/1.1 (U; Linux amd64; en-GB; +http://www.brandwatch.net)" +4996[] = "magpie-crawler" +4996[] = "magpie-crawler/1.1" +4996[] = "http://www.brandwatch.com/how-it-works/gathering-data/" +4996[] = "Brandwatch" +4996[] = "http://www.brandwatch.com/" +4996[] = "bot.png" +4996[] = "" +4996[] = "/list-of-ua/bot-detail?bot=magpie-crawler" +1210[] = "Mahiti.Com/Mahiti Crawler-1.0 (Mahiti.Com; http://mahiti.com ; mahiti.com)" +1210[] = "Mahiti Crawler" +1210[] = "Mahiti Crawler-1.0" +1210[] = "" +1210[] = "Mahiti.Com" +1210[] = "http://mahiti.com/" +1210[] = "bot.png" +1210[] = "" +1210[] = "/list-of-ua/bot-detail?bot=Mahiti Crawler" +1502[] = "Mail.Ru/1.0" +1502[] = "Mail.Ru" +1502[] = "Mail.Ru/1.0" +1502[] = "" +1502[] = "Mail.Ru" +1502[] = "http://corp.mail.ru/" +1502[] = "bot.png" +1502[] = "" +1502[] = "/list-of-ua/bot-detail?bot=Mail.Ru" +6134[] = "Mail.RU/2.0" +6134[] = "Mail.Ru" +6134[] = "Mail.Ru/2.0" +6134[] = "" +6134[] = "Mail.Ru" +6134[] = "http://corp.mail.ru/" +6134[] = "bot.png" +6134[] = "" +6134[] = "/list-of-ua/bot-detail?bot=Mail.Ru" +525[] = "Megatext/Nutch-0.8.1 (Beta; http://www.megatext.cz/; microton@microton.cz)" +525[] = "Megatext" +525[] = "Megatext-0.8.1 beta" +525[] = "" +525[] = "Microton, s.r.o." +525[] = "http://www.microton.cz/" +525[] = "bot.png" +525[] = "" +525[] = "/list-of-ua/bot-detail?bot=Megatext" +609[] = "Megatext/Megatext-0.5 (beta; http://www.megatext.cz/; microton@microton.cz)" +609[] = "Megatext" +609[] = "Megatext-0.5 beta" +609[] = "" +609[] = "Microton, s.r.o." +609[] = "http://www.microton.cz/" +609[] = "bot.png" +609[] = "" +609[] = "/list-of-ua/bot-detail?bot=Megatext" +5960[] = "MetaGeneratorCrawler/1.1 (www.metagenerator.info)" +5960[] = "MetaGeneratorCrawler" +5960[] = "MetaGeneratorCrawler/1.1" +5960[] = "http://www.metagenerator.info/" +5960[] = "Jan Bogutzki" +5960[] = "http://jan.bogutzki.de/" +5960[] = "bot.png" +5960[] = "" +5960[] = "/list-of-ua/bot-detail?bot=MetaGeneratorCrawler" +5280[] = "Mozilla/5.0 (compatible; MetamojiCrawler/1.0; +http://www.metamoji.com/jp/crawler.html" +5280[] = "MetamojiCrawler" +5280[] = "MetamojiCrawler/1.0" +5280[] = "http://www.metamoji.com/jp/crawler.html" +5280[] = "MetaMoJi Corporation" +5280[] = "http://www.metamoji.com/" +5280[] = "bot.png" +5280[] = "" +5280[] = "/list-of-ua/bot-detail?bot=MetamojiCrawler" +114[] = "Metaspinner/0.01 (Metaspinner; http://www.meta-spinner.de/; support@meta-spinner.de/)" +114[] = "Metaspinner/0.01" +114[] = "Metaspinner/0.01" +114[] = "http://www.meta-spinner.de/" +114[] = "metaspinnner media GmbH" +114[] = "http://www.metaspinner-media.de/" +114[] = "bot.png" +114[] = "" +114[] = "/list-of-ua/bot-detail?bot=Metaspinner/0.01" +295[] = "MetaTagRobot/1.6 (http://www.widexl.com/remote/search-engines/metatag-analyzer.html)" +295[] = "MetaTagRobot" +295[] = "MetaTagRobot/1.6" +295[] = "http://www.widexl.com/remote/search-engines/metatag-analyzer.html" +295[] = "widexl.com" +295[] = "http://www.widexl.com/" +295[] = "bot.png" +295[] = "" +295[] = "/list-of-ua/bot-detail?bot=MetaTagRobot" +496[] = "MetaTagRobot/2.1 (http://www.widexl.com/remote/search-engines/metatag-analyzer.html)" +496[] = "MetaTagRobot" +496[] = "MetaTagRobot/2.1" +496[] = "http://www.widexl.com/remote/search-engines/metatag-analyzer.html" +496[] = "" +496[] = "http://www.widexl.com/" +496[] = "bot.png" +496[] = "" +496[] = "/list-of-ua/bot-detail?bot=MetaTagRobot" +4589[] = "MetaURI API +metauri.com" +4589[] = "MetaURI" +4589[] = "MetaURI" +4589[] = "http://metauri.com/static/about" +4589[] = "Stateless Systems" +4589[] = "http://statelesssystems.com/" +4589[] = "bot_MetaURI.png" +4589[] = "" +4589[] = "/list-of-ua/bot-detail?bot=MetaURI" +125[] = "miniRank/1.2 (miniRank; http://minirank.com/; MiniRank)" +125[] = "miniRank" +125[] = "miniRank/1.2" +125[] = "http://www.minirank.com/" +125[] = "TitaniumLine.com" +125[] = "http://titaniumline.com/" +125[] = "bot.png" +125[] = "" +125[] = "/list-of-ua/bot-detail?bot=miniRank" +232[] = "miniRank/1.5 (miniRank; www.minirank.com; robot)" +232[] = "miniRank" +232[] = "miniRank/1.5" +232[] = "http://www.minirank.com/" +232[] = "TitaniumLine.com" +232[] = "http://titaniumline.com/" +232[] = "bot.png" +232[] = "" +232[] = "/list-of-ua/bot-detail?bot=miniRank" +326[] = "miniRank/1.6 (Website ranking; www.minirank.com; robot)" +326[] = "miniRank" +326[] = "miniRank/1.6" +326[] = "http://www.minirank.com/" +326[] = "TitaniumLine.com" +326[] = "http://titaniumline.com/" +326[] = "bot.png" +326[] = "" +326[] = "/list-of-ua/bot-detail?bot=miniRank" +520[] = "miniRank/2.0 (miniRank; http://minirank.com/; website ranking engine)" +520[] = "miniRank" +520[] = "miniRank/2.0" +520[] = "http://www.minirank.com/" +520[] = "TitaniumLine.com" +520[] = "http://titaniumline.com/" +520[] = "bot.png" +520[] = "" +520[] = "/list-of-ua/bot-detail?bot=miniRank" +689[] = "miniRank/3.1 (miniRank; www.minirank.com; website ranking engine)" +689[] = "miniRank" +689[] = "miniRank/3.1" +689[] = "http://www.minirank.com/" +689[] = "TitaniumLine.com" +689[] = "http://titaniumline.com/" +689[] = "bot.png" +689[] = "" +689[] = "/list-of-ua/bot-detail?bot=miniRank" +1676[] = "Mozilla/5.0 (compatible; MJ12bot/v1.2.5; http://www.majestic12.co.uk/bot.php?+)" +1676[] = "MJ12bot" +1676[] = "MJ12bot/v1.2.5" +1676[] = "http://majestic12.co.uk/bot.php" +1676[] = "Majestic-12" +1676[] = "http://www.majestic12.co.uk/" +1676[] = "bot_mj12bot.png" +1676[] = "" +1676[] = "/list-of-ua/bot-detail?bot=MJ12bot" +1517[] = "Mozilla/5.0 (compatible; MJ12bot/v1.2.4; http://www.majestic12.co.uk/bot.php?+)" +1517[] = "MJ12bot" +1517[] = "MJ12bot/v1.2.4" +1517[] = "http://majestic12.co.uk/bot.php" +1517[] = "Majestic-12" +1517[] = "http://www.majestic12.co.uk/" +1517[] = "bot_mj12bot.png" +1517[] = "" +1517[] = "/list-of-ua/bot-detail?bot=MJ12bot" +1602[] = "Mozilla/5.0 (compatible; MJ12bot/v1.2.1; http://www.majestic12.co.uk/bot.php?+)" +1602[] = "MJ12bot" +1602[] = "MJ12bot/v1.2.1" +1602[] = "http://majestic12.co.uk/bot.php" +1602[] = "Majestic-12" +1602[] = "http://www.majestic12.co.uk/" +1602[] = "bot_mj12bot.png" +1602[] = "" +1602[] = "/list-of-ua/bot-detail?bot=MJ12bot" +1908[] = "Mozilla/5.0 (compatible; MJ12bot/v1.2.3; http://www.majestic12.co.uk/bot.php?+)" +1908[] = "MJ12bot" +1908[] = "MJ12bot/v1.2.3" +1908[] = "http://majestic12.co.uk/bot.php" +1908[] = "Majestic-12" +1908[] = "http://www.majestic12.co.uk/" +1908[] = "bot_mj12bot.png" +1908[] = "" +1908[] = "/list-of-ua/bot-detail?bot=MJ12bot" +1909[] = "Mozilla/5.0 (compatible; MJ12bot/v1.3.0; http://www.majestic12.co.uk/bot.php?+)" +1909[] = "MJ12bot" +1909[] = "MJ12bot/v1.3.0" +1909[] = "http://majestic12.co.uk/bot.php" +1909[] = "Majestic-12" +1909[] = "http://www.majestic12.co.uk/" +1909[] = "bot_mj12bot.png" +1909[] = "" +1909[] = "/list-of-ua/bot-detail?bot=MJ12bot" +2024[] = "Mozilla/5.0 (compatible; MJ12bot/v1.3.1; http://www.majestic12.co.uk/bot.php?+)" +2024[] = "MJ12bot" +2024[] = "MJ12bot/v1.3.1" +2024[] = "http://majestic12.co.uk/bot.php" +2024[] = "Majestic-12" +2024[] = "http://www.majestic12.co.uk/" +2024[] = "bot_mj12bot.png" +2024[] = "" +2024[] = "/list-of-ua/bot-detail?bot=MJ12bot" +2185[] = "Mozilla/5.0 (compatible; MJ12bot/v1.3.2; http://www.majestic12.co.uk/bot.php?+)" +2185[] = "MJ12bot" +2185[] = "MJ12bot/v1.3.2" +2185[] = "http://majestic12.co.uk/bot.php" +2185[] = "Majestic-12" +2185[] = "http://www.majestic12.co.uk/" +2185[] = "bot_mj12bot.png" +2185[] = "" +2185[] = "/list-of-ua/bot-detail?bot=MJ12bot" +4846[] = "Mozilla/5.0 (compatible; MJ12bot/v1.3.3; http://www.majestic12.co.uk/bot.php?+)" +4846[] = "MJ12bot" +4846[] = "MJ12bot/v1.3.3" +4846[] = "http://majestic12.co.uk/bot.php" +4846[] = "Majestic-12" +4846[] = "http://www.majestic12.co.uk/" +4846[] = "bot_mj12bot.png" +4846[] = "" +4846[] = "/list-of-ua/bot-detail?bot=MJ12bot" +1213[] = "MLBot (www.metadatalabs.com)" +1213[] = "MLBot" +1213[] = "MLBot" +1213[] = "http://www.metadatalabs.com/mlbot/" +1213[] = "metadata labs" +1213[] = "http://www.metadatalabs.com/" +1213[] = "bot.png" +1213[] = "" +1213[] = "/list-of-ua/bot-detail?bot=MLBot" +1283[] = "MLBot (www.metadatalabs.com/mlbot)" +1283[] = "MLBot" +1283[] = "MLBot b" +1283[] = "http://www.metadatalabs.com/mlbot/" +1283[] = "metadata labs" +1283[] = "http://www.metadatalabs.com/" +1283[] = "bot.png" +1283[] = "" +1283[] = "/list-of-ua/bot-detail?bot=MLBot" +994[] = "MnoGoSearch/3.3.2" +994[] = "MnoGoSearch" +994[] = "MnoGoSearch/3.3.2" +994[] = "http://www.mnogosearch.org/products.html" +994[] = "Lavtech.Com" +994[] = "http://www.lavtech.com/" +994[] = "bot.png" +994[] = "" +994[] = "/list-of-ua/bot-detail?bot=MnoGoSearch" +1247[] = "MnoGoSearch/3.3.6" +1247[] = "MnoGoSearch" +1247[] = "MnoGoSearch/3.3.6" +1247[] = "http://www.mnogosearch.org/products.html" +1247[] = "Lavtech.Com" +1247[] = "http://www.lavtech.com/" +1247[] = "bot.png" +1247[] = "" +1247[] = "/list-of-ua/bot-detail?bot=MnoGoSearch" +1867[] = "MnoGoSearch/3.3.9" +1867[] = "MnoGoSearch" +1867[] = "MnoGoSearch/3.3.9" +1867[] = "http://www.mnogosearch.org/products.html" +1867[] = "Lavtech.Com" +1867[] = "http://www.lavtech.com/" +1867[] = "bot.png" +1867[] = "" +1867[] = "/list-of-ua/bot-detail?bot=MnoGoSearch" +2195[] = "MnoGoSearch/3.2.37" +2195[] = "MnoGoSearch" +2195[] = "MnoGoSearch/3.2.37" +2195[] = "http://www.mnogosearch.org/products.html" +2195[] = "Lavtech.Com" +2195[] = "http://www.lavtech.com/" +2195[] = "bot.png" +2195[] = "" +2195[] = "/list-of-ua/bot-detail?bot=MnoGoSearch" +1563[] = "DoCoMo/2.0 N902iS(c100;TB;W24H12)(compatible; moba-crawler; http://crawler.dena.jp/)" +1563[] = "moba-crawler" +1563[] = "moba-crawler" +1563[] = "http://crawler.dena.jp/" +1563[] = "DeNA Co.,Ltd." +1563[] = "http://dena.jp/" +1563[] = "bot.png" +1563[] = "" +1563[] = "/list-of-ua/bot-detail?bot=moba-crawler" +2196[] = "MojeekBot/0.2 (archi; http://www.mojeek.com/bot.html)" +2196[] = "MojeekBot" +2196[] = "MojeekBot/0.2" +2196[] = "http://www.mojeek.com/bot.html" +2196[] = "Mojeek Ltd." +2196[] = "http://www.mojeek.com/" +2196[] = "bot_MojeekBot.png" +2196[] = "" +2196[] = "/list-of-ua/bot-detail?bot=MojeekBot" +5683[] = "Mozilla/5.0 (compatible; MojeekBot/0.2; http://www.mojeek.com/bot.html#relaunch)" +5683[] = "MojeekBot" +5683[] = "MojeekBot/0.2 Relaunch" +5683[] = "http://www.mojeek.com/bot.html" +5683[] = "Mojeek Ltd." +5683[] = "http://www.mojeek.com/" +5683[] = "bot_MojeekBot.png" +5683[] = "" +5683[] = "/list-of-ua/bot-detail?bot=MojeekBot" +538[] = "Motoricerca-Robots.txt-Checker/1.0 (http://tool.motoricerca.info/robots-checker.phtml)" +538[] = "Motoricerca-Robots.txt-Checker" +538[] = "Motoricerca-Robots.txt-Checker/1.0" +538[] = "http://tool.motoricerca.info/robots-checker.phtml" +538[] = "Motoricerca.info" +538[] = "http://www.motoricerca.info/" +538[] = "bot.png" +538[] = "" +538[] = "/list-of-ua/bot-detail?bot=Motoricerca-Robots.txt-Checker" +135[] = "Mozdex/0.7.2-dev (Mozdex; http://www.mozdex.com/bot.html; spider@mozdex.com)" +135[] = "mozDex" +135[] = "Mozdex/0.7.2-dev" +135[] = "http://www.mozdex.com/bot.html" +135[] = "Mozdex.com" +135[] = "http://www.mozdex.com/" +135[] = "bot.png" +135[] = "" +135[] = "/list-of-ua/bot-detail?bot=mozDex" +350[] = "Mozdex/0.7.2 (Mozdex; http://www.mozdex.com/bot.html; spider@mozdex.com)" +350[] = "mozDex" +350[] = "Mozdex/0.7.2" +350[] = "http://www.mozdex.com/bot.html" +350[] = "Mozdex.com" +350[] = "http://www.mozdex.com/" +350[] = "bot.png" +350[] = "" +350[] = "/list-of-ua/bot-detail?bot=mozDex" +624[] = "Mozdex/0.7.1 (Mozdex; http://www.mozdex.com/bot.html; spider@mozdex.com)" +624[] = "mozDex" +624[] = "Mozdex/0.7.1" +624[] = "http://www.mozdex.com/bot.html" +624[] = "Mozdex.com" +624[] = "http://www.mozdex.com/" +624[] = "bot.png" +624[] = "" +624[] = "/list-of-ua/bot-detail?bot=mozDex" +1533[] = "Mozilla/5.0 (compatible; Mp3Bot/0.4; +http://mp3realm.org/mp3bot/)" +1533[] = "Mp3Bot" +1533[] = "Mp3Bot/0.4" +1533[] = "http://mp3realm.org/mp3bot/" +1533[] = "Mp3Realm.Org" +1533[] = "http://mp3realm.org/" +1533[] = "bot_Mp3Bot.png" +1533[] = "" +1533[] = "/list-of-ua/bot-detail?bot=Mp3Bot" +2120[] = "Mozilla/5.0 (compatible; Mp3Bot/0.7; +http://mp3realm.org/mp3bot/)" +2120[] = "Mp3Bot" +2120[] = "Mp3Bot/0.7" +2120[] = "http://mp3realm.org/mp3bot/" +2120[] = "Mp3Realm.Org" +2120[] = "http://mp3realm.org/" +2120[] = "bot_Mp3Bot.png" +2120[] = "" +2120[] = "/list-of-ua/bot-detail?bot=Mp3Bot" +416[] = "MQbot metaquerier.cs.uiuc.edu/crawler" +416[] = "MQbot" +416[] = "MQbot" +416[] = "http://metaquerier.cs.uiuc.edu/crawler/" +416[] = "University of Illinois at Urbana-Champaign" +416[] = "http://www.uiuc.edu/" +416[] = "bot.png" +416[] = "" +416[] = "/list-of-ua/bot-detail?bot=MQbot" +562[] = "MQBOT/Nutch-0.9-dev (MQBOT Nutch Crawler; http://falcon.cs.uiuc.edu; mqbot@cs.uiuc.edu)" +562[] = "MQbot" +562[] = "MQBOT/Nutch-0.9-dev" +562[] = "http://metaquerier.cs.uiuc.edu/crawler/" +562[] = "University of Illinois at Urbana-Champaign" +562[] = "http://www.uiuc.edu/" +562[] = "bot.png" +562[] = "" +562[] = "/list-of-ua/bot-detail?bot=MQbot" +587[] = "MQBOT/Nutch-0.9-dev (MQBOT Crawler; http://falcon.cs.uiuc.edu; mqbot@cs.uiuc.edu)" +587[] = "MQbot" +587[] = "MQBOT/Nutch-0.9-dev b" +587[] = "http://metaquerier.cs.uiuc.edu/crawler/" +587[] = "University of Illinois at Urbana-Champaign" +587[] = "http://www.uiuc.edu/" +587[] = "bot.png" +587[] = "" +587[] = "/list-of-ua/bot-detail?bot=MQbot" +865[] = "MQBOT/Nutch-0.9-dev (MQBOT Nutch Crawler; http://vwbot.cs.uiuc.edu; mqbot@cs.uiuc.edu)" +865[] = "MQbot" +865[] = "MQBOT/Nutch-0.9-dev c" +865[] = "http://metaquerier.cs.uiuc.edu/crawler/" +865[] = "University of Illinois at Urbana-Champaign" +865[] = "http://www.uiuc.edu/" +865[] = "bot.png" +865[] = "" +865[] = "/list-of-ua/bot-detail?bot=MQbot" +3[] = "msnbot/1.0 (+http://search.msn.com/msnbot.htm)" +3[] = "MSNBot" +3[] = "MSNBot/1.0" +3[] = "http://search.msn.com/msnbot.htm" +3[] = "Microsoft" +3[] = "http://www.microsoft.com/" +3[] = "bot_msnbot.png" +3[] = "" +3[] = "/list-of-ua/bot-detail?bot=MSNBot" +1497[] = "msnbot/2.0b (+http://search.msn.com/msnbot.htm)" +1497[] = "MSNBot" +1497[] = "MSNBot/2.0b" +1497[] = "http://search.msn.com/msnbot.htm" +1497[] = "Microsoft" +1497[] = "http://www.microsoft.com/" +1497[] = "bot_msnbot.png" +1497[] = "" +1497[] = "/list-of-ua/bot-detail?bot=MSNBot" +1180[] = "msnbot/1.1 (+http://search.msn.com/msnbot.htm)" +1180[] = "MSNBot" +1180[] = "MSNBot/1.1" +1180[] = "http://search.msn.com/msnbot.htm" +1180[] = "Microsoft" +1180[] = "http://www.microsoft.com/" +1180[] = "bot_msnbot.png" +1180[] = "" +1180[] = "/list-of-ua/bot-detail?bot=MSNBot" +1468[] = "msnbot-media/1.1 (+http://search.msn.com/msnbot.htm)" +1468[] = "MSNBot" +1468[] = "msnbot-media/1.1" +1468[] = "http://search.msn.com/msnbot.htm" +1468[] = "Microsoft" +1468[] = "http://www.microsoft.com/" +1468[] = "bot_msnbot.png" +1468[] = "" +1468[] = "/list-of-ua/bot-detail?bot=MSNBot" +4095[] = "msnbot/2.0b (+http://search.msn.com/msnbot.htm)." +4095[] = "MSNBot" +4095[] = "MSNBot/2.0b + ." +4095[] = "http://search.msn.com/msnbot.htm" +4095[] = "Microsoft" +4095[] = "http://www.microsoft.com/" +4095[] = "bot_msnbot.png" +4095[] = "" +4095[] = "/list-of-ua/bot-detail?bot=MSNBot" +4411[] = "msnbot/2.0b (+http://search.msn.com/msnbot.htm)._" +4411[] = "MSNBot" +4411[] = "MSNBot/2.0b + ._" +4411[] = "http://search.msn.com/msnbot.htm" +4411[] = "Microsoft" +4411[] = "http://www.microsoft.com/" +4411[] = "bot_msnbot.png" +4411[] = "" +4411[] = "/list-of-ua/bot-detail?bot=MSNBot" +6010[] = "msnbot-NewsBlogs/2.0b (+http://search.msn.com/msnbot.htm)" +6010[] = "MSNBot" +6010[] = "msnbot-NewsBlogs/2.0b" +6010[] = "http://search.msn.com/msnbot.htm" +6010[] = "Microsoft" +6010[] = "http://www.microsoft.com/" +6010[] = "bot_msnbot.png" +6010[] = "" +6010[] = "/list-of-ua/bot-detail?bot=MSNBot" +252[] = "MSRBOT" +252[] = "MSRBOT" +252[] = "MSRBOT" +252[] = "http://research.microsoft.com/research/sv/msrbot/" +252[] = "Microsoft" +252[] = "http://www.microsoft.com/" +252[] = "bot.png" +252[] = "" +252[] = "/list-of-ua/bot-detail?bot=MSRBOT" +546[] = "MSRBOT (http://research.microsoft.com/research/sv/msrbot/)" +546[] = "MSRBOT" +546[] = "MSRBOT b" +546[] = "http://research.microsoft.com/research/sv/msrbot/" +546[] = "Microsoft" +546[] = "http://www.microsoft.com/" +546[] = "bot.png" +546[] = "" +546[] = "/list-of-ua/bot-detail?bot=MSRBOT" +791[] = "MSRBOT (http://research.microsoft.com/research/sv/msrbot)" +791[] = "MSRBOT" +791[] = "MSRBOT c" +791[] = "http://research.microsoft.com/research/sv/msrbot/" +791[] = "Microsoft" +791[] = "http://www.microsoft.com/" +791[] = "bot.png" +791[] = "" +791[] = "/list-of-ua/bot-detail?bot=MSRBOT" +1024[] = "MSRBOT (http://research.microsoft.com/research/sv/msrbot/" +1024[] = "MSRBOT" +1024[] = "MSRBOT d" +1024[] = "http://research.microsoft.com/research/sv/msrbot/" +1024[] = "Microsoft" +1024[] = "http://www.microsoft.com/" +1024[] = "bot.png" +1024[] = "" +1024[] = "/list-of-ua/bot-detail?bot=MSRBOT" +977[] = "multicrawler (+http://sw.deri.org/2006/04/multicrawler/robots.html)" +977[] = "MultiCrawler" +977[] = "MultiCrawler" +977[] = "http://sw.deri.org/2006/04/multicrawler/robots.html" +977[] = "Semantic Web Search Engine" +977[] = "http://swse.org/" +977[] = "bot.png" +977[] = "" +977[] = "/list-of-ua/bot-detail?bot=MultiCrawler" +442[] = "Mozilla/4.0 (compatible; MyFamilyBot/1.0; http://www.myfamilyinc.com)" +442[] = "MyFamilyBot" +442[] = "MyFamilyBot/1.0" +442[] = "http://www.ancestry.com/learn/bot.aspx" +442[] = "MyFamily.com, Inc." +442[] = "http://www.myfamilyinc.com/" +442[] = "bot.png" +442[] = "" +442[] = "/list-of-ua/bot-detail?bot=MyFamilyBot" +528[] = "Mozilla/4.0 (compatible; MyFamilyBot/1.0; http://www.ancestry.com/learn/bot.aspx)" +528[] = "MyFamilyBot" +528[] = "MyFamilyBot/1.0 b" +528[] = "http://www.ancestry.com/learn/bot.aspx" +528[] = "MyFamily.com, Inc." +528[] = "http://www.myfamilyinc.com/" +528[] = "bot.png" +528[] = "" +528[] = "/list-of-ua/bot-detail?bot=MyFamilyBot" +813[] = "mozilla/4.0 (compatible; myfamilybot/1.0; http://www.ancestry.com/learn/bot.aspx)" +813[] = "MyFamilyBot" +813[] = "MyFamilyBot/1.0" +813[] = "http://www.ancestry.com/learn/bot.aspx" +813[] = "The Generations Network, Inc." +813[] = "http://www.myfamilyinc.com/" +813[] = "bot.png" +813[] = "" +813[] = "/list-of-ua/bot-detail?bot=MyFamilyBot" +2028[] = "Mozilla/5.0 (compatible; Najdi.si/3.1)" +2028[] = "Najdi.si" +2028[] = "Najdi.si/3.1" +2028[] = "http://www.najdi.si/help/aboutsearch.html#q5" +2028[] = "Najdi.si d.o.o." +2028[] = "http://www.najdi.si/" +2028[] = "bot_najdi.png" +2028[] = "" +2028[] = "/list-of-ua/bot-detail?bot=Najdi.si" +1476[] = "Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)" +1476[] = "NaverBot" +1476[] = "Yeti/1.0" +1476[] = "http://help.naver.com/robots/" +1476[] = "NHN Corporation" +1476[] = "http://www.nhncorp.com/" +1476[] = "bot_NaverBot.png" +1476[] = "" +1476[] = "/list-of-ua/bot-detail?bot=NaverBot" +1494[] = "Mozilla/4.0 (compatible; NaverBot/1.0; http://help.naver.com/customer_webtxt_02.jsp)" +1494[] = "NaverBot" +1494[] = "NaverBot/1.0" +1494[] = "http://help.naver.com/robots/" +1494[] = "NHN Corporation" +1494[] = "http://www.nhncorp.com/" +1494[] = "bot_NaverBot.png" +1494[] = "" +1494[] = "/list-of-ua/bot-detail?bot=NaverBot" +814[] = "navissobot/1.7 (+http://navisso.com/)" +814[] = "navissobot" +814[] = "navissobot/1.7" +814[] = "http://navisso.com/topics?c=navissobot" +814[] = "Navisso Search" +814[] = "http://navisso.com/" +814[] = "bot.png" +814[] = "" +814[] = "/list-of-ua/bot-detail?bot=navissobot" +832[] = "nestReader/0.2 (discovery; http://echonest.com/reader.shtml; reader at echonest.com)" +832[] = "nestReader" +832[] = "nestReader/0.2" +832[] = "http://echonest.com/reader.shtml" +832[] = "The Echo Nest Corporation" +832[] = "http://echonest.com/" +832[] = "bot.png" +832[] = "" +832[] = "/list-of-ua/bot-detail?bot=nestReader" +6225[] = "Mozilla/5.0 (compatible; NetcraftSurveyAgent/1.0; +info@netcraft.com)" +6225[] = "NetcraftSurveyAgent" +6225[] = "NetcraftSurveyAgent/1.0" +6225[] = "" +6225[] = "Netcraft Ltd" +6225[] = "http://www.netcraft.com/" +6225[] = "bot.png" +6225[] = "" +6225[] = "/list-of-ua/bot-detail?bot=NetcraftSurveyAgent" +873[] = "Netintelligence LiveAssessment - www.netintelligence.com" +873[] = "Netintelligence LiveAssessment" +873[] = "Netintelligence LiveAssessment" +873[] = "" +873[] = "Netintelligence Limited" +873[] = "http://www.netintelligence.com/" +873[] = "bot.png" +873[] = "" +873[] = "/list-of-ua/bot-detail?bot=Netintelligence LiveAssessment" +1095[] = "nrsbot/5.0(loopip.com/robot.html)" +1095[] = "NetResearchServer" +1095[] = "nrsbot/5.0" +1095[] = "http://loopip.com/robot.html" +1095[] = "LoopIP LLC" +1095[] = "http://loopip.com/" +1095[] = "bot.png" +1095[] = "" +1095[] = "/list-of-ua/bot-detail?bot=NetResearchServer" +5092[] = "nrsbot/6.0(loopip.com/robot.html)" +5092[] = "NetResearchServer" +5092[] = "nrsbot/6.0" +5092[] = "http://loopip.com/robot.html" +5092[] = "LoopIP LLC" +5092[] = "http://loopip.com/" +5092[] = "bot.png" +5092[] = "" +5092[] = "/list-of-ua/bot-detail?bot=NetResearchServer" +368[] = "NetWhatCrawler/0.06-dev (NetWhatCrawler from NetWhat.com; http://www.netwhat.com; support@netwhat.com)" +368[] = "NetWhatCrawler" +368[] = "NetWhatCrawler/0.06-dev" +368[] = "" +368[] = "GreenWave Online, Inc." +368[] = "http://www.sonicrun.com/" +368[] = "bot.png" +368[] = "" +368[] = "/list-of-ua/bot-detail?bot=NetWhatCrawler" +771[] = "NextGenSearchBot 1 (for information visit http://about.zoominfo.com/About/NextGenSearchBot.aspx)" +771[] = "NextGenSearchBot" +771[] = "NextGenSearchBot 1" +771[] = "http://www.zoominfo.com/About/misc/NextGenSearchBot.aspx" +771[] = "Zoom Information Inc." +771[] = "http://www.zoominfo.com/" +771[] = "bot.png" +771[] = "" +771[] = "/list-of-ua/bot-detail?bot=NextGenSearchBot" +1102[] = "NextGenSearchBot 1 (for information visit http://www.zoominfo.com/About/misc/NextGenSearchBot.aspx)" +1102[] = "NextGenSearchBot" +1102[] = "NextGenSearchBot 1 b" +1102[] = "http://www.zoominfo.com/About/misc/NextGenSearchBot.aspx" +1102[] = "Zoom Information Inc." +1102[] = "http://www.zoominfo.com/" +1102[] = "bot.png" +1102[] = "" +1102[] = "/list-of-ua/bot-detail?bot=NextGenSearchBot" +563[] = "Mozilla/5.0 (compatible; nextthing.org/1.0; +http://www.nextthing.org/bot)" +563[] = "nextthing.org" +563[] = "nextthing.org/1.0" +563[] = "http://www.nextthing.org/bot/" +563[] = "Andrew Wooster" +563[] = "http://www.cs.hmc.edu/~awooster/" +563[] = "bot.png" +563[] = "" +563[] = "/list-of-ua/bot-detail?bot=nextthing.org" +38[] = "NG/2.0" +38[] = "NG" +38[] = "NG/2.0" +38[] = "" +38[] = "Exalead" +38[] = "http://exalead.com/" +38[] = "bot.png" +38[] = "" +38[] = "/list-of-ua/bot-detail?bot=NG" +465[] = "NG-Search/0.90 (NG-SearchBot; http://www.ng-search.com; )" +465[] = "NG-Search" +465[] = "NG-Search/0.90" +465[] = "" +465[] = "NG-Marketing" +465[] = "http://www.ng-search.com/" +465[] = "bot.png" +465[] = "" +465[] = "/list-of-ua/bot-detail?bot=NG-Search" +515[] = "NG-Search/0.9.8 (NG-SearchBot; http://www.ng-search.com)" +515[] = "NG-Search" +515[] = "NG-Search/0.9.8" +515[] = "" +515[] = "NG-Marketing" +515[] = "http://www.ng-search.com/" +515[] = "bot.png" +515[] = "" +515[] = "/list-of-ua/bot-detail?bot=NG-Search" +290[] = "Mozilla/5.0 (Windows;) NimbleCrawler 1.14 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +290[] = "NimbleCrawler" +290[] = "NimbleCrawler/1.14" +290[] = "" +290[] = "Healthline Networks, Inc." +290[] = "http://www.healthline.com/" +290[] = "bot.png" +290[] = "" +290[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +201[] = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) NimbleCrawler 1.11 obeys UserAgent NimbleCrawler For problems contact: crawler_at_dataalchemy.com" +201[] = "NimbleCrawler" +201[] = "NimbleCrawler/1.11" +201[] = "" +201[] = "Healthline Networks, Inc." +201[] = "http://www.healthline.com/" +201[] = "bot.png" +201[] = "" +201[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +209[] = "Mozilla/5.0 (Windows;) NimbleCrawler 1.12 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +209[] = "NimbleCrawler" +209[] = "NimbleCrawler/1.12" +209[] = "" +209[] = "Healthline Networks, Inc." +209[] = "http://www.healthline.com/" +209[] = "bot.png" +209[] = "" +209[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +282[] = "Mozilla/5.0 (Windows;) NimbleCrawler 1.13 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +282[] = "NimbleCrawler" +282[] = "NimbleCrawler/1.13" +282[] = "" +282[] = "Healthline Networks, Inc." +282[] = "http://www.healthline.com/" +282[] = "bot.png" +282[] = "" +282[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +294[] = "Mozilla/5.0 (Windows;) NimbleCrawler 1.15 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +294[] = "NimbleCrawler" +294[] = "NimbleCrawler/1.15" +294[] = "" +294[] = "Healthline Networks, Inc." +294[] = "http://www.healthline.com/" +294[] = "bot.png" +294[] = "" +294[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +341[] = "Mozilla/5.0 (Windows;) NimbleCrawler 2.0.0 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +341[] = "NimbleCrawler" +341[] = "NimbleCrawler/2.0.0" +341[] = "" +341[] = "Healthline Networks, Inc." +341[] = "http://www.healthline.com/" +341[] = "bot.png" +341[] = "" +341[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +431[] = "Mozilla/5.0 (Windows;) NimbleCrawler 2.0.1 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +431[] = "NimbleCrawler" +431[] = "NimbleCrawler/2.0.1" +431[] = "" +431[] = "Healthline Networks, Inc." +431[] = "http://www.healthline.com/" +431[] = "bot.png" +431[] = "" +431[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +1072[] = "Mozilla/5.0 (Windows;) NimbleCrawler 2.0.2 obeys UserAgent NimbleCrawler For problems contact: crawler@healthline.com" +1072[] = "NimbleCrawler" +1072[] = "NimbleCrawler/2.0.2" +1072[] = "" +1072[] = "Healthline Networks, Inc." +1072[] = "http://www.healthline.com/" +1072[] = "bot.png" +1072[] = "" +1072[] = "/list-of-ua/bot-detail?bot=NimbleCrawler" +4866[] = "nodestackbot/0.1 (bot@nodestack.com http://nodestack.com/bot.html)" +4866[] = "nodestackbot" +4866[] = "nodestackbot/0.1" +4866[] = "http://nodestack.com/bot.html" +4866[] = "nodestack.com" +4866[] = "" +4866[] = "bot.png" +4866[] = "" +4866[] = "/list-of-ua/bot-detail?bot=nodestackbot" +349[] = "noyona_0_1" +349[] = "noyona" +349[] = "noyona_0_1" +349[] = "http://www.noyona.com/index.pl" +349[] = "" +349[] = "" +349[] = "bot.png" +349[] = "" +349[] = "/list-of-ua/bot-detail?bot=noyona" +366[] = "NPBot/3 (NPBot; http://www.nameprotect.com; npbot@nameprotect.com)" +366[] = "NPBot" +366[] = "NPBot/3" +366[] = "http://www.nameprotect.com/botinfo.html" +366[] = "NameProtect Inc." +366[] = "http://www.nameprotect.com/" +366[] = "bot.png" +366[] = "" +366[] = "/list-of-ua/bot-detail?bot=NPBot" +4336[] = "Nuhk/2.4 ( http://www.neti.ee/cgi-bin/abi/Otsing/Nuhk/)" +4336[] = "Nuhk" +4336[] = "Nuhk/2.4" +4336[] = "http://www.neti.ee/cgi-bin/abi/Otsing/Nuhk/" +4336[] = "Elion" +4336[] = "http://www.neti.ee/" +4336[] = "bot.png" +4336[] = "" +4336[] = "/list-of-ua/bot-detail?bot=Nuhk" +6114[] = "Nuhk/2.4 (+http://www.neti.ee/cgi-bin/abi/otsing.html)" +6114[] = "Nuhk" +6114[] = "Nuhk/2.4 b" +6114[] = "http://www.neti.ee/cgi-bin/abi/Otsing/Nuhk/" +6114[] = "Elion" +6114[] = "http://www.neti.ee/" +6114[] = "bot.png" +6114[] = "" +6114[] = "/list-of-ua/bot-detail?bot=Nuhk" +335[] = "NuSearch Spider (compatible; MSIE 6.0)" +335[] = "NuSearch Spider" +335[] = "NuSearch Spider" +335[] = "http://www.nusearch.com/" +335[] = "nusearch.com" +335[] = "http://www.nusearch.com/" +335[] = "bot.png" +335[] = "" +335[] = "/list-of-ua/bot-detail?bot=NuSearch Spider" +480[] = "Nusearch Spider (www.nusearch.com)" +480[] = "NuSearch Spider" +480[] = "NuSearch Spider - b" +480[] = "http://www.nusearch.com/" +480[] = "nusearch.com" +480[] = "http://www.nusearch.com/" +480[] = "bot.png" +480[] = "" +480[] = "/list-of-ua/bot-detail?bot=NuSearch Spider" +82[] = "NutchCVS/0.8-dev (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +82[] = "Nutch" +82[] = "NutchCSV/0.8-dev" +82[] = "http://www.nutch.org/docs/en/bot.html" +82[] = "lucene" +82[] = "http://lucene.apache.org/" +82[] = "bot_Nutch.png" +82[] = "" +82[] = "/list-of-ua/bot-detail?bot=Nutch" +84[] = "NutchCVS/0.06-dev (http://www.nutch.org/docs/en/bot.html; rhwarren+nutch@uwaterloo.ca)" +84[] = "Nutch" +84[] = "NutchCVS/0.06-dev at uwaterloo.ca" +84[] = "http://www.nutch.org/docs/en/bot.html" +84[] = "lucene" +84[] = "http://lucene.apache.org/" +84[] = "bot_Nutch.png" +84[] = "" +84[] = "/list-of-ua/bot-detail?bot=Nutch" +86[] = "NutchCVS/0.7 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +86[] = "Nutch" +86[] = "NutchCVS/0.7" +86[] = "http://www.nutch.org/docs/en/bot.html" +86[] = "lucene" +86[] = "http://lucene.apache.org/" +86[] = "bot_Nutch.png" +86[] = "" +86[] = "/list-of-ua/bot-detail?bot=Nutch" +100[] = "NutchOSU-VLIB/0.7 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +100[] = "Nutch" +100[] = "NutchOSU-VLIB/0.7" +100[] = "http://www.nutch.org/docs/en/bot.html" +100[] = "lucene" +100[] = "http://lucene.apache.org/" +100[] = "bot_Nutch.png" +100[] = "" +100[] = "/list-of-ua/bot-detail?bot=Nutch" +120[] = "InternetArchive/0.8-dev (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +120[] = "Nutch" +120[] = "InternetArchive/0.8-dev" +120[] = "http://www.nutch.org/docs/en/bot.html" +120[] = "lucene" +120[] = "http://lucene.apache.org/" +120[] = "bot_Nutch.png" +120[] = "" +120[] = "/list-of-ua/bot-detail?bot=Nutch" +133[] = "NutchCVS/0.7.1 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +133[] = "Nutch" +133[] = "NutchCVS/0.7.1" +133[] = "http://www.nutch.org/docs/en/bot.html" +133[] = "lucene" +133[] = "http://lucene.apache.org/" +133[] = "bot_Nutch.png" +133[] = "" +133[] = "/list-of-ua/bot-detail?bot=Nutch" +177[] = "NutchCVS/0.7.1 (Nutch; http://www.vvdb.org; voorzitter@vvdb.org)" +177[] = "Nutch" +177[] = "NutchCVS/0.7.1 vvdg.org" +177[] = "http://www.nutch.org/docs/en/bot.html" +177[] = "lucene" +177[] = "http://lucene.apache.org/" +177[] = "bot_Nutch.png" +177[] = "" +177[] = "/list-of-ua/bot-detail?bot=Nutch" +321[] = "NutchCVS/0.06-dev (Nutch; http://www.nutch.org/docs/en/bot.html; nutch-agent@lists.sourceforge.net)" +321[] = "Nutch" +321[] = "NutchCVS/0.06-dev" +321[] = "http://www.nutch.org/docs/en/bot.html" +321[] = "lucene" +321[] = "http://lucene.apache.org/" +321[] = "bot_Nutch.png" +321[] = "" +321[] = "/list-of-ua/bot-detail?bot=Nutch" +323[] = "NutchCVS/0.7.1 (Nutch running at UW; http://www.nutch.org/docs/en/bot.html; sycrawl@cs.washington.edu)" +323[] = "Nutch" +323[] = "NutchCVS/0.7.1 at washihinton.edu" +323[] = "http://www.nutch.org/docs/en/bot.html" +323[] = "lucene" +323[] = "http://lucene.apache.org/" +323[] = "bot_Nutch.png" +323[] = "" +323[] = "/list-of-ua/bot-detail?bot=Nutch" +338[] = "NutchCVS/0.7.1 (Nutch running at UW; http://crawlers.cs.washington.edu/; sycrawl@cs.washington.edu)" +338[] = "Nutch" +338[] = "NutchCVS/0.7.1 at UW" +338[] = "http://www.nutch.org/docs/en/bot.html" +338[] = "lucene" +338[] = "http://lucene.apache.org/" +338[] = "bot_Nutch.png" +338[] = "" +338[] = "/list-of-ua/bot-detail?bot=Nutch" +343[] = "NutchCVS/0.7.2 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +343[] = "Nutch" +343[] = "NutchCVS/0.7.2" +343[] = "http://www.nutch.org/docs/en/bot.html" +343[] = "lucene" +343[] = "http://lucene.apache.org/" +343[] = "bot_Nutch.png" +343[] = "" +343[] = "/list-of-ua/bot-detail?bot=Nutch" +382[] = "NutchCVS/0.8-dev (Nutch running at UW; http://www.nutch.org/docs/en/bot.html; sycrawl@cs.washington.edu)" +382[] = "Nutch" +382[] = "NutchCSV/0.8-dev at UW" +382[] = "http://www.nutch.org/docs/en/bot.html" +382[] = "lucene" +382[] = "http://lucene.apache.org/" +382[] = "bot_Nutch.png" +382[] = "" +382[] = "/list-of-ua/bot-detail?bot=Nutch" +482[] = "asked/Nutch-0.8 (web crawler; http://asked.jp; epicurus at gmail dot com)" +482[] = "Nutch" +482[] = "Nutch/0.8 at asked.jp" +482[] = "http://www.nutch.org/docs/en/bot.html" +482[] = "lucene" +482[] = "http://lucene.apache.org/" +482[] = "bot_Nutch.png" +482[] = "" +482[] = "/list-of-ua/bot-detail?bot=Nutch" +484[] = "HouxouCrawler/Nutch-0.9-dev (houxou.com's nutch-based crawler which serves special interest on-line communities; http://www.houxou.com/crawler; crawler at houxou dot com)" +484[] = "Nutch" +484[] = "Nutch/0.9-dev at houxou.com" +484[] = "http://www.nutch.org/docs/en/bot.html" +484[] = "lucene" +484[] = "http://lucene.apache.org/" +484[] = "bot_Nutch.png" +484[] = "" +484[] = "/list-of-ua/bot-detail?bot=Nutch" +485[] = "BilgiBetaBot/0.8-dev (bilgi.com (Beta) ; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +485[] = "Nutch" +485[] = "Nutch/0.8-dev at bilgi.com" +485[] = "http://www.nutch.org/docs/en/bot.html" +485[] = "lucene" +485[] = "http://lucene.apache.org/" +485[] = "bot_Nutch.png" +485[] = "" +485[] = "/list-of-ua/bot-detail?bot=Nutch" +491[] = "HouxouCrawler/Nutch-0.8 (houxou.com's nutch-based crawler which serves special interest on-line communities; http://www.houxou.com/crawler; crawler at houxou dot com)" +491[] = "Nutch" +491[] = "Nutch/0.8 at houxou.com" +491[] = "http://www.nutch.org/docs/en/bot.html" +491[] = "lucene" +491[] = "http://lucene.apache.org/" +491[] = "bot_Nutch.png" +491[] = "" +491[] = "/list-of-ua/bot-detail?bot=Nutch" +493[] = "NutchCVS/0.7.1 (Nutch; http://lucene.apache.org/nutch/bot.html; raphael@unterreuth.de)" +493[] = "Nutch" +493[] = "NutchCVS/0.7.1 at unterreuth.de" +493[] = "http://www.nutch.org/docs/en/bot.html" +493[] = "lucene" +493[] = "http://lucene.apache.org/" +493[] = "bot_Nutch.png" +493[] = "" +493[] = "/list-of-ua/bot-detail?bot=Nutch" +710[] = "heeii/Nutch-0.9-dev (heeii.com; www.heeii.com; nutch at heeii.com)" +710[] = "Nutch" +710[] = "heeii/Nutch-0.9-dev at heeii.com" +710[] = "http://www.nutch.org/docs/en/bot.html" +710[] = "lucene" +710[] = "http://lucene.apache.org/" +710[] = "bot_Nutch.png" +710[] = "" +710[] = "/list-of-ua/bot-detail?bot=Nutch" +716[] = "HouxouCrawler/Nutch-0.8.2-dev (houxou.com's nutch-based crawler which serves special interest on-line communities; http://www.houxou.com/crawler; crawler at houxou dot com)" +716[] = "Nutch" +716[] = "Nutch/0.8.2-dev at houxou.com" +716[] = "http://www.nutch.org/docs/en/bot.html" +716[] = "lucene" +716[] = "http://lucene.apache.org/" +716[] = "bot_Nutch.png" +716[] = "" +716[] = "/list-of-ua/bot-detail?bot=Nutch" +917[] = "NutchCVS/Nutch-0.9 (Nutch; http://lucene.apache.org/nutch/bot.html; nutch-agent@lucene.apache.org)" +917[] = "Nutch" +917[] = "NutchCSV/0.9" +917[] = "http://www.nutch.org/docs/en/bot.html" +917[] = "lucene" +917[] = "http://lucene.apache.org/" +917[] = "bot_Nutch.png" +917[] = "" +917[] = "/list-of-ua/bot-detail?bot=Nutch" +1089[] = "HouxouCrawler/Nutch-0.9 (houxou.com's nutch-based crawler which serves special interest on-line communities; http://www.houxou.com/crawler; crawler at houxou dot com)" +1089[] = "Nutch" +1089[] = "Nutch/0.9 at houxou.com" +1089[] = "http://www.nutch.org/docs/en/bot.html" +1089[] = "lucene" +1089[] = "http://lucene.apache.org/" +1089[] = "bot_Nutch.png" +1089[] = "" +1089[] = "/list-of-ua/bot-detail?bot=Nutch" +2087[] = "Zscho.de Crawler/Nutch-1.0-Zscho.de-semantic_patch (Zscho.de Crawler, collecting for machine learning; http://zscho.de/)" +2087[] = "Nutch" +2087[] = "Nutch/1.0 at zscho.de" +2087[] = "http://www.nutch.org/docs/en/bot.html" +2087[] = "lucene" +2087[] = "http://lucene.apache.org/" +2087[] = "bot_Nutch.png" +2087[] = "" +2087[] = "/list-of-ua/bot-detail?bot=Nutch" +5939[] = "nWormFeedFinder (http://www.nworm.com)" +5939[] = "nworm" +5939[] = "nwormFeedFinder" +5939[] = "http://www.nworm.com/crawlers.php" +5939[] = "Daniel Schlicker (mangora IT)" +5939[] = "http://www.mangora.de/" +5939[] = "bot.png" +5939[] = "" +5939[] = "/list-of-ua/bot-detail?bot=nworm" +6245[] = "Nymesis/2.0 (http://nymesis.com)" +6245[] = "Nymesis" +6245[] = "Nymesis/2.0" +6245[] = "http://www.nymesis.com/about/" +6245[] = "nymesis.com" +6245[] = "http://www.nymesis.com/" +6245[] = "bot.png" +6245[] = "" +6245[] = "/list-of-ua/bot-detail?bot=Nymesis" +164[] = "oBot" +164[] = "oBot" +164[] = "oBot" +164[] = "" +164[] = "Cobion AG" +164[] = "" +164[] = "bot.png" +164[] = "" +164[] = "/list-of-ua/bot-detail?bot=oBot" +178[] = "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; obot)" +178[] = "oBot" +178[] = "oBot - b" +178[] = "" +178[] = "Cobion AG" +178[] = "" +178[] = "bot.png" +178[] = "" +178[] = "/list-of-ua/bot-detail?bot=oBot" +5228[] = "Ocelli/1.4 (http://www.globalspec.com/Ocelli)" +5228[] = "Ocelli" +5228[] = "Ocelli/1.4" +5228[] = "http://www.globalspec.com/Ocelli" +5228[] = "GlobalSpec, Inc." +5228[] = "http://www.globalspec.com/" +5228[] = "bot.png" +5228[] = "" +5228[] = "/list-of-ua/bot-detail?bot=Ocelli" +93[] = "OmniExplorer_Bot/4.02 (+http://www.omni-explorer.com) WorldIndexer" +93[] = "OmniExplorer_Bot" +93[] = "OmniExplorer_Bot/4.02" +93[] = "http://www.omni-explorer.com/" +93[] = "" +93[] = "" +93[] = "bot.png" +93[] = "" +93[] = "/list-of-ua/bot-detail?bot=OmniExplorer_Bot" +116[] = "OmniExplorer_Bot/4.06 (+http://www.omni-explorer.com) WorldIndexer" +116[] = "OmniExplorer_Bot" +116[] = "OmniExplorer_Bot/4.06" +116[] = "http://www.omni-explorer.com/" +116[] = "" +116[] = "" +116[] = "bot.png" +116[] = "" +116[] = "/list-of-ua/bot-detail?bot=OmniExplorer_Bot" +308[] = "OmniExplorer_Bot/6.47 (+http://www.omni-explorer.com) WorldIndexer" +308[] = "OmniExplorer_Bot" +308[] = "OmniExplorer_Bot/6.47" +308[] = "http://www.omni-explorer.com/" +308[] = "" +308[] = "" +308[] = "bot.png" +308[] = "" +308[] = "/list-of-ua/bot-detail?bot=OmniExplorer_Bot" +109[] = "Mozilla/5.0 (compatible; OnetSzukaj/5.0; +http://szukaj.onet.pl)" +109[] = "OnetSzukaj" +109[] = "OnetSzukaj/5.0" +109[] = "" +109[] = "Onet.pl" +109[] = "http://www.onet.pl/" +109[] = "bot.png" +109[] = "" +109[] = "/list-of-ua/bot-detail?bot=OnetSzukaj" +219[] = "Mozilla/5.0 (compatible; OnetSzukaj/5.0; +http://szukaj.onet.pl" +219[] = "OnetSzukaj" +219[] = "OnetSzukaj/5.0 b" +219[] = "" +219[] = "Onet.pl" +219[] = "http://www.onet.pl/" +219[] = "bot.png" +219[] = "" +219[] = "/list-of-ua/bot-detail?bot=OnetSzukaj" +1522[] = "OOZBOT/0.20 ( Setooz výrazný ako say-th-uuz, znamená mosty. ; http://www.setooz.com/oozbot.html ; agentname at setooz dot_com )" +1522[] = "OOZBOT" +1522[] = "OOZBOT/0.20 b" +1522[] = "http://www.setooz.com/oozbot.html" +1522[] = "SETU Software Systems P. Ltd." +1522[] = "http://www.setooz.com/" +1522[] = "bot.png" +1522[] = "" +1522[] = "/list-of-ua/bot-detail?bot=OOZBOT" +1469[] = "OOZBOT/0.20 ( -- ; http://www.setooz.com/oozbot.html ; agentname at setooz dot_com )" +1469[] = "OOZBOT" +1469[] = "OOZBOT/0.20" +1469[] = "http://www.setooz.com/oozbot.html" +1469[] = "SETU Software Systems P. Ltd." +1469[] = "http://www.setooz.com/" +1469[] = "bot.png" +1469[] = "" +1469[] = "/list-of-ua/bot-detail?bot=OOZBOT" +1703[] = "OOZBOT/0.20 ( http://www.setooz.com/oozbot.html ; agentname at setooz dot_com )" +1703[] = "OOZBOT" +1703[] = "OOZBOT/0.20 c" +1703[] = "http://www.setooz.com/oozbot.html" +1703[] = "SETU Software Systems P. Ltd." +1703[] = "http://www.setooz.com/" +1703[] = "bot.png" +1703[] = "" +1703[] = "/list-of-ua/bot-detail?bot=OOZBOT" +355[] = "Openfind data gatherer, Openbot/3.0+(robot-response@openfind.com.tw;+http://www.openfind.com.tw/robot.html)" +355[] = "Openbot" +355[] = "Openbot/3.0" +355[] = "http://www.openfind.com.tw/robot.html" +355[] = "Openfind Information Technology INC." +355[] = "http://www.openfind.com/" +355[] = "bot.png" +355[] = "" +355[] = "/list-of-ua/bot-detail?bot=Openbot" +5859[] = "OpenCalaisSemanticProxy" +5859[] = "OpenCalaisSemanticProxy" +5859[] = "OpenCalaisSemanticProxy" +5859[] = "http://www.opencalais.com/open-calais-semanticproxy-robot-agent-name" +5859[] = "Thomson Reuters" +5859[] = "http://thomsonreuters.com/" +5859[] = "bot.png" +5859[] = "" +5859[] = "/list-of-ua/bot-detail?bot=OpenCalaisSemanticProxy" +310[] = "Orbiter (+http://www.dailyorbit.com/bot.htm)" +310[] = "Orbiter" +310[] = "Orbiter" +310[] = "http://www.dailyorbit.com/bot.htm" +310[] = "DailyOrbit.com" +310[] = "http://www.dailyorbit.com/" +310[] = "bot_orbiter.png" +310[] = "" +310[] = "/list-of-ua/bot-detail?bot=Orbiter" +1681[] = "Orgbybot/OrgbyBot v1.2 (Spidering the net for Orgby; http://www.orgby.com/ ; Orgby.com Search Engine)" +1681[] = "OrgbyBot" +1681[] = "OrgbyBot/1.2" +1681[] = "http://orgby.com/bot/" +1681[] = "Orgby.com" +1681[] = "" +1681[] = "bot.png" +1681[] = "" +1681[] = "/list-of-ua/bot-detail?bot=OrgbyBot" +2233[] = "Orgbybot/OrgbyBot v1.3 (Spider; http://orgby.com/bot/ ; Orgby.com Search Engine)" +2233[] = "OrgbyBot" +2233[] = "OrgbyBot/1.3" +2233[] = "http://orgby.com/bot/" +2233[] = "Orgby.com" +2233[] = "" +2233[] = "bot.png" +2233[] = "" +2233[] = "/list-of-ua/bot-detail?bot=OrgbyBot" +1496[] = "Mozilla/5.0 (compatible; OsO; http://oso.octopodus.com/abot.html)" +1496[] = "OsObot" +1496[] = "OsObot" +1496[] = "http://oso.octopodus.com/abot.html" +1496[] = "Denis Chatelain" +1496[] = "http://buildingasearchengine.blogspot.com/" +1496[] = "bot.png" +1496[] = "" +1496[] = "/list-of-ua/bot-detail?bot=OsObot" +1037[] = "owsBot/0.1 (Nutch; www.oneworldstreet.com; nutch-agent@lucene.apache.org)" +1037[] = "owsBot" +1037[] = "owsBot/0.1" +1037[] = "" +1037[] = "OneWorldStreet.com" +1037[] = "http://www.oneworldstreet.com/" +1037[] = "bot.png" +1037[] = "" +1037[] = "/list-of-ua/bot-detail?bot=owsBot" +1040[] = "owsBot/0.2 (owsBot; www.oneworldstreet.com; owsBot)" +1040[] = "owsBot" +1040[] = "owsBot/0.2" +1040[] = "" +1040[] = "OneWorldStreet.com" +1040[] = "http://www.oneworldstreet.com/" +1040[] = "bot.png" +1040[] = "" +1040[] = "/list-of-ua/bot-detail?bot=owsBot" +253[] = "PageBitesHyperBot/600 (http://www.pagebites.com/)" +253[] = "PageBitesHyperBot" +253[] = "PageBitesHyperBot/600" +253[] = "" +253[] = "PageBites Inc." +253[] = "http://www.pagebites.com/" +253[] = "bot_pagebiteshyperbot.png" +253[] = "" +253[] = "/list-of-ua/bot-detail?bot=PageBitesHyperBot" +398[] = "page_verifier (http://www.securecomputing.com/goto/pv)" +398[] = "page_verifier" +398[] = "page_verifier" +398[] = "http://www.securecomputing.com/goto/pv" +398[] = "Secure Computing Corporation" +398[] = "http://www.securecomputing.com/" +398[] = "bot.png" +398[] = "" +398[] = "/list-of-ua/bot-detail?bot=page_verifier" +886[] = "panscient.com" +886[] = "Panscient web crawler" +886[] = "Panscient web crawler" +886[] = "http://panscient.com/faq.html" +886[] = "Panscient, Inc." +886[] = "http://panscient.com/" +886[] = "bot.png" +886[] = "" +886[] = "/list-of-ua/bot-detail?bot=Panscient web crawler" +1938[] = "Mozilla/5.0 (compatible;+ParchBot/1.0;++http://www.parchmenthill.com/search.htm)" +1938[] = "ParchBot" +1938[] = "ParchBot/1.0" +1938[] = "http://www.parchmenthill.com/search.htm" +1938[] = "Parchment Hill" +1938[] = "http://www.parchmenthill.com/" +1938[] = "bot.png" +1938[] = "" +1938[] = "/list-of-ua/bot-detail?bot=ParchBot" +5376[] = "Mozilla/5.0 (compatible; Peew/1.0; http://www.peew.de/crawler/)" +5376[] = "Peew" +5376[] = "Peew/1.0" +5376[] = "http://www.peew.de/crawler/" +5376[] = "Marco Schmidt" +5376[] = "http://www.peew.de/" +5376[] = "bot.png" +5376[] = "" +5376[] = "/list-of-ua/bot-detail?bot=Peew" +690[] = "Pingdom GIGRIB (http://www.pingdom.com)" +690[] = "Pingdom GIGRIB" +690[] = "Pingdom GIGRIB" +690[] = "http://uptime.pingdom.com/general/what_is" +690[] = "Pingdom" +690[] = "http://www.pingdom.com/" +690[] = "bot.png" +690[] = "" +690[] = "/list-of-ua/bot-detail?bot=Pingdom GIGRIB" +2197[] = "pingdom.com_bot_version_1.4_(http://www.pingdom.com/)" +2197[] = "pingdom.com_bot" +2197[] = "pingdom.com_bot 1.4" +2197[] = "" +2197[] = "Pingdom AB" +2197[] = "http://www.pingdom.com/" +2197[] = "bot_pingdomcom_bot.png" +2197[] = "" +2197[] = "/list-of-ua/bot-detail?bot=pingdom.com_bot" +1895[] = "Mozilla/5.0 (compatible; Plukkie/1.1; http://www.botje.com/plukkie.htm)" +1895[] = "Plukkie" +1895[] = "Plukkie/1.1" +1895[] = "http://www.botje.com/plukkie.htm" +1895[] = "Botje.nl" +1895[] = "http://botje.nl/" +1895[] = "bot.png" +1895[] = "" +1895[] = "/list-of-ua/bot-detail?bot=Plukkie" +2073[] = "Mozilla/5.0 (compatible; Plukkie/1.2; http://www.botje.com/plukkie.htm)" +2073[] = "Plukkie" +2073[] = "Plukkie/1.2" +2073[] = "http://www.botje.com/plukkie.htm" +2073[] = "Botje.nl" +2073[] = "http://botje.nl/" +2073[] = "bot.png" +2073[] = "" +2073[] = "/list-of-ua/bot-detail?bot=Plukkie" +4876[] = "Mozilla/5.0 (compatible; Plukkie/1.3; http://www.botje.com/plukkie.htm)" +4876[] = "Plukkie" +4876[] = "Plukkie/1.3" +4876[] = "http://www.botje.com/plukkie.htm" +4876[] = "Botje.nl" +4876[] = "" +4876[] = "bot.png" +4876[] = "" +4876[] = "/list-of-ua/bot-detail?bot=Plukkie" +141[] = "Mozilla/5.0 (compatible; Pogodak.co.yu/3.1)" +141[] = "Pogodak.co.yu" +141[] = "Pogodak.co.yu/3.1" +141[] = "" +141[] = "Pogodak d.o.o." +141[] = "http://www.pogodak.co.yu/" +141[] = "bot.png" +141[] = "" +141[] = "/list-of-ua/bot-detail?bot=Pogodak.co.yu" +616[] = "Mozilla/5.0 (compatible; polixea.de-Robot +http://www.polixea.de)" +616[] = "polixea.de" +616[] = "polixea.de" +616[] = "" +616[] = "POLIXEA AG" +616[] = "http://www.polixea.net/" +616[] = "bot.png" +616[] = "" +616[] = "/list-of-ua/bot-detail?bot=polixea.de" +4940[] = "Pompos/1.3 http://dir.com/pompos.html" +4940[] = "Pompos" +4940[] = "Pompos/1.3" +4940[] = "http://dir.com/pompos.html" +4940[] = "Iliad" +4940[] = "http://www.iliad.fr/" +4940[] = "bot.png" +4940[] = "" +4940[] = "/list-of-ua/bot-detail?bot=Pompos" +760[] = "posterus (seek.se) +http://www.seek.se/studio/index.php?id=47&t=details" +760[] = "posterus" +760[] = "posterus" +760[] = "http://www.seek.se/studio/index.php?id=47&t=details" +760[] = "Seek.se" +760[] = "http://www.seek.se/" +760[] = "bot.png" +760[] = "" +760[] = "/list-of-ua/bot-detail?bot=posterus" +5360[] = "PostPost/1.0 (+http://postpo.st/crawlers)" +5360[] = "PostPost" +5360[] = "PostPost/1.0" +5360[] = "http://postpo.st/crawlers" +5360[] = "Boathouse group" +5360[] = "http://www.boathouseinc.com/" +5360[] = "bot_PostPost.png" +5360[] = "" +5360[] = "/list-of-ua/bot-detail?bot=PostPost" +56[] = "psbot/0.1 (+http://www.picsearch.com/bot.html)" +56[] = "psbot" +56[] = "psbot/0.1" +56[] = "http://www.picsearch.com/bot.html" +56[] = "picsearch.com" +56[] = "http://www.picsearch.com/" +56[] = "bot_psbot.png" +56[] = "" +56[] = "/list-of-ua/bot-detail?bot=psbot" +2135[] = "Mozilla/5.0 (compatible; ptd-crawler; +http://bixolabs.com/crawler/ptd/; crawler@bixolabs.com)" +2135[] = "ptd-crawler" +2135[] = "ptd-crawler" +2135[] = "http://bixolabs.com/crawler/ptd/" +2135[] = "Bixolabs" +2135[] = "http://bixolabs.com/" +2135[] = "bot_ptd-crawler.png" +2135[] = "" +2135[] = "/list-of-ua/bot-detail?bot=ptd-crawler" +5620[] = "Qirina Hurdler v. 1.05 10.11.01 (+http://www.qirina.com/hurdler.html)" +5620[] = "Qirina Hurdler" +5620[] = "Qirina Hurdler v. 1.05 10.11.01" +5620[] = "http://www.qirina.com/hurdler.html" +5620[] = "Locust Swarm" +5620[] = "http://www.locustswarm.com/" +5620[] = "bot_QirinaHurdler.png" +5620[] = "" +5620[] = "/list-of-ua/bot-detail?bot=Qirina Hurdler" +1982[] = "Qseero v1.0.0" +1982[] = "Qseero" +1982[] = "Qseero 1.0.0" +1982[] = "" +1982[] = "Qseero, Inc." +1982[] = "http://q0.com/" +1982[] = "bot.png" +1982[] = "" +1982[] = "/list-of-ua/bot-detail?bot=Qseero" +5057[] = "Mozilla/5.0 (compatible; Qualidator.com Bot 1.0;)" +5057[] = "Qualidator.com Bot" +5057[] = "Qualidator.com Bot 1.0" +5057[] = "http://www.qualidator.com/Web/de/Support/FAQ_OnlineTestStatistiken.htm" +5057[] = "seven49.net GmbH" +5057[] = "http://www.seven49.net/" +5057[] = "bot_Qualidator.png" +5057[] = "" +5057[] = "/list-of-ua/bot-detail?bot=Qualidator.com Bot" +914[] = "Mozilla/5.0 (compatible; Quantcastbot/1.0; www.quantcast.com)" +914[] = "Quantcastbot" +914[] = "Quantcastbot/1.0" +914[] = "" +914[] = "Quantcast Corporation" +914[] = "http://www.quantcast.com/" +914[] = "bot.png" +914[] = "" +914[] = "/list-of-ua/bot-detail?bot=Quantcastbot" +6024[] = "quickobot/quickobot-1 (Quicko Labs; http://quicko.co; robot at quicko dot co)" +6024[] = "quickobot" +6024[] = "quickobot-1" +6024[] = "http://www.searchenabler.com/quickobot/" +6024[] = "Quicko Labs Pvt Ltd. " +6024[] = "http://www.searchenabler.com/" +6024[] = "bot.png" +6024[] = "" +6024[] = "/list-of-ua/bot-detail?bot=quickobot" +1815[] = "R6_FeedFetcher(www.radian6.com/crawler)" +1815[] = "R6 bot" +1815[] = "R6_FeedFetcher" +1815[] = "http://www.radian6.com/crawler/" +1815[] = "Radian6 Technologies Inc" +1815[] = "http://www.radian6.com/" +1815[] = "bot.png" +1815[] = "" +1815[] = "/list-of-ua/bot-detail?bot=R6 bot" +4936[] = "R6_CommentReader(www.radian6.com/crawler)" +4936[] = "R6 bot" +4936[] = "R6_CommentReader" +4936[] = "http://www.radian6.com/crawler/" +4936[] = "Radian6 Technologies Inc" +4936[] = "http://www.radian6.com/" +4936[] = "bot.png" +4936[] = "" +4936[] = "/list-of-ua/bot-detail?bot=R6 bot" +6252[] = "RankurBot/Rankur2.1 (http://rankur.com; info at rankur dot com)" +6252[] = "RankurBot" +6252[] = "RankurBot/2.1" +6252[] = "http://rankur.com/technology.html" +6252[] = "Advance Solutions EU Ltd." +6252[] = "http://www.advancesolutions.eu/" +6252[] = "bot.png" +6252[] = "" +6252[] = "/list-of-ua/bot-detail?bot=RankurBot" +856[] = "RedBot/redbot-1.0 (Rediff.com Crawler; redbot at rediff dot com)" +856[] = "RedBot" +856[] = "RedBot1.0" +856[] = "" +856[] = "Rediff.com India Limited." +856[] = "http://www.rediff.com/" +856[] = "bot.png" +856[] = "" +856[] = "/list-of-ua/bot-detail?bot=RedBot" +337[] = "Robo Crawler 6.4.5 (robocrawler@bb.softbank.co.jp)" +337[] = "Robo Crawler" +337[] = "Robo Crawler 6.4.5" +337[] = "http://www.softbank.co.jp/" +337[] = "SOFTBANK CORP." +337[] = "http://www.softbank.co.jp/" +337[] = "bot.png" +337[] = "" +337[] = "/list-of-ua/bot-detail?bot=Robo Crawler" +5362[] = "Robots_Tester_http_www.searchenginepromotionhelp.com" +5362[] = "Robots_Tester" +5362[] = "Robots_Tester" +5362[] = "http://www.searchenginepromotionhelp.com/m/robots-text-tester/robots-checker.php" +5362[] = "Search Engine Promotion Help" +5362[] = "http://www.searchenginepromotionhelp.com/" +5362[] = "bot.png" +5362[] = "" +5362[] = "/list-of-ua/bot-detail?bot=Robots_Tester" +1711[] = "Robozilla/1.0" +1711[] = "Robozilla" +1711[] = "Robozilla/1.0" +1711[] = "http://www.dmoz.org/guidelines/robozilla.html" +1711[] = "DMOZ" +1711[] = "http://www.dmoz.org/" +1711[] = "bot.png" +1711[] = "" +1711[] = "/list-of-ua/bot-detail?bot=Robozilla" +2145[] = "Ronzoobot/1.3 (http://www.ronzoo.com/about.php)" +2145[] = "Ronzoobot" +2145[] = "Ronzoobot/1.3" +2145[] = "http://www.ronzoo.com/about.php" +2145[] = "Ronzoo" +2145[] = "" +2145[] = "bot_Ronzoobot.png" +2145[] = "" +2145[] = "/list-of-ua/bot-detail?bot=Ronzoobot" +2078[] = "Ronzoobot/1.2 (http://www.ronzoo.com/about.php)" +2078[] = "Ronzoobot" +2078[] = "Ronzoobot/1.2" +2078[] = "http://www.ronzoo.com/about.php" +2078[] = "Ronzoo" +2078[] = "" +2078[] = "bot_Ronzoobot.png" +2078[] = "" +2078[] = "/list-of-ua/bot-detail?bot=Ronzoobot" +1601[] = "RSSMicro.com RSS/Atom Feed Robot" +1601[] = "RSSMicro.com RSS/Atom Feed Robot" +1601[] = "RSSMicro.com RSS/Atom Feed Robot" +1601[] = "" +1601[] = "RSSMicro.com" +1601[] = "http://rssmicro.com/" +1601[] = "bot.png" +1601[] = "" +1601[] = "/list-of-ua/bot-detail?bot=RSSMicro.com RSS/Atom Feed Robot" +3415[] = "Ruky-Roboter (Version: 1.06, powered by www.ruky.de +http://www.ruky.de/bot.html)" +3415[] = "Ruky-Roboter" +3415[] = "Ruky-Roboter/1.06" +3415[] = "http://www.ruky.de/zeige/bot.html" +3415[] = "ruky.de" +3415[] = "" +3415[] = "bot.png" +3415[] = "" +3415[] = "/list-of-ua/bot-detail?bot=Ruky-Roboter" +1816[] = "http://domino.research.ibm.com/comm/research_projects.nsf/pages/sai-crawler.callingcard.html" +1816[] = "SAI Crawler" +1816[] = "SAI Crawler" +1816[] = "http://domino.research.ibm.com/comm/research_projects.nsf/pages/sai-crawler.callingcard.html" +1816[] = "IBM" +1816[] = "http://www.ibm.com/" +1816[] = "bot.png" +1816[] = "" +1816[] = "/list-of-ua/bot-detail?bot=SAI Crawler" +1906[] = "SanszBot/1.7(http://www.sansz.org/sanszbot, spider@sansz.org) (spider@sansz.org)" +1906[] = "SanszBot" +1906[] = "SanszBot/1.7" +1906[] = "http://www.sansz.org/sanszbot" +1906[] = "Peres Levente (Sansz Foundation)" +1906[] = "http://www.sansz.org/" +1906[] = "bot.png" +1906[] = "" +1906[] = "/list-of-ua/bot-detail?bot=SanszBot" +88[] = "SBIder/0.7 (SBIder; http://www.sitesell.com/sbider.html; http://support.sitesell.com/contact-support.html)" +88[] = "SBIder" +88[] = "SBIder/0.7" +88[] = "http://www.sitesell.com/sbider.html" +88[] = "SiteSell" +88[] = "http://www.sitesell.com/" +88[] = "bot.png" +88[] = "" +88[] = "/list-of-ua/bot-detail?bot=SBIder" +123[] = "SBIder/0.8-dev (SBIder; http://www.sitesell.com/sbider.html; http://support.sitesell.com/contact-support.html)" +123[] = "SBIder" +123[] = "SBIder/0.8dev" +123[] = "http://www.sitesell.com/sbider.html" +123[] = "SiteSell" +123[] = "http://www.sitesell.com/" +123[] = "bot.png" +123[] = "" +123[] = "/list-of-ua/bot-detail?bot=SBIder" +606[] = "SBIder/SBIder-0.8.2-dev (http://www.sitesell.com/sbider.html)" +606[] = "SBIder" +606[] = "SBIder-0.8.2-dev" +606[] = "http://www.sitesell.com/sbider.html" +606[] = "SiteSell Inc." +606[] = "http://www.sitesell.com/" +606[] = "bot.png" +606[] = "" +606[] = "/list-of-ua/bot-detail?bot=SBIder" +2138[] = "SBIder/Nutch-1.0-dev (http://www.sitesell.com/sbider.html)" +2138[] = "SBIder" +2138[] = "SBIder/1.0" +2138[] = "http://www.sitesell.com/sbider.html" +2138[] = "SiteSell" +2138[] = "http://www.sitesell.com/" +2138[] = "bot.png" +2138[] = "" +2138[] = "/list-of-ua/bot-detail?bot=SBIder" +1950[] = "Mozilla/5.0 (compatible; SecretSerachEngineLabs.com-SBSearch/0.9; http://www.secretsearchenginelabs.com/secret-web-crawler.php)" +1950[] = "SBSearch" +1950[] = "SBSearch/0.9" +1950[] = "http://www.secretsearchenginelabs.com/secret-web-crawler.php" +1950[] = "SecretSearchEngineLabs.com" +1950[] = "http://www.secretsearchenginelabs.com/" +1950[] = "bot.png" +1950[] = "" +1950[] = "/list-of-ua/bot-detail?bot=SBSearch" +1779[] = "Mozilla/5.0 (compatible; Scarlett/ 1.0; +http://www.ellerdale.com/crawler.html)" +1779[] = "Scarlett" +1779[] = "Scarlett/ 1.0" +1779[] = "http://www.ellerdale.com/crawler.html" +1779[] = "Ellerdale Project" +1779[] = "http://www.ellerdale.com/" +1779[] = "bot.png" +1779[] = "" +1779[] = "/list-of-ua/bot-detail?bot=Scarlett" +462[] = "schibstedsokbot (compatible; Mozilla/5.0; MSIE 5.0; FAST FreshCrawler 6; +http://www.schibstedsok.no/bot/)" +462[] = "schibstedsokbot" +462[] = "schibstedsokbot" +462[] = "" +462[] = "Schibsted ASA" +462[] = "http://www.schibsted.no/" +462[] = "bot.png" +462[] = "" +462[] = "/list-of-ua/bot-detail?bot=schibstedsokbot" +501[] = "Mozilla/3.0 (compatible; ScollSpider; http://www.webwobot.com)" +501[] = "ScollSpider" +501[] = "ScollSpider" +501[] = "http://www.webwobot.com/ScollSpider.php" +501[] = "WebWoBot.com" +501[] = "http://www.webwobot.com/" +501[] = "bot.png" +501[] = "" +501[] = "/list-of-ua/bot-detail?bot=ScollSpider" +9[] = "Scooter/3.3" +9[] = "Scooter" +9[] = "Scooter/3.3" +9[] = "" +9[] = "AltaVista" +9[] = "http://www.altavista.com/" +9[] = "bot.png" +9[] = "" +9[] = "/list-of-ua/bot-detail?bot=Scooter" +1565[] = "Mozilla/5.0 (compatible; ScoutJet; +http://www.scoutjet.com/)" +1565[] = "ScoutJet" +1565[] = "ScoutJet a" +1565[] = "http://www.scoutjet.com/" +1565[] = "" +1565[] = "" +1565[] = "bot_ScoutJet.png" +1565[] = "" +1565[] = "/list-of-ua/bot-detail?bot=ScoutJet" +3203[] = "Mozilla/5.0 (compatible; ScoutJet; http://www.scoutjet.com/)" +3203[] = "ScoutJet" +3203[] = "ScoutJet" +3203[] = "http://www.scoutjet.com/" +3203[] = "blekko, inc." +3203[] = "http://blekko.com/" +3203[] = "bot_ScoutJet.png" +3203[] = "" +3203[] = "/list-of-ua/bot-detail?bot=ScoutJet" +301[] = "Search Engine World Robots.txt Validator at http://www.searchengineworld.com/cgi-bin/robotcheck.cgi" +301[] = "Search Engine World Robots.txt Validator" +301[] = "Search Engine World Robots.txt Validator" +301[] = "http://www.searchengineworld.com/cgi-bin/robotcheck.cgi" +301[] = "searchengineworld" +301[] = "http://www.searchengineworld.com/" +301[] = "bot.png" +301[] = "" +301[] = "/list-of-ua/bot-detail?bot=Search Engine World Robots.txt Validator" +4512[] = "Mozilla/5.0 (compatible; Search17Bot/1.1; http://www.search17.com/bot.php)" +4512[] = "Search17Bot" +4512[] = "Search17Bot/1.1" +4512[] = "http://www.search17.com/bot.php" +4512[] = "search17.com" +4512[] = "http://www.search17.com/" +4512[] = "bot.png" +4512[] = "" +4512[] = "/list-of-ua/bot-detail?bot=Search17Bot" +151[] = "Sensis Web Crawler (search_comments\at\sensis\dot\com\dot\au)" +151[] = "Sensis Web Crawler" +151[] = "Sensis Web Crawler - b" +151[] = "" +151[] = "Telstra Corporation Ltd." +151[] = "http://telstra.com/" +151[] = "bot_sensiswebcrawler.png" +151[] = "" +151[] = "/list-of-ua/bot-detail?bot=Sensis Web Crawler" +221[] = "Sensis Web Crawler (search_comments\\at\\sensis\\dot\\com\\dot\\au)" +221[] = "Sensis Web Crawler" +221[] = "Sensis Web Crawler" +221[] = "http://www.sensis.com.au/help.do" +221[] = "Telstra Corporation Ltd." +221[] = "http://www.telstra.com/" +221[] = "bot_sensiswebcrawler.png" +221[] = "" +221[] = "/list-of-ua/bot-detail?bot=Sensis Web Crawler" +6040[] = "Mozilla/5.0 (compatible; SEODat/0.1 http://crawler.seodat.com)" +6040[] = "SEODat" +6040[] = "SEODat/0.1" +6040[] = "" +6040[] = "SEODAT" +6040[] = "http://www.seodat.com/" +6040[] = "bot.png" +6040[] = "" +6040[] = "/list-of-ua/bot-detail?bot=SEODat" +3142[] = "SEOENGBot/1.2 (+http://learn.seoeng.com/seoengbot.htm)" +3142[] = "SEOENGBot" +3142[] = "SEOENGBot/1.2 old" +3142[] = "http://www.seoengine.com/seoengbot.htm" +3142[] = "SEO Engine" +3142[] = "http://www.seoengine.com/" +3142[] = "bot_SEOENGBot.png" +3142[] = "" +3142[] = "/list-of-ua/bot-detail?bot=SEOENGBot" +5999[] = "SEOENGBot/1.2 (+http://learn.seoengine.com/seoengbot.htm)" +5999[] = "SEOENGBot" +5999[] = "SEOENGBot/1.2" +5999[] = "http://www.seoengine.com/seoengbot.htm" +5999[] = "SEO Engine" +5999[] = "http://www.seoengine.com/" +5999[] = "bot_SEOENGBot.png" +5999[] = "" +5999[] = "/list-of-ua/bot-detail?bot=SEOENGBot" +6229[] = "Setooz/Nutch-1.0 (http://www.setooz.com)" +6229[] = "Setoozbot" +6229[] = "Setoozbot/1.0" +6229[] = "http://setooz.com/bot.html" +6229[] = "SETU Software Systems" +6229[] = "http://www.setusoftware.com/" +6229[] = "bot.png" +6229[] = "" +6229[] = "/list-of-ua/bot-detail?bot=Setoozbot" +1463[] = "Mozilla/5.0 (compatible; Seznam screenshot-generator 2.0; +http://fulltext.sblog.cz/screenshot/)" +1463[] = "SeznamBot" +1463[] = "Seznam screenshot-generator 2.0" +1463[] = "http://fulltext.sblog.cz/robot/" +1463[] = "Seznam.cz, a.s." +1463[] = "http://www.seznam.cz/" +1463[] = "seznam.png" +1463[] = "" +1463[] = "/list-of-ua/bot-detail?bot=SeznamBot" +1464[] = "SeznamBot/2.0 (+http://fulltext.sblog.cz/robot/)" +1464[] = "SeznamBot" +1464[] = "SeznamBot/2.0" +1464[] = "http://fulltext.sblog.cz/robot/" +1464[] = "Seznam.cz, a.s." +1464[] = "http://www.seznam.cz/" +1464[] = "seznam.png" +1464[] = "" +1464[] = "/list-of-ua/bot-detail?bot=SeznamBot" +1992[] = "SeznamBot/2.0 (+http://fulltext.seznam.cz/)" +1992[] = "SeznamBot" +1992[] = "SeznamBot/2.0" +1992[] = "http://fulltext.sblog.cz/robot/" +1992[] = "Seznam.cz, a.s." +1992[] = "http://www.seznam.cz/" +1992[] = "seznam.png" +1992[] = "" +1992[] = "/list-of-ua/bot-detail?bot=SeznamBot" +3132[] = "SeznamBot/2.0-Test (+http://fulltext.sblog.cz/robot/)" +3132[] = "SeznamBot" +3132[] = "SeznamBot/2.0-test" +3132[] = "http://fulltext.sblog.cz/robot/" +3132[] = "Seznam.cz, a.s." +3132[] = "http://www.seznam.cz/" +3132[] = "seznam.png" +3132[] = "" +3132[] = "/list-of-ua/bot-detail?bot=SeznamBot" +4437[] = "SeznamBot/3.0-alpha (+http://fulltext.sblog.cz/)" +4437[] = "SeznamBot" +4437[] = "SeznamBot/3.0-alpha" +4437[] = "http://fulltext.sblog.cz/robot/" +4437[] = "Seznam.cz, a.s." +4437[] = "http://www.seznam.cz/" +4437[] = "seznam.png" +4437[] = "" +4437[] = "/list-of-ua/bot-detail?bot=SeznamBot" +5857[] = "SeznamBot/3.0-beta (+http://fulltext.sblog.cz/)" +5857[] = "SeznamBot" +5857[] = "SeznamBot/3.0-beta" +5857[] = "http://fulltext.sblog.cz/robot/" +5857[] = "Seznam.cz, a.s." +5857[] = "http://www.seznam.cz/" +5857[] = "seznam.png" +5857[] = "" +5857[] = "/list-of-ua/bot-detail?bot=SeznamBot" +6189[] = "SeznamBot/3.0 (+http://fulltext.sblog.cz/)" +6189[] = "SeznamBot" +6189[] = "SeznamBot/3.0" +6189[] = "http://fulltext.sblog.cz/robot/" +6189[] = "Seznam.cz, a.s." +6189[] = "http://www.seznam.cz/" +6189[] = "seznam.png" +6189[] = "" +6189[] = "/list-of-ua/bot-detail?bot=SeznamBot" +1562[] = "Shelob (shelob@gmx.net)" +1562[] = "Shelob" +1562[] = "Shelob" +1562[] = "http://mattwork.potsdam.edu/projects/wiki/index.php/Shelob" +1562[] = "M@" +1562[] = "http://mattwork.potsdam.edu/projects/wiki/index.php/Category:Me" +1562[] = "bot.png" +1562[] = "" +1562[] = "/list-of-ua/bot-detail?bot=Shelob" +262[] = "Shim-Crawler(Mozilla-compatible; http://www.logos.ic.i.u-tokyo.ac.jp/crawler/; crawl@logos.ic.i.u-tokyo.ac.jp)" +262[] = "Shim-Crawler" +262[] = "Shim-Crawler" +262[] = "http://www.logos.ic.i.u-tokyo.ac.jp/crawler/index.en.html" +262[] = "Chikayama-Taura Lab, The University of Tokyo" +262[] = "http://www.logos.ic.i.u-tokyo.ac.jp/" +262[] = "bot.png" +262[] = "" +262[] = "/list-of-ua/bot-detail?bot=Shim-Crawler" +536[] = "Shim-Crawler(Mozilla-compatible; http://www.logos.ic.i.u-tokyo.ac.jp/crawl/; crawl@logos.ic.i.u-tokyo.ac.jp)" +536[] = "Shim-Crawler" +536[] = "Shim-Crawler - b" +536[] = "http://www.logos.ic.i.u-tokyo.ac.jp/crawler/index.en.html" +536[] = "Chikayama-Taura Lab, The University of Tokyo" +536[] = "http://www.logos.ic.i.u-tokyo.ac.jp/" +536[] = "bot.png" +536[] = "" +536[] = "/list-of-ua/bot-detail?bot=Shim-Crawler" +747[] = "ShopWiki/1.0 ( +http://www.shopwiki.com/wiki/Help:Bot)" +747[] = "ShopWiki" +747[] = "ShopWiki/1.0" +747[] = "http://www.shopwiki.com/wiki/Help:Bot" +747[] = "ShopWiki Corp" +747[] = "http://www.shopwiki.com/" +747[] = "bot.png" +747[] = "" +747[] = "/list-of-ua/bot-detail?bot=ShopWiki" +208[] = "Silk/1.0" +208[] = "silk" +208[] = "silk/1.0 -a" +208[] = "http://www.slider.com/silk.html" +208[] = "Slider.com" +208[] = "http://www.slider.com/" +208[] = "bot.png" +208[] = "" +208[] = "/list-of-ua/bot-detail?bot=silk" +227[] = "silk/1.0 (+http://www.slider.com/silk.htm)/3.7" +227[] = "silk" +227[] = "silk/1.0" +227[] = "http://www.slider.com/silk.htm" +227[] = "Slider.com" +227[] = "http://www.slider.com/" +227[] = "bot.png" +227[] = "" +227[] = "/list-of-ua/bot-detail?bot=silk" +911[] = "Sirketcebot/v.01 (http://www.sirketce.com/bot.html)" +911[] = "Sirketce/Busiverse" +911[] = "Sirketcebot/v.01" +911[] = "http://www.sirketce.com/bot.html" +911[] = "BERI.L Teknoloji Ltd." +911[] = "http://www.berilteknoloji.com/" +911[] = "bot.png" +911[] = "" +911[] = "/list-of-ua/bot-detail?bot=Sirketce/Busiverse" +1480[] = "Busiversebot/v1.0 (http://www.busiverse.com/bot.php)" +1480[] = "Sirketce/Busiverse" +1480[] = "Busiversebot/v1.0" +1480[] = "http://www.busiverse.com/bot.php" +1480[] = "BerilTech" +1480[] = "http://www.sirketce.com.tr/" +1480[] = "bot.png" +1480[] = "" +1480[] = "/list-of-ua/bot-detail?bot=Sirketce/Busiverse" +6109[] = "Sitedomain-Bot(Sitedomain-Bot 1.0, http://www.sitedomain.de/sitedomain-bot/)" +6109[] = "Sitedomain-Bot" +6109[] = "Sitedomain-Bot 1.0" +6109[] = "http://www.sitedomain.de/sitedomain-bot/" +6109[] = "Sitedomain.de" +6109[] = "http://www.sitedomain.de/" +6109[] = "bot.png" +6109[] = "" +6109[] = "/list-of-ua/bot-detail?bot=Sitedomain-Bot" +874[] = "Mozilla/5.0 (compatible; SkreemRBot +http://skreemr.com)" +874[] = "SkreemRBot" +874[] = "SkreemRBot" +874[] = "" +874[] = "SkreemR" +874[] = "http://skreemr.com/" +874[] = "bot.png" +874[] = "" +874[] = "/list-of-ua/bot-detail?bot=SkreemRBot" +1866[] = "smart.apnoti.com Robot/v1.34 (http://smart.apnoti.com/en/aboutApnotiWebCrawler.html)" +1866[] = "smart.apnoti.com Robot" +1866[] = "smart.apnoti.com Robot/v1.34" +1866[] = "http://smart.apnoti.com/en/aboutApnotiWebCrawler.html" +1866[] = "apnoti.com GmbH" +1866[] = "http://www.apnoti.com/" +1866[] = "bot.png" +1866[] = "" +1866[] = "/list-of-ua/bot-detail?bot=smart.apnoti.com Robot" +101[] = "snap.com beta crawler v0" +101[] = "snap.com" +101[] = "snap.com beta crawler v0" +101[] = "" +101[] = " Idealab" +101[] = "http://www.idealab.com/" +101[] = "bot.png" +101[] = "" +101[] = "/list-of-ua/bot-detail?bot=snap.com" +408[] = "Snapbot/1.0" +408[] = "Snapbot" +408[] = "Snapbot/1.0" +408[] = "" +408[] = "Snap" +408[] = "http://www.snap.com/" +408[] = "bot.png" +408[] = "" +408[] = "/list-of-ua/bot-detail?bot=Snapbot" +754[] = "Snapbot/1.0 (+http://www.snap.com)" +754[] = "Snapbot" +754[] = "Snapbot/1.0 b" +754[] = "" +754[] = "Snap" +754[] = "http://www.snap.com/" +754[] = "bot.png" +754[] = "" +754[] = "/list-of-ua/bot-detail?bot=Snapbot" +815[] = "Mozilla/5.0 (compatible; SnapPreviewBot; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9" +815[] = "SnapBot" +815[] = "SnapPreviewBot" +815[] = "" +815[] = "Snap" +815[] = "http://www.snap.com/" +815[] = "bot.png" +815[] = "" +815[] = "/list-of-ua/bot-detail?bot=SnapBot" +825[] = "Snapbot/1.0 (Snap Shots, +http://www.snap.com)" +825[] = "Snapbot" +825[] = "Snapbot/1.0 c" +825[] = "" +825[] = "Snap" +825[] = "http://www.snap.com/" +825[] = "bot.png" +825[] = "" +825[] = "/list-of-ua/bot-detail?bot=Snapbot" +921[] = "Snapbot/1.0 (Site Search Crawler, +http://www.snap.com)" +921[] = "Snapbot" +921[] = "Snapbot/1.0 d" +921[] = "" +921[] = "Snap" +921[] = "http://www.snap.com/" +921[] = "bot.png" +921[] = "" +921[] = "/list-of-ua/bot-detail?bot=Snapbot" +835[] = "Snappy/1.1 ( http://www.urltrends.com/ )" +835[] = "Snappy" +835[] = "Snappy/1.1" +835[] = "http://www.urltrends.com/" +835[] = "Xerocity Design Group, LLC." +835[] = "http://www.xerocity.com/" +835[] = "bot_snappy.png" +835[] = "" +835[] = "/list-of-ua/bot-detail?bot=Snappy" +1600[] = "SniffRSS/0.5beta (+http://www.blogator.com/)" +1600[] = "SniffRSS" +1600[] = "SniffRSS/0.5beta" +1600[] = "" +1600[] = "blogator.com" +1600[] = "http://www.blogator.com/" +1600[] = "bot.png" +1600[] = "" +1600[] = "/list-of-ua/bot-detail?bot=SniffRSS" +1471[] = "Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)" +1471[] = "Sogou" +1471[] = "Sogou web spider/4.0" +1471[] = "http://www.sogou.com/docs/help/webmasters.htm#07" +1471[] = "sogou.com" +1471[] = "http://www.sogou.com/" +1471[] = "bot.png" +1471[] = "" +1471[] = "/list-of-ua/bot-detail?bot=Sogou" +1470[] = "Sogou develop spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07)" +1470[] = "Sogou" +1470[] = "Sogou develop spider/4.0" +1470[] = "http://www.sogou.com/docs/help/webmasters.htm#07" +1470[] = "sogou.com" +1470[] = "http://www.sogou.com/" +1470[] = "bot.png" +1470[] = "" +1470[] = "/list-of-ua/bot-detail?bot=Sogou" +523[] = "sogou spider" +523[] = "sogou spider" +523[] = "sogou spider" +523[] = "http://www.sogou.com/docs/help/webmasters.htm#07" +523[] = "SOGOU.COM" +523[] = "http://www.sogou.com/" +523[] = "bot.png" +523[] = "" +523[] = "/list-of-ua/bot-detail?bot=sogou spider" +768[] = "sogou web spider http://www.sogou.com/docs/help/webmasters.htm#07" +768[] = "sogou spider" +768[] = "sogou spider b" +768[] = "http://www.sogou.com/docs/help/webmasters.htm#07" +768[] = "SOGOU.COM" +768[] = "http://www.sogou.com/" +768[] = "bot.png" +768[] = "" +768[] = "/list-of-ua/bot-detail?bot=sogou spider" +770[] = "sogou web spider(+http://www.sogou.com/docs/help/webmasters.htm#07)" +770[] = "sogou spider" +770[] = "sogou spider c" +770[] = "http://www.sogou.com/docs/help/webmasters.htm#07" +770[] = "SOGOU.COM" +770[] = "http://www.sogou.com/" +770[] = "bot.png" +770[] = "" +770[] = "/list-of-ua/bot-detail?bot=sogou spider" +773[] = "Sogou web spider/3.0(+http://www.sogou.com/docs/help/webmasters.htm#07)" +773[] = "sogou spider" +773[] = "Sogou web spider/3.0" +773[] = "http://www.sogou.com/docs/help/webmasters.htm#07" +773[] = "SOGOU.COM" +773[] = "http://www.sogou.com/" +773[] = "bot.png" +773[] = "" +773[] = "/list-of-ua/bot-detail?bot=sogou spider" +1853[] = "Sosospider+(+http://help.soso.com/webspider.htm)" +1853[] = "Sosospider" +1853[] = "Sosospider" +1853[] = "http://help.soso.com/webspider.htm" +1853[] = "Tencent, Inc." +1853[] = "http://www.tencent.com/" +1853[] = "bot_soso.png" +1853[] = "" +1853[] = "/list-of-ua/bot-detail?bot=Sosospider" +4911[] = "Mozilla/5.0 (compatible; spbot/2.0.3; +http://www.seoprofiler.com/bot/ )" +4911[] = "spbot" +4911[] = "spbot/2.0.3" +4911[] = "http://www.seoprofiler.com/bot/" +4911[] = "Axandra GmbH" +4911[] = "http://www.axandra.com/" +4911[] = "bot_spbot.png" +4911[] = "" +4911[] = "/list-of-ua/bot-detail?bot=spbot" +4922[] = "Mozilla/5.0 (compatible; spbot/2.0.4; +http://www.seoprofiler.com/bot )" +4922[] = "spbot" +4922[] = "spbot/2.0.4" +4922[] = "http://www.seoprofiler.com/bot/" +4922[] = "Axandra GmbH" +4922[] = "http://www.axandra.com/" +4922[] = "bot_spbot.png" +4922[] = "" +4922[] = "/list-of-ua/bot-detail?bot=spbot" +3379[] = "Mozilla/5.0 (compatible; spbot/1.0; +http://www.seoprofiler.com/bot/ )" +3379[] = "spbot" +3379[] = "spbot/1.0" +3379[] = "http://www.seoprofiler.com/bot/" +3379[] = "Axandra GmbH" +3379[] = "http://www.axandra.com/" +3379[] = "bot_spbot.png" +3379[] = "" +3379[] = "/list-of-ua/bot-detail?bot=spbot" +5386[] = "Mozilla/5.0 (compatible; spbot/2.1; +http://www.seoprofiler.com/bot )" +5386[] = "spbot" +5386[] = "spbot/2.1" +5386[] = "http://www.seoprofiler.com/bot/" +5386[] = "Axandra GmbH" +5386[] = "http://www.axandra.com/" +5386[] = "bot_spbot.png" +5386[] = "" +5386[] = "/list-of-ua/bot-detail?bot=spbot" +5748[] = "Mozilla/5.0 (compatible; spbot/3.0; +http://www.seoprofiler.com/bot )" +5748[] = "spbot" +5748[] = "spbot/3.0" +5748[] = "http://www.seoprofiler.com/bot/" +5748[] = "Axandra GmbH" +5748[] = "http://www.axandra.com/" +5748[] = "bot_spbot.png" +5748[] = "" +5748[] = "/list-of-ua/bot-detail?bot=spbot" +3561[] = "Mozilla/5.0 (compatible; spbot/1.1; +http://www.seoprofiler.com/bot/ )" +3561[] = "spbot" +3561[] = "spbot/1.1" +3561[] = "http://www.seoprofiler.com/bot/" +3561[] = "Axandra GmbH" +3561[] = "http://www.axandra.com/" +3561[] = "bot_spbot.png" +3561[] = "" +3561[] = "/list-of-ua/bot-detail?bot=spbot" +3734[] = "Mozilla/5.0 (compatible; spbot/2.0; +http://www.seoprofiler.com/bot/ )" +3734[] = "spbot" +3734[] = "spbot/2.0" +3734[] = "http://www.seoprofiler.com/bot/" +3734[] = "Axandra GmbH" +3734[] = "http://www.axandra.com/" +3734[] = "bot_spbot.png" +3734[] = "" +3734[] = "/list-of-ua/bot-detail?bot=spbot" +3589[] = "Mozilla/5.0 (compatible; spbot/1.2; +http://www.seoprofiler.com/bot/ )" +3589[] = "spbot" +3589[] = "spbot/1.2" +3589[] = "http://www.seoprofiler.com/bot/" +3589[] = "Axandra GmbH" +3589[] = "http://www.axandra.com/" +3589[] = "bot_spbot.png" +3589[] = "" +3589[] = "/list-of-ua/bot-detail?bot=spbot" +4097[] = "Mozilla/5.0 (compatible; spbot/2.0.1; +http://www.seoprofiler.com/bot/ )" +4097[] = "spbot" +4097[] = "spbot/2.0.1" +4097[] = "http://www.seoprofiler.com/bot/" +4097[] = "Axandra GmbH" +4097[] = "http://www.axandra.com/" +4097[] = "bot_spbot.png" +4097[] = "" +4097[] = "/list-of-ua/bot-detail?bot=spbot" +4377[] = "Mozilla/5.0 (compatible; spbot/2.0.2; +http://www.seoprofiler.com/bot/ )" +4377[] = "spbot" +4377[] = "spbot/2.0.2" +4377[] = "http://www.seoprofiler.com/bot/" +4377[] = "Axandra GmbH" +4377[] = "http://www.axandra.com/" +4377[] = "bot_spbot.png" +4377[] = "" +4377[] = "/list-of-ua/bot-detail?bot=spbot" +999[] = "Speedy Spider (http://www.entireweb.com/about/search_tech/speedy_spider/)" +999[] = "Speedy" +999[] = "Speedy Spider" +999[] = "http://www.entireweb.com/about/search_tech/speedy_spider/" +999[] = "Entireweb.com" +999[] = "http://www.entireweb.com/" +999[] = "bot_Speedy.png" +999[] = "" +999[] = "/list-of-ua/bot-detail?bot=Speedy" +1885[] = "Speedy Spider (Entireweb; Beta/1.2; http://www.entireweb.com/about/search_tech/speedyspider/)" +1885[] = "Speedy" +1885[] = "Speedy Spider Beta/1.2" +1885[] = "http://www.entireweb.com/about/search_tech/speedy_spider/" +1885[] = "Entireweb.com" +1885[] = "http://www.entireweb.com/" +1885[] = "bot_Speedy.png" +1885[] = "" +1885[] = "/list-of-ua/bot-detail?bot=Speedy" +4185[] = "Mozilla/5.0 (compatible; Speedy Spider; http://www.entireweb.com/about/search_tech/speedy_spider/)" +4185[] = "Speedy" +4185[] = "Speedy Spider" +4185[] = "http://www.entireweb.com/about/search_tech/speedy_spider/" +4185[] = "Entireweb.com" +4185[] = "http://www.entireweb.com/" +4185[] = "bot_Speedy.png" +4185[] = "" +4185[] = "/list-of-ua/bot-detail?bot=Speedy" +1784[] = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1; aggregator:Spinn3r (Spinn3r 3.1); http://spinn3r.com/robot) Gecko/20021130" +1784[] = "Spinn3r" +1784[] = "Spinn3r 3.1" +1784[] = "http://spinn3r.com/robot" +1784[] = "Tailrank Inc" +1784[] = "http://tailrank.com/" +1784[] = "bot.png" +1784[] = "" +1784[] = "/list-of-ua/bot-detail?bot=Spinn3r" +5066[] = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.19; aggregator:Spinn3r (Spinn3r 3.1); http://spinn3r.com/robot) Gecko/2010040121 Firefox/3.0.19" +5066[] = "Spinn3r" +5066[] = "Spinn3r 3.1" +5066[] = "http://spinn3r.com/robot" +5066[] = "Tailrank Inc" +5066[] = "http://tailrank.com/" +5066[] = "bot.png" +5066[] = "" +5066[] = "/list-of-ua/bot-detail?bot=Spinn3r" +934[] = "Spock Crawler (http://www.spock.com/crawler)" +934[] = "Spock Crawler" +934[] = "Spock Crawler" +934[] = "http://www.spock.com/crawler" +934[] = "spock.com" +934[] = "http://www.spock.com/" +934[] = "bot.png" +934[] = "" +934[] = "/list-of-ua/bot-detail?bot=Spock Crawler" +1472[] = "SpokeSpider/1.0 (http://support.spoke.com/webspider/) Mozilla/5.0 (not really)" +1472[] = "SpokeSpider" +1472[] = "SpokeSpider/1.0" +1472[] = "http://support.spoke.com/webspider/" +1472[] = "Spoke Software " +1472[] = "http://www.spoke.com/company/" +1472[] = "bot.png" +1472[] = "" +1472[] = "/list-of-ua/bot-detail?bot=SpokeSpider" +296[] = "sproose/0.1-alpha (sproose crawler; http://www.sproose.com/bot.html; crawler@sproose.com)" +296[] = "sproose" +296[] = "sproose/0.1-alpha" +296[] = "http://www.sproose.com/bot.html" +296[] = "Sproose, Inc." +296[] = "http://www.sproose.com/" +296[] = "bot.png" +296[] = "" +296[] = "/list-of-ua/bot-detail?bot=sproose" +435[] = "sproose/0.1 (sproose bot; http://www.sproose.com/bot.html; crawler@sproose.com)" +435[] = "sproose" +435[] = "sproose/0.1" +435[] = "http://www.sproose.com/bot.html" +435[] = "Sproose, Inc." +435[] = "http://www.sproose.com/" +435[] = "bot.png" +435[] = "" +435[] = "/list-of-ua/bot-detail?bot=sproose" +545[] = "sproose/1.0beta (sproose bot; http://www.sproose.com/bot.html; crawler@sproose.com)" +545[] = "Sproose" +545[] = "Sproose/1.0beta" +545[] = "http://www.sproose.com/bot.html" +545[] = "Sproose, Inc." +545[] = "http://www.sproose.com/" +545[] = "bot.png" +545[] = "" +545[] = "/list-of-ua/bot-detail?bot=Sproose" +392[] = "SrevBot/2.0 (SrevBot; http://winsrev.com/bot.html; bot@winsrev.com)" +392[] = "SrevBot" +392[] = "SrevBot/2.0" +392[] = "http://www.winsrev.com/" +392[] = "" +392[] = "" +392[] = "bot.png" +392[] = "" +392[] = "/list-of-ua/bot-detail?bot=SrevBot" +410[] = "SrevBot/1.2 (SrevBot; http://winsrev.com/bot.html; bot@winsrev.comg)" +410[] = "SrevBot" +410[] = "SrevBot/1.2" +410[] = "http://www.winsrev.com/" +410[] = "" +410[] = "" +410[] = "bot.png" +410[] = "" +410[] = "/list-of-ua/bot-detail?bot=SrevBot" +5231[] = "Mozilla/5.0 (compatible; SSLBot/1.0; http://www.sslstats.com/sslbot)" +5231[] = "SSLBot" +5231[] = "SSLBot/1.0" +5231[] = "http://www.sslstats.com/sslbot/" +5231[] = "sslstats.com" +5231[] = "http://www.sslstats.com/" +5231[] = "bot.png" +5231[] = "" +5231[] = "/list-of-ua/bot-detail?bot=SSLBot" +132[] = "StackRambler/2.0 (MSIE incompatible)" +132[] = "StackRambler" +132[] = "StackRambler/2.0" +132[] = "http://www.rambler.ru/doc/robots.shtml" +132[] = "Rambler Media Group" +132[] = "http://ramblermedia.com/" +132[] = "bot_stackrambler.png" +132[] = "" +132[] = "/list-of-ua/bot-detail?bot=StackRambler" +5145[] = "StatoolsBot (+http://www.statools.com/bot.html)" +5145[] = "StatoolsBot" +5145[] = "StatoolsBot" +5145[] = "http://www.statools.com/bot.html" +5145[] = "StaTools.com" +5145[] = "http://www.statools.com/" +5145[] = "bot.png" +5145[] = "" +5145[] = "/list-of-ua/bot-detail?bot=StatoolsBot" +567[] = "Steeler/3.2 (http://www.tkl.iis.u-tokyo.ac.jp/~crawler/)" +567[] = "Steeler" +567[] = "Steeler/3.2" +567[] = "http://www.tkl.iis.u-tokyo.ac.jp/~crawler/" +567[] = "Kitsuregawa Laboratory, The University of Tokyo" +567[] = "http://www.tkl.iis.u-tokyo.ac.jp/" +567[] = "bot_Steeler.png" +567[] = "" +567[] = "/list-of-ua/bot-detail?bot=Steeler" +1092[] = "Steeler/3.3 (http://www.tkl.iis.u-tokyo.ac.jp/~crawler/)" +1092[] = "Steeler" +1092[] = "Steeler/3.3" +1092[] = "http://www.tkl.iis.u-tokyo.ac.jp/~crawler/" +1092[] = "Kitsuregawa Laboratory, The University of Tokyo" +1092[] = "http://www.tkl.iis.u-tokyo.ac.jp/" +1092[] = "bot_Steeler.png" +1092[] = "" +1092[] = "/list-of-ua/bot-detail?bot=Steeler" +2099[] = "Mozilla/5.0 (compatible; Steeler/3.5; http://www.tkl.iis.u-tokyo.ac.jp/~crawler/)" +2099[] = "Steeler" +2099[] = "Steeler/3.5" +2099[] = "http://www.tkl.iis.u-tokyo.ac.jp/~crawler/" +2099[] = "Kitsuregawa Laboratory, The University of Tokyo" +2099[] = "http://www.tkl.iis.u-tokyo.ac.jp/" +2099[] = "bot_Steeler.png" +2099[] = "" +2099[] = "/list-of-ua/bot-detail?bot=Steeler" +5188[] = "Stroke.cz (http://stroke.cz)" +5188[] = "Strokebot" +5188[] = "Strokebot" +5188[] = "http://stroke.cz/oou/" +5188[] = "care4u, s. r. o." +5188[] = "http://care4u.cz/" +5188[] = "bot_strokebot.png" +5188[] = "" +5188[] = "/list-of-ua/bot-detail?bot=Strokebot" +5802[] = "Mozilla/5.0 (compatible; suggybot v0.01a, http://blog.suggy.com/was-ist-suggy/suggy-webcrawler/)" +5802[] = "suggybot" +5802[] = "suggybot/0.01a" +5802[] = "http://blog.suggy.com/was-ist-suggy/suggy-webcrawler/" +5802[] = "Suggy GbR" +5802[] = "http://www.suggy.com/" +5802[] = "bot.png" +5802[] = "" +5802[] = "/list-of-ua/bot-detail?bot=suggybot" +2098[] = "Surphace Scout&v4.0 - scout at surphace dot com" +2098[] = "Surphace Scout" +2098[] = "Surphace Scout/4.0" +2098[] = "" +2098[] = "Surphace (AOL news)" +2098[] = "http://www.surphace.com/" +2098[] = "bot_Surphace_Scout.png" +2098[] = "" +2098[] = "/list-of-ua/bot-detail?bot=Surphace Scout" +235[] = "SurveyBot/2.3 (Whois Source)" +235[] = "SurveyBot" +235[] = "SurveyBot/2.3" +235[] = "http://www.whois.sc/info/webmasters/surveybot.html" +235[] = "Name Intelligence, Inc." +235[] = "http://www.nameintelligence.com/" +235[] = "bot_surveybot.png" +235[] = "" +235[] = "/list-of-ua/bot-detail?bot=SurveyBot" +1078[] = "SygolBot http://www.sygol.com" +1078[] = "SygolBot" +1078[] = "SygolBot" +1078[] = "http://www.sygol.com/SygolBot.asp" +1078[] = "Giorgio Galeotti" +1078[] = "http://www.sygol.com/" +1078[] = "bot.png" +1078[] = "" +1078[] = "/list-of-ua/bot-detail?bot=SygolBot" +204[] = "SynooBot/0.7.1 (SynooBot; http://www.synoo.de/bot.html; webmaster@synoo.com)" +204[] = "SynooBot" +204[] = "SynooBot/0.7.1" +204[] = "http://www.synoo.de/bot.html" +204[] = "Synoo" +204[] = "http://www.synoo.de/" +204[] = "bot.png" +204[] = "" +204[] = "/list-of-ua/bot-detail?bot=SynooBot" +333[] = "SynooBot (compatible; Synoobot/0.7.1; http://www.synoo.com/search/bot.html)" +333[] = "SynooBot" +333[] = "SynooBot/0.7.1 com" +333[] = " http://www.synoo.com/search/bot.html" +333[] = "Synoo" +333[] = "http://www.synoo.com/" +333[] = "bot.png" +333[] = "" +333[] = "/list-of-ua/bot-detail?bot=SynooBot" +470[] = "Szukacz/1.5 (robot; www.szukacz.pl/html/jak_dziala_robot.html; info@szukacz.pl)" +470[] = "Szukacz" +470[] = "Szukacz/1.5" +470[] = "http://www.szukacz.pl/jakdzialarobot.html" +470[] = "24 Godziny Sp. z o.o." +470[] = "http://www.szukacz.pl/" +470[] = "bot.png" +470[] = "" +470[] = "/list-of-ua/bot-detail?bot=Szukacz" +565[] = "Szukacz/1.5 (robot; www.szukacz.pl/jakdzialarobot.html; info@szukacz.pl)" +565[] = "Szukacz" +565[] = "Szukacz/1.5 b" +565[] = "http://www.szukacz.pl/jakdzialarobot.html" +565[] = "24 Godziny Sp. z o.o." +565[] = "http://www.szukacz.pl/" +565[] = "bot.png" +565[] = "" +565[] = "/list-of-ua/bot-detail?bot=Szukacz" +96[] = "Szukankobot /1.0 (+http://www.szukanko.pl/addurl.php)" +96[] = "Szukankobot" +96[] = "Szukankobot /1.0" +96[] = "http://www.szukanko.pl/" +96[] = "szukanko.pl" +96[] = "http://www.szukanko.pl/" +96[] = "bot.png" +96[] = "" +96[] = "/list-of-ua/bot-detail?bot=Szukankobot" +1772[] = "Mozilla/5.0 (compatible; Tagoobot/3.0; +http://www.tagoo.ru)" +1772[] = "Tagoobot" +1772[] = "Tagoobot/3.0" +1772[] = "" +1772[] = "Tagoo" +1772[] = "http://www.tagoo.ru/" +1772[] = "bot.png" +1772[] = "" +1772[] = "/list-of-ua/bot-detail?bot=Tagoobot" +1971[] = "taptubot *** please read http://www.taptu.com/corp/taptubot ***" +1971[] = "taptubot" +1971[] = "taptubot" +1971[] = "http://www.taptu.com/corp/taptubot" +1971[] = "Taptu Limited" +1971[] = "http://www.taptu.com/" +1971[] = "bot.png" +1971[] = "" +1971[] = "/list-of-ua/bot-detail?bot=taptubot" +1727[] = "Technoratibot/7.0" +1727[] = "Technoratibot" +1727[] = "Technoratibot/7.0" +1727[] = "" +1727[] = "Technorati Inc." +1727[] = "http://www.technorati.com/" +1727[] = "bot.png" +1727[] = "" +1727[] = "/list-of-ua/bot-detail?bot=Technoratibot" +1728[] = "Technoratibot/8.0" +1728[] = "Technoratibot" +1728[] = "Technoratibot/8.0" +1728[] = "" +1728[] = "Technorati Inc." +1728[] = "http://www.technorati.com/" +1728[] = "bot.png" +1728[] = "" +1728[] = "/list-of-ua/bot-detail?bot=Technoratibot" +352[] = "TeragramCrawler" +352[] = "TeragramCrawler" +352[] = "TeragramCrawler" +352[] = "" +352[] = "Teragram Corporation" +352[] = "http://www.teragram.com/" +352[] = "bot.png" +352[] = "" +352[] = "/list-of-ua/bot-detail?bot=TeragramCrawler" +412[] = "textractor.queuekeeper/0.1 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +412[] = "textractor" +412[] = "textractor.queuekeeper/0.1" +412[] = "http://ufal.mff.cuni.cz/project/textractor/" +412[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +412[] = "http://ufal.mff.cuni.cz/" +412[] = "bot.png" +412[] = "" +412[] = "/list-of-ua/bot-detail?bot=textractor" +445[] = "textractor.harvester/h7/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +445[] = "textractor" +445[] = "textractor.harvester/h7/1.0" +445[] = "http://ufal.mff.cuni.cz/project/textractor/" +445[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +445[] = "http://ufal.mff.cuni.cz/" +445[] = "bot.png" +445[] = "" +445[] = "/list-of-ua/bot-detail?bot=textractor" +447[] = "textractor.harvester/h3/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +447[] = "textractor" +447[] = "textractor.harvester/h3/1.0" +447[] = "http://ufal.mff.cuni.cz/project/textractor/" +447[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +447[] = "http://ufal.mff.cuni.cz/" +447[] = "bot.png" +447[] = "" +447[] = "/list-of-ua/bot-detail?bot=textractor" +645[] = "textractor.harvester/h2/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +645[] = "textractor" +645[] = "textractor.harvester/h2/1.0" +645[] = "http://ufal.mff.cuni.cz/project/textractor/" +645[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +645[] = "http://ufal.mff.cuni.cz/" +645[] = "bot.png" +645[] = "" +645[] = "/list-of-ua/bot-detail?bot=textractor" +646[] = "textractor.harvester/h27/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +646[] = "textractor" +646[] = "textractor.harvester/h27/1.0" +646[] = "http://ufal.mff.cuni.cz/project/textractor/" +646[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +646[] = "http://ufal.mff.cuni.cz/" +646[] = "bot.png" +646[] = "" +646[] = "/list-of-ua/bot-detail?bot=textractor" +648[] = "textractor.harvester/h24/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +648[] = "textractor" +648[] = "textractor.harvester/h24/1.0" +648[] = "http://ufal.mff.cuni.cz/project/textractor/" +648[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +648[] = "http://ufal.mff.cuni.cz/" +648[] = "bot.png" +648[] = "" +648[] = "/list-of-ua/bot-detail?bot=textractor" +961[] = "textractor.harvester/h5/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +961[] = "textractor" +961[] = "textractor.harvester/h5/1.0" +961[] = "http://ufal.mff.cuni.cz/project/textractor/" +961[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +961[] = "http://ufal.mff.cuni.cz/" +961[] = "bot.png" +961[] = "" +961[] = "/list-of-ua/bot-detail?bot=textractor" +962[] = "textractor.harvester/h39/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +962[] = "textractor" +962[] = "textractor.harvester/h39/1.0" +962[] = "http://ufal.mff.cuni.cz/project/textractor/" +962[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +962[] = "http://ufal.mff.cuni.cz/" +962[] = "bot.png" +962[] = "" +962[] = "/list-of-ua/bot-detail?bot=textractor" +963[] = "textractor.harvester/h37/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +963[] = "textractor" +963[] = "textractor.harvester/h37/1.0" +963[] = "http://ufal.mff.cuni.cz/project/textractor/" +963[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +963[] = "http://ufal.mff.cuni.cz/" +963[] = "bot.png" +963[] = "" +963[] = "/list-of-ua/bot-detail?bot=textractor" +964[] = "textractor.harvester/h38/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +964[] = "textractor" +964[] = "textractor.harvester/h38/1.0" +964[] = "http://ufal.mff.cuni.cz/project/textractor/" +964[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +964[] = "http://ufal.mff.cuni.cz/" +964[] = "bot.png" +964[] = "" +964[] = "/list-of-ua/bot-detail?bot=textractor" +965[] = "textractor.harvester/h12/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +965[] = "textractor" +965[] = "textractor.harvester/h12/1.0" +965[] = "http://ufal.mff.cuni.cz/project/textractor/" +965[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +965[] = "http://ufal.mff.cuni.cz/" +965[] = "bot.png" +965[] = "" +965[] = "/list-of-ua/bot-detail?bot=textractor" +966[] = "textractor.harvester/h34/1.0 (+http://ufal.mff.cuni.cz/project/textractor/, textractor@ufal.mff.cuni.cz)" +966[] = "textractor" +966[] = "textractor.harvester/h34/1.0" +966[] = "http://ufal.mff.cuni.cz/project/textractor/" +966[] = "Institute of Formal and Applied Linguistics (ÚFAL)" +966[] = "http://ufal.mff.cuni.cz/" +966[] = "bot.png" +966[] = "" +966[] = "/list-of-ua/bot-detail?bot=textractor" +218[] = "Mozilla/5.0 (compatible; Theophrastus/2.0; +http://users.cs.cf.ac.uk/N.A.Smith/theophrastus.php)" +218[] = "Theophrastus" +218[] = "Theophrastus/2.0" +218[] = "http://users.cs.cf.ac.uk/N.A.Smith/theophrastus.php" +218[] = "" +218[] = "" +218[] = "bot.png" +218[] = "" +218[] = "/list-of-ua/bot-detail?bot=Theophrastus" +2004[] = "Thumbnail.CZ robot 1.1 (http://thumbnail.cz/why-no-robots-txt.html)" +2004[] = "Thumbnail.CZ robot" +2004[] = "Thumbnail.CZ robot 1.1" +2004[] = "http://thumbnail.cz/why-no-robots-txt.html" +2004[] = "Miroslav Suchý" +2004[] = "http://miroslav.suchy.cz/" +2004[] = "bot.png" +2004[] = "" +2004[] = "/list-of-ua/bot-detail?bot=Thumbnail.CZ robot" +2175[] = "ThumbShots-Bot (+http://thumbshots.in/bot.html)" +2175[] = "ThumbShots-Bot" +2175[] = "ThumbShots-Bot" +2175[] = "http://thumbshots.in/bot.html" +2175[] = "Kristian Fischer" +2175[] = "http://www.kfsw.de/" +2175[] = "bot.png" +2175[] = "" +2175[] = "/list-of-ua/bot-detail?bot=ThumbShots-Bot" +194[] = "thumbshots-de-Bot (Version: 1.02, powered by www.thumbshots.de)" +194[] = "thumbshots-de-Bot" +194[] = "thumbshots-de-Bot 1.02" +194[] = "http://www.thumbshots.de/content-39-seite_auszuschliessen.html" +194[] = "Mobile & More Mobilkommunikation GmbH" +194[] = "http://www.mobile-more.com/" +194[] = "bot.png" +194[] = "" +194[] = "/list-of-ua/bot-detail?bot=thumbshots-de-Bot" +5828[] = "thumbshots-de-bot (+http://www.thumbshots.de/)" +5828[] = "thumbshots-de-Bot" +5828[] = "thumbshots-de-bot" +5828[] = "http://www.thumbshots.de/content-39-seite_auszuschliessen.html" +5828[] = "Mobile & More Mobilkommunikation GmbH" +5828[] = "http://www.mobile-more.com/" +5828[] = "bot.png" +5828[] = "" +5828[] = "/list-of-ua/bot-detail?bot=thumbshots-de-Bot" +2003[] = "TinEye/1.0; +http://www.tineye.com/" +2003[] = "TinEye" +2003[] = "TinEye/1.0" +2003[] = "http://tineye.com/crawler.html " +2003[] = "Idée Inc." +2003[] = "http://ideeinc.com/" +2003[] = "bot_TinEye.png" +2003[] = "" +2003[] = "/list-of-ua/bot-detail?bot=TinEye" +2183[] = "TinEye/1.1 (http://tineye.com/crawler.html)" +2183[] = "TinEye" +2183[] = "TinEye/1.1" +2183[] = "http://tineye.com/crawler.html" +2183[] = "Idée Inc." +2183[] = "http://ideeinc.com/" +2183[] = "bot_TinEye.png" +2183[] = "" +2183[] = "/list-of-ua/bot-detail?bot=TinEye" +1838[] = "Mozilla/5.0 (compatible; Topicbot/12.0rc-2; +http://topicbot.awardspace.us/)" +1838[] = "Topicbot" +1838[] = "Topicbot/12.0rc-2" +1838[] = "http://topicbot.awardspace.us/" +1838[] = "Research Group TopicBot" +1838[] = "http://topicbot.awardspace.us/" +1838[] = "bot.png" +1838[] = "" +1838[] = "/list-of-ua/bot-detail?bot=Topicbot" +4000[] = "Mozilla/4.0 (Toread-Crawler/1.1; +http://news.toread.cc/crawler.php)" +4000[] = "Toread-Crawler" +4000[] = "Toread-Crawler/1.1" +4000[] = "http://news.toread.cc/crawler.php" +4000[] = "sidefeed, Inc" +4000[] = "http://sidefeed.com/" +4000[] = "bot_Toread-Crawler.png" +4000[] = "" +4000[] = "/list-of-ua/bot-detail?bot=Toread-Crawler" +1293[] = "Touche (+http://www.touche.com.ve)" +1293[] = "Touche" +1293[] = "Touche" +1293[] = "http://www.touche.com.ve/Acerca.jsp" +1293[] = "Touché" +1293[] = "http://www.touche.com.ve/" +1293[] = "bot.png" +1293[] = "" +1293[] = "/list-of-ua/bot-detail?bot=Touche" +6146[] = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.0; trendictionbot0.4.2; trendiction media ssppiiddeerr; http://www.trendiction.com/bot/; please let us know of any problems; ssppiiddeerr at trendiction.com) Gecko/20071127 Firefox/2.0.0.11" +6146[] = "trendictionbot" +6146[] = "trendictionbot/0.4.2" +6146[] = "http://www.trendiction.com/en/publisher/bot" +6146[] = "Trendiction S.A." +6146[] = "http://www.trendiction.com/" +6146[] = "bot.png" +6146[] = "" +6146[] = "/list-of-ua/bot-detail?bot=trendictionbot" +489[] = "TurnitinBot/2.0 (http://www.turnitin.com/robot/crawlerinfo.html)" +489[] = "TurnitinBot" +489[] = "TurnitinBot/2.0" +489[] = "http://www.turnitin.com/robot/crawlerinfo.html" +489[] = "iParadigms, LLC." +489[] = "http://www.iparadigms.com/" +489[] = "bot.png" +489[] = "" +489[] = "/list-of-ua/bot-detail?bot=TurnitinBot" +703[] = "TurnitinBot/2.1 (http://www.turnitin.com/robot/crawlerinfo.html)" +703[] = "TurnitinBot" +703[] = "TurnitinBot/2.1" +703[] = "http://www.turnitin.com/robot/crawlerinfo.html" +703[] = "iParadigms, LLC." +703[] = "http://www.iparadigms.com/" +703[] = "bot.png" +703[] = "" +703[] = "/list-of-ua/bot-detail?bot=TurnitinBot" +40[] = "TutorGigBot/1.5 ( +http://www.tutorgig.info )" +40[] = "TutorGigBot" +40[] = "TutorGigBot" +40[] = "http://www.tutorgig.com/help.html" +40[] = "TutorGig" +40[] = "http://www.tutorgig.com/" +40[] = "bot.png" +40[] = "" +40[] = "/list-of-ua/bot-detail?bot=TutorGigBot" +1763[] = "TwengaBot/1.1 (+http://www.twenga.com/bot.html)" +1763[] = "TwengaBot" +1763[] = "TwengaBot/1.1" +1763[] = "http://www.twenga.com/bot.html" +1763[] = "Twenga SA" +1763[] = "http://www.twenga.com/" +1763[] = "bot.png" +1763[] = "" +1763[] = "/list-of-ua/bot-detail?bot=TwengaBot" +5006[] = "TwengaBot-Discover (http://www.twenga.fr/bot-discover.html)" +5006[] = "TwengaBot" +5006[] = "TwengaBot-Discover" +5006[] = "http://www.twenga.com/bot.html" +5006[] = "Twenga SA" +5006[] = "http://www.twenga.com/" +5006[] = "bot.png" +5006[] = "" +5006[] = "/list-of-ua/bot-detail?bot=TwengaBot" +5839[] = "TwengaBot" +5839[] = "TwengaBot" +5839[] = "TwengaBot" +5839[] = "http://www.twenga.com/bot.html" +5839[] = "Twenga SA" +5839[] = "http://www.twenga.com/" +5839[] = "bot.png" +5839[] = "" +5839[] = "/list-of-ua/bot-detail?bot=TwengaBot" +1462[] = "Mozilla/5.0 (Twiceler-0.9 http://www.cuil.com/twiceler/robot.html)" +1462[] = "Twiceler" +1462[] = "Twiceler-0.9" +1462[] = "http://www.cuil.com/twiceler/robot.html" +1462[] = "Cuil, Inc. " +1462[] = "http://www.cuil.com/" +1462[] = "bot_Twiceler.png" +1462[] = "" +1462[] = "/list-of-ua/bot-detail?bot=Twiceler" +1759[] = "Twiceler-0.9 http://www.cuill.com/twiceler/robot.html" +1759[] = "Twiceler" +1759[] = "Twiceler-0.9 b" +1759[] = "http://www.cuil.com/twiceler/robot.html" +1759[] = "Cuil, Inc." +1759[] = "http://www.cuil.com/" +1759[] = "bot_Twiceler.png" +1759[] = "" +1759[] = "/list-of-ua/bot-detail?bot=Twiceler" +6065[] = "UnwindFetchor/1.0 (+http://www.gnip.com/)" +6065[] = "UnwindFetchor" +6065[] = "UnwindFetchor/1.0" +6065[] = "" +6065[] = "Gnip, inc." +6065[] = "http://gnip.com/" +6065[] = "bot.png" +6065[] = "" +6065[] = "/list-of-ua/bot-detail?bot=UnwindFetchor" +345[] = "updated/0.1-beta (updated; http://www.updated.com; crawler@updated.com)" +345[] = "updated" +345[] = "updated/0.1-beta" +345[] = "" +345[] = "Updated.com Inc." +345[] = "http://www.updated.com/" +345[] = "bot.png" +345[] = "" +345[] = "/list-of-ua/bot-detail?bot=updated" +437[] = "updated/0.1-alpha (updated crawler; http://www.updated.com; crawler@updated.com)" +437[] = "updated" +437[] = "updated/0.1-alpha" +437[] = "" +437[] = "Updated.com Inc." +437[] = "http://www.updated.com/" +437[] = "bot.png" +437[] = "" +437[] = "/list-of-ua/bot-detail?bot=updated" +1662[] = "UptimeDog Robot (www.uptimedog.com)" +1662[] = "UptimeDog" +1662[] = "UptimeDog" +1662[] = "http://www.uptimedog.com/" +1662[] = "San Pedro Software Inc." +1662[] = "http://mosw.com/" +1662[] = "bot.png" +1662[] = "" +1662[] = "/list-of-ua/bot-detail?bot=UptimeDog" +1505[] = "urlfan-bot/1.0; +http://www.urlfan.com/site/bot/350.html" +1505[] = "urlfan-bot" +1505[] = "urlfan-bot/1.0" +1505[] = "http://www.urlfan.com/site/bot/350.html" +1505[] = "://URLFAN" +1505[] = "http://www.urlfan.com/" +1505[] = "bot.png" +1505[] = "" +1505[] = "/list-of-ua/bot-detail?bot=urlfan-bot" +5727[] = "Mozilla/5.0 (compatible; Urlfilebot/2.2; +http://urlfile.com/bot.html)" +5727[] = "Urlfilebot (Urlbot)" +5727[] = "Urlfilebot/2.2" +5727[] = "http://urlfile.com/bot.html" +5727[] = "Urlfile" +5727[] = "http://urlfile.com/" +5727[] = "bot.png" +5727[] = "" +5727[] = "/list-of-ua/bot-detail?bot=Urlfilebot (Urlbot)" +439[] = "Vagabondo/3.0 (webagent at wise-guys dot nl)" +439[] = "Vagabondo" +439[] = "Vagabondo/3.0" +439[] = "http://webagent.wise-guys.nl/" +439[] = "WiseGuys Internet BV" +439[] = "http://www.wise-guys.nl/" +439[] = "bot.png" +439[] = "" +439[] = "/list-of-ua/bot-detail?bot=Vagabondo" +1766[] = "Mozilla/4.0 (compatible; Vagabondo/4.0Beta; webcrawler at wise-guys dot nl; http://webagent.wise-guys.nl/; http://www.wise-guys.nl/)" +1766[] = "Vagabondo" +1766[] = "Vagabondo/4.0Beta" +1766[] = "http://webagent.wise-guys.nl/" +1766[] = "WiseGuys Internet BV" +1766[] = "http://www.wise-guys.nl/" +1766[] = "bot.png" +1766[] = "" +1766[] = "/list-of-ua/bot-detail?bot=Vagabondo" +5275[] = "Mozilla/4.0 (compatible; Vagabondo/4.0; http://webagent.wise-guys.nl/)" +5275[] = "Vagabondo" +5275[] = "Vagabondo/4.0" +5275[] = "http://webagent.wise-guys.nl/" +5275[] = "WiseGuys Internet BV" +5275[] = "http://www.wise-guys.nl/" +5275[] = "bot.png" +5275[] = "" +5275[] = "/list-of-ua/bot-detail?bot=Vagabondo" +658[] = "VERASYS 2k Mozilla/4.0 (compatible; en) (compatible; MSIE 6.0; Windows NT 5.2; (+ http://web.verasys.ro); SV1; Unix; .NET CLR 1.1.4322)" +658[] = "VERASYS 2k" +658[] = "VERASYS 2k" +658[] = "http://www.ghita.ro/article/1/verasys_2k.html" +658[] = "Serban Ghita" +658[] = "http://www.ghita.ro/" +658[] = "bot.png" +658[] = "" +658[] = "/list-of-ua/bot-detail?bot=VERASYS 2k" +329[] = "Mozilla/5.0 (compatible; Vermut +http://vermut.aol.com)" +329[] = "Vermut" +329[] = "Vermut" +329[] = "http://vermut.aol.com/" +329[] = "America Online, Inc." +329[] = "http://www.aol.com/" +329[] = "bot.png" +329[] = "" +329[] = "/list-of-ua/bot-detail?bot=Vermut" +195[] = "Vespa Crawler" +195[] = "Vespa Crawler" +195[] = "Vespa Crawler" +195[] = "http://jobs.yahoo.no/index.html" +195[] = "Yahoo!" +195[] = "http://www.yahoo.com/" +195[] = "bot.png" +195[] = "" +195[] = "/list-of-ua/bot-detail?bot=Vespa Crawler" +5065[] = "Mozilla/5.0 (compatible; VideoSurf_bot +http://www.videosurf.com/bot.html)" +5065[] = "VideoSurf_bot" +5065[] = "VideoSurf_bot" +5065[] = "http://www.videosurf.com/bot.html" +5065[] = "VideoSurf Inc." +5065[] = "http://www.videosurf.com/" +5065[] = "bot.png" +5065[] = "" +5065[] = "/list-of-ua/bot-detail?bot=VideoSurf_bot" +376[] = "virus_detector (virus_harvester@securecomputing.com)" +376[] = "virus_detector" +376[] = "virus_detector" +376[] = "http://www.securecomputing.com/sg2_antivirus.cfm?menu=solutions" +376[] = "Secure Computing Corporation." +376[] = "http://www.securecomputing.com/" +376[] = "bot.png" +376[] = "" +376[] = "/list-of-ua/bot-detail?bot=virus_detector" +629[] = "Visbot/1.1 (Visvo.com - The Category Search Engine!; http://www.visvo.com/bot.html; bot@visvo.com)" +629[] = "visbot" +629[] = "visbot/1.1" +629[] = "http://www.visvo.com/bot.html" +629[] = "" +629[] = "" +629[] = "bot.png" +629[] = "" +629[] = "/list-of-ua/bot-detail?bot=visbot" +798[] = "VisBot/2.0 (Visvo.com Crawler; http://www.visvo.com/bot.html; bot@visvo.com)" +798[] = "visbot" +798[] = "visbot/2.0" +798[] = "http://www.visvo.com/bot.html" +798[] = "" +798[] = "" +798[] = "bot.png" +798[] = "" +798[] = "/list-of-ua/bot-detail?bot=visbot" +612[] = "VMBot/0.7.2 (VMBot; http://www.VerticalMatch.com/; vmbot@tradedot.com)" +612[] = "VMBot" +612[] = "VMBot/0.7.2" +612[] = "" +612[] = "Vertical Search Engine (China)" +612[] = "http://www.verticalmatch.com/" +612[] = "bot.png" +612[] = "" +612[] = "/list-of-ua/bot-detail?bot=VMBot" +698[] = "VMBot/0.9 (VMBot; http://www.verticalmatch.com; vmbot@tradedot.com)" +698[] = "VMBot" +698[] = "VMBot/0.9" +698[] = "" +698[] = "Vertical Search Engine (China)" +698[] = "http://www.verticalmatch.com/" +698[] = "bot.png" +698[] = "" +698[] = "/list-of-ua/bot-detail?bot=VMBot" +888[] = "void-bot/0.1 (bot@void.be; http://www.void.be/)" +888[] = "void-bot" +888[] = "void-bot/0.1" +888[] = "http://www.void.be/void-bot.html" +888[] = "Void Security" +888[] = "http://www.void.be/" +888[] = "bot.png" +888[] = "" +888[] = "/list-of-ua/bot-detail?bot=void-bot" +222[] = "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) VoilaBot BETA 1.2 (http://www.voila.com/)" +222[] = "VoilaBot" +222[] = "VoilaBot BETA 1.2" +222[] = "http://www.voila.com/" +222[] = "France Telecom" +222[] = "http://www.francetelecom.com/" +222[] = "bot.png" +222[] = "" +222[] = "/list-of-ua/bot-detail?bot=VoilaBot" +1567[] = "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) VoilaBot BETA 1.2 (support.voilabot@orange-ftgroup.com)" +1567[] = "VoilaBot" +1567[] = "VoilaBot BETA 1.2" +1567[] = "" +1567[] = "France Telecom" +1567[] = "http://www.francetelecom.com/" +1567[] = "bot.png" +1567[] = "" +1567[] = "/list-of-ua/bot-detail?bot=VoilaBot" +225[] = "VORTEX/1.2 (+http://marty.anstey.ca/robots/vortex/)" +225[] = "VORTEX" +225[] = "VORTEX/1.2" +225[] = "http://marty.anstey.ca/projects/robots/vortex/" +225[] = "Marty Anstey" +225[] = "http://marty.anstey.ca/" +225[] = "bot.png" +225[] = "" +225[] = "/list-of-ua/bot-detail?bot=VORTEX" +1586[] = "voyager/2.0 (http://www.kosmix.com/crawler.html)" +1586[] = "voyager" +1586[] = "voyager/2.0" +1586[] = "http://www.kosmix.com/corp/crawler.html" +1586[] = "Kosmix Corporation" +1586[] = "http://www.kosmix.com/html/about.html" +1586[] = "bot.png" +1586[] = "" +1586[] = "/list-of-ua/bot-detail?bot=voyager" +1619[] = "voyager/1.0 (+http://www.kosmix.com/html/crawler.html)" +1619[] = "voyager" +1619[] = "voyager/1.0" +1619[] = "http://www.kosmix.com/corp/crawler.html" +1619[] = "Kosmix Corporation" +1619[] = "http://www.kosmix.com/html/about.html" +1619[] = "bot.png" +1619[] = "" +1619[] = "/list-of-ua/bot-detail?bot=voyager" +929[] = "VWBOT/Nutch-0.9-dev (VWBOT Nutch Crawler; http://vwbot.cs.uiuc.edu; vwbot@cs.uiuc.edu)" +929[] = "VWBot" +929[] = "VWBot/Nutch-0.9-dev" +929[] = "http://vwbot.cs.uiuc.edu/" +929[] = "University of Illinois at Urbana-Champaign" +929[] = "http://www.cs.uiuc.edu/" +929[] = "bot.png" +929[] = "" +929[] = "/list-of-ua/bot-detail?bot=VWBot" +5642[] = "WatchMouse/18990 (http://watchmouse.com/ ; hk)" +5642[] = "WatchMouse" +5642[] = "WatchMouse/18990 hk" +5642[] = "http://www.watchmouse.com/" +5642[] = "WatchMouse" +5642[] = "" +5642[] = "bot_WatchMouse.png" +5642[] = "" +5642[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5639[] = "WatchMouse/18990 (http://watchmouse.com/ ; ny)" +5639[] = "WatchMouse" +5639[] = "WatchMouse/18990 ny" +5639[] = "http://www.watchmouse.com/" +5639[] = "WatchMouse" +5639[] = "" +5639[] = "bot_WatchMouse.png" +5639[] = "" +5639[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5640[] = "WatchMouse/18990 (http://watchmouse.com/ ; se.watchmouse.com)" +5640[] = "WatchMouse" +5640[] = "WatchMouse/18990 se.watchmouse.com" +5640[] = "http://www.watchmouse.com/" +5640[] = "WatchMouse" +5640[] = "" +5640[] = "bot_WatchMouse.png" +5640[] = "" +5640[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5641[] = "WatchMouse/18990 (http://watchmouse.com/ ; it)" +5641[] = "WatchMouse" +5641[] = "WatchMouse/18990 it" +5641[] = "http://www.watchmouse.com/" +5641[] = "WatchMouse" +5641[] = "" +5641[] = "bot_WatchMouse.png" +5641[] = "" +5641[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5643[] = "WatchMouse/18990 (http://watchmouse.com/ ; bc.watchmouse.com)" +5643[] = "WatchMouse" +5643[] = "WatchMouse/18990 bc" +5643[] = "http://www.watchmouse.com/" +5643[] = "WatchMouse" +5643[] = "" +5643[] = "bot_WatchMouse.png" +5643[] = "" +5643[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5644[] = "WatchMouse/18990 (http://watchmouse.com/ ; uk)" +5644[] = "WatchMouse" +5644[] = "WatchMouse/18990 uk" +5644[] = "http://www.watchmouse.com/" +5644[] = "WatchMouse" +5644[] = "" +5644[] = "bot_WatchMouse.png" +5644[] = "" +5644[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5635[] = "WatchMouse/18990 (http://watchmouse.com/ ; d2.watchmouse.com)" +5635[] = "WatchMouse" +5635[] = "WatchMouse/18990 d2.watchmouse.com" +5635[] = "http://www.watchmouse.com/" +5635[] = "WatchMouse" +5635[] = "" +5635[] = "bot_WatchMouse.png" +5635[] = "" +5635[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5636[] = "WatchMouse/18990 (http://watchmouse.com/ ; liz)" +5636[] = "WatchMouse" +5636[] = "WatchMouse/18990 liz" +5636[] = "http://www.watchmouse.com/" +5636[] = "WatchMouse" +5636[] = "" +5636[] = "bot_WatchMouse.png" +5636[] = "" +5636[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5637[] = "WatchMouse/18990 (http://watchmouse.com/ ; d3.watchmouse.com)" +5637[] = "WatchMouse" +5637[] = "WatchMouse/18990 d3.watchmouse.com" +5637[] = "http://www.watchmouse.com/" +5637[] = "WatchMouse" +5637[] = "" +5637[] = "bot_WatchMouse.png" +5637[] = "" +5637[] = "/list-of-ua/bot-detail?bot=WatchMouse" +5638[] = "WatchMouse/18990 (http://watchmouse.com/ ; gab)" +5638[] = "WatchMouse" +5638[] = "WatchMouse/18990 gab" +5638[] = "http://www.watchmouse.com/" +5638[] = "WatchMouse" +5638[] = "" +5638[] = "bot_WatchMouse.png" +5638[] = "" +5638[] = "/list-of-ua/bot-detail?bot=WatchMouse" +4546[] = "Web-sniffer/1.0.31 (+http://web-sniffer.net/)" +4546[] = "Web-sniffer" +4546[] = "Web-sniffer/1.0.31" +4546[] = "" +4546[] = "Lingo4you GbR" +4546[] = "http://www.lingo4u.de/" +4546[] = "bot.png" +4546[] = "" +4546[] = "/list-of-ua/bot-detail?bot=Web-sniffer" +902[] = "WebAlta Crawler/1.3.33 (http://www.webalta.net/ru/about_webmaster.html) (Windows; U; Windows NT 5.1; ru-RU)" +902[] = "WebAlta Crawler" +902[] = "WebAlta Crawler/1.3.33" +902[] = "http://www.webalta.net/ru/about_webmaster.html" +902[] = "Webalta" +902[] = "http://www.webalta.ru/" +902[] = "bot.png" +902[] = "" +902[] = "/list-of-ua/bot-detail?bot=WebAlta Crawler" +922[] = "WebAlta Crawler/1.3.34 (http://www.webalta.net/ru/about_webmaster.html) (Windows; U; Windows NT 5.1; ru-RU)" +922[] = "WebAlta Crawler" +922[] = "WebAlta Crawler/1.3.34" +922[] = "http://www.webalta.net/ru/about_webmaster.html" +922[] = "Webalta" +922[] = "http://www.webalta.ru/" +922[] = "bot.png" +922[] = "" +922[] = "/list-of-ua/bot-detail?bot=WebAlta Crawler" +5701[] = "WebAlta Crawler/1.3.25 (http://www.webalta.net/ru/about_webmaster.html) (Windows; U; Windows NT 5.1; ru-RU)" +5701[] = "WebAlta Crawler" +5701[] = "WebAlta Crawler/1.3.25" +5701[] = "http://www.webalta.net/ru/about_webmaster.html" +5701[] = "Webalta" +5701[] = "http://www.webalta.ru/" +5701[] = "bot.png" +5701[] = "" +5701[] = "/list-of-ua/bot-detail?bot=WebAlta Crawler" +153[] = "WebMiner (Web Miner; http://64.124.122.252/feedback.html)" +153[] = "WebarooBot" +153[] = "WebMiner (Web Miner)" +153[] = "http://www.webaroo.com/company/site-owners" +153[] = "Webaroo Inc." +153[] = "http://www.webaroo.com/" +153[] = "bot.png" +153[] = "" +153[] = "/list-of-ua/bot-detail?bot=WebarooBot" +170[] = "RufusBot (Rufus Web Miner; http://64.124.122.252/feedback.html)" +170[] = "WebarooBot" +170[] = "RufusBot (Rufus Web Miner)" +170[] = "http://www.webaroo.com/company/site-owners" +170[] = "Webaroo Inc." +170[] = "http://www.webaroo.com/" +170[] = "bot.png" +170[] = "" +170[] = "/list-of-ua/bot-detail?bot=WebarooBot" +765[] = "WebarooBot (Webaroo Bot; http://64.124.122.252/feedback.html)" +765[] = "WebarooBot" +765[] = "WebarooBot (Webaroo Bot)" +765[] = "http://www.webaroo.com/company/site-owners" +765[] = "Webaroo Inc." +765[] = "http://www.webaroo.com/" +765[] = "bot.png" +765[] = "" +765[] = "/list-of-ua/bot-detail?bot=WebarooBot" +788[] = "WebarooBot (Webaroo Bot; http://www.webaroo.com/rooSiteOwners.html)" +788[] = "WebarooBot" +788[] = "WebarooBot (Webaroo Bot) b" +788[] = "http://www.webaroo.com/company/site-owners" +788[] = "Webaroo Inc." +788[] = "http://www.webaroo.com/" +788[] = "bot.png" +788[] = "" +788[] = "/list-of-ua/bot-detail?bot=WebarooBot" +1751[] = "WebImages 0.3 ( http://herbert.groot.jebbink.nl/?app=WebImages )" +1751[] = "WebImages" +1751[] = "WebImages 0.3" +1751[] = "" +1751[] = "Herbert Groot Jebbink" +1751[] = "http://herbert.groot.jebbink.nl/ " +1751[] = "bot.png" +1751[] = "" +1751[] = "/list-of-ua/bot-detail?bot=WebImages" +1478[] = "mozilla/5.0 (compatible; webmastercoffee/0.7; +http://webmastercoffee.com/about)" +1478[] = "webmastercoffee" +1478[] = "webmastercoffee/0.7" +1478[] = "http://webmastercoffee.com/about" +1478[] = "Martin Schwartz" +1478[] = "http://webmastercoffee.com/" +1478[] = "bot.png" +1478[] = "" +1478[] = "/list-of-ua/bot-detail?bot=webmastercoffee" +469[] = "WebRankSpider/1.37 (+http://ulm191.server4you.de/crawler/)" +469[] = "WebRankSpider" +469[] = "WebRankSpider/1.37" +469[] = "http://ulm191.server4you.de/crawler/" +469[] = "" +469[] = "" +469[] = "bot.png" +469[] = "" +469[] = "/list-of-ua/bot-detail?bot=WebRankSpider" +758[] = "Webscope/Nutch-0.9-dev (http://www.cs.washington.edu/homes/mjc/agent.html)" +758[] = "Webscope Crawler" +758[] = "Webscope Crawler" +758[] = "http://www.cs.washington.edu/homes/mjc/agent.html" +758[] = "University of Washington Computer Science & Engineering" +758[] = "http://www.cs.washington.edu/" +758[] = "bot.png" +758[] = "" +758[] = "/list-of-ua/bot-detail?bot=Webscope Crawler" +5361[] = "WebWatch/Robot_txtChecker" +5361[] = "WebWatch/Robot_txtChecker" +5361[] = "WebWatch/Robot_txtChecker" +5361[] = "http://www.ukoln.ac.uk/web-focus/webwatch/services/robots-txt/" +5361[] = "UKOLN" +5361[] = "http://www.ukoln.ac.uk/" +5361[] = "bot.png" +5361[] = "" +5361[] = "/list-of-ua/bot-detail?bot=WebWatch/Robot_txtChecker" +786[] = "wectar/Nutch-0.9 (wectar - wectar extracted from the glorious web; http://goosebumps4all.net/wectar)" +786[] = "wectar" +786[] = "wectar/Nutch-0.9" +786[] = "http://wectar.com/" +786[] = "Martin Dudek" +786[] = "" +786[] = "bot.png" +786[] = "" +786[] = "/list-of-ua/bot-detail?bot=wectar" +861[] = "wectar/Nutch-0.9 (nectar extracted form the glorious web; http://goosebumps4all.net/wectar; see website)" +861[] = "wectar" +861[] = "wectar/Nutch-0.9 b" +861[] = "http://wectar.com/" +861[] = "Martin Dudek" +861[] = "" +861[] = "bot.png" +861[] = "" +861[] = "/list-of-ua/bot-detail?bot=wectar" +5389[] = "WikioFeedBot 1.0 (http://www.wikio.com)" +5389[] = "WikioFeedBot" +5389[] = "WikioFeedBot 1.0" +5389[] = "" +5389[] = "Wikio" +5389[] = "http://www.wikio.com/" +5389[] = "bot.png" +5389[] = "" +5389[] = "/list-of-ua/bot-detail?bot=WikioFeedBot" +5710[] = "wikiwix-bot-3.0" +5710[] = "wikiwix-bot" +5710[] = "wikiwix-bot/3.0" +5710[] = "" +5710[] = "wikiwix.com" +5710[] = "http://www.wikiwix.com/" +5710[] = "bot.png" +5710[] = "" +5710[] = "/list-of-ua/bot-detail?bot=wikiwix-bot" +872[] = "Willow Internet Crawler by Twotrees V2.1" +872[] = "Willow Internet Crawler" +872[] = "Willow Internet Crawler 2.1" +872[] = "" +872[] = "Twotrees Technologies, LLC." +872[] = "http://www.twotrees.com/" +872[] = "bot.png" +872[] = "" +872[] = "/list-of-ua/bot-detail?bot=Willow Internet Crawler" +406[] = "WinkBot/0.06 (Wink.com search engine web crawler; http://www.wink.com/Wink:WinkBot; winkbot@wink.com)" +406[] = "WinkBot" +406[] = "WinkBot/0.06" +406[] = "http://www.wink.com/Wink:WinkBot" +406[] = "Wink Technologies, Inc" +406[] = "http://www.wink.com/" +406[] = "bot.png" +406[] = "" +406[] = "/list-of-ua/bot-detail?bot=WinkBot" +1805[] = "WinWebBot/1.0; (Balaena Ltd, UK); http://www.balaena.com/winwebbot.html; winwebbot@balaena.com;)" +1805[] = "WinWebBot" +1805[] = "WinWebBot/1.0" +1805[] = "http://www.balaena.com/winwebbot.html" +1805[] = "Balaena Ltd" +1805[] = "http://www.balaena.com/" +1805[] = "bot.png" +1805[] = "" +1805[] = "/list-of-ua/bot-detail?bot=WinWebBot" +238[] = "WIRE/0.10 (Linux; i686; Bot,Robot,Spider,Crawler)" +238[] = "WIRE" +238[] = "WIRE/0.10" +238[] = "http://www.cwr.cl/projects/WIRE/" +238[] = "Universidad de Chile" +238[] = "http://www.dcc.uchile.cl/" +238[] = "bot.png" +238[] = "" +238[] = "/list-of-ua/bot-detail?bot=WIRE" +415[] = "WIRE/0.11 (Linux; i686; Bot,Robot,Spider,Crawler,aromano@cli.di.unipi.it)" +415[] = "WIRE" +415[] = "WIRE/0.11" +415[] = "http://www.cwr.cl/projects/WIRE/" +415[] = "Universidad de Chile" +415[] = "http://www.dcc.uchile.cl/" +415[] = "bot.png" +415[] = "" +415[] = "/list-of-ua/bot-detail?bot=WIRE" +452[] = "WIRE/0.11 (Linux; i686; Robot,Spider,Crawler,aromano@cli.di.unipi.it)" +452[] = "WIRE" +452[] = "WIRE/0.11 b" +452[] = "http://www.cwr.cl/projects/WIRE/" +452[] = "Universidad de Chile" +452[] = "http://www.dcc.uchile.cl/" +452[] = "bot.png" +452[] = "" +452[] = "/list-of-ua/bot-detail?bot=WIRE" +5183[] = "WMCAI-robot (http://www.topicmaster.jp/wmcai/crawler.html)" +5183[] = "WMCAI_robot" +5183[] = "WMCAI_robot" +5183[] = "http://www.topicmaster.jp/wmcai/crawler.html" +5183[] = "NTT Corporation" +5183[] = "http://www.ntt.co.jp/" +5183[] = "bot.png" +5183[] = "" +5183[] = "/list-of-ua/bot-detail?bot=WMCAI_robot" +1501[] = "Mozilla/5.0 (compatible; woriobot +http://worio.com)" +1501[] = "woriobot" +1501[] = "woriobot" +1501[] = "Worio" +1501[] = "http://worio.com/" +1501[] = "" +1501[] = "bot.png" +1501[] = "" +1501[] = "/list-of-ua/bot-detail?bot=woriobot" +626[] = "www.fi crawler, contact crawler@www.fi" +626[] = "www.fi crawler" +626[] = "www.fi crawler" +626[] = "" +626[] = "Fonecta" +626[] = "http://www.fonecta.fi/" +626[] = "bot.png" +626[] = "" +626[] = "/list-of-ua/bot-detail?bot=www.fi crawler" +364[] = "wwwster/1.4 (Beta, mailto:gue@cis.uni-muenchen.de)" +364[] = "wwwster" +364[] = "wwwster/1.4 Beta" +364[] = "" +364[] = "CIS" +364[] = "http://www.cis.uni-muenchen.de/" +364[] = "bot.png" +364[] = "" +364[] = "/list-of-ua/bot-detail?bot=wwwster" +2205[] = "Mozilla/5.0 (compatible; XmarksFetch/1.0; +http://www.xmarks.com/about/crawler; info@xmarks.com)" +2205[] = "XmarksFetch" +2205[] = "XmarksFetch/1.0" +2205[] = "http://www.xmarks.com/about/crawler" +2205[] = "Xmarks, Inc." +2205[] = "http://www.xmarks.com/" +2205[] = "bot_XmarksFetch.png" +2205[] = "" +2205[] = "/list-of-ua/bot-detail?bot=XmarksFetch" +340[] = "XML Sitemaps Generator 1.0" +340[] = "XML Sitemaps Generator" +340[] = "XML Sitemaps Generator 1.0" +340[] = "http://www.xml-sitemaps.com/" +340[] = "XML-Sitemaps.com" +340[] = "http://www.xml-sitemaps.com/" +340[] = "bot.png" +340[] = "" +340[] = "/list-of-ua/bot-detail?bot=XML Sitemaps Generator" +4999[] = "Mozilla/5.0 (compatible; XML Sitemaps Generator; http://www.xml-sitemaps.com) Gecko XML-Sitemaps/1.0" +4999[] = "XML Sitemaps Generator" +4999[] = "XML Sitemaps Generator/1.0" +4999[] = "http://www.xml-sitemaps.com/" +4999[] = "xml-sitemaps.com" +4999[] = "" +4999[] = "bot.png" +4999[] = "" +4999[] = "/list-of-ua/bot-detail?bot=XML Sitemaps Generator" +4898[] = "Yaanb/1.5.001 (compatible; Win64;)" +4898[] = "Yaanb" +4898[] = "Yaanb/1.5.001" +4898[] = "http://www.yaanb.com/company/?p=bot" +4898[] = "Yaanb" +4898[] = "http://www.yaanb.com/company/" +4898[] = "bot_Yaanb.png" +4898[] = "" +4898[] = "/list-of-ua/bot-detail?bot=Yaanb" +4914[] = "Yaanb/1.5.001 (compatible; Win64;+http://www.yaanb.com/company/bot.hmtl)" +4914[] = "Yaanb" +4914[] = "Yaanb/1.5.001 b" +4914[] = "http://www.yaanb.com/company/?p=bot" +4914[] = "Yaanb" +4914[] = "" +4914[] = "bot_Yaanb.png" +4914[] = "" +4914[] = "/list-of-ua/bot-detail?bot=Yaanb" +1653[] = "yacybot (i386 Linux 2.6.28-gentoo-r5; java 1.5.0_18; Europe/en) http://yacy.net/bot.html" +1653[] = "yacybot" +1653[] = "yacybot" +1653[] = "http://yacy.net/bot.html" +1653[] = "Michael Christen" +1653[] = "" +1653[] = "bot_yacybot.png" +1653[] = "" +1653[] = "/list-of-ua/bot-detail?bot=yacybot" +1604[] = "yacybot (i386 Linux 2.6.28-11-generic; java 1.6.0_13; Europe/de) http://yacy.net/bot.html" +1604[] = "yacybot" +1604[] = "yacybot" +1604[] = "http://yacy.net/bot.html" +1604[] = "Michael Christen" +1604[] = "" +1604[] = "bot_yacybot.png" +1604[] = "" +1604[] = "/list-of-ua/bot-detail?bot=yacybot" +1645[] = "yacybot (amd64 Linux 2.6.24-23-generic; java 1.6.0_07; Europe/de) http://yacy.net/bot.html" +1645[] = "yacybot" +1645[] = "yacybot" +1645[] = "http://yacy.net/bot.html" +1645[] = "Michael Christen" +1645[] = "" +1645[] = "bot_yacybot.png" +1645[] = "" +1645[] = "/list-of-ua/bot-detail?bot=yacybot" +1712[] = "yacybot (x86 Windows Vista 6.1; java 1.6.0_13; Europe/de) http://yacy.net/bot.html" +1712[] = "yacybot" +1712[] = "yacybot" +1712[] = "http://yacy.net/bot.html" +1712[] = "Michael Christen" +1712[] = "" +1712[] = "bot_yacybot.png" +1712[] = "" +1712[] = "/list-of-ua/bot-detail?bot=yacybot" +1776[] = "yacybot (i386 Linux 2.6.28-13-generic; java 1.6.0_13; Europe/en) http://yacy.net/bot.html" +1776[] = "yacybot" +1776[] = "yacybot" +1776[] = "http://yacy.net/bot.html" +1776[] = "Michael Christen" +1776[] = "" +1776[] = "bot_yacybot.png" +1776[] = "" +1776[] = "/list-of-ua/bot-detail?bot=yacybot" +1894[] = "yacybot (amd64 Windows 7 6.1; java 1.6.0_14; Europe/de) http://yacy.net/bot.html" +1894[] = "yacybot" +1894[] = "yacybot" +1894[] = "http://yacy.net/bot.html" +1894[] = "Michael Christen" +1894[] = "" +1894[] = "bot_yacybot.png" +1894[] = "" +1894[] = "/list-of-ua/bot-detail?bot=yacybot" +1957[] = "yacybot (i386 Linux 2.6.23; java 1.6.0_06; Europe/en) http://yacy.net/bot.html" +1957[] = "yacybot" +1957[] = "yacybot" +1957[] = "http://yacy.net/bot.html" +1957[] = "Michael Christen" +1957[] = "" +1957[] = "bot_yacybot.png" +1957[] = "" +1957[] = "/list-of-ua/bot-detail?bot=yacybot" +2017[] = "yacybot (amd64 Linux 2.6.18-164.el5; java 1.6.0; Europe/de) http://yacy.net/bot.html" +2017[] = "yacybot" +2017[] = "yacybot" +2017[] = "http://yacy.net/bot.html" +2017[] = "Michael Christen" +2017[] = "" +2017[] = "bot_yacybot.png" +2017[] = "" +2017[] = "/list-of-ua/bot-detail?bot=yacybot" +2071[] = "yacybot (i386 Linux 2.6.24-23-generic; java 1.6.0_16; Europe/en) http://yacy.net/bot.html" +2071[] = "yacybot" +2071[] = "yacybot" +2071[] = "http://yacy.net/bot.html" +2071[] = "Michael Christen" +2071[] = "" +2071[] = "bot_yacybot.png" +2071[] = "" +2071[] = "/list-of-ua/bot-detail?bot=yacybot" +2088[] = "yacybot (i386 Linux 2.6.23; java 1.6.0_17; Europe/en) http://yacy.net/bot.html" +2088[] = "yacybot" +2088[] = "yacybot" +2088[] = "http://yacy.net/bot.html" +2088[] = "Michael Christen" +2088[] = "" +2088[] = "bot_yacybot.png" +2088[] = "" +2088[] = "/list-of-ua/bot-detail?bot=yacybot" +2091[] = "yacybot (amd64 Linux 2.6.26-2-openvz-amd64; java 1.6.0_12; UTC/en) http://yacy.net/bot.html" +2091[] = "yacybot" +2091[] = "yacybot" +2091[] = "http://yacy.net/bot.html" +2091[] = "Michael Christen" +2091[] = "" +2091[] = "bot_yacybot.png" +2091[] = "" +2091[] = "/list-of-ua/bot-detail?bot=yacybot" +2279[] = "yacybot (amd64 Linux 2.6.32-gentoo; java 1.6.0_17; Europe/en) http://yacy.net/bot.html" +2279[] = "yacybot" +2279[] = "yacybot" +2279[] = "http://yacy.net/bot.html" +2279[] = "Michael Christen" +2279[] = "" +2279[] = "bot_yacybot.png" +2279[] = "" +2279[] = "/list-of-ua/bot-detail?bot=yacybot" +2300[] = "yacybot (x86 Windows 2003 5.2; java 1.6.0_16; Europe/de) http://yacy.net/bot.html" +2300[] = "yacybot" +2300[] = "yacybot" +2300[] = "http://yacy.net/bot.html" +2300[] = "Michael Christen" +2300[] = "" +2300[] = "bot_yacybot.png" +2300[] = "" +2300[] = "/list-of-ua/bot-detail?bot=yacybot" +3034[] = "yacybot (i386 Linux 2.6.26-2-686; java 1.6.0_0; Europe/de) http://yacy.net/bot.html" +3034[] = "yacybot" +3034[] = "yacybot" +3034[] = "http://yacy.net/bot.html" +3034[] = "Michael Christen" +3034[] = "" +3034[] = "bot_yacybot.png" +3034[] = "" +3034[] = "/list-of-ua/bot-detail?bot=yacybot" +3238[] = "yacybot (i386 Linux 2.6.30-2-686; java 1.6.0_0; SystemV/en) http://yacy.net/bot.html" +3238[] = "yacybot" +3238[] = "yacybot" +3238[] = "http://yacy.net/bot.html" +3238[] = "Michael Christen" +3238[] = "" +3238[] = "bot_yacybot.png" +3238[] = "" +3238[] = "/list-of-ua/bot-detail?bot=yacybot" +3221[] = "yacybot (i386 Linux 2.6.31-18-generic; java 1.6.0_0; Europe/en) http://yacy.net/bot.html" +3221[] = "yacybot" +3221[] = "yacybot" +3221[] = "http://yacy.net/bot.html" +3221[] = "Michael Christen" +3221[] = "" +3221[] = "bot_yacybot.png" +3221[] = "" +3221[] = "/list-of-ua/bot-detail?bot=yacybot" +4830[] = "yacybot (i386 Linux 2.6.31-21-generic; java 1.6.0_0; Europe/en) http://yacy.net/bot.html" +4830[] = "yacybot" +4830[] = "yacybot" +4830[] = "http://yacy.net/bot.html" +4830[] = "Michael Christen" +4830[] = "" +4830[] = "bot_yacybot.png" +4830[] = "" +4830[] = "/list-of-ua/bot-detail?bot=yacybot" +4423[] = "yacybot (amd64 Linux 2.6.28-18-generic; java 1.6.0_16; GMT/en) http://yacy.net/bot.html" +4423[] = "yacybot" +4423[] = "yacybot" +4423[] = "http://yacy.net/bot.html" +4423[] = "Michael Christen" +4423[] = "" +4423[] = "bot_yacybot.png" +4423[] = "" +4423[] = "/list-of-ua/bot-detail?bot=yacybot" +4747[] = "yacybot (x86 Windows XP 5.1; java 1.6.0_18; Europe/de) http://yacy.net/bot.html" +4747[] = "yacybot" +4747[] = "yacybot" +4747[] = "http://yacy.net/bot.html" +4747[] = "Michael Christen" +4747[] = "" +4747[] = "bot_yacybot.png" +4747[] = "" +4747[] = "/list-of-ua/bot-detail?bot=yacybot" +4974[] = "yacybot (amd64 Linux 2.6.26-2-amd64; java 1.6.0_0; Europe/en) http://yacy.net/bot.html" +4974[] = "yacybot" +4974[] = "yacybot" +4974[] = "http://yacy.net/bot.html" +4974[] = "Michael Christen" +4974[] = "" +4974[] = "bot_yacybot.png" +4974[] = "" +4974[] = "/list-of-ua/bot-detail?bot=yacybot" +4975[] = "yacybot (i386 Linux 2.6.32-22-generic; java 1.6.0_20; Europe/de) http://yacy.net/bot.html" +4975[] = "yacybot" +4975[] = "yacybot" +4975[] = "http://yacy.net/bot.html" +4975[] = "Michael Christen" +4975[] = "" +4975[] = "bot_yacybot.png" +4975[] = "" +4975[] = "/list-of-ua/bot-detail?bot=yacybot" +5216[] = "yacybot (x86 Windows 2003 5.2; java 1.6.0_20; America/de) http://yacy.net/bot.html" +5216[] = "yacybot" +5216[] = "yacybot" +5216[] = "http://yacy.net/bot.html" +5216[] = "Michael Christen" +5216[] = "" +5216[] = "bot_yacybot.png" +5216[] = "" +5216[] = "/list-of-ua/bot-detail?bot=yacybot" +5176[] = "yacybot (amd64 Linux 2.6.26-2-amd64; java 1.6.0_20; Europe/en) http://yacy.net/bot.html" +5176[] = "yacybot" +5176[] = "yacybot" +5176[] = "http://yacy.net/bot.html" +5176[] = "Michael Christen" +5176[] = "" +5176[] = "bot_yacybot.png" +5176[] = "" +5176[] = "/list-of-ua/bot-detail?bot=yacybot" +4[] = "Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)" +4[] = "Yahoo!" +4[] = "Yahoo! Slurp" +4[] = "http://help.yahoo.com/help/us/ysearch/slurp" +4[] = "Yahoo! Inc." +4[] = "http://www.yahoo.com/" +4[] = "bot_yahoo!slurp.png" +4[] = "" +4[] = "/list-of-ua/bot-detail?bot=Yahoo!" +193[] = "Mozilla/5.0 (compatible; Yahoo! Slurp China; http://misc.yahoo.com.cn/help.html)" +193[] = "Yahoo!" +193[] = "Yahoo! Slurp China" +193[] = "http://misc.yahoo.com.cn/help.html" +193[] = "Yahoo! Inc." +193[] = "http://www.yahoo.com/" +193[] = "bot_yahoo!slurp.png" +193[] = "" +193[] = "/list-of-ua/bot-detail?bot=Yahoo!" +1564[] = "Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)" +1564[] = "Yahoo!" +1564[] = "Yahoo! Slurp/3.0" +1564[] = "http://help.yahoo.com/help/us/ysearch/slurp" +1564[] = "Yahoo! Inc." +1564[] = "http://www.yahoo.com/" +1564[] = "bot_yahoo!slurp.png" +1564[] = "" +1564[] = "/list-of-ua/bot-detail?bot=Yahoo!" +1793[] = "Mozilla/5.0 (Yahoo-MMCrawler/4.0; mailto:vertical-crawl-support@yahoo-inc.com)" +1793[] = "Yahoo!" +1793[] = "Yahoo-MMCrawler/4.0" +1793[] = "http://help.yahoo.com/" +1793[] = "Yahoo! Inc" +1793[] = "http://www.yahoo.com/" +1793[] = "bot_yahoo!slurp.png" +1793[] = "" +1793[] = "/list-of-ua/bot-detail?bot=Yahoo!" +1548[] = "Y!J-BRI/0.0.1 crawler ( http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html )" +1548[] = "Yahoo! JAPAN" +1548[] = "Y!J-BRI/0.0.1" +1548[] = "http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html" +1548[] = "Yahoo! Inc" +1548[] = "http://www.yahoo.com/" +1548[] = "bot_yahoo!slurp.png" +1548[] = "" +1548[] = "/list-of-ua/bot-detail?bot=Yahoo! JAPAN" +1558[] = "Y!J-BSC/1.0 (http://help.yahoo.co.jp/help/jp/blog-search/)" +1558[] = "Yahoo! JAPAN" +1558[] = "Y!J-BSC/1.0" +1558[] = "http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html" +1558[] = "Yahoo! Inc" +1558[] = "http://www.yahoo.com/" +1558[] = "bot_yahoo!slurp.png" +1558[] = "" +1558[] = "/list-of-ua/bot-detail?bot=Yahoo! JAPAN" +5982[] = "Y!J-BRO/YFSJ crawler (compatible; Mozilla 4.0; MSIE 5.5; http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html; YahooFeedSeekerJp/2.0)" +5982[] = "Yahoo! JAPAN" +5982[] = "Y!J-BRO/YFSJ" +5982[] = "http://help.yahoo.co.jp/help/jp/search/indexing/indexing-15.html" +5982[] = "Yahoo! Inc" +5982[] = "http://www.yahoo.com/" +5982[] = "bot_yahoo!slurp.png" +5982[] = "" +5982[] = "/list-of-ua/bot-detail?bot=Yahoo! JAPAN" +605[] = "Yandex/1.01.001 (compatible; Win16; I)" +605[] = "YandexBot" +605[] = "Yandex/1.01.001" +605[] = "http://yandex.com/bots" +605[] = "Yandex LLC" +605[] = "http://company.yandex.com/" +605[] = "bot_Yandex.png" +605[] = "" +605[] = "/list-of-ua/bot-detail?bot=YandexBot" +1458[] = "Yandex/1.01.001 (compatible; Win16; P)" +1458[] = "YandexBot" +1458[] = "Yandex/1.01.001" +1458[] = "http://yandex.com/bots" +1458[] = "Yandex LLC" +1458[] = "http://company.yandex.com/" +1458[] = "bot_Yandex.png" +1458[] = "" +1458[] = "/list-of-ua/bot-detail?bot=YandexBot" +1690[] = "YandexSomething/1.0" +1690[] = "YandexBot" +1690[] = "YandexSomething/1.0" +1690[] = "http://yandex.com/bots" +1690[] = "Yandex LLC" +1690[] = "http://company.yandex.com/" +1690[] = "bot_Yandex.png" +1690[] = "" +1690[] = "/list-of-ua/bot-detail?bot=YandexBot" +1869[] = "Yandex/1.01.001 (compatible; Win16; H)" +1869[] = "YandexBot" +1869[] = "Yandex/1.01.001" +1869[] = "http://yandex.com/bots" +1869[] = "Yandex LLC" +1869[] = "http://company.yandex.com/" +1869[] = "bot_Yandex.png" +1869[] = "" +1869[] = "/list-of-ua/bot-detail?bot=YandexBot" +1943[] = "Yandex/1.01.001 (compatible; Win16; m)" +1943[] = "YandexBot" +1943[] = "Yandex/1.01.001" +1943[] = "http://yandex.com/bots" +1943[] = "Yandex LLC" +1943[] = "http://company.yandex.com/" +1943[] = "bot_Yandex.png" +1943[] = "" +1943[] = "/list-of-ua/bot-detail?bot=YandexBot" +5010[] = "Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)" +5010[] = "YandexBot" +5010[] = "YandexBot/3.0" +5010[] = "http://yandex.com/bots" +5010[] = "Yandex LLC" +5010[] = "http://company.yandex.com/" +5010[] = "bot_Yandex.png" +5010[] = "" +5010[] = "/list-of-ua/bot-detail?bot=YandexBot" +5014[] = "Mozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots)" +5014[] = "YandexBot" +5014[] = "YandexImages/3.0" +5014[] = "http://yandex.com/bots" +5014[] = "Yandex LLC" +5014[] = "http://company.yandex.com/" +5014[] = "bot_Yandex.png" +5014[] = "" +5014[] = "/list-of-ua/bot-detail?bot=YandexBot" +5016[] = "Mozilla/5.0 (compatible; YandexBot/3.0; MirrorDetector; +http://yandex.com/bots)" +5016[] = "YandexBot" +5016[] = "YandexBot/3.0-MirrorDetector" +5016[] = "http://yandex.com/bots" +5016[] = "Yandex LLC" +5016[] = "http://company.yandex.com/" +5016[] = "bot_Yandex.png" +5016[] = "" +5016[] = "/list-of-ua/bot-detail?bot=YandexBot" +5090[] = "Mozilla/5.0 (compatible; YandexWebmaster/2.0; +http://yandex.com/bots)" +5090[] = "YandexBot" +5090[] = "YandexWebmaster/2.0" +5090[] = "http://yandex.com/bots" +5090[] = "Yandex LLC" +5090[] = "http://company.yandex.com/" +5090[] = "bot_Yandex.png" +5090[] = "" +5090[] = "/list-of-ua/bot-detail?bot=YandexBot" +1512[] = "Yanga WorldSearch Bot v1.1/beta (http://www.yanga.co.uk/)" +1512[] = "Yanga" +1512[] = "Yanga v1.1/beta" +1512[] = "http://yandex.com/bots" +1512[] = "Gigabase Ltd." +1512[] = "http://www.gigabase.com/" +1512[] = "bot.png" +1512[] = "" +1512[] = "/list-of-ua/bot-detail?bot=Yanga" +653[] = "YodaoBot/1.0 (http://www.yodao.com/help/webmaster/spider/; )" +653[] = "YodaoBot" +653[] = "YodaoBot/1.0" +653[] = "http://www.yodao.com/help/webmaster/spider/" +653[] = "Yodao" +653[] = "http://www.yodao.com/" +653[] = "bot.png" +653[] = "" +653[] = "/list-of-ua/bot-detail?bot=YodaoBot" +728[] = "Mozilla/5.0 (compatible; YodaoBot/1.0; http://www.yodao.com/help/webmaster/spider/; )" +728[] = "YodaoBot" +728[] = "YodaoBot/1.0" +728[] = "http://www.yodao.com/help/webmaster/spider/" +728[] = "yodao.com" +728[] = "http://www.yodao.com/" +728[] = "bot.png" +728[] = "" +728[] = "/list-of-ua/bot-detail?bot=YodaoBot" +1818[] = "Mozilla/5.0 (compatible;YodaoBot-Image/1.0;http://www.youdao.com/help/webmaster/spider/;)" +1818[] = "YodaoBot" +1818[] = "YodaoBot-Image/1.0" +1818[] = "http://www.youdao.com/help/webmaster/spider/" +1818[] = "youdao" +1818[] = "http://www.youdao.com/" +1818[] = "bot.png" +1818[] = "" +1818[] = "/list-of-ua/bot-detail?bot=YodaoBot" +891[] = "Mozilla/5.0 (compatible; Yoono; http://www.yoono.com/)" +891[] = "Yoono Bot" +891[] = "Yoono Bot" +891[] = "http://blog.yoono.com/blog/?page_id=40" +891[] = "Yoono Team" +891[] = "http://www.yoono.com/" +891[] = "bot.png" +891[] = "" +891[] = "/list-of-ua/bot-detail?bot=Yoono Bot" +1507[] = "Mozilla/5.0 (compatible; YoudaoBot/1.0; http://www.youdao.com/help/webmaster/spider/; )" +1507[] = "YoudaoBot" +1507[] = "YoudaoBot/1.0" +1507[] = "http://www.youdao.com/help/webmaster/spider/" +1507[] = "youdao.com" +1507[] = "http://www.youdao.com/" +1507[] = "bot.png" +1507[] = "" +1507[] = "/list-of-ua/bot-detail?bot=YoudaoBot" +1509[] = "YowedoBot/Yowedo 1.0 (Search Engine crawler for yowedo.com; http://yowedo.com/en/partners.html; crawler@yowedo.com)" +1509[] = "YowedoBot" +1509[] = "YowedoBot/1.0" +1509[] = "http://yowedo.com/en/partners.html" +1509[] = "yowedo.com" +1509[] = "http://yowedo.com/" +1509[] = "bot.png" +1509[] = "" +1509[] = "/list-of-ua/bot-detail?bot=YowedoBot" +5718[] = "yrspider (Mozilla/5.0 (compatible; YRSpider; +http://www.yunrang.com/yrspider.html))" +5718[] = "YRSpider" +5718[] = "YRSpider" +5718[] = "http://www.yunrang.com/yrspider.html" +5718[] = "yunrang" +5718[] = "http://www.yunrang.com/" +5718[] = "bot.png" +5718[] = "" +5718[] = "/list-of-ua/bot-detail?bot=YRSpider" +43[] = "ZACATEK_CZ_BOT (www.zacatek.cz)" +43[] = "ZACATEK_CZ" +43[] = "ZACATEK_CZ_BOT" +43[] = "http://www.zacatek.cz/" +43[] = "webprovider - Adam Haken" +43[] = "http://www.webprovider.cz/" +43[] = "bot.png" +43[] = "" +43[] = "/list-of-ua/bot-detail?bot=ZACATEK_CZ" +581[] = "Zeusbot/0.07 (Ulysseek's web-crawling robot; http://www.zeusbot.com; agent@zeusbot.com)" +581[] = "Zeusbot" +581[] = "Zeusbot/0.07" +581[] = "http://www.zeusbot.com/" +581[] = "Ulysseek" +581[] = "http://www.ulysseek.com/" +581[] = "bot.png" +581[] = "" +581[] = "/list-of-ua/bot-detail?bot=Zeusbot" +5655[] = "Zookabot/2.1;++http://zookabot.com" +5655[] = "ZookaBot" +5655[] = "ZookaBot/2.1" +5655[] = "http://zookabot.com/" +5655[] = "Hwacha ApS" +5655[] = "http://hwacha.dk/" +5655[] = "bot_Zookabot.png" +5655[] = "" +5655[] = "/list-of-ua/bot-detail?bot=ZookaBot" +5007[] = "Zookabot/2.0;++http://zookabot.com" +5007[] = "Zookabot" +5007[] = "Zookabot/2.0" +5007[] = "http://zookabot.com/" +5007[] = "Hwacha ApS" +5007[] = "http://hwacha.dk/" +5007[] = "bot_Zookabot.png" +5007[] = "" +5007[] = "/list-of-ua/bot-detail?bot=Zookabot" +6001[] = "Zookabot/2.2;++http://zookabot.com" +6001[] = "Zookabot" +6001[] = "Zookabot/2.2" +6001[] = "http://zookabot.com/" +6001[] = "Hwacha ApS" +6001[] = "http://hwacha.dk/" +6001[] = "bot_Zookabot.png" +6001[] = "" +6001[] = "/list-of-ua/bot-detail?bot=Zookabot" +913[] = "ZoomSpider - wrensoft.com [ZSEBOT]" +913[] = "ZoomSpider (ZSEBOT)" +913[] = "ZoomSpider (ZSEBOT)" +913[] = "http://wrensoft.com/zoom/support/useragent.html" +913[] = "PassMark Software Pty Ltd." +913[] = "http://www.passmark.com/" +913[] = "bot.png" +913[] = "" +913[] = "/list-of-ua/bot-detail?bot=ZoomSpider (ZSEBOT)" +140[] = "Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker (wn.dlc@looksmart.net; http://www.WISEnutbot.com)" +140[] = "ZyBorg" +140[] = "ZyBorg/1.0 Dead Link Checker" +140[] = "http://www.wisenutbot.com/" +140[] = "LookSmart, Ltd." +140[] = "http://aboutus.looksmart.com/" +140[] = "bot.png" +140[] = "" +140[] = "/list-of-ua/bot-detail?bot=ZyBorg" +159[] = "Mozilla/4.0 compatible ZyBorg/1.0 (wn-14.zyborg@looksmart.net; http://www.WISEnutbot.com)" +159[] = "ZyBorg" +159[] = "ZyBorg/1.0" +159[] = "http://www.wisenutbot.com/" +159[] = "LookSmart, Ltd." +159[] = "http://aboutus.looksmart.com/" +159[] = "bot.png" +159[] = "" +159[] = "/list-of-ua/bot-detail?bot=ZyBorg" +401[] = "Mozilla/4.0 compatible ZyBorg/1.0 (wn-16.zyborg@looksmart.net; http://www.WISEnutbot.com)" +401[] = "ZyBorg" +401[] = "ZyBorg/1.0 - b" +401[] = "http://www.wisenutbot.com/" +401[] = "LookSmart, Ltd." +401[] = "http://aboutus.looksmart.com/" +401[] = "bot.png" +401[] = "" +401[] = "/list-of-ua/bot-detail?bot=ZyBorg" +3441[] = "^Nail (http://CaretNail.com)" +3441[] = "^Nail" +3441[] = "^Nail" +3441[] = "http://caret.us.com/caretnail/index.html" +3441[] = "HydraByte, Inc." +3441[] = "http://www.hydrabyte.com/" +3441[] = "bot_Nail.png" +3441[] = "" +3441[] = "/list-of-ua/bot-detail?bot=^Nail" +[os] +; os_id[] = "OS Family" +; os_id[] = "OS Name" +; os_id[] = "OS URL" +; os_id[] = "OS Company" +; os_id[] = "OS Company URL" +; os_id[] = "OS ico" +1[] = "Windows" +1[] = "Windows XP" +1[] = "http://www.microsoft.com/windowsxp/default.mspx" +1[] = "Microsoft Corporation." +1[] = "http://www.microsoft.com/" +1[] = "windowsxp.png" +2[] = "Windows" +2[] = "Windows 2000" +2[] = "http://www.microsoft.com/windows2000/default.mspx" +2[] = "Microsoft Corporation." +2[] = "http://www.microsoft.com/" +2[] = "windows.png" +3[] = "Windows" +3[] = "Windows 2003 Server" +3[] = "http://www.microsoft.com/windowsserver2003/default.mspx" +3[] = "Microsoft Corporation." +3[] = "http://www.microsoft.com/" +3[] = "windowsxp.png" +4[] = "Windows" +4[] = "Windows 95" +4[] = "http://www.microsoft.com/windows95/" +4[] = "Microsoft Corporation." +4[] = "http://www.microsoft.com/" +4[] = "windows.png" +5[] = "Windows" +5[] = "Windows 98" +5[] = "http://www.microsoft.com/windows98/" +5[] = "Microsoft Corporation." +5[] = "http://www.microsoft.com/" +5[] = "windows.png" +6[] = "Windows" +6[] = "Windows 3.x" +6[] = "http://www.microsoft.com/windows/" +6[] = "Microsoft Corporation." +6[] = "http://www.microsoft.com/" +6[] = "windows.png" +7[] = "Windows" +7[] = "Windows CE" +7[] = "http://www.microsoft.com/windows/embedded/default.mspx" +7[] = "Microsoft Corporation." +7[] = "http://www.microsoft.com/" +7[] = "windowsce.png" +8[] = "Windows" +8[] = "Windows ME" +8[] = "http://www.microsoft.com/WindowsMe/" +8[] = "Microsoft Corporation." +8[] = "http://www.microsoft.com/" +8[] = "windows.png" +9[] = "Windows" +9[] = "Windows Vista" +9[] = "http://www.microsoft.com/windowsvista/" +9[] = "Microsoft Corporation." +9[] = "http://www.microsoft.com/" +9[] = "windowsvista.png" +10[] = "JVM" +10[] = "JVM (Platform Micro Edition)" +10[] = "http://java.sun.com/" +10[] = "Sun Microsystems, Inc." +10[] = "http://www.sun.com/" +10[] = "java.png" +11[] = "Linux" +11[] = "Linux (CentOS)" +11[] = "http://www.centos.org/" +11[] = "" +11[] = "http://www.centos.org/" +11[] = "linux_centos.png" +12[] = "Linux" +12[] = "Linux (Ubuntu)" +12[] = "http://www.ubuntulinux.org/" +12[] = "Canonical Ltd." +12[] = "http://www.canonical.com/" +12[] = "linux_ubuntu.png" +13[] = "Linux" +13[] = "Linux (Debian)" +13[] = "http://www.debian.org/" +13[] = "Software in the Public Interest, Inc." +13[] = "http://www.spi-inc.org/" +13[] = "linux_debian.png" +14[] = "Linux" +14[] = "Linux (Fedora)" +14[] = "http://fedora.redhat.com/" +14[] = "Red Hat, Inc." +14[] = "http://www.redhat.com/" +14[] = "linux_fedora.png" +15[] = "Linux" +15[] = "Linux (Gentoo)" +15[] = "http://www.gentoo.org/" +15[] = "Gentoo Foundation, Inc." +15[] = "http://www.gentoo.org/foundation/en/" +15[] = "linux_gentoo.png" +16[] = "Linux" +16[] = "Linux (Linspire)" +16[] = "http://en.wikipedia.org/wiki/Linspire" +16[] = "Linspire, Inc." +16[] = "http://www.linspire.com/" +16[] = "linux_linspire.png" +17[] = "Linux" +17[] = "Linux (Mandriva)" +17[] = "http://www.mandriva.com/" +17[] = "" +17[] = "" +17[] = "linux_mandriva.png" +18[] = "Linux" +18[] = "Linux (RedHat)" +18[] = "http://www.redhat.com/rhel/" +18[] = "Red Hat, Inc." +18[] = "http://www.redhat.com/" +18[] = "linux_redhat.png" +19[] = "Linux" +19[] = "Linux" +19[] = "http://en.wikipedia.org/wiki/Linux" +19[] = "" +19[] = "" +19[] = "linux.png" +20[] = "Linux" +20[] = "Linux (Slackware)" +20[] = "http://www.slackware.com/" +20[] = "Slackware Linux, Inc." +20[] = "" +20[] = "linux_slackware.png" +21[] = "Linux" +21[] = "Linux (Kanotix)" +21[] = "http://kanotix.com/" +21[] = "" +21[] = "" +21[] = "linux_kanotix.png" +22[] = "Linux" +22[] = "Linux (SUSE)" +22[] = "http://www.novell.com/linux/" +22[] = "Novell, Inc." +22[] = "http://www.novell.com/" +22[] = "linux_suse.png" +23[] = "Linux" +23[] = "Linux (Knoppix)" +23[] = "http://www.knoppix.net/" +23[] = "Klaus Knopper" +23[] = "http://www.knopper.net/knopper/" +23[] = "linux_knoppix.png" +24[] = "BSD" +24[] = "NetBSD" +24[] = "http://www.netbsd.org/" +24[] = "NetBSD Foundation, Inc." +24[] = "" +24[] = "netbsd.png" +25[] = "BSD" +25[] = "FreeBSD" +25[] = "http://www.freebsd.org/" +25[] = "FreeBSD Foundation" +25[] = "http://www.freebsdfoundation.org/" +25[] = "freebsd.png" +26[] = "BSD" +26[] = "OpenBSD" +26[] = "http://www.openbsd.org/" +26[] = "" +26[] = "" +26[] = "openbsd.png" +29[] = "Solaris" +29[] = "Solaris" +29[] = "http://www.sun.com/software/solaris/" +29[] = "Sun Microsystems, Inc. (now Oracle Corporation)" +29[] = "http://www.oracle.com/" +29[] = "solaris.png" +30[] = "Amiga OS" +30[] = "Amiga OS" +30[] = "http://www.amiga.com/amigaos/" +30[] = "Amiga, Inc." +30[] = "http://www.amiga.com/" +30[] = "amiga.png" +31[] = "IRIX" +31[] = "IRIX" +31[] = "http://www.sgi.com/products/software/irix/" +31[] = "Silicon Graphics, Inc." +31[] = "http://www.sgi.com/" +31[] = "irix.png" +32[] = "OpenVMS" +32[] = "OpenVMS" +32[] = "http://h71000.www7.hp.com/" +32[] = "Hewlett-Packard Development Company, L.P." +32[] = "http://www.hp.com/" +32[] = "openvms.png" +33[] = "BeOS" +33[] = "BeOS" +33[] = "" +33[] = "Be, Inc." +33[] = "http://www.beincorporated.com/" +33[] = "beos.png" +34[] = "Symbian OS" +34[] = "Symbian OS" +34[] = "http://www.symbian.org/" +34[] = "Symbian Foundation" +34[] = "http://www.symbian.org/" +34[] = "symbian.png" +35[] = "Palm OS" +35[] = "Palm OS" +35[] = "http://en.wikipedia.org/wiki/Palm_OS" +35[] = "Palm, Inc." +35[] = "http://www.palm.com/" +35[] = "palmos.png" +37[] = "Windows" +37[] = "MSN TV (WebTV)" +37[] = "http://www.msntv.com/" +37[] = "Microsoft Corporation." +37[] = "http://www.microsoft.com/" +37[] = "webtv.png" +39[] = "OS/2" +39[] = "OS/2 Warp" +39[] = "http://www-306.ibm.com/software/os/warp/" +39[] = "IBM Corporation" +39[] = "http://www.ibm.com/" +39[] = "os2warp.png" +40[] = "RISK OS" +40[] = "RISK OS" +40[] = "" +40[] = "RISCOS Ltd" +40[] = "http://www.riscos.com/" +40[] = "riskos.png" +41[] = "HP-UX" +41[] = "HP-UX" +41[] = "http://www.hp.com/products1/unix/" +41[] = "Hewlett-Packard Development Company, L.P." +41[] = "http://www.hp.com/" +41[] = "hpux.png" +42[] = "Nintendo" +42[] = "Nintendo Wii" +42[] = "http://wii.nintendo.com/" +42[] = "Nintendo of America Inc." +42[] = "http://www.nintendo.com/" +42[] = "wii.png" +43[] = "Windows" +43[] = "Windows" +43[] = "http://www.microsoft.com/windows/" +43[] = "Microsoft Corporation." +43[] = "http://www.microsoft.com/" +43[] = "windows.png" +44[] = "Mac OS" +44[] = "Mac OS" +44[] = "http://en.wikipedia.org/wiki/Mac_OS" +44[] = "Apple Computer, Inc." +44[] = "http://www.apple.com/" +44[] = "macos.png" +45[] = "AIX" +45[] = "AIX" +45[] = "http://www.ibm.com/aix/" +45[] = "IBM Corporation" +45[] = "http://www.ibm.com/" +45[] = "aix.png" +46[] = "Windows" +46[] = "Windows NT" +46[] = "http://www.microsoft.com/windows/" +46[] = "Microsoft Corporation." +46[] = "http://www.microsoft.com/" +46[] = "windows.png" +47[] = "JVM" +47[] = "JVM (Java)" +47[] = "http://java.sun.com/" +47[] = "Sun Microsystems, Inc." +47[] = "http://www.sun.com/" +47[] = "java.png" +49[] = "Plan 9" +49[] = "Plan 9" +49[] = "http://plan9.bell-labs.com/plan9/" +49[] = "Lucent Technologies" +49[] = "http://www.lucent.com/" +49[] = "plan9.png" +50[] = "RIM OS" +50[] = "RIM OS" +50[] = "http://www.blackberry.com/" +50[] = "Research In Motion Limited" +50[] = "http://www.rim.com/" +50[] = "mobile.png" +52[] = "QNX" +52[] = "QNX x86pc" +52[] = "http://www.qnx.com/" +52[] = "QNX Software Systems" +52[] = "http://www.qnx.com/" +52[] = "qnx.png" +53[] = "MorphOS" +53[] = "MorphOS" +53[] = "http://www.morphos.org/" +53[] = "MorphOS development team" +53[] = "" +53[] = "morphos.png" +55[] = "Linux" +55[] = "Linux (VectorLinux)" +55[] = "http://vectorlinux.com/" +55[] = "Robert S. Lange" +55[] = "" +55[] = "linux_vector.png" +56[] = "Linux" +56[] = "Linux (Mint)" +56[] = "http://linuxmint.com/" +56[] = "clem" +56[] = "" +56[] = "linuxmint.png" +57[] = "SCO" +57[] = "SCO OpenServer" +57[] = "http://www.sco.com/products/openserver/" +57[] = "The SCO Group" +57[] = "http://www.sco.com/" +57[] = "sco.png" +58[] = "Linux" +58[] = "Linux (Arch Linux)" +58[] = "http://archlinux.org/" +58[] = "Judd Vinet" +58[] = "http://www.zeroflux.org/" +58[] = "linux_archlinux.png" +59[] = "SkyOS" +59[] = "SkyOS" +59[] = "http://www.skyos.org/" +59[] = "SkyOS Team" +59[] = "http://www.skyos.org/" +59[] = "skyos.png" +61[] = "BSD" +61[] = "DragonFly BSD" +61[] = "http://www.dragonflybsd.org/" +61[] = "DragonFly BSD Team" +61[] = "http://www.dragonflybsd.org/team/" +61[] = "dragonflybsd.png" +62[] = "Linux" +62[] = "Android" +62[] = "http://www.openhandsetalliance.com/android_overview.html" +62[] = "Open Handset Alliance" +62[] = "http://www.openhandsetalliance.com/" +62[] = "android.png" +64[] = "Windows" +64[] = "Windows 7" +64[] = "http://www.microsoft.com/windows/windows-7/" +64[] = "Microsoft Corporation." +64[] = "http://www.microsoft.com/" +64[] = "windows-7.png" +65[] = "iPhone OS" +65[] = "iPhone OS" +65[] = "http://developer.apple.com/iphone/" +65[] = "Apple Inc." +65[] = "http://www.apple.com/" +65[] = "iphone.png" +69[] = "Palm OS" +69[] = "webOS" +69[] = "http://developer.palm.com/" +69[] = "Palm, Inc." +69[] = "http://www.palm.com/" +69[] = "palmos.png" +70[] = "Haiku OS" +70[] = "Haiku OS" +70[] = "http://www.haiku-os.org/" +70[] = "Haiku Inc." +70[] = "http://www.haiku-os.org/about/haiku_inc" +70[] = "haiku.png" +72[] = "DangerOS" +72[] = "Danger Hiptop" +72[] = "http://developer.danger.com/" +72[] = "Danger, Inc." +72[] = "http://www.danger.com/" +72[] = "dangeros.png" +74[] = "Syllable" +74[] = "Syllable" +74[] = "http://syllable.org/" +74[] = "Kristian Van Der Vliet, Kaj de Vos, Rick Caudill, Arno Klenke, Henrik Isaksson" +74[] = "" +74[] = "syllable.png" +75[] = "Linux" +75[] = "Linux (Maemo)" +75[] = "http://maemo.org/" +75[] = "Nokia" +75[] = "http://www.nokia.com/" +75[] = "maemo.png" +83[] = "Mac OS X" +83[] = "Mac OS X 10.4 Tiger" +83[] = "http://www.apple.com/macosx/" +83[] = "Apple Computer, Inc." +83[] = "http://www.apple.com/" +83[] = "macosx.png" +84[] = "Mac OS X" +84[] = "Mac OS X 10.5 Leopard" +84[] = "http://www.apple.com/macosx/" +84[] = "Apple Computer, Inc." +84[] = "http://www.apple.com/" +84[] = "macosx.png" +85[] = "Mac OS X" +85[] = "Mac OS X 10.6 Snow Leopard" +85[] = "http://www.apple.com/macosx/" +85[] = "Apple Computer, Inc." +85[] = "http://www.apple.com/" +85[] = "macosx.png" +86[] = "Mac OS X" +86[] = "Mac OS X" +86[] = "http://www.apple.com/macosx/" +86[] = "Apple Computer, Inc." +86[] = "http://www.apple.com/" +86[] = "macosx.png" +87[] = "OS/2" +87[] = "OS/2" +87[] = "http://en.wikipedia.org/wiki/OS/2" +87[] = "IBM Corporation" +87[] = "http://www.ibm.com/" +87[] = "os2.png" +88[] = "Windows" +88[] = "Windows Mobile" +88[] = "http://www.microsoft.com/windowsmobile/en-us/default.mspx" +88[] = "Microsoft Corporation." +88[] = "http://www.microsoft.com/" +88[] = "windowsMobile.png" +90[] = "Mac OS X" +90[] = "Mac OS X 10.3 Panther" +90[] = "http://www.apple.com/macosx/" +90[] = "Apple Computer, Inc." +90[] = "http://www.apple.com/" +90[] = "macosx.png" +91[] = "MINIX" +91[] = "MINIX 3 " +91[] = "http://www.minix3.org/" +91[] = "Andrew S. Tanenbaum" +91[] = "http://www.cs.vu.nl/~ast/" +91[] = "minix.png" +92[] = "Linux" +92[] = "PClinuxOS" +92[] = "http://pclinuxos.com/" +92[] = "PCLinuxOS community" +92[] = "" +92[] = "pclinuxos.png" +93[] = "Linux" +93[] = "Jolicloud" +93[] = "http://www.jolicloud.com/" +93[] = "Tariq Krim and Romain Huet" +93[] = "" +93[] = "jolicloud.png" +94[] = "XrossMediaBar (XMB)" +94[] = "XrossMediaBar (XMB)" +94[] = "http://en.wikipedia.org/wiki/XrossMediaBar" +94[] = "Sony Computer Entertainment" +94[] = "http://www.scei.co.jp/" +94[] = "XMB.png" +95[] = "AROS" +95[] = "AROS" +95[] = "http://www.aros.org/" +95[] = "AROS Development Team" +95[] = "" +95[] = "aros.png" +96[] = "Windows" +96[] = "Windows Phone 7" +96[] = "http://www.windowsphone7.com/" +96[] = "Microsoft Corporation." +96[] = "http://www.microsoft.com/" +96[] = "windowsMobile.png" +97[] = "Linux" +97[] = "Chromium OS" +97[] = "http://sites.google.com/a/chromium.org/dev/chromium-os" +97[] = "Google Inc." +97[] = "http://www.google.com/" +97[] = "ChromiumOS.png" +98[] = "Nintendo" +98[] = "Nintendo DS" +98[] = "http://www.nintendods.com/" +98[] = "Nintendo of America Inc." +98[] = "http://www.nintendo.com/" +98[] = "nintendo_ds.png" +99[] = "Linux" +99[] = "GNU OS" +99[] = "http://www.gnu.org/" +99[] = "Free Software Foundation, Inc." +99[] = "http://www.fsf.org/" +99[] = "gnu_os.png" +[browser] +; browser_id[] = "Browser type" +; browser_id[] = "Browser Name" +; browser_id[] = "Browser URL" +; browser_id[] = "Browser Company" +; browser_id[] = "Browser Company URL" +; browser_id[] = "Browser ico" +; browser_id[] = "Browser info URL" +1[] = "0" +1[] = "Camino" +1[] = "http://www.caminobrowser.org/" +1[] = "Mozilla Foundation" +1[] = "http://www.mozilla.org/" +1[] = "camino.png" +1[] = "/list-of-ua/browser-detail?browser=Camino" +2[] = "0" +2[] = "SeaMonkey" +2[] = "http://www.mozilla.org/projects/seamonkey/" +2[] = "Mozilla Foundation" +2[] = "http://www.mozilla.org/" +2[] = "seamonkey.png" +2[] = "/list-of-ua/browser-detail?browser=SeaMonkey" +3[] = "0" +3[] = "Firefox" +3[] = "http://www.mozilla.org/products/firefox/" +3[] = "Mozilla Foundation" +3[] = "http://www.mozilla.org/" +3[] = "firefox.png" +3[] = "/list-of-ua/browser-detail?browser=Firefox" +4[] = "0" +4[] = "Netscape Navigator" +4[] = "http://browser.netscape.com/" +4[] = "Netscape Communications Corp." +4[] = "http://www.netscape.com/" +4[] = "netscape.png" +4[] = "/list-of-ua/browser-detail?browser=Netscape Navigator" +5[] = "0" +5[] = "Epiphany" +5[] = "http://www.gnome.org/projects/epiphany/" +5[] = "GNOME Foundation" +5[] = "http://www.gnome.org/" +5[] = "epiphany.png" +5[] = "/list-of-ua/browser-detail?browser=Epiphany" +6[] = "0" +6[] = "Galeon" +6[] = "http://galeon.sourceforge.net/" +6[] = "GNOME Foundation" +6[] = "http://www.gnome.org/" +6[] = "galeon.png" +6[] = "/list-of-ua/browser-detail?browser=Galeon" +7[] = "0" +7[] = "Flock" +7[] = "http://www.flock.com/" +7[] = "Flock, Inc." +7[] = "http://www.flock.com/" +7[] = "flock.png" +7[] = "/list-of-ua/browser-detail?browser=Flock" +8[] = "3" +8[] = "Minimo" +8[] = "http://www.mozilla.org/projects/minimo/" +8[] = "Mozilla Foundation" +8[] = "http://www.mozilla.org/" +8[] = "minimo.png" +8[] = "/list-of-ua/browser-detail?browser=Minimo" +9[] = "0" +9[] = "K-Meleon" +9[] = "http://kmeleon.sourceforge.net/" +9[] = "Adnrew Mutch" +9[] = "http://tln.lib.mi.us/~amutch/" +9[] = "k-meleon.png" +9[] = "/list-of-ua/browser-detail?browser=K-Meleon" +10[] = "0" +10[] = "K-Ninja" +10[] = "http://www.geocities.com/grenleef/" +10[] = "" +10[] = "" +10[] = "k-ninja.png" +10[] = "/list-of-ua/browser-detail?browser=K-Ninja" +11[] = "0" +11[] = "Kazehakase" +11[] = "http://kazehakase.sourceforge.jp/" +11[] = "" +11[] = "" +11[] = "kazehakase.png" +11[] = "/list-of-ua/browser-detail?browser=Kazehakase" +14[] = "0" +14[] = "Firebird (old name for Firefox)" +14[] = "http://www.mozilla.org/products/firefox/" +14[] = "Mozilla Foundation" +14[] = "http://www.mozilla.org/" +14[] = "phoenix.png" +14[] = "/list-of-ua/browser-detail?browser=Firebird (old name for Firefox)" +15[] = "0" +15[] = "Phoenix (old name for Firefox)" +15[] = "http://www.mozilla.org/products/firefox/" +15[] = "Mozilla Foundation" +15[] = "http://www.mozilla.org/" +15[] = "phoenix.png" +15[] = "/list-of-ua/browser-detail?browser=Phoenix (old name for Firefox)" +16[] = "0" +16[] = "Konqueror" +16[] = "http://www.konqueror.org/" +16[] = "KDE e.V." +16[] = "http://ev.kde.org/" +16[] = "konqueror2.png" +16[] = "/list-of-ua/browser-detail?browser=Konqueror" +17[] = "0" +17[] = "Opera" +17[] = "http://www.opera.com/" +17[] = "Opera Software ASA." +17[] = "http://www.opera.com/" +17[] = "opera.png" +17[] = "/list-of-ua/browser-detail?browser=Opera" +18[] = "0" +18[] = "OmniWeb" +18[] = "http://www.omnigroup.com/applications/omniweb/" +18[] = "Omni Development, Inc." +18[] = "http://www.omnigroup.com/" +18[] = "omniweb.png" +18[] = "/list-of-ua/browser-detail?browser=OmniWeb" +19[] = "0" +19[] = "Sunrise" +19[] = "http://www.sunrisebrowser.com/" +19[] = "" +19[] = "" +19[] = "sunrise.png" +19[] = "/list-of-ua/browser-detail?browser=Sunrise" +21[] = "0" +21[] = "Shiira" +21[] = "http://shiira.jp/en" +21[] = "Shiira Project" +21[] = "http://shiira.jp/en" +21[] = "shiira.png" +21[] = "/list-of-ua/browser-detail?browser=Shiira" +22[] = "0" +22[] = "Safari" +22[] = "http://en.wikipedia.org/wiki/Safari_%28web_browser%29" +22[] = "Apple Inc." +22[] = "http://www.apple.com/" +22[] = "safari.png" +22[] = "/list-of-ua/browser-detail?browser=Safari" +23[] = "0" +23[] = "Dillo" +23[] = "http://www.dillo.org/" +23[] = "" +23[] = "" +23[] = "dillo.png" +23[] = "/list-of-ua/browser-detail?browser=Dillo" +24[] = "0" +24[] = "iCab" +24[] = "http://www.icab.de/" +24[] = "Alexander Clauss" +24[] = "" +24[] = "icab.png" +24[] = "/list-of-ua/browser-detail?browser=iCab" +25[] = "0" +25[] = "Lynx" +25[] = "http://lynx.isc.org/" +25[] = "" +25[] = "" +25[] = "lynx.png" +25[] = "/list-of-ua/browser-detail?browser=Lynx" +27[] = "0" +27[] = "Elinks" +27[] = "http://elinks.or.cz/" +27[] = "Mikulas Patocka" +27[] = "" +27[] = "elinks.png" +27[] = "/list-of-ua/browser-detail?browser=Elinks" +28[] = "1" +28[] = "Wget" +28[] = "http://www.gnu.org/software/wget/" +28[] = "Free Software Foundation, Inc." +28[] = "http://www.gnu.org/" +28[] = "wget.png" +28[] = "/list-of-ua/browser-detail?browser=Wget" +29[] = "0" +29[] = "Amiga Aweb" +29[] = "http://aweb.sunsite.dk/" +29[] = "AmiTrix Development Inc." +29[] = "http://www.amitrix.com/" +29[] = "aweb.png" +29[] = "/list-of-ua/browser-detail?browser=Amiga Aweb" +30[] = "0" +30[] = "Amiga Voyager" +30[] = "http://v3.vapor.com/" +30[] = "VaporWare" +30[] = "http://www.vapor.com/" +30[] = "voyager.png" +30[] = "/list-of-ua/browser-detail?browser=Amiga Voyager" +31[] = "0" +31[] = "IBrowse" +31[] = "http://www.ibrowse-dev.net/" +31[] = "Omnipresence Intl." +31[] = "http://www.omnipresence.com/" +31[] = "ibrowse.png" +31[] = "/list-of-ua/browser-detail?browser=IBrowse" +32[] = "3" +32[] = "Openwave Mobile Browser" +32[] = "http://www.openwave.com/" +32[] = "Openwave Systems Inc." +32[] = "http://www.openwave.com/" +32[] = "openwave.png" +32[] = "/list-of-ua/browser-detail?browser=Openwave Mobile Browser" +33[] = "3" +33[] = "NetFront" +33[] = "http://www.access-company.com/" +33[] = "ACCESS CO.,LTD" +33[] = "http://www.access-company.com/" +33[] = "netfront.png" +33[] = "/list-of-ua/browser-detail?browser=NetFront" +35[] = "0" +35[] = "IE" +35[] = "http://www.microsoft.com/ie/" +35[] = "Microsoft Corporation." +35[] = "http://www.microsoft.com/" +35[] = "msie.png" +35[] = "/list-of-ua/browser-detail?browser=IE" +39[] = "1" +39[] = "Offline Explorer" +39[] = "http://www.metaproducts.com/" +39[] = "MetaProducts Corporation." +39[] = "" +39[] = "offline_explorer.png" +39[] = "/list-of-ua/browser-detail?browser=Offline Explorer" +40[] = "0" +40[] = "AOL Explorer" +40[] = "http://daol.aol.com/software/" +40[] = "America Online, Inc." +40[] = "http://www.aol.com/" +40[] = "aol.png" +40[] = "/list-of-ua/browser-detail?browser=AOL Explorer" +41[] = "0" +41[] = "Avant Browser" +41[] = "http://avantbrowser.com/" +41[] = "Avant Force" +41[] = "http://avantbrowser.com/" +41[] = "avantbrowser.png" +41[] = "/list-of-ua/browser-detail?browser=Avant Browser" +42[] = "1" +42[] = "AvantGo" +42[] = "http://www.avantgo.com/" +42[] = "Sybase Inc." +42[] = "http://www.sybase.com/" +42[] = "avantgo.png" +42[] = "/list-of-ua/browser-detail?browser=AvantGo" +43[] = "3" +43[] = "Blazer" +43[] = "http://en.wikipedia.org/wiki/Blazer_(web_browser)" +43[] = "Palm. Inc." +43[] = "http://www.palm.com/" +43[] = "blazer.png" +43[] = "/list-of-ua/browser-detail?browser=Blazer" +44[] = "0" +44[] = "Crazy Browser" +44[] = "http://www.crazybrowser.com/" +44[] = "CrazyBrowser.com" +44[] = "http://www.crazybrowser.com/" +44[] = "crazybrowser.png" +44[] = "/list-of-ua/browser-detail?browser=Crazy Browser" +45[] = "0" +45[] = "Deepnet Explorer" +45[] = "http://www.deepnetexplorer.com/" +45[] = "Deepnet Technologies Ltd" +45[] = "http://www.deepnetexplorer.com/" +45[] = "deepnet.png" +45[] = "/list-of-ua/browser-detail?browser=Deepnet Explorer" +46[] = "1" +46[] = "HTTrack" +46[] = "http://www.httrack.com/" +46[] = "Xavier Roche" +46[] = "http://www.httrack.com/" +46[] = "httrack.png" +46[] = "/list-of-ua/browser-detail?browser=HTTrack" +47[] = "0" +47[] = "IceWeasel" +47[] = "http://www.gnu.org/software/gnuzilla/" +47[] = "Software in the Public Interest, Inc." +47[] = "http://www.spi-inc.org/" +47[] = "iceweasel.png" +47[] = "/list-of-ua/browser-detail?browser=IceWeasel" +48[] = "0" +48[] = "iRider" +48[] = "http://www.irider.com/irider/index.htm" +48[] = "Wymea Bay" +48[] = "http://www.irider.com/company/index.htm" +48[] = "irider.png" +48[] = "/list-of-ua/browser-detail?browser=iRider" +49[] = "1" +49[] = "iSiloX" +49[] = "http://www.isilox.com/" +49[] = "DC & Co." +49[] = "http://www.isilox.com/" +49[] = "isilox.png" +49[] = "/list-of-ua/browser-detail?browser=iSiloX" +50[] = "0" +50[] = "KKman" +50[] = "http://www.kkman.com/" +50[] = "Skysoft Co., Ltd." +50[] = "http://www.skysoft.com.tw/" +50[] = "kkman.png" +50[] = "/list-of-ua/browser-detail?browser=KKman" +51[] = "5" +51[] = "libwww-perl" +51[] = "http://search.cpan.org/dist/libwww-perl/" +51[] = "Gisle Aas" +51[] = "" +51[] = "libwwwperl.png" +51[] = "/list-of-ua/browser-detail?browser=libwww-perl" +52[] = "0" +52[] = "Lunascape" +52[] = "http://www.lunascape.tv/" +52[] = "Lunascape & Co., Ltd." +52[] = "http://www.lunascape.co.jp/" +52[] = "lunascape.png" +52[] = "/list-of-ua/browser-detail?browser=Lunascape" +53[] = "0" +53[] = "Maxthon" +53[] = "http://www.maxthon.com/" +53[] = "Maxthon International Limited." +53[] = "http://www.maxthon.com/" +53[] = "maxthon.png" +53[] = "/list-of-ua/browser-detail?browser=Maxthon" +54[] = "0" +54[] = "Mozilla" +54[] = "http://www.mozilla.org/projects/browsers.html" +54[] = "Mozilla Foundation" +54[] = "http://www.mozilla.com/" +54[] = "mozilla.png" +54[] = "/list-of-ua/browser-detail?browser=Mozilla" +55[] = "0" +55[] = "MultiZilla" +55[] = "http://multizilla.mozdev.org/" +55[] = "HJ van Rantwijk" +55[] = "http://multizilla.mozdev.org/" +55[] = "multizilla.png" +55[] = "/list-of-ua/browser-detail?browser=MultiZilla" +56[] = "0" +56[] = "NetCaptor" +56[] = "http://www.netcaptor.com/" +56[] = "Stilesoft Inc." +56[] = "http://www.netcaptor.com/" +56[] = "netcaptor.png" +56[] = "/list-of-ua/browser-detail?browser=NetCaptor" +57[] = "0" +57[] = "NetBox" +57[] = "http://www.netgem.com/" +57[] = "Netgem" +57[] = "http://www.netgem.com/" +57[] = "netgem.png" +57[] = "/list-of-ua/browser-detail?browser=NetBox" +58[] = "0" +58[] = "NetSurf" +58[] = "http://www.netsurf-browser.org/" +58[] = "NetSurf's Development Team" +58[] = "http://www.netsurf-browser.org/about/team" +58[] = "netsurf.png" +58[] = "/list-of-ua/browser-detail?browser=NetSurf" +59[] = "0" +59[] = "Sleipnir" +59[] = "http://www.fenrir.co.jp/sleipnir/" +59[] = "Fenrir Inc." +59[] = "http://www.fenrir-inc.com/" +59[] = "sleipnir.png" +59[] = "/list-of-ua/browser-detail?browser=Sleipnir" +61[] = "0" +61[] = "Swiftfox" +61[] = "http://www.getswiftfox.com/" +61[] = "Jason Halme" +61[] = "" +61[] = "swiftfox.png" +61[] = "/list-of-ua/browser-detail?browser=Swiftfox" +62[] = "1" +62[] = "Teleport Pro" +62[] = "http://www.tenmax.com/teleport/pro/home.htm" +62[] = "Tennyson Maxwell Information Systems, Inc." +62[] = "http://www.tenmax.com/" +62[] = "teleportpro.png" +62[] = "/list-of-ua/browser-detail?browser=Teleport Pro" +71[] = "1" +71[] = "WebCopier" +71[] = "http://www.maximumsoft.com/products/wc_index.html" +71[] = "MaximumSoft Corp." +71[] = "http://www.maximumsoft.com/" +71[] = "webcopier.png" +71[] = "/list-of-ua/browser-detail?browser=WebCopier" +74[] = "0" +74[] = "Phaseout" +74[] = "http://www.phaseout.net/" +74[] = "PhaseOut.net" +74[] = "http://www.phaseout.net/" +74[] = "phaseout.png" +74[] = "/list-of-ua/browser-detail?browser=Phaseout" +79[] = "4" +79[] = "Thunderbird" +79[] = "http://www.mozilla.com/en-US/thunderbird/" +79[] = "Mozilla Foundation" +79[] = "http://www.mozilla.org/" +79[] = "thunderbird.png" +79[] = "/list-of-ua/browser-detail?browser=Thunderbird" +81[] = "0" +81[] = "Doris" +81[] = "http://www.anygraaf.fi/browser/indexe.htm" +81[] = "Anygraaf" +81[] = "http://www.anygraaf.fi/" +81[] = "doris.png" +81[] = "/list-of-ua/browser-detail?browser=Doris" +82[] = "0" +82[] = "Enigma browser" +82[] = "http://www.suttondesigns.com/" +82[] = "Advanced Search Technologies, Inc." +82[] = "http://www.advancedsearchcorp.com/" +82[] = "enigmabrowser.png" +82[] = "/list-of-ua/browser-detail?browser=Enigma browser" +85[] = "5" +85[] = "Jakarta Commons-HttpClient" +85[] = "http://jakarta.apache.org/commons/httpclient/" +85[] = "Apache Software Foundation" +85[] = "http://www.apache.org/" +85[] = "jakarta.png" +85[] = "/list-of-ua/browser-detail?browser=Jakarta Commons-HttpClient" +86[] = "5" +86[] = "cURL" +86[] = "http://curl.haxx.se/" +86[] = "team Haxx" +86[] = "http://www.haxx.se/" +86[] = "curl.png" +86[] = "/list-of-ua/browser-detail?browser=cURL" +87[] = "0" +87[] = "Amaya" +87[] = "http://www.w3.org/Amaya/" +87[] = "World Wide Web Consortium" +87[] = "http://www.w3.org/" +87[] = "amaya.png" +87[] = "/list-of-ua/browser-detail?browser=Amaya" +88[] = "1" +88[] = "GetRight" +88[] = "http://www.getright.com/" +88[] = "Headlight Software, Inc." +88[] = "http://www.headlightinc.com/" +88[] = "getright.png" +88[] = "/list-of-ua/browser-detail?browser=GetRight" +89[] = "0" +89[] = "Off By One" +89[] = "http://offbyone.com/" +89[] = "Home Page Software Inc." +89[] = "http://homepagesw.com/" +89[] = "offbyone.png" +89[] = "/list-of-ua/browser-detail?browser=Off By One" +90[] = "5" +90[] = "Python-urllib" +90[] = "http://www.python.org/doc/current/lib/module-urllib.html" +90[] = "Python Software Foundation" +90[] = "http://www.python.org/psf/" +90[] = "pythonurllib.png" +90[] = "/list-of-ua/browser-detail?browser=Python-urllib" +91[] = "0" +91[] = "w3m" +91[] = "http://www.w3m.org/" +91[] = "Sakamoto Hironori" +91[] = "http://www2u.biglobe.ne.jp/%7Ehsaka/" +91[] = "w3m.png" +91[] = "/list-of-ua/browser-detail?browser=w3m" +93[] = "1" +93[] = "WebZIP" +93[] = "http://www.spidersoft.com/webzip/" +93[] = "Spidersoft" +93[] = "http://www.spidersoft.com/" +93[] = "webzip.png" +93[] = "/list-of-ua/browser-detail?browser=WebZIP" +94[] = "0" +94[] = "ICE browser" +94[] = "http://www.icesoft.com/products/icebrowser.html" +94[] = "ICEsoft Technologies Inc." +94[] = "http://www.icesoft.com/" +94[] = "icebrowser.png" +94[] = "/list-of-ua/browser-detail?browser=ICE browser" +96[] = "0" +96[] = "IceApe" +96[] = "http://www.debian.org/" +96[] = "Software in the Public Interest, Inc." +96[] = "http://www.spi-inc.org/" +96[] = "seamonkey.png" +96[] = "/list-of-ua/browser-detail?browser=IceApe" +99[] = "0" +99[] = "HotJava" +99[] = "http://java.sun.com/products/archive/hotjava/index.html" +99[] = "Sun Microsystems, Inc." +99[] = "http://www.sun.com/" +99[] = "hotjava.png" +99[] = "/list-of-ua/browser-detail?browser=HotJava" +100[] = "1" +100[] = "JoBo" +100[] = "http://www.matuschek.net/jobo/" +100[] = "Daniel Matuschek" +100[] = "http://www.matuschek.net/" +100[] = "jobo.png" +100[] = "/list-of-ua/browser-detail?browser=JoBo" +105[] = "5" +105[] = "POE-Component-Client-HTTP" +105[] = "http://search.cpan.org/dist/POE-Component-Client-HTTP/" +105[] = "" +105[] = "" +105[] = "perl.png" +105[] = "/list-of-ua/browser-detail?browser=POE-Component-Client-HTTP" +111[] = "5" +111[] = "Snoopy" +111[] = "http://sourceforge.net/projects/snoopy" +111[] = "Andrei Zmievski" +111[] = "" +111[] = "unknown.png" +111[] = "/list-of-ua/browser-detail?browser=Snoopy" +117[] = "0" +117[] = "NCSA Mosaic" +117[] = "http://www.ncsa.uiuc.edu/Projects/mosaic.html" +117[] = "NCSA" +117[] = "http://www.ncsa.uiuc.edu/" +117[] = "ncsa.png" +117[] = "/list-of-ua/browser-detail?browser=NCSA Mosaic" +119[] = "0" +119[] = "Kapiko" +119[] = "http://ufoxlab.googlepages.com/" +119[] = "Ufox lab." +119[] = "" +119[] = "kapiko.png" +119[] = "/list-of-ua/browser-detail?browser=Kapiko" +120[] = "0" +120[] = "Chrome" +120[] = "http://www.google.com/chrome" +120[] = "Google Inc." +120[] = "http://www.google.com/" +120[] = "chrome.png" +120[] = "/list-of-ua/browser-detail?browser=Chrome" +121[] = "5" +121[] = "Adobe AIR runtime" +121[] = "http://www.adobe.com/products/air/" +121[] = "Adobe Systems" +121[] = "http://www.adobe.com/" +121[] = "adobeair.png" +121[] = "/list-of-ua/browser-detail?browser=Adobe AIR runtime" +122[] = "5" +122[] = "LWP::Simple" +122[] = "http://search.cpan.org/perldoc?LWP::Simple" +122[] = "CPAN" +122[] = "http://cpan.org/" +122[] = "lwp.png" +122[] = "/list-of-ua/browser-detail?browser=LWP::Simple" +123[] = "5" +123[] = "WWW::Mechanize" +123[] = "http://search.cpan.org/dist/WWW-Mechanize/" +123[] = "CPAN" +123[] = "http://cpan.org/" +123[] = "lwp.png" +123[] = "/list-of-ua/browser-detail?browser=WWW::Mechanize" +124[] = "10" +124[] = "Xenu" +124[] = "http://home.snafu.de/tilman/xenulink.html" +124[] = "Tilman Hausherr" +124[] = "http://home.snafu.de/tilman/index.html" +124[] = "xenu.png" +124[] = "/list-of-ua/browser-detail?browser=Xenu" +125[] = "1" +125[] = "SiteSucker" +125[] = "http://www.sitesucker.us/" +125[] = "Rick Cranisky" +125[] = "" +125[] = "sitesucker.png" +125[] = "/list-of-ua/browser-detail?browser=SiteSucker" +126[] = "0" +126[] = "Arora" +126[] = "http://arora.googlecode.com/" +126[] = "Benjamin Meyer" +126[] = "http://www.blogger.com/profile/00185079236289035707" +126[] = "arora.png" +126[] = "/list-of-ua/browser-detail?browser=Arora" +128[] = "0" +128[] = "Firefox (Shiretoko)" +128[] = "http://www.mozilla.org/projects/firefox/3.1a1/releasenotes/" +128[] = "Mozilla Foundation" +128[] = "http://www.mozilla.org/" +128[] = "firefox.png" +128[] = "/list-of-ua/browser-detail?browser=Firefox (Shiretoko)" +129[] = "0" +129[] = "Firefox (Minefield)" +129[] = "http://www.mozilla.org/projects/minefield/" +129[] = "Mozilla Foundation" +129[] = "http://www.mozilla.org/" +129[] = "firefox.png" +129[] = "/list-of-ua/browser-detail?browser=Firefox (Minefield)" +130[] = "0" +130[] = "Iron" +130[] = "http://www.srware.net/en/software_srware_iron.php" +130[] = "" +130[] = "" +130[] = "iron.png" +130[] = "/list-of-ua/browser-detail?browser=Iron" +131[] = "0" +131[] = "Lobo" +131[] = "http://lobobrowser.org/java-browser.jsp" +131[] = "" +131[] = "" +131[] = "lobo.png" +131[] = "/list-of-ua/browser-detail?browser=Lobo" +132[] = "0" +132[] = "Links" +132[] = "http://links.twibright.com/" +132[] = "Twibright Labs" +132[] = "http://twibright.com/" +132[] = "links2.png" +132[] = "/list-of-ua/browser-detail?browser=Links" +133[] = "3" +133[] = "Fennec" +133[] = "https://wiki.mozilla.org/Fennec" +133[] = "Mozilla Foundation" +133[] = "http://www.mozilla.org/" +133[] = "fennec.png" +133[] = "/list-of-ua/browser-detail?browser=Fennec" +134[] = "4" +134[] = "Lotus Notes" +134[] = "http://www.ibm.com/software/lotus/products/notes/" +134[] = "IBM" +134[] = "http://www.ibm.com/" +134[] = "lotusnotes.png" +134[] = "/list-of-ua/browser-detail?browser=Lotus Notes" +135[] = "6" +135[] = "Klondike" +135[] = "http://web.archive.org/web/20071012053920/www.apachesoftware.com/products.html" +135[] = "Apache Software Consulting Inc." +135[] = "http://web.archive.org/web/*/www.apachesoftware.com" +135[] = "klondike.png" +135[] = "/list-of-ua/browser-detail?browser=Klondike" +136[] = "6" +136[] = "WapTiger" +136[] = "http://www.waptiger.com/waptiger/" +136[] = "infotiger" +136[] = "http://www.infotiger.com/" +136[] = "wap.png" +136[] = "/list-of-ua/browser-detail?browser=WapTiger" +137[] = "10" +137[] = "W3C Validator" +137[] = "http://validator.w3.org/" +137[] = "World Wide Web Consortium" +137[] = "http://www.w3.org/" +137[] = "w3.png" +137[] = "/list-of-ua/browser-detail?browser=W3C Validator" +138[] = "10" +138[] = "W3C Checklink" +138[] = "http://validator.w3.org/checklink" +138[] = "World Wide Web Consortium" +138[] = "http://www.w3.org/" +138[] = "w3.png" +138[] = "/list-of-ua/browser-detail?browser=W3C Checklink" +139[] = "10" +139[] = "HTMLParser" +139[] = "http://htmlparser.sourceforge.net/" +139[] = "" +139[] = "" +139[] = "htmlparser.png" +139[] = "/list-of-ua/browser-detail?browser=HTMLParser" +140[] = "5" +140[] = "Java" +140[] = "http://www.sun.com/java/" +140[] = "Sun Microsystems, Inc." +140[] = "http://www.sun.com/" +140[] = "java.png" +140[] = "/list-of-ua/browser-detail?browser=Java" +141[] = "0" +141[] = "Bolt" +141[] = "http://boltbrowser.com/" +141[] = "Bitstream" +141[] = "" +141[] = "bolt.png" +141[] = "/list-of-ua/browser-detail?browser=Bolt" +142[] = "0" +142[] = "Demeter" +142[] = "http://www.hurrikenux.com/Demeter/" +142[] = "hurrikenux Creative" +142[] = "http://www.hurrikenux.com/" +142[] = "demeter.png" +142[] = "/list-of-ua/browser-detail?browser=Demeter" +143[] = "5" +143[] = "FeedParser" +143[] = "http://feedparser.org/" +143[] = "Mark Pilgrim" +143[] = "http://diveintomark.org/" +143[] = "lib.png" +143[] = "/list-of-ua/browser-detail?browser=FeedParser" +144[] = "0" +144[] = "Orca" +144[] = "http://www.orcabrowser.com/" +144[] = "Avant Force team" +144[] = "http://www.avantforce.com/" +144[] = "orca.png" +144[] = "/list-of-ua/browser-detail?browser=Orca" +145[] = "0" +145[] = "Fluid" +145[] = "http://fluidapp.com/" +145[] = "Todd Ditchendorf" +145[] = "http://www.ditchnet.org/wp/" +145[] = "fluid.png" +145[] = "/list-of-ua/browser-detail?browser=Fluid" +146[] = "20" +146[] = "Bookdog" +146[] = "http://sheepsystems.com/products/bookdog/" +146[] = "Sheep Systems" +146[] = "http://sheepsystems.com/" +146[] = "bookdog.png" +146[] = "/list-of-ua/browser-detail?browser=Bookdog" +147[] = "50" +147[] = "Anonymouse.org" +147[] = "http://anonymouse.org/" +147[] = "Anonymous S.A." +147[] = "http://anonymouse.org/" +147[] = "anonymouse_org.png" +147[] = "/list-of-ua/browser-detail?browser=Anonymouse.org" +148[] = "0" +148[] = "Midori" +148[] = "http://software.twotoasts.de/index.php?/pages/midori_summary.html" +148[] = "TwoToasts.de" +148[] = "http://www.twotoasts.de/" +148[] = "midori.png" +148[] = "/list-of-ua/browser-detail?browser=Midori" +149[] = "18" +149[] = "Boxxe" +149[] = "" +149[] = "Team boxee" +149[] = "http://www.boxee.tv/" +149[] = "boxee.png" +149[] = "/list-of-ua/browser-detail?browser=Boxxe" +150[] = "20" +150[] = "gPodder" +150[] = "http://gpodder.org/" +150[] = "Thomas Perl and the gPodder Team" +150[] = "" +150[] = "gpodder.png" +150[] = "/list-of-ua/browser-detail?browser=gPodder" +151[] = "3" +151[] = "Obigo" +151[] = "http://en.wikipedia.org/wiki/Obigo_Browser" +151[] = "Obigo Ltd" +151[] = "http://www.obigo.com/" +151[] = "obigo.png" +151[] = "/list-of-ua/browser-detail?browser=Obigo" +152[] = "3" +152[] = "SEMC Browser" +152[] = "" +152[] = "Sony Ericsson Mobile Communications AB" +152[] = "http://www.sonyericsson.com/" +152[] = "semc.png" +152[] = "/list-of-ua/browser-detail?browser=SEMC Browser" +153[] = "0" +153[] = "Firefox (GranParadiso)" +153[] = "https://wiki.mozilla.org/Firefox3" +153[] = "Mozilla Foundation" +153[] = "http://www.mozilla.org/" +153[] = "firefox.png" +153[] = "/list-of-ua/browser-detail?browser=Firefox (GranParadiso)" +154[] = "10" +154[] = "WDG Validator" +154[] = "http://www.htmlhelp.com/tools/validator/" +154[] = "Web Design Group" +154[] = "http://www.htmlhelp.com/" +154[] = "wdg.png" +154[] = "/list-of-ua/browser-detail?browser=WDG Validator" +155[] = "10" +155[] = "WDG CSSCheck" +155[] = "http://www.htmlhelp.com/tools/csscheck/" +155[] = "Web Design Group" +155[] = "http://www.htmlhelp.com/" +155[] = "wdg.png" +155[] = "/list-of-ua/browser-detail?browser=WDG CSSCheck" +156[] = "10" +156[] = "WDG Page Valet" +156[] = "http://valet.htmlhelp.com/page/" +156[] = "Web Design Group" +156[] = "http://www.htmlhelp.com/" +156[] = "wdg.png" +156[] = "/list-of-ua/browser-detail?browser=WDG Page Valet" +157[] = "3" +157[] = "IE Mobile" +157[] = "http://www.microsoft.com/windowsmobile/en-us/downloads/microsoft/internet-explorer-mobile.mspx" +157[] = "Microsoft Corporation." +157[] = "http://www.microsoft.com/" +157[] = "msie.png" +157[] = "/list-of-ua/browser-detail?browser=IE Mobile" +158[] = "3" +158[] = "BlackBerry" +158[] = "http://www.blackberry.com/" +158[] = "Research In Motion Limited" +158[] = "http://www.rim.com/" +158[] = "blackberry.png" +158[] = "/list-of-ua/browser-detail?browser=BlackBerry" +159[] = "3" +159[] = "Polaris" +159[] = "http://www.infraware.co.kr/eng/01_product/product02.asp" +159[] = "Infraware" +159[] = "http://www.infraware.co.kr/" +159[] = "polaris.png" +159[] = "/list-of-ua/browser-detail?browser=Polaris" +160[] = "0" +160[] = "Hv3" +160[] = "http://tkhtml.tcl.tk/hv3.html" +160[] = "tkhtml.tcl.tk" +160[] = "http://tkhtml.tcl.tk/" +160[] = "hv3.png" +160[] = "/list-of-ua/browser-detail?browser=Hv3" +161[] = "6" +161[] = "WinWap" +161[] = "http://www.winwap.com/mobile_applications/winwap_browser" +161[] = "Winwap Technologies" +161[] = "http://www.winwap.com/" +161[] = "winwap.png" +161[] = "/list-of-ua/browser-detail?browser=WinWap" +162[] = "18" +162[] = "XBMC" +162[] = "http://xbmc.org/" +162[] = "Team-XBMC" +162[] = "http://xbmc.org/about/team/" +162[] = "xbmc.png" +162[] = "/list-of-ua/browser-detail?browser=XBMC" +163[] = "5" +163[] = "XML-RPC for PHP" +163[] = "http://phpxmlrpc.sourceforge.net/" +163[] = "" +163[] = "" +163[] = "php-xmlrpc.png" +163[] = "/list-of-ua/browser-detail?browser=XML-RPC for PHP" +165[] = "18" +165[] = "FlyCast" +165[] = "http://www.flycast.fm/" +165[] = "FlyCast Inc." +165[] = "" +165[] = "flycast.png" +165[] = "/list-of-ua/browser-detail?browser=FlyCast" +166[] = "15" +166[] = "Bloglines" +166[] = "http://www.bloglines.com/" +166[] = "IAS Search & Media" +166[] = "http://www.iac.com/" +166[] = "bloglines.png" +166[] = "/list-of-ua/browser-detail?browser=Bloglines" +167[] = "15" +167[] = "Gregarius" +167[] = "http://devlog.gregarius.net/" +167[] = "Marco Bonetti" +167[] = "http://www.linkedin.com/in/mbonetti" +167[] = "gregarius.png" +167[] = "/list-of-ua/browser-detail?browser=Gregarius" +168[] = "5" +168[] = "SimplePie" +168[] = "http://simplepie.org/" +168[] = "Ryan Parman and Geoffrey Sneddon" +168[] = "" +168[] = "simplepie.png" +168[] = "/list-of-ua/browser-detail?browser=SimplePie" +169[] = "5" +169[] = "PycURL" +169[] = "http://pycurl.sourceforge.net/" +169[] = "" +169[] = "" +169[] = "curl.png" +169[] = "/list-of-ua/browser-detail?browser=PycURL" +170[] = "15" +170[] = "Apple-PubSub" +170[] = "http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/pubsub.1.html" +170[] = "Apple Inc." +170[] = "http://www.apple.com/" +170[] = "apple.png" +170[] = "/list-of-ua/browser-detail?browser=Apple-PubSub" +171[] = "15" +171[] = "Feedfetcher-Google" +171[] = "http://www.google.com/feedfetcher.html" +171[] = "Google" +171[] = "http://www.google.com/" +171[] = "feedfetcher-google.png" +171[] = "/list-of-ua/browser-detail?browser=Feedfetcher-Google" +172[] = "10" +172[] = "FeedValidator" +172[] = "http://feedvalidator.org/" +172[] = "Mark Pilgrim" +172[] = "http://diveintomark.org/" +172[] = "feedvalidator.png" +172[] = "/list-of-ua/browser-detail?browser=FeedValidator" +173[] = "5" +173[] = "MagpieRSS" +173[] = "http://magpierss.sourceforge.net/" +173[] = "kellan" +173[] = "" +173[] = "magpierss.png" +173[] = "/list-of-ua/browser-detail?browser=MagpieRSS" +174[] = "15" +174[] = "BlogBridge" +174[] = "http://www.blogbridge.com/" +174[] = "Salas Associates, Inc." +174[] = "" +174[] = "blogbridge.png" +174[] = "/list-of-ua/browser-detail?browser=BlogBridge" +175[] = "18" +175[] = "Miro" +175[] = "http://www.getmiro.com/" +175[] = "Participatory Culture Foundation" +175[] = "http://www.participatoryculture.org/" +175[] = "miro.png" +175[] = "/list-of-ua/browser-detail?browser=Miro" +176[] = "15" +176[] = "Liferea" +176[] = "http://liferea.sourceforge.net/" +176[] = "" +176[] = "" +176[] = "liferea.png" +176[] = "/list-of-ua/browser-detail?browser=Liferea" +177[] = "15" +177[] = "Seznam RSS reader" +177[] = "" +177[] = "Seznam.cz, a.s." +177[] = "http://www.seznam.cz/" +177[] = "seznamrssreader.png" +177[] = "/list-of-ua/browser-detail?browser=Seznam RSS reader" +178[] = "20" +178[] = "PHP" +178[] = "http://php.net/" +178[] = "The PHP Group" +178[] = "" +178[] = "php.png" +178[] = "/list-of-ua/browser-detail?browser=PHP" +179[] = "10" +179[] = "REL Link Checker Lite" +179[] = "http://www.relsoftware.com/rlc/" +179[] = "REL Software, Inc." +179[] = "http://www.relsoftware.com/company/" +179[] = "RELlinkchecker.png" +179[] = "/list-of-ua/browser-detail?browser=REL Link Checker Lite" +180[] = "15" +180[] = "CPG Dragonfly RSS Module" +180[] = "http://dragonflycms.org/" +180[] = "" +180[] = "" +180[] = "dragonflycms.png" +180[] = "/list-of-ua/browser-detail?browser=CPG Dragonfly RSS Module" +181[] = "15" +181[] = "Newsbeuter" +181[] = "http://www.newsbeuter.org/" +181[] = "Andreas Krennmair" +181[] = "http://synflood.at/" +181[] = "newsbeuter.png" +181[] = "/list-of-ua/browser-detail?browser=Newsbeuter" +182[] = "10" +182[] = "W3C CSS Validator" +182[] = "http://jigsaw.w3.org/css-validator/" +182[] = "World Wide Web Consortium" +182[] = "http://www.w3.org/" +182[] = "w3.png" +182[] = "/list-of-ua/browser-detail?browser=W3C CSS Validator" +183[] = "10" +183[] = "PHP link checker" +183[] = "http://www.hotscripts.com/listing/php-link-checker/" +183[] = "" +183[] = "" +183[] = "php.png" +183[] = "/list-of-ua/browser-detail?browser=PHP link checker" +184[] = "20" +184[] = "GoldenPod" +184[] = "http://random.zerodogg.org/goldenpod" +184[] = "Eskild Hustvedt" +184[] = "http://random.zerodogg.org/" +184[] = "perl.png" +184[] = "/list-of-ua/browser-detail?browser=GoldenPod" +185[] = "0" +185[] = "Cheshire" +185[] = "http://greenhouse.aol.com/prod.jsp?prod_id=32" +185[] = "America Online, Inc." +185[] = "http://www.aol.com/" +185[] = "aol.png" +185[] = "/list-of-ua/browser-detail?browser=Cheshire" +187[] = "0" +187[] = "CometBird" +187[] = "http://www.cometbird.com/" +187[] = "cometbird.com" +187[] = "" +187[] = "cometbird.png" +187[] = "/list-of-ua/browser-detail?browser=CometBird" +188[] = "0" +188[] = "IceCat" +188[] = "http://www.gnu.org/software/gnuzilla/" +188[] = "Free Software Foundation, Inc." +188[] = "http://www.fsf.org/" +188[] = "icecat.png" +188[] = "/list-of-ua/browser-detail?browser=IceCat" +189[] = "0" +189[] = "Stainless" +189[] = "http://www.stainlessapp.com/" +189[] = "Mesa Dynamics, LLC" +189[] = "http://www.mesadynamics.com/" +189[] = "stainless.png" +189[] = "/list-of-ua/browser-detail?browser=Stainless" +190[] = "20" +190[] = "Prism" +190[] = "http://prism.mozilla.com/" +190[] = "Mozilla Labs" +190[] = "http://labs.mozilla.com/" +190[] = "prism.png" +190[] = "/list-of-ua/browser-detail?browser=Prism" +191[] = "18" +191[] = "MPlayer" +191[] = "http://www.mplayerhq.hu/" +191[] = "The MPlayer Project" +191[] = "" +191[] = "mplayer.png" +191[] = "/list-of-ua/browser-detail?browser=MPlayer" +192[] = "20" +192[] = "ActiveXperts Network Monitor" +192[] = "http://www.activexperts.com/activmonitor/" +192[] = "ActiveXperts Software B.V." +192[] = "http://www.activexperts.com/" +192[] = "activexperts-network-monitor.png" +192[] = "/list-of-ua/browser-detail?browser=ActiveXperts Network Monitor" +193[] = "3" +193[] = "Motorola Internet Browser" +193[] = "http://www.motorola.com/content.jsp?globalObjectId=1827-4343" +193[] = "Motorola, Inc." +193[] = "http://www.motorola.com/" +193[] = "mib.png" +193[] = "/list-of-ua/browser-detail?browser=Motorola Internet Browser" +194[] = "15" +194[] = "Abilon" +194[] = "" +194[] = "SisyphSoft" +194[] = "http://web.archive.org/web/20050721080030/http://www.abilon.org/" +194[] = "abilon.png" +194[] = "/list-of-ua/browser-detail?browser=Abilon" +195[] = "20" +195[] = "HTTP nagios plugin" +195[] = "" +195[] = "Nagios Enterprises, LLC." +195[] = "http://www.nagios.org/" +195[] = "nagios.png" +195[] = "/list-of-ua/browser-detail?browser=HTTP nagios plugin" +196[] = "18" +196[] = "Windows Media Player" +196[] = "http://www.microsoft.com/windows/windowsmedia/" +196[] = "Microsoft Corporation." +196[] = "http://www.microsoft.com/" +196[] = "wmp.png" +196[] = "/list-of-ua/browser-detail?browser=Windows Media Player" +197[] = "18" +197[] = "VLC media player" +197[] = "http://www.videolan.org/vlc/" +197[] = "VideoLAN team" +197[] = "http://www.videolan.org/" +197[] = "vlc.png" +197[] = "/list-of-ua/browser-detail?browser=VLC media player" +198[] = "10" +198[] = "P3P Validator" +198[] = "http://www.w3.org/P3P/validator.html" +198[] = "World Wide Web Consortium" +198[] = "http://www.w3.org/" +198[] = "w3.png" +198[] = "/list-of-ua/browser-detail?browser=P3P Validator" +199[] = "10" +199[] = "CSE HTML Validator" +199[] = "http://online.htmlvalidator.com/php/onlinevallite.php" +199[] = "AI Internet Solutions" +199[] = "http://www.htmlvalidator.com/" +199[] = "csehtmlvalidator.png" +199[] = "/list-of-ua/browser-detail?browser=CSE HTML Validator" +200[] = "15" +200[] = "Omea Reader" +200[] = "http://www.jetbrains.com/omea/reader/" +200[] = "JetBrains" +200[] = "http://www.jetbrains.com/" +200[] = "omeareader.png" +200[] = "/list-of-ua/browser-detail?browser=Omea Reader" +201[] = "20" +201[] = "GSiteCrawler" +201[] = "http://gsitecrawler.com/" +201[] = "SOFTplus Entwicklungen GmbH" +201[] = "http://www.softplus.net/" +201[] = "gsitecrawler.png" +201[] = "/list-of-ua/browser-detail?browser=GSiteCrawler" +202[] = "15" +202[] = "YahooFeedSeeker" +202[] = "http://publisher.yahoo.com/rssguide" +202[] = "Yahoo! Inc" +202[] = "http://www.yahoo.com/" +202[] = "YahooFeedSeeker.png" +202[] = "/list-of-ua/browser-detail?browser=YahooFeedSeeker" +204[] = "0" +204[] = "TheWorld Browser" +204[] = "http://www.ioage.com/" +204[] = "Phoenix Studio" +204[] = "" +204[] = "the_world.png" +204[] = "/list-of-ua/browser-detail?browser=TheWorld Browser" +205[] = "20" +205[] = "WebCollage" +205[] = "http://www.jwz.org/webcollage/" +205[] = "Jamie Zawinski" +205[] = "http://www.jwz.org/" +205[] = "webcollage.png" +205[] = "/list-of-ua/browser-detail?browser=WebCollage" +206[] = "15" +206[] = "NewsGatorOnline" +206[] = "http://www.newsgator.com/" +206[] = "NewsGator Technologies, Inc." +206[] = "http://www.newsgator.com/companyinfo/default.aspx" +206[] = "newsgator-online.png" +206[] = "/list-of-ua/browser-detail?browser=NewsGatorOnline" +207[] = "20" +207[] = "PRTG Network Monitor" +207[] = "http://www.paessler.com/prtg" +207[] = "Paessler AG" +207[] = "http://www.paessler.com/" +207[] = "PRTG_Network_Monitor.png" +207[] = "/list-of-ua/browser-detail?browser=PRTG Network Monitor" +208[] = "18" +208[] = "Songbird" +208[] = "http://getsongbird.com/" +208[] = "Pioneers of the Inevitable" +208[] = "http://getsongbird.com/about/" +208[] = "songbird.png" +208[] = "/list-of-ua/browser-detail?browser=Songbird" +209[] = "18" +209[] = "RSS Radio" +209[] = "http://www.dorada.co.uk/" +209[] = "Dorada Software" +209[] = "" +209[] = "rssradio.png" +209[] = "/list-of-ua/browser-detail?browser=RSS Radio" +210[] = "5" +210[] = "Feed::Find" +210[] = "http://search.cpan.org/dist/Feed-Find/" +210[] = "Benjamin Trott" +210[] = "" +210[] = "perl.png" +210[] = "/list-of-ua/browser-detail?browser=Feed::Find" +211[] = "3" +211[] = "Palm Pre web browser" +211[] = "http://www.palm.com/us/products/phones/pre/index.html" +211[] = "Palm Inc." +211[] = "http://www.palm.com/" +211[] = "palmpre.png" +211[] = "/list-of-ua/browser-detail?browser=Palm Pre web browser" +212[] = "0" +212[] = "Firefox (BonEcho)" +212[] = "http://www.mozilla.org/projects/bonecho/releases/2.0a1.html" +212[] = "Mozilla Foundation" +212[] = "http://www.mozilla.org/" +212[] = "firefox.png" +212[] = "/list-of-ua/browser-detail?browser=Firefox (BonEcho)" +213[] = "18" +213[] = "QuickTime" +213[] = "http://www.apple.com/quicktime/" +213[] = "Apple Inc." +213[] = "http://www.apple.com/" +213[] = "quicktime.png" +213[] = "/list-of-ua/browser-detail?browser=QuickTime" +214[] = "5" +214[] = "PHPcrawl" +214[] = "http://phpcrawl.cuab.de/" +214[] = "Uwe Hunfeld" +214[] = "" +214[] = "php.png" +214[] = "/list-of-ua/browser-detail?browser=PHPcrawl" +216[] = "0" +216[] = "GreenBrowser" +216[] = "http://www.morequick.com/indexen.htm" +216[] = "More Quick Tools" +216[] = "http://www.morequick.com/" +216[] = "green_browser.png" +216[] = "/list-of-ua/browser-detail?browser=GreenBrowser" +217[] = "15" +217[] = "Awasu" +217[] = "http://www.awasu.com/" +217[] = "Awasu Pty. Ltd." +217[] = "" +217[] = "awasu.png" +217[] = "/list-of-ua/browser-detail?browser=Awasu" +218[] = "18" +218[] = "CorePlayer" +218[] = "http://www.coreplayer.com/" +218[] = "CoreCodec, inc." +218[] = "" +218[] = "CorePlayer.png" +218[] = "/list-of-ua/browser-detail?browser=CorePlayer" +219[] = "0" +219[] = "QtWeb" +219[] = "http://www.qtweb.net/" +219[] = "QtWeb.NET" +219[] = "" +219[] = "qt_web.png" +219[] = "/list-of-ua/browser-detail?browser=QtWeb" +220[] = "3" +220[] = "TeaShark" +220[] = "http://www.teashark.com/" +220[] = "TeaShark" +220[] = "" +220[] = "teashark.png" +220[] = "/list-of-ua/browser-detail?browser=TeaShark" +221[] = "5" +221[] = "LibSoup" +221[] = "http://live.gnome.org/LibSoup" +221[] = "The GNOME Project" +221[] = "http://www.gnome.org/" +221[] = "libsoup.png" +221[] = "/list-of-ua/browser-detail?browser=LibSoup" +222[] = "15" +222[] = "NetNewsWire" +222[] = "http://www.newsgator.com/Individuals/NetNewsWire/" +222[] = "NewsGator Technologies, Inc." +222[] = "http://www.newsgator.com/" +222[] = "netnewswire.png" +222[] = "/list-of-ua/browser-detail?browser=NetNewsWire" +223[] = "20" +223[] = "Google App Engine" +223[] = "http://code.google.com/appengine/" +223[] = "Google" +223[] = "http://www.google.com/" +223[] = "google_appengine.png" +223[] = "/list-of-ua/browser-detail?browser=Google App Engine" +225[] = "3" +225[] = "UC Browser" +225[] = "http://www.ucweb.com/English/product.shtml" +225[] = "UCWEB Technology Ltd." +225[] = "http://www.ucweb.com/" +225[] = "ucweb.png" +225[] = "/list-of-ua/browser-detail?browser=UC Browser" +226[] = "3" +226[] = "Nokia Web Browser" +226[] = "http://nokia.com/browser" +226[] = "Nokia" +226[] = "http://www.nokia.com/" +226[] = "nokia.png" +226[] = "/list-of-ua/browser-detail?browser=Nokia Web Browser" +227[] = "20" +227[] = "LFTP" +227[] = "http://lftp.yar.ru/" +227[] = "Alexander V. Lukyanov" +227[] = "" +227[] = "lftp.png" +227[] = "/list-of-ua/browser-detail?browser=LFTP" +228[] = "0" +228[] = "Oregano" +228[] = "http://www.oreganouk.net/oregano2.html" +228[] = "Genesys Developments Ltd" +228[] = "http://www.oreganouk.net/" +228[] = "oregano.png" +228[] = "/list-of-ua/browser-detail?browser=Oregano" +229[] = "5" +229[] = "Summer" +229[] = "http://wrya.net/services/trac/summer" +229[] = "Robin Sonefors" +229[] = "http://flukkost.nu/" +229[] = "libsummer.png" +229[] = "/list-of-ua/browser-detail?browser=Summer" +230[] = "0" +230[] = "Acoo Browser" +230[] = "http://www.acoobrowser.com/" +230[] = "" +230[] = "" +230[] = "acco.png" +230[] = "/list-of-ua/browser-detail?browser=Acoo Browser" +231[] = "15" +231[] = "NewsFox" +231[] = "http://newsfox.mozdev.org/" +231[] = "NewsFox team" +231[] = "http://newsfox.mozdev.org/team.html" +231[] = "newsfox.png" +231[] = "/list-of-ua/browser-detail?browser=NewsFox" +232[] = "0" +232[] = "Hydra Browser" +232[] = "http://hydrabrowser.com/" +232[] = "Quantum" +232[] = "" +232[] = "hydrabrowser.png" +232[] = "/list-of-ua/browser-detail?browser=Hydra Browser" +233[] = "0" +233[] = "wKiosk" +233[] = "http://www.app4mac.com/store/index.php?target=products&product_id=9" +233[] = "app4mac Inc." +233[] = "http://www.app4mac.com/" +233[] = "wkiosk.png" +233[] = "/list-of-ua/browser-detail?browser=wKiosk" +234[] = "20" +234[] = "Paparazzi!" +234[] = "http://derailer.org/paparazzi/" +234[] = "Nate Weaver (Wevah)" +234[] = "http://derailer.org/" +234[] = "paparazzi.png" +234[] = "/list-of-ua/browser-detail?browser=Paparazzi!" +235[] = "5" +235[] = "xine" +235[] = "http://www.xine-project.org/" +235[] = "xine team" +235[] = "http://www.xine-project.org/authors" +235[] = "xine.png" +235[] = "/list-of-ua/browser-detail?browser=xine" +236[] = "20" +236[] = "webfs" +236[] = "http://plan9.bell-labs.com/magic/man2html/4/webfs" +236[] = "Lucent Technologies" +236[] = "http://plan9.bell-labs.com/plan9/" +236[] = "plan9.png" +236[] = "/list-of-ua/browser-detail?browser=webfs" +237[] = "15" +237[] = "NewsBreak" +237[] = "http://www.iliumsoft.com/site/nw/newsbreak.php" +237[] = "Ilium Software, Inc." +237[] = "http://www.iliumsoft.com/" +237[] = "newsbreak.png" +237[] = "/list-of-ua/browser-detail?browser=NewsBreak" +238[] = "20" +238[] = "LinkbackPlugin for Laconica" +238[] = "http://laconi.ca/" +238[] = "Laconica Developer Community" +238[] = "http://laconi.ca/trac/wiki/DeveloperCommunity" +238[] = "laconica.png" +238[] = "/list-of-ua/browser-detail?browser=LinkbackPlugin for Laconica" +239[] = "20" +239[] = "Microsoft WebDAV client" +239[] = "" +239[] = "Microsoft Corporation." +239[] = "http://www.microsoft.com/" +239[] = "webdav.png" +239[] = "/list-of-ua/browser-detail?browser=Microsoft WebDAV client" +240[] = "20" +240[] = "GnomeVFS" +240[] = "http://developer.gnome.org/doc/API/2.0/gnome-vfs-2" +240[] = "The GNOME Project" +240[] = "http://www.gnome.org/" +240[] = "webdav.png" +240[] = "/list-of-ua/browser-detail?browser=GnomeVFS" +241[] = "0" +241[] = "Uzbl" +241[] = "http://www.uzbl.org/" +241[] = "" +241[] = "" +241[] = "uzbl.png" +241[] = "/list-of-ua/browser-detail?browser=Uzbl" +242[] = "10" +242[] = "Cynthia" +242[] = "http://www.contentquality.com/" +242[] = "HiSoftware Inc." +242[] = "http://www.hisoftware.com/" +242[] = "cynthia.png" +242[] = "/list-of-ua/browser-detail?browser=Cynthia" +243[] = "15" +243[] = "Sage" +243[] = "http://sage.mozdev.org" +243[] = "Peter Andrews" +243[] = "http://petea.org/" +243[] = "sage.png" +243[] = "/list-of-ua/browser-detail?browser=Sage" +244[] = "18" +244[] = "Banshee" +244[] = "http://banshee-project.org/" +244[] = "Novell, Inc." +244[] = "http://www.novell.com/" +244[] = "banshee.png" +244[] = "/list-of-ua/browser-detail?browser=Banshee" +245[] = "0" +245[] = "Wyzo" +245[] = "http://www.wyzo.com/" +245[] = "Radical Software Ltd." +245[] = "http://www.radicalsoft.com/" +245[] = "wyzo.png" +245[] = "/list-of-ua/browser-detail?browser=Wyzo" +246[] = "15" +246[] = "RSSOwl" +246[] = "http://www.rssowl.org/" +246[] = "Benjamin Pasero" +246[] = "" +246[] = "rssowl.png" +246[] = "/list-of-ua/browser-detail?browser=RSSOwl" +247[] = "0" +247[] = "ABrowse" +247[] = "http://en.wikipedia.org/wiki/ABrowse" +247[] = "Kurt Skauen" +247[] = "http://www.syllable.org/" +247[] = "abrowse.png" +247[] = "/list-of-ua/browser-detail?browser=ABrowse" +248[] = "20" +248[] = "Funambol Outlook Sync Client" +248[] = "https://www.forge.funambol.org/download/" +248[] = "Funambol, Inc." +248[] = "http://funambol.com/" +248[] = "funambol-outlook.png" +248[] = "/list-of-ua/browser-detail?browser=Funambol Outlook Sync Client" +249[] = "20" +249[] = "Funambol Mozilla Sync Client" +249[] = "https://mozilla-plugin.forge.funambol.org/ " +249[] = "Carlo Codega" +249[] = "http://sazilla.blogspot.com" +249[] = "funambol-mozilla.png" +249[] = "/list-of-ua/browser-detail?browser=Funambol Mozilla Sync Client" +250[] = "15" +250[] = "RSS Menu" +250[] = "http://www.edot-studios.com/webgroups2/index.php?menu_item=212" +250[] = "e dot studios" +250[] = "http://www.edot-studios.com/" +250[] = "rss_menu.png" +250[] = "/list-of-ua/browser-detail?browser=RSS Menu" +251[] = "18" +251[] = "foobar2000" +251[] = "http://www.foobar2000.org/" +251[] = "Peter Pawlowski" +251[] = "" +251[] = "foobar2000.png" +251[] = "/list-of-ua/browser-detail?browser=foobar2000" +252[] = "5" +252[] = "GStreamer" +252[] = "http://gstreamer.freedesktop.org/" +252[] = "GStreamer community" +252[] = "http://gstreamer.freedesktop.org/" +252[] = "GStreamer.png" +252[] = "/list-of-ua/browser-detail?browser=GStreamer" +253[] = "20" +253[] = "NetFront Mobile Content Viewer" +253[] = "http://www.access-company.com/products/mobile_solutions/netfrontmobile/contentviewer/index.html" +253[] = "ACCESS CO., LTD." +253[] = "http://www.access-company.com/" +253[] = "netfront.png" +253[] = "/list-of-ua/browser-detail?browser=NetFront Mobile Content Viewer" +254[] = "5" +254[] = "PHP OpenID library" +254[] = "http://openidenabled.com/php-openid/" +254[] = "JanRain, Inc." +254[] = "http://www.janrain.com/" +254[] = "PHP_OpenID_lib.png" +254[] = "/list-of-ua/browser-detail?browser=PHP OpenID library" +255[] = "0" +255[] = "Blackbird" +255[] = "http://www.blackbirdbrowser.com/" +255[] = "40A, Inc." +255[] = "" +255[] = "blackbird.png" +255[] = "/list-of-ua/browser-detail?browser=Blackbird" +256[] = "15" +256[] = "GreatNews" +256[] = "http://www.curiostudio.com/" +256[] = "Curio Studio" +256[] = "" +256[] = "GreatNews.png" +256[] = "/list-of-ua/browser-detail?browser=GreatNews" +257[] = "0" +257[] = "DeskBrowse" +257[] = "http://www.deskbrowse.org/" +257[] = "Off Leash Developments, Inc" +257[] = "http://offleashdevelopments.com/" +257[] = "deskbrowse.png" +257[] = "/list-of-ua/browser-detail?browser=DeskBrowse" +258[] = "20" +258[] = "Tulip Chain" +258[] = "http://ostermiller.org/tulipchain/" +258[] = "Stephen "deadsea" Ostermiller" +258[] = "http://ostermiller.org/" +258[] = "TulipChain.png" +258[] = "/list-of-ua/browser-detail?browser=Tulip Chain" +259[] = "1" +259[] = "Axel" +259[] = "http://axel.alioth.debian.org/" +259[] = "Y Giridhar Appaji Nag" +259[] = "http://www.appaji.net/" +259[] = "terminal.png" +259[] = "/list-of-ua/browser-detail?browser=Axel" +260[] = "3" +260[] = "MicroB" +260[] = "http://browser.garage.maemo.org/" +260[] = "Nokia" +260[] = "http://www.nokia.com/" +260[] = "microb.png" +260[] = "/list-of-ua/browser-detail?browser=MicroB" +261[] = "3" +261[] = "Tear" +261[] = "http://tear.garage.maemo.org/" +261[] = "Kamen Bundev" +261[] = "http://bundyo.org/" +261[] = "tear.png" +261[] = "/list-of-ua/browser-detail?browser=Tear" +262[] = "10" +262[] = "LinkExaminer" +262[] = "http://www.analogx.com/contents/download/Network/lnkexam/Freeware.htm" +262[] = "AnalogX, LLC." +262[] = "http://www.analogx.com/" +262[] = "LinkExaminer.png" +262[] = "/list-of-ua/browser-detail?browser=LinkExaminer" +263[] = "0" +263[] = "Abolimba" +263[] = "http://www.aborange.de/products/freeware/abolimba-multibrowser.php" +263[] = "Mathias Gerlach, Jochen Milchsack" +263[] = "http://www.aborange.de/" +263[] = "abolimba.png" +263[] = "/list-of-ua/browser-detail?browser=Abolimba" +264[] = "0" +264[] = "Beonex" +264[] = "http://www.beonex.com/" +264[] = "Ben Bucksch" +264[] = "http://www.bucksch.org/" +264[] = "beonex.png" +264[] = "/list-of-ua/browser-detail?browser=Beonex" +265[] = "0" +265[] = "DocZilla" +265[] = "http://www.doczilla.com/" +265[] = "CITEC" +265[] = "http://www.citec.com/" +265[] = "doczilla.png" +265[] = "/list-of-ua/browser-detail?browser=DocZilla" +266[] = "0" +266[] = "retawq" +266[] = "http://retawq.sourceforge.net/" +266[] = "Arne Thomaßen" +266[] = "" +266[] = "terminal.png" +266[] = "/list-of-ua/browser-detail?browser=retawq" +267[] = "3" +267[] = "Jasmine" +267[] = "" +267[] = "SAMSUNG" +267[] = "http://www.samsung.com/" +267[] = "jasmine.png" +267[] = "/list-of-ua/browser-detail?browser=Jasmine" +268[] = "3" +268[] = "Opera Mini" +268[] = "http://www.operamini.com" +268[] = "Opera Software ASA." +268[] = "http://www.opera.com/" +268[] = "opera.png" +268[] = "/list-of-ua/browser-detail?browser=Opera Mini" +269[] = "0" +269[] = "Dooble" +269[] = "http://dooble.sourceforge.net/" +269[] = "Dooble team" +269[] = "" +269[] = "dooble.png" +269[] = "/list-of-ua/browser-detail?browser=Dooble" +270[] = "0" +270[] = "Madfox" +270[] = "http://en.wikipedia.org/wiki/Madfox" +270[] = "Robin Lu" +270[] = "" +270[] = "madfox.png" +270[] = "/list-of-ua/browser-detail?browser=Madfox" +271[] = "20" +271[] = "DownloadStudio" +271[] = "http://www.conceiva.com/products/downloadstudio/default.asp" +271[] = "Conceiva" +271[] = "http://www.conceiva.com/" +271[] = "downloadstudio.png" +271[] = "/list-of-ua/browser-detail?browser=DownloadStudio" +272[] = "20" +272[] = "WinPodder" +272[] = "http://winpodder.com/" +272[] = "Mike Versteeg" +272[] = "http://mikeversteeg.com/" +272[] = "winpodder.png" +272[] = "/list-of-ua/browser-detail?browser=WinPodder" +273[] = "0" +273[] = "Bunjalloo" +273[] = "http://code.google.com/p/quirkysoft/" +273[] = "quirkysoft" +273[] = "" +273[] = "bunjalloo.png" +273[] = "/list-of-ua/browser-detail?browser=Bunjalloo" +274[] = "10" +274[] = "LinkChecker" +274[] = "http://linkchecker.sourceforge.net/" +274[] = "Bastian Kleineidam" +274[] = "" +274[] = "LinkChecker.png" +274[] = "/list-of-ua/browser-detail?browser=LinkChecker" +275[] = "0" +275[] = "IE 8.0 (Compatibility View)" +275[] = "http://blogs.msdn.com/ie/archive/2008/08/27/introducing-compatibility-view.aspx" +275[] = "Microsoft Corporation." +275[] = "http://www.microsoft.com/" +275[] = "msie.png" +275[] = "/list-of-ua/browser-detail?browser=IE 8.0 (Compatibility View)" +276[] = "5" +276[] = "urlgrabber" +276[] = "http://linux.duke.edu/projects/urlgrabber/" +276[] = "Michael Stenner and Ryan Tomayko" +276[] = "" +276[] = "php.png" +276[] = "/list-of-ua/browser-detail?browser=urlgrabber" +277[] = "4" +277[] = "Spicebird" +277[] = "http://www.spicebird.com/" +277[] = "Synovel Technologies" +277[] = "http://www.synovel.com/" +277[] = "spicebird.png" +277[] = "/list-of-ua/browser-detail?browser=Spicebird" +278[] = "0" +278[] = "Firefox (Namoroka)" +278[] = "https://wiki.mozilla.org/Firefox/Namoroka" +278[] = "Mozilla Foundation" +278[] = "http://www.mozilla.org/" +278[] = "firefox.png" +278[] = "/list-of-ua/browser-detail?browser=Firefox (Namoroka)" +279[] = "0" +279[] = "rekonq" +279[] = "http://rekonq.sourceforge.net/" +279[] = "Andrea Diamantini" +279[] = "http://www.adjam.org/" +279[] = "rekonq.png" +279[] = "/list-of-ua/browser-detail?browser=rekonq" +280[] = "10" +280[] = "Multipage Validator" +280[] = "http://www.validator.ca/" +280[] = "Réseau Proze" +280[] = "http://www.proze.net/" +280[] = "MultipageValidator.png" +280[] = "/list-of-ua/browser-detail?browser=Multipage Validator" +281[] = "0" +281[] = "X-Smiles" +281[] = "http://www.xsmiles.org/" +281[] = "X-Smiles.org" +281[] = "" +281[] = "x-smiles.png" +281[] = "/list-of-ua/browser-detail?browser=X-Smiles" +282[] = "5" +282[] = "WinHTTP" +282[] = "http://msdn.microsoft.com/en-us/library/aa382925(VS.85).aspx" +282[] = "Microsoft Corporation." +282[] = "http://www.microsoft.com/" +282[] = "DLLicon.png" +282[] = "/list-of-ua/browser-detail?browser=WinHTTP" +283[] = "1" +283[] = "Xaldon WebSpider" +283[] = "http://www.xaldon.de/products_webspider.html" +283[] = "xaldon Technologies" +283[] = "http://www.xaldon.de/" +283[] = "XaldonWebSpider.png" +283[] = "/list-of-ua/browser-detail?browser=Xaldon WebSpider" +284[] = "20" +284[] = "Seznam WAP Proxy" +284[] = "http://www.smobil.cz/mobilni-vyhledavani" +284[] = "Seznam.cz, a.s." +284[] = "http://www.seznam.cz/" +284[] = "seznam.png" +284[] = "/list-of-ua/browser-detail?browser=Seznam WAP Proxy" +285[] = "20" +285[] = "Google Wireless Transcoder" +285[] = "http://google.com/gwt/n" +285[] = "Google" +285[] = "http://www.google.com/" +285[] = "feedfetcher-google.png" +285[] = "/list-of-ua/browser-detail?browser=Google Wireless Transcoder" +286[] = "20" +286[] = "Google Listen" +286[] = "http://listen.googlelabs.com/" +286[] = "Google" +286[] = "http://www.google.com/" +286[] = "google_listen.png" +286[] = "/list-of-ua/browser-detail?browser=Google Listen" +287[] = "5" +287[] = "Typhoeus" +287[] = "http://github.com/pauldix/typhoeus/tree/master" +287[] = "Paul Dix" +287[] = "http://www.pauldix.net/" +287[] = "typhoeus.png" +287[] = "/list-of-ua/browser-detail?browser=Typhoeus" +288[] = "0" +288[] = "OWB" +288[] = "http://www.sand-labs.org/owb" +288[] = "Sand-labs.org" +288[] = "http://www.sand-labs.org/" +288[] = "owb.png" +288[] = "/list-of-ua/browser-detail?browser=OWB" +289[] = "0" +289[] = "Browzar" +289[] = "http://www.browzar.com/" +289[] = "Browzar Ltd" +289[] = "" +289[] = "browzar.png" +289[] = "/list-of-ua/browser-detail?browser=Browzar" +290[] = "20" +290[] = "Claws Mail GtkHtml2 plugin" +290[] = "http://www.claws-mail.org/plugin.php?plugin=gtkhtml2" +290[] = "Colin Leroy" +290[] = "" +290[] = "Claws_Mail_GtkHtml_plugin.png" +290[] = "/list-of-ua/browser-detail?browser=Claws Mail GtkHtml2 plugin" +291[] = "20" +291[] = "Vuze" +291[] = "http://www.vuze.com/" +291[] = "Vuze, Inc" +291[] = "" +291[] = "vuze.png" +291[] = "/list-of-ua/browser-detail?browser=Vuze" +292[] = "0" +292[] = "GlobalMojo" +292[] = "http://globalmojo.com/" +292[] = "KPG VENTURES" +292[] = "http://www.kpgventures.com/" +292[] = "globalmojo.png" +292[] = "/list-of-ua/browser-detail?browser=GlobalMojo" +293[] = "18" +293[] = "GOM Player" +293[] = "http://www.gomlab.com/" +293[] = "GRETECH CORP." +293[] = "http://www.gretech.com/" +293[] = "GomPlayer.png" +293[] = "/list-of-ua/browser-detail?browser=GOM Player" +294[] = "5" +294[] = "Python-webchecker" +294[] = "http://www.python.org/doc/essays/ppt/sd99east/sld070.htm" +294[] = "Guido van Rossum/Sam Bayer" +294[] = "" +294[] = "pythonurllib.png" +294[] = "/list-of-ua/browser-detail?browser=Python-webchecker" +296[] = "10" +296[] = "W3C mobileOK Checker" +296[] = "http://validator.w3.org/mobile/" +296[] = "World Wide Web Consortium" +296[] = "http://www.w3.org/" +296[] = "w3.png" +296[] = "/list-of-ua/browser-detail?browser=W3C mobileOK Checker" +297[] = "20" +297[] = "Siege" +297[] = "http://www.joedog.org/index/siege-home" +297[] = "Joe Dog Software" +297[] = "http://www.joedog.org/" +297[] = "joedog.png" +297[] = "/list-of-ua/browser-detail?browser=Siege" +298[] = "1" +298[] = "iSiloXC" +298[] = "http://www.isilox.com/" +298[] = "DC & Co." +298[] = "http://www.isilox.com/" +298[] = "terminal.png" +298[] = "/list-of-ua/browser-detail?browser=iSiloXC" +299[] = "20" +299[] = "AB (Apache Bench)" +299[] = "http://en.wikipedia.org/wiki/ApacheBench" +299[] = "Apache Software Foundation" +299[] = "http://www.apache.org/" +299[] = "ab.png" +299[] = "/list-of-ua/browser-detail?browser=AB (Apache Bench)" +300[] = "10" +300[] = "anw LoadControl" +300[] = "http://webtool.anw.de/analyze/?ladezeit" +300[] = "ANW GmbH & Co. KG" +300[] = "http://www.anw.de/" +300[] = "anw.png" +300[] = "/list-of-ua/browser-detail?browser=anw LoadControl" +301[] = "10" +301[] = "anw HTMLChecker" +301[] = "http://webtool.topsubmit.de/analyze/?html" +301[] = "ANW GmbH & Co. KG" +301[] = "http://www.anw.de/" +301[] = "anw.png" +301[] = "/list-of-ua/browser-detail?browser=anw HTMLChecker" +302[] = "0" +302[] = "Edbrowse" +302[] = "http://edbrowse.sourceforge.net/" +302[] = "Karl Dahlke" +302[] = "" +302[] = "Edbrowse.png" +302[] = "/list-of-ua/browser-detail?browser=Edbrowse" +303[] = "20" +303[] = "muCommander" +303[] = "http://www.mucommander.com/" +303[] = "Maxence Bernard" +303[] = "" +303[] = "muCommander.png" +303[] = "/list-of-ua/browser-detail?browser=muCommander" +304[] = "18" +304[] = "XMPlay" +304[] = "http://www.xmplay.com/" +304[] = "un4seen developments" +304[] = "http://www.un4seen.com/" +304[] = "XMPlay.png" +304[] = "/list-of-ua/browser-detail?browser=XMPlay" +305[] = "15" +305[] = "NFReader" +305[] = "http://www.gaijin.at/dlnfreader.php" +305[] = "Gaijin.at" +305[] = "http://www.gaijin.at/" +305[] = "NFReader.png" +305[] = "/list-of-ua/browser-detail?browser=NFReader" +306[] = "3" +306[] = "uZard Web" +306[] = "http://www.uzard.com/" +306[] = "Logicplant Co." +306[] = "http://www.logicplant.com/" +306[] = "uzard.png" +306[] = "/list-of-ua/browser-detail?browser=uZard Web" +307[] = "5" +307[] = "Indy Library" +307[] = "http://www.indyproject.org/" +307[] = "Chad Z. Hower (Kudzu) and the Indy Pit Crew" +307[] = "" +307[] = "DLLicon.png" +307[] = "/list-of-ua/browser-detail?browser=Indy Library" +308[] = "0" +308[] = "Multi-Browser XP" +308[] = "http://www.multibrowser.de/" +308[] = "Binh Nguyen-Huu" +308[] = "" +308[] = "Multi-BrowserXP.png" +308[] = "/list-of-ua/browser-detail?browser=Multi-Browser XP" +309[] = "10" +309[] = "LinkWalker" +309[] = "" +309[] = "BDProtect Inc" +309[] = "http://www.brandprotect.com/" +309[] = "LinkWalker.png" +309[] = "/list-of-ua/browser-detail?browser=LinkWalker" +310[] = "0" +310[] = "NetPositive" +310[] = "http://en.wikipedia.org/wiki/NetPositive" +310[] = "Be Inc." +310[] = "http://en.wikipedia.org/wiki/Be_Inc." +310[] = "netpositive.png" +310[] = "/list-of-ua/browser-detail?browser=NetPositive" +311[] = "20" +311[] = "Radio Downloader" +311[] = "http://www.nerdoftheherd.com/tools/radiodld/" +311[] = "Matt Robinson" +311[] = "http://www.nerdoftheherd.com/" +311[] = "RadioDownloader.png" +311[] = "/list-of-ua/browser-detail?browser=Radio Downloader" +312[] = "1" +312[] = "WebStripper" +312[] = "http://webstripper.net/" +312[] = "Mike Sutton" +312[] = "http://solentsoftware.com/" +312[] = "webstripper.png" +312[] = "/list-of-ua/browser-detail?browser=WebStripper" +313[] = "20" +313[] = "Cyberduck" +313[] = "http://cyberduck.ch/" +313[] = "David Kocher" +313[] = "dkocher.name" +313[] = "Cyberduck.png" +313[] = "/list-of-ua/browser-detail?browser=Cyberduck" +314[] = "0" +314[] = "WorldWideWeb" +314[] = "http://www.w3.org/People/Berners-Lee/WorldWideWeb" +314[] = "Tim Berners-Lee" +314[] = "http://www.w3.org/People/Berners-Lee/Overview.html" +314[] = "1stBrowser.png" +314[] = "/list-of-ua/browser-detail?browser=WorldWideWeb" +315[] = "20" +315[] = "iVideo" +315[] = "http://tinyurl.com/DownloadiVideo" +315[] = "ZETZ mobile" +315[] = "http://www.zetzmobile.com/" +315[] = "iVideo.png" +315[] = "/list-of-ua/browser-detail?browser=iVideo" +316[] = "15" +316[] = "RSS Popper" +316[] = "http://www.rsspopper.com/" +316[] = "Paradisoft" +316[] = "http://www.paradisoft.com/" +316[] = "rss.png" +316[] = "/list-of-ua/browser-detail?browser=RSS Popper" +317[] = "20" +317[] = "Jamcast" +317[] = "http://www.sdstechnologies.com/" +317[] = "Software Development Solutions, Inc." +317[] = "http://www.sdstechnologies.com/" +317[] = "Jamcast.png" +317[] = "/list-of-ua/browser-detail?browser=Jamcast" +318[] = "0" +318[] = "Comodo Dragon" +318[] = "http://www.comodo.com/home/internet-security/browser.php" +318[] = "Comodo Group, Inc." +318[] = "http://www.comodo.com/" +318[] = "Comodo_Dragon.png" +318[] = "/list-of-ua/browser-detail?browser=Comodo Dragon" +319[] = "1" +319[] = "SuperBot" +319[] = "http://www.sparkleware.com/superbot/index.html" +319[] = "Sparkleware" +319[] = "http://www.sparkleware.com/" +319[] = "SuperBot.png" +319[] = "/list-of-ua/browser-detail?browser=SuperBot" +320[] = "0" +320[] = "My Internet Browser" +320[] = "http://myinternetbrowser.webove-stranky.org/" +320[] = "Media WebPublishing" +320[] = "" +320[] = "MyInternetBrowser.png" +320[] = "/list-of-ua/browser-detail?browser=My Internet Browser" +321[] = "3" +321[] = "Opera Mobile" +321[] = "http://www.opera.com/mobile/" +321[] = "Opera Software ASA." +321[] = "http://www.opera.com/" +321[] = "opera.png" +321[] = "/list-of-ua/browser-detail?browser=Opera Mobile" +322[] = "0" +322[] = "Kirix Strata" +322[] = "http://www.kirix.com/" +322[] = "Kirix Corporation" +322[] = "http://www.kirix.com/about-us.html" +322[] = "kirix-strata.png" +322[] = "/list-of-ua/browser-detail?browser=Kirix Strata" +323[] = "0" +323[] = "TT Explorer" +323[] = "http://tt.qq.com/" +323[] = "Tencent" +323[] = "http://tt.qq.com/" +323[] = "tt_explorer.png" +323[] = "/list-of-ua/browser-detail?browser=TT Explorer" +324[] = "0" +324[] = "LBrowser" +324[] = "http://wiki.freespire.org/index.php/Web_Browser" +324[] = "Xandros Incorporated" +324[] = "http://www.xandros.com/" +324[] = "LBrowser.png" +324[] = "/list-of-ua/browser-detail?browser=LBrowser" +325[] = "4" +325[] = "Outlook 2007" +325[] = "http://office.microsoft.com/outlook" +325[] = "Microsoft Corporation." +325[] = "http://www.microsoft.com/" +325[] = "outlook-2007.png" +325[] = "/list-of-ua/browser-detail?browser=Outlook 2007" +326[] = "4" +326[] = "Outlook 2010" +326[] = "http://en.wikipedia.org/wiki/Microsoft_Office_2010" +326[] = "Microsoft Corporation." +326[] = "http://www.microsoft.com/" +326[] = "outlook-2010.png" +326[] = "/list-of-ua/browser-detail?browser=Outlook 2010" +327[] = "4" +327[] = "Windows Live Mail" +327[] = "http://download.live.com/wlmail" +327[] = "Microsoft Corporation." +327[] = "http://www.microsoft.com/" +327[] = "Windows_Live_Mail.png" +327[] = "/list-of-ua/browser-detail?browser=Windows Live Mail" +328[] = "0" +328[] = "Tjusig" +328[] = "http://www.tjusig.cz/" +328[] = "Lukáš Ingr" +328[] = "" +328[] = "tjusig.png" +328[] = "/list-of-ua/browser-detail?browser=Tjusig" +329[] = "0" +329[] = "SiteKiosk" +329[] = "http://www.sitekiosk.com/SiteKiosk/Default.aspx" +329[] = "PROVISIO GmbH / LLC" +329[] = "http://www.provisio.com/" +329[] = "sitekiosk.png" +329[] = "/list-of-ua/browser-detail?browser=SiteKiosk" +330[] = "4" +330[] = "The Bat!" +330[] = "http://www.ritlabs.com/en/products/thebat/" +330[] = "RITLabs SRL" +330[] = "http://www.ritlabs.com/" +330[] = "thebat.png" +330[] = "/list-of-ua/browser-detail?browser=The Bat!" +331[] = "20" +331[] = "Novell BorderManager" +331[] = "http://www.novell.com/products/bordermanager/" +331[] = "Novell, Inc" +331[] = "http://www.novell.com/" +331[] = "Novell_BorderManager.png" +331[] = "/list-of-ua/browser-detail?browser=Novell BorderManager" +332[] = "4" +332[] = "Shredder" +332[] = "http://www.mozillamessaging.com/en-US/thunderbird/3.0a1/releasenotes/" +332[] = "Mozilla Foundation" +332[] = "http://www.mozilla.org/" +332[] = "thunderbird.png" +332[] = "/list-of-ua/browser-detail?browser=Shredder" +333[] = "18" +333[] = "Public Radio Player" +333[] = "http://www.publicradioplayer.org/" +333[] = "Public Radio Exchange (PRX)" +333[] = "http://www.prx.org/" +333[] = "PRP.png" +333[] = "/list-of-ua/browser-detail?browser=Public Radio Player" +334[] = "15" +334[] = "Rss Bandit" +334[] = "http://rssbandit.org/" +334[] = "Infragistics, Inc." +334[] = "http://www.infragistics.com/" +334[] = "RssBandit.png" +334[] = "/list-of-ua/browser-detail?browser=Rss Bandit" +335[] = "4" +335[] = "Postbox" +335[] = "http://www.postbox-inc.com/" +335[] = "Postbox, Inc." +335[] = "http://www.postbox-inc.com/" +335[] = "postbox.png" +335[] = "/list-of-ua/browser-detail?browser=Postbox" +336[] = "10" +336[] = "2Bone LinkChecker" +336[] = "http://www.2bone.com/links/linkchecker.shtml" +336[] = "2Bone" +336[] = "http://www.2bone.com/" +336[] = "2bone.png" +336[] = "/list-of-ua/browser-detail?browser=2Bone LinkChecker" +337[] = "10" +337[] = "Checkbot" +337[] = "http://degraaff.org/checkbot/" +337[] = "Hans de Graaff" +337[] = "http://degraaff.org/" +337[] = "perl.png" +337[] = "/list-of-ua/browser-detail?browser=Checkbot" +338[] = "4" +338[] = "GcMail" +338[] = "http://www.gcmail.de/" +338[] = "Monika Verse" +338[] = "" +338[] = "gcmail.png" +338[] = "/list-of-ua/browser-detail?browser=GcMail" +339[] = "0" +339[] = "Swiftweasel" +339[] = "http://swiftweasel.tuxfamily.org/" +339[] = "SticKK" +339[] = "" +339[] = "swiftweasel.png" +339[] = "/list-of-ua/browser-detail?browser=Swiftweasel" +340[] = "15" +340[] = "Fastladder FeedFetcher" +340[] = "http://fastladder.com/" +340[] = "livedoor Co.,Ltd. " +340[] = "http://corp.livedoor.com/" +340[] = "fastladderFeedFetcher.png" +340[] = "/list-of-ua/browser-detail?browser=Fastladder FeedFetcher" +341[] = "0" +341[] = "Firefox (Lorentz)" +341[] = "http://www.mozilla.com/en-US/firefox/lorentz/" +341[] = "Mozilla Foundation" +341[] = "http://www.mozilla.org/" +341[] = "firefox.png" +341[] = "/list-of-ua/browser-detail?browser=Firefox (Lorentz)" +342[] = "18" +342[] = "Pocket Tunes" +342[] = "http://www.pocket-tunes.com/" +342[] = "NormSoft, Inc." +342[] = "http://www.normsoft.com/" +342[] = "PocketTunes.png" +342[] = "/list-of-ua/browser-detail?browser=Pocket Tunes" +343[] = "15" +343[] = "SharpReader" +343[] = "http://www.sharpreader.net/" +343[] = "Luke Hutteman" +343[] = "http://www.hutteman.com/" +343[] = "sharpreader.png" +343[] = "/list-of-ua/browser-detail?browser=SharpReader" +344[] = "15" +344[] = "YeahReader" +344[] = "http://www.yeahreader.com/" +344[] = "ExtraLabs Software" +344[] = "http://www.extralabs.net/" +344[] = "YeahReader.png" +344[] = "/list-of-ua/browser-detail?browser=YeahReader" +345[] = "0" +345[] = "Pale Moon" +345[] = "http://www.palemoon.org/" +345[] = "Moonchild Productions" +345[] = "http://www.moonchildproductions.net/" +345[] = "pale_moon.png" +345[] = "/list-of-ua/browser-detail?browser=Pale Moon" +346[] = "20" +346[] = "Holmes" +346[] = "http://www.ucw.cz/holmes/" +346[] = "Martin MareÅ¡ and Robert Å palek" +346[] = "" +346[] = "holmes.png" +346[] = "/list-of-ua/browser-detail?browser=Holmes" +347[] = "20" +347[] = "Google Earth" +347[] = "http://earth.google.com/" +347[] = "Google Inc." +347[] = "http://google.com/" +347[] = "google_earth.png" +347[] = "/list-of-ua/browser-detail?browser=Google Earth" +348[] = "5" +348[] = "ROME library" +348[] = "https://rome.dev.java.net/" +348[] = "A. Abdelnur, P. Chanezon and E. Chien" +348[] = "" +348[] = "ROME_lib.png" +348[] = "/list-of-ua/browser-detail?browser=ROME library" +349[] = "15" +349[] = "Akregator" +349[] = "http://akregator.kde.org/" +349[] = "" +349[] = "s" +349[] = "akregator.png" +349[] = "/list-of-ua/browser-detail?browser=Akregator" +350[] = "0" +350[] = "Mini Browser" +350[] = "http://dmkho.tripod.com/" +350[] = "DMKHO" +350[] = "" +350[] = "minibrowser.png" +350[] = "/list-of-ua/browser-detail?browser=Mini Browser" +351[] = "0" +351[] = "Espial TV Browser" +351[] = "http://www.espial.com/products/evo_browser/" +351[] = "Espial Group" +351[] = "http://www.espial.com/" +351[] = "EspialTVBrowser.png" +351[] = "/list-of-ua/browser-detail?browser=Espial TV Browser" +352[] = "0" +352[] = "UltraBrowser " +352[] = "http://www.ultrabrowser.com/" +352[] = "UltraBrowser.com, Inc." +352[] = "" +352[] = "UltraBrowser.png" +352[] = "/list-of-ua/browser-detail?browser=UltraBrowser " +353[] = "0" +353[] = "BrowseX" +353[] = "http://pdqi.com/browsex/" +353[] = "Peter MacDonald" +353[] = "http://pdqi.com/" +353[] = "browsex.png" +353[] = "/list-of-ua/browser-detail?browser=BrowseX" +354[] = "3" +354[] = "Android Webkit" +354[] = "http://developer.android.com/reference/android/webkit/package-summary.html" +354[] = "Google Inc." +354[] = "http://www.google.com/" +354[] = "androidWebkit.png" +354[] = "/list-of-ua/browser-detail?browser=Android Webkit" +355[] = "0" +355[] = "Weltweitimnetz Browser" +355[] = "http://weltweitimnetz.de/software/Browser.en.page" +355[] = "Philipp Ruppel" +355[] = "http://weltweitimnetz.de/" +355[] = "WeltweitimnetzBrowser.png" +355[] = "/list-of-ua/browser-detail?browser=Weltweitimnetz Browser" +356[] = "4" +356[] = "PocoMail" +356[] = "http://www.pocomail.com/" +356[] = "Poco Systems Inc" +356[] = "http://www.pocosystems.com/" +356[] = "pocomail.png" +356[] = "/list-of-ua/browser-detail?browser=PocoMail" +357[] = "0" +357[] = "Element Browser" +357[] = "http://www.elementsoftware.co.uk/software/elementbrowser/" +357[] = "Element Software UK." +357[] = "http://www.elementsoftware.co.uk/" +357[] = "elementbrowser.png" +357[] = "/list-of-ua/browser-detail?browser=Element Browser" +358[] = "0" +358[] = "SlimBrowser" +358[] = "http://slimbrowser.flashpeak.com/" +358[] = "FlashPeak Inc." +358[] = "http://www.flashpeak.com/" +358[] = "slimbrowser.png" +358[] = "/list-of-ua/browser-detail?browser=SlimBrowser" +359[] = "20" +359[] = "LeechCraft" +359[] = "http://leechcraft.org/" +359[] = "" +359[] = "" +359[] = "LeechCraft.png" +359[] = "/list-of-ua/browser-detail?browser=LeechCraft" +360[] = "5" +360[] = "HTTP_Request2" +360[] = "http://pear.php.net/package/http_request2" +360[] = "" +360[] = "" +360[] = "php.png" +360[] = "/list-of-ua/browser-detail?browser=HTTP_Request2" +361[] = "0" +361[] = "Conkeror" +361[] = "http://conkeror.org/" +361[] = "Mozilla Foundation" +361[] = "http://www.mozilla.org/" +361[] = "conkeror.png" +361[] = "/list-of-ua/browser-detail?browser=Conkeror" +362[] = "3" +362[] = "Dolphin" +362[] = "http://www.dolphin-browser.com/" +362[] = "Samsung" +362[] = "http://www.samsung.com/" +362[] = "dolphin.png" +362[] = "/list-of-ua/browser-detail?browser=Dolphin" +363[] = "15" +363[] = "Netvibes feed reader" +363[] = "" +363[] = "Netvibes team" +363[] = "http://about.netvibes.com/" +363[] = "netvibes.png" +363[] = "/list-of-ua/browser-detail?browser=Netvibes feed reader" +364[] = "5" +364[] = "Chilkat HTTP .NET" +364[] = "http://www.chilkatsoft.com/HttpDotNet.asp" +364[] = "Chilkat Software, Inc." +364[] = "http://www.chilkatsoft.com/" +364[] = "chilkat.png" +364[] = "/list-of-ua/browser-detail?browser=Chilkat HTTP .NET" +365[] = "5" +365[] = "IXR lib" +365[] = "http://scripts.incutio.com/xmlrpc/" +365[] = "Incutio Ltd." +365[] = "http://www.incutio.com/" +365[] = "Incutio.png" +365[] = "/list-of-ua/browser-detail?browser=IXR lib" +366[] = "20" +366[] = "Web-sniffer" +366[] = "http://web-sniffer.net/" +366[] = "Lingo4you GbR" +366[] = "http://www.lingo4u.de/" +366[] = "Web-sniffer.png" +366[] = "/list-of-ua/browser-detail?browser=Web-sniffer" +367[] = "20" +367[] = "Atomic Email Hunter" +367[] = "http://www.massmailsoftware.com/extractweb/" +367[] = "AtomPark Software Inc." +367[] = "http://www.atompark.com/" +367[] = "Atomic_Email_Hunter.png" +367[] = "/list-of-ua/browser-detail?browser=Atomic Email Hunter" +368[] = "20" +368[] = "iGetter" +368[] = "http://www.igetter.net/" +368[] = "Presenta Ltd." +368[] = "" +368[] = "iGetter.png" +368[] = "/list-of-ua/browser-detail?browser=iGetter" +369[] = "1" +369[] = "webfetch" +369[] = "http://tony.aiu.to/sa/webfetch/" +369[] = "Tony Aiuto" +369[] = "http://tony.aiu.to/" +369[] = "terminal.png" +369[] = "/list-of-ua/browser-detail?browser=webfetch" +370[] = "20" +370[] = "Apache Synapse" +370[] = "http://synapse.apache.org/" +370[] = "Apache Software Foundation" +370[] = "http://www.apache.org/" +370[] = "apache.png" +370[] = "/list-of-ua/browser-detail?browser=Apache Synapse" +371[] = "0" +371[] = "lolifox" +371[] = "http://lolifox.com/" +371[] = "Atachi Hayashime" +371[] = "" +371[] = "lolifox.png" +371[] = "/list-of-ua/browser-detail?browser=lolifox" +372[] = "0" +372[] = "SkipStone" +372[] = "http://www.muhri.net/skipstone/" +372[] = "Maher Awamy" +372[] = "http://www.muhri.net/" +372[] = "skipStone.png" +372[] = "/list-of-ua/browser-detail?browser=SkipStone" +373[] = "20" +373[] = "Powermarks" +373[] = "http://www.kaylon.com/power.html" +373[] = "Kaylon Technologies Inc." +373[] = "http://www.kaylon.com/" +373[] = "powermarks.png" +373[] = "/list-of-ua/browser-detail?browser=Powermarks" +374[] = "15" +374[] = "Safari RSS reader" +374[] = "http://www.apple.com/safari/" +374[] = "Apple Inc." +374[] = "http://www.apple.com/" +374[] = "rss.png" +374[] = "/list-of-ua/browser-detail?browser=Safari RSS reader" +375[] = "20" +375[] = "Google Friend Connect" +375[] = "http://www.google.com/friendconnect/" +375[] = "Google Inc." +375[] = "http://www.google.com/" +375[] = "google_friend_connect.png" +375[] = "/list-of-ua/browser-detail?browser=Google Friend Connect" +376[] = "15" +376[] = "Feed Viewer" +376[] = "http://feedviewer.codeplex.com/" +376[] = "vasek7" +376[] = "http://www.codeplex.com/site/users/view/vasek7" +376[] = "" +376[] = "/list-of-ua/browser-detail?browser=Feed Viewer" +377[] = "0" +377[] = "RockMelt" +377[] = "http://www.rockmelt.com/" +377[] = "Tim Howes and Eric Vishria" +377[] = "" +377[] = "rockmelt.png" +377[] = "/list-of-ua/browser-detail?browser=RockMelt" +378[] = "0" +378[] = "Epic" +378[] = "http://www.epicbrowser.com/" +378[] = "Hidden Reflex" +378[] = "http://www.hiddenreflex.com/" +378[] = "epic.png" +378[] = "/list-of-ua/browser-detail?browser=Epic" +379[] = "0" +379[] = "InternetSurfboard" +379[] = "http://inetsurfboard.sourceforge.net/" +379[] = "Philipp Ruppel" +379[] = "" +379[] = "internetSurfboard.png" +379[] = "/list-of-ua/browser-detail?browser=InternetSurfboard" +380[] = "0" +380[] = "Vonkeror" +380[] = "http://zzo38computer.cjb.net/vonkeror/" +380[] = "zzo38" +380[] = "http://zzo38computer.cjb.net/" +380[] = "conkeror.png" +380[] = "/list-of-ua/browser-detail?browser=Vonkeror" +381[] = "15" +381[] = "IE RSS reader" +381[] = "http://en.wikipedia.org/wiki/Windows_RSS_Platform" +381[] = "Microsoft" +381[] = "http://www.microsoft.com/" +381[] = "rss.png" +381[] = "/list-of-ua/browser-detail?browser=IE RSS reader" +382[] = "15" +382[] = "Trileet NewsRoom" +382[] = "http://feedmonger.blogspot.com/" +382[] = "Trileet Inc." +382[] = "http://www.trileet.com/" +382[] = "rss.png" +382[] = "/list-of-ua/browser-detail?browser=Trileet NewsRoom" +383[] = "10" +383[] = "Validator.nu" +383[] = "http://validator.nu/" +383[] = "Henri Sivonen" +383[] = "http://hsivonen.iki.fi/author/" +383[] = "validator_nu.png" +383[] = "/list-of-ua/browser-detail?browser=Validator.nu" +384[] = "5" +384[] = "Zend_Http_Client" +384[] = "http://framework.zend.com/manual/en/zend.http.html" +384[] = "Zend Technologies Ltd." +384[] = "http://www.zend.com/" +384[] = "zend_http_client.png" +384[] = "/list-of-ua/browser-detail?browser=Zend_Http_Client" +385[] = "3" +385[] = "Skyfire" +385[] = "http://www.skyfire.com/" +385[] = "Skyfire Labs, Inc." +385[] = "http://www.skyfire.com/about" +385[] = "skyfire.png" +385[] = "/list-of-ua/browser-detail?browser=Skyfire" +386[] = "3" +386[] = "GO Browser" +386[] = "http://www.gobrowser.cn/" +386[] = "GO Dev Team" +386[] = "" +386[] = "go_browser.png" +386[] = "/list-of-ua/browser-detail?browser=GO Browser" +387[] = "0" +387[] = "Surf" +387[] = "http://surf.suckless.org/" +387[] = "suckless.org" +387[] = "http://suckless.org/" +387[] = "surf.png" +387[] = "/list-of-ua/browser-detail?browser=Surf" +388[] = "20" +388[] = "iGooMap" +388[] = "http://www.pointworks.de/software/igoomap/index.php" +388[] = "PointWorks.de" +388[] = "http://www.pointworks.de/" +388[] = "igoomap.png" +388[] = "/list-of-ua/browser-detail?browser=iGooMap" +389[] = "18" +389[] = "iTunes" +389[] = "http://www.apple.com/itunes/" +389[] = "Apple Inc." +389[] = "http://www.apple.com/" +389[] = "itunes.png" +389[] = "/list-of-ua/browser-detail?browser=iTunes" +390[] = "0" +390[] = "BlackHawk" +390[] = "http://www.netgate.sk/blackhawk/help/welcome-to-blackhawk-web-browser.html" +390[] = "NETGATE Technologies s.r.o. " +390[] = "http://www.netgate.sk/" +390[] = "blackhawk.png" +390[] = "/list-of-ua/browser-detail?browser=BlackHawk" +392[] = "3" +392[] = "Kindle Browser" +392[] = "http://en.wikipedia.org/wiki/Amazon_Kindle" +392[] = "Amazon.com" +392[] = "http://www.amazon.com/" +392[] = "kindle.png" +392[] = "/list-of-ua/browser-detail?browser=Kindle Browser" +393[] = "20" +393[] = "Microsoft Office Existence Discovery" +393[] = "http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/office-existence-discovery-protocol.aspx" +393[] = "Microsoft Corporation." +393[] = "http://www.microsoft.com/" +393[] = "webdav.png" +393[] = "/list-of-ua/browser-detail?browser=Microsoft Office Existence Discovery" +394[] = "3" +394[] = "Mobile Safari" +394[] = "http://en.wikipedia.org/wiki/Safari_%28web_browser%29" +394[] = "Apple Inc." +394[] = "http://www.apple.com/" +394[] = "safari.png" +394[] = "/list-of-ua/browser-detail?browser=Mobile Safari" +395[] = "20" +395[] = "BrownRecluse" +395[] = "http://softbytelabs.com/us/br/index.html" +395[] = "SoftByte Labs, Inc." +395[] = "http://softbytelabs.com/" +395[] = "BrownRecluse.png" +395[] = "/list-of-ua/browser-detail?browser=BrownRecluse" +396[] = "20" +396[] = "BookmarkTracker" +396[] = "http://www.bookmarktracker.com/" +396[] = "BookmarkTracker.com, Inc." +396[] = "" +396[] = "BookmarkTracker.png" +396[] = "/list-of-ua/browser-detail?browser=BookmarkTracker" +397[] = "5" +397[] = "BinGet" +397[] = "http://www.bin-co.com/php/scripts/load/" +397[] = "Binny VA" +397[] = "http://binnyva.com/" +397[] = "php.png" +397[] = "/list-of-ua/browser-detail?browser=BinGet" +398[] = "0" +398[] = "Feedreader" +398[] = "http://www.feedreader.com/download" +398[] = "i-Systems Inc." +398[] = "" +398[] = "" +398[] = "/list-of-ua/browser-detail?browser=Feedreader" +399[] = "0" +399[] = "Webian Shell" +399[] = "http://webian.org/shell/" +399[] = "Ben Francis" +399[] = "http://tola.me.uk/" +399[] = "webianshell.png" +399[] = "/list-of-ua/browser-detail?browser=Webian Shell" +400[] = "0" +400[] = "Kylo" +400[] = "http://kylo.tv/" +400[] = "Hillcrest Laboratories" +400[] = "http://hillcrestlabs.com/" +400[] = "kylo.png" +400[] = "/list-of-ua/browser-detail?browser=Kylo" +401[] = "0" +401[] = "Fireweb Navigator" +401[] = "http://www.arsslensoft.tk/?q=node/7" +401[] = "Arsslensoft Foundation" +401[] = "http://www.arsslensoft.fi5.us/" +401[] = "Fireweb.png" +401[] = "/list-of-ua/browser-detail?browser=Fireweb Navigator" +402[] = "5" +402[] = "Evolution/Camel.Stream" +402[] = "http://live.gnome.org/Evolution/Camel.Stream" +402[] = "GNOME Project" +402[] = "http://www.gnome.org/" +402[] = "DLLicon.png" +402[] = "/list-of-ua/browser-detail?browser=Evolution/Camel.Stream" +[browser_type] +; browser_type_id[] = "Browser type" +0[] = "Browser" +1[] = "Offline Browser" +3[] = "Mobile Browser" +4[] = "Email client" +5[] = "Library" +6[] = "Wap Browser" +10[] = "Validator" +15[] = "Feed Reader" +18[] = "Multimedia Player" +20[] = "Other" +50[] = "Useragent Anonymizer" +[browser_reg] +; browser_reg_id[] = "Browser regstring" +; browser_reg_id[] = "Browser id" +49[] = "/mozilla.*Blazer\/([0-9a-z\+\-\.]+)/si" +49[] = "43" +69[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*firefox\/([0-9a-z\+\-\.]+).*swiftfox/si" +69[] = "61" +94[] = "/^Mozilla.*Thunderbird\/([0-9a-zA-Z\.]+)/si" +94[] = "79" +149[] = "/mozilla.*rv:[0-9\.]+.*gecko.*kapiko\/([0-9a-z\+\-\.]+).*/si" +149[] = "119" +197[] = "/IEMobile ([0-9\.]+)/si" +197[] = "157" +218[] = "/Miro\/([0-9a-z\-\.]+).*http:\/\/www\.getmiro\.com\//si" +218[] = "175" +359[] = "/\/szn-mobile-transcoder/si" +359[] = "284" +361[] = "/Google Wireless Transcoder/si" +361[] = "285" +414[] = "/^Mozilla.*Shredder\/([0-9a-zA-Z\.]+)/si" +414[] = "332" +407[] = "/^Mozilla.*MSIE.*MSOffice 12/si" +407[] = "325" +408[] = "/^Mozilla.*MSIE.*MSOffice 14/si" +408[] = "326" +5[] = "/mozilla.*gecko\/[0-9]+.*epiphany\/([0-9a-z\+\-\.]+).*/si" +5[] = "5" +59[] = "/mozilla.*Lunascape\/([0-9a-z\+\-\.]+).*/si" +59[] = "52" +117[] = "/Blazer ([0-9\.]+)/si" +117[] = "43" +157[] = "/mozilla.*applewebkit.*arora\/([0-9a-z\+\-\.]+).*/si" +157[] = "126" +175[] = "/^W3C-checklink\/([0-9a-z\+\-\.]+).*/si" +175[] = "138" +179[] = "/Bolt\/([0-9\.]+)/si" +179[] = "141" +180[] = "/Demeter\/([0-9\.]+)/si" +180[] = "142" +184[] = "/mozilla.*applewebkit.*fluid\/([0-9a-z\+\-\.]+).*/si" +184[] = "145" +203[] = "/Hv3\/([0-9a-z\.])/si" +203[] = "160" +230[] = "/Cheshire\/([0-9a-z\.]+)/si" +230[] = "185" +232[] = "/mozilla.*rv:[0-9\.]+.*gecko.*CometBird\/([0-9a-z\+\-\.]+).*/si" +232[] = "187" +233[] = "/mozilla.*rv:[0-9\.]+.*gecko.*IceCat\/([0-9a-z\+\-\.]+).*/si" +233[] = "188" +234[] = "/mozilla.*applewebkit.*Stainless\/([0-9a-z\+\-\.]+).*safari/si" +234[] = "189" +235[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Prism\/([0-9a-z\+\-\.]+).*/si" +235[] = "190" +266[] = "/^Mozilla\/.*webOS\/[0-9\.]+.*AppleWebKit.*Pre\/([0-9\.]+)$/si" +266[] = "211" +322[] = "/^Mozilla\/.*Mobile Content Viewer\/([0-9\.]+).*NetFront/si" +322[] = "253" +396[] = "/mozilla.*Comodo_Dragon\/([0-9a-z\+\-\.]+).*/si" +396[] = "318" +403[] = "/^Mozilla.*Gecko.*Strata\/([0-9\.]+)/si" +403[] = "322" +406[] = "/^Mozilla.*rv:[0-9\.]+.*Gecko.*Firefox.*LBrowser\/([0-9a-z\-\.]+)/si" +406[] = "324" +409[] = "/^Outlook-Express\/7\.0 \(MSIE 7\.0; Windows/si" +409[] = "327" +439[] = "/^Mozilla.*Windows.*AppleWebKit.*MiniBrowser\/([0-9\.]+)/si" +439[] = "350" +446[] = "/^Mozilla.*AppleWebKit.*Element Browser ([0-9\.]+)/si" +446[] = "357" +489[] = "/^Outlook-Express\/7\.0 \(MSIE 6\.0; Windows/si" +489[] = "327" +494[] = "/^Mozilla\/.*Gecko\/.*Firefox\/.*Kylo\/([0-9\.]+)$/si" +494[] = "400" +495[] = "/^Outlook-Express\/7\.0 \(MSIE 8; Windows/si" +495[] = "327" +278[] = "/^Mozilla\/.*AppleWebKit.*NetNewsWire\/([0-9a-z\.]+)$/si" +278[] = "222" +410[] = "/^Mozilla.*MSIE.*Windows.*Tjusig ([0-9\.]+)/si" +410[] = "328" +411[] = "/^Mozilla.*MSIE.*Windows.*SiteKiosk ([0-9\.]+)/s" +411[] = "329" +444[] = "/Mozilla.*AppleWebKit.*WeltweitimnetzBrowser\/([0-9\.]+)/si" +444[] = "355" +476[] = "/^Mozilla.*AppleWebKit.*Skyfire\/([0-9\.]+)/si" +476[] = "385" +7[] = "/mozilla.*gecko\/[0-9]+.*flock\/([0-9a-z\+\-\.]+).*/si" +7[] = "7" +162[] = "/mozilla.*applewebkit.*iron\/([0-9a-z\+\-\.]+).*/si" +162[] = "130" +22[] = "/mozilla.*applewebkit.*shiira\/([0-9a-z\+\-\.]+).*safari/si" +22[] = "21" +54[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*IceWeasel\/([0-9a-z\+\-\.]+).*/si" +54[] = "47" +114[] = "/^Mozilla.*AppleWebKit.*Shiira\/([0-9a-zA-z\.\-]+)/si" +114[] = "21" +163[] = "/mozilla..*lobo\/([0-9a-z\+\-\.]+).*/si" +163[] = "131" +182[] = "/mozilla.*applewebkit.*shiira.*safari/si" +182[] = "21" +183[] = "/mozilla.*firefox.*orca\/([0-9a-z\+\-\.]+).*/si" +183[] = "144" +314[] = "/^Mozilla\/.*Gecko.* Firefox.*Wyzo\/([0-9a-z\.]+)/si" +314[] = "245" +340[] = "/Opera\/.*Opera Mini\/([0-9\.]+)/si" +340[] = "268" +369[] = "/mozilla.*rv:[0-9\.]+.*gecko.*GlobalMojo\/([0-9a-z\+\-\.]+).*/si" +369[] = "292" +431[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Palemoon\/([0-9a-z\+\-\.]+).*/si" +431[] = "345" +434[] = "/mozilla.*flock\/([0-9\.]+).*chrome/si" +434[] = "7" +436[] = "/mozilla.*rv:[0-9\.]+.*gecko.*myibrow\/([0-9a-z\.]+)/si" +436[] = "320" +440[] = "/^Mozilla.*Escape ([0-9\.]+)/si" +440[] = "351" +441[] = "/^Mozilla.*Windows.*UltraBrowser ([0-9\.]+)/si" +441[] = "352" +442[] = "/^Mozilla.*BrowseX \(([0-9\.]+)/si" +442[] = "353" +463[] = "/^Mozilla\/.*Gecko.*lolifox\/([0-9\.]+)/si" +463[] = "371" +468[] = "/Mozilla.*AppleWebKit.*RockMelt\/([0-9a-z\.]+)/si" +468[] = "377" +469[] = "/^Mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*Epic\/([0-9\.]+)/si" +469[] = "378" +470[] = "/Mozilla.*AppleWebKit.*InternetSurfboard\/([0-9\.a-z]+)/si" +470[] = "379" +471[] = "/^Mozilla.*Gecko.*Vonkeror\/([0-9\.]+)/si" +471[] = "380" +484[] = "/^Mozilla.*WebKi.*BlackHawk\/([0-9\.]+).*Chrome/si" +484[] = "390" +496[] = "/^Mozilla\/.*Treco.*Fireweb Navigator\/([0-9a-z\.]+)/si" +496[] = "401" +246[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Navigator\/([0-9a-z\+\-\.]+).*/si" +246[] = "4" +400[] = "/Opera mobi.*Version\/([0-9\.]+)/si" +400[] = "321" +401[] = "/Opera Mobi.*Opera ([0-9\.]+)/si" +401[] = "321" +402[] = "/Opera ([0-9\.]+).*Opera Mobi/si" +402[] = "321" +438[] = "/HTC.*Opera\/([0-9\.]+).*Windows/si" +438[] = "321" +443[] = "/Mozilla.*Linux.*Android.*AppleWebKit.*Version\/([0-9\.]+)/si" +443[] = "354" +488[] = "/mozilla.*applewebkit.*version\/([0-9a-z\+\-\.]+).*mobile.*safari\/[0-9a-z\+\-\.]+.*/si" +488[] = "394" +150[] = "/mozilla.*chrome\/([0-9a-z\+\-\.]+).*/si" +150[] = "120" +271[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*Tablet browser ([0-9a-z\+\-\.]+).*/si" +271[] = "260" +342[] = "/Mozilla\/.*Gecko.*Firefox.*Madfox\/([0-9a-z\.]+)/si" +342[] = "270" +422[] = "/^2Bone_LinkChecker\/([0-9\.]+)/si" +422[] = "336" +486[] = "/^Mozilla.*Linux.*Kindle\/([0-9\.]+)/si" +486[] = "392" +1[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*seamonkey\/([0-9a-z\+\-\.]+).*/si" +1[] = "2" +2[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*camino\/([0-9a-z\+\-\.]+).*/si" +2[] = "1" +3[] = "/mozilla.*rv:[0-9\.]+.*gecko.*firefox\/([0-9a-z\+\-\.]+).*/si" +3[] = "3" +4[] = "/mozilla.*netscape[0-9]?\/([0-9a-z\+\-\.]+).*/si" +4[] = "4" +6[] = "/mozilla.*gecko\/[0-9]+.*galeon\/([0-9a-z\+\-\.]+).*/si" +6[] = "6" +8[] = "/mozilla.*gecko\/[0-9]+.*minimo\/([0-9a-z\+\-\.]+).*/si" +8[] = "8" +9[] = "/mozilla.*gecko\/[0-9]+.*k\-meleon\/([0-9a-z\+\-\.]+).*/si" +9[] = "9" +10[] = "/mozilla.*gecko\/[0-9]+.*k-ninja\/([0-9a-z\+\-\.]+).*/si" +10[] = "10" +11[] = "/mozilla.*gecko.*kazehakase\/([0-9a-z\+\-\.]+).*/si" +11[] = "11" +170[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*fennec\/([0-9a-z\+\-\.]+).*/si" +170[] = "133" +14[] = "/mozilla.*rv[ :][0-9\.]+.*gecko\/[0-9]+.*firebird\/([0-9a-z\+\-\.]+).*/si" +14[] = "14" +15[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*phoenix\/([0-9a-z\+\-\.]+).*/si" +15[] = "15" +16[] = "/mozilla.*konqueror\/([0-9a-z\+\-\.]+).*/si" +16[] = "16" +17[] = "/mozilla.*opera ([0-9][0-9a-z\+\-\.]+).*/si" +17[] = "17" +19[] = "/mozilla.*applewebkit\/[0-9]+.*omniweb\/v[0-9\.]+/si" +19[] = "18" +20[] = "/mozilla.*applewebkit\/[0-9]+.*sunrisebrowser\/([0-9a-z\+\-\.]+)/si" +20[] = "19" +303[] = "/^xine\/([0-9a-z\.]+)/si" +303[] = "235" +23[] = "/mozilla.*applewebkit.*version\/([0-9a-z\+\-\.]+).*safari\/[0-9a-z\+\-\.]+.*/si" +23[] = "22" +24[] = "/dillo\/([0-9a-z\+\-\.]+).*/si" +24[] = "23" +25[] = "/icab[ \/]([0-9a-z\+\-\.]+).*/si" +25[] = "24" +26[] = "/^lynx\/([0-9a-z\.]+).*/si" +26[] = "25" +28[] = "/^elinks \(([0-9a-z\.]+).*/si" +28[] = "27" +29[] = "/^elinks\/([0-9a-z\.]+).*/si" +29[] = "27" +30[] = "/^elinks$/si" +30[] = "27" +31[] = "/^Wget\/([0-9a-z\+\-\.]+).*/si" +31[] = "28" +32[] = "/Amiga\-Aweb\/([0-9a-z\+\-\.]+).*/si" +32[] = "29" +33[] = "/AmigaVoyager\/([0-9a-z\+\-\.]+).*/si" +33[] = "30" +35[] = "/UP\.Browser\/([0-9a-zA-Z\.]+).*/s" +35[] = "32" +36[] = "/UP\/([0-9a-zA-Z\.]+).*/s" +36[] = "32" +37[] = "/NetFront\/([0-9a-z\.]+).*/si" +37[] = "33" +223[] = "/^CPG RSS Module File Reader/si" +223[] = "180" +42[] = "/offline explorer\/([0-9a-z\+\-\.]+).*/si" +42[] = "39" +304[] = "/^webfs\/([0-9\.]+) \(plan 9\)$/si" +304[] = "236" +44[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*AOL ([0-9a-z\+\-\.]+)/si" +44[] = "40" +45[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*America Online Browser ([0-9a-z\+\-\.]+)/si" +45[] = "40" +46[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Avant Browser ([0-9a-z\+\-\.]+)/si" +46[] = "41" +48[] = "/mozilla.*AvantGo ([0-9a-z\+\-\.]+)/si" +48[] = "42" +50[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Crazy Browser ([0-9a-z \+\-\.]+)/si" +50[] = "44" +51[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Deepnet Explorer ([0-9a-z\+\-\.]+)/si" +51[] = "45" +53[] = "/mozilla.*HTTrack ([0-9a-z\+\-\.]+).*/si" +53[] = "46" +55[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*iRider ([0-9a-z\+\-\.]+)/si" +55[] = "48" +56[] = "/.*isilox\/([0-9a-z\+\-\.]+).*/si" +56[] = "49" +57[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*KKman([0-9a-z\+\-\.]+)/si" +57[] = "50" +58[] = "/libwww\-perl\/([0-9a-z\+\-\.]+).*/si" +58[] = "51" +60[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Maxthon ([0-9a-z\+\-\.]+)/si" +60[] = "53" +61[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*MyIE2/si" +61[] = "53" +63[] = "/mozilla.*MultiZilla ([0-9a-z\+\-\.]+).*/si" +63[] = "55" +64[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*NetCaptor ([0-9a-z\+\-\.]+)/si" +64[] = "56" +65[] = "/Netgem\/([0-9a-z\+\-\.]+).*/si" +65[] = "57" +66[] = "/netsurf\/([0-9a-z\+\-\.]+).*/si" +66[] = "58" +67[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Sleipnir\/([0-9a-z\+\-\.]+)/si" +67[] = "59" +70[] = "/Teleport Pro\/([0-9a-z\+\-\.]+).*/si" +70[] = "62" +77[] = "/sunrise[ \/]([0-9a-z\+\-\.\/]+)/si" +77[] = "19" +78[] = "/mozilla.*galeon\/([0-9a-z\+\-\.]+).*/si" +78[] = "6" +80[] = "/Openwave/si" +80[] = "32" +302[] = "/Mozilla\/.*AppleWebKit.*Paparazzi!\/([0-9a-z\.]+)/si" +302[] = "234" +86[] = "/webcopier.*v([0-9a-z\.]+)/si" +86[] = "71" +89[] = "/MSIE.*PhaseOut/si" +89[] = "74" +97[] = "/doris\/([0-9a-z\+\-\.]+).*/si" +97[] = "81" +98[] = "/^Enigma browser$/si" +98[] = "82" +100[] = "/lwp\-request\/([0-9a-z\+\-\.]+).*/si" +100[] = "51" +102[] = "/Jakarta Commons-HttpClient\/([0-9a-zA-Z\.\-]+)/si" +102[] = "85" +104[] = "/^curl ([0-9a-zA-Z\.\-]+)/si" +104[] = "86" +106[] = "/amaya\/([0-9a-zA-Z\.\-+]+)/si" +106[] = "87" +107[] = "/GetRight\/([0-9a-zA-Z\.\-\+]+)/si" +107[] = "88" +108[] = "/^Mozilla.*OmniWeb\/([1-9a-zA-z\.\-]+)/si" +108[] = "18" +109[] = "/Mozilla.*OffByOne/si" +109[] = "89" +110[] = "/Python\-urllib\/([0-9a-zA-Z\.\-]+)/si" +110[] = "90" +111[] = "/w3m\/([0-9a-zA-z\-\+\.]+)/si" +111[] = "91" +113[] = "/^WebZIP\/([0-9a-zA-Z\.\-]+)/si" +113[] = "93" +115[] = "/ICEbrowser\/([0-9a-z_\.\-]+)/si" +115[] = "94" +327[] = "/ICE browser\/([0-9a-z_\.\-]+)/si" +327[] = "94" +118[] = "/Iceape\/([0-9a-zA-z\.\-]+)/si" +118[] = "96" +120[] = "/Jakarta Commons\-HttpClient/si" +120[] = "85" +122[] = "/HotJava\/([0-9a-zA-Z\.\- ]+)/si" +122[] = "99" +123[] = "/JoBo\/([0-9a-z\.\-]+)/si" +123[] = "100" +371[] = "/^Python-webchecker\/([0-9]+)$/si" +371[] = "294" +126[] = "/Sleipnir Version ([0-9a-z\.]+)/si" +126[] = "59" +130[] = "/poe-component-client-http\/([0-9a-z\.\-]+)/si" +130[] = "105" +300[] = "/Mozilla.*MSIE.*Hydra Browser/si" +300[] = "232" +169[] = "/^Mozilla\/(3\.0).*Sun\)$/si" +169[] = "99" +301[] = "/^Mozilla.*AppleWebKit.*wKiosk/si" +301[] = "233" +137[] = "/snoopy v([1-9\.]+)/si" +137[] = "111" +141[] = "/NetFront([0-9a-z\.]+).*/si" +141[] = "33" +147[] = "/NCSA_Mosaic\/([0-9a-z\+\-\.]+).*/si" +147[] = "117" +151[] = "/mozilla.*applewebkit.*AdobeAIR\/([0-9a-z\+\-\.]+).*/si" +151[] = "121" +152[] = "/^lwp-trivial\/([0-9.]+)$/si" +152[] = "122" +153[] = "/^WWW-Mechanize\/([0-9a-z\+\-\.]+)/si" +153[] = "123" +156[] = "/^SiteSucker\/([0-9a-z\.]+)/si" +156[] = "125" +155[] = "/^Xenu Link Sleuth ([0-9a-z\+\-\.]+)$/si" +155[] = "124" +160[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*Shiretoko\/([0-9a-z\+\-\.]+).*/si" +160[] = "128" +161[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*Minefield\/([0-9a-z\+\-\.]+).*/si" +161[] = "129" +164[] = "/^links \(([0-9a-z\.]+).*/si" +164[] = "132" +167[] = "/Netbox\/([0-9a-z\+\-\.]+).*/si" +167[] = "57" +171[] = "/mozilla.*Lotus-Notes\/([0-9a-z\+\-\.]+).*/si" +171[] = "134" +172[] = "/^klondike\/([0-9a-z\+\-\.]+).*/si" +172[] = "135" +173[] = "/^WapTiger\/5.0 \(http:\/\/www\.waptiger\.com\/.*/si" +173[] = "136" +174[] = "/^W3C_Validator\/([0-9a-z\+\-\.]+).*/si" +174[] = "137" +176[] = "/^HTMLParser\/([0-9a-z\.]+)$/si" +176[] = "139" +177[] = "/^LWP::Simple\/([0-9a-z\.]+)$/si" +177[] = "122" +178[] = "/^Java\/([0-9a-z\._]+)/si" +178[] = "140" +181[] = "/^UniversalFeedParser\/([0-9\.]+)/si" +181[] = "143" +185[] = "/Bookdog\/([0-9\.]+)/si" +185[] = "146" +186[] = "/http:\/\/Anonymouse.org\/ \(Unix\)/si" +186[] = "147" +187[] = "/Midori\/([0-9\.]+)/si" +187[] = "148" +188[] = "/boxee.*\(.*\ ([0-9a-zA-Z\.]+)\)/si" +188[] = "149" +189[] = "/^gPodder\/([0-9\.]+)/si" +189[] = "150" +192[] = "/NF-Browser\/([0-9\.]+)/si" +192[] = "33" +194[] = "/^WDG_Validator\/([0-9\.]+)/si" +194[] = "154" +195[] = "/^CSSCheck\/([0-9\.]+)/si" +195[] = "155" +196[] = "/^Page Valet\/([0-9a-z\.]+)/si" +196[] = "156" +198[] = "/mozilla.*Lunascape ([0-9a-z\+\-\.]+).*/si" +198[] = "52" +199[] = "/^BlackBerry[0-9a-z]+\/([0-9\.]+)/si" +199[] = "158" +204[] = "/^WinWAP\/([0-9\.]+)/si" +204[] = "161" +205[] = "/^XBMC\/([0-9a-z\.\-]+)/si" +205[] = "162" +206[] = "/^XML-RPC for PHP ([0-9\.]+)$/si" +206[] = "163" +207[] = "/^OmniWeb\/([0-9a-z\.\-]+)/si" +207[] = "18" +208[] = "/^FlyCast\/([0-9\.]+)/si" +208[] = "165" +209[] = "/^Bloglines\/([0-9\.]+)/si" +209[] = "166" +210[] = "/^Gregarius\/([0-9\.]+)/si" +210[] = "167" +211[] = "/^SimplePie\/([0-9a-z\. ]+)/si" +211[] = "168" +212[] = "/^PycURL\/([0-9\.]+)$/si" +212[] = "169" +213[] = "/^Apple-PubSub\/([0-9\.]+)$/si" +213[] = "170" +214[] = "/^Feedfetcher-Google.*http:\/\/www\.google\.com\/feedfetcher\.html/si" +214[] = "171" +215[] = "/^FeedValidator\/([0-9\.]+)$/si" +215[] = "172" +216[] = "/^MagpieRSS\/([0-9\.]+)/si" +216[] = "173" +217[] = "/^BlogBridge ([0-9\.]+)/si" +217[] = "174" +219[] = "/^Liferea\/([0-9\.]+).*http:\/\/liferea\.sf\.net\//si" +219[] = "176" +220[] = "/^HomePage Rss Reader ([0-9\.]+)/si" +220[] = "177" +221[] = "/^PHP\/([0-9a-z\.\-]+)$/si" +221[] = "178" +222[] = "/^REL Link Checker Lite ([0-9\.]+)$/si" +222[] = "179" +224[] = "/^Dragonfly File Reader/si" +224[] = "180" +225[] = "/^CPG Dragonfly RSS Module Feed Viewer/si" +225[] = "180" +226[] = "/^newsbeuter\/([0-9\.]+)/si" +226[] = "181" +227[] = "/^Jigsaw\/[0-9\.]+ W3C_CSS_Validator_JFouffa\/([0-9\.]+)$/si" +227[] = "182" +228[] = "/^FPLinkChecker\/([0-9\.]+)$/si" +228[] = "183" +229[] = "/^GoldenPod ([0-9\.]+)/si" +229[] = "184" +231[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*chimera\/([0-9a-z\+\-\.]+).*/si" +231[] = "1" +236[] = "/^curl\/([0-9a-zA-Z\.\-]+)/si" +236[] = "86" +238[] = "/^Mozilla\/4\.0.*Win32.*ActiveXperts\.Http\.([0-9\.]+)/si" +238[] = "192" +241[] = "/^check_http\/([0-9a-z\.]+) \(nagios\-plugins/si" +241[] = "195" +244[] = "/^P3P Validator$/si" +244[] = "198" +247[] = "/^JetBrains Omea Reader ([0-9\.]+)/si" +247[] = "200" +248[] = "/^GSiteCrawler\/([0-9a-z\.]+)/si" +248[] = "201" +249[] = "/^YahooFeedSeeker\/([0-9\.]+)/si" +249[] = "202" +250[] = "/^Democracy\/([0-9\.]+)/si" +250[] = "175" +251[] = "/^Java([0-9\._]+)$/si" +251[] = "140" +253[] = "/^mozilla\/.*MSIE [0-9\.]+.*TheWorld/si" +253[] = "204" +258[] = "/^NewsGatorOnline\/([0-9\.]+) \(http:\/\/www\.newsgator\.com/si" +258[] = "206" +260[] = "/^Web Downloader\/([0-9\.]+)$/si" +260[] = "39" +261[] = "/^Opera\/[0-9\.]+.*Presto\/[0-9\.]+ Version\/([0-9\.]+)$/si" +261[] = "17" +262[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Songbird\/([0-9\.]+)/si" +262[] = "208" +264[] = "/^RSS_Radio ([0-9\.]+)$/si" +264[] = "209" +265[] = "/^Feed::Find\/([0-9\.]+)$/si" +265[] = "210" +267[] = "/mozilla.*rv:[0-9\.]+.*gecko.*BonEcho\/([0-9a-z\+\-\.]+).*/si" +267[] = "212" +272[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*GreenBrowser/si" +272[] = "216" +273[] = "/^Awasu\/([0-9a-z\.]+)$/si" +273[] = "217" +274[] = "/^CorePlayer.*CorePlayer\/([0-9\._]+)$/si" +274[] = "218" +275[] = "/^Mozilla\/.*AppleWebKit.*QtWeb Internet Browser\/([0-9\.]+)/si" +275[] = "219" +276[] = "/^Mozilla\/.*AppleWebKit.*TeaShark\/([0-9\.]+)$/si" +276[] = "220" +277[] = "/^libsoup\/([0-9a-z\.]+)$/si" +277[] = "221" +279[] = "/^NetNewsWire\/([0-9a-z\.]+).*http:\/\/www\.newsgator\.com\/Individuals\/NetNews/si" +279[] = "222" +295[] = "/^Mozilla.*RISC.*Oregano ([0-9\.]+)/si" +295[] = "228" +293[] = "/^lftp\/([0-9a-z\.]+)$/s" +293[] = "227" +294[] = "/^WinWAP-SPBE\/([0-9\.]+)/si" +294[] = "161" +287[] = "/NokiaN93/si" +287[] = "226" +289[] = "/Nokia.*SymbianOS.*Series60/si" +289[] = "226" +296[] = "/^libsummer\/([0-9\.]+)/si" +296[] = "229" +292[] = "/SymbianOS.*Series60.*Nokia.*AppleWebKit/si" +292[] = "226" +297[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Acoo Browser/si" +297[] = "230" +298[] = "/^Mozilla.*NewsFox\/([0-9\.]+)/si" +298[] = "231" +305[] = "/^Ilium Software NewsBreak/si" +305[] = "237" +306[] = "/^LinkbackPlugin\/([0-9a-z\.]+) Laconica\//si" +306[] = "238" +307[] = "/^Microsoft Data Access Internet Publishing Provider DAV/si" +307[] = "239" +308[] = "/^gvfs\/([0-9a-z\.]+)/si" +308[] = "240" +311[] = "/^Cynthia ([0-9\.]+)$/si" +311[] = "242" +313[] = "/^Banshee ([0-9a-z\.]+).*http:\/\/banshee-project\.org/si" +313[] = "244" +316[] = "/^Mozilla\/.*ABrowse ([0-9\.]+).*Syllable/si" +316[] = "247" +317[] = "/^Funambol Outlook Plug-in.*([0-9\.]+)$/si" +317[] = "248" +318[] = "/^Funambol Mozilla Sync Client v([0-9\.]+)$/si" +318[] = "249" +320[] = "/^foobar2000\/([0-9a-z\._]+$)/si" +320[] = "251" +321[] = "/^GStreamer souphttpsrc libsoup\/[0-9\.]+$/si" +321[] = "252" +323[] = "/^php-openid\/([0-9\.]+)/si" +323[] = "254" +324[] = "/NCSA Mosaic\/([0-9a-z\+\-\.]+).*/si" +324[] = "117" +325[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Blackbird\/([0-9a-z\+\-\.]+).*/si" +325[] = "255" +328[] = "/^GreatNews\/([0-9\.]+)$/si" +328[] = "256" +329[] = "/mozilla.*applewebkit.*DeskBrowse\/([0-9a-z\+\-\.]+).*/si" +329[] = "257" +330[] = "/^TulipChain\/([0-9\.]+).*ostermiller.org\/tulipchain.*Java/si" +330[] = "258" +331[] = "/^Mozilla\/.*AppleWebKit\/.*Maxthon\/([0-9\.]+)/si" +331[] = "53" +333[] = "/^Mozilla\/.*Linux.*AppleWebKit.*tear/si" +333[] = "261" +334[] = "/^LinkExaminer\/([0-9\.]+) \(Windows\)$/si" +334[] = "262" +335[] = "/^Mozilla\/.*MSIE.*http:\/\/www\.Abolimba\.de/si" +335[] = "263" +336[] = "/^Mozilla\/.*Gecko\/.*Beonex\/([0-9a-z\.\-]+)/si" +336[] = "264" +337[] = "/^DocZilla\/([0-9\.]+).*Gecko\//si" +337[] = "265" +338[] = "/^retawq\/([0-9a-z\.]+).*\(text\)$/si" +338[] = "266" +339[] = "/^SAMSUNG.*Jasmine\/([0-9\.]+)/si" +339[] = "267" +341[] = "/Mozilla\/.*AppleWebKit.*Dooble/si" +341[] = "269" +345[] = "/^Bunjalloo\/([0-9\.]+).*Nintendo/si" +345[] = "273" +346[] = "/^LinkChecker\/([0-9\.]+).*linkchecker\.sourceforge\.net/si" +346[] = "274" +348[] = "/urlgrabber\/([0-9\.]+)/si" +348[] = "276" +349[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Spicebird\/([0-9a-z\+\-\.]+).*/si" +349[] = "277" +352[] = "/mozilla.*rv:[0-9\.]+.*gecko\/[0-9]+.*Namoroka\/([0-9a-z\+\-\.]+).*/si" +352[] = "278" +353[] = "/mozilla.*applewebkit.*rekonq/si" +353[] = "279" +354[] = "/^W3C_Multipage_Validator\/([0-9a-z\.]+).*http:\/\/www\.validator\.ca\//si" +354[] = "280" +355[] = "/^X\-Smiles\/([0-9a-z\.]+)/si" +355[] = "281" +360[] = "/^SZN-Image-Resizer$/si" +360[] = "284" +362[] = "/^Google-Listen\/([0-9a-z\.]+)/si" +362[] = "286" +364[] = "/^Mozilla\/.*Origyn Web Browser/si" +364[] = "288" +365[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Browzar/si" +365[] = "289" +366[] = "/^Claws Mail GtkHtml2 plugin ([0-9a-z\.]+).*http:\/\/www.claws-mail.org\/plugins.php/si" +366[] = "290" +367[] = "/Python\-urllib$/si" +367[] = "90" +370[] = "/^GomPlayer ([0-9, ]+)/si" +370[] = "293" +372[] = "/^W3C-mobileOK\/DDC-([0-9\.]+).* http:\/\/www.w3.org\/2006\/07\/mobileok-ddc/si" +372[] = "296" +373[] = "/^JoeDog\/.*Siege ([0-9\.]+)/si" +373[] = "297" +374[] = "/^iSiloXC\/([0-9\.]+)/si" +374[] = "298" +375[] = "/^ApacheBench\/([0-9a-z\-\.]+)$/si" +375[] = "299" +376[] = "/^anw webtool LoadControl\/([0-9\.]+)$/si" +376[] = "300" +377[] = "/^topSUBMIT.de HTMLChecker\/([0-9\.]+)$/si" +377[] = "301" +378[] = "/^edbrowse\/([0-9\.\-]+)/si" +378[] = "302" +379[] = "/^muCommander v([0-9\.]+)/si" +379[] = "303" +381[] = "/^XMPlay\/([0-9\.]+)$/si" +381[] = "304" +383[] = "/^Mozilla\/.*uZardWeb\/([0-9\.]+)/si" +383[] = "306" +384[] = "/^Mozilla\/3.0 \(compatible; Indy Library\)$/si" +384[] = "307" +385[] = "/^Mozilla\/.*MSIE.*Multi\-Browser ([0-9\.]+).*www\.multibrowser\.de/si" +385[] = "308" +386[] = "/^LinkWalker\/([0-9\.]+).*www\.seventwentyfour\.com/si" +386[] = "309" +387[] = "/^Mozilla.*compatible.*NetPositive\/([0-9\.]+)/si" +387[] = "310" +388[] = "/^Radio Downloader ([0-9\.]+)$/si" +388[] = "311" +389[] = "/^WebStripper\/([0-9\.]+)/si" +389[] = "312" +390[] = "/^Cyberduck\/([0-9\.]+)/si" +390[] = "313" +391[] = "/^WorldWideweb \(NEXT\)$/si" +391[] = "314" +393[] = "/^Mozilla\/4.0 \(compatible; RSS Popper\)$/si" +393[] = "316" +394[] = "/^Win.*Jamcast\/([0-9\.]+)/si" +394[] = "317" +395[] = "/^Jamcast ([0-9\.]+)$/si" +395[] = "317" +399[] = "/^MyIBrow\/([0-9\.]+).*Windows/si" +399[] = "320" +405[] = "/^Mozilla.*MSIE.*TencentTraveler ([0-9\.]+)/si" +405[] = "323" +412[] = "/^The Bat! ([0-9\.]+)$/si" +412[] = "330" +413[] = "/^Mozilla.*compatible.*BorderManager ([0-9\.]+)/si" +413[] = "331" +415[] = "/^PublicRadioPlayer\/([0-9\.]+)/si" +415[] = "333" +416[] = "/^PublicRadioApp\/([0-9\.]+)/si" +416[] = "333" +418[] = "/^RssBandit\/([0-9\.]+)/si" +418[] = "334" +419[] = "/^Microsoft Office\/14.*MSOffice 14/si" +419[] = "326" +420[] = "/^Mozilla.*Postbox\/([0-9a-zA-Z\.]+)/si" +420[] = "335" +423[] = "/^Checkbot\/([0-9\.]+)/si" +423[] = "337" +424[] = "/^GcMail Browser\/([0-9\.]+)/si" +424[] = "338" +425[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Swiftweasel\/([0-9a-z\+\-\.]+).*/si" +425[] = "339" +426[] = "/^Fastladder FeedFetcher\/([0-9\.]+).*fastladder.com/si" +426[] = "340" +427[] = "/mozilla.*rv:[0-9\.]+.*gecko.*Lorentz\/([0-9a-z\+\-\.]+).*/si" +427[] = "341" +428[] = "/^PocketTunes\/([0-9a-z\.]+)$/si" +428[] = "342" +433[] = "/^mozilla.*AppleWebKit.*Google Earth\/([0-9\.]+)/si " +433[] = "347" +435[] = "/^Rome Client \(http:\/\/tinyurl\.com\/64t5n\) Ver: ([0-9\.]+)/si" +435[] = "348" +437[] = "/^Akregator\/([0-9\.]+).*librss\/remnants/si" +437[] = "349" +445[] = "/^Pocomail\/([0-9\.]+)$/si" +445[] = "356" +447[] = "/^Mozilla.*MSIE.*SlimBrowser/si" +447[] = "358" +449[] = "/^LeechCraft.*LeechCraft\/Poshuku ([0-9a-z\-\.]+)/si" +449[] = "359" +450[] = "/^HTTP_Request2\/([0-9\.]+)/si" +450[] = "360" +451[] = "/^Mozilla.*Gecko.*Conkeror\/([0-9\.]+)/si" +451[] = "361" +452[] = "/^Mozilla.*NUCLEUS.*Dolfin\/([0-9\.]+)/si" +452[] = "362" +454[] = "/^Mozilla.*SAMSUNG.*Dolfin\/([0-9\.]+)/si" +454[] = "362" +458[] = "/^Web-sniffer\/([0-9\.]+).*web-sniffer\.net\/\)$/si" +458[] = "366" +459[] = "/^Atomic_Email_Hunter\/([0-9\.]+)$/si" +459[] = "367" +461[] = "/^webfetch\/([0-9\.]+)/si" +461[] = "369" +466[] = "/^AppleSyndication\/([0-9\.]+)$/si" +466[] = "374" +472[] = "/^Windows-RSS-Platform\/([0-9\.]+).*MSIE.* Windows/si" +472[] = "381" +473[] = "/^Trileet NewsRoom.*feedmonger\.blogspot\.com/si" +473[] = "382" +474[] = "/^Validator.nu\/([0-9\.]+)$/si" +474[] = "383" +475[] = "/^Zend_Http_Client$/si" +475[] = "384" +477[] = "/^Mozilla.*Android.*GoBrowser\/([0-9\.]+)/si" +477[] = "386" +478[] = "/^Mozilla.*Android.*GoBrowser/si" +478[] = "386" +482[] = "/^Xenu Link Sleuth\/([0-9a-z\+\-\.]+)$/si" +482[] = "124" +487[] = "/^Microsoft Office Existence Discovery/si" +487[] = "393" +490[] = "/^BrownReclusePro v([0-9\.]+).*SoftByteLabs.com/si" +490[] = "395" +493[] = "/^Mozilla.*Gecko\/[0-9]+.*WebianShell\/([0-9a-z\.]+)/si" +493[] = "399" +497[] = "/^CamelHttpStream\/([0-9\.]+)$/si" +497[] = "402" +404[] = "/^Mozilla.*MSIE.*TencentTraveler/si" +404[] = "323" +47[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Avant Browser/si" +47[] = "41" +52[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Deepnet Explorer/si" +52[] = "45" +79[] = "/mozilla.*applewebkit\/[0-9a-z\+\-\.]+.*/si" +79[] = "22" +82[] = "/mozilla.*\/[0-9\.]+.*gecko.*firefox.*/si" +82[] = "3" +166[] = "/mozilla.*MSIE [0-9a-z\+\-\.]+.*Maxthon/si" +166[] = "53" +193[] = "/mozilla.*rv:[0-9\.]+.*gecko.*GranParadiso\/([0-9a-z\+\-\.]+).*/si" +193[] = "153" +239[] = "/^MOT.*MIB\/([0-9\.]+)/si" +239[] = "193" +18[] = "/^opera\/([0-9a-z\+\-\.]+).*/si" +18[] = "17" +34[] = "/IBrowse\/([0-9a-z\+\-\.]+).*/si" +34[] = "31" +103[] = "/IBrowse/si" +103[] = "31" +105[] = "/Aweb.*Amiga/si" +105[] = "29" +138[] = "/Lynx/si" +138[] = "25" +139[] = "/libwww\-perl/si" +139[] = "51" +143[] = "/^opera ([0-9a-z\+\-\.]+).*/si" +143[] = "17" +190[] = "/^Samsung-[a-zA-Z09]+.*AU-MIC-[a-zA-Z0-9]+\/([0-9\.]+)/si" +190[] = "151" +191[] = "/^SonyEricsson.*SEMC-Browser\/([0-9\.]+)/si" +191[] = "152" +201[] = "/Browser\/Teleca|Teleca\/.*MIDP/si" +201[] = "151" +237[] = "/^MPlayer\//si" +237[] = "191" +242[] = "/^Windows\-Media\-Player\/([0-9\.]+)$/si" +242[] = "196" +243[] = "/^VLC media player \- version ([0-9a-z\-\.]+) .* VideoLAN team$/si" +243[] = "197" +245[] = "/^CSE HTML Validator Lite Online/si" +245[] = "199" +268[] = "/^QuickTime\/([0-9\.]+)/" +268[] = "213" +269[] = "/^QuickTime.*qtver=([0-9\.a-z]+)/si" +269[] = "213" +270[] = "/^PHPCrawl$/si" +270[] = "214" +280[] = "/http:\/\/code\.google\.com\/appengine/si" +280[] = "223" +299[] = "/^Mozilla.*Danger hiptop/si" +299[] = "33" +309[] = "/^Webkit\/.*Uzbl/si" +309[] = "241" +310[] = "/^Uzbl.*Webkit/si" +310[] = "241" +312[] = "/^Mozilla\/5\.0 \(Sage\)$/si" +312[] = "243" +357[] = "/^Xaldon_WebSpider\/([0-9a-z\.]+)/si" +357[] = "283" +358[] = "/^Xaldon WebSpider ([0-9a-z\.]+)/si" +358[] = "283" +397[] = "/Mozilla\/4.*OS\/2/si" +397[] = "4" +455[] = "/^Netvibes.*http:\/\/www\.netvibes\.com/si" +455[] = "363" +457[] = "/^The Incutio XML-RPC PHP Library/si" +457[] = "365" +479[] = "/\/GoBrowser\/([0-9\.]+)/si" +479[] = "386" +481[] = "/^iGooMap\/([0-9a-z\.]+).*pointworks/si" +481[] = "388" +491[] = "/^ColdFusion \(BookmarkTracker\.com\)$/si" +491[] = "396" +492[] = "/^BinGet\/([0-9a-zA-Z\.]+)/si" +492[] = "397" +480[] = "/^Surf\/([0-9\.]+).*AppleWebKit/si" +480[] = "387" +62[] = "/mozilla.*(rv:[0-9\.]+).*gecko\/[0-9]+.*/si" +62[] = "54" +202[] = "/Polaris\/([0-9\.]+)/si" +202[] = "159" +240[] = "/^Abilon$/si" +240[] = "194" +254[] = "/^webcollage\/([0-9\.]+)$/si" +254[] = "205" +255[] = "/^webcollage\-noporn\/([0-9\.]+)$/si" +255[] = "205" +256[] = "/^webcollage\.[a-z]+\/([0-9\.]+)$/si" +256[] = "205" +257[] = "/^webcollage1\/([0-9\.]+)$/si" +257[] = "205" +319[] = "/^RSS Menu\/([0-9\.]+)/si" +319[] = "250" +350[] = "/.*Obigo Browser ([0-9\.]+)/si" +350[] = "151" +392[] = "/^iVideo ([a-z0-9\.\ ]+).*iPhone OS/si" +392[] = "315" +462[] = "/^Mozilla\/4\.0 \(compatible; Synapse\)$/si" +462[] = "370" +464[] = "/^Mozilla.*SkipStone ([0-9\.]+)/si" +464[] = "372" +465[] = "/^Mozilla\/.*compatible.*Powermarks\/([0-9\.]+)/si" +465[] = "373" +483[] = "/^iTunes\/([0-9\.]+)/si" +483[] = "389" +95[] = "/^DoCoMo\//si" +95[] = "33" +165[] = "/mozilla.*PlayStation\ Portable.*/si" +165[] = "33" +200[] = "/Obigo.*Profile\/MIDP/si" +200[] = "151" +259[] = "/^Mozilla.*PRTG Network Monitor/si" +259[] = "207" +281[] = "/UCWEB/si" +281[] = "225" +315[] = "/^RSSOwl\/([0-9]\.[0-9]\.[0-9])/si" +315[] = "246" +332[] = "/^Axel ([0-9\.]+)/si" +332[] = "259" +343[] = "/^DownloadStudio\/([0-9\.]+)$/si" +343[] = "271" +344[] = "/^WinPodder.*http:\/\/winpodder\.com/si" +344[] = "272" +363[] = "/^Typhoeus.*http:\/\/github.com\/pauldix\/typhoeus/si" +363[] = "287" +368[] = "/^Azureus ([0-9a-z\.]+)/si" +368[] = "291" +380[] = "/^muCommander-file-API/si" +380[] = "303" +382[] = "/^NFReader\/([0-9\.]+)/si" +382[] = "305" +398[] = "/^SuperBot\/([0-9\.]+)/si" +398[] = "319" +417[] = "/PLAYSTATION 3/si" +417[] = "33" +421[] = "/^Postbox ([0-9a-z\.]+)/si" +421[] = "335" +429[] = "/^SharpReader\/([0-9\.]+)/si" +429[] = "343" +430[] = "/^YeahReader/si" +430[] = "344" +448[] = "/^LeechCraft/si" +448[] = "359" +453[] = "/^SAMSUNG.*Dolfin\/([0-9\.]+)/si" +453[] = "362" +456[] = "/^Chilkat\/([0-9\.]+) \(\+http:\/\/www\.chilkatsoft\.com\/ChilkatHttpUA\.asp\)/si" +456[] = "364" +460[] = "/^iGetter\/([0-9a-z\.]+).*/si" +460[] = "368" +467[] = "/^GoogleFriendConnect\/([0-9\.]+)$/si" +467[] = "375" +485[] = "/^Typhoeus.*http:\/\/github.com\/dbalatero\/typhoeus/si" +485[] = "287" +351[] = "/ObigoInternetBrowser/si" +351[] = "151" +83[] = "/mozilla.*(rv:[0-9\.]+).*/si" +83[] = "54" +263[] = "/^Avant Browser/si" +263[] = "41" +432[] = "/^holmes\/([0-9\.]+)/si" +432[] = "346" +347[] = "/^Mozilla\/.*MSIE 7\.0.*Trident\/4\.0/si" +347[] = "275" +326[] = "/^Mozilla\/4.0 \(compatible; MSIE ([0-9\.]+); Windows/si" +326[] = "35" +39[] = "/mozilla\/.*MSIE ([0-9b\.]+).*/si" +39[] = "35" +81[] = "/MSIE ([0-9a-z\+\-\.]+).*windows ce/si" +81[] = "157" +40[] = "/^Mozilla\/([0-9a-z\.\[\] ]+) \([a-z0-9;. \-]+\)/si" +40[] = "4" +356[] = "/WinHttp/si" +356[] = "282" +[browser_os] +; browser_id[] = "OS id" +18[] = "44" +23[] = "19" +39[] = "43" +43[] = "35" +59[] = "43" +62[] = "43" +65[] = "43" +69[] = "43" +70[] = "43" +71[] = "43" +82[] = "43" +83[] = "43" +88[] = "43" +93[] = "43" +95[] = "43" +97[] = "33" +98[] = "43" +100[] = "47" +102[] = "43" +107[] = "10" +108[] = "43" +109[] = "43" +113[] = "43" +116[] = "43" +124[] = "43" +125[] = "44" +146[] = "44" +151[] = "10" +152[] = "47" +159[] = "10" +170[] = "44" +179[] = "43" +194[] = "43" +200[] = "43" +201[] = "43" +209[] = "43" +217[] = "43" +220[] = "10" +221[] = "19" +225[] = "10" +235[] = "19" +237[] = "73" +239[] = "43" +240[] = "19" +248[] = "43" +251[] = "43" +256[] = "43" +260[] = "75" +261[] = "75" +271[] = "43" +272[] = "43" +281[] = "47" +282[] = "43" +283[] = "43" +286[] = "62" +293[] = "43" +304[] = "43" +305[] = "43" +310[] = "33" +311[] = "43" +312[] = "43" +313[] = "44" +314[] = "77" +316[] = "43" +330[] = "43" +334[] = "43" +344[] = "43" +349[] = "19" +356[] = "43" +362[] = "62" +367[] = "43" +369[] = "43" +373[] = "43" +388[] = "86" +393[] = "43" +395[] = "43" +[os_reg] +; os_reg_id[] = "OS regstring" +; os_reg_id[] = "OS id" +40[] = "/palm/si" +40[] = "35" +64[] = "/Win 9x 4\.90/si" +64[] = "8" +71[] = "/MorphOS/si" +71[] = "53" +92[] = "/iPhone OS ([0-9_]+) like Mac OS X/si" +92[] = "65" +67[] = "/Solaris/si" +67[] = "29" +90[] = "/iPhone OS 2_0/si" +90[] = "65" +102[] = "/Series60/si" +102[] = "34" +136[] = "/iPhone.*like Mac OS X/si" +136[] = "65" +138[] = "/^HTC_HD2.*Opera.*windows/si" +138[] = "96" +96[] = "/BeOS.*Haiku BePC/si" +96[] = "70" +125[] = "/Windows Mobile/si" +125[] = "88" +1[] = "/windows nt 5\.1/si" +1[] = "1" +5[] = "/.*windows 95.*/si" +5[] = "4" +3[] = "/windows nt 5\.0/si" +3[] = "2" +4[] = "/.*windows nt 5\.2( |;).*/si" +4[] = "3" +56[] = "/Series80\/2\.0/si" +56[] = "34" +6[] = "/.*win95.*/si" +6[] = "4" +7[] = "/windows 98/si" +7[] = "5" +8[] = "/.*win16( |;).*/si" +8[] = "6" +9[] = "/.*win98( |;).*/si" +9[] = "5" +10[] = "/.*windows 4\.10( |;).*/si" +10[] = "5" +11[] = "/windows ce|PocketPC/si" +11[] = "7" +12[] = "/.*windows me( |;).*/si" +12[] = "8" +13[] = "/.*windows nt 6\.0( |;).*/si" +13[] = "9" +14[] = "/j2me/si" +14[] = "10" +15[] = "/centos/si" +15[] = "11" +16[] = "/ubuntu/si" +16[] = "12" +17[] = "/linux.*debian/si" +17[] = "13" +18[] = "/linux.*fedora/si" +18[] = "14" +19[] = "/linux.*gentoo/si" +19[] = "15" +20[] = "/linux.*linspire/si" +20[] = "16" +21[] = "/linux.*mandriva/si" +21[] = "17" +22[] = "/linux.*mdk/si" +22[] = "17" +23[] = "/linux.*redhat/si" +23[] = "18" +25[] = "/linux.*slackware/si" +25[] = "20" +26[] = "/linux.*kanotix/si" +26[] = "21" +27[] = "/linux.*suse/si" +27[] = "22" +28[] = "/linux.*knoppix/si" +28[] = "23" +29[] = "/.*netbsd.*/si" +29[] = "24" +30[] = "/.*freebsd.*/si" +30[] = "25" +31[] = "/.*openbsd.*/si" +31[] = "26" +116[] = "/Mac OS X (10_6|10\.6)/si" +116[] = "85" +34[] = "/sunos/si" +34[] = "29" +35[] = "/amiga/si" +35[] = "30" +36[] = "/irix/si" +36[] = "31" +37[] = "/open.*vms/si" +37[] = "32" +38[] = "/beos/si" +38[] = "33" +42[] = "/webtv/si" +42[] = "37" +43[] = "/os\/2.*warp/si" +43[] = "39" +45[] = "/RISC.OS/si" +45[] = "40" +46[] = "/hp-ux/si" +46[] = "41" +47[] = "/Nintendo.Wii/si" +47[] = "42" +53[] = "/winnt/si" +53[] = "46" +57[] = "/SonyEricssonP900/si" +57[] = "34" +58[] = "/plan 9/si" +58[] = "49" +59[] = "/NetFront.*Profile\/MIDP/si" +59[] = "10" +61[] = "/Series90.*Nokia7710/si" +61[] = "34" +63[] = "/linux.*\(Dropline GNOME\).*/si" +63[] = "20" +65[] = "/WinNT4\.0/si" +65[] = "46" +66[] = "/linux.*red hat/si" +66[] = "18" +68[] = "/QNX x86pc/si" +68[] = "52" +69[] = "/Red Hat modified/si" +69[] = "18" +70[] = "/Windows\-NT/si" +70[] = "46" +137[] = "/iPad.*OS.*like Mac OS X/si" +137[] = "65" +73[] = "/CYGWIN_NT\-5.0/si" +73[] = "2" +75[] = "/^DoCoMo.*F900i/si" +75[] = "34" +76[] = "/Vector Linux/si" +76[] = "55" +77[] = "/riscos/si" +77[] = "40" +78[] = "/Linux Mint/si" +78[] = "56" +79[] = "/SCO_SV/si" +79[] = "57" +80[] = "/suse\-linux/si" +80[] = "22" +81[] = "/Arch Linux ([0-9a-zA-Z\.\-]+)/si" +81[] = "58" +83[] = "/SkyOS/si" +83[] = "59" +84[] = "/.*windows 3\.1.*/si" +84[] = "6" +86[] = "/Android ([0-9\.]+)/si" +86[] = "62" +87[] = "/windows nt 6\.1/si" +87[] = "64" +88[] = "/.*windows 2000( |;).*/si" +88[] = "2" +117[] = "/Mac OS X (10_5|10\.5)/si" +117[] = "84" +95[] = "/webOS\/.*AppleWebKit/si" +95[] = "69" +98[] = "/Windows NT 6\.0/si" +98[] = "9" +118[] = "/Mac OS X (10_4|10\.4)/si" +118[] = "83" +103[] = "/Danger hiptop [0-9\.]+/si" +103[] = "72" +110[] = "/Windows_XP\/5.1/si" +110[] = "1" +134[] = "/SymbianOS/si" +134[] = "34" +114[] = "/.*windows 7.*/si" +114[] = "64" +115[] = "/iPhone OS [0-9\.]+/si" +115[] = "65" +120[] = "/Mozilla.*Linux.*Maemo/si" +120[] = "75" +124[] = "/S60; SymbOS/si" +124[] = "34" +130[] = "/PCLinuxOS\/([0-9a-z\.\-]+)/si" +130[] = "92" +131[] = "/^Mozilla\/.*Linux.*Jolicloud/si" +131[] = "93" +132[] = "/PLAYSTATION 3/si" +132[] = "94" +139[] = "/^Mozilla.*CrOS.*Chrome/si" +139[] = "97" +140[] = "/Android.*Linux.*Opera Mobi/si" +140[] = "62" +119[] = "/Mac OS X/si" +119[] = "86" +24[] = "/linux/si" +24[] = "19" +82[] = "/Gentoo i686/si" +82[] = "15" +105[] = "/Konqueror.*SUSE/si" +105[] = "22" +106[] = "/Konqueror.*Fedora/si" +106[] = "14" +107[] = "/Obigo.*MIDP/si" +107[] = "10" +108[] = "/Teleca.*MIDP/si" +108[] = "10" +123[] = "/Windows 2000/si" +123[] = "2" +121[] = "/Windows NT 4/si" +121[] = "46" +39[] = "/symbian/si" +39[] = "34" +44[] = "/os\/2/si" +44[] = "87" +55[] = "/.*windows XP.*/si" +55[] = "1" +85[] = "/.*dragonfly.*/si" +85[] = "61" +122[] = "/Windows ME/si" +122[] = "8" +93[] = "/NT4\.0/si" +93[] = "46" +133[] = "/PlayStation Portable/si" +133[] = "94" +48[] = "/windows/si" +48[] = "43" +49[] = "/mac_powerpc/si" +49[] = "44" +50[] = "/Macintosh/si" +50[] = "44" +51[] = "/aix/si" +51[] = "45" +52[] = "/Win32/si" +52[] = "43" +54[] = "/java\/[0-9a-z\.]+/si" +54[] = "47" +60[] = "/BlackBerry/si" +60[] = "50" +109[] = "/Syllable/si" +109[] = "74" +74[] = "/powerpc\-apple/si" +74[] = "44" +135[] = "/AROS/si" +135[] = "95" +94[] = "/java[0-9a-z\.]+/si" +94[] = "47" +100[] = "/Series 60/si" +100[] = "34" +101[] = "/os=Mac/si" +101[] = "44" +111[] = "/SO=MAC10,6/si" +111[] = "44" +112[] = "/so=Mac 10.5.8/si" +112[] = "44" +127[] = "/Minix 3/si" +127[] = "91" +141[] = "/Nintendo DS/Si" +141[] = "98" +142[] = "/^Opera.*Android/si" +142[] = "62" +143[] = "/NokiaN97/si" +143[] = "34" +144[] = "/Nokia.*XpressMusic/si" +144[] = "34" +145[] = "/NokiaE66/si" +145[] = "34" +146[] = "/Nokia6700/si" +146[] = "34" +147[] = "/\(GNU;/si" +147[] = "99" +99[] = "/ mac/si" +99[] = "44" +126[] = "/Darwin 10\.3/si" +126[] = "90" +128[] = "/iPhone/si" +128[] = "65" +148[] = "/Unix/si" +148[] = "19" +129[] = "/Darwin/si" +129[] = "44" diff --git a/tags/semmelstatzR_1_0_0_beta/includes/functions.semr.php b/tags/semmelstatzR_1_0_0_beta/includes/functions.semr.php new file mode 100644 index 0000000..1e51417 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/functions.semr.php @@ -0,0 +1,419 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ +### Encodierung der IP-Adresse durch simple arithmetische Operation + function sem_encodeIP($ip) { + $ip_parts = split("[.]", $ip); + $new_ip = ($ip_parts[0]+700) . "." . ($ip_parts[1]*2) . "." . ($ip_parts[2]+600) . "." . ($ip_parts[3]*3); + return $new_ip; + } + +### Decodierung der IP-Adresse durch simple arithmetische Operation + function sem_decodeIP($ip) { + $ip_parts = split("[.]", $ip); + $new_ip = ($ip_parts[0]-700) . "." . ($ip_parts[1] / 2) . "." . ($ip_parts[2]-600) . "." . ($ip_parts[3]/3); + return $new_ip; + } + +### Ist IP-Adresse codiert? + function sem_checkIfIPisEncoded($ip) { + $ip_parts = split("[.]", $ip); + if($ip_parts[0]>700) { + return true; + } + else { + return false; + } + } + +### Auslesen der höchsten Post-ID + function sem_getMaxPostID() { + global $wpdb; + $maxpostid = $wpdb->get_var("SELECT MAX(ID) FROM ".$wpdb->posts." LIMIT 0,1"); + return $maxpostid; //Ganzzahl + } + +### Auslesen des User- bzw. Kommentarautornamen + function sem_getUsername() { + global $user_ID, $user_login, $isAdmin; + + get_currentuserinfo(); + + if($user_ID > 0) { + $useronline = $user_login; + + if(current_user_can('manage_options')) { + $isAdmin = 1; + } + else { + $isAdmin = 0; + } + } + elseif(isset($_COOKIE["comment_author_".COOKIEHASH])) { + $useronline = trim($_COOKIE["comment_author_".COOKIEHASH]); + $isAdmin = -1; + } + else { + $useronline = "Gast"; + $isAdmin = -1; + } + return $useronline; + } + +/** + * Check if agent is a bot + * + * @deprecated use Agents-object in the future + * + * @param string $user_agent + * @return boolean + */ +function sem_AreYouBot($user_agent) { + require_once 'class.agents.php'; + $oCheckAgent = new Agents($user_agent); + return $oCheckAgent->isBot(); +} + +### Referer nach Suchmaschinen-Queries und interner Suche prüfen und Suchstring extrahieren +function sem_getKeyword($referer) { + if(empty($referer)) return false; + $homehost = '%'.(substr($_SERVER['SERVER_NAME'],0,4) == 'www.')? + substr($_SERVER['SERVER_NAME'],4) . '%': + $_SERVER['SERVER_NAME'] . '%'; + + $keyword = parse_url($referer); + if(!isset($keyword['host']) || !isset($keyword['query'])) return false; + + if (preg_match("/google\./i", $keyword["host"])) { + if (preg_match("/imgurl/i", $keyword["query"])) { + parse_str($keyword["query"],$q); + $keyword = substr($q["prev"],10); + } + else if (preg_match("/translate\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + } + else { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + } + if($keyword == "") return; return "Google: ".$keyword; + } + elseif (preg_match("/search\.live\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "LiveSearch: ".$keyword; + } + elseif (preg_match("/bing\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "Bing: ".$keyword; + } + elseif (preg_match("/yahoo\./i", $keyword["host"])) { + if (preg_match("/images/i", $keyword["query"])) { + parse_str($keyword["query"],$q); + $keyword = $q["p"]; + } + else { + parse_str($keyword["query"],$q); + $keyword = $q["p"]; + } + if($keyword == "") return; return "Yahoo: ".$keyword; + } + elseif (preg_match("/aol\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "AOL: ".$keyword; + } + elseif (preg_match("/aolsvc\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "AOL: ".$keyword; + } + elseif (preg_match("/search\.msn\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "MSN: ".$keyword; + } + elseif (preg_match("/gmx\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["su"]; + if($keyword == "") return; return "GMX: ".$keyword; + } + elseif (preg_match("/\.bild\.t\-/i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["query"]; + if($keyword == "") return; return "BILD: ".$keyword; + } + elseif (preg_match("/t\-online\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "T-Online: ".$keyword; + } + elseif (preg_match("/suche\.web\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["su"]; + if($keyword == "") return; return "WEB.de: ".$keyword; + } + elseif (preg_match("/suche\.lycos\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["query"]; + if($keyword == "") return; return "Lycos: ".$keyword; + } + elseif (preg_match("/altavista\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "Altavista: ".$keyword; + } + elseif (preg_match("/alltheweb\./i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["q"]; + if($keyword == "") return; return "alltheweb: ".$keyword; + } + elseif (preg_match("/technorati\.com\/search\//", $referer)) { + $q = preg_split("/technorati\.com\/search\//", $referer,-1,PREG_SPLIT_NO_EMPTY); + $keyword = $q[1]; + if($keyword == "") return; return "Technorati: ".$keyword; + } + elseif (preg_match("/".$homehost."/i", $keyword["host"])) { + parse_str($keyword["query"],$q); + $keyword = $q["s"]; + if($keyword == "") return; return "Interne Suche: ".$keyword; + } + else { + return; + } + } + +### Anzahl der Datensätze in der statz-Tabelle + function sem_showNumStatzEntries() { + global $wpdb; + $numstatzentries = $wpdb->get_var("SELECT COUNT(id) FROM ".$wpdb->statz); + return $numstatzentries; // Zahl + } + +### Aufgezeichnete Tage in der statz-Tabelle + function sem_countDaysInStatzTable() { + global $wpdb; + $firstdate = $wpdb->get_var("SELECT MIN(time) FROM ".$wpdb->statz." LIMIT 0,1"); + if(!$firstdate) { + return 1; + } + else { + $firstdate = strtotime($firstdate); $now = time(); + $days = (int) (($now - $firstdate) / (60*60*24)+1); + return $days; // KOMPLETTE! Tage + } + } + +### Wenn Tage in statz-Tabelle kleiner als Tage in Daily-Statz, dann nimm Tage in Daily-Statz + function sem_compareLimitDays2DailyStatz () { + global $wpdb; + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + if (sem_countDaysInStatzTable() << $sem_options["statz_days_limit"]) { + $sem_options["statz_days_limit"] = sem_countDaysInStatzTable(); + update_option("semmelstatzR_options", $sem_options); + } + } + +### Zeigt Copyright-Notiz an + function sem_showCopyright() { + print ""; + } + +### statz-Tabelle leeren (NICHT LÖSCHEN!!!) +function sem_truncateStatzTable() { + global $wpdb, $userip; + $wpdb->query('TRUNCATE TABLE '.$wpdb->statz); + sem_optStatzTable(); + return $wpdb->query("INSERT INTO `$wpdb->statz`(ip, time, referer, page, username) VALUES('127.0.0.1', NOW(),NULL,0,'statz-Tabelle geleert')"); +} + +### Obsolet, bleibt aber aus Kompatibilitätsgründen zu SEMMELSTATZ_DELETE + function sem_delOldRecords($days) { + return true; + } + +### simpleEncoding für die GoogleChartAPI + function sem_encodeChartData($values) { + + $maxValue = max($values); + $simpleEncoding = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + $chartData = "s:"; + for ($i = 0; $i < count($values); $i++) { + $currentValue = $values[$i]; + + if ($currentValue > -1 && $maxValue <> 0) { + $chartData.=substr($simpleEncoding,61*($currentValue/$maxValue),1); + } + else { + $chartData.='_'; + } + } + return $chartData; + } + +### Datensätze älter als statz_recdays_limit-Tage löschen + function sem_delOutOfLimit() { + global $wpdb; + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $today = time(); $days = $sem_options["statz_recdays_limit"]; + $enddatum = $today - ($days * 86400); + $enddatum = date("Y-m-d", $enddatum) . " 23:59:59"; + $wpdb->query("DELETE FROM ".$wpdb->statz." WHERE time <= '".$enddatum."'"); + sem_optStatzTable(); + } + +### Wenn AUTOMATISCHES LIMIT aktiviert, dann LIMITIERE und erhöhe NEXT_CRON + function sem_doCronStatzLimit() { + sem_delOutOfLimit(); + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $statz_next_cron = $sem_options["statz_next_cron"] + 86400; + $sem_options["statz_next_cron"] = $statz_next_cron; + update_option("semmelstatzR_options", $sem_options); + } + +### Konvertiert Strings von utf-8 in ISO-8859 + function sem_encodeToIso($string) { + return mb_convert_encoding($string, "ISO-8859-1", mb_detect_encoding($string, "UTF-8, ISO-8859-1, ISO-8859-15", true)); + } + +### statz-Tabelle optimieren + function sem_optStatzTable() { + global $wpdb; + $wpdb->query("OPTIMIZE TABLE ".$wpdb->statz); + } + +### Unter bestimmten Voraussetzungen den Vortag in die statzhist-Tabelle schreiben + function sem_writeYesterdayToHist() { + global $wpdb; + if(!$wpdb->get_var("SELECT date FROM ".$wpdb->statzhist." WHERE substring(date,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) { + + if($wpdb->get_var("SELECT COUNT(ip) FROM ".$wpdb->statz." WHERE substring(time,1,10) = DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) { + + $yesterdays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, COUNT(DISTINCT referer) + AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE substring(time,1,10) = DATE_SUB(CURDATE(), + INTERVAL 1 DAY) GROUP BY date"); + + foreach ($yesterdays as $yesterday) { + $date = $yesterday->date; + $visitors = $yesterday->visitors; + $hits = $yesterday->hits; + $referers = $yesterday->referers; + } + + $sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits) + VALUES('$date', $referers, $visitors, $hits)"); + } + else { + $date = $wpdb->get_var("SELECT DATE_SUB(CURDATE(), INTERVAL 1 DAY)"); + $sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits) VALUES('$date', 0, 0, 0)"); + } + } + } + +/* Summen der vergangenen Tage in die statzhist schreiben */ + function sem_writeOldDaysToHist() { + global $wpdb; + if(!$wpdb->get_var("SELECT date FROM ".$wpdb->statzhist." WHERE substring(date,1,10) <= DATE_SUB(CURDATE(), INTERVAL 1 DAY)")) { + + $theolddays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, + COUNT(DISTINCT referer) AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE + substring(time,1,10) <= DATE_SUB(CURDATE(), INTERVAL 1 DAY) GROUP BY date ORDER BY time ASC"); + + foreach ($theolddays as $theoldday) { + $date = $theoldday->date; + $visitors = $theoldday->visitors; if(!$visitors) $visitors = 0; + $hits = $theoldday->hits; if(!$hits) $hits = 0; + $referers = $theoldday->referers; if(!$referers) $referers = 0; + $sql = $wpdb->query("INSERT INTO ".$wpdb->statzhist." (date, referers, visitors, hits) + VALUES('$date', $referers, $visitors, $hits)"); + } + } + } + +/** + * translate and return a string + * @uses wp-function __() and prefilled plugin gettextdomain + * + * @param string $sValue string to translate + * @param string $sDomain gettextdomain + * @return string translated string + */ +function semr_i18n($sValue, $sDomain = "semmelstatzR") { + return __($sValue, $sDomain); +} + +/** + * translate and echo a string + * @uses wp-function _e() and prefilled plugin gettextdomain + * + * @param string $sValue + * @param string $sDomain + * @return void + */ +function semr_i18ne($sValue, $sDomain = "semmelstatzR") { + _e($sValue, $sDomain); +} + +/** + * translate and return a plural or singular string based on an amount + * @uses wp-function _n() and prefilled plugin gettextdomain + * + * @param string $sSingular + * @param string $sPlural + * @param type $iNumber + * @param string $sDomain + * @return string + */ +function semr_i18np($sSingular, $sPlural, $iNumber, $sDomain = "semmelstatzR") { + return _n($sSingular, $sPlural, $iNumber, $sDomain); +} + +############################################## Ende SEMMELSTATZ-interne Funktionen +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/functions.semr_template.php b/tags/semmelstatzR_1_0_0_beta/includes/functions.semr_template.php new file mode 100644 index 0000000..dd54eec --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/functions.semr_template.php @@ -0,0 +1,310 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ +### Zeigt die letzten $num_posts-Posts an: Titel und absolutes Datum - CSS-id: #lastposts + function sem_showLastPosts($num_posts = 10) { + global $wpdb; + $lastposts = $wpdb->get_results("SELECT ID, post_title FROM ".$wpdb->posts." WHERE post_status = 'publish' + AND post_type = 'post' ORDER BY post_date DESC LIMIT 0, ".$num_posts); + print "
"; + if (empty($lastposts)) { + print "... noch keine Beiträge"; + } + else { + print "Die letzten ".$num_posts." Beiträge
"; + foreach ($lastposts as $lastpost) { + $posttitle = $lastpost->post_title; + $permalink = get_permalink($lastpost->ID); + $postdate = $lastpost->post_date; + print "".$posttitle."
\n"; + } + } + print "
"; + } + +### Zeigt die letzten $num_comments-Kommentare an: Autor und Post mit relativem Datum - CSS-id: #lastcomments + function sem_showLastComments($num_comments = 10) { + global $wpdb; + $comments = $wpdb->get_results("SELECT comment_author, comment_ID, comment_post_ID, comment_date + FROM ".$wpdb->comments." WHERE comment_approved = '1' ORDER BY comment_date DESC LIMIT 0, $num_comments"); + print "
"; + if (empty($comments)) { + print "Keine Kommentare"; + } + else { + print "Die letzten ".$num_comments." Kommentare
"; + foreach ($comments as $comment) { + $commentday = strtotime(substr($comment->comment_date,1,10)); + $today = time(); + $difference = ceil(($today - $commentday) / (60*60*24))-1; + if($difference == 0) { + $commentdate = "Heute um " . mysql2date("G:i", $comment->comment_date); + } + elseif($difference == 1) { + $commentdate = "Gestern um " . mysql2date("G:i", $comment->comment_date); + } + elseif($difference == 2) { + $commentdate = "Vorgestern um " . mysql2date("G:i", $comment->comment_date); + } + else { + $commentdate = mysql2date("j. F G:i", $comment->comment_date); + } + + print "$comment->comment_author@". get_the_title($comment->comment_post_ID) .", $commentdate
\n"; + } + } + print "
"; + } + +### Zeigt die $num_reads meist gelesenen Posts an - CSS-id: #mostreads + function sem_showMostReads($num_reads = 10) { + global $wpdb; + $mostreads = $wpdb->get_results("SELECT post_title AS posttitle, guid AS postid, hits AS hits FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, $num_reads"); + print "
"; + if (empty($mostreads)) { + print "... noch keine Einträge"; + } + else { + print "Die ".$num_reads." meist gelesenen Beiträge
"; + foreach ($mostreads as $mostread) { + $posttitle = $mostread->posttitle; + $postid = $mostread->postid; + //$permalink = get_permalink($mostread->postid); + $hits = $mostread->hits; + print "".$posttitle." (".$hits.")
\n"; + } + } + print "
"; + } + +### Zeigt die $num_reads meist gelesenen Posts an - CSS-id: #mostreads - ACHTUNG: Das Ergebnis der Funktion basiert auf der statz-Tabelle + function sem_showMostReadsOld($num_reads = 10) { + global $wpdb; + $mostreads = $wpdb->get_results("SELECT post_title AS posttitle, ".$wpdb->posts.".guid AS postid, + COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE + ".$wpdb->statz.".page = ".$wpdb->posts.".ID GROUP BY postid ORDER BY count DESC LIMIT 0, $num_reads"); + print "
"; + if (empty($mostreads)) { + print "... noch keine Einträge"; + } + else { + print "Die ".$num_reads." meist gelesenen Beiträge
"; + foreach ($mostreads as $mostread) { + $posttitle = $mostread->posttitle; + $postid = $mostread->postid; + //$permalink = get_permalink($mostread->postid); + $count = $mostread->count; + print "".$posttitle." (".$count.")
\n"; + } + } + print "
"; + } + +### Zeigt die $num_commented meist kommentierten Posts an - CSS-id: #mostcommented + function sem_showMostCommented($num_commented = 10) { + global $wpdb; + $mostcommented = $wpdb->get_results("SELECT guid, id, post_title, COUNT(*) AS count FROM ".$wpdb->comments.",". $wpdb->posts." WHERE + comment_approved = '1' AND comment_post_id = id GROUP BY id, post_title ORDER BY count DESC LIMIT 0, $num_commented"); + + print "
"; + if (empty($mostcommented)) { + print "... noch keine Einträge"; + } + else { + print "Die ".$num_commented." meist kommentierten Beiträge
"; + + foreach ($mostcommented as $key => $mostcommented) { + $posttitle = $mostcommented->post_title; + $count = $mostcommented->count; + $postid = $mostcommented->guid; + print "".$posttitle." (".$count.")
\n"; + } + } + print "
"; + } + +### Zeigt einen Zähler der Hits im jeweiligen Post. ACHTUNG: FUNKTIONIERT NUR IM LOOP (index.php, single.php) + function sem_showPostHitsInLoop($postid) { + global $wpdb; + $hits = $wpdb->get_var("SELECT hits FROM $wpdb->posts WHERE ID = $postid LIMIT 0,1"); + return $hits; + } + +### Anzahl aller Posts/Pages + function sem_showTotalPosts() { + global $wpdb; + $totalposts = $wpdb->get_var("SELECT COUNT(ID) AS num FROM ".$wpdb->posts." WHERE post_status = 'publish' LIMIT 0,1"); + return $totalposts; // Ganzzahl + } + +### Anzahl aller Kommentare + function sem_showTotalComments() { + global $wpdb; + $totalcomments = $wpdb->get_var("SELECT COUNT(comment_ID) AS num FROM ".$wpdb->comments." WHERE comment_approved = '1' LIMIT 0,1"); + return $totalcomments; // Ganzzahl + } + +### Anzahl aller User seit Beginn der Statzaufzeichnung + function sem_showTotalUsers() { + global $wpdb; + $totalusers = $wpdb->get_var("SELECT SUM(visitors) FROM ".$wpdb->statzhist." LIMIT 0,1"); + if(!$totalusers) $totalusers = 0; + return $totalusers; // Ganzzahl + } + +### Anzahl User pro Tag im Durchschnitt + function sem_showAverageUserPerDay() { + $averageuser = ceil(sem_showTotalUsers() / sem_showStatzDays()); + return $averageuser; + } + +### Datum des 1. Posts = Blogstart + function sem_showFirstPostDate() { + global $wpdb; + $firstpostdate = $wpdb->get_var("SELECT MIN(post_date) FROM ".$wpdb->posts." WHERE post_status = 'publish' AND post_date != '0000-00-00 00:00:00' LIMIT 0,1"); + $firstpostdate = mysql2date("j.n.Y", $firstpostdate); + return $firstpostdate; // String T.M.JJJJ + } + +### Datum des 1. Kommentars + function sem_showFirstCommentDate() { + global $wpdb; + $firstcommentdate = $wpdb->get_var("SELECT MIN(comment_date) FROM ".$wpdb->comments." WHERE comment_approved = '1' + AND comment_date != '0000-00-00 00:00:00' LIMIT 0,1"); + $firstcommentdate = mysql2date("j.n.Y", $firstcommentdate); + return $firstcommentdate; // String T.M.JJJJ + } + +### Anzahl der Kommentierer nach Nicknamen + function sem_showNumCommenters() { + global $wpdb; + $totalcommenters = $wpdb->get_var("SELECT COUNT(DISTINCT comment_author) FROM ".$wpdb->comments." WHERE comment_approved = '1' LIMIT 0,1"); + if(!$totalcommenters) $totalcommenters = 0; + return $totalcommenters; // Ganzzahl + } + +### Blog besteht seit x Tagen + function sem_showPostDays() { + global $wpdb; + $firstdate = $wpdb->get_var("SELECT MIN(post_date) AS date FROM ".$wpdb->posts." WHERE post_status = 'publish' AND post_date != '0000-00-00 00:00' LIMIT 0,1"); + $firstdate = strtotime($firstdate); $now = time(); + $blogdays = (int) (($now - $firstdate) / (60*60*24)); + $blogdays = $blogdays + 1; + return $blogdays; // Ganzzahl + } + +### Tage seit 1. Kommentar + function sem_showCommentDays() { + global $wpdb; + $firstdate = $wpdb->get_var("SELECT MIN(comment_date) AS date FROM ".$wpdb->comments." LIMIT 0,1"); + $firstdate = strtotime($firstdate); $now = time(); + $commentdays = (int) (($now - $firstdate) / (60*60*24)); + $commentdays = $commentdays + 1; + return $commentdays; // Ganzzahl + } + +### durchschn. Posts pro Tag + function sem_showPostsPerDay() { + global $wpdb; + $postsperday = (int) sem_showTotalPosts() / (int) sem_showPostDays(); + return $postsperday; // Ganzzahl + } + +### durchschn. Kommentare pro Tag + function sem_showCommentsPerDay() { + global $wpdb; + $commentsperday = (int) sem_showTotalComments() / (int) sem_showCommentDays(); + return $commentsperday; // Ganzzahl + } + +### Startdatum der Gesamtstatistik (Basis: statzhist) + function sem_showStatzStartDate() { + global $wpdb; + $statzhiststartdate = $wpdb->get_var("SELECT MIN(date) FROM ".$wpdb->statzhist." WHERE date != '0000-00-00 00:00' LIMIT 0,1"); + $statzhiststartdate = mysql2date("j.n.Y", $statzhiststartdate); + // if(!$statzhiststartdate) $statzhiststartdate= "xx.xx.xxxx"; + return $statzhiststartdate; // String T.M.JJJJ + } + +### Dauer der Statistikaufzeichnung in Tagen (Basis: statzhist) + function sem_showStatzDays() { + global $wpdb; + $firstdate = $wpdb->get_var("SELECT MIN(date) FROM ".$wpdb->statzhist." LIMIT 0,1"); + if(!$firstdate) { + return 1; + } + else { + $firstdate = strtotime($firstdate); $now = time(); + $statzdays = (int) (($now - $firstdate) / (60*60*24)); + return $statzdays; // Ganzzahl + } + } + +### Anzahl der Online-Besucher - Verweildauer in den Einstellungen + function sem_showNumUsersOnline() { + global $wpdb; + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $onlinetime = $sem_options["statz_online_time"]; + $numonline = $wpdb->get_var("SELECT COUNT(DISTINCT ip) FROM ".$wpdb->statz." WHERE time > Now() - INTERVAL ".$onlinetime." SECOND"); + return $numonline; // Ganzzahl + } + +### Anzahl der heutigen Besucher + function sem_showUsersToday() { + global $wpdb; $today = date("Y-m-d"); + $todayusers = $wpdb->get_var("SELECT COUNT(DISTINCT ip) FROM ".$wpdb->statz." WHERE time >= '$today' LIMIT 0, 1"); + return $todayusers; + } + +### Anzahl der gestrigen Besucher + function sem_showUsersYesterday() { + global $wpdb; + $yesterdaysusers = $wpdb->get_var("SELECT visitors FROM ".$wpdb->statzhist." WHERE date = substr(DATE_SUB(NOW(), INTERVAL 1 DAY),1,10) LIMIT 0, 1"); + return $yesterdaysusers; + } + +##################################################### Ende TEMPLATE-Funktionen +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/GPLv3.txt b/tags/semmelstatzR_1_0_0_beta/includes/pChart/GPLv3.txt new file mode 100644 index 0000000..10926e8 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/GPLv3.txt @@ -0,0 +1,675 @@ + 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. + + + Copyright (C) + + 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: + + Copyright (C) + 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/tags/semmelstatzR_1_0_0_beta/includes/pChart/change.log b/tags/semmelstatzR_1_0_0_beta/includes/pChart/change.log new file mode 100644 index 0000000..7b223a6 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/change.log differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBarcode128.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBarcode128.class.php new file mode 100644 index 0000000..670ca63 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBarcode128.class.php @@ -0,0 +1,184 @@ +Codes = ""; + $this->Reverse = ""; + + $FileHandle = @fopen($BasePath."data/128B.db", "r"); + + if (!$FileHandle) { die("Cannot find barcode database (".$BasePath."128B.db)."); } + + while (!feof($FileHandle)) + { + $Buffer = fgets($FileHandle,4096); + $Buffer = str_replace(chr(10),"",$Buffer); + $Buffer = str_replace(chr(13),"",$Buffer); + $Values = preg_split("/;/",$Buffer); + + $this->Codes[$Values[1]]["ID"] = $Values[0]; + $this->Codes[$Values[1]]["Code"] = $Values[2]; + $this->Reverse[$Values[0]]["Code"] = $Values[2]; + $this->Reverse[$Values[0]]["Asc"] = $Values[1]; + } + fclose($FileHandle); + } + + /* Return the projected size of a barcode */ + function getSize($TextString,$Format="") + { + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; + $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; + $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : 12; + $Height = isset($Format["Height"]) ? $Format["Height"] : 30; + + $TextString = $this->encode128($TextString); + $BarcodeLength = strlen($this->Result); + + if ( $DrawArea ) { $WOffset = 20; } else { $WOffset = 0; } + if ( $ShowLegend ) { $HOffset = $FontSize+$LegendOffset+$WOffset; } else { $HOffset = 0; } + + $X1 = cos($Angle * PI / 180) * ($WOffset+$BarcodeLength); + $Y1 = sin($Angle * PI / 180) * ($WOffset+$BarcodeLength); + + $X2 = $X1 + cos(($Angle+90) * PI / 180) * ($HOffset+$Height); + $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * ($HOffset+$Height); + + + $AreaWidth = max(abs($X1),abs($X2)); + $AreaHeight = max(abs($Y1),abs($Y2)); + + return(array("Width"=>$AreaWidth,"Height"=>$AreaHeight)); + } + + function encode128($Value,$Format="") + { + $this->Result = "11010010000"; + $this->CRC = 104; + $TextString = ""; + + for($i=1;$i<=strlen($Value);$i++) + { + $CharCode = ord($this->mid($Value,$i,1)); + if ( isset($this->Codes[$CharCode]) ) + { + $this->Result = $this->Result.$this->Codes[$CharCode]["Code"]; + $this->CRC = $this->CRC + $i*$this->Codes[$CharCode]["ID"]; + $TextString = $TextString.chr($CharCode); + } + } + $this->CRC = $this->CRC - floor($this->CRC/103)*103; + + $this->Result = $this->Result.$this->Reverse[$this->CRC]["Code"]; + $this->Result = $this->Result."1100011101011"; + + return($TextString); + } + + /* Create the encoded string */ + function draw($Object,$Value,$X,$Y,$Format="") + { + $this->pChartObject = $Object; + + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Height = isset($Format["Height"]) ? $Format["Height"] : 30; + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; + $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; + $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; + $AreaR = isset($Format["AreaR"]) ? $Format["AreaR"] : 255; + $AreaG = isset($Format["AreaG"]) ? $Format["AreaG"] : 255; + $AreaB = isset($Format["AreaB"]) ? $Format["AreaB"] : 255; + $AreaBorderR = isset($Format["AreaBorderR"]) ? $Format["AreaBorderR"] : $AreaR; + $AreaBorderG = isset($Format["AreaBorderG"]) ? $Format["AreaBorderG"] : $AreaG; + $AreaBorderB = isset($Format["AreaBorderB"]) ? $Format["AreaBorderB"] : $AreaB; + + $TextString = $this->encode128($Value); + + if ( $DrawArea ) + { + $X1 = $X + cos(($Angle-135) * PI / 180) * 10; + $Y1 = $Y + sin(($Angle-135) * PI / 180) * 10; + + $X2 = $X1 + cos($Angle * PI / 180) * (strlen($this->Result)+20); + $Y2 = $Y1 + sin($Angle * PI / 180) * (strlen($this->Result)+20); + + if ( $ShowLegend ) + { + $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); + $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); + } + else + { + $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+20); + $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+20); + } + + $X4 = $X3 + cos(($Angle+180) * PI / 180) * (strlen($this->Result)+20); + $Y4 = $Y3 + sin(($Angle+180) * PI / 180) * (strlen($this->Result)+20); + + $Polygon = array($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4); + $Settings = array("R"=>$AreaR,"G"=>$AreaG,"B"=>$AreaB,"BorderR"=>$AreaBorderR,"BorderG"=>$AreaBorderG,"BorderB"=>$AreaBorderB); + $this->pChartObject->drawPolygon($Polygon,$Settings); + } + + for($i=1;$i<=strlen($this->Result);$i++) + { + if ( $this->mid($this->Result,$i,1) == 1 ) + { + $X1 = $X + cos($Angle * PI / 180) * $i; + $Y1 = $Y + sin($Angle * PI / 180) * $i; + $X2 = $X1 + cos(($Angle+90) * PI / 180) * $Height; + $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * $Height; + + $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + $this->pChartObject->drawLine($X1,$Y1,$X2,$Y2,$Settings); + } + } + + if ( $ShowLegend ) + { + $X1 = $X + cos($Angle * PI / 180) * (strlen($this->Result)/2); + $Y1 = $Y + sin($Angle * PI / 180) * (strlen($this->Result)/2); + + $LegendX = $X1 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset); + $LegendY = $Y1 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset); + + $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Angle"=>-$Angle,"Align"=>TEXT_ALIGN_TOPMIDDLE); + $this->pChartObject->drawText($LegendX,$LegendY,$TextString,$Settings); + } + } + + function left($value,$NbChar) { return substr($value,0,$NbChar); } + function right($value,$NbChar) { return substr($value,strlen($value)-$NbChar,$NbChar); } + function mid($value,$Depart,$NbChar) { return substr($value,$Depart-1,$NbChar); } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBarcode39.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBarcode39.class.php new file mode 100644 index 0000000..554be9b --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBarcode39.class.php @@ -0,0 +1,200 @@ +MOD43 = $EnableMOD43; + $this->Codes = ""; + $this->Reverse = ""; + + $FileHandle = @fopen($BasePath."data/39.db", "r"); + + if (!$FileHandle) { die("Cannot find barcode database (".$BasePath."data/39.db)."); } + + while (!feof($FileHandle)) + { + $Buffer = fgets($FileHandle,4096); + $Buffer = str_replace(chr(10),"",$Buffer); + $Buffer = str_replace(chr(13),"",$Buffer); + $Values = preg_split("/;/",$Buffer); + + $this->Codes[$Values[0]] = $Values[1]; + } + fclose($FileHandle); + } + + /* Return the projected size of a barcode */ + function getSize($TextString,$Format="") + { + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; + $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; + $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : 12; + $Height = isset($Format["Height"]) ? $Format["Height"] : 30; + + $TextString = $this->encode39($TextString); + $BarcodeLength = strlen($this->Result); + + if ( $DrawArea ) { $WOffset = 20; } else { $WOffset = 0; } + if ( $ShowLegend ) { $HOffset = $FontSize+$LegendOffset+$WOffset; } else { $HOffset = 0; } + + $X1 = cos($Angle * PI / 180) * ($WOffset+$BarcodeLength); + $Y1 = sin($Angle * PI / 180) * ($WOffset+$BarcodeLength); + + $X2 = $X1 + cos(($Angle+90) * PI / 180) * ($HOffset+$Height); + $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * ($HOffset+$Height); + + + $AreaWidth = max(abs($X1),abs($X2)); + $AreaHeight = max(abs($Y1),abs($Y2)); + + return(array("Width"=>$AreaWidth,"Height"=>$AreaHeight)); + } + + /* Create the encoded string */ + function encode39($Value) + { + $this->Result = "100101101101"."0"; + $TextString = ""; + for($i=1;$i<=strlen($Value);$i++) + { + $CharCode = ord($this->mid($Value,$i,1)); + if ( $CharCode >= 97 && $CharCode <= 122 ) { $CharCode = $CharCode - 32; } + + if ( isset($this->Codes[chr($CharCode)]) ) + { + $this->Result = $this->Result.$this->Codes[chr($CharCode)]."0"; + $TextString = $TextString.chr($CharCode); + } + } + + if ( $this->MOD43 ) + { + $Checksum = $this->checksum($TextString); + $this->Result = $this->Result.$this->Codes[$Checksum]."0"; + } + + $this->Result = $this->Result."100101101101"; + $TextString = "*".$TextString."*"; + + return($TextString); + } + + /* Create the encoded string */ + function draw($Object,$Value,$X,$Y,$Format="") + { + $this->pChartObject = $Object; + + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Height = isset($Format["Height"]) ? $Format["Height"] : 30; + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $ShowLegend = isset($Format["ShowLegend"]) ? $Format["ShowLegend"] : FALSE; + $LegendOffset = isset($Format["LegendOffset"]) ? $Format["LegendOffset"] : 5; + $DrawArea = isset($Format["DrawArea"]) ? $Format["DrawArea"] : FALSE; + $AreaR = isset($Format["AreaR"]) ? $Format["AreaR"] : 255; + $AreaG = isset($Format["AreaG"]) ? $Format["AreaG"] : 255; + $AreaB = isset($Format["AreaB"]) ? $Format["AreaB"] : 255; + $AreaBorderR = isset($Format["AreaBorderR"]) ? $Format["AreaBorderR"] : $AreaR; + $AreaBorderG = isset($Format["AreaBorderG"]) ? $Format["AreaBorderG"] : $AreaG; + $AreaBorderB = isset($Format["AreaBorderB"]) ? $Format["AreaBorderB"] : $AreaB; + + $TextString = $this->encode39($Value); + + if ( $DrawArea ) + { + $X1 = $X + cos(($Angle-135) * PI / 180) * 10; + $Y1 = $Y + sin(($Angle-135) * PI / 180) * 10; + + $X2 = $X1 + cos($Angle * PI / 180) * (strlen($this->Result)+20); + $Y2 = $Y1 + sin($Angle * PI / 180) * (strlen($this->Result)+20); + + if ( $ShowLegend ) + { + $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); + $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset+$this->pChartObject->FontSize+10); + } + else + { + $X3 = $X2 + cos(($Angle+90) * PI / 180) * ($Height+20); + $Y3 = $Y2 + sin(($Angle+90) * PI / 180) * ($Height+20); + } + + $X4 = $X3 + cos(($Angle+180) * PI / 180) * (strlen($this->Result)+20); + $Y4 = $Y3 + sin(($Angle+180) * PI / 180) * (strlen($this->Result)+20); + + $Polygon = array($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4); + $Settings = array("R"=>$AreaR,"G"=>$AreaG,"B"=>$AreaB,"BorderR"=>$AreaBorderR,"BorderG"=>$AreaBorderG,"BorderB"=>$AreaBorderB); + $this->pChartObject->drawPolygon($Polygon,$Settings); + } + + for($i=1;$i<=strlen($this->Result);$i++) + { + if ( $this->mid($this->Result,$i,1) == 1 ) + { + $X1 = $X + cos($Angle * PI / 180) * $i; + $Y1 = $Y + sin($Angle * PI / 180) * $i; + $X2 = $X1 + cos(($Angle+90) * PI / 180) * $Height; + $Y2 = $Y1 + sin(($Angle+90) * PI / 180) * $Height; + + $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + $this->pChartObject->drawLine($X1,$Y1,$X2,$Y2,$Settings); + } + } + + if ( $ShowLegend ) + { + $X1 = $X + cos($Angle * PI / 180) * (strlen($this->Result)/2); + $Y1 = $Y + sin($Angle * PI / 180) * (strlen($this->Result)/2); + + $LegendX = $X1 + cos(($Angle+90) * PI / 180) * ($Height+$LegendOffset); + $LegendY = $Y1 + sin(($Angle+90) * PI / 180) * ($Height+$LegendOffset); + + $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Angle"=>-$Angle,"Align"=>TEXT_ALIGN_TOPMIDDLE); + $this->pChartObject->drawText($LegendX,$LegendY,$TextString,$Settings); + } + } + + function checksum( $string ) + { + $checksum = 0; + $length = strlen( $string ); + $charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%'; + + for( $i=0; $i < $length; ++$i ) + $checksum += strpos( $charset, $string[$i] ); + + return substr( $charset, ($checksum % 43), 1 ); + } + + function left($value,$NbChar) { return substr($value,0,$NbChar); } + function right($value,$NbChar) { return substr($value,strlen($value)-$NbChar,$NbChar); } + function mid($value,$Depart,$NbChar) { return substr($value,$Depart-1,$NbChar); } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBubble.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBubble.class.php new file mode 100644 index 0000000..dbe123f --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pBubble.class.php @@ -0,0 +1,326 @@ +pChartObject = $pChartObject; + $this->pDataObject = $pDataObject; + } + + /* Prepare the scale */ + function bubbleScale($DataSeries,$WeightSeries) + { + if ( !is_array($DataSeries) ) { $DataSeries = array($DataSeries); } + if ( !is_array($WeightSeries) ) { $WeightSeries = array($WeightSeries); } + + /* Parse each data series to find the new min & max boundaries to scale */ + $NewPositiveSerie = ""; $NewNegativeSerie = ""; $MaxValues = 0; $LastPositive = 0; $LastNegative = 0; + foreach($DataSeries as $Key => $SerieName) + { + $SerieWeightName = $WeightSeries[$Key]; + + $this->pDataObject->setSerieDrawable($SerieWeightName,FALSE); + + if ( count($this->pDataObject->Data["Series"][$SerieName]["Data"]) > $MaxValues ) { $MaxValues = count($this->pDataObject->Data["Series"][$SerieName]["Data"]); } + + foreach($this->pDataObject->Data["Series"][$SerieName]["Data"] as $Key => $Value) + { + if ( $Value >= 0 ) + { + $BubbleBounds = $Value + $this->pDataObject->Data["Series"][$SerieWeightName]["Data"][$Key]; + + if ( !isset($NewPositiveSerie[$Key]) ) + { $NewPositiveSerie[$Key] = $BubbleBounds; } + elseif ( $NewPositiveSerie[$Key] < $BubbleBounds ) + { $NewPositiveSerie[$Key] = $BubbleBounds; } + + $LastPositive = $BubbleBounds; + } + else + { + $BubbleBounds = $Value - $this->pDataObject->Data["Series"][$SerieWeightName]["Data"][$Key]; + + if ( !isset($NewNegativeSerie[$Key]) ) + { $NewNegativeSerie[$Key] = $BubbleBounds; } + elseif ( $NewNegativeSerie[$Key] > $BubbleBounds ) + { $NewNegativeSerie[$Key] = $BubbleBounds; } + + $LastNegative = $BubbleBounds; + } + } + } + + /* Check for missing values and all the fake positive serie */ + if ( $NewPositiveSerie != "" ) + { + for ($i=0; $i<$MaxValues; $i++) { if (!isset($NewPositiveSerie[$i])) { $NewPositiveSerie[$i] = $LastPositive; } } + + $this->pDataObject->addPoints($NewPositiveSerie,"BubbleFakePositiveSerie"); + } + + /* Check for missing values and all the fake negative serie */ + if ( $NewNegativeSerie != "" ) + { + for ($i=0; $i<$MaxValues; $i++) { if (!isset($NewNegativeSerie[$i])) { $NewNegativeSerie[$i] = $LastNegative; } } + + $this->pDataObject->addPoints($NewNegativeSerie,"BubbleFakeNegativeSerie"); + } + } + + function resetSeriesColors() + { + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + $ID = 0; + foreach($Data["Series"] as $SerieName => $SeriesParameters) + { + if ( $SeriesParameters["isDrawable"] ) + { + $this->pDataObject->Data["Series"][$SerieName]["Color"]["R"] = $Palette[$ID]["R"]; + $this->pDataObject->Data["Series"][$SerieName]["Color"]["G"] = $Palette[$ID]["G"]; + $this->pDataObject->Data["Series"][$SerieName]["Color"]["B"] = $Palette[$ID]["B"]; + $this->pDataObject->Data["Series"][$SerieName]["Color"]["Alpha"] = $Palette[$ID]["Alpha"]; + $ID++; + } + } + } + + /* Prepare the scale */ + function drawBubbleChart($DataSeries,$WeightSeries,$Format="") + { + $ForceAlpha = isset($Format["ForceAlpha"]) ? $Format["ForceAlpha"] : VOID; + $DrawBorder = isset($Format["DrawBorder"]) ? $Format["DrawBorder"] : TRUE; + $BorderWidth = isset($Format["BorderWidth"]) ? $Format["BorderWidth"] : 1; + $Shape = isset($Format["Shape"]) ? $Format["Shape"] : BUBBLE_SHAPE_ROUND; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 0; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 0; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 0; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + if ( !is_array($DataSeries) ) { $DataSeries = array($DataSeries); } + if ( !is_array($WeightSeries) ) { $WeightSeries = array($WeightSeries); } + + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + if ( isset($Data["Series"]["BubbleFakePositiveSerie"] ) ) { $this->pDataObject->setSerieDrawable("BubbleFakePositiveSerie",FALSE); } + if ( isset($Data["Series"]["BubbleFakeNegativeSerie"] ) ) { $this->pDataObject->setSerieDrawable("BubbleFakeNegativeSerie",FALSE); } + + $this->resetSeriesColors(); + + list($XMargin,$XDivs) = $this->pChartObject->scaleGetXSettings(); + + foreach($DataSeries as $Key => $SerieName) + { + $AxisID = $Data["Series"][$SerieName]["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + if (isset($Data["Series"][$SerieName]["Description"])) { $SerieDescription = $Data["Series"][$SerieName]["Description"]; } else { $SerieDescription = $SerieName; } + + $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; + + $X = $this->pChartObject->GraphAreaX1 + $XMargin; + $Y = $this->pChartObject->GraphAreaY1 + $XMargin; + + $Color = array("R"=>$Palette[$Key]["R"],"G"=>$Palette[$Key]["G"],"B"=>$Palette[$Key]["B"],"Alpha"=>$Palette[$Key]["Alpha"]); + + if ( $ForceAlpha != VOID ) { $Color["Alpha"]=$ForceAlpha; } + + if ( $DrawBorder ) + { + if ( $BorderWidth != 1 ) + { + if ( $Surrounding != NULL ) + { $BorderR = $Palette[$Key]["R"]+$Surrounding; $BorderG = $Palette[$Key]["G"]+$Surrounding; $BorderB = $Palette[$Key]["B"]+$Surrounding; } + else + { $BorderR = $BorderR; $BorderG = $BorderG; $BorderB = $BorderB; } + if ( $ForceAlpha != VOID ) { $BorderAlpha = $ForceAlpha/2; } + $BorderColor = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); + } + else + { + $Color["BorderAlpha"] = $BorderAlpha; + + if ( $Surrounding != NULL ) + { $Color["BorderR"] = $Palette[$Key]["R"]+$Surrounding; $Color["BorderG"] = $Palette[$Key]["G"]+$Surrounding; $Color["BorderB"] = $Palette[$Key]["B"]+$Surrounding; } + else + { $Color["BorderR"] = $BorderR; $Color["BorderG"] = $BorderG; $Color["BorderB"] = $BorderB; } + if ( $ForceAlpha != VOID ) { $Color["BorderAlpha"] = $ForceAlpha/2; } + } + } + + foreach($Data["Series"][$SerieName]["Data"] as $iKey => $Point) + { + $Weight = $Point + $Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]; + + $PosArray = $this->pChartObject->scaleComputeY($Point,array("AxisID"=>$AxisID)); + $WeightArray = $this->pChartObject->scaleComputeY($Weight,array("AxisID"=>$AxisID)); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; } + $Y = floor($PosArray); $CircleRadius = floor(abs($PosArray - $WeightArray)/2); + + if ( $Shape == BUBBLE_SHAPE_SQUARE ) + { + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("RECT",floor($X-$CircleRadius).",".floor($Y-$CircleRadius).",".floor($X+$CircleRadius).",".floor($Y+$CircleRadius),$this->pChartObject->toHTMLColor($Palette[$Key]["R"],$Palette[$Key]["G"],$Palette[$Key]["B"]),$SerieDescription,$Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]); } + + if ( $BorderWidth != 1 ) + { + $this->pChartObject->drawFilledRectangle($X-$CircleRadius-$BorderWidth,$Y-$CircleRadius-$BorderWidth,$X+$CircleRadius+$BorderWidth,$Y+$CircleRadius+$BorderWidth,$BorderColor); + $this->pChartObject->drawFilledRectangle($X-$CircleRadius,$Y-$CircleRadius,$X+$CircleRadius,$Y+$CircleRadius,$Color); + } + else + $this->pChartObject->drawFilledRectangle($X-$CircleRadius,$Y-$CircleRadius,$X+$CircleRadius,$Y+$CircleRadius,$Color); + } + elseif ( $Shape == BUBBLE_SHAPE_ROUND ) + { + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".floor($CircleRadius),$this->pChartObject->toHTMLColor($Palette[$Key]["R"],$Palette[$Key]["G"],$Palette[$Key]["B"]),$SerieDescription,$Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]); } + + if ( $BorderWidth != 1 ) + { + $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius+$BorderWidth,$BorderColor); + $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius,$Color); + } + else + $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius,$Color); + } + + $X = $X + $XStep; + } + elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1-$XMargin*2)/$XDivs; } + $X = floor($PosArray); $CircleRadius = floor(abs($PosArray - $WeightArray)/2); + + if ( $Shape == BUBBLE_SHAPE_SQUARE ) + { + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("RECT",floor($X-$CircleRadius).",".floor($Y-$CircleRadius).",".floor($X+$CircleRadius).",".floor($Y+$CircleRadius),$this->pChartObject->toHTMLColor($Palette[$Key]["R"],$Palette[$Key]["G"],$Palette[$Key]["B"]),$SerieDescription,$Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]); } + + if ( $BorderWidth != 1 ) + { + $this->pChartObject->drawFilledRectangle($X-$CircleRadius-$BorderWidth,$Y-$CircleRadius-$BorderWidth,$X+$CircleRadius+$BorderWidth,$Y+$CircleRadius+$BorderWidth,$BorderColor); + $this->pChartObject->drawFilledRectangle($X-$CircleRadius,$Y-$CircleRadius,$X+$CircleRadius,$Y+$CircleRadius,$Color); + } + else + $this->pChartObject->drawFilledRectangle($X-$CircleRadius,$Y-$CircleRadius,$X+$CircleRadius,$Y+$CircleRadius,$Color); + } + elseif ( $Shape == BUBBLE_SHAPE_ROUND ) + { + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".floor($CircleRadius),$this->pChartObject->toHTMLColor($Palette[$Key]["R"],$Palette[$Key]["G"],$Palette[$Key]["B"]),$SerieDescription,$Data["Series"][$WeightSeries[$Key]]["Data"][$iKey]); } + + if ( $BorderWidth != 1 ) + { + $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius+$BorderWidth,$BorderColor); + $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius,$Color); + } + else + $this->pChartObject->drawFilledCircle($X,$Y,$CircleRadius,$Color); + } + + $Y = $Y + $XStep; + } + } + } + } + + function writeBubbleLabel($SerieName,$SerieWeightName,$Points,$Format="") + { + $OverrideTitle = isset($Format["OverrideTitle"]) ? $Format["OverrideTitle"] : NULL; + $DrawPoint = isset($Format["DrawPoint"]) ? $Format["DrawPoint"] : LABEL_POINT_BOX; + + if ( !is_array($Points) ) { $Point = $Points; $Points = ""; $Points[] = $Point; } + + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + if ( !isset($Data["Series"][$SerieName]) || !isset($Data["Series"][$SerieWeightName]) ) + return(0); + + list($XMargin,$XDivs) = $this->pChartObject->scaleGetXSettings(); + + $AxisID = $Data["Series"][$SerieName]["Axis"]; + $AxisMode = $Data["Axis"][$AxisID]["Display"]; + $AxisFormat = $Data["Axis"][$AxisID]["Format"]; + $AxisUnit = $Data["Axis"][$AxisID]["Unit"]; + $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; + + $X = $this->pChartObject->GraphAreaX1 + $XMargin; + $Y = $this->pChartObject->GraphAreaY1 + $XMargin; + + $Color = array("R"=>$Data["Series"][$SerieName]["Color"]["R"],"G"=>$Data["Series"][$SerieName]["Color"]["G"],"B"=>$Data["Series"][$SerieName]["Color"]["B"],"Alpha"=>$Data["Series"][$SerieName]["Color"]["Alpha"]); + + foreach($Points as $Key => $Point) + { + $Value = $Data["Series"][$SerieName]["Data"][$Point]; + $PosArray = $this->pChartObject->scaleComputeY($Value,array("AxisID"=>$AxisID)); + + if ( isset($Data["Abscissa"]) && isset($Data["Series"][$Data["Abscissa"]]["Data"][$Point]) ) + $Abscissa = $Data["Series"][$Data["Abscissa"]]["Data"][$Point]." : "; + else + $Abscissa = ""; + + $Value = $this->pChartObject->scaleFormat($Value,$AxisMode,$AxisFormat,$AxisUnit); + $Weight = $Data["Series"][$SerieWeightName]["Data"][$Point]; + $Caption = $Abscissa.$Value." / ".$Weight; + + if ( isset($Data["Series"][$SerieName]["Description"]) ) + $Description = $Data["Series"][$SerieName]["Description"]; + else + $Description = "No description"; + + $Series = ""; + $Series[] = array("Format"=>$Color,"Caption"=>$Caption); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; } + + $X = floor($X + $Point * $XStep); + $Y = floor($PosArray); + } + else + { + if ( $XDivs == 0 ) { $YStep = 0; } else { $YStep = ($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1-$XMargin*2)/$XDivs; } + + $X = floor($PosArray); + $Y = floor($Y + $Point * $YStep); + } + + if ( $DrawPoint == LABEL_POINT_CIRCLE ) + $this->pChartObject->drawFilledCircle($X,$Y,3,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + elseif ( $DrawPoint == LABEL_POINT_BOX ) + $this->pChartObject->drawFilledRectangle($X-2,$Y-2,$X+2,$Y+2,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + + $this->pChartObject->drawLabelBox($X,$Y-3,$Description,$Series,$Format); + } + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pCache.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pCache.class.php new file mode 100644 index 0000000..4e4a450 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pCache.class.php @@ -0,0 +1,280 @@ +CacheFolder = $CacheFolder; + $this->CacheIndex = $CacheIndex; + $this->CacheDB = $CacheDB; + + if (!file_exists($this->CacheFolder."/".$this->CacheIndex)) { touch($this->CacheFolder."/".$this->CacheIndex); } + if (!file_exists($this->CacheFolder."/".$this->CacheDB)) { touch($this->CacheFolder."/".$this->CacheDB); } + } + + /* Flush the cache contents */ + function flush() + { + if (file_exists($this->CacheFolder."/".$this->CacheIndex)) { unlink($this->CacheFolder."/".$this->CacheIndex); touch($this->CacheFolder."/".$this->CacheIndex); } + if (file_exists($this->CacheFolder."/".$this->CacheDB)) { unlink($this->CacheFolder."/".$this->CacheDB); touch($this->CacheFolder."/".$this->CacheDB); } + } + + /* Return the MD5 of the data array to clearly identify the chart */ + function getHash($Data,$Marker="") + { return(md5($Marker.serialize($Data->Data))); } + + /* Write the generated picture to the cache */ + function writeToCache($ID,$pChartObject) + { + /* Compute the paths */ + $TemporaryFile = $this->CacheFolder."/tmp_".rand(0,1000).".png"; + $Database = $this->CacheFolder."/".$this->CacheDB; + $Index = $this->CacheFolder."/".$this->CacheIndex; + + /* Flush the picture to a temporary file */ + imagepng($pChartObject->Picture ,$TemporaryFile); + + /* Retrieve the files size */ + $PictureSize = filesize($TemporaryFile); + $DBSize = filesize($Database); + + /* Save the index */ + $Handle = fopen($Index,"a"); + fwrite($Handle, $ID.",".$DBSize.",".$PictureSize.",".time().",0 \r\n"); + fclose($Handle); + + /* Get the picture raw contents */ + $Handle = fopen($TemporaryFile,"r"); + $Raw = fread($Handle,$PictureSize); + fclose($Handle); + + /* Save the picture in the solid database file */ + $Handle = fopen($Database,"a"); + fwrite($Handle, $Raw); + fclose($Handle); + + /* Remove temporary file */ + unlink($TemporaryFile); + } + + /* Remove object older than the specified TS */ + function removeOlderThan($Expiry) + { $this->dbRemoval(array("Expiry"=>$Expiry)); } + + /* Remove an object from the cache */ + function remove($ID) + { $this->dbRemoval(array("Name"=>$ID)); } + + /* Remove with specified criterias */ + function dbRemoval($Settings) + { + $ID = isset($Settings["Name"]) ? $Settings["Name"] : NULL; + $Expiry = isset($Settings["Expiry"]) ? $Settings["Expiry"] : -(24*60*60); + $TS = time()-$Expiry; + + /* Compute the paths */ + $Database = $this->CacheFolder."/".$this->CacheDB; + $Index = $this->CacheFolder."/".$this->CacheIndex; + $DatabaseTemp = $this->CacheFolder."/".$this->CacheDB.".tmp"; + $IndexTemp = $this->CacheFolder."/".$this->CacheIndex.".tmp"; + + /* Single file removal */ + if ( $ID != NULL ) + { + /* Retrieve object informations */ + $Object = $this->isInCache($ID,TRUE); + + /* If it's not in the cache DB, go away */ + if ( !$Object ) { return(0); } + } + + /* Create the temporary files */ + if (!file_exists($DatabaseTemp)) { touch($DatabaseTemp); } + if (!file_exists($IndexTemp)) { touch($IndexTemp); } + + /* Open the file handles */ + $IndexHandle = @fopen($Index, "r"); + $IndexTempHandle = @fopen($IndexTemp, "w"); + $DBHandle = @fopen($Database, "r"); + $DBTempHandle = @fopen($DatabaseTemp, "w"); + + /* Remove the selected ID from the database */ + while (!feof($IndexHandle)) + { + $Entry = fgets($IndexHandle, 4096); + $Entry = str_replace("\r","",$Entry); + $Entry = str_replace("\n","",$Entry); + $Settings = preg_split("/,/",$Entry); + + if ( $Entry != "" ) + { + $PicID = $Settings[0]; + $DBPos = $Settings[1]; + $PicSize = $Settings[2]; + $GeneratedTS = $Settings[3]; + $Hits = $Settings[4]; + + if ( $Settings[0] != $ID && $GeneratedTS > $TS) + { + $CurrentPos = ftell($DBTempHandle); + fwrite($IndexTempHandle, $PicID.",".$CurrentPos.",".$PicSize.",".$GeneratedTS.",".$Hits."\r\n"); + + fseek($DBHandle,$DBPos); + $Picture = fread($DBHandle,$PicSize); + fwrite($DBTempHandle,$Picture); + } + } + } + + /* Close the handles */ + fclose($IndexHandle); + fclose($IndexTempHandle); + fclose($DBHandle); + fclose($DBTempHandle); + + /* Remove the prod files */ + unlink($Database); + unlink($Index); + + /* Swap the temp & prod DB */ + rename($DatabaseTemp,$Database); + rename($IndexTemp,$Index); + } + + function isInCache($ID,$Verbose=FALSE,$UpdateHitsCount=FALSE) + { + /* Compute the paths */ + $Index = $this->CacheFolder."/".$this->CacheIndex; + + /* Search the picture in the index file */ + $Handle = @fopen($Index, "r"); + while (!feof($Handle)) + { + $IndexPos = ftell($Handle); + $Entry = fgets($Handle, 4096); + if ( $Entry != "" ) + { + $Settings = preg_split("/,/",$Entry); + $PicID = $Settings[0]; + if ( $PicID == $ID ) + { + fclose($Handle); + + $DBPos = $Settings[1]; + $PicSize = $Settings[2]; + $GeneratedTS = $Settings[3]; + $Hits = intval($Settings[4]); + + if ( $UpdateHitsCount ) + { + $Hits++; + if ( strlen($Hits) < 7 ) { $Hits = $Hits.str_repeat(" ",7-strlen($Hits)); } + + $Handle = @fopen($Index, "r+"); + fseek($Handle,$IndexPos); + fwrite($Handle, $PicID.",".$DBPos.",".$PicSize.",".$GeneratedTS.",".$Hits."\r\n"); + fclose($Handle); + } + + if ($Verbose) + { return(array("DBPos"=>$DBPos,"PicSize"=>$PicSize,"GeneratedTS"=>$GeneratedTS,"Hits"=>$Hits)); } + else + { return(TRUE); } + } + } + } + fclose($Handle); + + /* Picture isn't in the cache */ + return(FALSE); + } + + /* Automatic output method based on the calling interface */ + function autoOutput($ID,$Destination="output.png") + { + if (php_sapi_name() == "cli") + $this->saveFromCache($ID,$Destination); + else + $this->strokeFromCache($ID); + } + + function strokeFromCache($ID) + { + /* Get the raw picture from the cache */ + $Picture = $this->getFromCache($ID); + + /* Do we have a hit? */ + if ( $Picture == NULL ) { return(FALSE); } + + header('Content-type: image/png'); + echo $Picture; + + return(TRUE); + } + + function saveFromCache($ID,$Destination) + { + /* Get the raw picture from the cache */ + $Picture = $this->getFromCache($ID); + + /* Do we have a hit? */ + if ( $Picture == NULL ) { return(FALSE); } + + /* Flush the picture to a file */ + $Handle = fopen($Destination,"w"); + fwrite($Handle,$Picture); + fclose($Handle); + + /* All went fine */ + return(TRUE); + } + + function getFromCache($ID) + { + /* Compute the path */ + $Database = $this->CacheFolder."/".$this->CacheDB; + + /* Lookup for the picture in the cache */ + $CacheInfo = $this->isInCache($ID,TRUE,TRUE); + + /* Not in the cache */ + if (!$CacheInfo) { return(NULL); } + + /* Get the database extended information */ + $DBPos = $CacheInfo["DBPos"]; + $PicSize = $CacheInfo["PicSize"]; + + /* Extract the picture from the solid cache file */ + $Handle = @fopen($Database, "r"); + fseek($Handle,$DBPos); + $Picture = fread($Handle,$PicSize); + fclose($Handle); + + /* Return back the raw picture data */ + return($Picture); + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pData.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pData.class.php new file mode 100644 index 0000000..2750519 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pData.class.php @@ -0,0 +1,787 @@ +array("R"=>188,"G"=>224,"B"=>46,"Alpha"=>100), + "1"=>array("R"=>224,"G"=>100,"B"=>46,"Alpha"=>100), + "2"=>array("R"=>224,"G"=>214,"B"=>46,"Alpha"=>100), + "3"=>array("R"=>46,"G"=>151,"B"=>224,"Alpha"=>100), + "4"=>array("R"=>176,"G"=>46,"B"=>224,"Alpha"=>100), + "5"=>array("R"=>224,"G"=>46,"B"=>117,"Alpha"=>100), + "6"=>array("R"=>92,"G"=>224,"B"=>46,"Alpha"=>100), + "7"=>array("R"=>224,"G"=>176,"B"=>46,"Alpha"=>100)); + + /* Class creator */ + function pData() + { + $this->Data = ""; + $this->Data["XAxisDisplay"] = AXIS_FORMAT_DEFAULT; + $this->Data["XAxisFormat"] = NULL; + $this->Data["XAxisName"] = NULL; + $this->Data["XAxisUnit"] = NULL; + $this->Data["Abscissa"] = NULL; + $this->Data["AbsicssaPosition"] = AXIS_POSITION_BOTTOM; + + $this->Data["Axis"][0]["Display"] = AXIS_FORMAT_DEFAULT; + $this->Data["Axis"][0]["Position"] = AXIS_POSITION_LEFT; + $this->Data["Axis"][0]["Identity"] = AXIS_Y; + } + + /* Add a single point or an array to the given serie */ + function addPoints($Values,$SerieName="Serie1") + { + if (!isset($this->Data["Series"][$SerieName])) + $this->initialise($SerieName); + + if ( is_array($Values) ) + { + foreach($Values as $Key => $Value) + { $this->Data["Series"][$SerieName]["Data"][] = $Value; } + } + else + $this->Data["Series"][$SerieName]["Data"][] = $Values; + + if ( $Values != VOID ) + { + $StrippedData = $this->stripVOID($this->Data["Series"][$SerieName]["Data"]); + if ( empty($StrippedData) ) { $this->Data["Series"][$SerieName]["Max"] = 0; $this->Data["Series"][$SerieName]["Min"] =0; return(0); } + $this->Data["Series"][$SerieName]["Max"] = max($StrippedData); + $this->Data["Series"][$SerieName]["Min"] = min($StrippedData); + } + } + + /* Strip VOID values */ + function stripVOID($Values) + { if (!is_array($Values)) { return(array()); } $Result = array(); foreach($Values as $Key => $Value) { if ( $Value != VOID ) { $Result[] = $Value; } } return($Result); } + + /* Return the number of values contained in a given serie */ + function getSerieCount($Serie) + { if (isset($this->Data["Series"][$Serie]["Data"])) { return(sizeof($this->Data["Series"][$Serie]["Data"])); } else { return(0); } } + + /* Remove a serie from the pData object */ + function removeSerie($Series) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if (isset($this->Data["Series"][$Serie])) { unset($this->Data["Series"][$Serie]); } } + } + + /* Return a value from given serie & index */ + function getValueAt($Serie,$Index=0) + { if (isset($this->Data["Series"][$Serie]["Data"][$Index])) { return($this->Data["Series"][$Serie]["Data"][$Index]); } else { return(NULL); } } + + /* Return the values array */ + function getValues($Serie) + { if (isset($this->Data["Series"][$Serie]["Data"])) { return($this->Data["Series"][$Serie]["Data"]); } else { return(NULL); } } + + /* Reverse the values in the given serie */ + function reverseSerie($Series) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if (isset($this->Data["Series"][$Serie]["Data"])) { $this->Data["Series"][$Serie]["Data"] = array_reverse($this->Data["Series"][$Serie]["Data"]); } } + } + + /* Return the sum of the serie values */ + function getSum($Serie) + { if (isset($this->Data["Series"][$Serie])) { return(array_sum($this->Data["Series"][$Serie]["Data"])); } else { return(NULL); } } + + /* Return the max value of a given serie */ + function getMax($Serie) + { if (isset($this->Data["Series"][$Serie]["Max"])) { return($this->Data["Series"][$Serie]["Max"]); } else { return(NULL); } } + + /* Return the min value of a given serie */ + function getMin($Serie) + { if (isset($this->Data["Series"][$Serie]["Min"])) { return($this->Data["Series"][$Serie]["Min"]); } else { return(NULL); } } + + /* Set the description of a given serie */ + function setSerieShape($Series,$Shape=SERIE_SHAPE_FILLEDCIRCLE) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Shape"] = $Shape; } } + } + + /* Set the description of a given serie */ + function setSerieDescription($Series,$Description="My serie") + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Description"] = $Description; } } + } + + /* Set a serie as "drawable" while calling a rendering function */ + function setSerieDrawable($Series,$Drawable=TRUE) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["isDrawable"] = $Drawable; } } + } + + /* Set the icon associated to a given serie */ + function setSeriePicture($Series,$Picture=NULL) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if (isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Picture"] = $Picture; } } + } + + /* Set the name of the X Axis */ + function setXAxisName($Name) + { $this->Data["XAxisName"] = $Name; } + + /* Set the display mode of the X Axis */ + function setXAxisDisplay($Mode,$Format=NULL) + { $this->Data["XAxisDisplay"] = $Mode; $this->Data["XAxisFormat"] = $Format; } + + /* Set the unit that will be displayed on the X axis */ + function setXAxisUnit($Unit) + { $this->Data["XAxisUnit"] = $Unit; } + + /* Set the serie that will be used as abscissa */ + function setAbscissa($Serie) + { if (isset($this->Data["Series"][$Serie])) { $this->Data["Abscissa"] = $Serie; } } + + function setAbsicssaPosition($Position = AXIS_POSITION_BOTTOM) + { $this->Data["AbsicssaPosition"] = $Position; } + + /* Set the name of the abscissa axis */ + function setAbscissaName($Name) + { $this->Data["AbscissaName"] = $Name; } + + /* Create a scatter group specifyin X and Y data series */ + function setScatterSerie($SerieX,$SerieY,$ID=0) + { if (isset($this->Data["Series"][$SerieX]) && isset($this->Data["Series"][$SerieY]) ) { $this->initScatterSerie($ID); $this->Data["ScatterSeries"][$ID]["X"] = $SerieX; $this->Data["ScatterSeries"][$ID]["Y"] = $SerieY; } } + + /* Set the shape of a given sctatter serie */ + function setScatterSerieShape($ID,$Shape=SERIE_SHAPE_FILLEDCIRCLE) + { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Shape"] = $Shape; } } + + /* Set the description of a given scatter serie */ + function setScatterSerieDescription($ID,$Description="My serie") + { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Description"] = $Description; } } + + /* Set the icon associated to a given scatter serie */ + function setScatterSeriePicture($ID,$Picture=NULL) + { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Picture"] = $Picture; } } + + /* Set a scatter serie as "drawable" while calling a rendering function */ + function setScatterSerieDrawable($ID ,$Drawable=TRUE) + { if (isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["isDrawable"] = $Drawable; } } + + /* Define if a scatter serie should be draw with ticks */ + function setScatterSerieTicks($ID,$Width=0) + { if ( isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Ticks"] = $Width; } } + + /* Define if a scatter serie should be draw with a special weight */ + function setScatterSerieWeight($ID,$Weight=0) + { if ( isset($this->Data["ScatterSeries"][$ID]) ) { $this->Data["ScatterSeries"][$ID]["Weight"] = $Weight; } } + + /* Associate a color to a scatter serie */ + function setScatterSerieColor($ID,$Format) + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + + if ( isset($this->Data["ScatterSeries"][$ID]) ) + { + $this->Data["ScatterSeries"][$ID]["Color"]["R"] = $R; + $this->Data["ScatterSeries"][$ID]["Color"]["G"] = $G; + $this->Data["ScatterSeries"][$ID]["Color"]["B"] = $B; + $this->Data["ScatterSeries"][$ID]["Color"]["Alpha"] = $Alpha; + } + } + + /* Compute the series limits for an individual and global point of view */ + function limits() + { + $GlobalMin = ABSOLUTE_MAX; + $GlobalMax = ABSOLUTE_MIN; + + foreach($this->Data["Series"] as $Key => $Value) + { + if ( $this->Data["Abscissa"] != $Key && $this->Data["Series"][$Key]["isDrawable"] == TRUE) + { + if ( $GlobalMin > $this->Data["Series"][$Key]["Min"] ) { $GlobalMin = $this->Data["Series"][$Key]["Min"]; } + if ( $GlobalMax < $this->Data["Series"][$Key]["Max"] ) { $GlobalMax = $this->Data["Series"][$Key]["Max"]; } + } + } + $this->Data["Min"] = $GlobalMin; + $this->Data["Max"] = $GlobalMax; + + return(array($GlobalMin,$GlobalMax)); + } + + /* Mark all series as drawable */ + function drawAll() + { foreach($this->Data["Series"] as $Key => $Value) { if ( $this->Data["Abscissa"] != $Key ) { $this->Data["Series"][$Key]["isDrawable"]=TRUE; } } } + + /* Return the average value of the given serie */ + function getSerieAverage($Serie) + { + if ( isset($this->Data["Series"][$Serie]) ) + { + $SerieData = $this->stripVOID($this->Data["Series"][$Serie]["Data"]); + return(array_sum($SerieData)/sizeof($SerieData)); + } + else + return(NULL); + } + + /* Return the geometric mean of the given serie */ + function getGeometricMean($Serie) + { + if ( isset($this->Data["Series"][$Serie]) ) + { + $SerieData = $this->stripVOID($this->Data["Series"][$Serie]["Data"]); + $Seriesum = 1; foreach($SerieData as $Key => $Value) { $Seriesum = $Seriesum * $Value; } + return(pow($Seriesum,1/sizeof($SerieData))); + } + else + return(NULL); + } + + /* Return the harmonic mean of the given serie */ + function getHarmonicMean($Serie) + { + if ( isset($this->Data["Series"][$Serie]) ) + { + $SerieData = $this->stripVOID($this->Data["Series"][$Serie]["Data"]); + $Seriesum = 0; foreach($SerieData as $Key => $Value) { $Seriesum = $Seriesum + 1/$Value; } + return(sizeof($SerieData)/$Seriesum); + } + else + return(NULL); + } + + /* Return the standard deviation of the given serie */ + function getStandardDeviation($Serie) + { + if ( isset($this->Data["Series"][$Serie]) ) + { + $Average = $this->getSerieAverage($Serie); + $SerieData = $this->stripVOID($this->Data["Series"][$Serie]["Data"]); + + $DeviationSum = 0; + foreach($SerieData as $Key => $Value) + $DeviationSum = $DeviationSum + ($Value-$Average)*($Value-$Average); + + $Deviation = sqrt($DeviationSum/count($SerieData)); + + return($Deviation); + } + else + return(NULL); + } + + /* Return the Coefficient of variation of the given serie */ + function getCoefficientOfVariation($Serie) + { + if ( isset($this->Data["Series"][$Serie]) ) + { + $Average = $this->getSerieAverage($Serie); + $StandardDeviation = $this->getStandardDeviation($Serie); + + if ( $StandardDeviation != 0 ) + return($StandardDeviation/$Average); + else + return(NULL); + } + else + return(NULL); + } + + /* Return the median value of the given serie */ + function getSerieMedian($Serie) + { + if ( isset($this->Data["Series"][$Serie]) ) + { + $SerieData = $this->stripVOID($this->Data["Series"][$Serie]["Data"]); + sort($SerieData); + $SerieCenter = floor(sizeof($SerieData)/2); + + if ( isset($SerieData[$SerieCenter]) ) + return($SerieData[$SerieCenter]); + else + return(NULL); + } + else + return(NULL); + } + + /* Return the x th percentil of the given serie */ + function getSeriePercentile($Serie="Serie1",$Percentil=95) + { + if (!isset($this->Data["Series"][$Serie]["Data"])) { return(NULL); } + + $Values = count($this->Data["Series"][$Serie]["Data"])-1; + if ( $Values < 0 ) { $Values = 0; } + + $PercentilID = floor(($Values/100)*$Percentil+.5); + $SortedValues = $this->Data["Series"][$Serie]["Data"]; + sort($SortedValues); + + if ( is_numeric($SortedValues[$PercentilID]) ) + return($SortedValues[$PercentilID]); + else + return(NULL); + } + + /* Add random values to a given serie */ + function addRandomValues($SerieName="Serie1",$Options="") + { + $Values = isset($Options["Values"]) ? $Options["Values"] : 20; + $Min = isset($Options["Min"]) ? $Options["Min"] : 0; + $Max = isset($Options["Max"]) ? $Options["Max"] : 100; + $withFloat = isset($Options["withFloat"]) ? $Options["withFloat"] : FALSE; + + for ($i=0;$i<=$Values;$i++) + { + if ( $withFloat ) { $Value = rand($Min*100,$Max*100)/100; } else { $Value = rand($Min,$Max); } + $this->addPoints($Value,$SerieName); + } + } + + /* Test if we have valid data */ + function containsData() + { + if (!isset($this->Data["Series"])) { return(FALSE); } + + $Result = FALSE; + foreach($this->Data["Series"] as $Key => $Value) + { if ( $this->Data["Abscissa"] != $Key && $this->Data["Series"][$Key]["isDrawable"]==TRUE) { $Result=TRUE; } } + return($Result); + } + + /* Set the display mode of an Axis */ + function setAxisDisplay($AxisID,$Mode=AXIS_FORMAT_DEFAULT,$Format=NULL) + { + if ( isset($this->Data["Axis"][$AxisID] ) ) + { + $this->Data["Axis"][$AxisID]["Display"] = $Mode; + if ( $Format != NULL ) { $this->Data["Axis"][$AxisID]["Format"] = $Format; } + } + } + + /* Set the position of an Axis */ + function setAxisPosition($AxisID,$Position=AXIS_POSITION_LEFT) + { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Position"] = $Position; } } + + /* Associate an unit to an axis */ + function setAxisUnit($AxisID,$Unit) + { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Unit"] = $Unit; } } + + /* Associate a name to an axis */ + function setAxisName($AxisID,$Name) + { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Name"] = $Name; } } + + /* Associate a color to an axis */ + function setAxisColor($AxisID,$Format) + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + + if ( isset($this->Data["Axis"][$AxisID] ) ) + { + $this->Data["Axis"][$AxisID]["Color"]["R"] = $R; + $this->Data["Axis"][$AxisID]["Color"]["G"] = $G; + $this->Data["Axis"][$AxisID]["Color"]["B"] = $B; + $this->Data["Axis"][$AxisID]["Color"]["Alpha"] = $Alpha; + } + } + + + /* Design an axis as X or Y member */ + function setAxisXY($AxisID,$Identity=AXIS_Y) + { if ( isset($this->Data["Axis"][$AxisID] ) ) { $this->Data["Axis"][$AxisID]["Identity"] = $Identity; } } + + /* Associate one data serie with one axis */ + function setSerieOnAxis($Series,$AxisID) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) + { + $PreviousAxis = $this->Data["Series"][$Serie]["Axis"]; + + /* Create missing axis */ + if ( !isset($this->Data["Axis"][$AxisID] ) ) + { $this->Data["Axis"][$AxisID]["Position"] = AXIS_POSITION_LEFT; $this->Data["Axis"][$AxisID]["Identity"] = AXIS_Y;} + + $this->Data["Series"][$Serie]["Axis"] = $AxisID; + + /* Cleanup unused axis */ + $Found = FALSE; + foreach($this->Data["Series"] as $SerieName => $Values) { if ( $Values["Axis"] == $PreviousAxis ) { $Found = TRUE; } } + if (!$Found) { unset($this->Data["Axis"][$PreviousAxis]); } + } + } + + /* Define if a serie should be draw with ticks */ + function setSerieTicks($Series,$Width=0) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if ( isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Ticks"] = $Width; } } + } + + /* Define if a serie should be draw with a special weight */ + function setSerieWeight($Series,$Weight=0) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $Serie) { if ( isset($this->Data["Series"][$Serie]) ) { $this->Data["Series"][$Serie]["Weight"] = $Weight; } } + } + + /* Returns the palette of the given serie */ + function getSeriePalette($Serie) + { + if ( !isset($this->Data["Series"][$Serie]) ) { return(NULL); } + + $Result = ""; + $Result["R"] = $this->Data["Series"][$Serie]["Color"]["R"]; + $Result["G"] = $this->Data["Series"][$Serie]["Color"]["G"]; + $Result["B"] = $this->Data["Series"][$Serie]["Color"]["B"]; + $Result["Alpha"] = $this->Data["Series"][$Serie]["Color"]["Alpha"]; + + return($Result); + } + + /* Set the color of one serie */ + function setPalette($Series,$Format=NULL) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + + foreach($Series as $Key => $Serie) + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + + if ( isset($this->Data["Series"][$Serie]) ) + { + $OldR = $this->Data["Series"][$Serie]["Color"]["R"]; $OldG = $this->Data["Series"][$Serie]["Color"]["G"]; $OldB = $this->Data["Series"][$Serie]["Color"]["B"]; + $this->Data["Series"][$Serie]["Color"]["R"] = $R; + $this->Data["Series"][$Serie]["Color"]["G"] = $G; + $this->Data["Series"][$Serie]["Color"]["B"] = $B; + $this->Data["Series"][$Serie]["Color"]["Alpha"] = $Alpha; + + /* Do reverse processing on the internal palette array */ + foreach ($this->Palette as $Key => $Value) + { if ($Value["R"] == $OldR && $Value["G"] == $OldG && $Value["B"] == $OldB) { $this->Palette[$Key]["R"] = $R; $this->Palette[$Key]["G"] = $G; $this->Palette[$Key]["B"] = $B; $this->Palette[$Key]["Alpha"] = $Alpha;} } + } + } + } + + /* Load a palette file */ + function loadPalette($FileName,$Overwrite=FALSE) + { + if ( !file_exists($FileName) ) { return(-1); } + if ( $Overwrite ) { $this->Palette = ""; } + + $fileHandle = @fopen($FileName, "r"); + if (!$fileHandle) { return(-1); } + while (!feof($fileHandle)) + { + $buffer = fgets($fileHandle, 4096); + if ( preg_match("/,/",$buffer) ) + { + list($R,$G,$B,$Alpha) = preg_split("/,/",$buffer); + if ( $this->Palette == "" ) { $ID = 0; } else { $ID = count($this->Palette); } + $this->Palette[$ID] = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + } + } + fclose($fileHandle); + + /* Apply changes to current series */ + $ID = 0; + if ( isset($this->Data["Series"])) + { + foreach($this->Data["Series"] as $Key => $Value) + { + if ( !isset($this->Palette[$ID]) ) + $this->Data["Series"][$Key]["Color"] = array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>0); + else + $this->Data["Series"][$Key]["Color"] = $this->Palette[$ID]; + $ID++; + } + } + } + + /* Initialise a given scatter serie */ + function initScatterSerie($ID) + { + if ( isset($this->Data["ScatterSeries"][$ID]) ) { return(0); } + + $this->Data["ScatterSeries"][$ID]["Description"] = "Scatter ".$ID; + $this->Data["ScatterSeries"][$ID]["isDrawable"] = TRUE; + $this->Data["ScatterSeries"][$ID]["Picture"] = NULL; + $this->Data["ScatterSeries"][$ID]["Ticks"] = 0; + $this->Data["ScatterSeries"][$ID]["Weight"] = 0; + + if ( isset($this->Palette[$ID]) ) + $this->Data["ScatterSeries"][$ID]["Color"] = $this->Palette[$ID]; + else + { + $this->Data["ScatterSeries"][$ID]["Color"]["R"] = rand(0,255); + $this->Data["ScatterSeries"][$ID]["Color"]["G"] = rand(0,255); + $this->Data["ScatterSeries"][$ID]["Color"]["B"] = rand(0,255); + $this->Data["ScatterSeries"][$ID]["Color"]["Alpha"] = 100; + } + } + + /* Initialise a given serie */ + function initialise($Serie) + { + if ( isset($this->Data["Series"]) ) { $ID = count($this->Data["Series"]); } else { $ID = 0; } + + $this->Data["Series"][$Serie]["Description"] = $Serie; + $this->Data["Series"][$Serie]["isDrawable"] = TRUE; + $this->Data["Series"][$Serie]["Picture"] = NULL; + $this->Data["Series"][$Serie]["Max"] = NULL; + $this->Data["Series"][$Serie]["Min"] = NULL; + $this->Data["Series"][$Serie]["Axis"] = 0; + $this->Data["Series"][$Serie]["Ticks"] = 0; + $this->Data["Series"][$Serie]["Weight"] = 0; + $this->Data["Series"][$Serie]["Shape"] = SERIE_SHAPE_FILLEDCIRCLE; + + if ( isset($this->Palette[$ID]) ) + $this->Data["Series"][$Serie]["Color"] = $this->Palette[$ID]; + else + { + $this->Data["Series"][$Serie]["Color"]["R"] = rand(0,255); + $this->Data["Series"][$Serie]["Color"]["G"] = rand(0,255); + $this->Data["Series"][$Serie]["Color"]["B"] = rand(0,255); + $this->Data["Series"][$Serie]["Color"]["Alpha"] = 100; + } + } + + function normalize($NormalizationFactor=100,$UnitChange=NULL,$Round=1) + { + $Abscissa = $this->Data["Abscissa"]; + + $SelectedSeries = ""; + $MaxVal = 0; + foreach($this->Data["Axis"] as $AxisID => $Axis) + { + if ( $UnitChange != NULL ) { $this->Data["Axis"][$AxisID]["Unit"] = $UnitChange; } + + foreach($this->Data["Series"] as $SerieName => $Serie) + { + if ($Serie["Axis"] == $AxisID && $Serie["isDrawable"] == TRUE && $SerieName != $Abscissa) + { + $SelectedSeries[$SerieName] = $SerieName; + + if ( count($Serie["Data"] ) > $MaxVal ) { $MaxVal = count($Serie["Data"]); } + } + } + } + + for($i=0;$i<=$MaxVal-1;$i++) + { + $Factor = 0; + foreach ($SelectedSeries as $Key => $SerieName ) + { + $Value = $this->Data["Series"][$SerieName]["Data"][$i]; + if ( $Value != VOID ) + $Factor = $Factor + abs($Value); + } + + if ( $Factor != 0 ) + { + $Factor = $NormalizationFactor / $Factor; + + foreach ($SelectedSeries as $Key => $SerieName ) + { + $Value = $this->Data["Series"][$SerieName]["Data"][$i]; + + if ( $Value != VOID && $Factor != $NormalizationFactor ) + $this->Data["Series"][$SerieName]["Data"][$i] = round(abs($Value)*$Factor,$Round); + elseif ( $Value == VOID || $Value == 0 ) + $this->Data["Series"][$SerieName]["Data"][$i] = VOID; + elseif ( $Factor == $NormalizationFactor ) + $this->Data["Series"][$SerieName]["Data"][$i] = $NormalizationFactor; + } + } + } + + foreach ($SelectedSeries as $Key => $SerieName ) + { + $this->Data["Series"][$SerieName]["Max"] = max($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); + $this->Data["Series"][$SerieName]["Min"] = min($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); + } + } + + /* Load data from a CSV (or similar) data source */ + function importFromCSV($FileName,$Options="") + { + $Delimiter = isset($Options["Delimiter"]) ? $Options["Delimiter"] : ","; + $GotHeader = isset($Options["GotHeader"]) ? $Options["GotHeader"] : FALSE; + $SkipColumns = isset($Options["SkipColumns"]) ? $Options["SkipColumns"] : array(-1); + $DefaultSerieName = isset($Options["DefaultSerieName"]) ? $Options["DefaultSerieName"] : "Serie"; + + $Handle = @fopen($FileName,"r"); + if ($Handle) + { + $HeaderParsed = FALSE; $SerieNames = ""; + while (!feof($Handle)) + { + $Buffer = fgets($Handle, 4096); + $Buffer = str_replace(chr(10),"",$Buffer); + $Buffer = str_replace(chr(13),"",$Buffer); + $Values = preg_split("/".$Delimiter."/",$Buffer); + + if ( $Buffer != "" ) + { + if ( $GotHeader && !$HeaderParsed ) + { + foreach($Values as $Key => $Name) { if ( !in_array($Key,$SkipColumns) ) { $SerieNames[$Key] = $Name; } } + $HeaderParsed = TRUE; + } + else + { + if ($SerieNames == "" ) { foreach($Values as $Key => $Name) { if ( !in_array($Key,$SkipColumns) ) { $SerieNames[$Key] = $DefaultSerieName.$Key; } } } + foreach($Values as $Key => $Value) { if ( !in_array($Key,$SkipColumns) ) { $this->addPoints($Value,$SerieNames[$Key]); } } + } + } + } + fclose($Handle); + } + } + + /* Create a dataset based on a formula */ + function createFunctionSerie($SerieName,$Formula="",$Options="") + { + $MinX = isset($Options["MinX"]) ? $Options["MinX"] : -10; + $MaxX = isset($Options["MaxX"]) ? $Options["MaxX"] : 10; + $XStep = isset($Options["XStep"]) ? $Options["XStep"] : 1; + $AutoDescription = isset($Options["AutoDescription"]) ? $Options["AutoDescription"] : FALSE; + $RecordAbscissa = isset($Options["RecordAbscissa"]) ? $Options["RecordAbscissa"] : FALSE; + $AbscissaSerie = isset($Options["AbscissaSerie"]) ? $Options["AbscissaSerie"] : "Abscissa"; + + if ( $Formula == "" ) { return(0); } + + $Result = ""; $Abscissa = ""; + for($i=$MinX; $i<=$MaxX; $i=$i+$XStep) + { + $Expression = "\$return = '!'.(".str_replace("z",$i,$Formula).");"; + if ( @eval($Expression) === FALSE ) { $return = VOID; } + if ( $return == "!" ) { $return = VOID; } else { $return = $this->right($return,strlen($return)-1); } + if ( $return == "NAN" ) { $return = VOID; } + if ( $return == "INF" ) { $return = VOID; } + if ( $return == "-INF" ) { $return = VOID; } + + $Abscissa[] = $i; + $Result[] = $return; + } + + $this->addPoints($Result,$SerieName); + if ( $AutoDescription ) { $this->setSerieDescription($SerieName,$Formula); } + if ( $RecordAbscissa ) { $this->addPoints($Abscissa,$AbscissaSerie); } + } + + function negateValues($Series) + { + if ( !is_array($Series) ) { $Series = $this->convertToArray($Series); } + foreach($Series as $Key => $SerieName) + { + if (isset($this->Data["Series"][$SerieName])) + { + $Data = ""; + foreach($this->Data["Series"][$SerieName]["Data"] as $Key => $Value) + { if ( $Value == VOID ) { $Data[] = VOID; } else { $Data[] = -$Value; } } + $this->Data["Series"][$SerieName]["Data"] = $Data; + + $this->Data["Series"][$SerieName]["Max"] = max($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); + $this->Data["Series"][$SerieName]["Min"] = min($this->stripVOID($this->Data["Series"][$SerieName]["Data"])); + } + } + } + + /* Return the data & configuration of the series */ + function getData() + { return($this->Data); } + + /* Save a palette element */ + function savePalette($ID,$Color) + { $this->Palette[$ID] = $Color; } + + /* Return the palette of the series */ + function getPalette() + { return($this->Palette); } + + /* Called by the scaling algorithm to save the config */ + function saveAxisConfig($Axis) { $this->Data["Axis"]=$Axis; } + + /* Save the Y Margin if set */ + function saveYMargin($Value) { $this->Data["YMargin"]=$Value; } + + /* Save extended configuration to the pData object */ + function saveExtendedData($Tag,$Values) { $this->Data["Extended"][$Tag]=$Values; } + + /* Called by the scaling algorithm to save the orientation of the scale */ + function saveOrientation($Orientation) { $this->Data["Orientation"]=$Orientation; } + + /* Convert a string to a single elements array */ + function convertToArray($Value) + { $Values = ""; $Values[] = $Value; return($Values); } + + /* Class string wrapper */ + function __toString() + { return("pData object."); } + + function left($value,$NbChar) { return substr($value,0,$NbChar); } + function right($value,$NbChar) { return substr($value,strlen($value)-$NbChar,$NbChar); } + function mid($value,$Depart,$NbChar) { return substr($value,$Depart-1,$NbChar); } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pDraw.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pDraw.class.php new file mode 100644 index 0000000..750fbb5 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pDraw.class.php @@ -0,0 +1,6193 @@ +DataSet->getData(); + + foreach($Data["Series"] as $SerieName => $Serie) + { if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) { $Results++; } } + + return($Results); + } + + /* Fix box coordinates */ + function fixBoxCoordinates($Xa,$Ya,$Xb,$Yb) + { + $X1 = min($Xa,$Xb); $Y1 = min($Ya,$Yb); + $X2 = max($Xa,$Xb); $Y2 = max($Ya,$Yb); + + return(array($X1,$Y1,$X2,$Y2)); + } + + /* Draw a polygon */ + function drawPolygon($Points,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $NoFill = isset($Format["NoFill"]) ? $Format["NoFill"] : FALSE; + $NoBorder = isset($Format["NoBorder"]) ? $Format["NoBorder"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; + $BorderAlpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $Alpha / 2; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $SkipX = isset($Format["SkipX"]) ? $Format["SkipX"] : OUT_OF_SIGHT; + $SkipY = isset($Format["SkipY"]) ? $Format["SkipY"] : OUT_OF_SIGHT; + + /* Calling the ImageFilledPolygon() function over the $Points array will round it */ + $Backup = $Points; + + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + + if ( $SkipX != OUT_OF_SIGHT ) { $SkipX = floor($SkipX); } + if ( $SkipY != OUT_OF_SIGHT ) { $SkipY = floor($SkipY); } + + $RestoreShadow = $this->Shadow; + if ( !$NoFill ) + { + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + for($i=0;$i<=count($Points)-1;$i=$i+2) + { $Shadow[] = $Points[$i] + $this->ShadowX; $Shadow[] = $Points[$i+1] + $this->ShadowY; } + $this->drawPolygon($Shadow,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"NoBorder"=>TRUE)); + } + + $FillColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + + if ( count($Points) >= 6 ) + { ImageFilledPolygon($this->Picture,$Points,count($Points)/2,$FillColor); } + } + + if ( !$NoBorder ) + { + $Points = $Backup; + + if ( $NoFill ) + $BorderSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + else + $BorderSettings = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); + + for($i=0;$i<=count($Points)-1;$i=$i+2) + { + if ( isset($Points[$i+2]) ) + { + if ( !($Points[$i] == $Points[$i+2] && $Points[$i] == $SkipX ) && !($Points[$i+1] == $Points[$i+3] && $Points[$i+1] == $SkipY ) ) + $this->drawLine($Points[$i],$Points[$i+1],$Points[$i+2],$Points[$i+3],$BorderSettings); + } + else + { + if ( !($Points[$i] == $Points[0] && $Points[$i] == $SkipX ) && !($Points[$i+1] == $Points[1] && $Points[$i+1] == $SkipY ) ) + $this->drawLine($Points[$i],$Points[$i+1],$Points[0],$Points[1],$BorderSettings); + } + } + } + + $this->Shadow = $RestoreShadow; + } + + /* Apply AALias correction to the rounded box boundaries */ + function offsetCorrection($Value,$Mode) + { + $Value = round($Value,1); + + if ( $Value == 0 && $Mode == 1 ) { return(.9); } + if ( $Value == 0 ) { return(0); } + + if ( $Mode == 1) + { if ( $Value == 1 ) { return(.9); }; if ( $Value == .1 ) { return(.9); }; if ( $Value == .2 ) { return(.8); }; if ( $Value == .3 ) { return(.8); }; if ( $Value == .4 ) { return(.7); }; if ( $Value == .5 ) { return(.5); }; if ( $Value == .6 ) { return(.8); }; if ( $Value == .7 ) { return(.7); }; if ( $Value == .8 ) { return(.6); }; if ( $Value == .9 ) { return(.9); }; } + + if ( $Mode == 2) + { if ( $Value == 1 ) { return(.9); }; if ( $Value == .1 ) { return(.1); }; if ( $Value == .2 ) { return(.2); }; if ( $Value == .3 ) { return(.3); }; if ( $Value == .4 ) { return(.4); }; if ( $Value == .5 ) { return(.5); }; if ( $Value == .6 ) { return(.8); }; if ( $Value == .7 ) { return(.7); }; if ( $Value == .8 ) { return(.8); }; if ( $Value == .9 ) { return(.9); }; } + + if ( $Mode == 3) + { if ( $Value == 1 ) { return(.1); }; if ( $Value == .1 ) { return(.1); }; if ( $Value == .2 ) { return(.2); }; if ( $Value == .3 ) { return(.3); }; if ( $Value == .4 ) { return(.4); }; if ( $Value == .5 ) { return(.9); }; if ( $Value == .6 ) { return(.6); }; if ( $Value == .7 ) { return(.7); }; if ( $Value == .8 ) { return(.4); }; if ( $Value == .9 ) { return(.5); }; } + + if ( $Mode == 4) + { if ( $Value == 1 ) { return(-1); }; if ( $Value == .1 ) { return(.1); }; if ( $Value == .2 ) { return(.2); }; if ( $Value == .3 ) { return(.3); }; if ( $Value == .4 ) { return(.1); }; if ( $Value == .5 ) { return(-.1); }; if ( $Value == .6 ) { return(.8); }; if ( $Value == .7 ) { return(.1); }; if ( $Value == .8 ) { return(.1); }; if ( $Value == .9 ) { return(.1); }; } + } + + /* Draw a rectangle with rounded corners */ + function drawRoundedRectangle($X1,$Y1,$X2,$Y2,$Radius,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + + list($X1,$Y1,$X2,$Y2) = $this->fixBoxCoordinates($X1,$Y1,$X2,$Y2); + + if ( $X2 - $X1 < $Radius ) { $Radius = floor((($X2-$X1))/2); } + if ( $Y2 - $Y1 < $Radius ) { $Radius = floor((($Y2-$Y1))/2); } + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"NoBorder"=>TRUE); + + if ( $Radius <= 0 ) { $this->drawRectangle($X1,$Y1,$X2,$Y2,$Color); return(0); } + + if ( $this->Antialias ) + { + $this->drawLine($X1+$Radius,$Y1,$X2-$Radius,$Y1,$Color); + $this->drawLine($X2,$Y1+$Radius,$X2,$Y2-$Radius,$Color); + $this->drawLine($X2-$Radius,$Y2,$X1+$Radius,$Y2,$Color); + $this->drawLine($X1,$Y1+$Radius,$X1,$Y2-$Radius,$Color); + } + else + { + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + imageline($this->Picture,$X1+$Radius,$Y1,$X2-$Radius,$Y1,$Color); + imageline($this->Picture,$X2,$Y1+$Radius,$X2,$Y2-$Radius,$Color); + imageline($this->Picture,$X2-$Radius,$Y2,$X1+$Radius,$Y2,$Color); + imageline($this->Picture,$X1,$Y1+$Radius,$X1,$Y2-$Radius,$Color); + } + + $Step = 360 / (2 * PI * $Radius); + for($i=0;$i<=90;$i=$i+$Step) + { + $X = cos(($i+180)*PI/180) * $Radius + $X1 + $Radius; + $Y = sin(($i+180)*PI/180) * $Radius + $Y1 + $Radius; + $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + $X = cos(($i+90)*PI/180) * $Radius + $X1 + $Radius; + $Y = sin(($i+90)*PI/180) * $Radius + $Y2 - $Radius; + $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + $X = cos($i*PI/180) * $Radius + $X2 - $Radius; + $Y = sin($i*PI/180) * $Radius + $Y2 - $Radius; + $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + $X = cos(($i+270)*PI/180) * $Radius + $X2 - $Radius; + $Y = sin(($i+270)*PI/180) * $Radius + $Y1 + $Radius; + $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + } + } + + /* Draw a rectangle with rounded corners */ + function drawRoundedFilledRectangle($X1,$Y1,$X2,$Y2,$Radius,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + + /* Temporary fix for AA issue */ + $Y1 = floor($Y1); $Y2 = floor($Y2); $X1 = floor($X1); $X2 = floor($X2); + + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + if ( $BorderR == -1 ) { $BorderR = $R; $BorderG = $G; $BorderB = $B; } + + list($X1,$Y1,$X2,$Y2) = $this->fixBoxCoordinates($X1,$Y1,$X2,$Y2); + + if ( $X2 - $X1 < $Radius*2 ) { $Radius = floor((($X2-$X1))/4); } + if ( $Y2 - $Y1 < $Radius*2 ) { $Radius = floor((($Y2-$Y1))/4); } + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + $this->drawRoundedFilledRectangle($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,$Radius,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); + } + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"NoBorder"=>TRUE); + + if ( $Radius <= 0 ) { $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); return(0); } + + $YTop = $Y1+$Radius; + $YBottom = $Y2-$Radius; + + $Step = 360 / (2 * PI * $Radius); + $Positions = ""; $Radius--; $MinY = ""; $MaxY = ""; + for($i=0;$i<=90;$i=$i+$Step) + { + $Xp1 = cos(($i+180)*PI/180) * $Radius + $X1 + $Radius; + $Xp2 = cos(((90-$i)+270)*PI/180) * $Radius + $X2 - $Radius; + $Yp = floor(sin(($i+180)*PI/180) * $Radius + $YTop); + if ( $MinY == "" || $Yp > $MinY ) { $MinY = $Yp; } + + if ( $Xp1 <= floor($X1) ) { $Xp1++; } + if ( $Xp2 >= floor($X2) ) { $Xp2--; } + $Xp1++; + + if ( !isset($Positions[$Yp]) ) + { $Positions[$Yp]["X1"] = $Xp1; $Positions[$Yp]["X2"] = $Xp2; } + else + { $Positions[$Yp]["X1"] = ($Positions[$Yp]["X1"]+$Xp1)/2; $Positions[$Yp]["X2"] = ($Positions[$Yp]["X2"]+$Xp2)/2; } + + $Xp1 = cos(($i+90)*PI/180) * $Radius + $X1 + $Radius; + $Xp2 = cos((90-$i)*PI/180) * $Radius + $X2 - $Radius; + $Yp = floor(sin(($i+90)*PI/180) * $Radius + $YBottom); + if ( $MaxY == "" || $Yp < $MaxY ) { $MaxY = $Yp; } + + if ( $Xp1 <= floor($X1) ) { $Xp1++; } + if ( $Xp2 >= floor($X2) ) { $Xp2--; } + $Xp1++; + + if ( !isset($Positions[$Yp]) ) + { $Positions[$Yp]["X1"] = $Xp1; $Positions[$Yp]["X2"] = $Xp2; } + else + { $Positions[$Yp]["X1"] = ($Positions[$Yp]["X1"]+$Xp1)/2; $Positions[$Yp]["X2"] = ($Positions[$Yp]["X2"]+$Xp2)/2; } + } + + $ManualColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + foreach($Positions as $Yp => $Bounds) + { + $X1 = $Bounds["X1"]; $X1Dec = $this->getFirstDecimal($X1); if ( $X1Dec != 0 ) { $X1 = floor($X1)+1; } + $X2 = $Bounds["X2"]; $X2Dec = $this->getFirstDecimal($X2); if ( $X2Dec != 0 ) { $X2 = floor($X2)-1; } + imageline($this->Picture,$X1,$Yp,$X2,$Yp,$ManualColor); + } + $this->drawFilledRectangle($X1,$MinY+1,floor($X2),$MaxY-1,$Color); + + $Radius++; + $this->drawRoundedRectangle($X1,$Y1,$X2+1,$Y2-1,$Radius,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + + $this->Shadow = $RestoreShadow; + } + + /* Draw a rectangle with rounded corners */ + function drawRoundedFilledRectangle_deprecated($X1,$Y1,$X2,$Y2,$Radius,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + if ( $BorderR == -1 ) { $BorderR = $R; $BorderG = $G; $BorderB = $B; } + + list($X1,$Y1,$X2,$Y2) = $this->fixBoxCoordinates($X1,$Y1,$X2,$Y2); + + if ( $X2 - $X1 < $Radius ) { $Radius = floor((($X2-$X1)+2)/2); } + if ( $Y2 - $Y1 < $Radius ) { $Radius = floor((($Y2-$Y1)+2)/2); } + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + $this->drawRoundedFilledRectangle($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,$Radius,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); + } + + if ( $this->getFirstDecimal($X2) >= 5 ) { $XOffset2 = 1; } else { $XOffset2 = 0; } + if ( $this->getFirstDecimal($X1) <= 5 ) { $XOffset1 = 1; } else { $XOffset1 = 0; } + + if ( !$this->Antialias ) { $XOffset1 = 1; $XOffset2 = 1; } + + $YTop = floor($Y1+$Radius); + $YBottom = floor($Y2-$Radius); + + $this->drawFilledRectangle($X1-$XOffset1,$YTop,$X2+$XOffset2,$YBottom,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"NoBorder"=>TRUE)); + + $Step = 360 / (2 * PI * $Radius); + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + $Color2 = $this->allocateColor($this->Picture,255,0,0,$Alpha); + $Drawn = ""; + + if ( $Alpha < 100 ) { $Drawn[$YTop] = FALSE; } + if ( $Alpha < 100 ) { $Drawn[$YBottom] = TRUE; } + + for($i=0;$i<=90;$i=$i+$Step) + { + $Xp1 = cos(($i+180)*PI/180) * $Radius + $X1 + $Radius; + $Xp2 = cos(((90-$i)+270)*PI/180) * $Radius + $X2 - $Radius; + $Yp = sin(($i+180)*PI/180) * $Radius + $YTop; + + if ( $this->getFirstDecimal($Xp1) > 5 ) { $XOffset1 = 1; } else { $XOffset1 = 0; } + if ( $this->getFirstDecimal($Xp2) > 5 ) { $XOffset2 = 1; } else { $XOffset2 = 0; } + if ( $this->getFirstDecimal($Yp) > 5 ) { $YOffset = 1; } else { $YOffset = 0; } + + if ( !isset($Drawn[$Yp+$YOffset]) || $Alpha == 100 ) + imageline($this->Picture,$Xp1+$XOffset1,$Yp+$YOffset,$Xp2+$XOffset2,$Yp+$YOffset,$Color); + + $Drawn[$Yp+$YOffset] = $Xp2; + + $Xp1 = cos(($i+90)*PI/180) * $Radius + $X1 + $Radius; + $Xp2 = cos((90-$i)*PI/180) * $Radius + $X2 - $Radius; + $Yp = sin(($i+90)*PI/180) * $Radius + $YBottom; + + if ( $this->getFirstDecimal($Xp1) > 7 ) { $XOffset1 = 1; } else { $XOffset1 = 0; } + if ( $this->getFirstDecimal($Xp2) > 7 ) { $XOffset2 = 1; } else { $XOffset2 = 0; } + if ( $this->getFirstDecimal($Yp) > 5 ) { $YOffset = 1; } else { $YOffset = 0; } + + if ( !isset($Drawn[$Yp+$YOffset]) || $Alpha == 100 ) + imageline($this->Picture,$Xp1+$XOffset1,$Yp+$YOffset,$Xp2+$XOffset2,$Yp+$YOffset,$Color); + + $Drawn[$Yp+$YOffset] = $Xp2; + } + + $this->drawRoundedRectangle($X1,$Y1,$X2,$Y2,$Radius,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + + $this->Shadow = $RestoreShadow; + } + + /* Draw a rectangle */ + function drawRectangle($X1,$Y1,$X2,$Y2,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $NoAngle = isset($Format["NoAngle"]) ? $Format["NoAngle"] : FALSE; + + if ($X1 > $X2) { list($X1, $X2) = array($X2, $X1); } + if ($Y1 > $Y2) { list($Y1, $Y2) = array($Y2, $Y1); } + + if ( $this->Antialias ) + { + if ( $NoAngle ) + { + $this->drawLine($X1+1,$Y1,$X2-1,$Y1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + $this->drawLine($X2,$Y1+1,$X2,$Y2-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + $this->drawLine($X2-1,$Y2,$X1+1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + $this->drawLine($X1,$Y1+1,$X1,$Y2-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + else + { + $this->drawLine($X1+1,$Y1,$X2-1,$Y1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + $this->drawLine($X2,$Y1,$X2,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + $this->drawLine($X2-1,$Y2,$X1+1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + $this->drawLine($X1,$Y1,$X1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + } + else + { + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + imagerectangle($this->Picture,$X1,$Y1,$X2,$Y2,$Color); + } + } + + /* Draw a filled rectangle */ + function drawFilledRectangle($X1,$Y1,$X2,$Y2,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $NoAngle = isset($Format["NoAngle"]) ? $Format["NoAngle"] : NULL; + $Dash = isset($Format["Dash"]) ? $Format["Dash"] : FALSE; + $DashStep = isset($Format["DashStep"]) ? $Format["DashStep"] : 4; + $DashR = isset($Format["DashR"]) ? $Format["DashR"] : 0; + $DashG = isset($Format["DashG"]) ? $Format["DashG"] : 0; + $DashB = isset($Format["DashB"]) ? $Format["DashB"] : 0; + $NoBorder = isset($Format["NoBorder"]) ? $Format["NoBorder"] : FALSE; + + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + + if ($X1 > $X2) { list($X1, $X2) = array($X2, $X1); } + if ($Y1 > $Y2) { list($Y1, $Y2) = array($Y2, $Y1); } + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + $this->drawFilledRectangle($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Ticks"=>$Ticks,"NoAngle"=>$NoAngle)); + } + + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + if ( $NoAngle ) + { + imagefilledrectangle($this->Picture,ceil($X1)+1,ceil($Y1),floor($X2)-1,floor($Y2),$Color); + imageline($this->Picture,ceil($X1),ceil($Y1)+1,ceil($X1),floor($Y2)-1,$Color); + imageline($this->Picture,floor($X2),ceil($Y1)+1,floor($X2),floor($Y2)-1,$Color); + } + else + imagefilledrectangle($this->Picture,ceil($X1),ceil($Y1),floor($X2),floor($Y2),$Color); + + if ( $Dash ) + { + if ( $BorderR != -1 ) { $iX1=$X1+1; $iY1=$Y1+1; $iX2=$X2-1; $iY2=$Y2-1; } else { $iX1=$X1; $iY1=$Y1; $iX2=$X2; $iY2=$Y2; } + + $Color = $this->allocateColor($this->Picture,$DashR,$DashG,$DashB,$Alpha); + $Y=$iY1-$DashStep; + for($X=$iX1; $X<=$iX2+($iY2-$iY1); $X=$X+$DashStep) + { + $Y=$Y+$DashStep; + if ( $X > $iX2 ) { $Xa = $X-($X-$iX2); $Ya = $iY1+($X-$iX2); } else { $Xa = $X; $Ya = $iY1; } + if ( $Y > $iY2 ) { $Xb = $iX1+($Y-$iY2); $Yb = $Y-($Y-$iY2); } else { $Xb = $iX1; $Yb = $Y; } + imageline($this->Picture,$Xa,$Ya,$Xb,$Yb,$Color); + } + } + + if ( $this->Antialias && !$NoBorder ) + { + if ( $X1 < ceil($X1) ) + { + $AlphaA = $Alpha * (ceil($X1) - $X1); + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); + imageline($this->Picture,ceil($X1)-1,ceil($Y1),ceil($X1)-1,floor($Y2),$Color); + } + + if ( $Y1 < ceil($Y1) ) + { + $AlphaA = $Alpha * (ceil($Y1) - $Y1); + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); + imageline($this->Picture,ceil($X1),ceil($Y1)-1,floor($X2),ceil($Y1)-1,$Color); + } + + if ( $X2 > floor($X2) ) + { + $AlphaA = $Alpha * (.5-($X2 - floor($X2))); + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); + imageline($this->Picture,floor($X2)+1,ceil($Y1),floor($X2)+1,floor($Y2),$Color); + } + + if ( $Y2 > floor($Y2) ) + { + $AlphaA = $Alpha * (.5-($Y2 - floor($Y2))); + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$AlphaA); + imageline($this->Picture,ceil($X1),floor($Y2)+1,floor($X2),floor($Y2)+1,$Color); + } + } + + if ( $BorderR != -1 ) + $this->drawRectangle($X1,$Y1,$X2,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$Ticks,"NoAngle"=>$NoAngle)); + + $this->Shadow = $RestoreShadow; + } + + /* Draw a rectangular marker of the specified size */ + function drawRectangleMarker($X,$Y,$Format="") + { + $Size = isset($Format["Size"]) ? $Format["Size"] : 4; + + $HalfSize = floor($Size/2); + $this->drawFilledRectangle($X-$HalfSize,$Y-$HalfSize,$X+$HalfSize,$Y+$HalfSize,$Format); + } + + /* Drawn a spline based on the bezier function */ + function drawSpline($Coordinates,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Force = isset($Format["Force"]) ? $Format["Force"] : 30; + $Forces = isset($Format["Forces"]) ? $Format["Forces"] : NULL; + $ShowC = isset($Format["ShowControl"]) ? $Format["ShowControl"] : FALSE; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $PathOnly = isset($Format["PathOnly"]) ? $Format["PathOnly"] : FALSE; + $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; + + $Cpt = NULL; $Mode = NULL; $Result = ""; + for($i=1;$i<=count($Coordinates)-1;$i++) + { + $X1 = $Coordinates[$i-1][0]; $Y1 = $Coordinates[$i-1][1]; + $X2 = $Coordinates[$i][0]; $Y2 = $Coordinates[$i][1]; + + if ( $Forces != NULL ) { $Force = $Forces[$i]; } + + /* First segment */ + if ( $i == 1 ) + { $Xv1 = $X1; $Yv1 = $Y1; } + else + { + $Angle1 = $this->getAngle($XLast,$YLast,$X1,$Y1); + $Angle2 = $this->getAngle($X1,$Y1,$X2,$Y2); + $XOff = cos($Angle2 * PI / 180) * $Force + $X1; + $YOff = sin($Angle2 * PI / 180) * $Force + $Y1; + + $Xv1 = cos($Angle1 * PI / 180) * $Force + $XOff; + $Yv1 = sin($Angle1 * PI / 180) * $Force + $YOff; + } + + /* Last segment */ + if ( $i == count($Coordinates)-1 ) + { $Xv2 = $X2; $Yv2 = $Y2; } + else + { + $Angle1 = $this->getAngle($X2,$Y2,$Coordinates[$i+1][0],$Coordinates[$i+1][1]); + $Angle2 = $this->getAngle($X1,$Y1,$X2,$Y2); + $XOff = cos(($Angle2+180) * PI / 180) * $Force + $X2; + $YOff = sin(($Angle2+180) * PI / 180) * $Force + $Y2; + + $Xv2 = cos(($Angle1+180) * PI / 180) * $Force + $XOff; + $Yv2 = sin(($Angle1+180) * PI / 180) * $Force + $YOff; + } + + $Path = $this->drawBezier($X1,$Y1,$X2,$Y2,$Xv1,$Yv1,$Xv2,$Yv2,$Format); + if ($PathOnly) { $Result[] = $Path; } + + $XLast = $X1; $YLast = $Y1; + } + + return($Result); + } + + /* Draw a bezier curve with two controls points */ + function drawBezier($X1,$Y1,$X2,$Y2,$Xv1,$Yv1,$Xv2,$Yv2,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $ShowC = isset($Format["ShowControl"]) ? $Format["ShowControl"] : FALSE; + $Segments = isset($Format["Segments"]) ? $Format["Segments"] : NULL; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $NoDraw = isset($Format["NoDraw"]) ? $Format["NoDraw"] : FALSE; + $PathOnly = isset($Format["PathOnly"]) ? $Format["PathOnly"] : FALSE; + $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; + $DrawArrow = isset($Format["DrawArrow"]) ? $Format["DrawArrow"] : FALSE; + $ArrowSize = isset($Format["ArrowSize"]) ? $Format["ArrowSize"] : 10; + $ArrowRatio = isset($Format["ArrowRatio"]) ? $Format["ArrowRatio"] : .5; + $ArrowTwoHeads = isset($Format["ArrowTwoHeads"]) ? $Format["ArrowTwoHeads"] : FALSE; + + if ( $Segments == NULL ) + { + $Length = $this->getLength($X1,$Y1,$X2,$Y2); + $Precision = ($Length*125)/1000; + } + else + $Precision = $Segments; + + $P[0]["X"] = $X1; $P[0]["Y"] = $Y1; + $P[1]["X"] = $Xv1; $P[1]["Y"] = $Yv1; + $P[2]["X"] = $Xv2; $P[2]["Y"] = $Yv2; + $P[3]["X"] = $X2; $P[3]["Y"] = $Y2; + + /* Compute the bezier points */ + $Q = ""; $ID = 0; $Path = ""; + for($i=0;$i<=$Precision;$i=$i+1) + { + $u = $i / $Precision; + + $C = ""; + $C[0] = (1 - $u) * (1 - $u) * (1 - $u); + $C[1] = ($u * 3) * (1 - $u) * (1 - $u); + $C[2] = 3 * $u * $u * (1 - $u); + $C[3] = $u * $u * $u; + + for($j=0;$j<=3;$j++) + { + if ( !isset($Q[$ID]) ) { $Q[$ID] = ""; } + if ( !isset($Q[$ID]["X"]) ) { $Q[$ID]["X"] = 0; } + if ( !isset($Q[$ID]["Y"]) ) { $Q[$ID]["Y"] = 0; } + + $Q[$ID]["X"] = $Q[$ID]["X"] + $P[$j]["X"] * $C[$j]; + $Q[$ID]["Y"] = $Q[$ID]["Y"] + $P[$j]["Y"] * $C[$j]; + } + $ID++; + } + $Q[$ID]["X"] = $X2; $Q[$ID]["Y"] = $Y2; + + if ( !$NoDraw ) + { + /* Display the control points */ + if ( $ShowC && !$PathOnly ) + { + $Xv1 = floor($Xv1); $Yv1 = floor($Yv1); $Xv2 = floor($Xv2); $Yv2 = floor($Yv2); + + $this->drawLine($X1,$Y1,$X2,$Y2,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>30)); + + $MyMarkerSettings = array("R"=>255,"G"=>0,"B"=>0,"BorderR"=>255,"BorderB"=>255,"BorderG"=>255,"Size"=>4); + $this->drawRectangleMarker($Xv1,$Yv1,$MyMarkerSettings); + $this->drawText($Xv1+4,$Yv1,"v1"); + $MyMarkerSettings = array("R"=>0,"G"=>0,"B"=>255,"BorderR"=>255,"BorderB"=>255,"BorderG"=>255,"Size"=>4); + $this->drawRectangleMarker($Xv2,$Yv2,$MyMarkerSettings); + $this->drawText($Xv2+4,$Yv2,"v2"); + } + + /* Draw the bezier */ + $LastX = NULL; $LastY = NULL; $Cpt = NULL; $Mode = NULL; $ArrowS = NULL; + foreach ($Q as $Key => $Point) + { + $X = $Point["X"]; $Y = $Point["Y"]; + + /* Get the first segment */ + if ( $ArrowS == NULL && $LastX != NULL && $LastY != NULL ) + { $ArrowS["X2"] = $LastX; $ArrowS["Y2"] = $LastY; $ArrowS["X1"] = $X; $ArrowS["Y1"] = $Y; } + + if ( $LastX != NULL && $LastY != NULL && !$PathOnly) + list($Cpt,$Mode) = $this->drawLine($LastX,$LastY,$X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Cpt"=>$Cpt,"Mode"=>$Mode,"Weight"=>$Weight)); + + /* Get the last segment */ + $ArrowE["X1"] = $LastX; $ArrowE["Y1"] = $LastY; $ArrowE["X2"] = $X; $ArrowE["Y2"] = $Y; + + $LastX = $X; $LastY = $Y; + } + + if ( $DrawArrow && !$PathOnly ) + { + $ArrowSettings = array("FillR"=>$R,"FillG"=>$G,"FillB"=>$B,"Alpha"=>$Alpha,"Size"=>$ArrowSize,"Ratio"=>$ArrowRatio); + if ( $ArrowTwoHeads ) + $this->drawArrow($ArrowS["X1"],$ArrowS["Y1"],$ArrowS["X2"],$ArrowS["Y2"],$ArrowSettings); + + $this->drawArrow($ArrowE["X1"],$ArrowE["Y1"],$ArrowE["X2"],$ArrowE["Y2"],$ArrowSettings); + } + } + return($Q); + } + + /* Draw a line between two points */ + function drawLine($X1,$Y1,$X2,$Y2,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $Cpt = isset($Format["Cpt"]) ? $Format["Cpt"] : 1; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : 1; + $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; + $Threshold = isset($Format["Threshold"]) ? $Format["Threshold"] : NULL; + + if ( $this->Antialias == FALSE && $Ticks == NULL ) + { + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$this->Shadowa); + imageline($this->Picture,$X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,$ShadowColor); + } + + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + imageline($this->Picture,$X1,$Y1,$X2,$Y2,$Color); + return(0); + } + + $Distance = sqrt(($X2-$X1)*($X2-$X1)+($Y2-$Y1)*($Y2-$Y1)); + if ( $Distance == 0 ) { return(-1); } + + /* Derivative algorithm for overweighted lines, re-route to polygons primitives */ + if ( $Weight != NULL ) + { + $Angle = $this->getAngle($X1,$Y1,$X2,$Y2); + $PolySettings = array ("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderAlpha"=>$Alpha); + + if ( $Ticks == NULL ) + { + $Points = ""; + $Points[] = cos(deg2rad($Angle-90)) * $Weight + $X1; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Y1; + $Points[] = cos(deg2rad($Angle+90)) * $Weight + $X1; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Y1; + $Points[] = cos(deg2rad($Angle+90)) * $Weight + $X2; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Y2; + $Points[] = cos(deg2rad($Angle-90)) * $Weight + $X2; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Y2; + + $this->drawPolygon($Points,$PolySettings); + } + else + { + for($i=0;$i<=$Distance;$i=$i+$Ticks*2) + { + $Xa = (($X2-$X1)/$Distance) * $i + $X1; $Ya = (($Y2-$Y1)/$Distance) * $i + $Y1; + $Xb = (($X2-$X1)/$Distance) * ($i+$Ticks) + $X1; $Yb = (($Y2-$Y1)/$Distance) * ($i+$Ticks) + $Y1; + + $Points = ""; + $Points[] = cos(deg2rad($Angle-90)) * $Weight + $Xa; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Ya; + $Points[] = cos(deg2rad($Angle+90)) * $Weight + $Xa; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Ya; + $Points[] = cos(deg2rad($Angle+90)) * $Weight + $Xb; $Points[] = sin(deg2rad($Angle+90)) * $Weight + $Yb; + $Points[] = cos(deg2rad($Angle-90)) * $Weight + $Xb; $Points[] = sin(deg2rad($Angle-90)) * $Weight + $Yb; + + $this->drawPolygon($Points,$PolySettings); + } + } + + return(1); + } + + $XStep = ($X2-$X1) / $Distance; + $YStep = ($Y2-$Y1) / $Distance; + + for($i=0;$i<=$Distance;$i++) + { + $X = $i * $XStep + $X1; + $Y = $i * $YStep + $Y1; + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + + if ( $Threshold != NULL ) + { + foreach($Threshold as $Key => $Parameters) + { + if ( $Y <= $Parameters["MinX"] && $Y >= $Parameters["MaxX"]) + { + if ( isset($Parameters["R"]) ) { $RT = $Parameters["R"]; } else { $RT = 0; } + if ( isset($Parameters["G"]) ) { $GT = $Parameters["G"]; } else { $GT = 0; } + if ( isset($Parameters["B"]) ) { $BT = $Parameters["B"]; } else { $BT = 0; } + if ( isset($Parameters["Alpha"]) ) { $AlphaT = $Parameters["Alpha"]; } else { $AlphaT = 0; } + $Color = array("R"=>$RT,"G"=>$GT,"B"=>$BT,"Alpha"=>$AlphaT); + } + } + } + + if ( $Ticks != NULL ) + { + if ( $Cpt % $Ticks == 0 ) + { $Cpt = 0; if ( $Mode == 1 ) { $Mode = 0; } else { $Mode = 1; } } + + if ( $Mode == 1 ) + $this->drawAntialiasPixel($X,$Y,$Color); + + $Cpt++; + } + else + $this->drawAntialiasPixel($X,$Y,$Color); + } + + return(array($Cpt,$Mode)); + } + + /* Draw a circle */ + function drawCircle($Xc,$Yc,$Height,$Width,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + + $Height = abs($Height); + $Width = abs($Width); + + if ( $Height == 0 ) { $Height = 1; } + if ( $Width == 0 ) { $Width = 1; } + $Xc = floor($Xc); $Yc = floor($Yc); + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + $this->drawCircle($Xc+$this->ShadowX,$Yc+$this->ShadowY,$Height,$Width,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Ticks"=>$Ticks)); + } + + if ( $Width == 0 ) { $Width = $Height; } + if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } + if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } + if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } + + $Step = 360 / (2 * PI * max($Width,$Height)); + $Mode = 1; $Cpt = 1; + for($i=0;$i<=360;$i=$i+$Step) + { + $X = cos($i*PI/180) * $Height + $Xc; + $Y = sin($i*PI/180) * $Width + $Yc; + + if ( $Ticks != NULL ) + { + if ( $Cpt % $Ticks == 0 ) + { $Cpt = 0; if ( $Mode == 1 ) { $Mode = 0; } else { $Mode = 1; } } + + if ( $Mode == 1 ) + $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + $Cpt++; + } + else + $this->drawAntialiasPixel($X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + } + $this->Shadow = $RestoreShadow; + } + + /* Draw a filled circle */ + function drawFilledCircle($X,$Y,$Radius,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + + if ( $Radius == 0 ) { $Radius = 1; } + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + $X = floor($X); $Y = floor($Y); + + $Radius = abs($Radius); + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + $this->drawFilledCircle($X+$this->ShadowX,$Y+$this->ShadowY,$Radius,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Ticks"=>$Ticks)); + } + + $this->Mask = ""; + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + for ($i=0; $i<=$Radius*2; $i++) + { + $Slice = sqrt($Radius * $Radius - ($Radius - $i) * ($Radius - $i)); + $XPos = floor($Slice); + $YPos = $Y + $i - $Radius; + $AAlias = $Slice - floor($Slice); + + $this->Mask[$X-$XPos][$YPos] = TRUE; + $this->Mask[$X+$XPos][$YPos] = TRUE; + imageline($this->Picture,$X-$XPos,$YPos,$X+$XPos,$YPos,$Color); + } + if ( $this->Antialias ) + $this->drawCircle($X,$Y,$Radius,$Radius,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + + $this->Mask = ""; + + if ( $BorderR != -1 ) + $this->drawCircle($X,$Y,$Radius,$Radius,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$Ticks)); + + $this->Shadow = $RestoreShadow; + } + + /* Write text */ + function drawText($X,$Y,$Text,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : $this->FontColorR; + $G = isset($Format["G"]) ? $Format["G"] : $this->FontColorG; + $B = isset($Format["B"]) ? $Format["B"] : $this->FontColorB; + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $Align = isset($Format["Align"]) ? $Format["Align"] : TEXT_ALIGN_BOTTOMLEFT; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $this->FontColorA; + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; + $ShowOrigine = isset($Format["ShowOrigine"]) ? $Format["ShowOrigine"] : FALSE; + $TOffset = isset($Format["TOffset"]) ? $Format["TOffset"] : 2; + $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : FALSE; + $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : TRUE; + $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 6; + $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : FALSE; + $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 6; + $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 255; + $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 255; + $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 255; + $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 50; + $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; + $BoxBorderR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; + $BoxBorderG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; + $BoxBorderB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; + $BoxBorderAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 50; + $NoShadow = isset($Format["NoShadow"]) ? $Format["NoShadow"] : FALSE; + + $Shadow = $this->Shadow; + if ( $NoShadow ) { $this->Shadow = FALSE; } + + if ( $BoxSurrounding != "" ) { $BoxBorderR = $BoxR - $BoxSurrounding; $BoxBorderG = $BoxG - $BoxSurrounding; $BoxBorderB = $BoxB - $BoxSurrounding; $BoxBorderAlpha = $BoxAlpha; } + + if ( $ShowOrigine ) + { + $MyMarkerSettings = array("R"=>255,"G"=>0,"B"=>0,"BorderR"=>255,"BorderB"=>255,"BorderG"=>255,"Size"=>4); + $this->drawRectangleMarker($X,$Y,$MyMarkerSettings); + } + + $TxtPos = $this->getTextBox($X,$Y,$FontName,$FontSize,$Angle,$Text); + + if ( $DrawBox && ($Angle == 0 || $Angle == 90 || $Angle == 180 || $Angle == 270)) + { + $T[0]["X"]=0;$T[0]["Y"]=0;$T[1]["X"]=0;$T[1]["Y"]=0;$T[2]["X"]=0;$T[2]["Y"]=0;$T[3]["X"]=0;$T[3]["Y"]=0; + if ( $Angle == 0 ) { $T[0]["X"]=-$TOffset;$T[0]["Y"]=$TOffset;$T[1]["X"]=$TOffset;$T[1]["Y"]=$TOffset;$T[2]["X"]=$TOffset;$T[2]["Y"]=-$TOffset;$T[3]["X"]=-$TOffset;$T[3]["Y"]=-$TOffset; } + + $X1 = min($TxtPos[0]["X"],$TxtPos[1]["X"],$TxtPos[2]["X"],$TxtPos[3]["X"]) - $BorderOffset + 3; + $Y1 = min($TxtPos[0]["Y"],$TxtPos[1]["Y"],$TxtPos[2]["Y"],$TxtPos[3]["Y"]) - $BorderOffset; + $X2 = max($TxtPos[0]["X"],$TxtPos[1]["X"],$TxtPos[2]["X"],$TxtPos[3]["X"]) + $BorderOffset + 3; + $Y2 = max($TxtPos[0]["Y"],$TxtPos[1]["Y"],$TxtPos[2]["Y"],$TxtPos[3]["Y"]) + $BorderOffset - 3; + + $X1 = $X1 - $TxtPos[$Align]["X"] + $X + $T[0]["X"]; + $Y1 = $Y1 - $TxtPos[$Align]["Y"] + $Y + $T[0]["Y"]; + $X2 = $X2 - $TxtPos[$Align]["X"] + $X + $T[0]["X"]; + $Y2 = $Y2 - $TxtPos[$Align]["Y"] + $Y + $T[0]["Y"]; + + $Settings = array("R"=>$BoxR,"G"=>$BoxG,"B"=>$BoxB,"Alpha"=>$BoxAlpha,"BorderR"=>$BoxBorderR,"BorderG"=>$BoxBorderG,"BorderB"=>$BoxBorderB,"BorderAlpha"=>$BoxBorderAlpha); + + if ( $BoxRounded ) + { $this->drawRoundedFilledRectangle($X1,$Y1,$X2,$Y2,$RoundedRadius,$Settings); } + else + { $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Settings); } + } + + $X = $X - $TxtPos[$Align]["X"] + $X; + $Y = $Y - $TxtPos[$Align]["Y"] + $Y; + + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $C_ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$this->Shadowa); + imagettftext($this->Picture,$FontSize,$Angle,$X+$this->ShadowX,$Y+$this->ShadowY,$C_ShadowColor,$FontName,$Text); + } + + $C_TextColor = $this->AllocateColor($this->Picture,$R,$G,$B,$Alpha); + imagettftext($this->Picture,$FontSize,$Angle,$X,$Y,$C_TextColor,$FontName,$Text); + + $this->Shadow = $Shadow; + + return($TxtPos); + } + + /* Draw a gradient within a defined area */ + function drawGradientArea($X1,$Y1,$X2,$Y2,$Direction,$Format="") + { + $StartR = isset($Format["StartR"]) ? $Format["StartR"] : 90; + $StartG = isset($Format["StartG"]) ? $Format["StartG"] : 90; + $StartB = isset($Format["StartB"]) ? $Format["StartB"] : 90; + $EndR = isset($Format["EndR"]) ? $Format["EndR"] : 0; + $EndG = isset($Format["EndG"]) ? $Format["EndG"] : 0; + $EndB = isset($Format["EndB"]) ? $Format["EndB"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Levels = isset($Format["Levels"]) ? $Format["Levels"] : NULL; + + $Shadow = $this->Shadow; + $this->Shadow = FALSE; + + if ( $StartR == $EndR && $StartG == $EndG && $StartB == $EndB ) + { + $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,array("R"=>$StartR,"G"=>$StartG,"B"=>$StartB,"Alpha"=>$Alpha)); + return(0); + } + + if ( $Levels != NULL ) + { $EndR=$StartR+$Levels; $EndG=$StartG+$Levels; $EndB=$StartB+$Levels; } + + if ($X1 > $X2) { list($X1, $X2) = array($X2, $X1); } + if ($Y1 > $Y2) { list($Y1, $Y2) = array($Y2, $Y1); } + + if ( $Direction == DIRECTION_VERTICAL ) { $Width = abs($Y2-$Y1); } + if ( $Direction == DIRECTION_HORIZONTAL ) { $Width = abs($X2-$X1); } + + $Step = max(abs($EndR-$StartR),abs($EndG-$StartG),abs($EndB-$StartB)); + $StepSize = $Width/$Step; + $RStep = ($EndR-$StartR)/$Step; + $GStep = ($EndG-$StartG)/$Step; + $BStep = ($EndB-$StartB)/$Step; + + $R=$StartR;$G=$StartG;$B=$StartB; + switch($Direction) + { + case DIRECTION_VERTICAL: + $StartY = $Y1; $EndY = floor($Y2)+1; $LastY2 = $StartY; + for($i=0;$i<=$Step;$i++) + { + $Y2 = floor($StartY + ($i * $StepSize)); + + if ($Y2 > $EndY) { $Y2 = $EndY; } + if (($Y1 != $Y2 && $Y1 < $Y2) || $Y2 == $EndY) + { + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); + $LastY2 = max($LastY2,$Y2); + $Y1 = $Y2+1; + } + $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; + } + if ( $LastY2 < $EndY && isset($Color)) { for ($i=$LastY2+1;$i<=$EndY;$i++) { $this->drawLine($X1,$i,$X2,$i,$Color); } } + break; + + case DIRECTION_HORIZONTAL: + $StartX = $X1; $EndX = $X2; + for($i=0;$i<=$Step;$i++) + { + $X2 = floor($StartX + ($i * $StepSize)); + + if ($X2 > $EndX) { $X2 = $EndX; } + if (($X1 != $X2 && $X1 < $X2) || $X2 == $EndX) + { + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + $this->drawFilledRectangle($X1,$Y1,$X2,$Y2,$Color); + $X1 = $X2+1; + } + $R = $R + $RStep; $G = $G + $GStep; $B = $B + $BStep; + } + if ( $X2 < $EndX && isset($Color)) { $this->drawFilledRectangle($X2,$Y1,$EndX,$Y2,$Color); } + break; + } + + $this->Shadow = $Shadow; + + } + + /* Draw an aliased pixel */ + function drawAntialiasPixel($X,$Y,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + + if ( $X < 0 || $Y < 0 || $X >= $this->XSize || $Y >= $this->YSize ) + return(-1); + + if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } + if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } + if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } + + if ( !$this->Antialias ) + { + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$this->Shadowa); + imagesetpixel($this->Picture,$X+$this->ShadowX,$Y+$this->ShadowY,$ShadowColor); + } + + $PlotColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + imagesetpixel($this->Picture,$X,$Y,$PlotColor); + + return(0); + } + + $Plot = ""; + $Xi = floor($X); + $Yi = floor($Y); + + if ( $Xi == $X && $Yi == $Y) + { + if ( $Alpha == 100 ) + $this->drawAlphaPixel($X,$Y,100,$R,$G,$B); + else + $this->drawAlphaPixel($X,$Y,$Alpha,$R,$G,$B); + } + else + { + $Alpha1 = (((1 - ($X - floor($X))) * (1 - ($Y - floor($Y))) * 100) / 100) * $Alpha; + if ( $Alpha1 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi,$Yi,$Alpha1,$R,$G,$B); } + + $Alpha2 = ((($X - floor($X)) * (1 - ($Y - floor($Y))) * 100) / 100) * $Alpha; + if ( $Alpha2 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi+1,$Yi,$Alpha2,$R,$G,$B); } + + $Alpha3 = (((1 - ($X - floor($X))) * ($Y - floor($Y)) * 100) / 100) * $Alpha; + if ( $Alpha3 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi,$Yi+1,$Alpha3,$R,$G,$B); } + + $Alpha4 = ((($X - floor($X)) * ($Y - floor($Y)) * 100) / 100) * $Alpha; + if ( $Alpha4 > $this->AntialiasQuality ) { $this->drawAlphaPixel($Xi+1,$Yi+1,$Alpha4,$R,$G,$B); } + } + } + + /* Draw a semi-transparent pixel */ + function drawAlphaPixel($X,$Y,$Alpha,$R,$G,$B) + { + if ( isset($this->Mask[$X])) { if ( isset($this->Mask[$X][$Y]) ) { return(0); } } + + if ( $X < 0 || $Y < 0 || $X >= $this->XSize || $Y >= $this->YSize ) + return(-1); + + if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } + if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } + if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } + + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $AlphaFactor = floor(($Alpha / 100) * $this->Shadowa); + $ShadowColor = $this->allocateColor($this->Picture,$this->ShadowR,$this->ShadowG,$this->ShadowB,$AlphaFactor); + imagesetpixel($this->Picture,$X+$this->ShadowX,$Y+$this->ShadowY,$ShadowColor); + } + + $C_Aliased = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + imagesetpixel($this->Picture,$X,$Y,$C_Aliased); + } + + /* Convert apha to base 10 */ + function convertAlpha($AlphaValue) + { return((127/100)*(100-$AlphaValue)); } + + /* Allocate a color with transparency */ + function allocateColor($Picture,$R,$G,$B,$Alpha=100) + { + if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; } + if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; } + if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; } + if ( $Alpha < 0 ) { $Alpha = 0; } + if ( $Alpha > 100) { $Alpha = 100; } + + $Alpha = $this->convertAlpha($Alpha); + return(imagecolorallocatealpha($Picture,$R,$G,$B,$Alpha)); + } + + /* Load a PNG file and draw it over the chart */ + function drawFromPNG($X,$Y,$FileName) + { $this->drawFromPicture(1,$FileName,$X,$Y); } + + /* Load a GIF file and draw it over the chart */ + function drawFromGIF($X,$Y,$FileName) + { $this->drawFromPicture(2,$FileName,$X,$Y); } + + /* Load a JPEG file and draw it over the chart */ + function drawFromJPG($X,$Y,$FileName) + { $this->drawFromPicture(3,$FileName,$X,$Y); } + + function getPicInfo($FileName) + { + $Infos = getimagesize($FileName); + $Width = $Infos[0]; + $Height = $Infos[1]; + $Type = $Infos["mime"]; + + if ( $Type == "image/png") { $Type = 1; } + if ( $Type == "image/gif") { $Type = 2; } + if ( $Type == "image/jpeg ") { $Type = 3; } + + return(array($Width,$Height,$Type)); + } + + /* Generic loader function for external pictures */ + function drawFromPicture($PicType,$FileName,$X,$Y) + { + if ( file_exists($FileName)) + { + list($Width,$Height) = $this->getPicInfo($FileName); + + if ( $PicType == 1 ) + { $Raster = imagecreatefrompng($FileName); } + elseif ( $PicType == 2 ) + { $Raster = imagecreatefromgif($FileName); } + elseif ( $PicType == 3 ) + { $Raster = imagecreatefromjpeg($FileName); } + else + { return(0); } + + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + if ( $PicType == 3 ) + $this->drawFilledRectangle($X+$this->ShadowX,$Y+$this->ShadowY,$X+$Width+$this->ShadowX,$Y+$Height+$this->ShadowY,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); + else + { + $TranparentID = imagecolortransparent($Raster); + for ($Xc=0;$Xc<=$Width-1;$Xc++) + { + for ($Yc=0;$Yc<=$Height-1;$Yc++) + { + $RGBa = imagecolorat($Raster,$Xc,$Yc); + $Values = imagecolorsforindex($Raster,$RGBa); + if ( $Values["alpha"] < 120 ) + { + $AlphaFactor = floor(($this->Shadowa / 100) * ((100 / 127) * (127-$Values["alpha"]))); + $this->drawAlphaPixel($X+$Xc+$this->ShadowX,$Y+$Yc+$this->ShadowY,$AlphaFactor,$this->ShadowR,$this->ShadowG,$this->ShadowB); + } + } + } + } + } + $this->Shadow = $RestoreShadow; + + imagecopy($this->Picture,$Raster,$X,$Y,0,0,$Width,$Height); + imagedestroy($Raster); + } + } + + /* Draw an arrow */ + function drawArrow($X1,$Y1,$X2,$Y2,$Format="") + { + $FillR = isset($Format["FillR"]) ? $Format["FillR"] : 0; + $FillG = isset($Format["FillG"]) ? $Format["FillG"] : 0; + $FillB = isset($Format["FillB"]) ? $Format["FillB"] : 0; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $FillR; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $FillG; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $FillB; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Size = isset($Format["Size"]) ? $Format["Size"] : 10; + $Ratio = isset($Format["Ratio"]) ? $Format["Ratio"] : .5; + $TwoHeads = isset($Format["TwoHeads"]) ? $Format["TwoHeads"] : FALSE; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : FALSE; + + /* Calculate the line angle */ + $Angle = $this->getAngle($X1,$Y1,$X2,$Y2); + + /* Override Shadow support, this will be managed internally */ + $RestoreShadow = $this->Shadow; + if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 ) + { + $this->Shadow = FALSE; + $this->drawArrow($X1+$this->ShadowX,$Y1+$this->ShadowY,$X2+$this->ShadowX,$Y2+$this->ShadowY,array("FillR"=>$this->ShadowR,"FillG"=>$this->ShadowG,"FillB"=>$this->ShadowB,"Alpha"=>$this->Shadowa,"Size"=>$Size,"Ratio"=>$Ratio,"TwoHeads"=>$TwoHeads,"Ticks"=>$Ticks)); + } + + /* Draw the 1st Head */ + $TailX = cos(($Angle-180)*PI/180)*$Size+$X2; + $TailY = sin(($Angle-180)*PI/180)*$Size+$Y2; + + $Points = ""; + $Points[] = $X2; $Points[] = $Y2; + $Points[] = cos(($Angle-90)*PI/180)*$Size*$Ratio+$TailX; $Points[] = sin(($Angle-90)*PI/180)*$Size*$Ratio+$TailY; + $Points[] = cos(($Angle-270)*PI/180)*$Size*$Ratio+$TailX; $Points[] = sin(($Angle-270)*PI/180)*$Size*$Ratio+$TailY; + $Points[] = $X2; $Points[] = $Y2; + + /* Visual correction */ + if ($Angle == 180 || $Angle == 360 ) { $Points[4] = $Points[2]; } + if ($Angle == 90 || $Angle == 270 ) { $Points[5] = $Points[3]; } + + $ArrowColor = $this->allocateColor($this->Picture,$FillR,$FillG,$FillB,$Alpha); + ImageFilledPolygon($this->Picture,$Points,4,$ArrowColor); + + $this->drawLine($Points[0],$Points[1],$Points[2],$Points[3],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + $this->drawLine($Points[2],$Points[3],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + $this->drawLine($Points[0],$Points[1],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + + /* Draw the second head */ + if ( $TwoHeads ) + { + $Angle = $this->getAngle($X2,$Y2,$X1,$Y1); + + $TailX2 = cos(($Angle-180)*PI/180)*$Size+$X1; + $TailY2 = sin(($Angle-180)*PI/180)*$Size+$Y1; + + $Points = ""; + $Points[] = $X1; $Points[] = $Y1; + $Points[] = cos(($Angle-90)*PI/180)*$Size*$Ratio+$TailX2; $Points[] = sin(($Angle-90)*PI/180)*$Size*$Ratio+$TailY2; + $Points[] = cos(($Angle-270)*PI/180)*$Size*$Ratio+$TailX2; $Points[] = sin(($Angle-270)*PI/180)*$Size*$Ratio+$TailY2; + $Points[] = $X1; $Points[] = $Y1; + + /* Visual correction */ + if ($Angle == 180 || $Angle == 360 ) { $Points[4] = $Points[2]; } + if ($Angle == 90 || $Angle == 270 ) { $Points[5] = $Points[3]; } + + $ArrowColor = $this->allocateColor($this->Picture,$FillR,$FillG,$FillB,$Alpha); + ImageFilledPolygon($this->Picture,$Points,4,$ArrowColor); + + $this->drawLine($Points[0],$Points[1],$Points[2],$Points[3],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + $this->drawLine($Points[2],$Points[3],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + $this->drawLine($Points[0],$Points[1],$Points[4],$Points[5],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + + $this->drawLine($TailX,$TailY,$TailX2,$TailY2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + else + $this->drawLine($X1,$Y1,$TailX,$TailY,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + + /* Re-enable shadows */ + $this->Shadow = $RestoreShadow; + } + + /* Draw a label with associated arrow */ + function drawArrowLabel($X1,$Y1,$Text,$Format="") + { + $FillR = isset($Format["FillR"]) ? $Format["FillR"] : 0; + $FillG = isset($Format["FillG"]) ? $Format["FillG"] : 0; + $FillB = isset($Format["FillB"]) ? $Format["FillB"] : 0; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $FillR; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $FillG; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $FillB; + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Length = isset($Format["Length"]) ? $Format["Length"] : 50; + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 315; + $Size = isset($Format["Size"]) ? $Format["Size"] : 10; + $Position = isset($Format["Position"]) ? $Format["Position"] : POSITION_TOP; + $RoundPos = isset($Format["RoundPos"]) ? $Format["RoundPos"] : FALSE; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + + $Angle = $Angle % 360; + + $X2 = sin(($Angle+180)*PI/180)*$Length+$X1; + $Y2 = cos(($Angle+180)*PI/180)*$Length+$Y1; + + if ( $RoundPos && $Angle > 0 && $Angle < 180 ) { $Y2 = ceil($Y2); } + if ( $RoundPos && $Angle > 180 ) { $Y2 = floor($Y2); } + + $this->drawArrow($X2,$Y2,$X1,$Y1,$Format); + + $Size = imagettfbbox($FontSize,0,$FontName,$Text); + $TxtWidth = max(abs($Size[2]-$Size[0]),abs($Size[0]-$Size[6])); + $TxtHeight = max(abs($Size[1]-$Size[7]),abs($Size[3]-$Size[1])); + + if ( $Angle > 0 && $Angle < 180 ) + { + $this->drawLine($X2,$Y2,$X2-$TxtWidth,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + if ( $Position == POSITION_TOP ) + $this->drawText($X2,$Y2-2,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Align"=>TEXT_ALIGN_BOTTOMRIGHT)); + else + $this->drawText($X2,$Y2+4,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Align"=>TEXT_ALIGN_TOPRIGHT)); + } + else + { + $this->drawLine($X2,$Y2,$X2+$TxtWidth,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + if ( $Position == POSITION_TOP ) + $this->drawText($X2,$Y2-2,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha)); + else + $this->drawText($X2,$Y2+4,$Text,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$Alpha,"Align"=>TEXT_ALIGN_TOPLEFT)); + } + } + + /* Draw a progress bar filled with specified % */ + function drawProgress($X,$Y,$Percent,$Format="") + { + if ( $Percent > 100 ) { $Percent = 100; } + if ( $Percent < 0 ) { $Percent = 0; } + + $Width = isset($Format["Width"]) ? $Format["Width"] : 200; + $Height = isset($Format["Height"]) ? $Format["Height"] : 20; + $Orientation = isset($Format["Orientation"]) ? $Format["Orientation"] : ORIENTATION_HORIZONTAL; + $ShowLabel = isset($Format["ShowLabel"]) ? $Format["ShowLabel"] : FALSE; + $LabelPos = isset($Format["LabelPos"]) ? $Format["LabelPos"] : LABEL_POS_INSIDE; + $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 10; + $R = isset($Format["R"]) ? $Format["R"] : 130; + $G = isset($Format["G"]) ? $Format["G"] : 130; + $B = isset($Format["B"]) ? $Format["B"] : 130; + $RFade = isset($Format["RFade"]) ? $Format["RFade"] : -1; + $GFade = isset($Format["GFade"]) ? $Format["GFade"] : -1; + $BFade = isset($Format["BFade"]) ? $Format["BFade"] : -1; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; + $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 0; + $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 0; + $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 0; + $BoxBackR = isset($Format["BoxBackR"]) ? $Format["BoxBackR"] : 255; + $BoxBackG = isset($Format["BoxBackG"]) ? $Format["BoxBackG"] : 255; + $BoxBackB = isset($Format["BoxBackB"]) ? $Format["BoxBackB"] : 255; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : NULL; + $NoAngle = isset($Format["NoAngle"]) ? $Format["NoAngle"] : FALSE; + + if ( $RFade != -1 && $GFade != -1 && $BFade != -1 ) + { + $RFade = (($RFade-$R)/100)*$Percent+$R; + $GFade = (($GFade-$G)/100)*$Percent+$G; + $BFade = (($BFade-$B)/100)*$Percent+$B; + } + + if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } + if ( $BoxSurrounding != NULL ) { $BoxBorderR = $BoxBackR + $Surrounding; $BoxBorderG = $BoxBackG + $Surrounding; $BoxBorderB = $BoxBackB + $Surrounding; } + + if ( $Orientation == ORIENTATION_VERTICAL ) + { + $InnerHeight = (($Height-2)/100)*$Percent; + $this->drawFilledRectangle($X,$Y,$X+$Width,$Y-$Height,array("R"=>$BoxBackR,"G"=>$BoxBackG,"B"=>$BoxBackB,"BorderR"=>$BoxBorderR,"BorderG"=>$BoxBorderG,"BorderB"=>$BoxBorderB,"NoAngle"=>$NoAngle)); + + $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; + if ( $RFade != -1 && $GFade != -1 && $BFade != -1 ) + { + $GradientOptions = array("StartR"=>$RFade,"StartG"=>$GFade,"StartB"=>$BFade,"EndR"=>$R,"EndG"=>$G,"EndB"=>$B); + $this->drawGradientArea($X+1,$Y-1,$X+$Width-1,$Y-$InnerHeight,DIRECTION_VERTICAL,$GradientOptions); + + if ( $Surrounding ) + $this->drawRectangle($X+1,$Y-1,$X+$Width-1,$Y-$InnerHeight,array("R"=>255,"G"=>255,"B"=>255,"Alpha"=>$Surrounding)); + } + else + $this->drawFilledRectangle($X+1,$Y-1,$X+$Width-1,$Y-$InnerHeight,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + + $this->Shadow = $RestoreShadow; + + if ( $ShowLabel && $LabelPos == LABEL_POS_BOTTOM ) { $this->drawText($X+($Width/2),$Y+$Margin,$Percent."%",array("Align"=>TEXT_ALIGN_TOPMIDDLE)); } + if ( $ShowLabel && $LabelPos == LABEL_POS_TOP ) { $this->drawText($X+($Width/2),$Y-$Height-$Margin,$Percent."%",array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } + if ( $ShowLabel && $LabelPos == LABEL_POS_INSIDE ) { $this->drawText($X+($Width/2),$Y-$InnerHeight-$Margin,$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLELEFT,"Angle"=>90)); } + if ( $ShowLabel && $LabelPos == LABEL_POS_CENTER ) { $this->drawText($X+($Width/2),$Y-($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"Angle"=>90)); } + } + else + { + if ( $Percent == 100 ) + $InnerWidth = $Width-1; + else + $InnerWidth = (($Width-2)/100)*$Percent; + + $this->drawFilledRectangle($X,$Y,$X+$Width,$Y+$Height,array("R"=>$BoxBackR,"G"=>$BoxBackG,"B"=>$BoxBackB,"BorderR"=>$BoxBorderR,"BorderG"=>$BoxBorderG,"BorderB"=>$BoxBorderB,"NoAngle"=>$NoAngle)); + + $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; + if ( $RFade != -1 && $GFade != -1 && $BFade != -1 ) + { + $GradientOptions = array("StartR"=>$R,"StartG"=>$G,"StartB"=>$B,"EndR"=>$RFade,"EndG"=>$GFade,"EndB"=>$BFade); + $this->drawGradientArea($X+1,$Y+1,$X+$InnerWidth,$Y+$Height-1,DIRECTION_HORIZONTAL,$GradientOptions); + + if ( $Surrounding ) + $this->drawRectangle($X+1,$Y+1,$X+$InnerWidth,$Y+$Height-1,array("R"=>255,"G"=>255,"B"=>255,"Alpha"=>$Surrounding)); + } + else + $this->drawFilledRectangle($X+1,$Y+1,$X+$InnerWidth,$Y+$Height-1,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + + $this->Shadow = $RestoreShadow; + + if ( $ShowLabel && $LabelPos == LABEL_POS_LEFT ) { $this->drawText($X-$Margin,$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); } + if ( $ShowLabel && $LabelPos == LABEL_POS_RIGHT ) { $this->drawText($X+$Width+$Margin,$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } + if ( $ShowLabel && $LabelPos == LABEL_POS_CENTER ) { $this->drawText($X+($Width/2),$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); } + if ( $ShowLabel && $LabelPos == LABEL_POS_INSIDE ) { $this->drawText($X+$InnerWidth+$Margin,$Y+($Height/2),$Percent."%",array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } + } + } + + /* Get the legend box size */ + function getLegendSize($Format="") + { + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; + $BoxSize = isset($Format["BoxSize"]) ? $Format["BoxSize"] : 5; + $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; + $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; + $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 5; + $BoxHeight = isset($Format["BoxHeight"]) ? $Format["BoxHeight"] : 5; + $IconAreaWidth = isset($Format["IconAreaWidth"]) ? $Format["IconAreaWidth"] : $BoxWidth; + $IconAreaHeight = isset($Format["IconAreaHeight"]) ? $Format["IconAreaHeight"] : $BoxHeight; + $XSpacing = isset($Format["XSpacing"]) ? $Format["XSpacing"] : 5; + + $Data = $this->DataSet->getData(); + + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] && isset($Serie["Picture"])) + { + list($PicWidth,$PicHeight) = $this->getPicInfo($Serie["Picture"]); + if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } + if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } + } + } + + $YStep = max($this->FontSize,$IconAreaHeight) + 5; + $XStep = $IconAreaWidth + 5; + $XStep = $XSpacing; + + $X=100; $Y=100; + + $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + if ( $Mode == LEGEND_VERTICAL ) + { + $BoxArray = $this->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Serie["Description"]); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Lines = preg_split("/\n/",$Serie["Description"]); + $vY = $vY + max($this->FontSize*count($Lines),$IconAreaHeight) + 5; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $Lines = preg_split("/\n/",$Serie["Description"]); + $Width = ""; + foreach($Lines as $Key => $Value) + { + $BoxArray = $this->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Width[] = $BoxArray[1]["X"]; + } + + $vX=max($Width)+$XStep; + } + } + } + $vY=$vY-$YStep; $vX=$vX-$XStep; + + $TopOffset = $Y - $Boundaries["T"]; + if ( $Boundaries["B"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries["B"] = $vY+$IconAreaHeight+$TopOffset; } + + $Width = ($Boundaries["R"]+$Margin) - ($Boundaries["L"]-$Margin); + $Height = ($Boundaries["B"]+$Margin) - ($Boundaries["T"]-$Margin); + + return(array("Width"=>$Width,"Height"=>$Height)); + } + + /* Draw the legend of the active series */ + function drawLegend($X,$Y,$Format="") + { + $Family = isset($Format["Family"]) ? $Format["Family"] : LEGEND_FAMILY_BOX; + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; + $FontR = isset($Format["FontR"]) ? $Format["FontR"] : $this->FontColorR; + $FontG = isset($Format["FontG"]) ? $Format["FontG"] : $this->FontColorG; + $FontB = isset($Format["FontB"]) ? $Format["FontB"] : $this->FontColorB; + $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 5; + $BoxHeight = isset($Format["BoxHeight"]) ? $Format["BoxHeight"] : 5; + $IconAreaWidth = isset($Format["IconAreaWidth"]) ? $Format["IconAreaWidth"] : $BoxWidth; + $IconAreaHeight = isset($Format["IconAreaHeight"]) ? $Format["IconAreaHeight"] : $BoxHeight; + $XSpacing = isset($Format["XSpacing"]) ? $Format["XSpacing"] : 5; + $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; + $R = isset($Format["R"]) ? $Format["R"] : 200; + $G = isset($Format["G"]) ? $Format["G"] : 200; + $B = isset($Format["B"]) ? $Format["B"] : 200; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; + + if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } + + $Data = $this->DataSet->getData(); + + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] && isset($Serie["Picture"])) + { + list($PicWidth,$PicHeight) = $this->getPicInfo($Serie["Picture"]); + if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } + if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } + } + } + + $YStep = max($this->FontSize,$IconAreaHeight) + 5; + $XStep = $IconAreaWidth + 5; + $XStep = $XSpacing; + + $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + if ( $Mode == LEGEND_VERTICAL ) + { + $BoxArray = $this->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Serie["Description"]); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Lines = preg_split("/\n/",$Serie["Description"]); + $vY = $vY + max($this->FontSize*count($Lines),$IconAreaHeight) + 5; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $Lines = preg_split("/\n/",$Serie["Description"]); + $Width = ""; + foreach($Lines as $Key => $Value) + { + $BoxArray = $this->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Width[] = $BoxArray[1]["X"]; + } + + $vX=max($Width)+$XStep; + } + } + } + $vY=$vY-$YStep; $vX=$vX-$XStep; + + $TopOffset = $Y - $Boundaries["T"]; + if ( $Boundaries["B"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries["B"] = $vY+$IconAreaHeight+$TopOffset; } + + if ( $Style == LEGEND_ROUND ) + $this->drawRoundedFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + elseif ( $Style == LEGEND_BOX ) + $this->drawFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + + $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; + $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; + + if ( isset($Serie["Picture"]) ) + { + $Picture = $Serie["Picture"]; + list($PicWidth,$PicHeight) = $this->getPicInfo($Picture); + $PicX = $X+$IconAreaWidth/2; $PicY = $Y+$IconAreaHeight/2; + + $this->drawFromPNG($PicX-$PicWidth/2,$PicY-$PicHeight/2,$Picture); + } + else + { + if ( $Family == LEGEND_FAMILY_BOX ) + { + if ( $BoxWidth != $IconAreaWidth ) { $XOffset = floor(($IconAreaWidth-$BoxWidth)/2); } else { $XOffset = 0; } + if ( $BoxHeight != $IconAreaHeight ) { $YOffset = floor(($IconAreaHeight-$BoxHeight)/2); } else { $YOffset = 0; } + + $this->drawFilledRectangle($X+1+$XOffset,$Y+1+$YOffset,$X+$BoxWidth+$XOffset+1,$Y+$BoxHeight+1+$YOffset,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + $this->drawFilledRectangle($X+$XOffset,$Y+$YOffset,$X+$BoxWidth+$XOffset,$Y+$BoxHeight+$YOffset,array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); + } + elseif ( $Family == LEGEND_FAMILY_CIRCLE ) + { + $this->drawFilledCircle($X+1+$IconAreaWidth/2,$Y+1+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + $this->drawFilledCircle($X+$IconAreaWidth/2,$Y+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); + } + elseif ( $Family == LEGEND_FAMILY_LINE ) + { + $this->drawLine($X+1,$Y+1+$IconAreaHeight/2,$X+1+$IconAreaWidth,$Y+1+$IconAreaHeight/2,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20,"Ticks"=>$Ticks,"Weight"=>$Weight)); + $this->drawLine($X,$Y+$IconAreaHeight/2,$X+$IconAreaWidth,$Y+$IconAreaHeight/2,array("R"=>$R,"G"=>$G,"B"=>$B,"Ticks"=>$Ticks,"Weight"=>$Weight)); + } + } + + if ( $Mode == LEGEND_VERTICAL ) + { + $Lines = preg_split("/\n/",$Serie["Description"]); + foreach($Lines as $Key => $Value) + $this->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontSize"=>$FontSize,"FontName"=>$FontName)); + + $Y=$Y+max($this->FontSize*count($Lines),$IconAreaHeight) + 5; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $Lines = preg_split("/\n/",$Serie["Description"]); + $Width = ""; + foreach($Lines as $Key => $Value) + { + $BoxArray = $this->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontSize"=>$FontSize,"FontName"=>$FontName)); + $Width[] = $BoxArray[1]["X"]; + } + $X=max($Width)+2+$XStep; + } + } + } + + + $this->Shadow = $RestoreShadow; + } + + function drawScale($Format="") + { + $Pos = isset($Format["Pos"]) ? $Format["Pos"] : SCALE_POS_LEFTRIGHT; + $Floating = isset($Format["Floating"]) ? $Format["Floating"] : FALSE; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : SCALE_MODE_FLOATING; + $RemoveXAxis = isset($Format["RemoveXAxis"]) ? $Format["RemoveXAxis"] : FALSE; + $MinDivHeight = isset($Format["MinDivHeight"]) ? $Format["MinDivHeight"] : 20; + $Factors = isset($Format["Factors"]) ? $Format["Factors"] : array(1,2,5); + $ManualScale = isset($Format["ManualScale"]) ? $Format["ManualScale"] : array("0"=>array("Min"=>-100,"Max"=>100)); + $XMargin = isset($Format["XMargin"]) ? $Format["XMargin"] : AUTO; + $YMargin = isset($Format["YMargin"]) ? $Format["YMargin"] : 0; + $ScaleSpacing = isset($Format["ScaleSpacing"]) ? $Format["ScaleSpacing"] : 15; + $InnerTickWidth = isset($Format["InnerTickWidth"]) ? $Format["InnerTickWidth"] : 2; + $OuterTickWidth = isset($Format["OuterTickWidth"]) ? $Format["OuterTickWidth"] : 2; + $DrawXLines = isset($Format["DrawXLines"]) ? $Format["DrawXLines"] : TRUE; + $DrawYLines = isset($Format["DrawYLines"]) ? $Format["DrawYLines"] : ALL; + $GridTicks = isset($Format["GridTicks"]) ? $Format["GridTicks"] : 4; + $GridR = isset($Format["GridR"]) ? $Format["GridR"] : 255; + $GridG = isset($Format["GridG"]) ? $Format["GridG"] : 255; + $GridB = isset($Format["GridB"]) ? $Format["GridB"] : 255; + $GridAlpha = isset($Format["GridAlpha"]) ? $Format["GridAlpha"] : 40; + $AxisRo = isset($Format["AxisR"]) ? $Format["AxisR"] : 0; + $AxisGo = isset($Format["AxisG"]) ? $Format["AxisG"] : 0; + $AxisBo = isset($Format["AxisB"]) ? $Format["AxisB"] : 0; + $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 100; + $TickRo = isset($Format["TickR"]) ? $Format["TickR"] : 0; + $TickGo = isset($Format["TickG"]) ? $Format["TickG"] : 0; + $TickBo = isset($Format["TickB"]) ? $Format["TickB"] : 0; + $TickAlpha = isset($Format["TickAlpha"]) ? $Format["TickAlpha"] : 100; + $DrawSubTicks = isset($Format["DrawSubTicks"]) ? $Format["DrawSubTicks"] : FALSE; + $InnerSubTickWidth = isset($Format["InnerSubTickWidth"]) ? $Format["InnerSubTickWidth"] : 0; + $OuterSubTickWidth = isset($Format["OuterSubTickWidth"]) ? $Format["OuterSubTickWidth"] : 2; + $SubTickR = isset($Format["SubTickR"]) ? $Format["SubTickR"] : 255; + $SubTickG = isset($Format["SubTickG"]) ? $Format["SubTickG"] : 0; + $SubTickB = isset($Format["SubTickB"]) ? $Format["SubTickB"] : 0; + $SubTickAlpha = isset($Format["SubTickAlpha"]) ? $Format["SubTickAlpha"] : 100; + $AutoAxisLabels = isset($Format["AutoAxisLabels"]) ? $Format["AutoAxisLabels"] : TRUE; + $XReleasePercent = isset($Format["XReleasePercent"]) ? $Format["XReleasePercent"] : 1; + $DrawArrows = isset($Format["DrawArrows"]) ? $Format["DrawArrows"] : FALSE; + $ArrowSize = isset($Format["ArrowSize"]) ? $Format["ArrowSize"] : 8; + $CycleBackground = isset($Format["CycleBackground"]) ? $Format["CycleBackground"] : FALSE; + $BackgroundR1 = isset($Format["BackgroundR1"]) ? $Format["BackgroundR1"] : 255; + $BackgroundG1 = isset($Format["BackgroundG1"]) ? $Format["BackgroundG1"] : 255; + $BackgroundB1 = isset($Format["BackgroundB1"]) ? $Format["BackgroundB1"] : 255; + $BackgroundAlpha1 = isset($Format["BackgroundAlpha1"]) ? $Format["BackgroundAlpha1"] : 20; + $BackgroundR2 = isset($Format["BackgroundR2"]) ? $Format["BackgroundR2"] : 230; + $BackgroundG2 = isset($Format["BackgroundG2"]) ? $Format["BackgroundG2"] : 230; + $BackgroundB2 = isset($Format["BackgroundB2"]) ? $Format["BackgroundB2"] : 230; + $BackgroundAlpha2 = isset($Format["BackgroundAlpha2"]) ? $Format["BackgroundAlpha2"] : 20; + $LabelingMethod = isset($Format["LabelingMethod"]) ? $Format["LabelingMethod"] : LABELING_ALL; + $LabelSkip = isset($Format["LabelSkip"]) ? $Format["LabelSkip"] : 0; + $LabelRotation = isset($Format["LabelRotation"]) ? $Format["LabelRotation"] : 0; + $SkippedAxisTicks = isset($Format["SkippedAxisTicks"]) ? $Format["SkippedAxisTicks"] : $GridTicks+2; + $SkippedAxisR = isset($Format["SkippedAxisR"]) ? $Format["SkippedAxisR"] : $GridR; + $SkippedAxisG = isset($Format["SkippedAxisG"]) ? $Format["SkippedAxisG"] : $GridG; + $SkippedAxisB = isset($Format["SkippedAxisB"]) ? $Format["SkippedAxisB"] : $GridB; + $SkippedAxisAlpha = isset($Format["SkippedAxisAlpha"]) ? $Format["SkippedAxisAlpha"] : $GridAlpha-30; + $SkippedTickR = isset($Format["SkippedTickR"]) ? $Format["SkippedTickR"] : $TickRo; + $SkippedTickG = isset($Format["SkippedTickG"]) ? $Format["SkippedTickG"] : $TickGo; + $SkippedTickB = isset($Format["SkippedTicksB"]) ? $Format["SkippedTickB"] : $TickBo; + $SkippedTickAlpha = isset($Format["SkippedTickAlpha"]) ? $Format["SkippedTickAlpha"] : $TickAlpha-80; + $SkippedInnerTickWidth = isset($Format["SkippedInnerTickWidth"]) ? $Format["SkippedInnerTickWidth"] : 0; + $SkippedOuterTickWidth = isset($Format["SkippedOuterTickWidth"]) ? $Format["SkippedOuterTickWidth"] : 2; + + /* Floating scale require X & Y margins to be set manually */ + if ( $Floating && ( $XMargin == AUTO || $YMargin == 0 ) ) { $Floating = FALSE; } + + /* Skip a NOTICE event in case of an empty array */ + if ( $DrawYLines == NONE || $DrawYLines == FALSE ) { $DrawYLines = array("zarma"=>"31"); } + + /* Define the color for the skipped elements */ + $SkippedAxisColor = array("R"=>$SkippedAxisR,"G"=>$SkippedAxisG,"B"=>$SkippedAxisB,"Alpha"=>$SkippedAxisAlpha,"Ticks"=>$SkippedAxisTicks); + $SkippedTickColor = array("R"=>$SkippedTickR,"G"=>$SkippedTickG,"B"=>$SkippedTickB,"Alpha"=>$SkippedTickAlpha); + + $Data = $this->DataSet->getData(); + if ( isset($Data["Abscissa"]) ) { $Abscissa = $Data["Abscissa"]; } else { $Abscissa = NULL; } + + /* Unset the abscissa axis, needed if we display multiple charts on the same picture */ + if ( $Abscissa != NULL ) + { + foreach($Data["Axis"] as $AxisID => $Parameters) + { if ($Parameters["Identity"] == AXIS_X) { unset($Data["Axis"][$AxisID]); } } + } + + /* Build the scale settings */ + $GotXAxis = FALSE; + foreach($Data["Axis"] as $AxisID => $AxisParameter) + { + if ( $AxisParameter["Identity"] == AXIS_X ) { $GotXAxis = TRUE; } + + if ( $Pos == SCALE_POS_LEFTRIGHT && $AxisParameter["Identity"] == AXIS_Y) + { $Height = $this->GraphAreaY2-$this->GraphAreaY1 - $YMargin*2; } + elseif ( $Pos == SCALE_POS_LEFTRIGHT && $AxisParameter["Identity"] == AXIS_X) + { $Height = $this->GraphAreaX2-$this->GraphAreaX1; } + elseif ( $Pos == SCALE_POS_TOPBOTTOM && $AxisParameter["Identity"] == AXIS_Y) + { $Height = $this->GraphAreaX2-$this->GraphAreaX1 - $YMargin*2;; } + else + { $Height = $this->GraphAreaY2-$this->GraphAreaY1; } + + $AxisMin = ABSOLUTE_MAX; $AxisMax = OUT_OF_SIGHT; + if ( $Mode == SCALE_MODE_FLOATING || $Mode == SCALE_MODE_START0 ) + { + foreach($Data["Series"] as $SerieID => $SerieParameter) + { + if ( $SerieParameter["Axis"] == $AxisID && $Data["Series"][$SerieID]["isDrawable"] && $Data["Abscissa"] != $SerieID) + { + $AxisMax = max($AxisMax,$Data["Series"][$SerieID]["Max"]); + $AxisMin = min($AxisMin,$Data["Series"][$SerieID]["Min"]); + } + } + $AutoMargin = (($AxisMax-$AxisMin)/100)*$XReleasePercent; + + $Data["Axis"][$AxisID]["Min"] = $AxisMin-$AutoMargin; $Data["Axis"][$AxisID]["Max"] = $AxisMax+$AutoMargin; + if ( $Mode == SCALE_MODE_START0 ) { $Data["Axis"][$AxisID]["Min"] = 0; } + } + elseif ( $Mode == SCALE_MODE_MANUAL ) + { + if ( isset($ManualScale[$AxisID]["Min"]) && isset($ManualScale[$AxisID]["Max"]) ) + { + $Data["Axis"][$AxisID]["Min"] = $ManualScale[$AxisID]["Min"]; + $Data["Axis"][$AxisID]["Max"] = $ManualScale[$AxisID]["Max"]; + } + else + { echo "Manual scale boundaries not set."; exit(); } + } + elseif ( $Mode == SCALE_MODE_ADDALL || $Mode == SCALE_MODE_ADDALL_START0 ) + { + $Series = ""; + foreach($Data["Series"] as $SerieID => $SerieParameter) + { if ( $SerieParameter["Axis"] == $AxisID && $SerieParameter["isDrawable"] && $Data["Abscissa"] != $SerieID ) { $Series[$SerieID] = count($Data["Series"][$SerieID]["Data"]); } } + + for ($ID=0;$ID<=max($Series)-1;$ID++) + { + $PointMin = 0; $PointMax = 0; + foreach($Series as $SerieID => $ValuesCount ) + { + if (isset($Data["Series"][$SerieID]["Data"][$ID]) && $Data["Series"][$SerieID]["Data"][$ID] != NULL ) + { + $Value = $Data["Series"][$SerieID]["Data"][$ID]; + if ( $Value > 0 ) { $PointMax = $PointMax + $Value; } else { $PointMin = $PointMin + $Value; } + } + } + $AxisMax = max($AxisMax,$PointMax); + $AxisMin = min($AxisMin,$PointMin); + } + $AutoMargin = (($AxisMax-$AxisMin)/100)*$XReleasePercent; + $Data["Axis"][$AxisID]["Min"] = $AxisMin-$AutoMargin; $Data["Axis"][$AxisID]["Max"] = $AxisMax+$AutoMargin; + } + $MaxDivs = floor($Height/$MinDivHeight); + + if ( $Mode == SCALE_MODE_ADDALL_START0 ) { $Data["Axis"][$AxisID]["Min"] = 0; } + + $Scale = $this->computeScale($Data["Axis"][$AxisID]["Min"],$Data["Axis"][$AxisID]["Max"],$MaxDivs,$Factors,$AxisID); + + $Data["Axis"][$AxisID]["Margin"] = $AxisParameter["Identity"] == AXIS_X ? $XMargin : $YMargin; + $Data["Axis"][$AxisID]["ScaleMin"] = $Scale["XMin"]; + $Data["Axis"][$AxisID]["ScaleMax"] = $Scale["XMax"]; + $Data["Axis"][$AxisID]["Rows"] = $Scale["Rows"]; + $Data["Axis"][$AxisID]["RowHeight"] = $Scale["RowHeight"]; + + if ( isset($Scale["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = $Scale["Format"]; } + + if ( !isset($Data["Axis"][$AxisID]["Display"]) ) { $Data["Axis"][$AxisID]["Display"] = NULL; } + if ( !isset($Data["Axis"][$AxisID]["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = NULL; } + if ( !isset($Data["Axis"][$AxisID]["Unit"]) ) { $Data["Axis"][$AxisID]["Unit"] = NULL; } + } + + /* Still no X axis */ + if ( $GotXAxis == FALSE ) + { + if ( $Abscissa != NULL ) + { + $Points = count($Data["Series"][$Abscissa]["Data"]); + if ( $AutoAxisLabels ) + $AxisName = isset($Data["Series"][$Abscissa]["Description"]) ? $Data["Series"][$Abscissa]["Description"] : NULL; + else + $AxisName = NULL; + } + else + { + $Points = 0; + $AxisName = isset($Data["XAxisName"]) ? $Data["XAxisName"] : NULL; + foreach($Data["Series"] as $SerieID => $SerieParameter) + { if ( $SerieParameter["isDrawable"] ) { $Points = max($Points,count($SerieParameter["Data"])); } } + } + + $AxisID = count($Data["Axis"]); + $Data["Axis"][$AxisID]["Identity"] = AXIS_X; + if ( $Pos == SCALE_POS_LEFTRIGHT ) { $Data["Axis"][$AxisID]["Position"] = AXIS_POSITION_BOTTOM; } else { $Data["Axis"][$AxisID]["Position"] = AXIS_POSITION_LEFT; } + if ( isset($Data["AbscissaName"]) ) { $Data["Axis"][$AxisID]["Name"] = $Data["AbscissaName"]; } + if ( $XMargin == AUTO ) + { + if ( $Pos == SCALE_POS_LEFTRIGHT ) + { $Height = $this->GraphAreaX2-$this->GraphAreaX1; } + else + { $Height = $this->GraphAreaY2-$this->GraphAreaY1; } + + if ( $Points == 1 ) + $Data["Axis"][$AxisID]["Margin"] = $Height / 2; + else + $Data["Axis"][$AxisID]["Margin"] = ($Height/$Points) / 2; + } + else + { $Data["Axis"][$AxisID]["Margin"] = $XMargin; } + $Data["Axis"][$AxisID]["Rows"] = $Points-1; + if ( !isset($Data["Axis"][$AxisID]["Display"]) ) { $Data["Axis"][$AxisID]["Display"] = NULL; } + if ( !isset($Data["Axis"][$AxisID]["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = NULL; } + if ( !isset($Data["Axis"][$AxisID]["Unit"]) ) { $Data["Axis"][$AxisID]["Unit"] = NULL; } + } + + /* Do we need to reverse the abscissa position? */ + if ( $Pos != SCALE_POS_LEFTRIGHT ) + { + if ( $Data["AbsicssaPosition"] == AXIS_POSITION_BOTTOM ) + { $Data["AbsicssaPosition"] = AXIS_POSITION_LEFT; } + else + { $Data["AbsicssaPosition"] = AXIS_POSITION_RIGHT; } + } + $Data["Axis"][$AxisID]["Position"] = $Data["AbsicssaPosition"]; + + $this->DataSet->saveOrientation($Pos); + $this->DataSet->saveAxisConfig($Data["Axis"]); + $this->DataSet->saveYMargin($YMargin); + + $FontColorRo = $this->FontColorR; $FontColorGo = $this->FontColorG; $FontColorBo = $this->FontColorB; + + $AxisPos["L"] = $this->GraphAreaX1; $AxisPos["R"] = $this->GraphAreaX2; $AxisPos["T"] = $this->GraphAreaY1; $AxisPos["B"] = $this->GraphAreaY2; + foreach($Data["Axis"] as $AxisID => $Parameters) + { + if ( isset($Parameters["Color"]) ) + { + $AxisR = $Parameters["Color"]["R"]; $AxisG = $Parameters["Color"]["G"]; $AxisB = $Parameters["Color"]["B"]; + $TickR = $Parameters["Color"]["R"]; $TickG = $Parameters["Color"]["G"]; $TickB = $Parameters["Color"]["B"]; + $this->setFontProperties(array("R"=>$Parameters["Color"]["R"],"G"=>$Parameters["Color"]["G"],"B"=>$Parameters["Color"]["B"])); + } + else + { + $AxisR = $AxisRo; $AxisG = $AxisGo; $AxisB = $AxisBo; + $TickR = $TickRo; $TickG = $TickGo; $TickB = $TickBo; + $this->setFontProperties(array("R"=>$FontColorRo,"G"=>$FontColorGo,"B"=>$FontColorBo)); + } + + $LastValue = "w00t"; $ID = 1; + if ( $Parameters["Identity"] == AXIS_X ) + { + if ( $Pos == SCALE_POS_LEFTRIGHT ) + { + if ( $Parameters["Position"] == AXIS_POSITION_BOTTOM ) + { + if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $YLabelOffset = 2; } + if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $YLabelOffset = 5; } + if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $YLabelOffset = 5; } + if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $YLabelOffset = 2; } + + if ( !$RemoveXAxis ) + { + if ( $Floating ) + { $FloatingOffset = $YMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["B"],$this->GraphAreaX2,$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["B"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + } + + $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; + + if ($Parameters["Rows"] == 0 ) { $Step = $Width; } else { $Step = $Width / ($Parameters["Rows"]); } + + $MaxBottom = $AxisPos["B"]; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; + $YPos = $AxisPos["B"]; + + if ( $Abscissa != NULL ) + { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } + else + { + if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); + else + $Value = $i; + } + + $ID++; $Skipped = TRUE; + if ( $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip) && !$RemoveXAxis) + { + $Bounds = $this->drawText($XPos,$YPos+$OuterTickWidth+$YLabelOffset,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); + $TxtBottom = $YPos+$OuterTickWidth+2+($Bounds[0]["Y"]-$Bounds[2]["Y"]); + $MaxBottom = max($MaxBottom,$TxtBottom); + $LastValue = $Value; + $Skipped = FALSE; + } + + if ( $RemoveXAxis ) { $Skipped = FALSE; } + + if ( $Skipped ) + { + if ( $DrawXLines ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$SkippedAxisColor); } + if ( ($SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos,$YPos-$SkippedInnerTickWidth,$XPos,$YPos+$SkippedOuterTickWidth,$SkippedTickColor); } + } + else + { + if ( $DrawXLines && ($XPos != $this->GraphAreaX1 && $XPos != $this->GraphAreaX2) ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + if ( ($InnerTickWidth !=0 || $OuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos,$YPos-$InnerTickWidth,$XPos,$YPos+$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } + } + } + + if ( isset($Parameters["Name"]) && !$RemoveXAxis) + { + $YPos = $MaxBottom+2; + $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_TOPMIDDLE)); + $MaxBottom = $Bounds[0]["Y"]; + + $this->DataSet->Data["GraphArea"]["Y2"] = $MaxBottom + $this->FontSize; + } + + $AxisPos["B"] = $MaxBottom + $ScaleSpacing; + } + elseif ( $Parameters["Position"] == AXIS_POSITION_TOP ) + { + if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $YLabelOffset = 2; } + if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $YLabelOffset = 2; } + if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $YLabelOffset = 5; } + if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $YLabelOffset = 5; } + + if ( !$RemoveXAxis ) + { + if ( $Floating ) + { $FloatingOffset = $YMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["T"],$this->GraphAreaX2,$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["T"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + } + + $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; + + if ($Parameters["Rows"] == 0 ) { $Step = $Width; } else { $Step = $Width / $Parameters["Rows"]; } + + $MinTop = $AxisPos["T"]; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; + $YPos = $AxisPos["T"]; + + if ( $Abscissa != NULL ) + { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } + else + { + if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); + else + $Value = $i; + } + + $ID++; $Skipped = TRUE; + if ( $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip) && !$RemoveXAxis) + { + $Bounds = $this->drawText($XPos,$YPos-$OuterTickWidth-$YLabelOffset,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); + $TxtBox = $YPos-$OuterTickWidth-2-($Bounds[0]["Y"]-$Bounds[2]["Y"]); + $MinTop = min($MinTop,$TxtBox); + $LastValue = $Value; + $Skipped = FALSE; + } + + if ( $RemoveXAxis ) { $Skipped = FALSE; } + + if ( $Skipped ) + { + if ( $DrawXLines ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$SkippedAxisColor); } + if ( ($SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos,$YPos+$SkippedInnerTickWidth,$XPos,$YPos-$SkippedOuterTickWidth,$SkippedTickColor); } + } + else + { + if ( $DrawXLines ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + if ( ($InnerTickWidth !=0 || $OuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos,$YPos+$InnerTickWidth,$XPos,$YPos-$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } + } + + } + + if ( isset($Parameters["Name"]) && !$RemoveXAxis ) + { + $YPos = $MinTop-2; + $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + $MinTop = $Bounds[2]["Y"]; + + $this->DataSet->Data["GraphArea"]["Y1"] = $MinTop; + } + + $AxisPos["T"] = $MinTop - $ScaleSpacing; + } + } + elseif ( $Pos == SCALE_POS_TOPBOTTOM ) + { + if ( $Parameters["Position"] == AXIS_POSITION_LEFT ) + { + if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = -2; } + if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = -6; } + if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = -2; } + if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = -5; } + + if ( !$RemoveXAxis ) + { + if ( $Floating ) + { $FloatingOffset = $YMargin; $this->drawLine($AxisPos["L"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($AxisPos["L"],$this->GraphAreaY1,$AxisPos["L"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($AxisPos["L"],$this->GraphAreaY2-$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY2+($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + } + + $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; + + if ($Parameters["Rows"] == 0 ) { $Step = $Height; } else { $Step = $Height / $Parameters["Rows"]; } + + $MinLeft = $AxisPos["L"]; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $Step*$i; + $XPos = $AxisPos["L"]; + + if ( $Abscissa != NULL ) + { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } + else + { + if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); + else + $Value = $i; + } + + $ID++; $Skipped = TRUE; + if ( $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip) && !$RemoveXAxis) + { + $Bounds = $this->drawText($XPos-$OuterTickWidth+$XLabelOffset,$YPos,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); + $TxtBox = $XPos-$OuterTickWidth-2-($Bounds[1]["X"]-$Bounds[0]["X"]); + $MinLeft = min($MinLeft,$TxtBox); + $LastValue = $Value; + $Skipped = FALSE; + } + + if ( $RemoveXAxis ) { $Skipped = FALSE; } + + if ( $Skipped ) + { + if ( $DrawXLines ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,$SkippedAxisColor); } + if ( ($SkippedInnerTickWidth !=0 || $SkippedOuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos-$SkippedOuterTickWidth,$YPos,$XPos+$SkippedInnerTickWidth,$YPos,$SkippedTickColor); } + } + else + { + if ( $DrawXLines && ($YPos != $this->GraphAreaY1 && $YPos != $this->GraphAreaY2) ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + if ( ($InnerTickWidth !=0 || $OuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos-$OuterTickWidth,$YPos,$XPos+$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } + } + + } + if ( isset($Parameters["Name"]) && !$RemoveXAxis ) + { + $XPos = $MinLeft-2; + $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>90)); + $MinLeft = $Bounds[0]["X"]; + + $this->DataSet->Data["GraphArea"]["X1"] = $MinLeft; + } + + $AxisPos["L"] = $MinLeft - $ScaleSpacing; + } + elseif ( $Parameters["Position"] == AXIS_POSITION_RIGHT ) + { + if ( $LabelRotation == 0 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = 2; } + if ( $LabelRotation > 0 && $LabelRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $XLabelOffset = 6; } + if ( $LabelRotation == 180 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = 5; } + if ( $LabelRotation > 180 && $LabelRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $XLabelOffset = 7; } + + if ( !$RemoveXAxis ) + { + if ( $Floating ) + { $FloatingOffset = $YMargin; $this->drawLine($AxisPos["R"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($AxisPos["R"],$this->GraphAreaY1,$AxisPos["R"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($AxisPos["R"],$this->GraphAreaY2-$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY2+($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + } + + $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; + + if ($Parameters["Rows"] == 0 ) { $Step = $Height; } else { $Step = $Height / $Parameters["Rows"]; } + + $MaxRight = $AxisPos["R"]; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $YPos = $this->GraphAreaY1 + $Parameters["Margin"] + $Step*$i; + $XPos = $AxisPos["R"]; + + if ( $Abscissa != NULL ) + { if ( isset($Data["Series"][$Abscissa]["Data"][$i]) ) { $Value = $this->scaleFormat($Data["Series"][$Abscissa]["Data"][$i],$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); } else { $Value = ""; } } + else + { + if ( isset($Parameters["ScaleMin"]) && isset ($Parameters["RowHeight"]) ) + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Data["XAxisDisplay"],$Data["XAxisFormat"],$Data["XAxisUnit"]); + else + $Value = $i; + } + + $ID++; $Skipped = TRUE; + if ( $this->isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip) && !$RemoveXAxis) + { + $Bounds = $this->drawText($XPos+$OuterTickWidth+$XLabelOffset,$YPos,$Value,array("Angle"=>$LabelRotation,"Align"=>$LabelAlign)); + $TxtBox = $XPos+$OuterTickWidth+2+($Bounds[1]["X"]-$Bounds[0]["X"]); + $MaxRight = max($MaxRight,$TxtBox); + $LastValue = $Value; + $Skipped = FALSE; + } + + if ( $RemoveXAxis ) { $Skipped = FALSE; } + + if ( $Skipped ) + { + if ( $DrawXLines ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,$SkippedAxisColor); } + if ( ($SkippedInnerTickWidth != 0 || $SkippedOuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos+$SkippedOuterTickWidth,$YPos,$XPos-$SkippedInnerTickWidth,$YPos,$SkippedTickColor); } + } + else + { + if ( $DrawXLines ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + if ( ($InnerTickWidth != 0 || $OuterTickWidth != 0) && !$RemoveXAxis ) { $this->drawLine($XPos+$OuterTickWidth,$YPos,$XPos-$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); } + } + + } + + if ( isset($Parameters["Name"]) && !$RemoveXAxis) + { + $XPos = $MaxRight+4; + $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>270)); + $MaxRight = $Bounds[1]["X"]; + + $this->DataSet->Data["GraphArea"]["X2"] = $MaxRight + $this->FontSize; + } + + $AxisPos["R"] = $MaxRight + $ScaleSpacing; + } + } + } + + + + if ( $Parameters["Identity"] == AXIS_Y ) + { + if ( $Pos == SCALE_POS_LEFTRIGHT ) + { + if ( $Parameters["Position"] == AXIS_POSITION_LEFT ) + { + + if ( $Floating ) + { $FloatingOffset = $XMargin; $this->drawLine($AxisPos["L"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($AxisPos["L"],$this->GraphAreaY1,$AxisPos["L"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($AxisPos["L"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["L"],$this->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; + $Step = $Height / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MinLeft = $AxisPos["L"]; + $LastY = NULL; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $YPos = $this->GraphAreaY2 - $Parameters["Margin"] - $Step*$i; + $XPos = $AxisPos["L"]; + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($this->GraphAreaX1+$FloatingOffset,$LastY,$this->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } + + if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $Parameters["Rows"] ) + $this->drawLine($XPos-$OuterSubTickWidth,$YPos-$SubTicksSize,$XPos+$InnerSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->drawLine($XPos-$OuterTickWidth,$YPos,$XPos+$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->drawText($XPos-$OuterTickWidth-2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); + $TxtLeft = $XPos-$OuterTickWidth-2-($Bounds[1]["X"]-$Bounds[0]["X"]); + $MinLeft = min($MinLeft,$TxtLeft); + + $LastY = $YPos; + } + + if ( isset($Parameters["Name"]) ) + { + $XPos = $MinLeft-2; + $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>90)); + $MinLeft = $Bounds[2]["X"]; + + $this->DataSet->Data["GraphArea"]["X1"] = $MinLeft; + } + + $AxisPos["L"] = $MinLeft - $ScaleSpacing; + } + elseif ( $Parameters["Position"] == AXIS_POSITION_RIGHT ) + { + if ( $Floating ) + { $FloatingOffset = $XMargin; $this->drawLine($AxisPos["R"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY2-$Parameters["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($AxisPos["R"],$this->GraphAreaY1,$AxisPos["R"],$this->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($AxisPos["R"],$this->GraphAreaY1+$Parameters["Margin"],$AxisPos["R"],$this->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Parameters["Margin"]*2; + $Step = $Height / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MaxLeft = $AxisPos["R"]; + $LastY = NULL; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $YPos = $this->GraphAreaY2 - $Parameters["Margin"] - $Step*$i; + $XPos = $AxisPos["R"]; + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($this->GraphAreaX1+$FloatingOffset,$LastY,$this->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } + + if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($this->GraphAreaX1+$FloatingOffset,$YPos,$this->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $Parameters["Rows"] ) + $this->drawLine($XPos-$OuterSubTickWidth,$YPos-$SubTicksSize,$XPos+$InnerSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->drawLine($XPos-$InnerTickWidth,$YPos,$XPos+$OuterTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->drawText($XPos+$OuterTickWidth+2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); + $TxtLeft = $XPos+$OuterTickWidth+2+($Bounds[1]["X"]-$Bounds[0]["X"]); + $MaxLeft = max($MaxLeft,$TxtLeft); + + $LastY = $YPos; + } + + if ( isset($Parameters["Name"]) ) + { + $XPos = $MaxLeft+6; + $YPos = $this->GraphAreaY1+($this->GraphAreaY2-$this->GraphAreaY1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>270)); + $MaxLeft = $Bounds[2]["X"]; + + $this->DataSet->Data["GraphArea"]["X2"] = $MaxLeft + $this->FontSize; + } + $AxisPos["R"] = $MaxLeft + $ScaleSpacing; + } + } + elseif ( $Pos == SCALE_POS_TOPBOTTOM ) + { + if ( $Parameters["Position"] == AXIS_POSITION_TOP ) + { + if ( $Floating ) + { $FloatingOffset = $XMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["T"],$this->GraphAreaX2,$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["T"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["T"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; + $Step = $Width / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MinTop = $AxisPos["T"]; + $LastX = NULL; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; + $YPos = $AxisPos["T"]; + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastX != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($LastX,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$BGColor); } + + if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $Parameters["Rows"] ) + $this->drawLine($XPos+$SubTicksSize,$YPos-$OuterSubTickWidth,$XPos+$SubTicksSize,$YPos+$InnerSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->drawLine($XPos,$YPos-$OuterTickWidth,$XPos,$YPos+$InnerTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->drawText($XPos,$YPos-$OuterTickWidth-2,$Value,array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + $TxtHeight = $YPos-$OuterTickWidth-2-($Bounds[1]["Y"]-$Bounds[2]["Y"]); + $MinTop = min($MinTop,$TxtHeight); + + $LastX = $XPos; + } + + if ( isset($Parameters["Name"]) ) + { + $YPos = $MinTop-2; + $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + $MinTop = $Bounds[2]["Y"]; + + $this->DataSet->Data["GraphArea"]["Y1"] = $MinTop; + } + + $AxisPos["T"] = $MinTop - $ScaleSpacing; + } + elseif ( $Parameters["Position"] == AXIS_POSITION_BOTTOM ) + { + if ( $Floating ) + { $FloatingOffset = $XMargin; $this->drawLine($this->GraphAreaX1+$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->drawLine($this->GraphAreaX1,$AxisPos["B"],$this->GraphAreaX2,$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->drawArrow($this->GraphAreaX2-$Parameters["Margin"],$AxisPos["B"],$this->GraphAreaX2+($ArrowSize*2),$AxisPos["B"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Parameters["Margin"]*2; + $Step = $Width / $Parameters["Rows"]; $SubTicksSize = $Step /2; $MaxBottom = $AxisPos["B"]; + $LastX = NULL; + for($i=0;$i<=$Parameters["Rows"];$i++) + { + $XPos = $this->GraphAreaX1 + $Parameters["Margin"] + $Step*$i; + $YPos = $AxisPos["B"]; + $Value = $this->scaleFormat($Parameters["ScaleMin"] + $Parameters["RowHeight"]*$i,$Parameters["Display"],$Parameters["Format"],$Parameters["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastX != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->drawFilledRectangle($LastX,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,$BGColor); } + + if ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) ) { $this->drawLine($XPos,$this->GraphAreaY1+$FloatingOffset,$XPos,$this->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $Parameters["Rows"] ) + $this->drawLine($XPos+$SubTicksSize,$YPos-$OuterSubTickWidth,$XPos+$SubTicksSize,$YPos+$InnerSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->drawLine($XPos,$YPos-$OuterTickWidth,$XPos,$YPos+$InnerTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->drawText($XPos,$YPos+$OuterTickWidth+2,$Value,array("Align"=>TEXT_ALIGN_TOPMIDDLE)); + $TxtHeight = $YPos+$OuterTickWidth+2+($Bounds[1]["Y"]-$Bounds[2]["Y"]); + $MaxBottom = max($MaxBottom,$TxtHeight); + + $LastX = $XPos; + } + + if ( isset($Parameters["Name"]) ) + { + $YPos = $MaxBottom+2; + $XPos = $this->GraphAreaX1+($this->GraphAreaX2-$this->GraphAreaX1)/2; + $Bounds = $this->drawText($XPos,$YPos,$Parameters["Name"],array("Align"=>TEXT_ALIGN_TOPMIDDLE)); + $MaxBottom = $Bounds[0]["Y"]; + + $this->DataSet->Data["GraphArea"]["Y2"] = $MaxBottom + $this->FontSize; + } + + $AxisPos["B"] = $MaxBottom + $ScaleSpacing; + } + } + } + } + } + + function isValidLabel($Value,$LastValue,$LabelingMethod,$ID,$LabelSkip) + { + if ( $LabelingMethod == LABELING_DIFFERENT && $Value != $LastValue ) { return(TRUE); } + if ( $LabelingMethod == LABELING_DIFFERENT && $Value == $LastValue ) { return(FALSE); } + if ( $LabelingMethod == LABELING_ALL && $LabelSkip == 0 ) { return(TRUE); } + if ( $LabelingMethod == LABELING_ALL && ($ID+$LabelSkip) % ($LabelSkip+1) != 1 ) { return(FALSE); } + + return(TRUE); + } + + /* Compute the scale, check for the best visual factors */ + function computeScale($XMin,$XMax,$MaxDivs,$Factors,$AxisID=0) + { + /* Compute each factors */ + $Results = ""; + foreach ($Factors as $Key => $Factor) + $Results[$Factor] = $this->processScale($XMin,$XMax,$MaxDivs,array($Factor),$AxisID); + + /* Remove scales that are creating to much decimals */ + $GoodScaleFactors = ""; + foreach ($Results as $Key => $Result) + { + $Decimals = preg_split("/\./",$Result["RowHeight"]); + if ( (!isset($Decimals[1])) || (strlen($Decimals[1]) < 6) ) { $GoodScaleFactors[] = $Key; } + } + + /* Found no correct scale, shame,... returns the 1st one as default */ + if ( $GoodScaleFactors == "" ) { return($Results[$Factors[0]]); } + + /* Find the factor that cause the maximum number of Rows */ + $MaxRows = 0; $BestFactor = 0; + foreach($GoodScaleFactors as $Key => $Factor) + { if ( $Results[$Factor]["Rows"] > $MaxRows ) { $MaxRows = $Results[$Factor]["Rows"]; $BestFactor = $Factor; } } + + /* Return the best visual scale */ + return($Results[$BestFactor]); + } + + /* Compute the best matching scale based on size & factors */ + function processScale($XMin,$XMax,$MaxDivs,$Factors,$AxisID) + { + $ScaleHeight = abs(ceil($XMax)-floor($XMin)); + + if ( isset($this->DataSet->Data["Axis"][$AxisID]["Format"]) ) + $Format = $this->DataSet->Data["Axis"][$AxisID]["Format"]; + else + $Format = NULL; + + if ( isset($this->DataSet->Data["Axis"][$AxisID]["Display"]) ) + $Mode = $this->DataSet->Data["Axis"][$AxisID]["Display"]; + else + $Mode = AXIS_FORMAT_DEFAULT; + + $Scale = ""; + if ( $XMin != $XMax ) + { + $Found = FALSE; $Rescaled = FALSE; $Scaled10Factor = .0001; $Result = 0; + while(!$Found) + { + foreach($Factors as $Key => $Factor) + { + if ( !$Found ) + { + if ( !($this->modulo($XMin,$Factor*$Scaled10Factor) == 0) || ($XMin != floor($XMin))) { $XMinRescaled = floor($XMin/($Factor*$Scaled10Factor))*$Factor*$Scaled10Factor; } else { $XMinRescaled = $XMin; } + if ( !($this->modulo($XMax,$Factor*$Scaled10Factor) == 0) || ($XMax != floor($XMax))) { $XMaxRescaled = floor($XMax/($Factor*$Scaled10Factor))*$Factor*$Scaled10Factor+($Factor*$Scaled10Factor); } else { $XMaxRescaled = $XMax; } + $ScaleHeightRescaled = abs($XMaxRescaled-$XMinRescaled); + + if ( !$Found && floor($ScaleHeightRescaled/($Factor*$Scaled10Factor)) <= $MaxDivs ) { $Found = TRUE; $Rescaled = TRUE; $Result = $Factor * $Scaled10Factor; } + } + } + $Scaled10Factor = $Scaled10Factor * 10; + } + + /* ReCall Min / Max / Height */ + if ( $Rescaled ) { $XMin = $XMinRescaled; $XMax = $XMaxRescaled; $ScaleHeight = $ScaleHeightRescaled; } + + /* Compute rows size */ + $Rows = floor($ScaleHeight / $Result); if ( $Rows == 0 ) { $Rows = 1; } + $RowHeight = $ScaleHeight / $Rows; + + /* Return the results */ + $Scale["Rows"] = $Rows; $Scale["RowHeight"] = $RowHeight; $Scale["XMin"] = $XMin; $Scale["XMax"] = $XMax; + + /* Compute the needed decimals for the metric view to avoid repetition of the same X Axis labels */ + if ( $Mode == AXIS_FORMAT_METRIC && $Format == NULL ) + { + $Done = FALSE; $GoodDecimals = 0; + for($Decimals=0;$Decimals<=10;$Decimals++) + { + if ( !$Done ) + { + $LastLabel = "zob"; $ScaleOK = TRUE; + for($i=0;$i<=$Rows;$i++) + { + $Value = $XMin + $i*$RowHeight; + $Label = $this->scaleFormat($Value,AXIS_FORMAT_METRIC,$Decimals); + + if ( $LastLabel == $Label ) { $ScaleOK = FALSE; } + $LastLabel = $Label; + } + if ( $ScaleOK ) { $Done = TRUE; $GoodDecimals = $Decimals; } + } + } + + $Scale["Format"] = $GoodDecimals; + } + } + else + { + /* If all values are the same we keep a +1/-1 scale */ + $Rows = 2; $XMin = $XMax-1; $XMax = $XMax+1; $RowHeight = 1; + + /* Return the results */ + $Scale["Rows"] = $Rows; $Scale["RowHeight"] = $RowHeight; $Scale["XMin"] = $XMin; $Scale["XMax"] = $XMax; + } + + return($Scale); + } + + function modulo($Value1,$Value2) + { + if (floor($Value2) == 0) { return(0); } + if (floor($Value2) != 0) { return($Value1 % $Value2); } + + $MinValue = min($Value1,$Value2); $Factor = 10; + while ( floor($MinValue*$Factor) == 0 ) + { $Factor = $Factor * 10; } + + return(($Value1*$Factor) % ($Value2*$Factor)); + } + + /* Draw an X threshold */ + function drawXThreshold($Value,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 255; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 50; + $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 6; + $Wide = isset($Format["Wide"]) ? $Format["Wide"] : FALSE; + $WideFactor = isset($Format["WideFactor"]) ? $Format["WideFactor"] : 5; + $WriteCaption = isset($Format["WriteCaption"]) ? $Format["WriteCaption"] : FALSE; + $Caption = isset($Format["Caption"]) ? $Format["Caption"] : NULL; + $CaptionAlign = isset($Format["CaptionAlign"]) ? $Format["CaptionAlign"] : CAPTION_LEFT_TOP; + $CaptionOffset = isset($Format["CaptionOffset"]) ? $Format["CaptionOffset"] : 5; + $CaptionR = isset($Format["CaptionR"]) ? $Format["CaptionR"] : 255; + $CaptionG = isset($Format["CaptionG"]) ? $Format["CaptionG"] : 255; + $CaptionB = isset($Format["CaptionB"]) ? $Format["CaptionB"] : 255; + $CaptionAlpha = isset($Format["CaptionAlpha"]) ? $Format["CaptionAlpha"] : 100; + $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : TRUE; + $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : FALSE; + $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 3; + $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : TRUE; + $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 3; + $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; + $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; + $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; + $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 30; + $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; + $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 255; + $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 255; + $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 255; + $BoxBorderAlpha = isset($Format["BoxBorderAlpha"]) ? $Format["BoxBorderAlpha"] : 100; + $ValueIsLabel = isset($Format["ValueIsLabel"]) ? $Format["ValueIsLabel"] : FALSE; + + $Data = $this->DataSet->getData(); + $AbscissaMargin = $this->getAbscissaMargin($Data); + $XScale = $this->scaleGetXSettings(); + + if ( is_array($Value) ) { foreach ($Value as $Key => $ID) { $this->drawXThreshold($ID,$Format); } return(0); } + + if ( $ValueIsLabel ) + { + $Format["ValueIsLabel"] = FALSE; + foreach($Data["Series"][$Data["Abscissa"]]["Data"] as $Key => $SerieValue) + { if ( $SerieValue == $Value ) { $this->drawXThreshold($Key,$Format); } } + + return(0); + } + + $CaptionSettings = array("DrawBox"=>$DrawBox,"DrawBoxBorder"=>$DrawBoxBorder,"BorderOffset"=>$BorderOffset,"BoxRounded"=>$BoxRounded,"RoundedRadius"=>$RoundedRadius, + "BoxR"=>$BoxR,"BoxG"=>$BoxG,"BoxB"=>$BoxB,"BoxAlpha"=>$BoxAlpha,"BoxSurrounding"=>$BoxSurrounding, + "BoxBorderR"=>$BoxBorderR,"BoxBorderG"=>$BoxBorderG,"BoxBorderB"=>$BoxBorderB,"BoxBorderAlpha"=>$BoxBorderAlpha, + "R"=>$CaptionR,"G"=>$CaptionG,"B"=>$CaptionB,"Alpha"=>$CaptionAlpha); + + if ( $Caption == NULL ) + { + if ( isset($Data["Abscissa"]) ) + { + if ( isset($Data["Series"][$Data["Abscissa"]]["Data"][$Value]) ) + $Caption = $Data["Series"][$Data["Abscissa"]]["Data"][$Value]; + else + $Caption = $Value; + } + else + $Caption = $Value; + } + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + $XStep = (($this->GraphAreaX2 - $this->GraphAreaX1) - $XScale[0] *2 ) / $XScale[1]; + $XPos = $this->GraphAreaX1 + $XScale[0] + $XStep * $Value; + $YPos1 = $this->GraphAreaY1 + $Data["YMargin"]; + $YPos2 = $this->GraphAreaY2 - $Data["YMargin"]; + + if ( $XPos >= $this->GraphAreaX1 + $AbscissaMargin && $XPos <= $this->GraphAreaX2 - $AbscissaMargin ) + { + $this->drawLine($XPos,$YPos1,$XPos,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Wide ) + { + $this->drawLine($XPos-1,$YPos1,$XPos-1,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + $this->drawLine($XPos+1,$YPos1,$XPos+1,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + } + + if ( $WriteCaption ) + { + if ( $CaptionAlign == CAPTION_LEFT_TOP ) + { $Y = $YPos1 + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; } + else + { $Y = $YPos2 - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; } + + $this->drawText($XPos,$Y,$Caption,$CaptionSettings); + } + + return(array("X"=>$XPos)); + } + } + elseif( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + $XStep = (($this->GraphAreaY2 - $this->GraphAreaY1) - $XScale[0] *2 ) / $XScale[1]; + $XPos = $this->GraphAreaY1 + $XScale[0] + $XStep * $Value; + $YPos1 = $this->GraphAreaX1 + $Data["YMargin"]; + $YPos2 = $this->GraphAreaX2 - $Data["YMargin"]; + + if ( $XPos >= $this->GraphAreaY1 + $AbscissaMargin && $XPos <= $this->GraphAreaY2 - $AbscissaMargin ) + { + $this->drawLine($YPos1,$XPos,$YPos2,$XPos,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Wide ) + { + $this->drawLine($YPos1,$XPos-1,$YPos2,$XPos-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + $this->drawLine($YPos1,$XPos+1,$YPos2,$XPos+1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + } + + if ( $WriteCaption ) + { + if ( $CaptionAlign == CAPTION_LEFT_TOP ) + { $Y = $YPos1 + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLELEFT; } + else + { $Y = $YPos2 - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLERIGHT; } + + $this->drawText($Y,$XPos,$Caption,$CaptionSettings); + } + + return(array("X"=>$XPos)); + } + } + } + + /* Draw an X threshold area */ + function drawXThresholdArea($Value1,$Value2,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 255; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 20; + $Border = isset($Format["Border"]) ? $Format["Border"] : TRUE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha + 20; + $BorderTicks = isset($Format["BorderTicks"]) ? $Format["BorderTicks"] : 2; + $AreaName = isset($Format["AreaName"]) ? $Format["AreaName"] : NULL; + $NameAngle = isset($Format["NameAngle"]) ? $Format["NameAngle"] : ZONE_NAME_ANGLE_AUTO; + $NameR = isset($Format["NameR"]) ? $Format["NameR"] : 255; + $NameG = isset($Format["NameG"]) ? $Format["NameG"] : 255; + $NameB = isset($Format["NameB"]) ? $Format["NameB"] : 255; + $NameAlpha = isset($Format["NameAlpha"]) ? $Format["NameAlpha"] : 100; + $DisableShadowOnArea = isset($Format["DisableShadowOnArea"]) ? $Format["DisableShadowOnArea"] : TRUE; + + $RestoreShadow = $this->Shadow; + if ( $DisableShadowOnArea && $this->Shadow ) { $this->Shadow = FALSE; } + + if ($BorderAlpha >100) { $BorderAlpha = 100;} + + $Data = $this->DataSet->getData(); + $XScale = $this->scaleGetXSettings(); + $AbscissaMargin = $this->getAbscissaMargin($Data); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + $XStep = (($this->GraphAreaX2 - $this->GraphAreaX1) - $XScale[0] *2 ) / $XScale[1]; + $XPos1 = $this->GraphAreaX1 + $XScale[0] + $XStep * $Value1; + $XPos2 = $this->GraphAreaX1 + $XScale[0] + $XStep * $Value2; + $YPos1 = $this->GraphAreaY1 + $Data["YMargin"]; + $YPos2 = $this->GraphAreaY2 - $Data["YMargin"]; + + if ( $XPos1 < $this->GraphAreaX1 + $XScale[0] ) { $XPos1 = $this->GraphAreaX1 + $XScale[0]; } + if ( $XPos1 > $this->GraphAreaX2 - $XScale[0] ) { $XPos1 = $this->GraphAreaX2 - $XScale[0]; } + if ( $XPos2 < $this->GraphAreaX1 + $XScale[0] ) { $XPos2 = $this->GraphAreaX1 + $XScale[0]; } + if ( $XPos2 > $this->GraphAreaX2 - $XScale[0] ) { $XPos2 = $this->GraphAreaX2 - $XScale[0]; } + + $this->drawFilledRectangle($XPos1,$YPos1,$XPos2,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + if ( $Border ) + { + $this->drawLine($XPos1,$YPos1,$XPos1,$YPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + $this->drawLine($XPos2,$YPos1,$XPos2,$YPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + } + + if ( $AreaName != NULL ) + { + $XPos = ($XPos2-$XPos1)/2 + $XPos1; + $YPos = ($YPos2-$YPos1)/2 + $YPos1; + + if ( $NameAngle == ZONE_NAME_ANGLE_AUTO ) + { + $TxtPos = $this->getTextBox($XPos,$YPos,$this->FontName,$this->FontSize,0,$AreaName); + $TxtWidth = $TxtPos[1]["X"] - $TxtPos[0]["X"]; + if ( abs($XPos2 - $XPos1) > $TxtWidth ) { $NameAngle = 0; } else { $NameAngle = 90; } + } + $this->Shadow = $RestoreShadow; + $this->drawText($XPos,$YPos,$AreaName,array("R"=>$NameR,"G"=>$NameG,"B"=>$NameB,"Alpha"=>$NameAlpha,"Angle"=>$NameAngle,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); + if ( $DisableShadowOnArea ) { $this->Shadow = FALSE; } + } + + $this->Shadow = $RestoreShadow; + return(array("X1"=>$XPos1,"X2"=>$XPos2)); + } + elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + $XStep = (($this->GraphAreaY2 - $this->GraphAreaY1) - $XScale[0] *2 ) / $XScale[1]; + $XPos1 = $this->GraphAreaY1 + $XScale[0] + $XStep * $Value1; + $XPos2 = $this->GraphAreaY1 + $XScale[0] + $XStep * $Value2; + $YPos1 = $this->GraphAreaX1 + $Data["YMargin"]; + $YPos2 = $this->GraphAreaX2 - $Data["YMargin"]; + + if ( $XPos1 < $this->GraphAreaY1 + $XScale[0] ) { $XPos1 = $this->GraphAreaY1 + $XScale[0]; } + if ( $XPos1 > $this->GraphAreaY2 - $XScale[0] ) { $XPos1 = $this->GraphAreaY2 - $XScale[0]; } + if ( $XPos2 < $this->GraphAreaY1 + $XScale[0] ) { $XPos2 = $this->GraphAreaY1 + $XScale[0]; } + if ( $XPos2 > $this->GraphAreaY2 - $XScale[0] ) { $XPos2 = $this->GraphAreaY2 - $XScale[0]; } + + $this->drawFilledRectangle($YPos1,$XPos1,$YPos2,$XPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + if ( $Border ) + { + $this->drawLine($YPos1,$XPos1,$YPos2,$XPos1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + $this->drawLine($YPos1,$XPos2,$YPos2,$XPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + } + + if ( $AreaName != NULL ) + { + $XPos = ($XPos2-$XPos1)/2 + $XPos1; + $YPos = ($YPos2-$YPos1)/2 + $YPos1; + + $this->Shadow = $RestoreShadow; + $this->drawText($YPos,$XPos,$AreaName,array("R"=>$NameR,"G"=>$NameG,"B"=>$NameB,"Alpha"=>$NameAlpha,"Angle"=>0,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); + if ( $DisableShadowOnArea ) { $this->Shadow = FALSE; } + } + + $this->Shadow = $RestoreShadow; + return(array("X1"=>$XPos1,"X2"=>$XPos2)); + } + } + + /* Draw an Y threshold with the computed scale */ + function drawThreshold($Value,$Format="") + { + $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; + $R = isset($Format["R"]) ? $Format["R"] : 255; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 50; + $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 6; + $Wide = isset($Format["Wide"]) ? $Format["Wide"] : FALSE; + $WideFactor = isset($Format["WideFactor"]) ? $Format["WideFactor"] : 5; + $WriteCaption = isset($Format["WriteCaption"]) ? $Format["WriteCaption"] : FALSE; + $Caption = isset($Format["Caption"]) ? $Format["Caption"] : NULL; + $CaptionAlign = isset($Format["CaptionAlign"]) ? $Format["CaptionAlign"] : CAPTION_LEFT_TOP; + $CaptionOffset = isset($Format["CaptionOffset"]) ? $Format["CaptionOffset"] : 10; + $CaptionR = isset($Format["CaptionR"]) ? $Format["CaptionR"] : 255; + $CaptionG = isset($Format["CaptionG"]) ? $Format["CaptionG"] : 255; + $CaptionB = isset($Format["CaptionB"]) ? $Format["CaptionB"] : 255; + $CaptionAlpha = isset($Format["CaptionAlpha"]) ? $Format["CaptionAlpha"] : 100; + $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : TRUE; + $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : FALSE; + $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 5; + $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : TRUE; + $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 3; + $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; + $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; + $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; + $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 20; + $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; + $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 255; + $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 255; + $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 255; + $BoxBorderAlpha = isset($Format["BoxBorderAlpha"]) ? $Format["BoxBorderAlpha"] : 100; + $NoMargin = isset($Format["NoMargin"]) ? $Format["NoMargin"] : FALSE; + + if ( is_array($Value) ) { foreach ($Value as $Key => $ID) { $this->drawThreshold($ID,$Format); } return(0); } + + $CaptionSettings = array("DrawBox"=>$DrawBox,"DrawBoxBorder"=>$DrawBoxBorder,"BorderOffset"=>$BorderOffset,"BoxRounded"=>$BoxRounded,"RoundedRadius"=>$RoundedRadius, + "BoxR"=>$BoxR,"BoxG"=>$BoxG,"BoxB"=>$BoxB,"BoxAlpha"=>$BoxAlpha,"BoxSurrounding"=>$BoxSurrounding, + "BoxBorderR"=>$BoxBorderR,"BoxBorderG"=>$BoxBorderG,"BoxBorderB"=>$BoxBorderB,"BoxBorderAlpha"=>$BoxBorderAlpha, + "R"=>$CaptionR,"G"=>$CaptionG,"B"=>$CaptionB,"Alpha"=>$CaptionAlpha); + + $Data = $this->DataSet->getData(); + $AbscissaMargin = $this->getAbscissaMargin($Data); + + if ( $NoMargin ) { $AbscissaMargin = 0; } + if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } + if ( $Caption == NULL ) { $Caption = $Value; } + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + $YPos = $this->scaleComputeY($Value,array("AxisID"=>$AxisID)); + if ( $YPos >= $this->GraphAreaY1+$Data["Axis"][$AxisID]["Margin"] && $YPos <= $this->GraphAreaY2-$Data["Axis"][$AxisID]["Margin"] ) + { + $X1 = $this->GraphAreaX1 + $AbscissaMargin; + $X2 = $this->GraphAreaX2 - $AbscissaMargin; + + $this->drawLine($X1,$YPos,$X2,$YPos,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Wide ) + { + $this->drawLine($X1,$YPos-1,$X2,$YPos-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + $this->drawLine($X1,$YPos+1,$X2,$YPos+1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + } + + if ( $WriteCaption ) + { + if ( $CaptionAlign == CAPTION_LEFT_TOP ) + { $X = $X1 + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLELEFT; } + else + { $X = $X2 - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLERIGHT; } + + $this->drawText($X,$YPos,$Caption,$CaptionSettings); + } + } + + return(array("Y"=>$YPos)); + } + + if ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + $XPos = $this->scaleComputeY($Value,array("AxisID"=>$AxisID)); + if ( $XPos >= $this->GraphAreaX1+$Data["Axis"][$AxisID]["Margin"] && $XPos <= $this->GraphAreaX2-$Data["Axis"][$AxisID]["Margin"] ) + { + $Y1 = $this->GraphAreaY1 + $AbscissaMargin; + $Y2 = $this->GraphAreaY2 - $AbscissaMargin; + + $this->drawLine($XPos,$Y1,$XPos,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Wide ) + { + $this->drawLine($XPos-1,$Y1,$XPos-1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + $this->drawLine($XPos+1,$Y1,$XPos+1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + } + + if ( $WriteCaption ) + { + if ( $CaptionAlign == CAPTION_LEFT_TOP ) + { $Y = $Y1 + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; } + else + { $Y = $Y2 - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; } + + $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; + $this->drawText($XPos,$Y,$Caption,$CaptionSettings); + } + } + + return(array("Y"=>$XPos)); + } + } + + /* Draw a threshold with the computed scale */ + function drawThresholdArea($Value1,$Value2,$Format="") + { + $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; + $R = isset($Format["R"]) ? $Format["R"] : 255; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 20; + $Border = isset($Format["Border"]) ? $Format["Border"] : TRUE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha + 20; + $BorderTicks = isset($Format["BorderTicks"]) ? $Format["BorderTicks"] : 2; + $AreaName = isset($Format["AreaName"]) ? $Format["AreaName"] : NULL; + $NameAngle = isset($Format["NameAngle"]) ? $Format["NameAngle"] : ZONE_NAME_ANGLE_AUTO; + $NameR = isset($Format["NameR"]) ? $Format["NameR"] : 255; + $NameG = isset($Format["NameG"]) ? $Format["NameG"] : 255; + $NameB = isset($Format["NameB"]) ? $Format["NameB"] : 255; + $NameAlpha = isset($Format["NameAlpha"]) ? $Format["NameAlpha"] : 100; + $DisableShadowOnArea = isset($Format["DisableShadowOnArea"]) ? $Format["DisableShadowOnArea"] : TRUE; + $NoMargin = isset($Format["NoMargin"]) ? $Format["NoMargin"] : FALSE; + + if ($Value1 > $Value2) { list($Value1, $Value2) = array($Value2, $Value1); } + + $RestoreShadow = $this->Shadow; + if ( $DisableShadowOnArea && $this->Shadow ) { $this->Shadow = FALSE; } + + if ($BorderAlpha >100) { $BorderAlpha = 100;} + + $Data = $this->DataSet->getData(); + $AbscissaMargin = $this->getAbscissaMargin($Data); + + if ( $NoMargin ) { $AbscissaMargin = 0; } + if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + $XPos1 = $this->GraphAreaX1 + $AbscissaMargin; + $XPos2 = $this->GraphAreaX2 - $AbscissaMargin; + $YPos1 = $this->scaleComputeY($Value1,array("AxisID"=>$AxisID)); + $YPos2 = $this->scaleComputeY($Value2,array("AxisID"=>$AxisID)); + + if ( $YPos1 < $this->GraphAreaY1+$Data["Axis"][$AxisID]["Margin"] ) { $YPos1 = $this->GraphAreaY1+$Data["Axis"][$AxisID]["Margin"]; } + if ( $YPos1 > $this->GraphAreaY2-$Data["Axis"][$AxisID]["Margin"] ) { $YPos1 = $this->GraphAreaY2-$Data["Axis"][$AxisID]["Margin"]; } + if ( $YPos2 < $this->GraphAreaY1+$Data["Axis"][$AxisID]["Margin"] ) { $YPos2 = $this->GraphAreaY1+$Data["Axis"][$AxisID]["Margin"]; } + if ( $YPos2 > $this->GraphAreaY2-$Data["Axis"][$AxisID]["Margin"] ) { $YPos2 = $this->GraphAreaY2-$Data["Axis"][$AxisID]["Margin"]; } + + $this->drawFilledRectangle($XPos1,$YPos1,$XPos2,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + if ( $Border ) + { + $this->drawLine($XPos1,$YPos1,$XPos2,$YPos1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + $this->drawLine($XPos1,$YPos2,$XPos2,$YPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + } + + if ( $AreaName != NULL ) + { + $XPos = ($XPos2-$XPos1)/2 + $XPos1; + $YPos = ($YPos2-$YPos1)/2 + $YPos1; + $this->Shadow = $RestoreShadow; + $this->drawText($XPos,$YPos,$AreaName,array("R"=>$NameR,"G"=>$NameG,"B"=>$NameB,"Alpha"=>$NameAlpha,"Angle"=>0,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); + if ( $DisableShadowOnArea ) { $this->Shadow = FALSE; } + } + + $this->Shadow = $RestoreShadow; + return(array("Y1"=>$YPos1,"Y2"=>$YPos2)); + } + elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + $YPos1 = $this->GraphAreaY1 + $AbscissaMargin; + $YPos2 = $this->GraphAreaY2 - $AbscissaMargin; + $XPos1 = $this->scaleComputeY($Value1,array("AxisID"=>$AxisID)); + $XPos2 = $this->scaleComputeY($Value2,array("AxisID"=>$AxisID)); + + if ( $XPos1 < $this->GraphAreaX1+$Data["Axis"][$AxisID]["Margin"] ) { $XPos1 = $this->GraphAreaX1+$Data["Axis"][$AxisID]["Margin"]; } + if ( $XPos1 > $this->GraphAreaX2-$Data["Axis"][$AxisID]["Margin"] ) { $XPos1 = $this->GraphAreaX2-$Data["Axis"][$AxisID]["Margin"]; } + if ( $XPos2 < $this->GraphAreaX1+$Data["Axis"][$AxisID]["Margin"] ) { $XPos2 = $this->GraphAreaX1+$Data["Axis"][$AxisID]["Margin"]; } + if ( $XPos2 > $this->GraphAreaX2-$Data["Axis"][$AxisID]["Margin"] ) { $XPos2 = $this->GraphAreaX2-$Data["Axis"][$AxisID]["Margin"]; } + + $this->drawFilledRectangle($XPos1,$YPos1,$XPos2,$YPos2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + if ( $Border ) + { + $this->drawLine($XPos1,$YPos1,$XPos1,$YPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + $this->drawLine($XPos2,$YPos1,$XPos2,$YPos2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + } + + if ( $AreaName != NULL ) + { + $XPos = ($YPos2-$YPos1)/2 + $YPos1; + $YPos = ($XPos2-$XPos1)/2 + $XPos1; + + if ( $NameAngle == ZONE_NAME_ANGLE_AUTO ) + { + $TxtPos = $this->getTextBox($XPos,$YPos,$this->FontName,$this->FontSize,0,$AreaName); + $TxtWidth = $TxtPos[1]["X"] - $TxtPos[0]["X"]; + if ( abs($XPos2 - $XPos1) > $TxtWidth ) { $NameAngle = 0; } else { $NameAngle = 90; } + } + $this->Shadow = $RestoreShadow; + $this->drawText($YPos,$XPos,$AreaName,array("R"=>$NameR,"G"=>$NameG,"B"=>$NameB,"Alpha"=>$NameAlpha,"Angle"=>$NameAngle,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); + if ( $DisableShadowOnArea ) { $this->Shadow = FALSE; } + } + + $this->Shadow = $RestoreShadow; + return(array("Y1"=>$XPos1,"Y2"=>$XPos2)); + } + } + + function scaleGetXSettings() + { + $Data = $this->DataSet->getData(); + foreach($Data["Axis"] as $AxisID => $Settings) + { + if ( $Settings["Identity"] == AXIS_X ) + { + $Rows = $Settings["Rows"]; + + return(array($Settings["Margin"],$Rows)); + } + } + } + + function scaleComputeY($Values,$Option="",$ReturnOnly0Height=FALSE) + { + $AxisID = isset($Option["AxisID"]) ? $Option["AxisID"] : 0; + $SerieName = isset($Option["SerieName"]) ? $Option["SerieName"] : NULL; + + $Data = $this->DataSet->getData(); + if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } + + if ( $SerieName != NULL ) { $AxisID = $Data["Series"][$SerieName]["Axis"]; } + if ( !is_array($Values) ) { $tmp = $Values; $Values = ""; $Values[0] = $tmp; } + + $Result = ""; + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + $Height = ($this->GraphAreaY2 - $this->GraphAreaY1) - $Data["Axis"][$AxisID]["Margin"]*2; + $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; + $Step = $Height / $ScaleHeight; + + if ( $ReturnOnly0Height ) + { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $Step * $Value; } } } + else + { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $this->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"] - ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); } } } + } + else + { + $Width = ($this->GraphAreaX2 - $this->GraphAreaX1) - $Data["Axis"][$AxisID]["Margin"]*2; + $ScaleWidth = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; + $Step = $Width / $ScaleWidth; + + if ( $ReturnOnly0Height ) + { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $Step * $Value; } } } + else + { foreach($Values as $Key => $Value) { if ( $Value == VOID ) { $Result[] = VOID; } else { $Result[] = $this->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"] + ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); } } } + } + + if ( count($Result) == 1 ) + return($Result[0]); + else + return($Result); + } + + /* Format the axis values */ + function scaleFormat($Value,$Mode=NULL,$Format=NULL,$Unit=NULL) + { + if ( $Value == VOID ) { return(""); } + + if ( $Mode == AXIS_FORMAT_CUSTOM ) + { if ( function_exists($Format) ) { return(call_user_func($Format,$Value)); } } + + if ( $Mode == AXIS_FORMAT_DATE ) + { if ( $Format == NULL ) { $Pattern = "d/m/Y"; } else { $Pattern = $Format; } return(date($Pattern,$Value)); } + + if ( $Mode == AXIS_FORMAT_TIME ) + { if ( $Format == NULL ) { $Pattern = "H:i:s"; } else { $Pattern = $Format; } return(date($Pattern,$Value)); } + + if ( $Mode == AXIS_FORMAT_CURRENCY ) + { return($Format.number_format($Value,2)); } + + if ( $Mode == AXIS_FORMAT_METRIC ) + { + if (abs($Value) > 1000000000) + return(round($Value/1000000000,$Format)."g".$Unit); + if (abs($Value) > 1000000) + return(round($Value/1000000,$Format)."m".$Unit); + elseif (abs($Value) >= 1000) + return(round($Value/1000,$Format)."k".$Unit); + + } + return($Value.$Unit); + } + + /* Write Max value on a chart */ + function writeBounds($Type=BOUND_BOTH,$Format=NULL) + { + $MaxLabelTxt = isset($Format["MaxLabelTxt"]) ? $Format["MaxLabelTxt"] : "max="; + $MinLabelTxt = isset($Format["MinLabelTxt"]) ? $Format["MinLabelTxt"] : "min="; + $Decimals = isset($Format["Decimals"]) ? $Format["Decimals"] : 1; + $ExcludedSeries = isset($Format["ExcludedSeries"]) ? $Format["ExcludedSeries"] : ""; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 4; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $MaxDisplayR = isset($Format["MaxDisplayR"]) ? $Format["MaxDisplayR"] : 0; + $MaxDisplayG = isset($Format["MaxDisplayG"]) ? $Format["MaxDisplayG"] : 0; + $MaxDisplayB = isset($Format["MaxDisplayB"]) ? $Format["MaxDisplayB"] : 0; + $MinDisplayR = isset($Format["MinDisplayR"]) ? $Format["MinDisplayR"] : 255; + $MinDisplayG = isset($Format["MinDisplayG"]) ? $Format["MinDisplayG"] : 255; + $MinDisplayB = isset($Format["MinDisplayB"]) ? $Format["MinDisplayB"] : 255; + $MinLabelPos = isset($Format["MinLabelPos"]) ? $Format["MinLabelPos"] : BOUND_LABEL_POS_AUTO; + $MaxLabelPos = isset($Format["MaxLabelPos"]) ? $Format["MaxLabelPos"] : BOUND_LABEL_POS_AUTO; + $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : TRUE; + $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : FALSE; + $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 5; + $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : TRUE; + $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 3; + $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; + $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; + $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; + $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 20; + $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; + $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 255; + $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 255; + $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 255; + $BoxBorderAlpha = isset($Format["BoxBorderAlpha"]) ? $Format["BoxBorderAlpha"] : 100; + + $CaptionSettings = array("DrawBox"=>$DrawBox,"DrawBoxBorder"=>$DrawBoxBorder,"BorderOffset"=>$BorderOffset,"BoxRounded"=>$BoxRounded,"RoundedRadius"=>$RoundedRadius, + "BoxR"=>$BoxR,"BoxG"=>$BoxG,"BoxB"=>$BoxB,"BoxAlpha"=>$BoxAlpha,"BoxSurrounding"=>$BoxSurrounding, + "BoxBorderR"=>$BoxBorderR,"BoxBorderG"=>$BoxBorderG,"BoxBorderB"=>$BoxBorderB,"BoxBorderAlpha"=>$BoxBorderAlpha); + + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + $Data = $this->DataSet->getData(); + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] && !isset($ExcludedSeries[$SerieName])) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $MinValue = $this->DataSet->getMin($SerieName); + $MaxValue = $this->DataSet->getMax($SerieName); + + $MinPos = VOID; $MaxPos = VOID; + foreach($Serie["Data"] as $Key => $Value) + { + if ( $Value == $MinValue && $MinPos == VOID ) { $MinPos = $Key; } + if ( $Value == $MaxValue ) { $MaxPos = $Key; } + } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; + $X = $this->GraphAreaX1 + $XMargin; + $SerieOffset = isset($Serie["XOffset"]) ? $Serie["XOffset"] : 0; + + if ( $Type == BOUND_MAX || $Type == BOUND_BOTH ) + { + if ( $MaxLabelPos == BOUND_LABEL_POS_TOP || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue >= 0) ) { $YPos = $PosArray[$MaxPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_BOTTOMMIDDLE; } + if ( $MaxLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue < 0) ) { $YPos = $PosArray[$MaxPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_TOPMIDDLE; } + + $XPos = $X + $MaxPos*$XStep + $SerieOffset; + $Label = $MaxLabelTxt.$this->scaleFormat(round($MaxValue,$Decimals),$Mode,$Format,$Unit); + + $TxtPos = $this->getTextBox($XPos,$YPos,$this->FontName,$this->FontSize,0,$Label); + $XOffset = 0; $YOffset = 0; + if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = (($this->GraphAreaX1 - $TxtPos[0]["X"])/2); } + if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -(($TxtPos[1]["X"] - $this->GraphAreaX2)/2); } + if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = $this->GraphAreaY1 - $TxtPos[2]["Y"]; } + if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -($TxtPos[0]["Y"] - $this->GraphAreaY2); } + + $CaptionSettings["R"] = $MaxDisplayR; $CaptionSettings["G"] = $MaxDisplayG; + $CaptionSettings["B"] = $MaxDisplayB; $CaptionSettings["Align"] = $Align; + + $this->drawText($XPos+$XOffset,$YPos+$YOffset,$Label,$CaptionSettings); + } + + if ( $Type == BOUND_MIN || $Type == BOUND_BOTH ) + { + if ( $MinLabelPos == BOUND_LABEL_POS_TOP || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue >= 0) ) { $YPos = $PosArray[$MinPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_BOTTOMMIDDLE; } + if ( $MinLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue < 0) ) { $YPos = $PosArray[$MinPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_TOPMIDDLE; } + + $XPos = $X + $MinPos*$XStep + $SerieOffset; + $Label = $MinLabelTxt.$this->scaleFormat(round($MinValue,$Decimals),$Mode,$Format,$Unit); + + $TxtPos = $this->getTextBox($XPos,$YPos,$this->FontName,$this->FontSize,0,$Label); + $XOffset = 0; $YOffset = 0; + if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = (($this->GraphAreaX1 - $TxtPos[0]["X"])/2); } + if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -(($TxtPos[1]["X"] - $this->GraphAreaX2)/2); } + if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = $this->GraphAreaY1 - $TxtPos[2]["Y"]; } + if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -($TxtPos[0]["Y"] - $this->GraphAreaY2); } + + $CaptionSettings["R"] = $MinDisplayR; $CaptionSettings["G"] = $MinDisplayG; + $CaptionSettings["B"] = $MinDisplayB; $CaptionSettings["Align"] = $Align; + + $this->drawText($XPos+$XOffset,$YPos-$DisplayOffset+$YOffset,$Label,$CaptionSettings); + } + } + else + { + $XStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; + $X = $this->GraphAreaY1 + $XMargin; + $SerieOffset = isset($Serie["XOffset"]) ? $Serie["XOffset"] : 0; + + if ( $Type == BOUND_MAX || $Type == BOUND_BOTH ) + { + if ( $MaxLabelPos == BOUND_LABEL_POS_TOP || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue >= 0) ) { $YPos = $PosArray[$MaxPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLELEFT; } + if ( $MaxLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MaxLabelPos == BOUND_LABEL_POS_AUTO && $MaxValue < 0) ) { $YPos = $PosArray[$MaxPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLERIGHT; } + + $XPos = $X + $MaxPos*$XStep + $SerieOffset; + $Label = $MaxLabelTxt.$this->scaleFormat($MaxValue,$Mode,$Format,$Unit); + + $TxtPos = $this->getTextBox($YPos,$XPos,$this->FontName,$this->FontSize,0,$Label); + $XOffset = 0; $YOffset = 0; + if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = $this->GraphAreaX1 - $TxtPos[0]["X"]; } + if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -($TxtPos[1]["X"] - $this->GraphAreaX2); } + if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = ($this->GraphAreaY1 - $TxtPos[2]["Y"])/2; } + if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -(($TxtPos[0]["Y"] - $this->GraphAreaY2)/2);} + + $CaptionSettings["R"] = $MaxDisplayR; $CaptionSettings["G"] = $MaxDisplayG; + $CaptionSettings["B"] = $MaxDisplayB; $CaptionSettings["Align"] = $Align; + + $this->drawText($YPos+$XOffset,$XPos+$YOffset,$Label,$CaptionSettings); + } + + if ( $Type == BOUND_MIN || $Type == BOUND_BOTH ) + { + if ( $MinLabelPos == BOUND_LABEL_POS_TOP || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue >= 0) ) { $YPos = $PosArray[$MinPos] + $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLELEFT; } + if ( $MinLabelPos == BOUND_LABEL_POS_BOTTOM || ( $MinLabelPos == BOUND_LABEL_POS_AUTO && $MinValue < 0) ) { $YPos = $PosArray[$MinPos] - $DisplayOffset + 2; $Align = TEXT_ALIGN_MIDDLERIGHT; } + + $XPos = $X + $MinPos*$XStep + $SerieOffset; + $Label = $MinLabelTxt.$this->scaleFormat($MinValue,$Mode,$Format,$Unit); + + $TxtPos = $this->getTextBox($YPos,$XPos,$this->FontName,$this->FontSize,0,$Label); + $XOffset = 0; $YOffset = 0; + if ( $TxtPos[0]["X"] < $this->GraphAreaX1 ) { $XOffset = $this->GraphAreaX1 - $TxtPos[0]["X"]; } + if ( $TxtPos[1]["X"] > $this->GraphAreaX2 ) { $XOffset = -($TxtPos[1]["X"] - $this->GraphAreaX2); } + if ( $TxtPos[2]["Y"] < $this->GraphAreaY1 ) { $YOffset = ($this->GraphAreaY1 - $TxtPos[2]["Y"])/2; } + if ( $TxtPos[0]["Y"] > $this->GraphAreaY2 ) { $YOffset = -(($TxtPos[0]["Y"] - $this->GraphAreaY2)/2);} + + $CaptionSettings["R"] = $MinDisplayR; $CaptionSettings["G"] = $MinDisplayG; + $CaptionSettings["B"] = $MinDisplayB; $CaptionSettings["Align"] = $Align; + + $this->drawText($YPos+$XOffset,$XPos+$YOffset,$Label,$CaptionSettings); + } + } + } + } + } + + /* Draw a plot chart */ + function drawPlotChart($Format=NULL) + { + $PlotSize = isset($Format["PlotSize"]) ? $Format["PlotSize"] : NULL; + $PlotBorder = isset($Format["PlotBorder"]) ? $Format["PlotBorder"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 50; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 50; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 50; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30; + $BorderSize = isset($Format["BorderSize"]) ? $Format["BorderSize"] : 2; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 4; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + if ( isset($Serie["Weight"]) ) { $SerieWeight = $Serie["Weight"] + 2; } else { $SerieWeight = 2; } + if ( $PlotSize != NULL ) { $SerieWeight = $PlotSize; } + + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } + if ( isset($Serie["Picture"]) ) + { $Picture = $Serie["Picture"]; list($PicWidth,$PicHeight,$PicType) = $this->getPicInfo($Picture); } + else { $Picture = NULL; $PicOffset = 0; } + + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Shape = $Serie["Shape"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + if (isset($Serie["Description"])) { $SerieDescription = $Serie["Description"]; } else { $SerieDescription = $SerieName; } + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + if ( $Picture != NULL ) { $PicOffset = $PicHeight / 2; $SerieWeight = 0; } + $X = $this->GraphAreaX1 + $XMargin; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $Y) + { + if ( $DisplayValues ) + $this->drawText($X,$Y-$DisplayOffset-$SerieWeight-$BorderSize-$PicOffset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + + if ( $Y != VOID ) + { + if ( $RecordImageMap ) { $this->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$SerieWeight,$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Picture != NULL ) + { $this->drawFromPicture($PicType,$Picture,$X-$PicWidth/2,$Y-$PicHeight/2); } + else + { $this->drawShape($X,$Y,$Shape,$SerieWeight,$PlotBorder,$BorderSize,$R,$G,$B,$Alpha,$BorderR,$BorderG,$BorderB,$BorderAlpha); } + } + $X = $X + $XStep; + } + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + if ( $Picture != NULL ) { $PicOffset = $PicWidth / 2; $SerieWeight = 0; } + $Y = $this->GraphAreaY1 + $XMargin; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $X) + { + if ( $DisplayValues ) + $this->drawText($X+$DisplayOffset+$SerieWeight+$BorderSize+$PicOffset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + + if ( $X != VOID ) + { + if ( $RecordImageMap ) { $this->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$SerieWeight,$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Picture != NULL ) + { $this->drawFromPicture($PicType,$Picture,$X-$PicWidth/2,$Y-$PicHeight/2); } + else + { $this->drawShape($X,$Y,$Shape,$SerieWeight,$PlotBorder,$BorderSize,$R,$G,$B,$Alpha,$BorderR,$BorderG,$BorderB,$BorderAlpha); } + } + $Y = $Y + $YStep; + } + } + } + } + } + + /* Draw a spline chart */ + function drawSplineChart($Format=NULL) + { + $BreakVoid = isset($Format["BreakVoid"]) ? $Format["BreakVoid"] : TRUE; + $VoidTicks = isset($Format["VoidTicks"]) ? $Format["VoidTicks"] : 4; + $BreakR = isset($Format["BreakR"]) ? $Format["BreakR"] : NULL; // 234 + $BreakG = isset($Format["BreakG"]) ? $Format["BreakG"] : NULL; // 55 + $BreakB = isset($Format["BreakB"]) ? $Format["BreakB"] : NULL; // 26 + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapPlotSize = isset($Format["ImageMapPlotSize"]) ? $Format["ImageMapPlotSize"] : 5; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; + + if ( $BreakR == NULL ) + $BreakSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks); + else + $BreakSettings = array("R"=>$BreakR,"G"=>$BreakG,"B"=>$BreakB,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); + + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + if (isset($Serie["Description"])) { $SerieDescription = $Serie["Description"]; } else { $SerieDescription = $SerieName; } + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $WayPoints = ""; + $Force = $XStep / 5; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; $LastX = 1; $LastY = 1; + foreach($PosArray as $Key => $Y) + { + if ( $DisplayValues ) + $this->drawText($X,$Y-$DisplayOffset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + + if ( $RecordImageMap && $Y != VOID ) { $this->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$ImageMapPlotSize,$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Y == VOID && $LastY != NULL ) + { $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); $WayPoints = ""; } + + if ( $Y != VOID && $LastY == NULL && $LastGoodY != NULL && !$BreakVoid ) + { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); } + + if ( $Y != VOID ) + $WayPoints[] = array($X,$Y); + + if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $Y == VOID ) { $Y = NULL; } + + $LastX = $X; $LastY = $Y; + $X = $X + $XStep; + } + $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $WayPoints = ""; + $Force = $YStep / 5; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; $LastX = 1; $LastY = 1; + foreach($PosArray as $Key => $X) + { + if ( $DisplayValues ) + $this->drawText($X+$DisplayOffset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + + if ( $RecordImageMap && $X != VOID ) { $this->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$ImageMapPlotSize,$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $X == VOID && $LastX != NULL ) + { $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); $WayPoints = ""; } + + if ( $X != VOID && $LastX == NULL && $LastGoodX != NULL && !$BreakVoid ) + { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); } + + if ( $X != VOID ) + $WayPoints[] = array($X,$Y); + + if ( $X != VOID ) { $LastGoodX = $X; $LastGoodY = $Y; } + if ( $X == VOID ) { $X = NULL; } + + $LastX = $X; $LastY = $Y; + $Y = $Y + $YStep; + } + $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + } + } + } + } + + /* Draw a filled spline chart */ + function drawFilledSplineChart($Format=NULL) + { + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; + $Threshold = isset($Format["Threshold"]) ? $Format["Threshold"] : NULL; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + if ( $AroundZero ) { $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); } + + if ( $Threshold != NULL ) + { + foreach($Threshold as $Key => $Params) + { + $Threshold[$Key]["MinX"] = $this->scaleComputeY($Params["Min"],array("AxisID"=>$Serie["Axis"])); + $Threshold[$Key]["MaxX"] = $this->scaleComputeY($Params["Max"],array("AxisID"=>$Serie["Axis"])); + } + } + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $WayPoints = ""; + $Force = $XStep / 5; + + if ( !$AroundZero ) { $YZero = $this->GraphAreaY2-1; } + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } + + $LastX = ""; $LastY = ""; + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $Y) + { + if ( $DisplayValues ) + $this->drawText($X,$Y-$DisplayOffset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + + if ( $Y == VOID ) + { + $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); + + if ( $Area != "" ) + { + foreach ($Area as $key => $Points) + { + $Corners = ""; $Corners[] = $Area[$key][0]["X"]; $Corners[] = $YZero; + foreach($Points as $subKey => $Point) + { + if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } + $Corners[] = $Point["Y"]+1; + } + $Corners[] = $Points[$subKey]["X"]-1; $Corners[] = $YZero; + + $this->drawPolygonChart($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE,"Threshold"=>$Threshold)); + } + $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + + $WayPoints = ""; + } + else + $WayPoints[] = array($X,$Y-.5); /* -.5 for AA visual fix */ + + $X = $X + $XStep; + } + $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); + + if ( $Area != "" ) + { + foreach ($Area as $key => $Points) + { + $Corners = ""; $Corners[] = $Area[$key][0]["X"]; $Corners[] = $YZero; + foreach($Points as $subKey => $Point) + { + if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } + $Corners[] = $Point["Y"]+1; + } + $Corners[] = $Points[$subKey]["X"]-1; $Corners[] = $YZero; + + $this->drawPolygonChart($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE,"Threshold"=>$Threshold)); + } + $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $WayPoints = ""; + $Force = $YStep / 5; + + if ( !$AroundZero ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $X) + { + if ( $DisplayValues ) + $this->drawText($X+$DisplayOffset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + + if ( $X == VOID ) + { + $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); + + if ( $Area != "" ) + { + foreach ($Area as $key => $Points) + { + $Corners = ""; $Corners[] = $YZero; $Corners[] = $Area[$key][0]["Y"]; + foreach($Points as $subKey => $Point) + { + if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } + $Corners[] = $Point["Y"]; + } + $Corners[] = $YZero; $Corners[] = $Points[$subKey]["Y"]-1; + + $this->drawPolygonChart($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE,"Threshold"=>$Threshold)); + } + $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + + $WayPoints = ""; + } + else + $WayPoints[] = array($X,$Y); + + $Y = $Y + $YStep; + } + $Area = $this->drawSpline($WayPoints,array("Force"=>$Force,"PathOnly"=>TRUE)); + + if ( $Area != "" ) + { + foreach ($Area as $key => $Points) + { + $Corners = ""; $Corners[] = $YZero; $Corners[] = $Area[$key][0]["Y"]; + foreach($Points as $subKey => $Point) + { + if ( $subKey == count($Points)-1) { $Corners[] = $Point["X"]-1; } else { $Corners[] = $Point["X"]; } + $Corners[] = $Point["Y"]; + } + $Corners[] = $YZero; $Corners[] = $Points[$subKey]["Y"]-1; + + $this->drawPolygonChart($Corners,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/2,"NoBorder"=>TRUE,"Threshold"=>$Threshold)); + } + $this->drawSpline($WayPoints,array("Force"=>$Force,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks)); + } + + } + } + } + } + + /* Draw a line chart */ + function drawLineChart($Format=NULL) + { + $BreakVoid = isset($Format["BreakVoid"]) ? $Format["BreakVoid"] : TRUE; + $VoidTicks = isset($Format["VoidTicks"]) ? $Format["VoidTicks"] : 4; + $BreakR = isset($Format["BreakR"]) ? $Format["BreakR"] : NULL; + $BreakG = isset($Format["BreakG"]) ? $Format["BreakG"] : NULL; + $BreakB = isset($Format["BreakB"]) ? $Format["BreakB"] : NULL; + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapPlotSize = isset($Format["ImageMapPlotSize"]) ? $Format["ImageMapPlotSize"] : 5; + $ForceColor = isset($Format["ForceColor"]) ? $Format["ForceColor"] : FALSE; + $ForceR = isset($Format["ForceR"]) ? $Format["ForceR"] : 0; + $ForceG = isset($Format["ForceG"]) ? $Format["ForceG"] : 0; + $ForceB = isset($Format["ForceB"]) ? $Format["ForceB"] : 0; + $ForceAlpha = isset($Format["ForceAlpha"]) ? $Format["ForceAlpha"] : 100; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; + + if ( $ForceColor ) + { $R = $ForceR; $G = $ForceG; $B = $ForceB; $Alpha = $ForceAlpha; } + + if ( $BreakR == NULL ) + $BreakSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); + else + $BreakSettings = array("R"=>$BreakR,"G"=>$BreakG,"B"=>$BreakB,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); + + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + if (isset($Serie["Description"])) { $SerieDescription = $Serie["Description"]; } else { $SerieDescription = $SerieName; } + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; + foreach($PosArray as $Key => $Y) + { + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } + $this->drawText($X,$Y-$Offset-$Weight,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); + } + + if ( $RecordImageMap && $Y != VOID ) { $this->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$ImageMapPlotSize,$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Y != VOID && $LastX != NULL && $LastY != NULL ) + $this->drawLine($LastX,$LastY,$X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Y != VOID && $LastY == NULL && $LastGoodY != NULL && !$BreakVoid ) + { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); $LastGoodY = NULL; } + + if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $Y == VOID ) { $Y = NULL; } + + $LastX = $X; $LastY = $Y; + $X = $X + $XStep; + } + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; + foreach($PosArray as $Key => $X) + { + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { $this->drawText($X+$DisplayOffset+$Weight,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } + + if ( $RecordImageMap && $X != VOID ) { $this->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$ImageMapPlotSize,$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $X != VOID && $LastX != NULL && $LastY != NULL ) + $this->drawLine($LastX,$LastY,$X,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $X != VOID && $LastX == NULL && $LastGoodY != NULL && !$BreakVoid ) + { $this->drawLine($LastGoodX,$LastGoodY,$X,$Y,$BreakSettings); $LastGoodY = NULL; } + + if ( $X != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $X == VOID ) { $X = NULL; } + + $LastX = $X; $LastY = $Y; + $Y = $Y + $YStep; + } + } + } + } + } + + /* Draw a line chart */ + function drawZoneChart($SerieA,$SerieB,$Format=NULL) + { + $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; + $LineR = isset($Format["LineR"]) ? $Format["LineR"] : 150; + $LineG = isset($Format["LineG"]) ? $Format["LineG"] : 150; + $LineB = isset($Format["LineB"]) ? $Format["LineB"] : 150; + $LineAlpha = isset($Format["LineAlpha"]) ? $Format["LineAlpha"] : 50; + $LineTicks = isset($Format["LineTicks"]) ? $Format["LineTicks"] : 1; + $AreaR = isset($Format["AreaR"]) ? $Format["AreaR"] : 150; + $AreaG = isset($Format["AreaG"]) ? $Format["AreaG"] : 150; + $AreaB = isset($Format["AreaB"]) ? $Format["AreaB"] : 150; + $AreaAlpha = isset($Format["AreaAlpha"]) ? $Format["AreaAlpha"] : 5; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + if ( !isset($Data["Series"][$SerieA]["Data"]) || !isset($Data["Series"][$SerieB]["Data"]) ) { return(0); } + $SerieAData = $Data["Series"][$SerieA]["Data"]; + $SerieBData = $Data["Series"][$SerieB]["Data"]; + + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $PosArrayA = $this->scaleComputeY($SerieAData,array("AxisID"=>$AxisID)); + $PosArrayB = $this->scaleComputeY($SerieBData,array("AxisID"=>$AxisID)); + if ( count($PosArrayA) != count($PosArrayB) ) { return(0); } + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; + + $LastX = NULL; $LastY1 = NULL; $LastY2 = NULL; + $BoundsA = ""; $BoundsB = ""; + foreach($PosArrayA as $Key => $Y1) + { + $Y2 = $PosArrayB[$Key]; + + $BoundsA[] = $X; $BoundsA[] = $Y1; + $BoundsB[] = $X; $BoundsB[] = $Y2; + + $LastX = $X; + $LastY1 = $Y1; $LastY2 = $Y2; + + $X = $X + $XStep; + } + $Bounds = array_merge($BoundsA,$this->reversePlots($BoundsB)); + $this->drawPolygonChart($Bounds,array("R"=>$AreaR,"G"=>$AreaG,"B"=>$AreaB,"Alpha"=>$AreaAlpha)); + + for($i=0;$i<=count($BoundsA)-4;$i=$i+2) + { + $this->drawLine($BoundsA[$i],$BoundsA[$i+1],$BoundsA[$i+2],$BoundsA[$i+3],array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha,"Ticks"=>$LineTicks)); + $this->drawLine($BoundsB[$i],$BoundsB[$i+1],$BoundsB[$i+2],$BoundsB[$i+3],array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha,"Ticks"=>$LineTicks)); + } + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; + + $LastY = NULL; $LastX1 = NULL; $LastX2 = NULL; + $BoundsA = ""; $BoundsB = ""; + foreach($PosArrayA as $Key => $X1) + { + $X2 = $PosArrayB[$Key]; + + $BoundsA[] = $X1; $BoundsA[] = $Y; + $BoundsB[] = $X2; $BoundsB[] = $Y; + + $LastY = $Y; + $LastX1 = $X1; $LastX2 = $X2; + + $Y = $Y + $YStep; + } + $Bounds = array_merge($BoundsA,$this->reversePlots($BoundsB)); + $this->drawPolygonChart($Bounds,array("R"=>$AreaR,"G"=>$AreaG,"B"=>$AreaB,"Alpha"=>$AreaAlpha)); + + for($i=0;$i<=count($BoundsA)-4;$i=$i+2) + { + $this->drawLine($BoundsA[$i],$BoundsA[$i+1],$BoundsA[$i+2],$BoundsA[$i+3],array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha,"Ticks"=>$LineTicks)); + $this->drawLine($BoundsB[$i],$BoundsB[$i+1],$BoundsB[$i+2],$BoundsB[$i+3],array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha,"Ticks"=>$LineTicks)); + } + } + } + + /* Draw a step chart */ + function drawStepChart($Format=NULL) + { + $BreakVoid = isset($Format["BreakVoid"]) ? $Format["BreakVoid"] : FALSE; + $ReCenter = isset($Format["ReCenter"]) ? $Format["ReCenter"] : TRUE; + $VoidTicks = isset($Format["VoidTicks"]) ? $Format["VoidTicks"] : 4; + $BreakR = isset($Format["BreakR"]) ? $Format["BreakR"] : NULL; + $BreakG = isset($Format["BreakG"]) ? $Format["BreakG"] : NULL; + $BreakB = isset($Format["BreakB"]) ? $Format["BreakB"] : NULL; + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] :FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapPlotSize = isset($Format["ImageMapPlotSize"]) ? $Format["ImageMapPlotSize"] : 5; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; + + if (isset($Serie["Description"])) { $SerieDescription = $Serie["Description"]; } else { $SerieDescription = $SerieName; } + + if ( $BreakR == NULL ) + $BreakSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); + else + $BreakSettings = array("R"=>$BreakR,"G"=>$BreakG,"B"=>$BreakB,"Alpha"=>$Alpha,"Ticks"=>$VoidTicks,"Weight"=>$Weight); + + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; $Init = FALSE; + foreach($PosArray as $Key => $Y) + { + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $Y <= $LastY ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } + $this->drawText($X,$Y-$Offset-$Weight,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); + } + + if ( $Y != VOID && $LastX != NULL && $LastY != NULL ) + { + $this->drawLine($LastX,$LastY,$X,$LastY,$Color); + $this->drawLine($X,$LastY,$X,$Y,$Color); + if ( $ReCenter && $X+$XStep < $this->GraphAreaX2 - $XMargin ) + { + $this->drawLine($X,$Y,$X+$XStep,$Y,$Color); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X-$ImageMapPlotSize).",".floor($Y-$ImageMapPlotSize).",".floor($X+$XStep+$ImageMapPlotSize).",".floor($Y+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + else + { if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastX-$ImageMapPlotSize).",".floor($LastY-$ImageMapPlotSize).",".floor($X+$ImageMapPlotSize).",".floor($LastY+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } } + } + + if ( $Y != VOID && $LastY == NULL && $LastGoodY != NULL && !$BreakVoid ) + { + if ( $ReCenter ) + { + $this->drawLine($LastGoodX+$XStep,$LastGoodY,$X,$LastGoodY,$BreakSettings); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastGoodX+$XStep-$ImageMapPlotSize).",".floor($LastGoodY-$ImageMapPlotSize).",".floor($X+$ImageMapPlotSize).",".floor($LastGoodY+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + else + { + $this->drawLine($LastGoodX,$LastGoodY,$X,$LastGoodY,$BreakSettings); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastGoodX-$ImageMapPlotSize).",".floor($LastGoodY-$ImageMapPlotSize).",".floor($X+$ImageMapPlotSize).",".floor($LastGoodY+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + + $this->drawLine($X,$LastGoodY,$X,$Y,$BreakSettings); + $LastGoodY = NULL; + } + elseif( !$BreakVoid && $LastGoodY == NULL && $Y != VOID ) + { + $this->drawLine($this->GraphAreaX1 + $XMargin,$Y,$X,$Y,$BreakSettings); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($this->GraphAreaX1+$XMargin-$ImageMapPlotSize).",".floor($Y-$ImageMapPlotSize).",".floor($X+$ImageMapPlotSize).",".floor($Y+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + + if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $Y == VOID ) { $Y = NULL; } + + if ( !$Init && $ReCenter ) { $X = $X - $XStep/2; $Init = TRUE; } + $LastX = $X; $LastY = $Y; + if ( $LastX < $this->GraphAreaX1 + $XMargin ) { $LastX = $this->GraphAreaX1 + $XMargin; } + $X = $X + $XStep; + } + if ( $ReCenter ) + { + $this->drawLine($LastX,$LastY,$this->GraphAreaX2 - $XMargin,$LastY,$Color); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastX-$ImageMapPlotSize).",".floor($LastY-$ImageMapPlotSize).",".floor($this->GraphAreaX2-$XMargin+$ImageMapPlotSize).",".floor($LastY+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; $Init = FALSE; + foreach($PosArray as $Key => $X) + { + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $X >= $LastX ) { $Align = TEXT_ALIGN_MIDDLELEFT; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_MIDDLERIGHT; $Offset = -$DisplayOffset; } + $this->drawText($X+$Offset+$Weight,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); + } + + if ( $X != VOID && $LastX != NULL && $LastY != NULL ) + { + $this->drawLine($LastX,$LastY,$LastX,$Y,$Color); + $this->drawLine($LastX,$Y,$X,$Y,$Color); + + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastX-$ImageMapPlotSize).",".floor($LastY-$ImageMapPlotSize).",".floor($LastX+$XStep+$ImageMapPlotSize).",".floor($Y+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + + if ( $X != VOID && $LastX == NULL && $LastGoodY != NULL && !$BreakVoid ) + { + $this->drawLine($LastGoodX,$LastGoodY,$LastGoodX,$LastGoodY+$YStep,$Color); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastGoodX-$ImageMapPlotSize).",".floor($LastGoodY-$ImageMapPlotSize).",".floor($LastGoodX+$ImageMapPlotSize).",".floor($LastGoodY+$YStep+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + $this->drawLine($LastGoodX,$LastGoodY+$YStep,$LastGoodX,$Y,$BreakSettings); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastGoodX-$ImageMapPlotSize).",".floor($LastGoodY+$YStep-$ImageMapPlotSize).",".floor($LastGoodX+$ImageMapPlotSize).",".floor($YStep+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + $this->drawLine($LastGoodX,$Y,$X,$Y,$BreakSettings); + $LastGoodY = NULL; + } + elseif ( $X != VOID && $LastGoodY == NULL && !$BreakVoid ) + { + $this->drawLine($X,$this->GraphAreaY1 + $XMargin,$X,$Y,$BreakSettings); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X-$ImageMapPlotSize).",".floor($this->GraphAreaY1+$XMargin-$ImageMapPlotSize).",".floor($X+$ImageMapPlotSize).",".floor($Y+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + + if ( $X != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $X == VOID ) { $X = NULL; } + + if ( !$Init && $ReCenter ) { $Y = $Y - $YStep/2; $Init = TRUE; } + $LastX = $X; $LastY = $Y; + if ( $LastY < $this->GraphAreaY1 + $XMargin ) { $LastY = $this->GraphAreaY1 + $XMargin; } + $Y = $Y + $YStep; + } + if ( $ReCenter ) + { + $this->drawLine($LastX,$LastY,$LastX,$this->GraphAreaY2 - $XMargin,$Color); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($LastX-$ImageMapPlotSize).",".floor($LastY-$ImageMapPlotSize).",".floor($LastX+$ImageMapPlotSize).",".floor($this->GraphAreaY2-$XMargin+$ImageMapPlotSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + } + } + } + } + + /* Draw a step chart */ + function drawFilledStepChart($Format=NULL) + { + $ReCenter = isset($Format["ReCenter"]) ? $Format["ReCenter"] : TRUE; + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] :FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $ForceTransparency = isset($Format["ForceTransparency"]) ? $Format["ForceTransparency"] : NULL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; + + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B); + if ( $ForceTransparency != NULL ) { $Color["Alpha"] = $ForceTransparency; } else { $Color["Alpha"] = $Alpha; } + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } + + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !$AroundZero ) { $YZero = $this->GraphAreaY2-1; } + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; $Points = ""; $Init = FALSE; + foreach($PosArray as $Key => $Y) + { + if ( $Y == VOID && $LastX != NULL && $LastY != NULL && $Points !="" ) + { + $Points[] = $LastX; $Points[] = $LastY; + $Points[] = $X; $Points[] = $LastY; + $Points[] = $X; $Points[] = $YZero; + $this->drawPolygon($Points,$Color); + $Points = ""; + } + + if ( $Y != VOID && $LastX != NULL && $LastY != NULL ) + { + if ( $Points == "") { $Points[] = $LastX; $Points[] = $YZero; } + $Points[] = $LastX; $Points[] = $LastY; + $Points[] = $X; $Points[] = $LastY; + $Points[] = $X; $Points[] = $Y; + } + + if ( $Y != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $Y == VOID ) { $Y = NULL; } + + if ( !$Init && $ReCenter ) { $X = $X - $XStep/2; $Init = TRUE; } + $LastX = $X; $LastY = $Y; + if ( $LastX < $this->GraphAreaX1 + $XMargin ) { $LastX = $this->GraphAreaX1 + $XMargin; } + $X = $X + $XStep; + } + + if ( $ReCenter ) + { + $Points[] = $LastX+$XStep/2; $Points[] = $LastY; + $Points[] = $LastX+$XStep/2; $Points[] = $YZero; + } + else + { $Points[] = $LastX; $Points[] = $YZero; } + + $this->drawPolygon($Points,$Color); + } + else + { + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $LastGoodY = NULL; $LastGoodX = NULL; $Points = ""; + foreach($PosArray as $Key => $X) + { + if ( $X == VOID && $LastX != NULL && $LastY != NULL && $Points !="" ) + { + $Points[] = $LastX; $Points[] = $LastY; + $Points[] = $LastX; $Points[] = $Y; + $Points[] = $YZero; $Points[] = $Y; + $this->drawPolygon($Points,$Color); + $Points = ""; + } + + if ( $X != VOID && $LastX != NULL && $LastY != NULL ) + { + if ( $Points == "") { $Points[] = $YZero; $Points[] = $LastY; } + $Points[] = $LastX; $Points[] = $LastY; + $Points[] = $LastX; $Points[] = $Y; + $Points[] = $X; $Points[] = $Y; + } + + if ( $X != VOID ) { $LastGoodY = $Y; $LastGoodX = $X; } + if ( $X == VOID ) { $X = NULL; } + + if ( $LastX == NULL && $ReCenter ) { $Y = $Y - $YStep/2; } + $LastX = $X; $LastY = $Y; + if ( $LastY < $this->GraphAreaY1 + $XMargin ) { $LastY = $this->GraphAreaY1 + $XMargin; } + $Y = $Y + $YStep; + } + + if ( $ReCenter ) + { + $Points[] = $LastX; $Points[] = $LastY+$YStep/2; + $Points[] = $YZero; $Points[] = $LastY+$YStep/2; + } + else + { $Points[] = $YZero; $Points[] = $LastY; } + + $this->drawPolygon($Points,$Color); + } + } + } + } + + /* Draw an area chart */ + function drawAreaChart($Format=NULL) + { + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $ForceTransparency = isset($Format["ForceTransparency"]) ? $Format["ForceTransparency"] : 25; + $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; + $Threshold = isset($Format["Threshold"]) ? $Format["Threshold"] : NULL; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); + + if ( $Threshold != NULL ) + { + foreach($Threshold as $Key => $Params) + { + $Threshold[$Key]["MinX"] = $this->scaleComputeY($Params["Min"],array("AxisID"=>$Serie["Axis"])); + $Threshold[$Key]["MaxX"] = $this->scaleComputeY($Params["Max"],array("AxisID"=>$Serie["Axis"])); + } + } + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + + $Areas = ""; $AreaID = 0; + $Areas[$AreaID][] = $this->GraphAreaX1 + $XMargin; + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } + + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $Y) + { + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } + $this->drawText($X,$Y-$Offset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); + } + + if ( $Y == VOID && isset($Areas[$AreaID]) ) + { + if($LastX == NULL) + { $Areas[$AreaID][] = $X; } + else + { $Areas[$AreaID][] = $LastX; } + + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } + $AreaID++; + } + elseif ($Y != VOID) + { + if ( !isset($Areas[$AreaID]) ) + { + $Areas[$AreaID][] = $X; + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } + } + + $Areas[$AreaID][] = $X; + $Areas[$AreaID][] = $Y; + } + + $LastX = $X; + $X = $X + $XStep; + } + $Areas[$AreaID][] = $LastX; + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; } + + /* Handle shadows in the areas */ + if ( $this->Shadow ) + { + $ShadowArea = ""; + foreach($Areas as $Key => $Points) + { + $ShadowArea[$Key] = ""; + foreach($Points as $Key2 => $Value) + { + if ( $Key2 % 2 == 0 ) + { $ShadowArea[$Key][] = $Value + $this->ShadowX; } + else + { $ShadowArea[$Key][] = $Value + $this->ShadowY; } + } + } + + foreach($ShadowArea as $Key => $Points) + $this->drawPolygonChart($Points,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); + } + + $Alpha = $ForceTransparency != NULL ? $ForceTransparency : $Alpha; + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Threshold"=>$Threshold); + + foreach($Areas as $Key => $Points) + $this->drawPolygonChart($Points,$Color); + } + else + { + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + + $Areas = ""; $AreaID = 0; + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } + $Areas[$AreaID][] = $this->GraphAreaY1 + $XMargin; + + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $X) + { + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $Serie["Data"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } + $this->drawText($X+$Offset,$Y,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("Angle"=>270,"R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align)); + } + + if ( $X == VOID && isset($Areas[$AreaID]) ) + { + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } + + if($LastY == NULL) + { $Areas[$AreaID][] = $Y; } + else + { $Areas[$AreaID][] = $LastY; } + + $AreaID++; + } + elseif ($X != VOID) + { + if ( !isset($Areas[$AreaID]) ) + { + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } + $Areas[$AreaID][] = $Y; + } + + $Areas[$AreaID][] = $X; + $Areas[$AreaID][] = $Y; + } + + $LastX = $X; $LastY = $Y; + $Y = $Y + $YStep; + } + if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; } + $Areas[$AreaID][] = $LastY; + + /* Handle shadows in the areas */ + if ( $this->Shadow ) + { + $ShadowArea = ""; + foreach($Areas as $Key => $Points) + { + $ShadowArea[$Key] = ""; + foreach($Points as $Key2 => $Value) + { + if ( $Key2 % 2 == 0 ) + { $ShadowArea[$Key][] = $Value + $this->ShadowX; } + else + { $ShadowArea[$Key][] = $Value + $this->ShadowY; } + } + } + + foreach($ShadowArea as $Key => $Points) + $this->drawPolygonChart($Points,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); + } + + $Alpha = $ForceTransparency != NULL ? $ForceTransparency : $Alpha; + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Threshold"=>$Threshold); + + foreach($Areas as $Key => $Points) + $this->drawPolygonChart($Points,$Color); + } + } + } + } + + + /* Draw a bar chart */ + function drawBarChart($Format=NULL) + { + $Floating0Serie = isset($Format["Floating0Serie"]) ? $Format["Floating0Serie"] : NULL; + $Floating0Value = isset($Format["Floating0Value"]) ? $Format["Floating0Value"] : NULL; + $Draw0Line = isset($Format["Draw0Line"]) ? $Format["Draw0Line"] : FALSE; + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOrientation = isset($Format["DisplayOrientation"]) ? $Format["DisplayOrientation"] : ORIENTATION_HORIZONTAL; + $DisplayOffset = isset($Format["DisplayOffset"]) ? $Format["DisplayOffset"] : 2; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayFont = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontName; + $DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize; + $DisplayPos = isset($Format["DisplayPos"]) ? $Format["DisplayPos"] : LABEL_POS_OUTSIDE; + $DisplayShadow = isset($Format["DisplayShadow"]) ? $Format["DisplayShadow"] : TRUE; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $AroundZero = isset($Format["AroundZero"]) ? $Format["AroundZero"] : TRUE; + $Interleave = isset($Format["Interleave"]) ? $Format["Interleave"] : .5; + $Rounded = isset($Format["Rounded"]) ? $Format["Rounded"] : FALSE; + $RoundRadius = isset($Format["RoundRadius"]) ? $Format["RoundRadius"] : 4; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; + $Gradient = isset($Format["Gradient"]) ? $Format["Gradient"] : FALSE; + $GradientMode = isset($Format["GradientMode"]) ? $Format["GradientMode"] : GRADIENT_SIMPLE; + $GradientAlpha = isset($Format["GradientAlpha"]) ? $Format["GradientAlpha"] : 20; + $GradientStartR = isset($Format["GradientStartR"]) ? $Format["GradientStartR"] : 255; + $GradientStartG = isset($Format["GradientStartG"]) ? $Format["GradientStartG"] : 255; + $GradientStartB = isset($Format["GradientStartB"]) ? $Format["GradientStartB"] : 255; + $GradientEndR = isset($Format["GradientEndR"]) ? $Format["GradientEndR"] : 0; + $GradientEndG = isset($Format["GradientEndG"]) ? $Format["GradientEndG"] : 0; + $GradientEndB = isset($Format["GradientEndB"]) ? $Format["GradientEndB"] : 0; + $TxtMargin = isset($Format["TxtMargin"]) ? $Format["TxtMargin"] : 6; + $OverrideColors = isset($Format["OverrideColors"]) ? $Format["OverrideColors"] : NULL; + $OverrideSurrounding = isset($Format["OverrideSurrounding"]) ? $Format["OverrideSurrounding"] : 30; + $InnerSurrounding = isset($Format["InnerSurrounding"]) ? $Format["InnerSurrounding"] : NULL; + $InnerBorderR = isset($Format["InnerBorderR"]) ? $Format["InnerBorderR"] : -1; + $InnerBorderG = isset($Format["InnerBorderG"]) ? $Format["InnerBorderG"] : -1; + $InnerBorderB = isset($Format["InnerBorderB"]) ? $Format["InnerBorderB"] : -1; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + if ( $OverrideColors != NULL ) + { + $OverrideColors = $this->validatePalette($OverrideColors,$OverrideSurrounding); + $this->DataSet->saveExtendedData("Palette",$OverrideColors); + } + + $RestoreShadow = $this->Shadow; + + $SeriesCount = $this->countDrawableSeries(); + $CurrentSerie = 0; + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; } + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + if ( $InnerSurrounding != NULL ) { $InnerBorderR = $R+$InnerSurrounding; $InnerBorderG = $G+$InnerSurrounding; $InnerBorderB = $B+$InnerSurrounding; } + if ( $InnerBorderR == -1 ) { $InnerColor = NULL; } else { $InnerColor = array("R"=>$InnerBorderR,"G"=>$InnerBorderG,"B"=>$InnerBorderB); } + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB); + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + if (isset($Serie["Description"])) { $SerieDescription = $Serie["Description"]; } else { $SerieDescription = $SerieName; } + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + if ( $Floating0Value != NULL ) + { $YZero = $this->scaleComputeY($Floating0Value,array("AxisID"=>$Serie["Axis"])); } + else + { $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); } + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } + + if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; + + if ( $AroundZero ) { $Y1 = $YZero; } else { $Y1 = $this->GraphAreaY2-1; } + if ( $XDivs == 0 ) { $XSize = ($this->GraphAreaX2-$this->GraphAreaX1)/($SeriesCount+$Interleave); } else { $XSize = ($XStep / ($SeriesCount+$Interleave) ); } + + $XOffset = -($XSize*$SeriesCount)/2 + $CurrentSerie * $XSize; + if ( $X + $XOffset <= $this->GraphAreaX1 ) { $XOffset = $this->GraphAreaX1 - $X + 1 ; } + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = $XOffset + $XSize / 2; + + if ( $Rounded || $BorderR != -1) { $XSpace = 1; } else { $XSpace = 0; } + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + + $ID = 0; + foreach($PosArray as $Key => $Y2) + { + if ( $Floating0Serie != NULL ) + { + if ( isset($Data["Series"][$Floating0Serie]["Data"][$Key]) ) + { $Value = $Data["Series"][$Floating0Serie]["Data"][$Key]; } + else + { $Value = 0; } + + $YZero = $this->scaleComputeY($Value,array("AxisID"=>$Serie["Axis"])); + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } + + if ( $AroundZero ) { $Y1 = $YZero; } else { $Y1 = $this->GraphAreaY2-1; } + } + + if ( $OverrideColors != NULL ) + { if ( isset($OverrideColors[$ID]) ) { $Color = array("R"=>$OverrideColors[$ID]["R"],"G"=>$OverrideColors[$ID]["G"],"B"=>$OverrideColors[$ID]["B"],"Alpha"=>$OverrideColors[$ID]["Alpha"],"BorderR"=>$OverrideColors[$ID]["BorderR"],"BorderG"=>$OverrideColors[$ID]["BorderG"],"BorderB"=>$OverrideColors[$ID]["BorderB"]); } else { $Color = $this->getRandomColor(); } } + + if ( $Y2 != VOID ) + { + $BarHeight = $Y1 - $Y2; + + if ( $Serie["Data"][$Key] == 0 ) + { + $this->drawLine($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y1,$Color); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X+$XOffset+$XSpace).",".floor($Y1-1).",".floor($X+$XOffset+$XSize-$XSpace).",".floor($Y1+1),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + else + { + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X+$XOffset+$XSpace).",".floor($Y1).",".floor($X+$XOffset+$XSize-$XSpace).",".floor($Y2),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Rounded ) + $this->drawRoundedFilledRectangle($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,$RoundRadius,$Color); + else + { + $this->drawFilledRectangle($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,$Color); + + if ( $InnerColor != NULL ) { $this->drawRectangle($X+$XOffset+$XSpace+1,min($Y1,$Y2)+1,$X+$XOffset+$XSize-$XSpace-1,max($Y1,$Y2)-1,$InnerColor); } + + if ( $Gradient ) + { + $this->Shadow = FALSE; + + if ( $GradientMode == GRADIENT_SIMPLE ) + { + if ( $Serie["Data"][$Key] >= 0 ) + $GradienColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + else + $GradienColor = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); + + $this->drawGradientArea($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,DIRECTION_VERTICAL,$GradienColor); + } + elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) + { + $GradienColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); + $GradienColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + $XSpan = floor($XSize / 3); + + $this->drawGradientArea($X+$XOffset+$XSpace,$Y1,$X+$XOffset+$XSpan-$XSpace,$Y2,DIRECTION_HORIZONTAL,$GradienColor1); + $this->drawGradientArea($X+$XOffset+$XSpan+$XSpace,$Y1,$X+$XOffset+$XSize-$XSpace,$Y2,DIRECTION_HORIZONTAL,$GradienColor2); + } + $this->Shadow = $RestoreShadow; + } + } + + if ( $Draw0Line ) + { + $Line0Color = array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20); + + if ( abs($Y1 - $Y2) > 3 ) { $Line0Width = 3; } else { $Line0Width = 1; } + if ( $Y1 - $Y2 < 0 ) { $Line0Width = -$Line0Width; } + + $this->drawFilledRectangle($X+$XOffset+$XSpace,floor($Y1),$X+$XOffset+$XSize-$XSpace,floor($Y1)-$Line0Width,$Line0Color); + $this->drawLine($X+$XOffset+$XSpace,floor($Y1),$X+$XOffset+$XSize-$XSpace,floor($Y1),$Line0Color); + } + } + + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $DisplayShadow ) { $this->Shadow = TRUE; } + + $Caption = $this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit); + $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,90,$Caption); + $TxtHeight = $TxtPos[0]["Y"] - $TxtPos[1]["Y"] + $TxtMargin; + + if ( $DisplayPos == LABEL_POS_INSIDE && abs($TxtHeight) < abs($BarHeight) ) + { + $CenterX = (($X+$XOffset+$XSize-$XSpace)-($X+$XOffset+$XSpace))/2 + $X+$XOffset+$XSpace; + $CenterY = ($Y2-$Y1)/2 + $Y1; + + $this->drawText($CenterX,$CenterY,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"Angle"=>90)); + } + else + { + if ( $Serie["Data"][$Key] >= 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; } + $this->drawText($X+$XOffset+$XSize/2,$Y2-$Offset,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align,"FontSize"=>$DisplaySize)); + } + + $this->Shadow = $RestoreShadow; + } + } + + $X = $X + $XStep; + $ID++; + } + } + else + { + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + + if ( $XDivs == 0 ) { $YStep = 0; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + + $Y = $this->GraphAreaY1 + $XMargin; + + if ( $AroundZero ) { $X1 = $YZero; } else { $X1 = $this->GraphAreaX1+1; } + if ( $XDivs == 0 ) { $YSize = ($this->GraphAreaY2-$this->GraphAreaY1)/($SeriesCount+$Interleave); } else { $YSize = ($YStep / ($SeriesCount+$Interleave) ); } + + $YOffset = -($YSize*$SeriesCount)/2 + $CurrentSerie * $YSize; + if ( $Y + $YOffset <= $this->GraphAreaY1 ) { $YOffset = $this->GraphAreaY1 - $Y + 1 ; } + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = $YOffset + $YSize / 2; + + if ( $Rounded || $BorderR != -1 ) { $YSpace = 1; } else { $YSpace = 0; } + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + + $ID = 0 ; + foreach($PosArray as $Key => $X2) + { + if ( $Floating0Serie != NULL ) + { + if ( isset($Data["Series"][$Floating0Serie]["Data"][$Key]) ) + $Value = $Data["Series"][$Floating0Serie]["Data"][$Key]; + else { $Value = 0; } + + $YZero = $this->scaleComputeY($Value,array("AxisID"=>$Serie["Axis"])); + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + if ( $AroundZero ) { $X1 = $YZero; } else { $X1 = $this->GraphAreaX1+1; } + } + + if ( $OverrideColors != NULL ) + { if ( isset($OverrideColors[$ID]) ) { $Color = array("R"=>$OverrideColors[$ID]["R"],"G"=>$OverrideColors[$ID]["G"],"B"=>$OverrideColors[$ID]["B"],"Alpha"=>$OverrideColors[$ID]["Alpha"],"BorderR"=>$OverrideColors[$ID]["BorderR"],"BorderG"=>$OverrideColors[$ID]["BorderG"],"BorderB"=>$OverrideColors[$ID]["BorderB"]); } else { $Color = $this->getRandomColor(); } } + + if ( $X2 != VOID ) + { + $BarWidth = $X2 - $X1; + + if ( $Serie["Data"][$Key] == 0 ) + { + $this->drawLine($X1,$Y+$YOffset+$YSpace,$X1,$Y+$YOffset+$YSize-$YSpace,$Color); + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X1-1).",".floor($Y+$YOffset+$YSpace).",".floor($X1+1).",".floor($Y+$YOffset+$YSize-$YSpace),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + } + else + { + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X1).",".floor($Y+$YOffset+$YSpace).",".floor($X2).",".floor($Y+$YOffset+$YSize-$YSpace),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Rounded ) + $this->drawRoundedFilledRectangle($X1+1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSize-$YSpace,$RoundRadius,$Color); + else + { + $this->drawFilledRectangle($X1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSize-$YSpace,$Color); + + if ( $InnerColor != NULL ) { $this->drawRectangle(min($X1,$X2)+1,$Y+$YOffset+$YSpace+1,max($X1,$X2)-1,$Y+$YOffset+$YSize-$YSpace-1,$InnerColor); } + + if ( $Gradient ) + { + $this->Shadow = FALSE; + + if ( $GradientMode == GRADIENT_SIMPLE ) + { + if ( $Serie["Data"][$Key] >= 0 ) + $GradienColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + else + $GradienColor = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); + + $this->drawGradientArea($X1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSize-$YSpace,DIRECTION_HORIZONTAL,$GradienColor); + } + elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) + { + $GradienColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); + $GradienColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + $YSpan = floor($YSize / 3); + + $this->drawGradientArea($X1,$Y+$YOffset+$YSpace,$X2,$Y+$YOffset+$YSpan-$YSpace,DIRECTION_VERTICAL,$GradienColor1); + $this->drawGradientArea($X1,$Y+$YOffset+$YSpan,$X2,$Y+$YOffset+$YSize-$YSpace,DIRECTION_VERTICAL,$GradienColor2); + } + $this->Shadow = $RestoreShadow; + } + } + + if ( $Draw0Line ) + { + $Line0Color = array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20); + + if ( abs($X1 - $X2) > 3 ) { $Line0Width = 3; } else { $Line0Width = 1; } + if ( $X2 - $X1 < 0 ) { $Line0Width = -$Line0Width; } + + $this->drawFilledRectangle(floor($X1),$Y+$YOffset+$YSpace,floor($X1)+$Line0Width,$Y+$YOffset+$YSize-$YSpace,$Line0Color); + $this->drawLine(floor($X1),$Y+$YOffset+$YSpace,floor($X1),$Y+$YOffset+$YSize-$YSpace,$Line0Color); + } + } + + if ( $DisplayValues && $Serie["Data"][$Key] != VOID ) + { + if ( $DisplayShadow ) { $this->Shadow = TRUE; } + + $Caption = $this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit); + $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); + $TxtWidth = $TxtPos[1]["X"] - $TxtPos[0]["X"] + $TxtMargin; + + if ( $DisplayPos == LABEL_POS_INSIDE && abs($TxtWidth) < abs($BarWidth) ) + { + $CenterX = ($X2-$X1)/2 + $X1; + $CenterY = (($Y+$YOffset+$YSize-$YSpace)-($Y+$YOffset+$YSpace))/2 + ($Y+$YOffset+$YSpace); + + $this->drawText($CenterX,$CenterY,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize)); + } + else + { + if ( $Serie["Data"][$Key] >= 0 ) { $Align = TEXT_ALIGN_MIDDLELEFT; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_MIDDLERIGHT; $Offset = -$DisplayOffset; } + $this->drawText($X2+$Offset,$Y+$YOffset+$YSize/2,$Caption,array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>$Align,"FontSize"=>$DisplaySize)); + } + + $this->Shadow = $RestoreShadow; + } + } + $Y = $Y + $YStep; + $ID++; + } + } + $CurrentSerie++; + } + } + } + + /* Draw a bar chart */ + function drawStackedBarChart($Format=NULL) + { + $DisplayValues = isset($Format["DisplayValues"]) ? $Format["DisplayValues"] : FALSE; + $DisplayOrientation = isset($Format["DisplayOrientation"]) ? $Format["DisplayOrientation"] : ORIENTATION_AUTO; + $DisplayRound = isset($Format["DisplayRound"]) ? $Format["DisplayRound"] : 0; + $DisplayColor = isset($Format["DisplayColor"]) ? $Format["DisplayColor"] : DISPLAY_MANUAL; + $DisplayFont = isset($Format["DisplayFont"]) ? $Format["DisplayFont"] : $this->FontName; + $DisplaySize = isset($Format["DisplaySize"]) ? $Format["DisplaySize"] : $this->FontSize; + $DisplayR = isset($Format["DisplayR"]) ? $Format["DisplayR"] : 0; + $DisplayG = isset($Format["DisplayG"]) ? $Format["DisplayG"] : 0; + $DisplayB = isset($Format["DisplayB"]) ? $Format["DisplayB"] : 0; + $Interleave = isset($Format["Interleave"]) ? $Format["Interleave"] : .5; + $Rounded = isset($Format["Rounded"]) ? $Format["Rounded"] : FALSE; + $RoundRadius = isset($Format["RoundRadius"]) ? $Format["RoundRadius"] : 4; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : -1; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : -1; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : -1; + $Gradient = isset($Format["Gradient"]) ? $Format["Gradient"] : FALSE; + $GradientMode = isset($Format["GradientMode"]) ? $Format["GradientMode"] : GRADIENT_SIMPLE; + $GradientAlpha = isset($Format["GradientAlpha"]) ? $Format["GradientAlpha"] : 20; + $GradientStartR = isset($Format["GradientStartR"]) ? $Format["GradientStartR"] : 255; + $GradientStartG = isset($Format["GradientStartG"]) ? $Format["GradientStartG"] : 255; + $GradientStartB = isset($Format["GradientStartB"]) ? $Format["GradientStartB"] : 255; + $GradientEndR = isset($Format["GradientEndR"]) ? $Format["GradientEndR"] : 0; + $GradientEndG = isset($Format["GradientEndG"]) ? $Format["GradientEndG"] : 0; + $GradientEndB = isset($Format["GradientEndB"]) ? $Format["GradientEndB"] : 0; + $InnerSurrounding = isset($Format["InnerSurrounding"]) ? $Format["InnerSurrounding"] : NULL; + $InnerBorderR = isset($Format["InnerBorderR"]) ? $Format["InnerBorderR"] : -1; + $InnerBorderG = isset($Format["InnerBorderG"]) ? $Format["InnerBorderG"] : -1; + $InnerBorderB = isset($Format["InnerBorderB"]) ? $Format["InnerBorderB"] : -1; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $FontFactor = isset($Format["FontFactor"]) ? $Format["FontFactor"] : 8; + + $this->LastChartLayout = CHART_LAST_LAYOUT_STACKED; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + $RestoreShadow = $this->Shadow; + + $LastX = ""; $LastY = ""; + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = 255; $DisplayG = 255; $DisplayB = 255; } + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + if ( $InnerSurrounding != NULL ) { $InnerBorderR = $R+$InnerSurrounding; $InnerBorderG = $G+$InnerSurrounding; $InnerBorderB = $B+$InnerSurrounding; } + if ( $InnerBorderR == -1 ) { $InnerColor = NULL; } else { $InnerColor = array("R"=>$InnerBorderR,"G"=>$InnerBorderG,"B"=>$InnerBorderB); } + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + if (isset($Serie["Description"])) { $SerieDescription = $Serie["Description"]; } else { $SerieDescription = $SerieName; } + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"]),TRUE); + $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + $Color = array("TransCorner"=>TRUE,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; + + $XSize = ($XStep / (1+$Interleave) ); + $XOffset = -($XSize/2); + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $Height) + { + if ( $Height != VOID && $Serie["Data"][$Key] != 0 ) + { + if ( $Serie["Data"][$Key] > 0 ) { $Pos = "+"; } else { $Pos = "-"; } + + if ( !isset($LastY[$Key] ) ) { $LastY[$Key] = ""; } + if ( !isset($LastY[$Key][$Pos] ) ) { $LastY[$Key][$Pos] = $YZero; } + + $Y1 = $LastY[$Key][$Pos]; + $Y2 = $Y1 - $Height; + + if ( ($Rounded || $BorderR != -1) && ($Pos == "+" && $Y1 != $YZero) ) { $YSpaceUp = 1; } else { $YSpaceUp = 0; } + if ( ($Rounded || $BorderR != -1) && ($Pos == "-" && $Y1 != $YZero) ) { $YSpaceDown = 1; } else { $YSpaceDown = 0; } + + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X+$XOffset).",".floor($Y1-$YSpaceUp+$YSpaceDown).",".floor($X+$XOffset+$XSize).",".floor($Y2),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Rounded ) + $this->drawRoundedFilledRectangle($X+$XOffset,$Y1-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2,$RoundRadius,$Color); + else + { + $this->drawFilledRectangle($X+$XOffset,$Y1-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2,$Color); + + if ( $InnerColor != NULL ) { $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; $this->drawRectangle(min($X+$XOffset+1,$X+$XOffset+$XSize),min($Y1-$YSpaceUp+$YSpaceDown,$Y2)+1,max($X+$XOffset+1,$X+$XOffset+$XSize)-1,max($Y1-$YSpaceUp+$YSpaceDown,$Y2)-1,$InnerColor); $this->Shadow = $RestoreShadow;} + + if ( $Gradient ) + { + $this->Shadow = FALSE; + + if ( $GradientMode == GRADIENT_SIMPLE ) + { + $GradientColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + $this->drawGradientArea($X+$XOffset,$Y1-1-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2+1,DIRECTION_VERTICAL,$GradientColor); + } + elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) + { + $GradientColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); + $GradientColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + $XSpan = floor($XSize / 3); + + $this->drawGradientArea($X+$XOffset-.5,$Y1-.5-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSpan,$Y2+.5,DIRECTION_HORIZONTAL,$GradientColor1); + $this->drawGradientArea($X+$XSpan+$XOffset-.5,$Y1-.5-$YSpaceUp+$YSpaceDown,$X+$XOffset+$XSize,$Y2+.5,DIRECTION_HORIZONTAL,$GradientColor2); + } + $this->Shadow = $RestoreShadow; + } + } + + if ( $DisplayValues ) + { + $BarHeight = abs($Y2-$Y1)-2; + $BarWidth = $XSize+($XOffset/2)-$FontFactor; + + $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); + $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); + $TxtHeight = abs($TxtPos[2]["Y"] - $TxtPos[0]["Y"]); + $TxtWidth = abs($TxtPos[1]["X"] - $TxtPos[0]["X"]); + + $XCenter = ( ($X+$XOffset+$XSize) - ($X+$XOffset) ) / 2 + $X+$XOffset; + $YCenter = ( ($Y2) - ($Y1-$YSpaceUp+$YSpaceDown) ) / 2 + $Y1-$YSpaceUp+$YSpaceDown; + + $Done = FALSE; + if ( $DisplayOrientation == ORIENTATION_HORIZONTAL || $DisplayOrientation == ORIENTATION_AUTO ) + { + if ( $TxtHeight < $BarHeight && $TxtWidth < $BarWidth ) + { + $this->drawText($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); + $Done = TRUE; + } + } + + if ( $DisplayOrientation == ORIENTATION_VERTICAL || ( $DisplayOrientation == ORIENTATION_AUTO && !$Done) ) + { + if ( $TxtHeight < $BarWidth && $TxtWidth < $BarHeight ) + $this->drawText($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Angle"=>90,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); + } + } + + $LastY[$Key][$Pos] = $Y2; + } + + $X = $X + $XStep; + } + } + else + { + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; + + $YSize = $YStep / (1+$Interleave); + $YOffset = -($YSize/2); + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + foreach($PosArray as $Key => $Width) + { + if ( $Width != VOID && $Serie["Data"][$Key] != 0 ) + { + if ( $Serie["Data"][$Key] > 0 ) { $Pos = "+"; } else { $Pos = "-"; } + + if ( !isset($LastX[$Key] ) ) { $LastX[$Key] = ""; } + if ( !isset($LastX[$Key][$Pos] ) ) { $LastX[$Key][$Pos] = $YZero; } + + $X1 = $LastX[$Key][$Pos]; + $X2 = $X1 + $Width; + + if ( ($Rounded || $BorderR != -1) && ($Pos == "+" && $X1 != $YZero) ) { $XSpaceLeft = 2; } else { $XSpaceLeft = 0; } + if ( ($Rounded || $BorderR != -1) && ($Pos == "-" && $X1 != $YZero) ) { $XSpaceRight = 2; } else { $XSpaceRight = 0; } + + if ( $RecordImageMap ) { $this->addToImageMap("RECT",floor($X1+$XSpaceLeft).",".floor($Y+$YOffset).",".floor($X2-$XSpaceRight).",".floor($Y+$YOffset+$YSize),$this->toHTMLColor($R,$G,$B),$SerieDescription,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit)); } + + if ( $Rounded ) + $this->drawRoundedFilledRectangle($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSize,$RoundRadius,$Color); + else + { + $this->drawFilledRectangle($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSize,$Color); + + if ( $InnerColor != NULL ) { $RestoreShadow = $this->Shadow; $this->Shadow = FALSE; $this->drawRectangle(min($X1+$XSpaceLeft,$X2-$XSpaceRight)+1,min($Y+$YOffset,$Y+$YOffset+$YSize)+1,max($X1+$XSpaceLeft,$X2-$XSpaceRight)-1,max($Y+$YOffset,$Y+$YOffset+$YSize)-1,$InnerColor); $this->Shadow = $RestoreShadow;} + + if ( $Gradient ) + { + $this->Shadow = FALSE; + + if ( $GradientMode == GRADIENT_SIMPLE ) + { + $GradientColor = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + $this->drawGradientArea($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSize,DIRECTION_HORIZONTAL,$GradientColor); + } + elseif ( $GradientMode == GRADIENT_EFFECT_CAN ) + { + $GradientColor1 = array("StartR"=>$GradientEndR,"StartG"=>$GradientEndG,"StartB"=>$GradientEndB,"EndR"=>$GradientStartR,"EndG"=>$GradientStartG,"EndB"=>$GradientStartB,"Alpha"=>$GradientAlpha); + $GradientColor2 = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB,"Alpha"=>$GradientAlpha); + $YSpan = floor($YSize / 3); + + $this->drawGradientArea($X1+$XSpaceLeft,$Y+$YOffset,$X2-$XSpaceRight,$Y+$YOffset+$YSpan,DIRECTION_VERTICAL,$GradientColor1); + $this->drawGradientArea($X1+$XSpaceLeft,$Y+$YOffset+$YSpan,$X2-$XSpaceRight,$Y+$YOffset+$YSize,DIRECTION_VERTICAL,$GradientColor2); + } + $this->Shadow = $RestoreShadow; + } + } + + if ( $DisplayValues ) + { + $BarWidth = abs($X2-$X1)-$FontFactor; + $BarHeight = $YSize+($YOffset/2)-$FontFactor/2; + $Caption = $this->scaleFormat(round($Serie["Data"][$Key],$DisplayRound),$Mode,$Format,$Unit); + $TxtPos = $this->getTextBox(0,0,$DisplayFont,$DisplaySize,0,$Caption); + $TxtHeight = abs($TxtPos[2]["Y"] - $TxtPos[0]["Y"]); + $TxtWidth = abs($TxtPos[1]["X"] - $TxtPos[0]["X"]); + + $XCenter = ( $X2 - $X1 ) / 2 + $X1; + $YCenter = ( ($Y+$YOffset+$YSize) - ($Y+$YOffset) ) / 2 + $Y+$YOffset; + + $Done = FALSE; + if ( $DisplayOrientation == ORIENTATION_HORIZONTAL || $DisplayOrientation == ORIENTATION_AUTO ) + { + if ( $TxtHeight < $BarHeight && $TxtWidth < $BarWidth ) + { + $this->drawText($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); + $Done = TRUE; + } + } + + if ( $DisplayOrientation == ORIENTATION_VERTICAL || ( $DisplayOrientation == ORIENTATION_AUTO && !$Done) ) + { + if ( $TxtHeight < $BarWidth && $TxtWidth < $BarHeight ) + $this->drawText($XCenter,$YCenter,$this->scaleFormat($Serie["Data"][$Key],$Mode,$Format,$Unit),array("R"=>$DisplayR,"G"=>$DisplayG,"B"=>$DisplayB,"Angle"=>90,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontSize"=>$DisplaySize,"FontName"=>$DisplayFont)); + } + } + + $LastX[$Key][$Pos] = $X2; + } + + $Y = $Y + $YStep; + } + } + } + } + } + + /* Draw a stacked area chart */ + function drawStackedAreaChart($Format=NULL) + { + $DrawLine = isset($Format["DrawLine"]) ? $Format["DrawLine"] : FALSE; + $LineSurrounding = isset($Format["LineSurrounding"]) ? $Format["LineSurrounding"] : NULL; + $LineR = isset($Format["LineR"]) ? $Format["LineR"] : VOID; + $LineG = isset($Format["LineG"]) ? $Format["LineG"] : VOID; + $LineB = isset($Format["LineB"]) ? $Format["LineB"] : VOID; + $LineAlpha = isset($Format["LineAlpha"]) ? $Format["LineAlpha"] : 100; + $DrawPlot = isset($Format["DrawPlot"]) ? $Format["DrawPlot"] : FALSE; + $PlotRadius = isset($Format["PlotRadius"]) ? $Format["PlotRadius"] : 2; + $PlotBorder = isset($Format["PlotBorder"]) ? $Format["PlotBorder"] : 1; + $PlotBorderSurrounding = isset($Format["PlotBorderSurrounding"]) ? $Format["PlotBorderSurrounding"] : NULL; + $PlotBorderR = isset($Format["PlotBorderR"]) ? $Format["PlotBorderR"] : 0; + $PlotBorderG = isset($Format["PlotBorderG"]) ? $Format["PlotBorderG"] : 0; + $PlotBorderB = isset($Format["PlotBorderB"]) ? $Format["PlotBorderB"] : 0; + $PlotBorderAlpha = isset($Format["PlotBorderAlpha"]) ? $Format["PlotBorderAlpha"] : 50; + $ForceTransparency = isset($Format["ForceTransparency"]) ? $Format["ForceTransparency"] : NULL; + + $this->LastChartLayout = CHART_LAST_LAYOUT_STACKED; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + $RestoreShadow = $this->Shadow; + $this->Shadow = FALSE; + + /* Build the offset data series */ + $OffsetData = ""; + $OverallOffset = ""; + $SerieOrder = ""; + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $SerieOrder[] = $SerieName; + + foreach($Serie["Data"] as $Key => $Value) + { + if ( $Value == VOID ) { $Value = 0; } + if ($Value >= 0) { $Sign = "+"; } else { $Sign = "-"; } + if ( !isset($OverallOffset[$Key]) || !isset($OverallOffset[$Key][$Sign]) ) { $OverallOffset[$Key][$Sign] = 0; } + + if ( $Sign == "+" ) + { $Data["Series"][$SerieName]["Data"][$Key] = $Value + $OverallOffset[$Key][$Sign]; } + else + { $Data["Series"][$SerieName]["Data"][$Key] = $Value - $OverallOffset[$Key][$Sign]; } + + $OverallOffset[$Key][$Sign] = $OverallOffset[$Key][$Sign] + abs($Value); + } + } + } + $SerieOrder = array_reverse($SerieOrder); + + $LastX = ""; $LastY = ""; + foreach($SerieOrder as $Key => $SerieName) + { + $Serie = $Data["Series"][$SerieName]; + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; + if ( $ForceTransparency != NULL ) { $Alpha = $ForceTransparency; } + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + + if ( $LineSurrounding != NULL ) + $LineColor = array("R"=>$R+$LineSurrounding,"G"=>$G+$LineSurrounding,"B"=>$B+$LineSurrounding,"Alpha"=>$Alpha); + elseif ( $LineR != VOID ) + $LineColor = array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha); + else + $LineColor = $Color; + + if ( $PlotBorderSurrounding != NULL ) + $PlotBorderColor = array("R"=>$R+$PlotBorderSurrounding,"G"=>$G+$PlotBorderSurrounding,"B"=>$B+$PlotBorderSurrounding,"Alpha"=>$PlotBorderAlpha); + else + $PlotBorderColor = array("R"=>$PlotBorderR,"G"=>$PlotBorderG,"B"=>$PlotBorderB,"Alpha"=>$PlotBorderAlpha); + + $AxisID = $Serie["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"]),TRUE); + $YZero = $this->scaleComputeY(0,array("AxisID"=>$Serie["Axis"])); + + $this->DataSet->Data["Series"][$SerieName]["XOffset"] = 0; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $YZero < $this->GraphAreaY1+1 ) { $YZero = $this->GraphAreaY1+1; } + if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; } + + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + + $Plots = ""; $Plots[] = $X; $Plots[] = $YZero; + foreach($PosArray as $Key => $Height) + { + if ( $Height != VOID ) { $Plots[] = $X; $Plots[] = $YZero-$Height; } + $X = $X + $XStep; + } + $Plots[] = $X-$XStep; $Plots[] = $YZero; + + $this->drawPolygon($Plots,$Color); + + $this->Shadow = $RestoreShadow; + if ( $DrawLine ) { for($i=2; $i<=count($Plots)-6; $i=$i+2) { $this->drawLine($Plots[$i],$Plots[$i+1],$Plots[$i+2],$Plots[$i+3],$LineColor); } } + if ( $DrawPlot ) + { + for($i=2; $i<=count($Plots)-4; $i=$i+2) + { + if ( $PlotBorder != 0 ) + { $this->drawFilledCircle($Plots[$i],$Plots[$i+1],$PlotRadius+$PlotBorder,$PlotBorderColor); } + + $this->drawFilledCircle($Plots[$i],$Plots[$i+1],$PlotRadius,$Color); + } + } + $this->Shadow = FALSE; + } + elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; } + if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; } + + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + + $Plots = ""; $Plots[] = $YZero; $Plots[] = $Y; + foreach($PosArray as $Key => $Height) + { + if ( $Height != VOID ) { $Plots[] = $YZero+$Height; $Plots[] = $Y; } + $Y = $Y + $YStep; + } + $Plots[] = $YZero; $Plots[] = $Y-$YStep; + + $this->drawPolygon($Plots,$Color); + + $this->Shadow = $RestoreShadow; + if ( $DrawLine ) { for($i=2; $i<=count($Plots)-6; $i=$i+2) { $this->drawLine($Plots[$i],$Plots[$i+1],$Plots[$i+2],$Plots[$i+3],$LineColor); } } + if ( $DrawPlot ) + { + for($i=2; $i<=count($Plots)-4; $i=$i+2) + { + if ( $PlotBorder != 0 ) + { $this->drawFilledCircle($Plots[$i],$Plots[$i+1],$PlotRadius+$PlotBorder,$PlotBorderColor); } + + $this->drawFilledCircle($Plots[$i],$Plots[$i+1],$PlotRadius,$Color); + } + } + $this->Shadow = FALSE; + } + } + } + $this->Shadow = $RestoreShadow; + } + + /* Returns a random color */ + function getRandomColor($Alpha=100) + { return(array("R"=>rand(0,255),"G"=>rand(0,255),"B"=>rand(0,255),"Alpha"=>$Alpha)); } + + /* Validate a palette */ + function validatePalette($Colors,$Surrounding=NULL) + { + $Result = ""; + + if ( !is_array($Colors) ) { return($this->getRandomColor()); } + + foreach($Colors as $Key => $Values) + { + if ( isset($Values["R"]) ) { $Result[$Key]["R"] = $Values["R"]; } else { $Result[$Key]["R"] = rand(0,255); } + if ( isset($Values["G"]) ) { $Result[$Key]["G"] = $Values["G"]; } else { $Result[$Key]["G"] = rand(0,255); } + if ( isset($Values["B"]) ) { $Result[$Key]["B"] = $Values["B"]; } else { $Result[$Key]["B"] = rand(0,255); } + if ( isset($Values["Alpha"]) ) { $Result[$Key]["Alpha"] = $Values["Alpha"]; } else { $Result[$Key]["Alpha"] = 100; } + + if ( $Surrounding != NULL ) + { + $Result[$Key]["BorderR"] = $Result[$Key]["R"] + $Surrounding; + $Result[$Key]["BorderG"] = $Result[$Key]["G"] + $Surrounding; + $Result[$Key]["BorderB"] = $Result[$Key]["B"] + $Surrounding; + } + else + { + if ( isset($Values["BorderR"]) ) { $Result[$Key]["BorderR"] = $Values["BorderR"]; } else { $Result[$Key]["BorderR"] = $Result[$Key]["R"]; } + if ( isset($Values["BorderG"]) ) { $Result[$Key]["BorderG"] = $Values["BorderG"]; } else { $Result[$Key]["BorderG"] = $Result[$Key]["G"]; } + if ( isset($Values["BorderB"]) ) { $Result[$Key]["BorderB"] = $Values["BorderB"]; } else { $Result[$Key]["BorderB"] = $Result[$Key]["B"]; } + if ( isset($Values["BorderAlpha"]) ) { $Result[$Key]["BorderAlpha"] = $Values["BorderAlpha"]; } else { $Result[$Key]["BorderAlpha"] = $Result[$Key]["Alpha"]; } + } + } + + return($Result); + } + + /* Draw the derivative chart associated to the data series */ + function drawDerivative($Format=NULL) + { + $Offset = isset($Format["Offset"]) ? $Format["Offset"] : 10; + $SerieSpacing = isset($Format["SerieSpacing"]) ? $Format["SerieSpacing"] : 3; + $DerivativeHeight = isset($Format["DerivativeHeight"]) ? $Format["DerivativeHeight"] : 4; + $ShadedSlopeBox = isset($Format["ShadedSlopeBox"]) ? $Format["ShadedSlopeBox"] : FALSE; + $DrawBackground = isset($Format["DrawBackground"]) ? $Format["DrawBackground"] : TRUE; + $BackgroundR = isset($Format["BackgroundR"]) ? $Format["BackgroundR"] : 255; + $BackgroundG = isset($Format["BackgroundG"]) ? $Format["BackgroundG"] : 255; + $BackgroundB = isset($Format["BackgroundB"]) ? $Format["BackgroundB"] : 255; + $BackgroundAlpha = isset($Format["BackgroundAlpha"]) ? $Format["BackgroundAlpha"] : 20; + $DrawBorder = isset($Format["DrawBorder"]) ? $Format["DrawBorder"] : TRUE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 0; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 0; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 0; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 100; + $Caption = isset($Format["Caption"]) ? $Format["Caption"] : TRUE; + $CaptionHeight = isset($Format["CaptionHeight"]) ? $Format["CaptionHeight"] : 10; + $CaptionWidth = isset($Format["CaptionWidth"]) ? $Format["CaptionWidth"] : 20; + $CaptionMargin = isset($Format["CaptionMargin"]) ? $Format["CaptionMargin"] : 4; + $CaptionLine = isset($Format["CaptionLine"]) ? $Format["CaptionLine"] : FALSE; + $CaptionBox = isset($Format["CaptionBox"]) ? $Format["CaptionBox"] : FALSE; + $CaptionBorderR = isset($Format["CaptionBorderR"]) ? $Format["CaptionBorderR"] : 0; + $CaptionBorderG = isset($Format["CaptionBorderG"]) ? $Format["CaptionBorderG"] : 0; + $CaptionBorderB = isset($Format["CaptionBorderB"]) ? $Format["CaptionBorderB"] : 0; + $CaptionFillR = isset($Format["CaptionFillR"]) ? $Format["CaptionFillR"] : 255; + $CaptionFillG = isset($Format["CaptionFillG"]) ? $Format["CaptionFillG"] : 255; + $CaptionFillB = isset($Format["CaptionFillB"]) ? $Format["CaptionFillB"] : 255; + $CaptionFillAlpha = isset($Format["CaptionFillAlpha"]) ? $Format["CaptionFillAlpha"] : 80; + $PositiveSlopeStartR = isset($Format["PositiveSlopeStartR"]) ? $Format["PositiveSlopeStartR"] : 184; + $PositiveSlopeStartG = isset($Format["PositiveSlopeStartG"]) ? $Format["PositiveSlopeStartG"] : 234; + $PositiveSlopeStartB = isset($Format["PositiveSlopeStartB"]) ? $Format["PositiveSlopeStartB"] : 88; + $PositiveSlopeEndR = isset($Format["PositiveSlopeStartR"]) ? $Format["PositiveSlopeStartR"] : 239; + $PositiveSlopeEndG = isset($Format["PositiveSlopeStartG"]) ? $Format["PositiveSlopeStartG"] : 31; + $PositiveSlopeEndB = isset($Format["PositiveSlopeStartB"]) ? $Format["PositiveSlopeStartB"] : 36; + $NegativeSlopeStartR = isset($Format["NegativeSlopeStartR"]) ? $Format["NegativeSlopeStartR"] : 184; + $NegativeSlopeStartG = isset($Format["NegativeSlopeStartG"]) ? $Format["NegativeSlopeStartG"] : 234; + $NegativeSlopeStartB = isset($Format["NegativeSlopeStartB"]) ? $Format["NegativeSlopeStartB"] : 88; + $NegativeSlopeEndR = isset($Format["NegativeSlopeStartR"]) ? $Format["NegativeSlopeStartR"] : 67; + $NegativeSlopeEndG = isset($Format["NegativeSlopeStartG"]) ? $Format["NegativeSlopeStartG"] : 124; + $NegativeSlopeEndB = isset($Format["NegativeSlopeStartB"]) ? $Format["NegativeSlopeStartB"] : 227; + + $Data = $this->DataSet->getData(); + + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + $YPos = $this->DataSet->Data["GraphArea"]["Y2"] + $Offset; + else + $XPos = $this->DataSet->Data["GraphArea"]["X2"] + $Offset; + + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; $Alpha = $Serie["Color"]["Alpha"]; $Ticks = $Serie["Ticks"]; $Weight = $Serie["Weight"]; + + $AxisID = $Serie["Axis"]; + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $Caption ) + { + if ( $CaptionLine ) + { + $StartX = floor($this->GraphAreaX1-$CaptionWidth+$XMargin-$CaptionMargin); + $EndX = floor($this->GraphAreaX1-$CaptionMargin+$XMargin); + + $CaptionSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); + if ( $CaptionBox ) { $this->drawFilledRectangle($StartX,$YPos,$EndX,$YPos+$CaptionHeight,array("R"=>$CaptionFillR,"G"=>$CaptionFillG,"B"=>$CaptionFillB,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB,"Alpha"=>$CaptionFillAlpha)); } + $this->drawLine($StartX+2,$YPos+($CaptionHeight/2),$EndX-2,$YPos+($CaptionHeight/2),$CaptionSettings); + } + else + $this->drawFilledRectangle($this->GraphAreaX1-$CaptionWidth+$XMargin-$CaptionMargin,$YPos,$this->GraphAreaX1-$CaptionMargin+$XMargin,$YPos+$CaptionHeight,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB)); + } + + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; + + $TopY = $YPos + ($CaptionHeight/2) - ($DerivativeHeight/2); + $BottomY = $YPos + ($CaptionHeight/2) + ($DerivativeHeight/2); + + $StartX = floor($this->GraphAreaX1+$XMargin); + $EndX = floor($this->GraphAreaX2-$XMargin); + + if ( $DrawBackground ) { $this->drawFilledRectangle($StartX-1,$TopY-1,$EndX+1,$BottomY+1,array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha)); } + if ( $DrawBorder ) { $this->drawRectangle($StartX-1,$TopY-1,$EndX+1,$BottomY+1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + + $RestoreShadow = $this->Shadow; + $this->Shadow = FALSE; + + /* Determine the Max slope index */ + $LastX = NULL; $LastY = NULL; $MinSlope = 0; $MaxSlope = 1; + foreach($PosArray as $Key => $Y) + { + if ( $Y != VOID && $LastX != NULL ) + { $Slope = ($LastY - $Y); if ( $Slope > $MaxSlope ) { $MaxSlope = $Slope; } if ( $Slope < $MinSlope ) { $MinSlope = $Slope; } } + + if ( $Y == VOID ) + { $LastX = NULL; $LastY = NULL; } + else + { $LastX = $X; $LastY = $Y; } + } + + $LastX = NULL; $LastY = NULL; $LastColor = NULL; + foreach($PosArray as $Key => $Y) + { + if ( $Y != VOID && $LastY != NULL ) + { + $Slope = ($LastY - $Y); + + if ( $Slope >= 0 ) + { + $SlopeIndex = (100 / $MaxSlope) * $Slope; + $R = (($PositiveSlopeEndR - $PositiveSlopeStartR)/100)*$SlopeIndex+$PositiveSlopeStartR; + $G = (($PositiveSlopeEndG - $PositiveSlopeStartG)/100)*$SlopeIndex+$PositiveSlopeStartG; + $B = (($PositiveSlopeEndB - $PositiveSlopeStartB)/100)*$SlopeIndex+$PositiveSlopeStartB; + } + elseif ( $Slope < 0 ) + { + $SlopeIndex = (100 / abs($MinSlope)) * abs($Slope); + $R = (($NegativeSlopeEndR - $NegativeSlopeStartR)/100)*$SlopeIndex+$NegativeSlopeStartR; + $G = (($NegativeSlopeEndG - $NegativeSlopeStartG)/100)*$SlopeIndex+$NegativeSlopeStartG; + $B = (($NegativeSlopeEndB - $NegativeSlopeStartB)/100)*$SlopeIndex+$NegativeSlopeStartB; + } + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B); + + if ( $ShadedSlopeBox && $LastColor != NULL ) // && $Slope != 0 + { + $GradientSettings = array("StartR"=>$LastColor["R"],"StartG"=>$LastColor["G"],"StartB"=>$LastColor["B"],"EndR"=>$R,"EndG"=>$G,"EndB"=>$B); + $this->drawGradientArea($LastX,$TopY,$X,$BottomY,DIRECTION_HORIZONTAL,$GradientSettings); + } + elseif ( !$ShadedSlopeBox || $LastColor == NULL ) // || $Slope == 0 + $this->drawFilledRectangle(floor($LastX),$TopY,floor($X),$BottomY,$Color); + + $LastColor = $Color; + } + + if ( $Y == VOID ) + { $LastY = NULL; } + else + { $LastX = $X; $LastY = $Y; } + + $X = $X + $XStep; + } + + $YPos = $YPos + $CaptionHeight + $SerieSpacing; + } + else + { + if ( $Caption ) + { + $StartY = floor($this->GraphAreaY1-$CaptionWidth+$XMargin-$CaptionMargin); + $EndY = floor($this->GraphAreaY1-$CaptionMargin+$XMargin); + if ( $CaptionLine ) + { + $CaptionSettings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight); + if ( $CaptionBox ) { $this->drawFilledRectangle($XPos,$StartY,$XPos+$CaptionHeight,$EndY,array("R"=>$CaptionFillR,"G"=>$CaptionFillG,"B"=>$CaptionFillB,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB,"Alpha"=>$CaptionFillAlpha)); } + $this->drawLine($XPos+($CaptionHeight/2),$StartY+2,$XPos+($CaptionHeight/2),$EndY-2,$CaptionSettings); + } + else + $this->drawFilledRectangle($XPos,$StartY,$XPos+$CaptionHeight,$EndY,array("R"=>$R,"G"=>$G,"B"=>$B,"BorderR"=>$CaptionBorderR,"BorderG"=>$CaptionBorderG,"BorderB"=>$CaptionBorderB)); + } + + + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $XStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; + + $TopX = $XPos + ($CaptionHeight/2) - ($DerivativeHeight/2); + $BottomX = $XPos + ($CaptionHeight/2) + ($DerivativeHeight/2); + + $StartY = floor($this->GraphAreaY1+$XMargin); + $EndY = floor($this->GraphAreaY2-$XMargin); + + if ( $DrawBackground ) { $this->drawFilledRectangle($TopX-1,$StartY-1,$BottomX+1,$EndY+1,array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha)); } + if ( $DrawBorder ) { $this->drawRectangle($TopX-1,$StartY-1,$BottomX+1,$EndY+1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + + $RestoreShadow = $this->Shadow; + $this->Shadow = FALSE; + + /* Determine the Max slope index */ + $LastX = NULL; $LastY = NULL; $MinSlope = 0; $MaxSlope = 1; + foreach($PosArray as $Key => $X) + { + if ( $X != VOID && $LastX != NULL ) + { $Slope = ($X - $LastX); if ( $Slope > $MaxSlope ) { $MaxSlope = $Slope; } if ( $Slope < $MinSlope ) { $MinSlope = $Slope; } } + + if ( $X == VOID ) + { $LastX = NULL; } + else + { $LastX = $X; } + } + + $LastX = NULL; $LastY = NULL; $LastColor = NULL; + foreach($PosArray as $Key => $X) + { + if ( $X != VOID && $LastX != NULL ) + { + $Slope = ($X - $LastX); + + if ( $Slope >= 0 ) + { + $SlopeIndex = (100 / $MaxSlope) * $Slope; + $R = (($PositiveSlopeEndR - $PositiveSlopeStartR)/100)*$SlopeIndex+$PositiveSlopeStartR; + $G = (($PositiveSlopeEndG - $PositiveSlopeStartG)/100)*$SlopeIndex+$PositiveSlopeStartG; + $B = (($PositiveSlopeEndB - $PositiveSlopeStartB)/100)*$SlopeIndex+$PositiveSlopeStartB; + } + elseif ( $Slope < 0 ) + { + $SlopeIndex = (100 / abs($MinSlope)) * abs($Slope); + $R = (($NegativeSlopeEndR - $NegativeSlopeStartR)/100)*$SlopeIndex+$NegativeSlopeStartR; + $G = (($NegativeSlopeEndG - $NegativeSlopeStartG)/100)*$SlopeIndex+$NegativeSlopeStartG; + $B = (($NegativeSlopeEndB - $NegativeSlopeStartB)/100)*$SlopeIndex+$NegativeSlopeStartB; + } + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B); + + if ( $ShadedSlopeBox && $LastColor != NULL ) + { + $GradientSettings = array("StartR"=>$LastColor["R"],"StartG"=>$LastColor["G"],"StartB"=>$LastColor["B"],"EndR"=>$R,"EndG"=>$G,"EndB"=>$B); + + $this->drawGradientArea($TopX,$LastY,$BottomX,$Y,DIRECTION_VERTICAL,$GradientSettings); + } + elseif ( !$ShadedSlopeBox || $LastColor == NULL ) + $this->drawFilledRectangle($TopX,floor($LastY),$BottomX,floor($Y),$Color); + + $LastColor = $Color; + } + + if ( $X == VOID ) + { $LastX = NULL; } + else + { $LastX = $X; $LastY = $Y; } + + $Y = $Y + $XStep; + } + + $XPos = $XPos + $CaptionHeight + $SerieSpacing; + } + + $this->Shadow = $RestoreShadow; + } + } + } + + /* Draw the line of best fit */ + function drawBestFit($Format="") + { + $OverrideTicks = isset($Format["Ticks"]) ? $Format["Ticks"] : NULL; + $OverrideR = isset($Format["R"]) ? $Format["R"] : VOID; + $OverrideG = isset($Format["G"]) ? $Format["G"] : VOID; + $OverrideB = isset($Format["B"]) ? $Format["B"] : VOID; + $OverrideAlpha = isset($Format["Alpha"]) ? $Format["Alpha"] : VOID; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + foreach($Data["Series"] as $SerieName => $Serie) + { + if ( $Serie["isDrawable"] == TRUE && $SerieName != $Data["Abscissa"] ) + { + if ( $OverrideR != VOID && $OverrideG != VOID && $OverrideB != VOID ) { $R = $OverrideR; $G = $OverrideG; $B = $OverrideB; } else { $R = $Serie["Color"]["R"]; $G = $Serie["Color"]["G"]; $B = $Serie["Color"]["B"]; } + if ( $OverrideTicks == NULL ) { $Ticks = $Serie["Ticks"]; } else { $Ticks = $OverrideTicks; } + if ( $OverrideAlpha == VOID ) { $Alpha = $Serie["Color"]["Alpha"]; } else { $Alpha = $OverrideAlpha; } + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks); + + $AxisID = $Serie["Axis"]; + $PosArray = $this->scaleComputeY($Serie["Data"],array("AxisID"=>$Serie["Axis"])); + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $Sxy = 0; $Sx = 0; $Sy = 0; $Sxx = 0; + foreach($PosArray as $Key => $Y) + { + if ( $Y != VOID ) + { + $Sxy = $Sxy + $X*$Y; + $Sx = $Sx + $X; + $Sy = $Sy + $Y; + $Sxx = $Sxx + $X*$X; + } + + $X = $X + $XStep; + } + $n = count($this->DataSet->stripVOID($PosArray)); //$n = count($PosArray); + $M = (($n*$Sxy)-($Sx*$Sy)) / (($n*$Sxx)-($Sx*$Sx)); + $B = (($Sy)-($M*$Sx))/($n); + + $X1 = $this->GraphAreaX1 + $XMargin; + $Y1 = $M * $X1 + $B; + $X2 = $this->GraphAreaX2 - $XMargin; + $Y2 = $M * $X2 + $B; + + if ( $Y1 < $this->GraphAreaY1 ) { $X1 = $X1 + ($this->GraphAreaY1-$Y1); $Y1 = $this->GraphAreaY1; } + if ( $Y1 > $this->GraphAreaY2 ) { $X1 = $X1 + ($Y1-$this->GraphAreaY2); $Y1 = $this->GraphAreaY2; } + if ( $Y2 < $this->GraphAreaY1 ) { $X2 = $X2 - ($this->GraphAreaY1-$Y2); $Y2 = $this->GraphAreaY1; } + if ( $Y2 > $this->GraphAreaY2 ) { $X2 = $X2 - ($Y2-$this->GraphAreaY2); $Y2 = $this->GraphAreaY2; } + + $this->drawLine($X1,$Y1,$X2,$Y2,$Color); + } + else + { + if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin; + + if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = ""; $PosArray[0] = $Value; } + $Sxy = 0; $Sx = 0; $Sy = 0; $Sxx = 0; + foreach($PosArray as $Key => $X) + { + if ( $X != VOID ) + { + $Sxy = $Sxy + $X*$Y; + $Sx = $Sx + $Y; + $Sy = $Sy + $X; + $Sxx = $Sxx + $Y*$Y; + } + + $Y = $Y + $YStep; + } + $n = count($this->DataSet->stripVOID($PosArray)); //$n = count($PosArray); + $M = (($n*$Sxy)-($Sx*$Sy)) / (($n*$Sxx)-($Sx*$Sx)); + $B = (($Sy)-($M*$Sx))/($n); + + $Y1 = $this->GraphAreaY1 + $XMargin; + $X1 = $M * $Y1 + $B; + $Y2 = $this->GraphAreaY2 - $XMargin; + $X2 = $M * $Y2 + $B; + + if ( $X1 < $this->GraphAreaX1 ) { $Y1 = $Y1 + ($this->GraphAreaX1-$X1); $X1 = $this->GraphAreaX1; } + if ( $X1 > $this->GraphAreaX2 ) { $Y1 = $Y1 + ($X1-$this->GraphAreaX2); $X1 = $this->GraphAreaX2; } + if ( $X2 < $this->GraphAreaX1 ) { $Y2 = $Y2 - ($this->GraphAreaY1-$X2); $X2 = $this->GraphAreaX1; } + if ( $X2 > $this->GraphAreaX2 ) { $Y2 = $Y2 - ($X2-$this->GraphAreaX2); $X2 = $this->GraphAreaX2; } + + $this->drawLine($X1,$Y1,$X2,$Y2,$Color); + } + } + } + } + + /* Write labels */ + function writeLabel($SeriesName,$Indexes,$Format="") + { + $OverrideTitle = isset($Format["OverrideTitle"]) ? $Format["OverrideTitle"] : NULL; + $ForceLabels = isset($Format["ForceLabels"]) ? $Format["ForceLabels"] : NULL; + $DrawPoint = isset($Format["DrawPoint"]) ? $Format["DrawPoint"] : LABEL_POINT_BOX; + $DrawVerticalLine = isset($Format["DrawVerticalLine"]) ? $Format["DrawVerticalLine"] : FALSE; + $VerticalLineR = isset($Format["VerticalLineR"]) ? $Format["VerticalLineR"] : 0; + $VerticalLineG = isset($Format["VerticalLineG"]) ? $Format["VerticalLineG"] : 0; + $VerticalLineB = isset($Format["VerticalLineB"]) ? $Format["VerticalLineB"] : 0; + $VerticalLineAlpha = isset($Format["VerticalLineAlpha"]) ? $Format["VerticalLineAlpha"] : 40; + $VerticalLineTicks = isset($Format["VerticalLineTicks"]) ? $Format["VerticalLineTicks"] : 2; + + $Data = $this->DataSet->getData(); + list($XMargin,$XDivs) = $this->scaleGetXSettings(); + + if ( !is_array($Indexes) ) { $Index = $Indexes; $Indexes = ""; $Indexes[] = $Index; } + if ( !is_array($SeriesName) ) { $SerieName = $SeriesName; $SeriesName = ""; $SeriesName[] = $SerieName; } + if ( $ForceLabels != NULL && !is_array($ForceLabels) ) { $ForceLabel = $ForceLabels; $ForceLabels = ""; $ForceLabels[] = $ForceLabel; } + + foreach ($Indexes as $Key => $Index) + { + $Series = ""; + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; } + $X = $this->GraphAreaX1 + $XMargin + $Index * $XStep; + + if ( $DrawVerticalLine ) { $this->drawLine($X,$this->GraphAreaY1+$Data["YMargin"],$X,$this->GraphAreaY2-$Data["YMargin"],array("R"=>$VerticalLineR,"G"=>$VerticalLineG,"B"=>$VerticalLineB,"Alpha"=>$VerticalLineAlpha,"Ticks"=>$VerticalLineTicks)); } + + $MinY = $this->GraphAreaY2; + foreach ($SeriesName as $iKey => $SerieName) + { + if ( isset($Data["Series"][$SerieName]["Data"][$Index]) ) + { + $AxisID = $Data["Series"][$SerieName]["Axis"]; + + if ( $OverrideTitle != NULL) + $Description = $OverrideTitle; + elseif ( count($SeriesName) == 1 ) + { + if ( isset($Data["Abscissa"]) && isset($Data["Series"][$Data["Abscissa"]]["Data"][$Index]) ) + $Description = $Data["Series"][$SerieName]["Description"]." - ".$Data["Series"][$Data["Abscissa"]]["Data"][$Index]; + else + $Description = $Data["Series"][$SerieName]["Description"]; + } + elseif ( isset($Data["Abscissa"]) && isset($Data["Series"][$Data["Abscissa"]]["Data"][$Index]) ) + $Description = $Data["Series"][$Data["Abscissa"]]["Data"][$Index]; + + $AxisMode = $Data["Axis"][$AxisID]["Display"]; + $AxisFormat = $Data["Axis"][$AxisID]["Format"]; + $AxisUnit = $Data["Axis"][$AxisID]["Unit"]; + + $Serie = ""; + $Serie["R"] = $Data["Series"][$SerieName]["Color"]["R"]; + $Serie["G"] = $Data["Series"][$SerieName]["Color"]["G"]; + $Serie["B"] = $Data["Series"][$SerieName]["Color"]["B"]; + $Serie["Alpha"] = $Data["Series"][$SerieName]["Color"]["Alpha"]; + + if ( count($SeriesName) == 1 && isset($Data["Series"][$SerieName]["XOffset"]) ) + $SerieOffset = $Data["Series"][$SerieName]["XOffset"]; + else + $SerieOffset = 0; + + $Value = $Data["Series"][$SerieName]["Data"][$Index]; + if ( $Value == VOID ) { $Value = "NaN"; } + + if ( $ForceLabels != NULL ) + $Caption = isset($ForceLabels[$Key]) ? $ForceLabels[$Key] : "Not set"; + else + $Caption = $this->scaleFormat($Value,$AxisMode,$AxisFormat,$AxisUnit); + + if ( $this->LastChartLayout == CHART_LAST_LAYOUT_STACKED ) + { + if ( $Value >=0 ) { $LookFor = "+"; } else { $LookFor = "-"; } + + $Value = 0; $Done = FALSE; + foreach($Data["Series"] as $Name => $SerieLookup) + { + if ( $SerieLookup["isDrawable"] == TRUE && $Name != $Data["Abscissa"] && !$Done ) + { + if ( isset($Data["Series"][$Name]["Data"][$Index]) && $Data["Series"][$Name]["Data"][$Index] != VOID ) + { + if ($Data["Series"][$Name]["Data"][$Index] >= 0 && $LookFor == "+" ) { $Value = $Value + $Data["Series"][$Name]["Data"][$Index]; } + if ($Data["Series"][$Name]["Data"][$Index] < 0 && $LookFor == "-" ) { $Value = $Value - $Data["Series"][$Name]["Data"][$Index]; } + if ($Name == $SerieName ) { $Done = TRUE; } + } + } + } + } + + $X = floor($this->GraphAreaX1 + $XMargin + $Index * $XStep + $SerieOffset); + $Y = floor($this->scaleComputeY($Value,array("AxisID"=>$AxisID))); + + if ($Y < $MinY) { $MinY = $Y; } + + if ( $DrawPoint == LABEL_POINT_CIRCLE ) + $this->drawFilledCircle($X,$Y,3,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + elseif ( $DrawPoint == LABEL_POINT_BOX ) + $this->drawFilledRectangle($X-2,$Y-2,$X+2,$Y+2,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + + $Series[] = array("Format"=>$Serie,"Caption"=>$Caption); + } + } + $this->drawLabelBox($X,$MinY-3,$Description,$Series,$Format); + + } + else + { + if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $XStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; } + $Y = $this->GraphAreaY1 + $XMargin + $Index * $XStep; + + if ( $DrawVerticalLine ) { $this->drawLine($this->GraphAreaX1+$Data["YMargin"],$Y,$this->GraphAreaX2-$Data["YMargin"],$Y,array("R"=>$VerticalLineR,"G"=>$VerticalLineG,"B"=>$VerticalLineB,"Alpha"=>$VerticalLineAlpha,"Ticks"=>$VerticalLineTicks)); } + + $MinX = $this->GraphAreaX2; + foreach ($SeriesName as $Key => $SerieName) + { + if ( isset($Data["Series"][$SerieName]["Data"][$Index]) ) + { + $AxisID = $Data["Series"][$SerieName]["Axis"]; + + if ( $OverrideTitle != NULL) + $Description = $OverrideTitle; + elseif ( count($SeriesName) == 1 ) + { + if ( isset($Data["Abscissa"]) && isset($Data["Series"][$Data["Abscissa"]]["Data"][$Index]) ) + $Description = $Data["Series"][$SerieName]["Description"]." - ".$Data["Series"][$Data["Abscissa"]]["Data"][$Index]; + else + $Description = $Data["Series"][$SerieName]["Description"]; + } + elseif ( isset($Data["Abscissa"]) && isset($Data["Series"][$Data["Abscissa"]]["Data"][$Index]) ) + $Description = $Data["Series"][$Data["Abscissa"]]["Data"][$Index]; + + $AxisMode = $Data["Axis"][$AxisID]["Display"]; + $AxisFormat = $Data["Axis"][$AxisID]["Format"]; + $AxisUnit = $Data["Axis"][$AxisID]["Unit"]; + + $Serie = ""; + if ( isset($Data["Extended"]["Palette"][$Index] ) ) + { + $Serie["R"] = $Data["Extended"]["Palette"][$Index]["R"]; + $Serie["G"] = $Data["Extended"]["Palette"][$Index]["G"]; + $Serie["B"] = $Data["Extended"]["Palette"][$Index]["B"]; + $Serie["Alpha"] = $Data["Extended"]["Palette"][$Index]["Alpha"]; + } + else + { + $Serie["R"] = $Data["Series"][$SerieName]["Color"]["R"]; + $Serie["G"] = $Data["Series"][$SerieName]["Color"]["G"]; + $Serie["B"] = $Data["Series"][$SerieName]["Color"]["B"]; + $Serie["Alpha"] = $Data["Series"][$SerieName]["Color"]["Alpha"]; + } + + if ( count($SeriesName) == 1 && isset($Data["Series"][$SerieName]["XOffset"]) ) + $SerieOffset = $Data["Series"][$SerieName]["XOffset"]; + else + $SerieOffset = 0; + + $Value = $Data["Series"][$SerieName]["Data"][$Index]; + if ( $ForceLabels != NULL ) + $Caption = isset($ForceLabels[$Key]) ? $ForceLabels[$Key] : "Not set"; + else + $Caption = $this->scaleFormat($Value,$AxisMode,$AxisFormat,$AxisUnit); + if ( $Value == VOID ) { $Value = "NaN"; } + + if ( $this->LastChartLayout == CHART_LAST_LAYOUT_STACKED ) + { + if ( $Value >=0 ) { $LookFor = "+"; } else { $LookFor = "-"; } + + $Value = 0; $Done = FALSE; + foreach($Data["Series"] as $Name => $SerieLookup) + { + if ( $SerieLookup["isDrawable"] == TRUE && $Name != $Data["Abscissa"] && !$Done ) + { + if ( isset($Data["Series"][$Name]["Data"][$Index]) && $Data["Series"][$Name]["Data"][$Index] != VOID ) + { + if ($Data["Series"][$Name]["Data"][$Index] >= 0 && $LookFor == "+" ) { $Value = $Value + $Data["Series"][$Name]["Data"][$Index]; } + if ($Data["Series"][$Name]["Data"][$Index] < 0 && $LookFor == "-" ) { $Value = $Value - $Data["Series"][$Name]["Data"][$Index]; } + if ($Name == $SerieName ) { $Done = TRUE; } + } + } + } + } + + $X = floor($this->scaleComputeY($Value,array("AxisID"=>$AxisID))); + $Y = floor($this->GraphAreaY1 + $XMargin + $Index * $XStep + $SerieOffset); + + if ($X < $MinX) { $MinX = $X; } + + if ( $DrawPoint == LABEL_POINT_CIRCLE ) + $this->drawFilledCircle($X,$Y,3,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + elseif ( $DrawPoint == LABEL_POINT_BOX ) + $this->drawFilledRectangle($X-2,$Y-2,$X+2,$Y+2,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + + $Series[] = array("Format"=>$Serie,"Caption"=>$Caption); + } + } + $this->drawLabelBox($MinX,$Y-3,$Description,$Series,$Format); + + } + } + } + + /* Draw a label box */ + function drawLabelBox($X,$Y,$Title,$Captions,$Format="") + { + $NoTitle = isset($Format["NoTitle"]) ? $Format["NoTitle"] : NULL; + $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 50; + $DrawSerieColor = isset($Format["DrawSerieColor"]) ? $Format["DrawSerieColor"] : TRUE; + $SerieR = isset($Format["SerieR"]) ? $Format["SerieR"] : NULL; + $SerieG = isset($Format["SerieG"]) ? $Format["SerieG"] : NULL; + $SerieB = isset($Format["SerieB"]) ? $Format["SerieB"] : NULL; + $SerieAlpha = isset($Format["SerieAlpha"]) ? $Format["SerieAlpha"] : NULL; + $SerieBoxSize = isset($Format["SerieBoxSize"]) ? $Format["SerieBoxSize"] : 6; + $SerieBoxSpacing = isset($Format["SerieBoxSpacing"]) ? $Format["SerieBoxSpacing"] : 4; + $VerticalMargin = isset($Format["VerticalMargin"]) ? $Format["VerticalMargin"] : 10; + $HorizontalMargin = isset($Format["HorizontalMargin"]) ? $Format["HorizontalMargin"] : 8; + $R = isset($Format["R"]) ? $Format["R"] : $this->FontColorR; + $G = isset($Format["G"]) ? $Format["G"] : $this->FontColorG; + $B = isset($Format["B"]) ? $Format["B"] : $this->FontColorB; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $this->FontColorA; + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->FontSize; + $TitleMode = isset($Format["TitleMode"]) ? $Format["TitleMode"] : LABEL_TITLE_NOBACKGROUND; + $TitleR = isset($Format["TitleR"]) ? $Format["TitleR"] : $R; + $TitleG = isset($Format["TitleG"]) ? $Format["TitleG"] : $G; + $TitleB = isset($Format["TitleB"]) ? $Format["TitleB"] : $B; + $TitleBackgroundR = isset($Format["TitleBackgroundR"]) ? $Format["TitleBackgroundR"] : 0; + $TitleBackgroundG = isset($Format["TitleBackgroundG"]) ? $Format["TitleBackgroundG"] : 0; + $TitleBackgroundB = isset($Format["TitleBackgroundB"]) ? $Format["TitleBackgroundB"] : 0; + $GradientStartR = isset($Format["GradientStartR"]) ? $Format["GradientStartR"] : 255; + $GradientStartG = isset($Format["GradientStartG"]) ? $Format["GradientStartG"] : 255; + $GradientStartB = isset($Format["GradientStartB"]) ? $Format["GradientStartB"] : 255; + $GradientEndR = isset($Format["GradientEndR"]) ? $Format["GradientEndR"] : 220; + $GradientEndG = isset($Format["GradientEndG"]) ? $Format["GradientEndG"] : 220; + $GradientEndB = isset($Format["GradientEndB"]) ? $Format["GradientEndB"] : 220; + + if ( !$DrawSerieColor ) { $SerieBoxSize = 0; $SerieBoxSpacing = 0; } + + $TxtPos = $this->getTextBox($X,$Y,$FontName,$FontSize,0,$Title); + $TitleWidth = ($TxtPos[1]["X"] - $TxtPos[0]["X"])+$VerticalMargin*2; + $TitleHeight = ($TxtPos[0]["Y"] - $TxtPos[2]["Y"]); + + if ( $NoTitle ) { $TitleWidth = 0; $TitleHeight = 0; } + + $CaptionWidth = 0; $CaptionHeight = -$HorizontalMargin; + foreach($Captions as $Key =>$Caption) + { + $TxtPos = $this->getTextBox($X,$Y,$FontName,$FontSize,0,$Caption["Caption"]); + $CaptionWidth = max($CaptionWidth,($TxtPos[1]["X"] - $TxtPos[0]["X"])+$VerticalMargin*2); + $CaptionHeight = $CaptionHeight + max(($TxtPos[0]["Y"] - $TxtPos[2]["Y"]),($SerieBoxSize+2)) + $HorizontalMargin; + } + + if ( $CaptionHeight <= 5 ) { $CaptionHeight = $CaptionHeight + $HorizontalMargin/2; } + + if ( $DrawSerieColor ) { $CaptionWidth = $CaptionWidth + $SerieBoxSize + $SerieBoxSpacing; } + + $BoxWidth = max($BoxWidth,$TitleWidth,$CaptionWidth); + + $XMin = $X - 5 - floor(($BoxWidth-10) / 2); + $XMax = $X + 5 + floor(($BoxWidth-10) / 2); + + $RestoreShadow = $this->Shadow; + if ( $this->Shadow == TRUE ) + { + $this->Shadow = FALSE; + + $Poly = ""; + $Poly[] = $X+$this->ShadowX; $Poly[] = $Y+$this->ShadowX; + $Poly[] = $X+5+$this->ShadowX; $Poly[] = $Y-5+$this->ShadowX; + $Poly[] = $XMax+$this->ShadowX; $Poly[] = $Y-5+$this->ShadowX; + + if ( $NoTitle ) + { + $Poly[] = $XMax+$this->ShadowX; $Poly[] = $Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2+$this->ShadowX; + $Poly[] = $XMin+$this->ShadowX; $Poly[] = $Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2+$this->ShadowX; + } + else + { + $Poly[] = $XMax+$this->ShadowX; $Poly[] = $Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3+$this->ShadowX; + $Poly[] = $XMin+$this->ShadowX; $Poly[] = $Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3+$this->ShadowX; + } + + $Poly[] = $XMin+$this->ShadowX; $Poly[] = $Y-5+$this->ShadowX; + $Poly[] = $X-5+$this->ShadowX; $Poly[] = $Y-5+$this->ShadowX; + $this->drawPolygon($Poly,array("R"=>$this->ShadowR,"G"=>$this->ShadowG,"B"=>$this->ShadowB,"Alpha"=>$this->Shadowa)); + } + + /* Draw the background */ + $GradientSettings = array("StartR"=>$GradientStartR,"StartG"=>$GradientStartG,"StartB"=>$GradientStartB,"EndR"=>$GradientEndR,"EndG"=>$GradientEndG,"EndB"=>$GradientEndB); + if ( $NoTitle ) + $this->drawGradientArea($XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMax,$Y-6,DIRECTION_VERTICAL,$GradientSettings); + else + $this->drawGradientArea($XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMax,$Y-6,DIRECTION_VERTICAL,$GradientSettings); + $Poly = ""; $Poly[] = $X; $Poly[] = $Y; $Poly[] = $X-5; $Poly[] = $Y-5; $Poly[] = $X+5; $Poly[] = $Y-5; + $this->drawPolygon($Poly,array("R"=>$GradientEndR,"G"=>$GradientEndG,"B"=>$GradientEndB,"NoBorder"=>TRUE)); + + /* Outer border */ + $OuterBorderColor = $this->allocateColor($this->Picture,100,100,100,100); + imageline($this->Picture,$XMin,$Y-5,$X-5,$Y-5,$OuterBorderColor); + imageline($this->Picture,$X,$Y,$X-5,$Y-5,$OuterBorderColor); + imageline($this->Picture,$X,$Y,$X+5,$Y-5,$OuterBorderColor); + imageline($this->Picture,$X+5,$Y-5,$XMax,$Y-5,$OuterBorderColor); + if ( $NoTitle ) + { + imageline($this->Picture,$XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMin,$Y-5,$OuterBorderColor); + imageline($this->Picture,$XMax,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMax,$Y-5,$OuterBorderColor); + imageline($this->Picture,$XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMax,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$OuterBorderColor); + } + else + { + imageline($this->Picture,$XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMin,$Y-5,$OuterBorderColor); + imageline($this->Picture,$XMax,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMax,$Y-5,$OuterBorderColor); + imageline($this->Picture,$XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMax,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$OuterBorderColor); + } + + /* Inner border */ + $InnerBorderColor = $this->allocateColor($this->Picture,255,255,255,100); + imageline($this->Picture,$XMin+1,$Y-6,$X-5,$Y-6,$InnerBorderColor); + imageline($this->Picture,$X,$Y-1,$X-5,$Y-6,$InnerBorderColor); + imageline($this->Picture,$X,$Y-1,$X+5,$Y-6,$InnerBorderColor); + imageline($this->Picture,$X+5,$Y-6,$XMax-1,$Y-6,$InnerBorderColor); + if ( $NoTitle ) + { + imageline($this->Picture,$XMin+1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMin+1,$Y-6,$InnerBorderColor); + imageline($this->Picture,$XMax-1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMax-1,$Y-6,$InnerBorderColor); + imageline($this->Picture,$XMin+1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$XMax-1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*2,$InnerBorderColor); + } + else + { + imageline($this->Picture,$XMin+1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMin+1,$Y-6,$InnerBorderColor); + imageline($this->Picture,$XMax-1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMax-1,$Y-6,$InnerBorderColor); + imageline($this->Picture,$XMin+1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMax-1,$Y-4-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$InnerBorderColor); + } + + /* Draw the separator line */ + if ( $TitleMode == LABEL_TITLE_NOBACKGROUND && !$NoTitle ) + { + $YPos = $Y-7-$CaptionHeight-$HorizontalMargin-$HorizontalMargin/2; + $XMargin = $VerticalMargin / 2; + $this->drawLine($XMin+$XMargin,$YPos+1,$XMax-$XMargin,$YPos+1,array("R"=>$GradientEndR,"G"=>$GradientEndG,"B"=>$GradientEndB)); + $this->drawLine($XMin+$XMargin,$YPos,$XMax-$XMargin,$YPos,array("R"=>$GradientStartR,"G"=>$GradientStartG,"B"=>$GradientStartB)); + } + elseif ( $TitleMode == LABEL_TITLE_BACKGROUND ) + { + $this->drawFilledRectangle($XMin,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin*3,$XMax,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin+$HorizontalMargin/2,array("R"=>$TitleBackgroundR,"G"=>$TitleBackgroundG,"B"=>$TitleBackgroundB)); + imageline($this->Picture,$XMin+1,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin+$HorizontalMargin/2+1,$XMax-1,$Y-5-$TitleHeight-$CaptionHeight-$HorizontalMargin+$HorizontalMargin/2+1,$InnerBorderColor); + } + + /* Write the description */ + if ( !$NoTitle ) + $this->drawText($XMin+$VerticalMargin,$Y-7-$CaptionHeight-$HorizontalMargin*2,$Title,array("Align"=>TEXT_ALIGN_BOTTOMLEFT,"R"=>$TitleR,"G"=>$TitleG,"B"=>$TitleB)); + + /* Write the value */ + $YPos = $Y-5-$HorizontalMargin; $XPos = $XMin+$VerticalMargin+$SerieBoxSize+$SerieBoxSpacing; + foreach($Captions as $Key => $Caption) + { + $CaptionTxt = $Caption["Caption"]; + $TxtPos = $this->getTextBox($XPos,$YPos,$FontName,$FontSize,0,$CaptionTxt); + $CaptionHeight = ($TxtPos[0]["Y"] - $TxtPos[2]["Y"]); + + /* Write the serie color if needed */ + if ( $DrawSerieColor ) + { + $BoxSettings = array("R"=>$Caption["Format"]["R"],"G"=>$Caption["Format"]["G"],"B"=>$Caption["Format"]["B"],"Alpha"=>$Caption["Format"]["Alpha"],"BorderR"=>0,"BorderG"=>0,"BorderB"=>0); + $this->drawFilledRectangle($XMin+$VerticalMargin,$YPos-$SerieBoxSize,$XMin+$VerticalMargin+$SerieBoxSize,$YPos,$BoxSettings); + } + + $this->drawText($XPos,$YPos,$CaptionTxt,array("Align"=>TEXT_ALIGN_BOTTOMLEFT)); + + $YPos = $YPos - $CaptionHeight - $HorizontalMargin; + } + + $this->Shadow = $RestoreShadow; + } + + /* Draw a basic shape */ + function drawShape($X,$Y,$Shape,$PlotSize,$PlotBorder,$BorderSize,$R,$G,$B,$Alpha,$BorderR,$BorderG,$BorderB,$BorderAlpha) + { + if ( $Shape == SERIE_SHAPE_FILLEDCIRCLE ) + { + if ( $PlotBorder ) { $this->drawFilledCircle($X,$Y,$PlotSize+$BorderSize,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } + $this->drawFilledCircle($X,$Y,$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + } + elseif ( $Shape == SERIE_SHAPE_FILLEDSQUARE ) + { + if ( $PlotBorder ) { $this->drawFilledRectangle($X-$PlotSize-$BorderSize,$Y-$PlotSize-$BorderSize,$X+$PlotSize+$BorderSize,$Y+$PlotSize+$BorderSize,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); } + $this->drawFilledRectangle($X-$PlotSize,$Y-$PlotSize,$X+$PlotSize,$Y+$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + } + elseif ( $Shape == SERIE_SHAPE_FILLEDTRIANGLE ) + { + if ( $PlotBorder ) + { + $Pos = ""; $Pos[]=$X; $Pos[]=$Y-$PlotSize-$BorderSize; $Pos[]=$X-$PlotSize-$BorderSize; $Pos[]=$Y+$PlotSize+$BorderSize; $Pos[]=$X+$PlotSize+$BorderSize; $Pos[]=$Y+$PlotSize+$BorderSize; + $this->drawPolygon($Pos,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); + } + + $Pos = ""; $Pos[]=$X; $Pos[]=$Y-$PlotSize; $Pos[]=$X-$PlotSize; $Pos[]=$Y+$PlotSize; $Pos[]=$X+$PlotSize; $Pos[]=$Y+$PlotSize; + $this->drawPolygon($Pos,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + } + elseif ( $Shape == SERIE_SHAPE_TRIANGLE ) + { + $this->drawLine($X,$Y-$PlotSize,$X-$PlotSize,$Y+$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + $this->drawLine($X-$PlotSize,$Y+$PlotSize,$X+$PlotSize,$Y+$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + $this->drawLine($X+$PlotSize,$Y+$PlotSize,$X,$Y-$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + } + elseif ( $Shape == SERIE_SHAPE_SQUARE ) + $this->drawRectangle($X-$PlotSize,$Y-$PlotSize,$X+$PlotSize,$Y+$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + elseif ( $Shape == SERIE_SHAPE_CIRCLE ) + $this->drawCircle($X,$Y,$PlotSize,$PlotSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + elseif ( $Shape == SERIE_SHAPE_DIAMOND ) + { + $Pos = ""; $Pos[]=$X-$PlotSize; $Pos[]=$Y; $Pos[]=$X; $Pos[]=$Y-$PlotSize; $Pos[]=$X+$PlotSize; $Pos[]=$Y; $Pos[]=$X; $Pos[]=$Y+$PlotSize; + $this->drawPolygon($Pos,array("NoFill"=>TRUE,"BorderR"=>$R,"BorderG"=>$G,"BorderB"=>$B,"BorderAlpha"=>$Alpha)); + } + elseif ( $Shape == SERIE_SHAPE_FILLEDDIAMOND ) + { + if ( $PlotBorder ) + { + $Pos = ""; $Pos[]=$X-$PlotSize-$BorderSize; $Pos[]=$Y; $Pos[]=$X; $Pos[]=$Y-$PlotSize-$BorderSize; $Pos[]=$X+$PlotSize+$BorderSize; $Pos[]=$Y; $Pos[]=$X; $Pos[]=$Y+$PlotSize+$BorderSize; + $this->drawPolygon($Pos,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha)); + } + + $Pos = ""; $Pos[]=$X-$PlotSize; $Pos[]=$Y; $Pos[]=$X; $Pos[]=$Y-$PlotSize; $Pos[]=$X+$PlotSize; $Pos[]=$Y; $Pos[]=$X; $Pos[]=$Y+$PlotSize; + $this->drawPolygon($Pos,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + } + } + + function drawPolygonChart($Points,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $NoFill = isset($Format["NoFill"]) ? $Format["NoFill"] : FALSE; + $NoBorder = isset($Format["NoBorder"]) ? $Format["NoBorder"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha / 2; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $Threshold = isset($Format["Threshold"]) ? $Format["Threshold"] : NULL; + + if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; } + + $RestoreShadow = $this->Shadow; + $this->Shadow = FALSE; + + $AllIntegers = TRUE; + for($i=0;$i<=count($Points)-2;$i=$i+2) + { if ( $this->getFirstDecimal($Points[$i+1]) != 0 ) { $AllIntegers = FALSE; } } + + /* Convert polygon to segments */ + $Segments = ""; + for($i=2;$i<=count($Points)-2;$i=$i+2) + { $Segments[] = array("X1"=>$Points[$i-2],"Y1"=>$Points[$i-1],"X2"=>$Points[$i],"Y2"=>$Points[$i+1]); } + $Segments[] = array("X1"=>$Points[$i-2],"Y1"=>$Points[$i-1],"X2"=>$Points[0],"Y2"=>$Points[1]); + + /* Simplify straight lines */ + $Result = ""; $inHorizon = FALSE; $LastX = VOID; + foreach($Segments as $Key => $Pos) + { + if ( $Pos["Y1"] != $Pos["Y2"] ) + { + if ( $inHorizon ) { $inHorizon = FALSE; $Result[] = array("X1"=>$LastX,"Y1"=>$Pos["Y1"],"X2"=>$Pos["X1"],"Y2"=>$Pos["Y1"]); } + + $Result[] = array("X1"=>$Pos["X1"],"Y1"=>$Pos["Y1"],"X2"=>$Pos["X2"],"Y2"=>$Pos["Y2"]); + } + else { if ( !$inHorizon ) { $inHorizon = TRUE; $LastX = $Pos["X1"];} } + } + $Segments = $Result; + + /* Do we have something to draw */ + if ( $Segments == "" ) { return(0); } + + /* For segments debugging purpose */ + //foreach($Segments as $Key => $Pos) + // echo $Pos["X1"].",".$Pos["Y1"].",".$Pos["X2"].",".$Pos["Y2"]."\r\n"; + + /* Find out the min & max Y boundaries */ + $MinY = OUT_OF_SIGHT; $MaxY = OUT_OF_SIGHT; + foreach($Segments as $Key => $Coords) + { + if ( $MinY == OUT_OF_SIGHT || $MinY > min($Coords["Y1"],$Coords["Y2"]) ) { $MinY = min($Coords["Y1"],$Coords["Y2"]); } + if ( $MaxY == OUT_OF_SIGHT || $MaxY < max($Coords["Y1"],$Coords["Y2"]) ) { $MaxY = max($Coords["Y1"],$Coords["Y2"]); } + } + + if ( $AllIntegers ) { $YStep = 1; } else { $YStep = .5; } + + $MinY = floor($MinY); $MaxY = floor($MaxY); + + /* Scan each Y lines */ + $DefaultColor = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + $DebugLine = 0; $DebugColor = $this->allocateColor($this->Picture,255,0,0,100); + + $MinY = floor($MinY); $MaxY = floor($MaxY); $YStep = 1; + + if ( !$NoFill ) + { + //if ( $DebugLine ) { $MinY = $DebugLine; $MaxY = $DebugLine; } + for($Y=$MinY;$Y<=$MaxY;$Y=$Y+$YStep) + { + $Intersections = ""; $LastSlope = NULL; $RestoreLast = "-"; + foreach($Segments as $Key => $Coords) + { + $X1 = $Coords["X1"]; $X2 = $Coords["X2"]; $Y1 = $Coords["Y1"]; $Y2 = $Coords["Y2"]; + + if ( min($Y1,$Y2) <= $Y && max($Y1,$Y2) >= $Y ) + { + if ( $Y1 == $Y2 ) + { $X = $X1; } + else + { $X = $X1 + ( ($Y-$Y1)*$X2 - ($Y-$Y1)*$X1 ) / ($Y2-$Y1); } + + $X = floor($X); + + if ( $X2 == $X1 ) + { $Slope = "!"; } + else + { + $SlopeC = ($Y2 - $Y1) / ($X2 - $X1); + if( $SlopeC == 0 ) + { $Slope = "="; } + elseif( $SlopeC > 0 ) + { $Slope = "+"; } + elseif ( $SlopeC < 0 ) + { $Slope = "-"; } + } + + if ( !is_array($Intersections) ) + { $Intersections[] = $X; } + elseif( !in_array($X,$Intersections) ) + { $Intersections[] = $X; } + elseif( in_array($X,$Intersections) ) + { + if ($Y == $DebugLine) { echo $Slope."/".$LastSlope."(".$X.") "; } + + if ( $Slope == "=" && $LastSlope == "-" ) { $Intersections[] = $X; } + if ( $Slope != $LastSlope && $LastSlope != "!" && $LastSlope != "=" ) { $Intersections[] = $X; } + if ( $Slope != $LastSlope && $LastSlope == "!" && $Slope == "+" ) { $Intersections[] = $X; } + } + + if ( is_array($Intersections) && in_array($X,$Intersections) && $LastSlope == "=" && ($Slope == "-" )) { $Intersections[] = $X; } + + $LastSlope = $Slope; + } + } + if ( $RestoreLast != "-" ) { $Intersections[] = $RestoreLast; echo "@".$Y."\r\n"; } + + if ( is_array($Intersections) ) + { + sort($Intersections); + + if ($Y == $DebugLine) { print_r($Intersections); } + + /* Remove NULL plots */ + $Result = ""; + for($i=0;$i<=count($Intersections)-1;$i=$i+2) + { + if ( isset($Intersections[$i+1]) ) + { if ( $Intersections[$i] != $Intersections[$i+1] ) { $Result[] = $Intersections[$i]; $Result[] = $Intersections[$i+1]; } } + } + + if ( is_array($Result) ) + { + $Intersections = $Result; + + $LastX = OUT_OF_SIGHT; + foreach($Intersections as $Key => $X) + { + if ( $LastX == OUT_OF_SIGHT ) + $LastX = $X; + elseif ( $LastX != OUT_OF_SIGHT ) + { + if ( $this->getFirstDecimal($LastX) > 1 ) { $LastX++; } + + $Color = $DefaultColor; + if ( $Threshold != NULL ) + { + foreach($Threshold as $Key => $Parameters) + { + if ( $Y <= $Parameters["MinX"] && $Y >= $Parameters["MaxX"]) + { + if ( isset($Parameters["R"]) ) { $R = $Parameters["R"]; } else { $R = 0; } + if ( isset($Parameters["G"]) ) { $G = $Parameters["G"]; } else { $G = 0; } + if ( isset($Parameters["B"]) ) { $B = $Parameters["B"]; } else { $B = 0; } + if ( isset($Parameters["Alpha"]) ) { $Alpha = $Parameters["Alpha"]; } else { $Alpha = 100; } + $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha); + } + } + } + + imageline($this->Picture,$LastX,$Y,$X,$Y,$Color); + + if ( $Y == $DebugLine) { imageline($this->Picture,$LastX,$Y,$X,$Y,$DebugColor); } + + $LastX = OUT_OF_SIGHT; + } + } + } + } + } + } + + /* Draw the polygon border, if required */ + if ( !$NoBorder) + { + foreach($Segments as $Key => $Coords) + $this->drawLine($Coords["X1"],$Coords["Y1"],$Coords["X2"],$Coords["Y2"],array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Threshold"=>$Threshold)); + } + + $this->Shadow = $RestoreShadow; + } + + /* Return the abscissa margin */ + function getAbscissaMargin($Data) + { + foreach($Data["Axis"] as $AxisID => $Values) { if ( $Values["Identity"] == AXIS_X ) { return($Values["Margin"]); } } + return(0); + } + + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pImage.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pImage.class.php new file mode 100644 index 0000000..27b262e --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pImage.class.php @@ -0,0 +1,472 @@ +TransparentBackground = $TransparentBackground; + + if ( $DataSet != NULL ) { $this->DataSet = $DataSet; } + + $this->XSize = $XSize; + $this->YSize = $YSize; + $this->Picture = imagecreatetruecolor($XSize,$YSize); + + if ( $this->TransparentBackground ) + { + imagealphablending($this->Picture,FALSE); + imagefilledrectangle($this->Picture, 0,0,$XSize, $YSize, imagecolorallocatealpha($this->Picture, 255, 255, 255, 127)); + imagealphablending($this->Picture,TRUE); + imagesavealpha($this->Picture,true); + } + else + { + $C_White = $this->AllocateColor($this->Picture,255,255,255); + imagefilledrectangle($this->Picture,0,0,$XSize,$YSize,$C_White); + } + } + + /* Enable / Disable and set shadow properties */ + function setShadow($Enabled=TRUE,$Format="") + { + $X = isset($Format["X"]) ? $Format["X"] : 2; + $Y = isset($Format["Y"]) ? $Format["Y"] : 2; + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 10; + + $this->Shadow = $Enabled; + $this->ShadowX = $X; + $this->ShadowY = $Y; + $this->ShadowR = $R; + $this->ShadowG = $G; + $this->ShadowB = $B; + $this->Shadowa = $Alpha; + } + + /* Set the graph area position */ + function setGraphArea($X1,$Y1,$X2,$Y2) + { + if ( $X2 < $X1 || $X1 == $X2 || $Y2 < $Y1 || $Y1 == $Y2 ) { return(-1); } + + $this->GraphAreaX1 = $X1; $this->DataSet->Data["GraphArea"]["X1"] = $X1; + $this->GraphAreaY1 = $Y1; $this->DataSet->Data["GraphArea"]["Y1"] = $Y1; + $this->GraphAreaX2 = $X2; $this->DataSet->Data["GraphArea"]["X2"] = $X2; + $this->GraphAreaY2 = $Y2; $this->DataSet->Data["GraphArea"]["Y2"] = $Y2; + } + + /* Return the width of the picture */ + function getWidth() + { return($this->XSize); } + + /* Return the heigth of the picture */ + function getHeight() + { return($this->YSize); } + + /* Render the picture to a file */ + function render($FileName) + { + if ( $this->TransparentBackground ) { imagealphablending($this->Picture,false); imagesavealpha($this->Picture,true); } + imagepng($this->Picture,$FileName); + } + + /* Render the picture to a web browser stream */ + function stroke($BrowserExpire=FALSE) + { + if ( $this->TransparentBackground ) { imagealphablending($this->Picture,false); imagesavealpha($this->Picture,true); } + + if ( $BrowserExpire ) + { + header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); + header("Cache-Control: no-cache"); + header("Pragma: no-cache"); + } + + header('Content-type: image/png'); + imagepng($this->Picture); + } + + /* Automatic output method based on the calling interface */ + function autoOutput($FileName="output.png") + { + if (php_sapi_name() == "cli") + $this->Render($FileName); + else + $this->Stroke(); + } + + /* Return the length between two points */ + function getLength($X1,$Y1,$X2,$Y2) + { return(sqrt(pow(max($X1,$X2)-min($X1,$X2),2)+pow(max($Y1,$Y2)-min($Y1,$Y2),2))); } + + /* Return the orientation of a line */ + function getAngle($X1,$Y1,$X2,$Y2) + { + $Opposite = $Y2 - $Y1; $Adjacent = $X2 - $X1;$Angle = rad2deg(atan2($Opposite,$Adjacent)); + if ($Angle > 0) { return($Angle); } else { return(360-abs($Angle)); } + } + + /* Return the surrounding box of text area */ + function getTextBox_deprecated($X,$Y,$FontName,$FontSize,$Angle,$Text) + { + $Size = imagettfbbox($FontSize,$Angle,$FontName,$Text); + $Width = $this->getLength($Size[0],$Size[1],$Size[2],$Size[3])+1; + $Height = $this->getLength($Size[2],$Size[3],$Size[4],$Size[5])+1; + + $RealPos[0]["X"] = $X; $RealPos[0]["Y"] = $Y; + $RealPos[1]["X"] = cos((360-$Angle)*PI/180)*$Width + $RealPos[0]["X"]; $RealPos[1]["Y"] = sin((360-$Angle)*PI/180)*$Width + $RealPos[0]["Y"]; + $RealPos[2]["X"] = cos((270-$Angle)*PI/180)*$Height + $RealPos[1]["X"]; $RealPos[2]["Y"] = sin((270-$Angle)*PI/180)*$Height + $RealPos[1]["Y"]; + $RealPos[3]["X"] = cos((180-$Angle)*PI/180)*$Width + $RealPos[2]["X"]; $RealPos[3]["Y"] = sin((180-$Angle)*PI/180)*$Width + $RealPos[2]["Y"]; + + $RealPos[TEXT_ALIGN_BOTTOMLEFT]["X"] = $RealPos[0]["X"]; $RealPos[TEXT_ALIGN_BOTTOMLEFT]["Y"] = $RealPos[0]["Y"]; + $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["X"] = $RealPos[1]["X"]; $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["Y"] = $RealPos[1]["Y"]; + + return($RealPos); + } + + /* Return the surrounding box of text area */ + function getTextBox($X,$Y,$FontName,$FontSize,$Angle,$Text) + { + $coords = imagettfbbox($FontSize, 0, $FontName, $Text); + + $a = deg2rad($Angle); $ca = cos($a); $sa = sin($a); $RealPos = array(); + for($i = 0; $i < 7; $i += 2) + { + $RealPos[$i/2]["X"] = $X + round($coords[$i] * $ca + $coords[$i+1] * $sa); + $RealPos[$i/2]["Y"] = $Y + round($coords[$i+1] * $ca - $coords[$i] * $sa); + } + + $RealPos[TEXT_ALIGN_BOTTOMLEFT]["X"] = $RealPos[0]["X"]; $RealPos[TEXT_ALIGN_BOTTOMLEFT]["Y"] = $RealPos[0]["Y"]; + $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["X"] = $RealPos[1]["X"]; $RealPos[TEXT_ALIGN_BOTTOMRIGHT]["Y"] = $RealPos[1]["Y"]; + $RealPos[TEXT_ALIGN_TOPLEFT]["X"] = $RealPos[3]["X"]; $RealPos[TEXT_ALIGN_TOPLEFT]["Y"] = $RealPos[3]["Y"]; + $RealPos[TEXT_ALIGN_TOPRIGHT]["X"] = $RealPos[2]["X"]; $RealPos[TEXT_ALIGN_TOPRIGHT]["Y"] = $RealPos[2]["Y"]; + $RealPos[TEXT_ALIGN_BOTTOMMIDDLE]["X"] = ($RealPos[1]["X"]-$RealPos[0]["X"])/2+$RealPos[0]["X"]; $RealPos[TEXT_ALIGN_BOTTOMMIDDLE]["Y"] = ($RealPos[0]["Y"]-$RealPos[1]["Y"])/2+$RealPos[1]["Y"]; + $RealPos[TEXT_ALIGN_TOPMIDDLE]["X"] = ($RealPos[2]["X"]-$RealPos[3]["X"])/2+$RealPos[3]["X"]; $RealPos[TEXT_ALIGN_TOPMIDDLE]["Y"] = ($RealPos[3]["Y"]-$RealPos[2]["Y"])/2+$RealPos[2]["Y"]; + $RealPos[TEXT_ALIGN_MIDDLELEFT]["X"] = ($RealPos[0]["X"]-$RealPos[3]["X"])/2+$RealPos[3]["X"]; $RealPos[TEXT_ALIGN_MIDDLELEFT]["Y"] = ($RealPos[0]["Y"]-$RealPos[3]["Y"])/2+$RealPos[3]["Y"]; + $RealPos[TEXT_ALIGN_MIDDLERIGHT]["X"] = ($RealPos[1]["X"]-$RealPos[2]["X"])/2+$RealPos[2]["X"]; $RealPos[TEXT_ALIGN_MIDDLERIGHT]["Y"] = ($RealPos[1]["Y"]-$RealPos[2]["Y"])/2+$RealPos[2]["Y"]; + $RealPos[TEXT_ALIGN_MIDDLEMIDDLE]["X"] = ($RealPos[1]["X"]-$RealPos[3]["X"])/2+$RealPos[3]["X"]; $RealPos[TEXT_ALIGN_MIDDLEMIDDLE]["Y"] = ($RealPos[0]["Y"]-$RealPos[2]["Y"])/2+$RealPos[2]["Y"]; + + return($RealPos); + } + + /* Set current font properties */ + function setFontProperties($Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : -1; + $G = isset($Format["G"]) ? $Format["G"] : -1; + $B = isset($Format["B"]) ? $Format["B"] : -1; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : NULL; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : NULL; + + if ( $R != -1) { $this->FontColorR = $R; } + if ( $G != -1) { $this->FontColorG = $G; } + if ( $B != -1) { $this->FontColorB = $B; } + if ( $Alpha != NULL) { $this->FontColorA = $Alpha; } + + if ( $FontName != NULL ) + $this->FontName = $FontName; + + if ( $FontSize != NULL ) + $this->FontSize = $FontSize; + } + + /* Returns the 1st decimal values (used to correct AA bugs) */ + function getFirstDecimal($Value) + { + $Values = preg_split("/\./",$Value); + if ( isset($Values[1]) ) { return(substr($Values[1],0,1)); } else { return(0); } + } + + /* Attach a dataset to your pChart Object */ + function setDataSet(&$DataSet) + { $this->DataSet = $DataSet; } + + /* Print attached dataset contents to STDOUT */ + function printDataSet() + { print_r($this->DataSet); } + + /* Initialise the image map methods */ + function initialiseImageMap($Name="pChart",$StorageMode=IMAGE_MAP_STORAGE_SESSION,$UniqueID="imageMap",$StorageFolder="tmp") + { + $this->ImageMapIndex = $Name; + $this->ImageMapStorageMode = $StorageMode; + + if ($StorageMode == IMAGE_MAP_STORAGE_SESSION) + { + if(!isset($_SESSION)) { session_start(); } + $_SESSION[$this->ImageMapIndex] = NULL; + } + elseif($StorageMode == IMAGE_MAP_STORAGE_FILE) + { + $this->ImageMapFileName = $UniqueID; + $this->ImageMapStorageFolder = $StorageFolder; + + if (file_exists($StorageFolder."/".$UniqueID.".map")) { unlink($StorageFolder."/".$UniqueID.".map"); } + } + } + + /* Add a zone to the image map */ + function addToImageMap($Type,$Plots,$Color=NULL,$Title=NULL,$Message=NULL,$HTMLEncode=FALSE) + { + if ( $this->ImageMapStorageMode == NULL ) { $this->initialiseImageMap(); } + + /* Encode the characters in the imagemap in HTML standards */ + $Title = str_replace("€","\u20AC",$Title); + $Title = htmlentities($Title,ENT_QUOTES,"ISO-8859-15"); + if ( $HTMLEncode ) + { + $Message = htmlentities($Message,ENT_QUOTES,"ISO-8859-15"); + $Message = str_replace("<","<",$Message); + $Message = str_replace(">",">",$Message); + } + + if ( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION ) + { + if(!isset($_SESSION)) { $this->initialiseImageMap(); } + $_SESSION[$this->ImageMapIndex][] = array($Type,$Plots,$Color,$Title,$Message); + } + elseif($this->ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE) + { + $Handle = fopen($this->ImageMapStorageFolder."/".$this->ImageMapFileName.".map", 'a'); + fwrite($Handle, $Type.IMAGE_MAP_DELIMITER.$Plots.IMAGE_MAP_DELIMITER.$Color.IMAGE_MAP_DELIMITER.$Title.IMAGE_MAP_DELIMITER.$Message."\r\n"); + fclose($Handle); + } + } + + /* Remove VOID values from an imagemap custom values array */ + function removeVOIDFromArray($SerieName, $Values) + { + if ( !isset($this->DataSet->Data["Series"][$SerieName]) ) { return(-1); } + + $Result = ""; + foreach($this->DataSet->Data["Series"][$SerieName]["Data"] as $Key => $Value) + { if ( $Value != VOID && isset($Values[$Key]) ) { $Result[] = $Values[$Key]; } } + return($Result); + } + + /* Replace the title of one image map serie */ + function replaceImageMapTitle($OldTitle, $NewTitle) + { + if ( $this->ImageMapStorageMode == NULL ) { return(-1); } + + if ( is_array($NewTitle) ) { $NewTitle = $this->removeVOIDFromArray($OldTitle, $NewTitle); } + + if ( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION ) + { + if(!isset($_SESSION)) { return(-1); } + if ( is_array($NewTitle) ) + { $ID = 0; foreach($_SESSION[$this->ImageMapIndex] as $Key => $Settings) { if ( $Settings[3] == $OldTitle && isset($NewTitle[$ID])) { $_SESSION[$this->ImageMapIndex][$Key][3] = $NewTitle[$ID]; $ID++; } } } + else + { foreach($_SESSION[$this->ImageMapIndex] as $Key => $Settings) { if ( $Settings[3] == $OldTitle ) { $_SESSION[$this->ImageMapIndex][$Key][3] = $NewTitle; } } } + } + elseif( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE ) + { + $TempArray = ""; + $Handle = @fopen($this->ImageMapStorageFolder."/".$this->ImageMapFileName.".map", "r"); + if ($Handle) + { + while (($Buffer = fgets($Handle, 4096)) !== false) + { + $Fields = split(IMAGE_MAP_DELIMITER,str_replace(array(chr(10),chr(13)),"",$Buffer)); + $TempArray[] = array($Fields[0],$Fields[1],$Fields[2],$Fields[3],$Fields[4]); + } + fclose($Handle); + + if ( is_array($NewTitle) ) + { $ID = 0; foreach($TempArray as $Key => $Settings) { if ( $Settings[3] == $OldTitle && isset($NewTitle[$ID]) ) { $TempArray[$Key][3] = $NewTitle[$ID]; $ID++; } } } + else + { foreach($TempArray as $Key => $Settings) { if ( $Settings[3] == $OldTitle ) { $TempArray[$Key][3] = $NewTitle; } } } + + $Handle = fopen($this->ImageMapStorageFolder."/".$this->ImageMapFileName.".map", 'w'); + foreach($TempArray as $Key => $Settings) + { fwrite($Handle, $Settings[0].IMAGE_MAP_DELIMITER.$Settings[1].IMAGE_MAP_DELIMITER.$Settings[2].IMAGE_MAP_DELIMITER.$Settings[3].IMAGE_MAP_DELIMITER.$Settings[4]."\r\n"); } + fclose($Handle); + } + } + } + + /* Replace the values of the image map contents */ + function replaceImageMapValues($Title, $Values) + { + if ( $this->ImageMapStorageMode == NULL ) { return(-1); } + + $Values = $this->removeVOIDFromArray($Title, $Values); + $ID = 0; + if ( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION ) + { + if(!isset($_SESSION)) { return(-1); } + foreach($_SESSION[$this->ImageMapIndex] as $Key => $Settings) { if ( $Settings[3] == $Title ) { if ( isset($Values[$ID]) ) { $_SESSION[$this->ImageMapIndex][$Key][4] = $Values[$ID]; } $ID++; } } + } + elseif( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE ) + { + $TempArray = ""; + $Handle = @fopen($this->ImageMapStorageFolder."/".$this->ImageMapFileName.".map", "r"); + if ($Handle) + { + while (($Buffer = fgets($Handle, 4096)) !== false) + { + $Fields = split(IMAGE_MAP_DELIMITER,str_replace(array(chr(10),chr(13)),"",$Buffer)); + $TempArray[] = array($Fields[0],$Fields[1],$Fields[2],$Fields[3],$Fields[4]); + } + fclose($Handle); + + foreach($TempArray as $Key => $Settings) { if ( $Settings[3] == $Title ) { if ( isset($Values[$ID]) ) { $TempArray[$Key][4] = $Values[$ID]; } $ID++; } } + + $Handle = fopen($this->ImageMapStorageFolder."/".$this->ImageMapFileName.".map", 'w'); + foreach($TempArray as $Key => $Settings) + { fwrite($Handle, $Settings[0].IMAGE_MAP_DELIMITER.$Settings[1].IMAGE_MAP_DELIMITER.$Settings[2].IMAGE_MAP_DELIMITER.$Settings[3].IMAGE_MAP_DELIMITER.$Settings[4]."\r\n"); } + fclose($Handle); + } + } + } + + /* Dump the image map */ + function dumpImageMap($Name="pChart",$StorageMode=IMAGE_MAP_STORAGE_SESSION,$UniqueID="imageMap",$StorageFolder="tmp") + { + $this->ImageMapIndex = $Name; + $this->ImageMapStorageMode = $StorageMode; + + if ( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_SESSION ) + { + if(!isset($_SESSION)) { session_start(); } + if ( $_SESSION[$Name] != NULL ) + { + foreach($_SESSION[$Name] as $Key => $Params) + { echo $Params[0].IMAGE_MAP_DELIMITER.$Params[1].IMAGE_MAP_DELIMITER.$Params[2].IMAGE_MAP_DELIMITER.$Params[3].IMAGE_MAP_DELIMITER.$Params[4]."\r\n"; } + } + } + elseif( $this->ImageMapStorageMode == IMAGE_MAP_STORAGE_FILE ) + { + if (file_exists($StorageFolder."/".$UniqueID.".map")) + { + $Handle = @fopen($StorageFolder."/".$UniqueID.".map", "r"); + if ($Handle) { while (($Buffer = fgets($Handle, 4096)) !== false) { echo $Buffer; } } + fclose($Handle); + + if ( $this->ImageMapAutoDelete ) { unlink($StorageFolder."/".$UniqueID.".map"); } + } + } + + /* When the image map is returned to the client, the script ends */ + exit(); + } + + /* Return the HTML converted color from the RGB composite values */ + function toHTMLColor($R,$G,$B) + { + $R=intval($R); $G=intval($G); $B=intval($B); + $R=dechex($R<0?0:($R>255?255:$R)); $G=dechex($G<0?0:($G>255?255:$G));$B=dechex($B<0?0:($B>255?255:$B)); + $Color="#".(strlen($R) < 2?'0':'').$R; $Color.=(strlen($G) < 2?'0':'').$G; $Color.= (strlen($B) < 2?'0':'').$B; + return($Color); + } + + /* Reverse an array of points */ + function reversePlots($Plots) + { + $Result = ""; + for($i=count($Plots)-2;$i>=0;$i=$i-2) { $Result[] = $Plots[$i]; $Result[] = $Plots[$i+1]; } + return($Result); + } + + /* Mirror Effect */ + function drawAreaMirror($X,$Y,$Width,$Height,$Format="") + { + $StartAlpha = isset($Format["StartAlpha"]) ? $Format["StartAlpha"] : 80; + $EndAlpha = isset($Format["EndAlpha"]) ? $Format["EndAlpha"] : 0; + + $AlphaStep = ($StartAlpha-$EndAlpha)/$Height; + + $Picture = imagecreatetruecolor($this->XSize,$this->YSize); + imagecopy($Picture,$this->Picture,0,0,0,0,$this->XSize,$this->YSize); + + for($i=1;$i<=$Height;$i++) + { + if ( $Y+($i-1) < $this->YSize && $Y-$i > 0 ) { imagecopymerge($Picture,$this->Picture,$X,$Y+($i-1),$X,$Y-$i,$Width,1,$StartAlpha-$AlphaStep*$i); } + } + + imagecopy($this->Picture,$Picture,0,0,0,0,$this->XSize,$this->YSize); + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pIndicator.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pIndicator.class.php new file mode 100644 index 0000000..1e4c7c3 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pIndicator.class.php @@ -0,0 +1,241 @@ +pChartObject = $pChartObject; + } + + /* Draw an indicator */ + function draw($X,$Y,$Width,$Height,$Format="") + { + $Values = isset($Format["Values"]) ? $Format["Values"] : VOID; + $IndicatorSections = isset($Format["IndicatorSections"]) ? $Format["IndicatorSections"] : NULL; + $ValueDisplay = isset($Format["ValueDisplay"]) ? $Format["ValueDisplay"] : INDICATOR_VALUE_BUBBLE; + $SectionsMargin = isset($Format["SectionsMargin"]) ? $Format["SectionsMargin"] : 4; + $DrawLeftHead = isset($Format["DrawLeftHead"]) ? $Format["DrawLeftHead"] : TRUE; + $DrawRightHead = isset($Format["DrawRightHead"]) ? $Format["DrawRightHead"] : TRUE; + $HeadSize = isset($Format["HeadSize"]) ? $Format["HeadSize"] : floor($Height/4); + $TextPadding = isset($Format["TextPadding"]) ? $Format["TextPadding"] : 4; + $CaptionLayout = isset($Format["CaptionLayout"]) ? $Format["CaptionLayout"] : INDICATOR_CAPTION_EXTENDED; + $CaptionPosition = isset($Format["CaptionPosition"]) ? $Format["CaptionPosition"] : INDICATOR_CAPTION_INSIDE; + $CaptionColorFactor = isset($Format["CaptionColorFactor"]) ? $Format["CaptionColorFactor"] : NULL; + $CaptionR = isset($Format["CaptionR"]) ? $Format["CaptionR"] : 255; + $CaptionG = isset($Format["CaptionG"]) ? $Format["CaptionG"] : 255; + $CaptionB = isset($Format["CaptionB"]) ? $Format["CaptionB"] : 255; + $CaptionAlpha = isset($Format["CaptionAlpha"]) ? $Format["CaptionAlpha"] : 100; + $SubCaptionColorFactor = isset($Format["SubCaptionColorFactor"]) ? $Format["SubCaptionColorFactor"] : NULL; + $SubCaptionR = isset($Format["SubCaptionR"]) ? $Format["SubCaptionR"] : 50; + $SubCaptionG = isset($Format["SubCaptionG"]) ? $Format["SubCaptionG"] : 50; + $SubCaptionB = isset($Format["SubCaptionB"]) ? $Format["SubCaptionB"] : 50; + $SubCaptionAlpha = isset($Format["SubCaptionAlpha"]) ? $Format["SubCaptionAlpha"] : 100; + $ValueFontName = isset($Format["ValueFontName"]) ? $Format["ValueFontName"] : $this->pChartObject->FontName; + $ValueFontSize = isset($Format["ValueFontSize"]) ? $Format["ValueFontSize"] : $this->pChartObject->FontSize; + $CaptionFontName = isset($Format["CaptionFontName"]) ? $Format["CaptionFontName"] : $this->pChartObject->FontName; + $CaptionFontSize = isset($Format["CaptionFontSize"]) ? $Format["CaptionFontSize"] : $this->pChartObject->FontSize; + $Unit = isset($Format["Unit"]) ? $Format["Unit"] : ""; + + /* Convert the Values to display to an array if needed */ + if ( !is_array($Values) ) { $Value = $Values; $Values = ""; $Values[] = $Value; } + + /* No section, let's die */ + if ( $IndicatorSections == NULL ) { return(0); } + + /* Determine indicator visual configuration */ + $OverallMin = $IndicatorSections[0]["End"]; $OverallMax = $IndicatorSections[0]["Start"]; + foreach ($IndicatorSections as $Key => $Settings) + { + if ( $Settings["End"] > $OverallMax ) { $OverallMax = $Settings["End"]; } + if ( $Settings["Start"] < $OverallMin ) { $OverallMin = $Settings["Start"]; } + } + $RealWidth = $Width - (count($IndicatorSections)-1)*$SectionsMargin; + $XScale = $RealWidth / ($OverallMax-$OverallMin); + + $X1 = $X; $ValuesPos = ""; + foreach ($IndicatorSections as $Key => $Settings) + { + $Color = array("R"=>$Settings["R"],"G"=>$Settings["G"],"B"=>$Settings["B"]); + $Caption = $Settings["Caption"]; + $SubCaption = $Settings["Start"]." - ".$Settings["End"]; + + $X2 = $X1 + ($Settings["End"] - $Settings["Start"]) * $XScale; + + if ( $Key == 0 && $DrawLeftHead ) + { + $Poly = ""; $Poly[] = $X1-1; $Poly[] = $Y; $Poly[] = $X1-1; $Poly[] = $Y+$Height; $Poly[] = $X1-1-$HeadSize; $Poly[] = $Y+($Height/2); + $this->pChartObject->drawPolygon($Poly,$Color); + $this->pChartObject->drawLine($X1-2,$Y,$X1-2-$HeadSize,$Y+($Height/2),$Color); + $this->pChartObject->drawLine($X1-2,$Y+$Height,$X1-2-$HeadSize,$Y+($Height/2),$Color); + } + + /* Determine the position of the breaks */ + $Break = ""; + foreach($Values as $iKey => $Value) + { + if ( $Value >= $Settings["Start"] && $Value <= $Settings["End"] ) + { + $XBreak = $X1 + ($Value - $Settings["Start"]) * $XScale; + $ValuesPos[$Value] = $XBreak; + $Break[] = floor($XBreak); + } + } + + if ( $ValueDisplay == INDICATOR_VALUE_LABEL ) + { + if ( $Break == "" ) + $this->pChartObject->drawFilledRectangle($X1,$Y,$X2,$Y+$Height,$Color); + else + { + sort($Break); + $Poly = ""; $Poly[] = $X1; $Poly[] = $Y; $LastPointWritten = FALSE; + foreach($Break as $iKey => $Value) + { + if ( $Value-5 >= $X1 ) + { $Poly[] = $Value-5; $Poly[] = $Y; } + elseif ($X1 - ($Value-5) > 0 ) + { + $Offset = $X1 - ($Value-5); + $Poly = ""; $Poly[] = $X1; $Poly[] = $Y + $Offset; + } + + $Poly[] = $Value; $Poly[] = $Y+5; + + if ( $Value+5 <= $X2 ) + { $Poly[] = $Value+5; $Poly[] = $Y; } + elseif (($Value+5) > $X2 ) + { + $Offset = ($Value+5) - $X2; + $Poly[] = $X2; $Poly[] = $Y + $Offset; + $LastPointWritten = TRUE; + } + + } + if ( !$LastPointWritten ) { $Poly[] = $X2; $Poly[] = $Y; } + $Poly[] = $X2; $Poly[] = $Y+$Height; + $Poly[] = $X1; $Poly[] = $Y+$Height; + + $this->pChartObject->drawPolygon($Poly,$Color); + } + } + else + $this->pChartObject->drawFilledRectangle($X1,$Y,$X2,$Y+$Height,$Color); + + if ( $Key == count($IndicatorSections)-1 && $DrawRightHead ) + { + $Poly = ""; $Poly[] = $X2+1; $Poly[] = $Y; $Poly[] = $X2+1; $Poly[] = $Y+$Height; $Poly[] = $X2+1+$HeadSize; $Poly[] = $Y+($Height/2); + $this->pChartObject->drawPolygon($Poly,$Color); + $this->pChartObject->drawLine($X2+1,$Y,$X2+1+$HeadSize,$Y+($Height/2),$Color); + $this->pChartObject->drawLine($X2+1,$Y+$Height,$X2+1+$HeadSize,$Y+($Height/2),$Color); + } + + if ( $CaptionPosition == INDICATOR_CAPTION_INSIDE ) + { + $TxtPos = $this->pChartObject->getTextBox($X1,$Y+$Height+$TextPadding,$CaptionFontName,$CaptionFontSize,0,$Caption); + $YOffset = ($TxtPos[0]["Y"] - $TxtPos[2]["Y"]) + $TextPadding; + + if ( $CaptionLayout == INDICATOR_CAPTION_EXTENDED ) + { + $TxtPos = $this->pChartObject->getTextBox($X1,$Y+$Height+$TextPadding,$CaptionFontName,$CaptionFontSize,0,$SubCaption); + $YOffset = $YOffset + ($TxtPos[0]["Y"] - $TxtPos[2]["Y"]) + $TextPadding*2; + } + + $XOffset = $TextPadding; + } + else + { $YOffset = 0; $XOffset = 0; } + + if ( $CaptionColorFactor == NULL ) + { $CaptionColor = array("Align"=>TEXT_ALIGN_TOPLEFT,"FontName"=>$CaptionFontName,"FontSize"=>$CaptionFontSize,"R"=>$CaptionR,"G"=>$CaptionG,"B"=>$CaptionB,"Alpha"=>$CaptionAlpha); } + else + { $CaptionColor = array("Align"=>TEXT_ALIGN_TOPLEFT,"FontName"=>$CaptionFontName,"FontSize"=>$CaptionFontSize,"R"=>$Settings["R"]+$CaptionColorFactor,"G"=>$Settings["G"]+$CaptionColorFactor,"B"=>$Settings["B"]+$CaptionColorFactor); } + + if ( $SubCaptionColorFactor == NULL ) + $SubCaptionColor = array("Align"=>TEXT_ALIGN_TOPLEFT,"FontName"=>$CaptionFontName,"FontSize"=>$CaptionFontSize,"R"=>$SubCaptionR,"G"=>$SubCaptionG,"B"=>$SubCaptionB,"Alpha"=>$SubCaptionAlpha); + else + $SubCaptionColor = array("Align"=>TEXT_ALIGN_TOPLEFT,"FontName"=>$CaptionFontName,"FontSize"=>$CaptionFontSize,"R"=>$Settings["R"]+$SubCaptionColorFactor,"G"=>$Settings["G"]+$SubCaptionColorFactor,"B"=>$Settings["B"]+$SubCaptionColorFactor); + + $RestoreShadow = $this->pChartObject->Shadow; + $this->pChartObject->Shadow = FALSE; + + if ( $CaptionLayout == INDICATOR_CAPTION_DEFAULT ) + $this->pChartObject->drawText($X1,$Y+$Height+$TextPadding,$Caption,$CaptionColor); + elseif ( $CaptionLayout == INDICATOR_CAPTION_EXTENDED ) + { + $TxtPos = $this->pChartObject->getTextBox($X1,$Y+$Height+$TextPadding,$CaptionFontName,$CaptionFontSize,0,$Caption); + $CaptionHeight = $TxtPos[0]["Y"] - $TxtPos[2]["Y"]; + + $this->pChartObject->drawText($X1+$XOffset,$Y+$Height-$YOffset+$TextPadding,$Caption,$CaptionColor); + $this->pChartObject->drawText($X1+$XOffset,$Y+$Height-$YOffset+$CaptionHeight+$TextPadding*2,$SubCaption,$SubCaptionColor); + } + + $this->pChartObject->Shadow = $RestoreShadow; + + $X1 = $X2 + $SectionsMargin; + } + + $RestoreShadow = $this->pChartObject->Shadow; + $this->pChartObject->Shadow = FALSE; + + foreach($Values as $Key => $Value) + { + if ( $Value >= $OverallMin && $Value <= $OverallMax ) + { + foreach ($IndicatorSections as $Key => $Settings) + { + if ( $Value >= $Settings["Start"] && $Value <= $Settings["End"] ) + { + $X1 = $ValuesPos[$Value]; //$X + $Key*$SectionsMargin + ($Value - $OverallMin) * $XScale; + + if ( $ValueDisplay == INDICATOR_VALUE_BUBBLE ) + { + $TxtPos = $this->pChartObject->getTextBox($X1,$Y,$ValueFontName,$ValueFontSize,0,$Value.$Unit); + $Radius = floor(($TxtPos[1]["X"] - $TxtPos[0]["X"] + $TextPadding*4)/2); + + $this->pChartObject->drawFilledCircle($X1,$Y,$Radius+4,array("R"=>$Settings["R"]+20,"G"=>$Settings["G"]+20,"B"=>$Settings["B"]+20)); + $this->pChartObject->drawFilledCircle($X1,$Y,$Radius,array("R"=>255,"G"=>255,"B"=>255)); + + $TextSettings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontName"=>$ValueFontName,"FontSize"=>$ValueFontSize); + $this->pChartObject->drawText($X1-1,$Y-1,$Value.$Unit,$TextSettings); + } + elseif( $ValueDisplay == INDICATOR_VALUE_LABEL ) + { + $Caption = ""; + $Caption[] = array("Format"=>array("R"=>$Settings["R"],"G"=>$Settings["G"],"B"=>$Settings["B"],"Alpha"=>100),"Caption"=>$Value.$Unit); + $this->pChartObject->drawLabelBox(floor($X1),floor($Y)+2,"Value - ".$Settings["Caption"],$Caption); + } + } + $X1 = $X2 + $SectionsMargin; + } + } + } + $this->pChartObject->Shadow = $RestoreShadow; + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pPie.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pPie.class.php new file mode 100644 index 0000000..06db3cf --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pPie.class.php @@ -0,0 +1,1500 @@ +pChartObject = $Object; + + /* Cache the pData object reference */ + $this->pDataObject = $pDataObject; + } + + /* Draw a pie chart */ + function draw2DPie($X,$Y,$Format="") + { + $Radius = isset($Format["Radius"]) ? $Format["Radius"] : 60; + $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; + $DataGapAngle = isset($Format["DataGapAngle"]) ? $Format["DataGapAngle"] : 0; + $DataGapRadius = isset($Format["DataGapRadius"]) ? $Format["DataGapRadius"] : 0; + $SecondPass = isset($Format["SecondPass"]) ? $Format["SecondPass"] : TRUE; + $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; + $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; + $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; + $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; + $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; + $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; + $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; + $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; + $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; + $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : NULL; + $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_OUTSIDE; + $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 15; + $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; + $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; + $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; + $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; + $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + /* Data Processing */ + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + /* Do we have an abscissa serie defined? */ + if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } + + /* Try to find the data serie */ + $DataSerie = ""; + foreach ($Data["Series"] as $SerieName => $SerieData) + { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } + + /* Do we have data to compute? */ + if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } + + /* Remove unused data */ + list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); + + /* Compute the pie sum */ + $SerieSum = $this->pDataObject->getSum($DataSerie); + + /* Do we have data to draw? */ + if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } + + /* Dump the real number of data to draw */ + $Values = ""; + foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) + { if ($Value != 0) { $Values[] = $Value; } } + + /* Compute the wasted angular space between series */ + if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; } + + /* Compute the scale */ + $ScaleFactor = (360 - $WastedAngular) / $SerieSum; + + $RestoreShadow = $this->pChartObject->Shadow; + if ( $this->pChartObject->Shadow ) + { + $this->pChartObject->Shadow = FALSE; + + $ShadowFormat = $Format; $ShadowFormat["Shadow"] = TRUE; + $this->draw2DPie($X+$this->pChartObject->ShadowX,$Y+$this->pChartObject->ShadowY,$ShadowFormat); + } + + /* Draw the polygon pie elements */ + $Step = 360 / (2 * PI * $Radius); + $Offset = 0; $ID = 0; + foreach($Values as $Key => $Value) + { + if ( $Shadow ) + $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); + else + { + if ( !isset($Palette[$ID]["R"]) ) { $Color = $this->pChartObject->getRandomColor(); $Palette[$ID] = $Color; $this->pDataObject->savePalette($ID,$Color); } + $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); + } + + if ( !$SecondPass && !$Shadow ) + { + if ( !$Border ) + $Settings["Surrounding"] = 10; + else + { $Settings["BorderR"] = $BorderR; $Settings["BorderG"] = $BorderG; $Settings["BorderB"] = $BorderB; } + } + + $Plots = ""; + $EndAngle = $Offset+($Value*$ScaleFactor); if ( $EndAngle > 360 ) { $EndAngle = 360; } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + if ($DataGapAngle == 0) + { $X0 = $X; $Y0 = $Y; } + else + { + $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; + $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius + $Y; + } + + $Plots[] = $X0; $Plots[] = $Y0; + + + for($i=$Offset;$i<=$EndAngle;$i=$i+$Step) + { + $Xc = cos(($i-90)*PI/180) * $Radius + $X; + $Yc = sin(($i-90)*PI/180) * $Radius + $Y; + + if ( $SecondPass && ( $i<90 )) { $Yc++; } + if ( $SecondPass && ( $i>180 && $i<270 )) { $Xc++; } + if ( $SecondPass && ( $i>=270 )) { $Xc++; $Yc++; } + + $Plots[] = $Xc; $Plots[] = $Yc; + } + + $this->pChartObject->drawPolygon($Plots,$Settings); + if ( $RecordImageMap && !$Shadow ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Plots),$this->pChartObject->toHTMLColor($Palette[$ID]["R"],$Palette[$ID]["G"],$Palette[$ID]["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][$Key],$Value); } + + if ( $DrawLabels && !$Shadow && !$SecondPass ) + { + if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) + { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} + else + { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius + $Y; + + $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; + + if ( $LabelStacked ) + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,TRUE,$X,$Y,$Radius); + else + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,FALSE); + } + + $Offset = $i + $DataGapAngle; $ID++; + } + + /* Second pass to smooth the angles */ + if ( $SecondPass ) + { + $Step = 360 / (2 * PI * $Radius); + $Offset = 0; $ID = 0; + foreach($Values as $Key => $Value) + { + $FirstPoint = TRUE; + if ( $Shadow ) + $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); + else + { + if ( $Border ) + $Settings = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB); + else + $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); + } + + $EndAngle = $Offset+($Value*$ScaleFactor); if ( $EndAngle > 360 ) { $EndAngle = 360; } + + if ($DataGapAngle == 0) + { $X0 = $X; $Y0 = $Y; } + else + { + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; + $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius + $Y; + } + $Plots[] = $X0; $Plots[] = $Y0; + + for($i=$Offset;$i<=$EndAngle;$i=$i+$Step) + { + $Xc = cos(($i-90)*PI/180) * $Radius + $X; + $Yc = sin(($i-90)*PI/180) * $Radius + $Y; + + if ( $FirstPoint ) { $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); } { $FirstPoint = FALSE; } + + $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); + } + $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); + + if ( $DrawLabels && !$Shadow ) + { + if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) + { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} + else + { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius + $Y; + + $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; + + if ( $LabelStacked ) + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,TRUE,$X,$Y,$Radius); + else + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,FALSE); + } + + $Offset = $i + $DataGapAngle; $ID++; + } + } + + if ( $WriteValues != NULL && !$Shadow ) + { + $Step = 360 / (2 * PI * $Radius); + $Offset = 0; $ID = count($Values)-1; + $Settings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"R"=>$ValueR,"G"=>$ValueG,"B"=>$ValueB,"Alpha"=>$ValueAlpha); + foreach($Values as $Key => $Value) + { + $EndAngle = ($Value*$ScaleFactor) + $Offset; if ( $EndAngle > 360 ) { $EndAngle = 0; } + $Angle = ($EndAngle - $Offset)/2 + $Offset; + + if ( $ValuePosition == PIE_VALUE_OUTSIDE ) + { + $Xc = cos(($Angle-90)*PI/180) * ($Radius+$ValuePadding) + $X; + $Yc = sin(($Angle-90)*PI/180) * ($Radius+$ValuePadding) + $Y; + } + else + { + $Xc = cos(($Angle-90)*PI/180) * ($Radius)/2 + $X; + $Yc = sin(($Angle-90)*PI/180) * ($Radius)/2 + $Y; + } + + if ( $WriteValues == PIE_VALUE_PERCENTAGE ) + $Display = round(( 100 / $SerieSum ) * $Value,$Precision)."%"; + elseif ( $WriteValues == PIE_VALUE_NATURAL ) + $Display = $Value.$ValueSuffix; + + $this->pChartObject->drawText($Xc,$Yc,$Display,$Settings); + + $Offset = $EndAngle + $DataGapAngle; $ID--; + } + } + + if ( $DrawLabels && $LabelStacked ) { $this->writeShiftedLabels(); } + + $this->pChartObject->Shadow = $RestoreShadow; + + return(PIE_RENDERED); + } + + /* Draw a 3D pie chart */ + function draw3DPie($X,$Y,$Format="") + { + /* Rendering layout */ + $Radius = isset($Format["Radius"]) ? $Format["Radius"] : 80; + $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; + $SkewFactor = isset($Format["SkewFactor"]) ? $Format["SkewFactor"] : .5; + $SliceHeight = isset($Format["SliceHeight"]) ? $Format["SliceHeight"] : 20; + $DataGapAngle = isset($Format["DataGapAngle"]) ? $Format["DataGapAngle"] : 0; + $DataGapRadius = isset($Format["DataGapRadius"]) ? $Format["DataGapRadius"] : 0; + $SecondPass = isset($Format["SecondPass"]) ? $Format["SecondPass"] : TRUE; + $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; + $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; + $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; + $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; + $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; + $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; + $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; + $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; + $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; + $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : NULL; //PIE_VALUE_PERCENTAGE + $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_INSIDE; + $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 15; + $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; + $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; + $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; + $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; + $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + /* Error correction for overlaying rounded corners */ + if ( $SkewFactor < .5 ) { $SkewFactor = .5; } + + /* Data Processing */ + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + /* Do we have an abscissa serie defined? */ + if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } + + /* Try to find the data serie */ + $DataSerie = ""; + foreach ($Data["Series"] as $SerieName => $SerieData) + { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } + + /* Do we have data to compute? */ + if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } + + /* Remove unused data */ + list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); + + /* Compute the pie sum */ + $SerieSum = $this->pDataObject->getSum($DataSerie); + + /* Do we have data to draw? */ + if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } + + /* Dump the real number of data to draw */ + $Values = ""; + foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) + { if ($Value != 0) { $Values[] = $Value; } } + + /* Compute the wasted angular space between series */ + if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; } + + /* Compute the scale */ + $ScaleFactor = (360 - $WastedAngular) / $SerieSum; + + $RestoreShadow = $this->pChartObject->Shadow; + if ( $this->pChartObject->Shadow ) { $this->pChartObject->Shadow = FALSE; } + + /* Draw the polygon pie elements */ + $Step = 360 / (2 * PI * $Radius); + $Offset = 360; $ID = count($Values)-1; + $Values = array_reverse($Values); + $Slice = 0; $Slices = ""; $SliceColors = ""; $Visible = ""; $SliceAngle = ""; + foreach($Values as $Key => $Value) + { + if ( !isset($Palette[$ID]["R"]) ) { $Color = $this->pChartObject->getRandomColor(); $Palette[$ID] = $Color; $this->pDataObject->savePalette($ID,$Color); } + $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); + + $SliceColors[$Slice] = $Settings; + + $StartAngle = $Offset; + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + if ( $StartAngle > 180 ) { $Visible[$Slice]["Start"] = TRUE; } else { $Visible[$Slice]["Start"] = TRUE; } + if ( $EndAngle < 180 ) { $Visible[$Slice]["End"] = FALSE; } else { $Visible[$Slice]["End"] = TRUE; } + + if ($DataGapAngle == 0) + { $X0 = $X; $Y0 = $Y; } + else + { + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; + $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius*$SkewFactor + $Y; + } + $Slices[$Slice][] = $X0; $Slices[$Slice][] = $Y0; $SliceAngle[$Slice][] = 0; + + for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) + { + $Xc = cos(($i-90)*PI/180) * $Radius + $X; + $Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y; + + if ( ($SecondPass || $RestoreShadow ) && ( $i<90 )) { $Yc++; } + if ( ($SecondPass || $RestoreShadow ) && ( $i>90 && $i<180 )) { $Xc++; } + if ( ($SecondPass || $RestoreShadow ) && ( $i>180 && $i<270 )) { $Xc++; } + if ( ($SecondPass || $RestoreShadow ) && ( $i>=270 )) { $Xc++; $Yc++; } + + $Slices[$Slice][] = $Xc; $Slices[$Slice][] = $Yc; $SliceAngle[$Slice][] = $i; + } + + $Offset = $i - $DataGapAngle; $ID--; $Slice++; + } + + /* Draw the bottom shadow if needed */ + if ( $RestoreShadow && ($this->pChartObject->ShadowX != 0 || $this->pChartObject->ShadowY !=0 )) + { + foreach($Slices as $SliceID => $Plots) + { + $ShadowPie = ""; + for($i=0;$ipChartObject->ShadowX; $ShadowPie[] = $Plots[$i+1]+$this->pChartObject->ShadowY; } + + $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa,"NoBorder"=>TRUE); + $this->pChartObject->drawPolygon($ShadowPie,$Settings); + } + + $Step = 360 / (2 * PI * $Radius); + $Offset = 360; + foreach($Values as $Key => $Value) + { + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) + { + $Xc = cos(($i-90)*PI/180) * $Radius + $X + $this->pChartObject->ShadowX; + $Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y + $this->pChartObject->ShadowY; + + $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); + } + + $Offset = $i - $DataGapAngle; $ID--; + } + } + + /* Draw the bottom pie splice */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $this->pChartObject->drawPolygon($Plots,$Settings); + + if ( $SecondPass ) + { + $Settings = $SliceColors[$SliceID]; + if ( $Border ) + { $Settings["R"]+= 30; $Settings["G"]+= 30; $Settings["B"]+= 30;; } + + if ( isset($SliceAngle[$SliceID][1]) ) /* Empty error handling */ + { + $Angle = $SliceAngle[$SliceID][1]; + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; + $this->pChartObject->drawLine($Plots[0],$Plots[1],$Xc,$Yc,$Settings); + + $Angle = $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1]; + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; + $this->pChartObject->drawLine($Plots[0],$Plots[1],$Xc,$Yc,$Settings); + } + } + } + + /* Draw the two vertical edges */ + $Slices = array_reverse($Slices); + $SliceColors = array_reverse($SliceColors); + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; + $Settings["R"]+= 10; $Settings["G"]+= 10; $Settings["B"]+= 10; $Settings["NoBorder"] = TRUE; + + if ( $Visible[$SliceID]["Start"] && isset($Plots[2])) /* Empty error handling */ + { + $this->pChartObject->drawLine($Plots[2],$Plots[3],$Plots[2],$Plots[3]- $SliceHeight,array("R"=>$Settings["R"],"G"=>$Settings["G"],"B"=>$Settings["B"])); + $Border = ""; + $Border[] = $Plots[0]; $Border[] = $Plots[1]; $Border[] = $Plots[0]; $Border[] = $Plots[1] - $SliceHeight; + $Border[] = $Plots[2]; $Border[] = $Plots[3] - $SliceHeight; $Border[] = $Plots[2]; $Border[] = $Plots[3]; + $this->pChartObject->drawPolygon($Border,$Settings); + } + } + + $Slices = array_reverse($Slices); + $SliceColors = array_reverse($SliceColors); + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; + $Settings["R"]+= 10; $Settings["G"]+= 10; $Settings["B"]+= 10; $Settings["NoBorder"] = TRUE; + if ( $Visible[$SliceID]["End"] ) + { + $this->pChartObject->drawLine($Plots[count($Plots)-2],$Plots[count($Plots)-1],$Plots[count($Plots)-2],$Plots[count($Plots)-1]- $SliceHeight,array("R"=>$Settings["R"],"G"=>$Settings["G"],"B"=>$Settings["B"])); + + $Border = ""; + $Border[] = $Plots[0]; $Border[] = $Plots[1]; $Border[] = $Plots[0]; $Border[] = $Plots[1] - $SliceHeight; + $Border[] = $Plots[count($Plots)-2]; $Border[] = $Plots[count($Plots)-1] - $SliceHeight; $Border[] = $Plots[count($Plots)-2]; $Border[] = $Plots[count($Plots)-1]; + $this->pChartObject->drawPolygon($Border,$Settings); + } + } + + /* Draw the rounded edges */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; + $Settings["R"]+= 10; $Settings["G"]+= 10; $Settings["B"]+= 10; $Settings["NoBorder"] = TRUE; + + for ($j=2;$j 90 ) + { + $Border = ""; + $Border[] = $Plots[$j]; $Border[] = $Plots[$j+1]; + $Border[] = $Plots[$j+2]; $Border[] = $Plots[$j+3]; + $Border[] = $Plots[$j+2]; $Border[] = $Plots[$j+3] - $SliceHeight; + $Border[] = $Plots[$j]; $Border[] = $Plots[$j+1] - $SliceHeight; + $this->pChartObject->drawPolygon($Border,$Settings); + } + } + + if ( $SecondPass ) + { + $Settings = $SliceColors[$SliceID]; + if ( $Border ) + { $Settings["R"]+= 30; $Settings["G"]+= 30; $Settings["B"]+= 30; } + + if ( isset($SliceAngle[$SliceID][1]) ) /* Empty error handling */ + { + $Angle = $SliceAngle[$SliceID][1]; + if ( $Angle < 270 && $Angle > 90 ) + { + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; + $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); + } + } + + $Angle = $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1]; + if ( $Angle < 270 && $Angle > 90 ) + { + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y; + $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); + } + + if ( isset($SliceAngle[$SliceID][1]) && $SliceAngle[$SliceID][1] > 270 && $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1] < 270 ) + { + $Xc = cos((270-90)*PI/180) * $Radius + $X; + $Yc = sin((270-90)*PI/180) * $Radius*$SkewFactor + $Y; + $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); + } + + if ( isset($SliceAngle[$SliceID][1]) && $SliceAngle[$SliceID][1] > 90 && $SliceAngle[$SliceID][count($SliceAngle[$SliceID])-1] < 90 ) + { + $Xc = cos((0)*PI/180) * $Radius + $X; + $Yc = sin((0)*PI/180) * $Radius*$SkewFactor + $Y; + $this->pChartObject->drawLine($Xc,$Yc,$Xc,$Yc-$SliceHeight,$Settings); + } + + } + } + + /* Draw the top splice */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; + $Settings["R"]+= 20; $Settings["G"]+= 20; $Settings["B"]+= 20; + + $Top = ""; + for($j=0;$jpChartObject->drawPolygon($Top,$Settings); + + if ( $RecordImageMap && !$Shadow ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Top),$this->pChartObject->toHTMLColor($Settings["R"],$Settings["G"],$Settings["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][count($Slices)-$SliceID-1],$Values[$SliceID]); } + } + + + /* Second pass to smooth the angles */ + if ( $SecondPass ) + { + $Step = 360 / (2 * PI * $Radius); + $Offset = 360; $ID = count($Values)-1; + foreach($Values as $Key => $Value) + { + $FirstPoint = TRUE; + if ( $Shadow ) + $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); + else + { + if ( $Border ) + { $Settings = array("R"=>$Palette[$ID]["R"]+30,"G"=>$Palette[$ID]["G"]+30,"B"=>$Palette[$ID]["B"]+30,"Alpha"=>$Palette[$ID]["Alpha"]); } + else + $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); + } + + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + if ($DataGapAngle == 0) + { $X0 = $X; $Y0 = $Y- $SliceHeight; } + else + { + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $X0 = cos(($Angle-90)*PI/180) * $DataGapRadius + $X; + $Y0 = sin(($Angle-90)*PI/180) * $DataGapRadius*$SkewFactor + $Y - $SliceHeight; + } + $Plots[] = $X0; $Plots[] = $Y0; + + for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) + { + $Xc = cos(($i-90)*PI/180) * $Radius + $X; + $Yc = sin(($i-90)*PI/180) * $Radius*$SkewFactor + $Y - $SliceHeight; + + if ( $FirstPoint ) { $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); } { $FirstPoint = FALSE; } + + $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); + if ($i < 270 && $i > 90 ) { $this->pChartObject->drawAntialiasPixel($Xc,$Yc+$SliceHeight,$Settings); } + } + $this->pChartObject->drawLine($Xc,$Yc,$X0,$Y0,$Settings); + + $Offset = $i - $DataGapAngle; $ID--; + } + } + + if ( $WriteValues != NULL ) + { + $Step = 360 / (2 * PI * $Radius); + $Offset = 360; $ID = count($Values)-1; + $Settings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"R"=>$ValueR,"G"=>$ValueG,"B"=>$ValueB,"Alpha"=>$ValueAlpha); + foreach($Values as $Key => $Value) + { + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + + if ( $ValuePosition == PIE_VALUE_OUTSIDE ) + { + $Xc = cos(($Angle-90)*PI/180) * ($Radius+$ValuePadding) + $X; + $Yc = sin(($Angle-90)*PI/180) * (($Radius*$SkewFactor)+$ValuePadding) + $Y - $SliceHeight; + } + else + { + $Xc = cos(($Angle-90)*PI/180) * ($Radius)/2 + $X; + $Yc = sin(($Angle-90)*PI/180) * ($Radius*$SkewFactor)/2 + $Y - $SliceHeight; + } + + if ( $WriteValues == PIE_VALUE_PERCENTAGE ) + $Display = round(( 100 / $SerieSum ) * $Value,$Precision)."%"; + elseif ( $WriteValues == PIE_VALUE_NATURAL ) + $Display = $Value.$ValueSuffix; + + $this->pChartObject->drawText($Xc,$Yc,$Display,$Settings); + + $Offset = $EndAngle - $DataGapAngle; $ID--; + } + } + + if ( $DrawLabels ) + { + $Step = 360 / (2 * PI * $Radius); + $Offset = 360; $ID = count($Values)-1; + foreach($Values as $Key => $Value) + { + if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) + { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} + else + { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } + + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $Xc = cos(($Angle-90)*PI/180) * $Radius + $X; + $Yc = sin(($Angle-90)*PI/180) * $Radius*$SkewFactor + $Y - $SliceHeight; + + if ( isset($Data["Series"][$Data["Abscissa"]]["Data"][$ID]) ) + { + $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$ID]; + + if ( $LabelStacked ) + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,TRUE,$X,$Y,$Radius,TRUE); + else + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,FALSE); + } + + $Offset = $EndAngle - $DataGapAngle; $ID--; + } + } + + if ( $DrawLabels && $LabelStacked ) { $this->writeShiftedLabels(); } + + $this->pChartObject->Shadow = $RestoreShadow; + + return(PIE_RENDERED); + } + + /* Draw the legend of pie chart */ + function drawPieLegend($X,$Y,$Format="") + { + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; + $FontR = isset($Format["FontR"]) ? $Format["FontR"] : $this->pChartObject->FontColorR; + $FontG = isset($Format["FontG"]) ? $Format["FontG"] : $this->pChartObject->FontColorG; + $FontB = isset($Format["FontB"]) ? $Format["FontB"] : $this->pChartObject->FontColorB; + $BoxSize = isset($Format["BoxSize"]) ? $Format["BoxSize"] : 5; + $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; + $R = isset($Format["R"]) ? $Format["R"] : 200; + $G = isset($Format["G"]) ? $Format["G"] : 200; + $B = isset($Format["B"]) ? $Format["B"] : 200; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; + + if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } + + $YStep = max($this->pChartObject->FontSize,$BoxSize) + 5; + $XStep = $BoxSize + 5; + + /* Data Processing */ + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + /* Do we have an abscissa serie defined? */ + if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } + + $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; + foreach($Data["Series"][$Data["Abscissa"]]["Data"] as $Key => $Value) + { + $BoxArray = $this->pChartObject->getTextBox($vX+$BoxSize+4,$vY+$BoxSize/2,$FontName,$FontSize,0,$Value); + + if ( $Mode == LEGEND_VERTICAL ) + { + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$BoxSize/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$BoxSize/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$BoxSize/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$BoxSize/2; } + $vY=$vY+$YStep; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$BoxSize/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$BoxSize/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$BoxSize/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$BoxSize/2; } + $vX=$Boundaries["R"]+$XStep; + } + } + $vY=$vY-$YStep; $vX=$vX-$XStep; + + $TopOffset = $Y - $Boundaries["T"]; + if ( $Boundaries["B"]-($vY+$BoxSize) < $TopOffset ) { $Boundaries["B"] = $vY+$BoxSize+$TopOffset; } + + if ( $Style == LEGEND_ROUND ) + $this->pChartObject->drawRoundedFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + elseif ( $Style == LEGEND_BOX ) + $this->pChartObject->drawFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + + $RestoreShadow = $this->pChartObject->Shadow; $this->pChartObject->Shadow = FALSE; + foreach($Data["Series"][$Data["Abscissa"]]["Data"] as $Key => $Value) + { + $R = $Palette[$Key]["R"]; $G = $Palette[$Key]["G"]; $B = $Palette[$Key]["B"]; + + $this->pChartObject->drawFilledRectangle($X+1,$Y+1,$X+$BoxSize+1,$Y+$BoxSize+1,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + $this->pChartObject->drawFilledRectangle($X,$Y,$X+$BoxSize,$Y+$BoxSize,array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); + if ( $Mode == LEGEND_VERTICAL ) + { + $this->pChartObject->drawText($X+$BoxSize+4,$Y+$BoxSize/2,$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontName"=>$FontName,"FontSize"=>$FontSize)); + $Y=$Y+$YStep; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $BoxArray = $this->pChartObject->drawText($X+$BoxSize+4,$Y+$BoxSize/2,$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT,"FontName"=>$FontName,"FontSize"=>$FontSize)); + $X=$BoxArray[1]["X"]+2+$XStep; + } + } + + $this->Shadow = $RestoreShadow; + } + + /* Set the color of the specified slice */ + function setSliceColor($SliceID,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + + $this->pDataObject->Palette[$SliceID]["R"] = $R; + $this->pDataObject->Palette[$SliceID]["G"] = $G; + $this->pDataObject->Palette[$SliceID]["B"] = $B; + $this->pDataObject->Palette[$SliceID]["Alpha"] = $Alpha; + } + + /* Internally used compute the label positions */ + function writePieLabel($X,$Y,$Label,$Angle,$Settings,$Stacked,$Xc=0,$Yc=0,$Radius=0,$Reversed=FALSE) + { + $LabelOffset = 30; + $FontName = $this->pChartObject->FontName; + $FontSize = $this->pChartObject->FontSize; + + if ( !$Stacked ) + { + $Settings["Angle"] = 360-$Angle; + $Settings["Length"] = 25; + $Settings["Size"] = 8; + + $this->pChartObject->drawArrowLabel($X,$Y," ".$Label." ",$Settings); + } + else + { + $X2 = cos(deg2rad($Angle-90))*20+$X; + $Y2 = sin(deg2rad($Angle-90))*20+$Y; + + $TxtPos = $this->pChartObject->getTextBox($X,$Y,$FontName,$FontSize,0,$Label); + $Height = $TxtPos[0]["Y"] - $TxtPos[2]["Y"]; + $YTop = $Y2 - $Height/2 - 2; + $YBottom = $Y2 + $Height/2 + 2; + + if ( $this->LabelPos != "" ) + { + $Done = FALSE; + foreach($this->LabelPos as $Key => $Settings) + { + if ( !$Done ) + { + if ( $Angle <= 90 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) + { $this->shift(0,180,-($Height+2),$Reversed); $Done = TRUE; } + if ( $Angle > 90 && $Angle <= 180 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) + { $this->shift(0,180,-($Height+2),$Reversed); $Done = TRUE; } + if ( $Angle > 180 && $Angle <= 270 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) + { $this->shift(180,360,($Height+2),$Reversed); $Done = TRUE; } + if ( $Angle > 270 && $Angle <= 360 && (($YTop >= $Settings["YTop"] && $YTop <= $Settings["YBottom"]) || ($YBottom >= $Settings["YTop"] && $YBottom <= $Settings["YBottom"]))) + { $this->shift(180,360,($Height+2),$Reversed); $Done = TRUE; } + } + } + } + + $LabelSettings = array("YTop"=>$YTop,"YBottom"=>$YBottom,"Label"=>$Label,"Angle"=>$Angle,"X1"=>$X,"Y1"=>$Y,"X2"=>$X2,"Y2"=>$Y2); + if ( $Angle <= 180 ) { $LabelSettings["X3"] = $Xc+$Radius+$LabelOffset; } + if ( $Angle > 180 ) { $LabelSettings["X3"] = $Xc-$Radius-$LabelOffset; } + $this->LabelPos[] = $LabelSettings; + } + } + + /* Internally used to shift label positions */ + function shift($StartAngle,$EndAngle,$Offset,$Reversed) + { + if ( $Reversed ) { $Offset = -$Offset; } + foreach($this->LabelPos as $Key => $Settings) + { + if ( $Settings["Angle"] > $StartAngle && $Settings["Angle"] <= $EndAngle ) { $this->LabelPos[$Key]["YTop"] = $Settings["YTop"] + $Offset; $this->LabelPos[$Key]["YBottom"] = $Settings["YBottom"] + $Offset; $this->LabelPos[$Key]["Y2"] = $Settings["Y2"] + $Offset; } + } + } + + /* Internally used to write the re-computed labels */ + function writeShiftedLabels() + { + if ( $this->LabelPos == "" ) { return(0); } + foreach($this->LabelPos as $Key => $Settings) + { + $X1 = $Settings["X1"]; $Y1 = $Settings["Y1"]; + $X2 = $Settings["X2"]; $Y2 = $Settings["Y2"]; + $X3 = $Settings["X3"]; + $Angle = $Settings["Angle"]; + $Label = $Settings["Label"]; + + $this->pChartObject->drawArrow($X2,$Y2,$X1,$Y1,array("Size"=>8)); + if ( $Angle <= 180 ) + { + $this->pChartObject->drawLine($X2,$Y2,$X3,$Y2); + $this->pChartObject->drawText($X3+2,$Y2,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); + } + else + { + $this->pChartObject->drawLine($X2,$Y2,$X3,$Y2); + $this->pChartObject->drawText($X3-2,$Y2,$Label,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); + } + } + } + + /* Draw a ring chart */ + function draw2DRing($X,$Y,$Format="") + { + $OuterRadius = isset($Format["Radius"]) ? $Format["Radius"] : 60; + $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; + $InnerRadius = isset($Format["Radius"]) ? $Format["Radius"] : 30; + $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 100; + $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; + $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; + $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; + $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; + $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; + $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; + $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; + $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; + $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : NULL; //PIE_VALUE_PERCENTAGE + $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 5; + $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_OUTSIDE; + $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; + $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; + $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; + $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; + $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + /* Data Processing */ + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + /* Do we have an abscissa serie defined? */ + if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } + + /* Try to find the data serie */ + $DataSerie = ""; + foreach ($Data["Series"] as $SerieName => $SerieData) + { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } + + /* Do we have data to compute? */ + if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } + + /* Remove unused data */ + list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); + + /* Compute the pie sum */ + $SerieSum = $this->pDataObject->getSum($DataSerie); + + /* Do we have data to draw? */ + if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } + + /* Dump the real number of data to draw */ + $Values = ""; + foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) + { if ($Value != 0) { $Values[] = $Value; } } + + /* Compute the wasted angular space between series */ + if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = 0; } // count($Values) + + /* Compute the scale */ + $ScaleFactor = (360 - $WastedAngular) / $SerieSum; + + $RestoreShadow = $this->pChartObject->Shadow; + if ( $this->pChartObject->Shadow ) + { + $this->pChartObject->Shadow = FALSE; + + $ShadowFormat = $Format; $ShadowFormat["Shadow"] = TRUE; + $this->draw2DRing($X+$this->pChartObject->ShadowX,$Y+$this->pChartObject->ShadowY,$ShadowFormat); + } + + /* Draw the polygon pie elements */ + $Step = 360 / (2 * PI * $OuterRadius); + $Offset = 0; $ID = 0; + foreach($Values as $Key => $Value) + { + if ( $Shadow ) + { + $Settings = array("R"=>$this->pChartObject->ShadowR,"G"=>$this->pChartObject->ShadowG,"B"=>$this->pChartObject->ShadowB,"Alpha"=>$this->pChartObject->Shadowa); + $BorderColor = $Settings; + } + else + { + if ( !isset($Palette[$ID]["R"]) ) { $Color = $this->pChartObject->getRandomColor(); $Palette[$ID] = $Color; $this->pDataObject->savePalette($ID,$Color); } + $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); + + if ( $Border ) + $BorderColor = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); + else + $BorderColor = $Settings; + } + + $Plots = ""; $Boundaries = ""; $AAPixels = ""; + $EndAngle = $Offset+($Value*$ScaleFactor); if ( $EndAngle > 360 ) { $EndAngle = 360; } + for($i=$Offset;$i<=$EndAngle;$i=$i+$Step) + { + $Xc = cos(($i-90)*PI/180) * $OuterRadius + $X; + $Yc = sin(($i-90)*PI/180) * $OuterRadius + $Y; + + if ( !isset($Boundaries[0]["X1"]) ) { $Boundaries[0]["X1"] = $Xc; $Boundaries[0]["Y1"] = $Yc; } + $AAPixels[] = array($Xc,$Yc); + + if ( $i<90 ) { $Yc++; } + if ( $i>180 && $i<270 ) { $Xc++; } + if ( $i>=270 ) { $Xc++; $Yc++; } + + $Plots[] = $Xc; $Plots[] = $Yc; + } + $Boundaries[1]["X1"] = $Xc; $Boundaries[1]["Y1"] = $Yc; + $Lasti = $EndAngle; + + for($i=$EndAngle;$i>=$Offset;$i=$i-$Step) + { + $Xc = cos(($i-90)*PI/180) * ($InnerRadius-1) + $X; + $Yc = sin(($i-90)*PI/180) * ($InnerRadius-1) + $Y; + + if ( !isset($Boundaries[1]["X2"]) ) { $Boundaries[1]["X2"] = $Xc; $Boundaries[1]["Y2"] = $Yc; } + $AAPixels[] = array($Xc,$Yc); + + $Xc = cos(($i-90)*PI/180) * $InnerRadius + $X; + $Yc = sin(($i-90)*PI/180) * $InnerRadius + $Y; + + if ( $i<90 ) { $Yc++; } + if ( $i>180 && $i<270 ) { $Xc++; } + if ( $i>=270 ) { $Xc++; $Yc++; } + + $Plots[] = $Xc; $Plots[] = $Yc; + } + $Boundaries[0]["X2"] = $Xc; $Boundaries[0]["Y2"] = $Yc; + + /* Draw the polygon */ + $this->pChartObject->drawPolygon($Plots,$Settings); + if ( $RecordImageMap && !$Shadow ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Plots),$this->pChartObject->toHTMLColor($Palette[$ID]["R"],$Palette[$ID]["G"],$Palette[$ID]["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][$Key],$Value); } + + /* Smooth the edges using AA */ + foreach($AAPixels as $iKey => $Pos ) { $this->pChartObject->drawAntialiasPixel($Pos[0],$Pos[1],$BorderColor); } + $this->pChartObject->drawLine($Boundaries[0]["X1"],$Boundaries[0]["Y1"],$Boundaries[0]["X2"],$Boundaries[0]["Y2"],$BorderColor); + $this->pChartObject->drawLine($Boundaries[1]["X1"],$Boundaries[1]["Y1"],$Boundaries[1]["X2"],$Boundaries[1]["Y2"],$BorderColor); + + if ( $DrawLabels && !$Shadow ) + { + if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) + { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} + else + { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $Xc = cos(($Angle-90)*PI/180) * $OuterRadius + $X; + $Yc = sin(($Angle-90)*PI/180) * $OuterRadius + $Y; + + $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; + + if ( $LabelStacked ) + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,TRUE,$X,$Y,$OuterRadius); + else + $this->writePieLabel($Xc,$Yc,$Label,$Angle,$Settings,FALSE); + } + + $Offset = $Lasti; $ID++; + } + + if ( $DrawLabels && $LabelStacked ) { $this->writeShiftedLabels(); } + + if ( $WriteValues && !$Shadow ) + { + $Step = 360 / (2 * PI * $OuterRadius); + $Offset = 0; + foreach($Values as $Key => $Value) + { + $EndAngle = $Offset+($Value*$ScaleFactor); + if ( $EndAngle > 360 ) { $EndAngle = 360; } + + $Angle = $Offset+($Value*$ScaleFactor)/2; + if ( $ValuePosition == PIE_VALUE_OUTSIDE ) + { + $Xc = cos(($Angle-90)*PI/180) * ($OuterRadius+$ValuePadding) + $X; + $Yc = sin(($Angle-90)*PI/180) * ($OuterRadius+$ValuePadding) + $Y; + if ( $Angle >=0 && $Angle <= 90 ) { $Align = TEXT_ALIGN_BOTTOMLEFT; } + if ( $Angle > 90 && $Angle <= 180 ) { $Align = TEXT_ALIGN_TOPLEFT; } + if ( $Angle > 180 && $Angle <= 270 ) { $Align = TEXT_ALIGN_TOPRIGHT; } + if ( $Angle > 270 ) { $Align = TEXT_ALIGN_BOTTOMRIGHT; } + } + else + { + $Xc = cos(($Angle-90)*PI/180) * (($OuterRadius-$InnerRadius)/2+$InnerRadius) + $X; + $Yc = sin(($Angle-90)*PI/180) * (($OuterRadius-$InnerRadius)/2+$InnerRadius) + $Y; + $Align = TEXT_ALIGN_MIDDLEMIDDLE; + } + + if ( $WriteValues == PIE_VALUE_PERCENTAGE ) + $Display = round(( 100 / $SerieSum ) * $Value,$Precision)."%"; + elseif ( $WriteValues == PIE_VALUE_NATURAL ) + $Display = $Value.$ValueSuffix; + else + $Label = ""; + + $this->pChartObject->drawText($Xc,$Yc,$Display,array("Align"=>$Align,"R"=>$ValueR,"G"=>$ValueG,"B"=>$ValueB)); + $Offset = $EndAngle; + } + } + + $this->pChartObject->Shadow = $RestoreShadow; + + return(PIE_RENDERED); + } + + /* Draw a 3D ring chart */ + function draw3DRing($X,$Y,$Format="") + { + $OuterRadius = isset($Format["OuterRadius"]) ? $Format["OuterRadius"] : 100; + $Precision = isset($Format["Precision"]) ? $Format["Precision"] : 0; + $InnerRadius = isset($Format["InnerRadius"]) ? $Format["InnerRadius"] : 30; + $SkewFactor = isset($Format["SkewFactor"]) ? $Format["SkewFactor"] : .6; + $SliceHeight = isset($Format["SliceHeight"]) ? $Format["SliceHeight"] : 10; + $DataGapAngle = isset($Format["DataGapAngle"]) ? $Format["DataGapAngle"] : 10; + $DataGapRadius = isset($Format["DataGapRadius"]) ? $Format["DataGapRadius"] : 10; + $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; + $Shadow = isset($Format["Shadow"]) ? $Format["Shadow"] : FALSE; + $DrawLabels = isset($Format["DrawLabels"]) ? $Format["DrawLabels"] : FALSE; + $LabelStacked = isset($Format["LabelStacked"]) ? $Format["LabelStacked"] : FALSE; + $LabelColor = isset($Format["LabelColor"]) ? $Format["LabelColor"] : PIE_LABEL_COLOR_MANUAL; + $LabelR = isset($Format["LabelR"]) ? $Format["LabelR"] : 0; + $LabelG = isset($Format["LabelG"]) ? $Format["LabelG"] : 0; + $LabelB = isset($Format["LabelB"]) ? $Format["LabelB"] : 0; + $LabelAlpha = isset($Format["LabelAlpha"]) ? $Format["LabelAlpha"] : 100; + $Cf = isset($Format["Cf"]) ? $Format["Cf"] : 20; + $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : PIE_VALUE_NATURAL; + $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : $SliceHeight + 15; + $ValuePosition = isset($Format["ValuePosition"]) ? $Format["ValuePosition"] : PIE_VALUE_OUTSIDE; + $ValueSuffix = isset($Format["ValueSuffix"]) ? $Format["ValueSuffix"] : ""; + $ValueR = isset($Format["ValueR"]) ? $Format["ValueR"] : 255; + $ValueG = isset($Format["ValueG"]) ? $Format["ValueG"] : 255; + $ValueB = isset($Format["ValueB"]) ? $Format["ValueB"] : 255; + $ValueAlpha = isset($Format["ValueAlpha"]) ? $Format["ValueAlpha"] : 100; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + /* Error correction for overlaying rounded corners */ + if ( $SkewFactor < .5 ) { $SkewFactor = .5; } + + /* Data Processing */ + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + /* Do we have an abscissa serie defined? */ + if ( $Data["Abscissa"] == "" ) { return(PIE_NO_ABSCISSA); } + + /* Try to find the data serie */ + $DataSerie = ""; + foreach ($Data["Series"] as $SerieName => $SerieData) + { if ( $SerieName != $Data["Abscissa"]) { $DataSerie = $SerieName; } } + + /* Do we have data to compute? */ + if ( $DataSerie == "" ) { return(PIE_NO_DATASERIE); } + + /* Remove unused data */ + list($Data,$Palette) = $this->clean0Values($Data,$Palette,$DataSerie,$Data["Abscissa"]); + + /* Compute the pie sum */ + $SerieSum = $this->pDataObject->getSum($DataSerie); + + /* Do we have data to draw? */ + if ( $SerieSum == 0 ) { return(PIE_SUMISNULL); } + + /* Dump the real number of data to draw */ + $Values = ""; + foreach ($Data["Series"][$DataSerie]["Data"] as $Key => $Value) + { if ($Value != 0) { $Values[] = $Value; } } + + /* Compute the wasted angular space between series */ + if (count($Values)==1) { $WastedAngular = 0; } else { $WastedAngular = count($Values) * $DataGapAngle; } + + /* Compute the scale */ + $ScaleFactor = (360 - $WastedAngular) / $SerieSum; + + $RestoreShadow = $this->pChartObject->Shadow; + if ( $this->pChartObject->Shadow ) { $this->pChartObject->Shadow = FALSE; } + + /* Draw the polygon ring elements */ + $Offset = 360; $ID = count($Values)-1; + $Values = array_reverse($Values); + $Slice = 0; $Slices = ""; $SliceColors = ""; $Visible = ""; $SliceAngle = ""; + foreach($Values as $Key => $Value) + { + if ( !isset($Palette[$ID]["R"]) ) { $Color = $this->pChartObject->getRandomColor(); $Palette[$ID] = $Color; $this->pDataObject->savePalette($ID,$Color); } + $Settings = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]); + + $SliceColors[$Slice] = $Settings; + + $StartAngle = $Offset; + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + if ( $StartAngle > 180 ) { $Visible[$Slice]["Start"] = TRUE; } else { $Visible[$Slice]["Start"] = TRUE; } + if ( $EndAngle < 180 ) { $Visible[$Slice]["End"] = FALSE; } else { $Visible[$Slice]["End"] = TRUE; } + + $Step = (360 / (2 * PI * $OuterRadius))/2; + $OutX1 = VOID; $OutY1 = VOID; + for($i=$Offset;$i>=$EndAngle;$i=$i-$Step) + { + $Xc = cos(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-2) + $X; + $Yc = sin(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-2)*$SkewFactor + $Y; + $Slices[$Slice]["AA"][] = array($Xc,$Yc); + + $Xc = cos(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-1) + $X; + $Yc = sin(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius-1)*$SkewFactor + $Y; + $Slices[$Slice]["AA"][] = array($Xc,$Yc); + + $Xc = cos(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius) + $X; + $Yc = sin(($i-90)*PI/180) * ($OuterRadius+$DataGapRadius)*$SkewFactor + $Y; + $this->pChartObject->drawAntialiasPixel($Xc,$Yc,$Settings); + + if ( $OutX1 == VOID ) { $OutX1 = $Xc; $OutY1 = $Yc; } + + if ( $i<90 ) { $Yc++; } + if ( $i>90 && $i<180 ) { $Xc++; } + if ( $i>180 && $i<270 ) { $Xc++; } + if ( $i>=270 ) { $Xc++; $Yc++; } + + $Slices[$Slice]["BottomPoly"][] = floor($Xc); $Slices[$Slice]["BottomPoly"][] = floor($Yc); + $Slices[$Slice]["TopPoly"][] = floor($Xc); $Slices[$Slice]["TopPoly"][] = floor($Yc)-$SliceHeight; + $Slices[$Slice]["Angle"][] = $i; + } + $OutX2 = $Xc; $OutY2 = $Yc; + + $Slices[$Slice]["Angle"][] = VOID; + $Lasti = $i; + + $Step = (360 / (2 * PI * $InnerRadius))/2; + $InX1 = VOID; $InY1 = VOID; + for($i=$EndAngle;$i<=$Offset;$i=$i+$Step) + { + $Xc = cos(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius-1) + $X; + $Yc = sin(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius-1)*$SkewFactor + $Y; + $Slices[$Slice]["AA"][] = array($Xc,$Yc); + + $Xc = cos(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius) + $X; + $Yc = sin(($i-90)*PI/180) * ($InnerRadius+$DataGapRadius)*$SkewFactor + $Y; + $Slices[$Slice]["AA"][] = array($Xc,$Yc); + + if ( $InX1 == VOID ) { $InX1 = $Xc; $InY1 = $Yc; } + + if ( $i<90 ) { $Yc++; } + if ( $i>90 && $i<180 ) { $Xc++; } + if ( $i>180 && $i<270 ) { $Xc++; } + if ( $i>=270 ) { $Xc++; $Yc++; } + + $Slices[$Slice]["BottomPoly"][] = floor($Xc); $Slices[$Slice]["BottomPoly"][] = floor($Yc); + $Slices[$Slice]["TopPoly"][] = floor($Xc); $Slices[$Slice]["TopPoly"][] = floor($Yc)-$SliceHeight; + $Slices[$Slice]["Angle"][] = $i; + } + $InX2 = $Xc; $InY2 = $Yc; + + $Slices[$Slice]["InX1"] = $InX1; $Slices[$Slice]["InY1"] = $InY1; + $Slices[$Slice]["InX2"] = $InX2; $Slices[$Slice]["InY2"] = $InY2; + $Slices[$Slice]["OutX1"] = $OutX1; $Slices[$Slice]["OutY1"] = $OutY1; + $Slices[$Slice]["OutX2"] = $OutX2; $Slices[$Slice]["OutY2"] = $OutY2; + + $Offset = $Lasti - $DataGapAngle; $ID--; $Slice++; + } + + /* Draw the bottom pie splice */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $this->pChartObject->drawPolygon($Plots["BottomPoly"],$Settings); + + foreach($Plots["AA"] as $Key => $Pos) + $this->pChartObject->drawAntialiasPixel($Pos[0],$Pos[1],$Settings); + + $this->pChartObject->drawLine($Plots["InX1"],$Plots["InY1"],$Plots["OutX2"],$Plots["OutY2"],$Settings); + $this->pChartObject->drawLine($Plots["InX2"],$Plots["InY2"],$Plots["OutX1"],$Plots["OutY1"],$Settings); + } + + $Slices = array_reverse($Slices); + $SliceColors = array_reverse($SliceColors); + + /* Draw the vertical edges (semi-visible) */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; + + $StartAngle = $Plots["Angle"][0]; + foreach($Plots["Angle"] as $Key =>$Angle) { if ($Angle == VOID) { $EndAngle = $Plots["Angle"][$Key-1]; } } + + if ( $StartAngle >= 270 || $StartAngle <= 90 ) + $this->pChartObject->drawLine($Plots["OutX1"],$Plots["OutY1"],$Plots["OutX1"],$Plots["OutY1"]-$SliceHeight,$Settings); + if ( $StartAngle >= 270 || $StartAngle <= 90 ) + $this->pChartObject->drawLine($Plots["OutX2"],$Plots["OutY2"],$Plots["OutX2"],$Plots["OutY2"]-$SliceHeight,$Settings); + + $this->pChartObject->drawLine($Plots["InX1"],$Plots["InY1"],$Plots["InX1"],$Plots["InY1"]-$SliceHeight,$Settings); + $this->pChartObject->drawLine($Plots["InX2"],$Plots["InY2"],$Plots["InX2"],$Plots["InY2"]-$SliceHeight,$Settings); + } + + /* Draw the inner vertical slices */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; + + $Outer = TRUE; $Inner = FALSE; + $InnerPlotsA = ""; $InnerPlotsB = ""; + foreach($Plots["Angle"] as $ID => $Angle) + { + if ( $Angle == VOID ) + { $Outer = FALSE; $Inner = TRUE; } + elseif( $Inner ) + { + if (( $Angle < 90 || $Angle > 270 ) && isset($Plots["BottomPoly"][$ID*2]) ) + { + $Xo = $Plots["BottomPoly"][$ID*2]; + $Yo = $Plots["BottomPoly"][$ID*2+1]; + + $InnerPlotsA[] = $Xo; $InnerPlotsA[] = $Yo; + $InnerPlotsB[] = $Xo; $InnerPlotsB[] = $Yo-$SliceHeight; + } + } + } + + if ( $InnerPlotsA != "" ) + { $InnerPlots = array_merge($InnerPlotsA,$this->arrayReverse($InnerPlotsB)); $this->pChartObject->drawPolygon($InnerPlots,$Settings); } + } + + /* Draw the splice top and left poly */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $Settings["R"] = $Settings["R"]+$Cf*1.5; $Settings["G"] = $Settings["G"]+$Cf*1.5; $Settings["B"] = $Settings["B"]+$Cf*1.5; + + $StartAngle = $Plots["Angle"][0]; + foreach($Plots["Angle"] as $Key =>$Angle) { if ($Angle == VOID) { $EndAngle = $Plots["Angle"][$Key-1]; } } + + if ( $StartAngle < 180 ) + { + $Points = ""; + $Points[] = $Plots["InX2"]; + $Points[] = $Plots["InY2"]; + $Points[] = $Plots["InX2"]; + $Points[] = $Plots["InY2"]-$SliceHeight; + $Points[] = $Plots["OutX1"]; + $Points[] = $Plots["OutY1"]-$SliceHeight; + $Points[] = $Plots["OutX1"]; + $Points[] = $Plots["OutY1"]; + + $this->pChartObject->drawPolygon($Points,$Settings); + } + + if ( $EndAngle > 180 ) + { + $Points = ""; + $Points[] = $Plots["InX1"]; + $Points[] = $Plots["InY1"]; + $Points[] = $Plots["InX1"]; + $Points[] = $Plots["InY1"]-$SliceHeight; + $Points[] = $Plots["OutX2"]; + $Points[] = $Plots["OutY2"]-$SliceHeight; + $Points[] = $Plots["OutX2"]; + $Points[] = $Plots["OutY2"]; + + $this->pChartObject->drawPolygon($Points,$Settings); + } + } + + + /* Draw the vertical edges (visible) */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; + + $StartAngle = $Plots["Angle"][0]; + foreach($Plots["Angle"] as $Key =>$Angle) { if ($Angle == VOID) { $EndAngle = $Plots["Angle"][$Key-1]; } } + + if ( $StartAngle <= 270 && $StartAngle >= 90 ) + $this->pChartObject->drawLine($Plots["OutX1"],$Plots["OutY1"],$Plots["OutX1"],$Plots["OutY1"]-$SliceHeight,$Settings); + if ( $EndAngle <= 270 && $EndAngle >= 90 ) + $this->pChartObject->drawLine($Plots["OutX2"],$Plots["OutY2"],$Plots["OutX2"],$Plots["OutY2"]-$SliceHeight,$Settings); + } + + + /* Draw the outer vertical slices */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $Settings["R"] = $Settings["R"]+$Cf; $Settings["G"] = $Settings["G"]+$Cf; $Settings["B"] = $Settings["B"]+$Cf; + + $Outer = TRUE; $Inner = FALSE; + $OuterPlotsA = ""; $OuterPlotsB = ""; $InnerPlotsA = ""; $InnerPlotsB = ""; + foreach($Plots["Angle"] as $ID => $Angle) + { + if ( $Angle == VOID ) + { $Outer = FALSE; $Inner = TRUE; } + elseif( $Outer ) + { + if ( ( $Angle > 90 && $Angle < 270 ) && isset($Plots["BottomPoly"][$ID*2]) ) + { + $Xo = $Plots["BottomPoly"][$ID*2]; + $Yo = $Plots["BottomPoly"][$ID*2+1]; + + $OuterPlotsA[] = $Xo; $OuterPlotsA[] = $Yo; + $OuterPlotsB[] = $Xo; $OuterPlotsB[] = $Yo-$SliceHeight; + } + } + } + if ( $OuterPlotsA != "" ) + { $OuterPlots = array_merge($OuterPlotsA,$this->arrayReverse($OuterPlotsB)); $this->pChartObject->drawPolygon($OuterPlots,$Settings); } + } + + $Slices = array_reverse($Slices); + $SliceColors = array_reverse($SliceColors); + + + /* Draw the top pie splice */ + foreach($Slices as $SliceID => $Plots) + { + $Settings = $SliceColors[$SliceID]; $Settings["NoBorder"] = TRUE; + $Settings["R"] = $Settings["R"]+$Cf*2; $Settings["G"] = $Settings["G"]+$Cf*2; $Settings["B"] = $Settings["B"]+$Cf*2; + + $this->pChartObject->drawPolygon($Plots["TopPoly"],$Settings); + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("POLY",$this->arraySerialize($Plots["TopPoly"]),$this->pChartObject->toHTMLColor($Settings["R"],$Settings["G"],$Settings["B"]),$Data["Series"][$Data["Abscissa"]]["Data"][$SliceID],$Data["Series"][$DataSerie]["Data"][count($Slices)-$SliceID-1]); } + + foreach($Plots["AA"] as $Key => $Pos) + $this->pChartObject->drawAntialiasPixel($Pos[0],$Pos[1]-$SliceHeight,$Settings); + + $this->pChartObject->drawLine($Plots["InX1"],$Plots["InY1"]-$SliceHeight,$Plots["OutX2"],$Plots["OutY2"]-$SliceHeight,$Settings); + $this->pChartObject->drawLine($Plots["InX2"],$Plots["InY2"]-$SliceHeight,$Plots["OutX1"],$Plots["OutY1"]-$SliceHeight,$Settings); + } + + if ( $DrawLabels ) + { + $Offset = 360; + foreach($Values as $Key => $Value) + { + $StartAngle = $Offset; + $EndAngle = $Offset-($Value*$ScaleFactor); if ( $EndAngle < 0 ) { $EndAngle = 0; } + + if ( $LabelColor == PIE_LABEL_COLOR_AUTO ) + { $Settings = array("FillR"=>$Palette[$ID]["R"],"FillG"=>$Palette[$ID]["G"],"FillB"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"]);} + else + { $Settings = array("FillR"=>$LabelR,"FillG"=>$LabelG,"FillB"=>$LabelB,"Alpha"=>$LabelAlpha); } + + $Angle = ($EndAngle - $Offset)/2 + $Offset; + $Xc = cos(($Angle-90)*PI/180) * ($OuterRadius+$DataGapRadius) + $X; + $Yc = sin(($Angle-90)*PI/180) * ($OuterRadius+$DataGapRadius)*$SkewFactor + $Y; + + if ( $WriteValues == PIE_VALUE_PERCENTAGE ) + $Label = $Display = round(( 100 / $SerieSum ) * $Value,$Precision)."%"; + elseif ( $WriteValues == PIE_VALUE_NATURAL ) + $Label = $Data["Series"][$Data["Abscissa"]]["Data"][$Key]; + else + $Label = ""; + + if ( $LabelStacked ) + $this->writePieLabel($Xc,$Yc-$SliceHeight,$Label,$Angle,$Settings,TRUE,$X,$Y,$OuterRadius); + else + $this->writePieLabel($Xc,$Yc-$SliceHeight,$Label,$Angle,$Settings,FALSE); + + $Offset = $EndAngle - $DataGapAngle; $ID--; $Slice++; + } + } + if ( $DrawLabels && $LabelStacked ) { $this->writeShiftedLabels(); } + + $this->pChartObject->Shadow = $RestoreShadow; + + return(PIE_RENDERED); + } + + /* Serialize an array */ + function arraySerialize($Data) + { + $Result = ""; + foreach($Data as $Key => $Value) + { if ($Result == "") { $Result = floor($Value); } else { $Result = $Result.",".floor($Value); } } + + return($Result); + } + + /* Reverse an array */ + function arrayReverse($Plots) + { + $Result = ""; + + for($i=count($Plots)-1;$i>=0;$i=$i-2) + { $Result[] = $Plots[$i-1]; $Result[] = $Plots[$i]; } + + return($Result); + } + + /* Remove unused series & values */ + function clean0Values($Data,$Palette,$DataSerie,$AbscissaSerie) + { + $NewPalette = ""; $NewData = ""; $NewAbscissa = ""; + + /* Remove unused series */ + foreach($Data["Series"] as $SerieName => $SerieSettings) + { if ( $SerieName != $DataSerie && $SerieName != $AbscissaSerie ) { unset($Data["Series"][$SerieName]); } } + + /* Remove NULL values */ + foreach($Data["Series"][$DataSerie]["Data"] as $Key => $Value) + { + if ($Value != 0 ) + { + $NewData[] = $Value; + $NewAbscissa[] = $Data["Series"][$AbscissaSerie]["Data"][$Key]; + if ( isset($Palette[$Key]) ) { $NewPalette[] = $Palette[$Key]; } + } + } + $Data["Series"][$DataSerie]["Data"] = $NewData; + $Data["Series"][$AbscissaSerie]["Data"] = $NewAbscissa; + + return(array($Data,$NewPalette)); + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pRadar.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pRadar.class.php new file mode 100644 index 0000000..af15bbf --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pRadar.class.php @@ -0,0 +1,681 @@ +pChartObject = $Object; + + $FixedMax = isset($Format["FixedMax"]) ? $Format["FixedMax"] : VOID; + $AxisR = isset($Format["AxisR"]) ? $Format["AxisR"] : 60; + $AxisG = isset($Format["AxisG"]) ? $Format["AxisG"] : 60; + $AxisB = isset($Format["AxisB"]) ? $Format["AxisB"] : 60; + $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 50; + $AxisRotation = isset($Format["AxisRotation"]) ? $Format["AxisRotation"] : 0; + $DrawTicks = isset($Format["DrawTicks"]) ? $Format["DrawTicks"] : TRUE; + $TicksLength = isset($Format["TicksLength"]) ? $Format["TicksLength"] : 2; + $DrawAxisValues = isset($Format["DrawAxisValues"]) ? $Format["DrawAxisValues"] : TRUE; + $AxisBoxRounded = isset($Format["AxisBoxRounded"]) ? $Format["AxisBoxRounded"] : TRUE; + $AxisFontName = isset($Format["AxisFontName"]) ? $Format["AxisFontName"] : $this->pChartObject->FontName; + $AxisFontSize = isset($Format["AxisFontSize"]) ? $Format["AxisFontSize"] : $this->pChartObject->FontSize; + $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : FALSE; + $WriteValuesInBubble = isset($Format["WriteValuesInBubble"]) ? $Format["WriteValuesInBubble"] : TRUE; + $ValueFontName = isset($Format["ValueFontName"]) ? $Format["ValueFontName"] : $this->pChartObject->FontName; + $ValueFontSize = isset($Format["ValueFontSize"]) ? $Format["ValueFontSize"] : $this->pChartObject->FontSize; + $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 4; + $OuterBubbleRadius = isset($Format["OuterBubbleRadius"]) ? $Format["OuterBubbleRadius"] : 2; + $OuterBubbleR = isset($Format["OuterBubbleR"]) ? $Format["OuterBubbleR"] : VOID; + $OuterBubbleG = isset($Format["OuterBubbleG"]) ? $Format["OuterBubbleG"] : VOID; + $OuterBubbleB = isset($Format["OuterBubbleB"]) ? $Format["OuterBubbleB"] : VOID; + $OuterBubbleAlpha = isset($Format["OuterBubbleAlpha"]) ? $Format["OuterBubbleAlpha"] : 100; + $InnerBubbleR = isset($Format["InnerBubbleR"]) ? $Format["InnerBubbleR"] : 255; + $InnerBubbleG = isset($Format["InnerBubbleG"]) ? $Format["InnerBubbleG"] : 255; + $InnerBubbleB = isset($Format["InnerBubbleB"]) ? $Format["InnerBubbleB"] : 255; + $InnerBubbleAlpha = isset($Format["InnerBubbleAlpha"]) ? $Format["InnerBubbleAlpha"] : 100; + $DrawBackground = isset($Format["DrawBackground"]) ? $Format["DrawBackground"] : TRUE; + $BackgroundR = isset($Format["BackgroundR"]) ? $Format["BackgroundR"] : 255; + $BackgroundG = isset($Format["BackgroundG"]) ? $Format["BackgroundG"] : 255; + $BackgroundB = isset($Format["BackgroundB"]) ? $Format["BackgroundB"] : 255; + $BackgroundAlpha = isset($Format["BackgroundAlpha"]) ? $Format["BackgroundAlpha"] : 50; + $BackgroundGradient= isset($Format["BackgroundGradient"]) ? $Format["BackgroundGradient"] : NULL; + $Layout = isset($Format["Layout"]) ? $Format["Layout"] : RADAR_LAYOUT_STAR; + $SegmentHeight = isset($Format["SegmentHeight"]) ? $Format["SegmentHeight"] : SEGMENT_HEIGHT_AUTO; + $Segments = isset($Format["Segments"]) ? $Format["Segments"] : 4; + $WriteLabels = isset($Format["WriteLabels"]) ? $Format["WriteLabels"] : TRUE; + $SkipLabels = isset($Format["SkipLabels"]) ? $Format["SkipLabels"] : 1; + $LabelMiddle = isset($Format["LabelMiddle"]) ? $Format["LabelMiddle"] : FALSE; + $LabelsBackground = isset($Format["LabelsBackground"]) ? $Format["LabelsBackground"] : TRUE; + $LabelsBGR = isset($Format["LabelsBGR"]) ? $Format["LabelsBGR"] : 255; + $LabelsBGG = isset($Format["LabelsBGR"]) ? $Format["LabelsBGG"] : 255; + $LabelsBGB = isset($Format["LabelsBGR"]) ? $Format["LabelsBGB"] : 255; + $LabelsBGAlpha = isset($Format["LabelsBGAlpha"]) ? $Format["LabelsBGAlpha"] : 50; + $LabelPos = isset($Format["LabelPos"]) ? $Format["LabelPos"] : RADAR_LABELS_ROTATED; + $LabelPadding = isset($Format["LabelPadding"]) ? $Format["LabelPadding"] : 4; + $DrawPoints = isset($Format["DrawPoints"]) ? $Format["DrawPoints"] : TRUE; + $PointRadius = isset($Format["PointRadius"]) ? $Format["PointRadius"] : 4; + $PointSurrounding = isset($Format["PointRadius"]) ? $Format["PointRadius"] : -30; + $DrawLines = isset($Format["DrawLines"]) ? $Format["DrawLines"] : TRUE; + $LineLoopStart = isset($Format["LineLoopStart"]) ? $Format["LineLoopStart"] : TRUE; + $DrawPoly = isset($Format["DrawPoly"]) ? $Format["DrawPoly"] : FALSE; + $PolyAlpha = isset($Format["PolyAlpha"]) ? $Format["PolyAlpha"] : 40; + $FontSize = $Object->FontSize; + $X1 = $Object->GraphAreaX1; + $Y1 = $Object->GraphAreaY1; + $X2 = $Object->GraphAreaX2; + $Y2 = $Object->GraphAreaY2; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + /* Cancel default tick length if ticks not enabled */ + if ( $DrawTicks == FALSE ) { $TicksLength = 0; } + + /* Data Processing */ + $Data = $Values->getData(); + $Palette = $Values->getPalette(); + + /* Catch the number of required axis */ + $LabelSerie = $Data["Abscissa"]; + if ( $LabelSerie != "" ) + { $Points = count($Data["Series"][$LabelSerie]["Data"]); } + else + { + $Points = 0; + foreach($Data["Series"] as $SerieName => $DataArray) + { if ( count($DataArray["Data"]) > $Points ) { $Points = count($DataArray["Data"]); } } + } + + /* Draw the axis */ + $CenterX = ($X2-$X1)/2 + $X1; + $CenterY = ($Y2-$Y1)/2 + $Y1; + + $EdgeHeight = min(($X2-$X1)/2,($Y2-$Y1)/2); + if ( $WriteLabels ) + $EdgeHeight = $EdgeHeight - $FontSize - $LabelPadding - $TicksLength; + + /* Determine the scale if set to automatic */ + if ( $SegmentHeight == SEGMENT_HEIGHT_AUTO) + { + if ( $FixedMax != VOID ) + $Max = $FixedMax; + else + { + $Max = 0; + foreach($Data["Series"] as $SerieName => $DataArray) + { + if ( $SerieName != $LabelSerie ) + { + if ( max($DataArray["Data"]) > $Max ) { $Max = max($DataArray["Data"]); } + } + } + } + $MaxSegments = $EdgeHeight/20; + $Scale = $Object->computeScale(0,$Max,$MaxSegments,array(1,2,5)); + + $Segments = $Scale["Rows"]; + $SegmentHeight = $Scale["RowHeight"]; + } + + if ( $LabelMiddle && $SkipLabels == 1 ) + { $Axisoffset = (360/$Points)/2; } + elseif ( $LabelMiddle && $SkipLabels != 1 ) + { $Axisoffset = (360/($Points/$SkipLabels))/2; } + elseif ( !$LabelMiddle ) + { $Axisoffset = 0; } + + /* Background processing */ + if ( $DrawBackground ) + { + $RestoreShadow = $Object->Shadow; + $Object->Shadow = FALSE; + + if ($BackgroundGradient == NULL) + { + if ( $Layout == RADAR_LAYOUT_STAR ) + { + $Color = array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha); + $PointArray = ""; + for($i=0;$i<=360;$i=$i+(360/$Points)) + { + $PointArray[] = cos(deg2rad($i+$AxisRotation)) * $EdgeHeight + $CenterX; + $PointArray[] = sin(deg2rad($i+$AxisRotation)) * $EdgeHeight + $CenterY; + } + $Object->drawPolygon($PointArray,$Color); + } + elseif ( $Layout == RADAR_LAYOUT_CIRCLE ) + { + $Color = array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha); + $Object->drawFilledCircle($CenterX,$CenterY,$EdgeHeight,$Color); + } + } + else + { + $GradientROffset = ($BackgroundGradient["EndR"] - $BackgroundGradient["StartR"]) / $Segments; + $GradientGOffset = ($BackgroundGradient["EndG"] - $BackgroundGradient["StartG"]) / $Segments; + $GradientBOffset = ($BackgroundGradient["EndB"] - $BackgroundGradient["StartB"]) / $Segments; + $GradientAlphaOffset = ($BackgroundGradient["EndAlpha"] - $BackgroundGradient["StartAlpha"]) / $Segments; + + if ( $Layout == RADAR_LAYOUT_STAR ) + { + for($j=$Segments;$j>=1;$j--) + { + $Color = array("R"=>$BackgroundGradient["StartR"]+$GradientROffset*$j,"G"=>$BackgroundGradient["StartG"]+$GradientGOffset*$j,"B"=>$BackgroundGradient["StartB"]+$GradientBOffset*$j,"Alpha"=>$BackgroundGradient["StartAlpha"]+$GradientAlphaOffset*$j); + $PointArray = ""; + + for($i=0;$i<=360;$i=$i+(360/$Points)) + { + $PointArray[] = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; + $PointArray[] = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; + } + $Object->drawPolygon($PointArray,$Color); + } + } + elseif ( $Layout == RADAR_LAYOUT_CIRCLE ) + { + for($j=$Segments;$j>=1;$j--) + { + $Color = array("R"=>$BackgroundGradient["StartR"]+$GradientROffset*$j,"G"=>$BackgroundGradient["StartG"]+$GradientGOffset*$j,"B"=>$BackgroundGradient["StartB"]+$GradientBOffset*$j,"Alpha"=>$BackgroundGradient["StartAlpha"]+$GradientAlphaOffset*$j); + $Object->drawFilledCircle($CenterX,$CenterY,($EdgeHeight/$Segments)*$j,$Color); + } + } + } + $Object->Shadow = $RestoreShadow; + } + + /* Axis to axis lines */ + $Color = array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha); + $ColorDotted = array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha*.8, "Ticks"=>2); + if ( $Layout == RADAR_LAYOUT_STAR ) + { + for($j=1;$j<=$Segments;$j++) + { + for($i=0;$i<360;$i=$i+(360/$Points)) + { + $EdgeX1 = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; + $EdgeY1 = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; + $EdgeX2 = cos(deg2rad($i+$AxisRotation+(360/$Points))) * ($EdgeHeight/$Segments)*$j + $CenterX; + $EdgeY2 = sin(deg2rad($i+$AxisRotation+(360/$Points))) * ($EdgeHeight/$Segments)*$j + $CenterY; + + $Object->drawLine($EdgeX1,$EdgeY1,$EdgeX2,$EdgeY2,$Color); + } + } + } + elseif ( $Layout == RADAR_LAYOUT_CIRCLE ) + { + for($j=1;$j<=$Segments;$j++) + { + $Radius = ($EdgeHeight/$Segments)*$j; + $Object->drawCircle($CenterX,$CenterY,$Radius,$Radius,$Color); + } + } + + if ( $DrawAxisValues ) + { + if ( $LabelsBackground ) + $Options = array("DrawBox"=>TRUE, "Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"BoxR"=>$LabelsBGR,"BoxG"=>$LabelsBGG,"BoxB"=>$LabelsBGB,"BoxAlpha"=>$LabelsBGAlpha); + else + $Options = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE); + + if ( $AxisBoxRounded ) { $Options["BoxRounded"] = TRUE; } + + $Options["FontName"] = $AxisFontName; + $Options["FontSize"] = $AxisFontSize; + + $Angle = 360 / ($Points*2); + for($j=1;$j<=$Segments;$j++) + { + $Label = $j * $SegmentHeight; + + if ( $Layout == RADAR_LAYOUT_CIRCLE ) + { + $EdgeX1 = cos(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; + $EdgeY1 = sin(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; + } + elseif ( $Layout == RADAR_LAYOUT_STAR ) + { + $EdgeX1 = cos(deg2rad($AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; + $EdgeY1 = sin(deg2rad($AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; + $EdgeX2 = cos(deg2rad((360 / $Points) + $AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; + $EdgeY2 = sin(deg2rad((360 / $Points) + $AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; + + $EdgeX1 = ($EdgeX2 - $EdgeX1)/2 + $EdgeX1; + $EdgeY1 = ($EdgeY2 - $EdgeY1)/2 + $EdgeY1; + } + + $Object->drawText($EdgeX1,$EdgeY1,$Label,$Options); + } + } + + /* Axis lines */ + $ID = 0; + for($i=0;$i<360;$i=$i+(360/$Points)) + { + $EdgeX = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterX; + $EdgeY = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterY; + + if ($ID % $SkipLabels == 0) + { $Object->drawLine($CenterX,$CenterY,$EdgeX,$EdgeY,$Color); } + else + { $Object->drawLine($CenterX,$CenterY,$EdgeX,$EdgeY,$ColorDotted); } + + if ( $WriteLabels ) + { + $LabelX = cos(deg2rad($i+$AxisRotation+$Axisoffset)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterX; + $LabelY = sin(deg2rad($i+$AxisRotation+$Axisoffset)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterY; + + if ( $LabelSerie != "" ) + { $Label = isset($Data["Series"][$LabelSerie]["Data"][$ID]) ? $Data["Series"][$LabelSerie]["Data"][$ID] : ""; } + else + $Label = $ID; + + if ($ID % $SkipLabels == 0) + { + if ( $LabelPos == RADAR_LABELS_ROTATED ) + $Object->drawText($LabelX,$LabelY,$Label,array("Angle"=>(360-($i+$AxisRotation+$Axisoffset))-90,"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + else + { + if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } + if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMLEFT)); } + if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } + if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPLEFT)); } + if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMRIGHT)); } + if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); } + if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPRIGHT)); } + if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPMIDDLE)); } + } + } + } + $ID++; + } + + /* Compute the plots position */ + $ID = 0; $Plot = ""; + foreach($Data["Series"] as $SerieName => $DataS) + { + if ( $SerieName != $LabelSerie ) + { + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); + foreach($DataS["Data"] as $Key => $Value) + { + $Angle = (360/$Points) * $Key; + $Length = ($EdgeHeight/($Segments*$SegmentHeight))*$Value; + + $X = cos(deg2rad($Angle+$AxisRotation)) * $Length + $CenterX; + $Y = sin(deg2rad($Angle+$AxisRotation)) * $Length + $CenterY; + + $Plot[$ID][] = array($X,$Y,$Value); + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".floor($PointRadius),$this->pChartObject->toHTMLColor($Palette[$ID]["R"],$Palette[$ID]["G"],$Palette[$ID]["B"]),$DataS["Description"],$Data["Series"][$LabelSerie]["Data"][$Key]." = ".$Value); } + } + $ID++; + } + } + + /* Draw all that stuff! */ + foreach($Plot as $ID => $Points) + { + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); + + /* Draw the polygons */ + if ( $DrawPoly ) + { + if ($PolyAlpha != NULL) + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$PolyAlpha,"Surrounding"=>$PointSurrounding); + + $PointsArray = ""; + for($i=0; $idrawPolygon($PointsArray,$Color); + } + + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); + + /* Bubble and labels settings */ + $TextSettings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontName"=>$ValueFontName,"FontSize"=>$ValueFontSize,"R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"]); + $InnerColor = array("R"=>$InnerBubbleR,"G"=>$InnerBubbleG,"B"=>$InnerBubbleB,"Alpha"=>$InnerBubbleAlpha); + if ( $OuterBubbleR != VOID ) + $OuterColor = array("R"=>$OuterBubbleR,"G"=>$OuterBubbleG,"B"=>$OuterBubbleB,"Alpha"=>$OuterBubbleAlpha); + else + $OuterColor = array("R"=>$Palette[$ID]["R"]+20,"G"=>$Palette[$ID]["G"]+20,"B"=>$Palette[$ID]["B"]+20,"Alpha"=>$Palette[$ID]["Alpha"]); + + /* Loop to the starting points if asked */ + if ( $LineLoopStart && $DrawLines ) + $Object->drawLine($Points[count($Points)-1][0],$Points[count($Points)-1][1],$Points[0][0],$Points[0][1],$Color); + + /* Draw the lines & points */ + for($i=0; $idrawLine($Points[$i][0],$Points[$i][1],$Points[$i+1][0],$Points[$i+1][1],$Color); + + if ( $DrawPoints ) + $Object->drawFilledCircle($Points[$i][0],$Points[$i][1],$PointRadius,$Color); + + if ( $WriteValuesInBubble && $WriteValues ) + { + $TxtPos = $this->pChartObject->getTextBox($Points[$i][0],$Points[$i][1],$ValueFontName,$ValueFontSize,0,$Points[$i][2]); + $Radius = floor(($TxtPos[1]["X"] - $TxtPos[0]["X"] + $ValuePadding*2)/2); + + $this->pChartObject->drawFilledCircle($Points[$i][0],$Points[$i][1],$Radius+$OuterBubbleRadius,$OuterColor); + $this->pChartObject->drawFilledCircle($Points[$i][0],$Points[$i][1],$Radius,$InnerColor); + } + + if ( $WriteValues ) + $this->pChartObject->drawText($Points[$i][0]-1,$Points[$i][1]-1,$Points[$i][2],$TextSettings); + } + } + } + + + + /* Draw a radar chart */ + function drawPolar($Object,$Values,$Format="") + { + $this->pChartObject = $Object; + + $FixedMax = isset($Format["FixedMax"]) ? $Format["FixedMax"] : VOID; + $AxisR = isset($Format["AxisR"]) ? $Format["AxisR"] : 60; + $AxisG = isset($Format["AxisG"]) ? $Format["AxisG"] : 60; + $AxisB = isset($Format["AxisB"]) ? $Format["AxisB"] : 60; + $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 50; + $AxisRotation = isset($Format["AxisRotation"]) ? $Format["AxisRotation"] : -90; + $DrawTicks = isset($Format["DrawTicks"]) ? $Format["DrawTicks"] : TRUE; + $TicksLength = isset($Format["TicksLength"]) ? $Format["TicksLength"] : 2; + $DrawAxisValues = isset($Format["DrawAxisValues"]) ? $Format["DrawAxisValues"] : TRUE; + $AxisBoxRounded = isset($Format["AxisBoxRounded"]) ? $Format["AxisBoxRounded"] : TRUE; + $AxisFontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; + $AxisFontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; + $WriteValues = isset($Format["WriteValues"]) ? $Format["WriteValues"] : FALSE; + $WriteValuesInBubble = isset($Format["WriteValuesInBubble"]) ? $Format["WriteValuesInBubble"] : TRUE; + $ValueFontName = isset($Format["ValueFontName"]) ? $Format["ValueFontName"] : $this->pChartObject->FontName; + $ValueFontSize = isset($Format["ValueFontSize"]) ? $Format["ValueFontSize"] : $this->pChartObject->FontSize; + $ValuePadding = isset($Format["ValuePadding"]) ? $Format["ValuePadding"] : 4; + $OuterBubbleRadius = isset($Format["OuterBubbleRadius"]) ? $Format["OuterBubbleRadius"] : 2; + $OuterBubbleR = isset($Format["OuterBubbleR"]) ? $Format["OuterBubbleR"] : VOID; + $OuterBubbleG = isset($Format["OuterBubbleG"]) ? $Format["OuterBubbleG"] : VOID; + $OuterBubbleB = isset($Format["OuterBubbleB"]) ? $Format["OuterBubbleB"] : VOID; + $OuterBubbleAlpha = isset($Format["OuterBubbleAlpha"]) ? $Format["OuterBubbleAlpha"] : 100; + $InnerBubbleR = isset($Format["InnerBubbleR"]) ? $Format["InnerBubbleR"] : 255; + $InnerBubbleG = isset($Format["InnerBubbleG"]) ? $Format["InnerBubbleG"] : 255; + $InnerBubbleB = isset($Format["InnerBubbleB"]) ? $Format["InnerBubbleB"] : 255; + $InnerBubbleAlpha = isset($Format["InnerBubbleAlpha"]) ? $Format["InnerBubbleAlpha"] : 100; + $DrawBackground = isset($Format["DrawBackground"]) ? $Format["DrawBackground"] : TRUE; + $BackgroundR = isset($Format["BackgroundR"]) ? $Format["BackgroundR"] : 255; + $BackgroundG = isset($Format["BackgroundG"]) ? $Format["BackgroundG"] : 255; + $BackgroundB = isset($Format["BackgroundB"]) ? $Format["BackgroundB"] : 255; + $BackgroundAlpha = isset($Format["BackgroundAlpha"]) ? $Format["BackgroundAlpha"] : 50; + $BackgroundGradient= isset($Format["BackgroundGradient"]) ? $Format["BackgroundGradient"] : NULL; + $AxisSteps = isset($Format["AxisSteps"]) ? $Format["AxisSteps"] : 20; + $SegmentHeight = isset($Format["SegmentHeight"]) ? $Format["SegmentHeight"] : SEGMENT_HEIGHT_AUTO; + $Segments = isset($Format["Segments"]) ? $Format["Segments"] : 4; + $WriteLabels = isset($Format["WriteLabels"]) ? $Format["WriteLabels"] : TRUE; + $LabelsBackground = isset($Format["LabelsBackground"]) ? $Format["LabelsBackground"] : TRUE; + $LabelsBGR = isset($Format["LabelsBGR"]) ? $Format["LabelsBGR"] : 255; + $LabelsBGG = isset($Format["LabelsBGR"]) ? $Format["LabelsBGG"] : 255; + $LabelsBGB = isset($Format["LabelsBGR"]) ? $Format["LabelsBGB"] : 255; + $LabelsBGAlpha = isset($Format["LabelsBGAlpha"]) ? $Format["LabelsBGAlpha"] : 50; + $LabelPos = isset($Format["LabelPos"]) ? $Format["LabelPos"] : RADAR_LABELS_ROTATED; + $LabelPadding = isset($Format["LabelPadding"]) ? $Format["LabelPadding"] : 4; + $DrawPoints = isset($Format["DrawPoints"]) ? $Format["DrawPoints"] : TRUE; + $PointRadius = isset($Format["PointRadius"]) ? $Format["PointRadius"] : 4; + $PointSurrounding = isset($Format["PointRadius"]) ? $Format["PointRadius"] : -30; + $DrawLines = isset($Format["DrawLines"]) ? $Format["DrawLines"] : TRUE; + $LineLoopStart = isset($Format["LineLoopStart"]) ? $Format["LineLoopStart"] : FALSE; + $DrawPoly = isset($Format["DrawPoly"]) ? $Format["DrawPoly"] : FALSE; + $PolyAlpha = isset($Format["PolyAlpha"]) ? $Format["PolyAlpha"] : NULL; + $FontSize = $Object->FontSize; + $X1 = $Object->GraphAreaX1; + $Y1 = $Object->GraphAreaY1; + $X2 = $Object->GraphAreaX2; + $Y2 = $Object->GraphAreaY2; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + + if ( $AxisBoxRounded ) { $DrawAxisValues = TRUE; } + + /* Cancel default tick length if ticks not enabled */ + if ( $DrawTicks == FALSE ) { $TicksLength = 0; } + + /* Data Processing */ + $Data = $Values->getData(); + $Palette = $Values->getPalette(); + + /* Catch the number of required axis */ + $LabelSerie = $Data["Abscissa"]; + if ( $LabelSerie != "" ) + { $Points = count($Data["Series"][$LabelSerie]["Data"]); } + else + { + $Points = 0; + foreach($Data["Series"] as $SerieName => $DataArray) + { if ( count($DataArray["Data"]) > $Points ) { $Points = count($DataArray["Data"]); } } + } + + /* Draw the axis */ + $CenterX = ($X2-$X1)/2 + $X1; + $CenterY = ($Y2-$Y1)/2 + $Y1; + + $EdgeHeight = min(($X2-$X1)/2,($Y2-$Y1)/2); + if ( $WriteLabels ) + $EdgeHeight = $EdgeHeight - $FontSize - $LabelPadding - $TicksLength; + + /* Determine the scale if set to automatic */ + if ( $SegmentHeight == SEGMENT_HEIGHT_AUTO) + { + if ( $FixedMax != VOID ) + $Max = $FixedMax; + else + { + $Max = 0; + foreach($Data["Series"] as $SerieName => $DataArray) + { + if ( $SerieName != $LabelSerie ) + { + if ( max($DataArray["Data"]) > $Max ) { $Max = max($DataArray["Data"]); } + } + } + } + $MaxSegments = $EdgeHeight/20; + $Scale = $Object->computeScale(0,$Max,$MaxSegments,array(1,2,5)); + + $Segments = $Scale["Rows"]; + $SegmentHeight = $Scale["RowHeight"]; + } + + + /* Background processing */ + if ( $DrawBackground ) + { + $RestoreShadow = $Object->Shadow; + $Object->Shadow = FALSE; + + if ($BackgroundGradient == NULL) + { + $Color = array("R"=>$BackgroundR,"G"=>$BackgroundG,"B"=>$BackgroundB,"Alpha"=>$BackgroundAlpha); + $Object->drawFilledCircle($CenterX,$CenterY,$EdgeHeight,$Color); + } + else + { + $GradientROffset = ($BackgroundGradient["EndR"] - $BackgroundGradient["StartR"]) / $Segments; + $GradientGOffset = ($BackgroundGradient["EndG"] - $BackgroundGradient["StartG"]) / $Segments; + $GradientBOffset = ($BackgroundGradient["EndB"] - $BackgroundGradient["StartB"]) / $Segments; + $GradientAlphaOffset = ($BackgroundGradient["EndAlpha"] - $BackgroundGradient["StartAlpha"]) / $Segments; + + for($j=$Segments;$j>=1;$j--) + { + $Color = array("R"=>$BackgroundGradient["StartR"]+$GradientROffset*$j,"G"=>$BackgroundGradient["StartG"]+$GradientGOffset*$j,"B"=>$BackgroundGradient["StartB"]+$GradientBOffset*$j,"Alpha"=>$BackgroundGradient["StartAlpha"]+$GradientAlphaOffset*$j); + $Object->drawFilledCircle($CenterX,$CenterY,($EdgeHeight/$Segments)*$j,$Color); + } + } + $Object->Shadow = $RestoreShadow; + } + + /* Axis to axis lines */ + $Color = array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha); + for($j=1;$j<=$Segments;$j++) + { + $Radius = ($EdgeHeight/$Segments)*$j; + $Object->drawCircle($CenterX,$CenterY,$Radius,$Radius,$Color); + } + + if ( $DrawAxisValues ) + { + if ( $LabelsBackground ) + $Options = array("DrawBox"=>TRUE, "Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"BoxR"=>$LabelsBGR,"BoxG"=>$LabelsBGG,"BoxB"=>$LabelsBGB,"BoxAlpha"=>$LabelsBGAlpha); + else + $Options = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE); + + if ( $AxisBoxRounded ) { $Options["BoxRounded"] = TRUE; } + + $Options["FontName"] = $AxisFontName; + $Options["FontSize"] = $AxisFontSize; + + $Angle = 360 / ($Points*2); + for($j=1;$j<=$Segments;$j++) + { + $EdgeX1 = cos(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterX; + $EdgeY1 = sin(deg2rad($Angle+$AxisRotation)) * ($EdgeHeight/$Segments)*$j + $CenterY; + $Label = $j*$SegmentHeight; + + $Object->drawText($EdgeX1,$EdgeY1,$Label,$Options); + } + } + + /* Axis lines */ + $ID = 0; + for($i=0;$i<=359;$i=$i+$AxisSteps) + { + $EdgeX = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterX; + $EdgeY = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$TicksLength) + $CenterY; + + $Object->drawLine($CenterX,$CenterY,$EdgeX,$EdgeY,$Color); + + if ( $WriteLabels ) + { + $LabelX = cos(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterX; + $LabelY = sin(deg2rad($i+$AxisRotation)) * ($EdgeHeight+$LabelPadding+$TicksLength) + $CenterY; + $Label = $i."°"; + + if ( $LabelPos == RADAR_LABELS_ROTATED ) + $Object->drawText($LabelX,$LabelY,$Label,array("Angle"=>(360-$i),"Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + else + { + if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); } + if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMLEFT)); } + if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); } + if ( (floor($LabelX) > floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPLEFT)); } + if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) < floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_BOTTOMRIGHT)); } + if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) == floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); } + if ( (floor($LabelX) < floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPRIGHT)); } + if ( (floor($LabelX) == floor($CenterX)) && (floor($LabelY) > floor($CenterY)) ) { $Object->drawText($LabelX,$LabelY,$Label,array("Align"=>TEXT_ALIGN_TOPMIDDLE)); } + } + } + $ID++; + } + + /* Compute the plots position */ + $ID = 0; $Plot = ""; + foreach($Data["Series"] as $SerieName => $DataSet) + { + if ( $SerieName != $LabelSerie ) + { + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); + foreach($DataSet["Data"] as $Key => $Value) + { + $Angle = $Data["Series"][$LabelSerie]["Data"][$Key]; + $Length = ($EdgeHeight/($Segments*$SegmentHeight))*$Value; + + $X = cos(deg2rad($Angle+$AxisRotation)) * $Length + $CenterX; + $Y = sin(deg2rad($Angle+$AxisRotation)) * $Length + $CenterY; + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".floor($PointRadius),$this->pChartObject->toHTMLColor($Palette[$ID]["R"],$Palette[$ID]["G"],$Palette[$ID]["B"]),$DataSet["Description"],$Data["Series"][$LabelSerie]["Data"][$Key]."° = ".$Value); } + + $Plot[$ID][] = array($X,$Y,$Value); + } + $ID++; + } + } + + /* Draw all that stuff! */ + foreach($Plot as $ID => $Points) + { + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); + + /* Draw the polygons */ + if ( $DrawPoly ) + { + if ($PolyAlpha != NULL) + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$PolyAlpha,"Surrounding"=>$PointSurrounding); + + $PointsArray = ""; + for($i=0; $idrawPolygon($PointsArray,$Color); + } + + $Color = array("R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"],"Alpha"=>$Palette[$ID]["Alpha"],"Surrounding"=>$PointSurrounding); + + /* Bubble and labels settings */ + $TextSettings = array("Align"=>TEXT_ALIGN_MIDDLEMIDDLE,"FontName"=>$ValueFontName,"FontSize"=>$ValueFontSize,"R"=>$Palette[$ID]["R"],"G"=>$Palette[$ID]["G"],"B"=>$Palette[$ID]["B"]); + $InnerColor = array("R"=>$InnerBubbleR,"G"=>$InnerBubbleG,"B"=>$InnerBubbleB,"Alpha"=>$InnerBubbleAlpha); + if ( $OuterBubbleR != VOID ) + $OuterColor = array("R"=>$OuterBubbleR,"G"=>$OuterBubbleG,"B"=>$OuterBubbleB,"Alpha"=>$OuterBubbleAlpha); + else + $OuterColor = array("R"=>$Palette[$ID]["R"]+20,"G"=>$Palette[$ID]["G"]+20,"B"=>$Palette[$ID]["B"]+20,"Alpha"=>$Palette[$ID]["Alpha"]); + + /* Loop to the starting points if asked */ + if ( $LineLoopStart && $DrawLines ) + $Object->drawLine($Points[count($Points)-1][0],$Points[count($Points)-1][1],$Points[0][0],$Points[0][1],$Color); + + /* Draw the lines & points */ + for($i=0; $idrawLine($Points[$i][0],$Points[$i][1],$Points[$i+1][0],$Points[$i+1][1],$Color); + + if ( $DrawPoints ) + $Object->drawFilledCircle($Points[$i][0],$Points[$i][1],$PointRadius,$Color); + + if ( $WriteValuesInBubble && $WriteValues ) + { + $TxtPos = $this->pChartObject->getTextBox($Points[$i][0],$Points[$i][1],$ValueFontName,$ValueFontSize,0,$Points[$i][2]); + $Radius = floor(($TxtPos[1]["X"] - $TxtPos[0]["X"] + $ValuePadding*2)/2); + + $this->pChartObject->drawFilledCircle($Points[$i][0],$Points[$i][1],$Radius+$OuterBubbleRadius,$OuterColor); + $this->pChartObject->drawFilledCircle($Points[$i][0],$Points[$i][1],$Radius,$InnerColor); + } + + if ( $WriteValues ) + $this->pChartObject->drawText($Points[$i][0]-1,$Points[$i][1]-1,$Points[$i][2],$TextSettings); + } + } + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pScatter.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pScatter.class.php new file mode 100644 index 0000000..a83ce39 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pScatter.class.php @@ -0,0 +1,1158 @@ +pChartObject = $pChartObject; + $this->pDataObject = $pDataObject; + } + + /* Prepare the scale */ + function drawScatterScale($Format="") + { + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : SCALE_MODE_FLOATING; + $Floating = isset($Format["Floating"]) ? $Format["Floating"] : FALSE; + $XLabelsRotation = isset($Format["XLabelsRotation"]) ? $Format["XLabelsRotation"] : 90; + $MinDivHeight = isset($Format["MinDivHeight"]) ? $Format["MinDivHeight"] : 20; + $Factors = isset($Format["Factors"]) ? $Format["Factors"] : array(1,2,5); + $ManualScale = isset($Format["ManualScale"]) ? $Format["ManualScale"] : array("0"=>array("Min"=>-100,"Max"=>100)); + $XMargin = isset($Format["XMargin"]) ? $Format["XMargin"] : 0; + $YMargin = isset($Format["YMargin"]) ? $Format["YMargin"] : 0; + $ScaleSpacing = isset($Format["ScaleSpacing"]) ? $Format["ScaleSpacing"] : 15; + $InnerTickWidth = isset($Format["InnerTickWidth"]) ? $Format["InnerTickWidth"] : 2; + $OuterTickWidth = isset($Format["OuterTickWidth"]) ? $Format["OuterTickWidth"] : 2; + $DrawXLines = isset($Format["DrawXLines"]) ? $Format["DrawXLines"] : ALL; + $DrawYLines = isset($Format["DrawYLines"]) ? $Format["DrawYLines"] : ALL; + $GridTicks = isset($Format["GridTicks"]) ? $Format["GridTicks"] : 4; + $GridR = isset($Format["GridR"]) ? $Format["GridR"] : 255; + $GridG = isset($Format["GridG"]) ? $Format["GridG"] : 255; + $GridB = isset($Format["GridB"]) ? $Format["GridB"] : 255; + $GridAlpha = isset($Format["GridAlpha"]) ? $Format["GridAlpha"] : 40; + $AxisRo = isset($Format["AxisR"]) ? $Format["AxisR"] : 0; + $AxisGo = isset($Format["AxisG"]) ? $Format["AxisG"] : 0; + $AxisBo = isset($Format["AxisB"]) ? $Format["AxisB"] : 0; + $AxisAlpha = isset($Format["AxisAlpha"]) ? $Format["AxisAlpha"] : 100; + $TickRo = isset($Format["TickR"]) ? $Format["TickR"] : 0; + $TickGo = isset($Format["TickG"]) ? $Format["TickG"] : 0; + $TickBo = isset($Format["TickB"]) ? $Format["TickB"] : 0; + $TickAlpha = isset($Format["TickAlpha"]) ? $Format["TickAlpha"] : 100; + $DrawSubTicks = isset($Format["DrawSubTicks"]) ? $Format["DrawSubTicks"] : FALSE; + $InnerSubTickWidth = isset($Format["InnerSubTickWidth"]) ? $Format["InnerSubTickWidth"] : 0; + $OuterSubTickWidth = isset($Format["OuterSubTickWidth"]) ? $Format["OuterSubTickWidth"] : 2; + $SubTickR = isset($Format["SubTickR"]) ? $Format["SubTickR"] : 255; + $SubTickG = isset($Format["SubTickG"]) ? $Format["SubTickG"] : 0; + $SubTickB = isset($Format["SubTickB"]) ? $Format["SubTickB"] : 0; + $SubTickAlpha = isset($Format["SubTickAlpha"]) ? $Format["SubTickAlpha"] : 100; + $XReleasePercent = isset($Format["XReleasePercent"]) ? $Format["XReleasePercent"] : 1; + $DrawArrows = isset($Format["DrawArrows"]) ? $Format["DrawArrows"] : FALSE; + $ArrowSize = isset($Format["ArrowSize"]) ? $Format["ArrowSize"] : 8; + $CycleBackground = isset($Format["CycleBackground"]) ? $Format["CycleBackground"] : FALSE; + $BackgroundR1 = isset($Format["BackgroundR1"]) ? $Format["BackgroundR1"] : 255; + $BackgroundG1 = isset($Format["BackgroundG1"]) ? $Format["BackgroundG1"] : 255; + $BackgroundB1 = isset($Format["BackgroundB1"]) ? $Format["BackgroundB1"] : 255; + $BackgroundAlpha1 = isset($Format["BackgroundAlpha1"]) ? $Format["BackgroundAlpha1"] : 10; + $BackgroundR2 = isset($Format["BackgroundR2"]) ? $Format["BackgroundR2"] : 230; + $BackgroundG2 = isset($Format["BackgroundG2"]) ? $Format["BackgroundG2"] : 230; + $BackgroundB2 = isset($Format["BackgroundB2"]) ? $Format["BackgroundB2"] : 230; + $BackgroundAlpha2 = isset($Format["BackgroundAlpha2"]) ? $Format["BackgroundAlpha2"] : 10; + + /* Check if we have at least both one X and Y axis */ + $GotXAxis = FALSE; $GotYAxis = FALSE; + foreach($this->pDataObject->Data["Axis"] as $AxisID => $AxisSettings) + { + if ( $AxisSettings["Identity"] == AXIS_X ) { $GotXAxis = TRUE; } + if ( $AxisSettings["Identity"] == AXIS_Y ) { $GotYAxis = TRUE; } + } + if ( !$GotXAxis ) { return(SCATTER_MISSING_X_SERIE); } + if ( !$GotYAxis ) { return(SCATTER_MISSING_Y_SERIE); } + + /* Skip a NOTICE event in case of an empty array */ + if ( $DrawYLines == NONE ) { $DrawYLines = array("zarma"=>"31"); } + + $Data = $this->pDataObject->getData(); + + foreach($Data["Axis"] as $AxisID => $AxisSettings) + { + if ( $AxisSettings["Identity"] == AXIS_X) + { $Width = $this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1 - $XMargin*2; } + else + { $Width = $this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1 - $YMargin*2; } + + $AxisMin = ABSOLUTE_MAX; $AxisMax = OUT_OF_SIGHT; + if ( $Mode == SCALE_MODE_FLOATING ) + { + foreach($Data["Series"] as $SerieID => $SerieParameter) + { + if ( $SerieParameter["Axis"] == $AxisID && $Data["Series"][$SerieID]["isDrawable"] ) + { + $AxisMax = max($AxisMax,$Data["Series"][$SerieID]["Max"]); + $AxisMin = min($AxisMin,$Data["Series"][$SerieID]["Min"]); + } + } + $AutoMargin = (($AxisMax-$AxisMin)/100)*$XReleasePercent; + + $Data["Axis"][$AxisID]["Min"] = $AxisMin-$AutoMargin; $Data["Axis"][$AxisID]["Max"] = $AxisMax+$AutoMargin; + } + elseif ( $Mode == SCALE_MODE_MANUAL ) + { + if ( isset($ManualScale[$AxisID]["Min"]) && isset($ManualScale[$AxisID]["Max"]) ) + { + $Data["Axis"][$AxisID]["Min"] = $ManualScale[$AxisID]["Min"]; + $Data["Axis"][$AxisID]["Max"] = $ManualScale[$AxisID]["Max"]; + } + else + { echo "Manual scale boundaries not set."; exit(); } + } + + /* Full manual scale */ + if ( isset($ManualScale[$AxisID]["Rows"]) && isset($ManualScale[$AxisID]["RowHeight"]) ) + $Scale = array("Rows"=>$ManualScale[$AxisID]["Rows"],"RowHeight"=>$ManualScale[$AxisID]["RowHeight"],"XMin"=>$ManualScale[$AxisID]["Min"],"XMax"=>$ManualScale[$AxisID]["Max"]); + else + { + $MaxDivs = floor($Width/$MinDivHeight); + $Scale = $this->pChartObject->computeScale($Data["Axis"][$AxisID]["Min"],$Data["Axis"][$AxisID]["Max"],$MaxDivs,$Factors,$AxisID); + } + + $Data["Axis"][$AxisID]["Margin"] = $AxisSettings["Identity"] == AXIS_X ? $XMargin : $YMargin; + $Data["Axis"][$AxisID]["ScaleMin"] = $Scale["XMin"]; + $Data["Axis"][$AxisID]["ScaleMax"] = $Scale["XMax"]; + $Data["Axis"][$AxisID]["Rows"] = $Scale["Rows"]; + $Data["Axis"][$AxisID]["RowHeight"] = $Scale["RowHeight"]; + + if ( isset($Scale["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = $Scale["Format"]; } + + if ( !isset($Data["Axis"][$AxisID]["Display"]) ) { $Data["Axis"][$AxisID]["Display"] = NULL; } + if ( !isset($Data["Axis"][$AxisID]["Format"]) ) { $Data["Axis"][$AxisID]["Format"] = NULL; } + if ( !isset($Data["Axis"][$AxisID]["Unit"]) ) { $Data["Axis"][$AxisID]["Unit"] = NULL; } + } + + /* Get the default font color */ + $FontColorRo = $this->pChartObject->FontColorR; $FontColorGo = $this->pChartObject->FontColorG; $FontColorBo = $this->pChartObject->FontColorB; + + /* Set the original boundaries */ + $AxisPos["L"] = $this->pChartObject->GraphAreaX1; $AxisPos["R"] = $this->pChartObject->GraphAreaX2; $AxisPos["T"] = $this->pChartObject->GraphAreaY1; $AxisPos["B"] = $this->pChartObject->GraphAreaY2; + + foreach($Data["Axis"] as $AxisID => $AxisSettings) + { + if ( isset($AxisSettings["Color"]) ) + { + $AxisR = $AxisSettings["Color"]["R"]; $AxisG = $AxisSettings["Color"]["G"]; $AxisB = $AxisSettings["Color"]["B"]; + $TickR = $AxisSettings["Color"]["R"]; $TickG = $AxisSettings["Color"]["G"]; $TickB = $AxisSettings["Color"]["B"]; + $this->pChartObject->setFontProperties(array("R"=>$AxisSettings["Color"]["R"],"G"=>$AxisSettings["Color"]["G"],"B"=>$AxisSettings["Color"]["B"])); + } + else + { + $AxisR = $AxisRo; $AxisG = $AxisGo; $AxisB = $AxisBo; + $TickR = $TickRo; $TickG = $TickGo; $TickB = $TickBo; + $this->pChartObject->setFontProperties(array("R"=>$FontColorRo,"G"=>$FontColorGo,"B"=>$FontColorBo)); + } + + $LastValue = "w00t"; $ID = 1; + if ( $AxisSettings["Identity"] == AXIS_X ) + { + if ( $AxisSettings["Position"] == AXIS_POSITION_BOTTOM ) + { + if ( $XLabelsRotation == 0 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $LabelOffset = 2; } + if ( $XLabelsRotation > 0 && $XLabelsRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $LabelOffset = 5; } + if ( $XLabelsRotation == 180 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $LabelOffset = 5; } + if ( $XLabelsRotation > 180 && $XLabelsRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $LabelOffset = 2; } + + if ( $Floating ) + { $FloatingOffset = $YMargin; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$AxisSettings["Margin"],$AxisPos["B"],$this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1,$AxisPos["B"],$this->pChartObject->GraphAreaX2,$AxisPos["B"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->pChartObject->drawArrow($this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["B"],$this->pChartObject->GraphAreaX2+($ArrowSize*2),$AxisPos["B"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Width = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) - $AxisSettings["Margin"]*2; + $Step = $Width / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MaxBottom = $AxisPos["B"]; + $LastX = NULL; + for($i=0;$i<=$AxisSettings["Rows"];$i++) + { + $XPos = $this->pChartObject->GraphAreaX1 + $AxisSettings["Margin"] + $Step*$i; + $YPos = $AxisPos["B"]; + $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastX != NULL && $CycleBackground && ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) )) { $this->pChartObject->drawFilledRectangle($LastX,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,$BGColor); } + + if ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) ) { $this->pChartObject->drawLine($XPos,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) + $this->pChartObject->drawLine($XPos+$SubTicksSize,$YPos-$InnerSubTickWidth,$XPos+$SubTicksSize,$YPos+$OuterSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->pChartObject->drawLine($XPos,$YPos-$InnerTickWidth,$XPos,$YPos+$OuterTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->pChartObject->drawText($XPos,$YPos+$OuterTickWidth+$LabelOffset,$Value,array("Angle"=>$XLabelsRotation,"Align"=>$LabelAlign)); + $TxtBottom = $YPos+2+$OuterTickWidth+2+($Bounds[0]["Y"]-$Bounds[2]["Y"]); + $MaxBottom = max($MaxBottom,$TxtBottom); + + $LastX = $XPos; + } + + if ( isset($AxisSettings["Name"]) ) + { + $YPos = $MaxBottom+2; + $XPos = $this->pChartObject->GraphAreaX1+($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1)/2; + $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_TOPMIDDLE)); + $MaxBottom = $Bounds[0]["Y"]; + + $this->pDataObject->Data["GraphArea"]["Y2"] = $MaxBottom + $this->pChartObject->FontSize; + } + + $AxisPos["B"] = $MaxBottom + $ScaleSpacing; + } + elseif ( $AxisSettings["Position"] == AXIS_POSITION_TOP ) + { + if ( $XLabelsRotation == 0 ) { $LabelAlign = TEXT_ALIGN_BOTTOMMIDDLE; $LabelOffset = 2; } + if ( $XLabelsRotation > 0 && $XLabelsRotation < 190 ) { $LabelAlign = TEXT_ALIGN_MIDDLELEFT; $LabelOffset = 2; } + if ( $XLabelsRotation == 180 ) { $LabelAlign = TEXT_ALIGN_TOPMIDDLE; $LabelOffset = 5; } + if ( $XLabelsRotation > 180 && $SLabelxRotation < 360 ) { $LabelAlign = TEXT_ALIGN_MIDDLERIGHT; $LabelOffset = 5; } + + if ( $Floating ) + { $FloatingOffset = $YMargin; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$AxisSettings["Margin"],$AxisPos["T"],$this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1,$AxisPos["T"],$this->pChartObject->GraphAreaX2,$AxisPos["T"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->pChartObject->drawArrow($this->pChartObject->GraphAreaX2-$AxisSettings["Margin"],$AxisPos["T"],$this->pChartObject->GraphAreaX2+($ArrowSize*2),$AxisPos["T"],array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Width = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) - $AxisSettings["Margin"]*2; + $Step = $Width / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MinTop = $AxisPos["T"]; + $LastX = NULL; + for($i=0;$i<=$AxisSettings["Rows"];$i++) + { + $XPos = $this->pChartObject->GraphAreaX1 + $AxisSettings["Margin"] + $Step*$i; + $YPos = $AxisPos["T"]; + $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastX != NULL && $CycleBackground && ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) )) { $this->pChartObject->drawFilledRectangle($LastX,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,$BGColor); } + + if ( $DrawXLines == ALL || in_array($AxisID,$DrawXLines) ) { $this->pChartObject->drawLine($XPos,$this->pChartObject->GraphAreaY1+$FloatingOffset,$XPos,$this->pChartObject->GraphAreaY2-$FloatingOffset,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) + $this->pChartObject->drawLine($XPos+$SubTicksSize,$YPos-$OuterSubTickWidth,$XPos+$SubTicksSize,$YPos+$InnerSubTickWidth,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->pChartObject->drawLine($XPos,$YPos-$OuterTickWidth,$XPos,$YPos+$InnerTickWidth,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->pChartObject->drawText($XPos,$YPos-$OuterTickWidth-$LabelOffset,$Value,array("Angle"=>$XLabelsRotation,"Align"=>$LabelAlign)); + $TxtBox = $YPos-$OuterTickWidth-4-($Bounds[0]["Y"]-$Bounds[2]["Y"]); + $MinTop = min($MinTop,$TxtBox); + + $LastX = $XPos; + } + + if ( isset($AxisSettings["Name"]) ) + { + $YPos = $MinTop-2; + $XPos = $this->pChartObject->GraphAreaX1+($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1)/2; + $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE)); + $MinTop = $Bounds[2]["Y"]; + + $this->pDataObject->Data["GraphArea"]["Y1"] = $MinTop; + } + + $AxisPos["T"] = $MinTop - $ScaleSpacing; + } + } + elseif ( $AxisSettings["Identity"] == AXIS_Y ) + { + if ( $AxisSettings["Position"] == AXIS_POSITION_LEFT ) + { + + if ( $Floating ) + { $FloatingOffset = $XMargin; $this->pChartObject->drawLine($AxisPos["L"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["L"],$this->pChartObject->GraphAreaY2-$AxisSettings["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->pChartObject->drawLine($AxisPos["L"],$this->pChartObject->GraphAreaY1,$AxisPos["L"],$this->pChartObject->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->pChartObject->drawArrow($AxisPos["L"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["L"],$this->pChartObject->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Height = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) - $AxisSettings["Margin"]*2; + $Step = $Height / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MinLeft = $AxisPos["L"]; + $LastY = NULL; + for($i=0;$i<=$AxisSettings["Rows"];$i++) + { + $YPos = $this->pChartObject->GraphAreaY2 - $AxisSettings["Margin"] - $Step*$i; + $XPos = $AxisPos["L"]; + $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->pChartObject->drawFilledRectangle($this->pChartObject->GraphAreaX1+$FloatingOffset,$LastY,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } + + if ( ($YPos != $this->pChartObject->GraphAreaY1 && $YPos != $this->pChartObject->GraphAreaY2) && ($DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$FloatingOffset,$YPos,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) + $this->pChartObject->drawLine($XPos-$OuterSubTickWidth,$YPos-$SubTicksSize,$XPos+$InnerSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->pChartObject->drawLine($XPos-$OuterTickWidth,$YPos,$XPos+$InnerTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->pChartObject->drawText($XPos-$OuterTickWidth-2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLERIGHT)); + $TxtLeft = $XPos-$OuterTickWidth-2-($Bounds[1]["X"]-$Bounds[0]["X"]); + $MinLeft = min($MinLeft,$TxtLeft); + + $LastY = $YPos; + } + + if ( isset($AxisSettings["Name"]) ) + { + $XPos = $MinLeft-2; + $YPos = $this->pChartObject->GraphAreaY1+($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1)/2; + $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>90)); + $MinLeft = $Bounds[2]["X"]; + + $this->pDataObject->Data["GraphArea"]["X1"] = $MinLeft; + } + + $AxisPos["L"] = $MinLeft - $ScaleSpacing; + } + elseif ( $AxisSettings["Position"] == AXIS_POSITION_RIGHT ) + { + + if ( $Floating ) + { $FloatingOffset = $XMargin; $this->pChartObject->drawLine($AxisPos["R"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["R"],$this->pChartObject->GraphAreaY2-$AxisSettings["Margin"],array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + else + { $FloatingOffset = 0; $this->pChartObject->drawLine($AxisPos["R"],$this->pChartObject->GraphAreaY1,$AxisPos["R"],$this->pChartObject->GraphAreaY2,array("R"=>$AxisR,"G"=>$AxisG,"B"=>$AxisB,"Alpha"=>$AxisAlpha)); } + + if ( $DrawArrows ) { $this->pChartObject->drawArrow($AxisPos["R"],$this->pChartObject->GraphAreaY1+$AxisSettings["Margin"],$AxisPos["R"],$this->pChartObject->GraphAreaY1-($ArrowSize*2),array("FillR"=>$AxisR,"FillG"=>$AxisG,"FillB"=>$AxisB,"Size"=>$ArrowSize)); } + + $Height = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) - $AxisSettings["Margin"]*2; + $Step = $Height / $AxisSettings["Rows"]; $SubTicksSize = $Step /2; $MaxLeft = $AxisPos["R"]; + $LastY = NULL; + for($i=0;$i<=$AxisSettings["Rows"];$i++) + { + $YPos = $this->pChartObject->GraphAreaY2 - $AxisSettings["Margin"] - $Step*$i; + $XPos = $AxisPos["R"]; + $Value = $this->pChartObject->scaleFormat($AxisSettings["ScaleMin"] + $AxisSettings["RowHeight"]*$i,$AxisSettings["Display"],$AxisSettings["Format"],$AxisSettings["Unit"]); + + if ( $i%2 == 1 ) { $BGColor = array("R"=>$BackgroundR1,"G"=>$BackgroundG1,"B"=>$BackgroundB1,"Alpha"=>$BackgroundAlpha1); } else { $BGColor = array("R"=>$BackgroundR2,"G"=>$BackgroundG2,"B"=>$BackgroundB2,"Alpha"=>$BackgroundAlpha2); } + if ( $LastY != NULL && $CycleBackground && ( $DrawYLines == ALL || in_array($AxisID,$DrawYLines) )) { $this->pChartObject->drawFilledRectangle($this->pChartObject->GraphAreaX1+$FloatingOffset,$LastY,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,$BGColor); } + + if ( ($YPos != $this->pChartObject->GraphAreaY1 && $YPos != $this->pChartObject->GraphAreaY2) && ($DrawYLines == ALL || in_array($AxisID,$DrawYLines)) ) { $this->pChartObject->drawLine($this->pChartObject->GraphAreaX1+$FloatingOffset,$YPos,$this->pChartObject->GraphAreaX2-$FloatingOffset,$YPos,array("R"=>$GridR,"G"=>$GridG,"B"=>$GridB,"Alpha"=>$GridAlpha,"Ticks"=>$GridTicks)); } + + if ( $DrawSubTicks && $i != $AxisSettings["Rows"] ) + $this->pChartObject->drawLine($XPos-$InnerSubTickWidth,$YPos-$SubTicksSize,$XPos+$OuterSubTickWidth,$YPos-$SubTicksSize,array("R"=>$SubTickR,"G"=>$SubTickG,"B"=>$SubTickB,"Alpha"=>$SubTickAlpha)); + + $this->pChartObject->drawLine($XPos-$InnerTickWidth,$YPos,$XPos+$OuterTickWidth,$YPos,array("R"=>$TickR,"G"=>$TickG,"B"=>$TickB,"Alpha"=>$TickAlpha)); + $Bounds = $this->pChartObject->drawText($XPos+$OuterTickWidth+2,$YPos,$Value,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); + $TxtLeft = $XPos+$OuterTickWidth+2+($Bounds[1]["X"]-$Bounds[0]["X"]); + $MaxLeft = max($MaxLeft,$TxtLeft); + + $LastY = $YPos; + } + + if ( isset($AxisSettings["Name"]) ) + { + $XPos = $MaxLeft+6; + $YPos = $this->pChartObject->GraphAreaY1+($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1)/2; + $Bounds = $this->pChartObject->drawText($XPos,$YPos,$AxisSettings["Name"],array("Align"=>TEXT_ALIGN_BOTTOMMIDDLE,"Angle"=>270)); + $MaxLeft = $Bounds[2]["X"]; + + $this->pDataObject->Data["GraphArea"]["X2"] = $MaxLeft + $this->pChartObject->FontSize; + } + + $AxisPos["R"] = $MaxLeft + $ScaleSpacing; + } + } + } + + $this->pDataObject->saveAxisConfig($Data["Axis"]); + } + + /* Draw a scatter plot chart */ + function drawScatterPlotChart($Format=NULL) + { + $PlotSize = isset($Format["PlotSize"]) ? $Format["PlotSize"] : 3; + $PlotBorder = isset($Format["PlotBorder"]) ? $Format["PlotBorder"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 250; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 250; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 250; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : 30; + $BorderSize = isset($Format["BorderSize"]) ? $Format["BorderSize"] : 1; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapTitle = isset($Format["ImageMapTitle"]) ? $Format["ImageMapTitle"] : NULL; + $ImageMapPrecision = isset($Format["ImageMapPrecision"]) ? $Format["ImageMapPrecision"] : 2; + + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + $BorderColor = array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha); + + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; + $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; + + if ( $ImageMapTitle == NULL ) { $Description = $Data["Series"][$Series["X"]]["Description"]." / ".$Data["Series"][$Series["Y"]]["Description"]; } else { $Description = $ImageMapTitle; } + + if ( isset($Series["Picture"]) && $Series["Picture"] != "" ) + { $Picture = $Series["Picture"]; list($PicWidth,$PicHeight,$PicType) = $this->pChartObject->getPicInfo($Picture); } + else + { $Picture = NULL; } + + $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); + if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } + $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); + if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } + + $Color = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); + + foreach($PosArrayX as $Key => $Value) + { + $X = $Value; $Y = $PosArrayY[$Key]; + + if ( $X != VOID && $Y != VOID ) + { + $RealValue = round($Data["Series"][$Series["X"]]["Data"][$Key],2)." / ".round($Data["Series"][$Series["Y"]]["Data"][$Key],2); + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".floor($PlotSize+$BorderSize),$this->pChartObject->toHTMLColor($Series["Color"]["R"],$Series["Color"]["G"],$Series["Color"]["B"]),$Description,$RealValue); } + + if( isset($Series["Shape"]) ) + { $this->pChartObject->drawShape($X,$Y,$Series["Shape"],$PlotSize,$PlotBorder,$BorderSize,$Series["Color"]["R"],$Series["Color"]["G"],$Series["Color"]["B"],$Series["Color"]["Alpha"],$BorderR,$BorderG,$BorderB,$BorderAlpha); } + elseif ( $Picture == NULL ) + { + if ( $PlotBorder ) { $this->pChartObject->drawFilledCircle($X,$Y,$PlotSize+$BorderSize,$BorderColor); } + $this->pChartObject->drawFilledCircle($X,$Y,$PlotSize,$Color); + } + else + { $this->pChartObject->drawFromPicture($PicType,$Picture,$X-$PicWidth/2,$Y-$PicHeight/2); } + } + } + } + } + } + + /* Draw a scatter line chart */ + function drawScatterLineChart($Format=NULL) + { + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapTitle = isset($Format["ImageMapTitle"]) ? $Format["ImageMapTitle"] : NULL; + $ImageMapPlotSize = isset($Format["ImageMapPlotSize"]) ? $Format["ImageMapPlotSize"] : 10; + $ImageMapPrecision = isset($Format["ImageMapPrecision"]) ? $Format["ImageMapPrecision"] : 2; + + /* Parse all the series to draw */ + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; + $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; + $Ticks = $Series["Ticks"]; + $Weight = $Series["Weight"]; + + if ( $ImageMapTitle == NULL ) { $Description = $Data["Series"][$Series["X"]]["Description"]." / ".$Data["Series"][$Series["Y"]]["Description"]; } else { $Description = $ImageMapTitle; } + + $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); + if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } + $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); + if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } + + $Color = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); + if ( $Ticks != 0 ) { $Color["Ticks"] = $Ticks; } + if ( $Weight != 0 ) { $Color["Weight"] = $Weight; } + + $LastX = VOID; $LastY = VOID; + foreach($PosArrayX as $Key => $Value) + { + $X = $Value; $Y = $PosArrayY[$Key]; + + if ( $X != VOID && $Y != VOID ) + { + $RealValue = round($Data["Series"][$Series["X"]]["Data"][$Key],2)." / ".round($Data["Series"][$Series["Y"]]["Data"][$Key],2); + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$ImageMapPlotSize,$this->pChartObject->toHTMLColor($Series["Color"]["R"],$Series["Color"]["G"],$Series["Color"]["B"]),$Description,$RealValue); } + } + + if ( $X != VOID && $Y != VOID && $LastX != VOID && $LastY != VOID) + $this->pChartObject->drawLine($LastX,$LastY,$X,$Y,$Color); + + $LastX = $X; $LastY = $Y; + } + } + } + } + + /* Draw a scatter spline chart */ + function drawScatterSplineChart($Format=NULL) + { + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapTitle = isset($Format["ImageMapTitle"]) ? $Format["ImageMapTitle"] : NULL; + $ImageMapPlotSize = isset($Format["ImageMapPlotSize"]) ? $Format["ImageMapPlotSize"] : 10; + $ImageMapPrecision = isset($Format["ImageMapPrecision"]) ? $Format["ImageMapPrecision"] : 2; + + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; + $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; + $Ticks = $Series["Ticks"]; + $Weight = $Series["Weight"]; + + if ( $ImageMapTitle == NULL ) { $Description = $Data["Series"][$Series["X"]]["Description"]." / ".$Data["Series"][$Series["Y"]]["Description"]; } else { $Description = $ImageMapTitle; } + + $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); + if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } + $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); + if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } + + $SplineSettings = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); + if ( $Ticks != 0 ) { $SplineSettings["Ticks"] = $Ticks; } + if ( $Weight != 0 ) { $SplineSettings["Weight"] = $Weight; } + + $LastX = VOID; $LastY = VOID; $WayPoints = ""; $Forces = ""; + foreach($PosArrayX as $Key => $Value) + { + $X = $Value; $Y = $PosArrayY[$Key]; + $Force = $this->pChartObject->getLength($LastX,$LastY,$X,$Y)/5; + + if ( $X != VOID && $Y != VOID ) + { + $RealValue = round($Data["Series"][$Series["X"]]["Data"][$Key],2)." / ".round($Data["Series"][$Series["Y"]]["Data"][$Key],2); + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("CIRCLE",floor($X).",".floor($Y).",".$ImageMapPlotSize,$this->pChartObject->toHTMLColor($Series["Color"]["R"],$Series["Color"]["G"],$Series["Color"]["B"]),$Description,$RealValue); } + } + + if ( $X != VOID && $Y != VOID ) + { $WayPoints[] = array($X,$Y); $Forces[] = $Force; } + + if ( $Y == VOID || $X == VOID ) + { $SplineSettings["Forces"] = $Forces; $this->pChartObject->drawSpline($WayPoints,$SplineSettings); $WayPoints = ""; $Forces = "";} + + $LastX = $X; $LastY = $Y; + } + $SplineSettings["Forces"] = $Forces; + $this->pChartObject->drawSpline($WayPoints,$SplineSettings); + } + } + } + + /* Return the scaled plot position */ + function getPosArray($Values,$AxisID) + { + $Data = $this->pDataObject->getData(); + + if ( !is_array($Values) ) { $Values = array($Values); } + + if ( $Data["Axis"][$AxisID]["Identity"] == AXIS_X ) + { + $Height = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) - $Data["Axis"][$AxisID]["Margin"]*2; + $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; + $Step = $Height / $ScaleHeight; + + $Result = ""; + foreach($Values as $Key => $Value) + { + if ( $Value == VOID ) + $Result[] = VOID; + else + $Result[] = $this->pChartObject->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"] + ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); + } + + if ( count($Result) == 1 ) { return($Result[0]); } else { return($Result); } + } + else + { + $Height = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) - $Data["Axis"][$AxisID]["Margin"]*2; + $ScaleHeight = $Data["Axis"][$AxisID]["ScaleMax"] - $Data["Axis"][$AxisID]["ScaleMin"]; + $Step = $Height / $ScaleHeight; + + $Result = ""; + foreach($Values as $Key => $Value) + { + if ( $Value == VOID ) + $Result[] = VOID; + else + $Result[] = $this->pChartObject->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"] - ($Step * ($Value-$Data["Axis"][$AxisID]["ScaleMin"])); + } + + if ( count($Result) == 1 ) { return($Result[0]); } else { return($Result); } + } + } + + /* Draw the legend of the active series */ + function drawScatterLegend($X,$Y,$Format="") + { + $Family = isset($Format["Family"]) ? $Format["Family"] : LEGEND_FAMILY_BOX; + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; + $FontR = isset($Format["FontR"]) ? $Format["FontR"] : $this->pChartObject->FontColorR; + $FontG = isset($Format["FontG"]) ? $Format["FontG"] : $this->pChartObject->FontColorG; + $FontB = isset($Format["FontB"]) ? $Format["FontB"] : $this->pChartObject->FontColorB; + $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 5; + $BoxHeight = isset($Format["BoxHeight"]) ? $Format["BoxHeight"] : 5; + $IconAreaWidth = isset($Format["IconAreaWidth"]) ? $Format["IconAreaWidth"] : $BoxWidth; + $IconAreaHeight = isset($Format["IconAreaHeight"]) ? $Format["IconAreaHeight"] : $BoxHeight; + $XSpacing = isset($Format["XSpacing"]) ? $Format["XSpacing"] : 5; + $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; + $R = isset($Format["R"]) ? $Format["R"] : 200; + $G = isset($Format["G"]) ? $Format["G"] : 200; + $B = isset($Format["B"]) ? $Format["B"] : 200; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 255; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 255; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 255; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; + + if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } + + $Data = $this->pDataObject->getData(); + + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE && isset($Series["Picture"])) + { + list($PicWidth,$PicHeight) = $this->pChartObject->getPicInfo($Series["Picture"]); + if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } + if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } + } + } + + $YStep = max($this->pChartObject->FontSize,$IconAreaHeight) + 5; + $XStep = $IconAreaWidth + 5; + $XStep = $XSpacing; + + $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + if ( $Mode == LEGEND_VERTICAL ) + { + $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Series["Description"]); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Lines = preg_split("/\n/",$Series["Description"]); + $vY = $vY + max($this->pChartObject->FontSize*count($Lines),$IconAreaHeight) + 5; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $Lines = preg_split("/\n/",$Series["Description"]); + $Width = ""; + foreach($Lines as $Key => $Value) + { + $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Width[] = $BoxArray[1]["X"]; + } + + $vX=max($Width)+$XStep; + } + } + } + $vY=$vY-$YStep; $vX=$vX-$XStep; + + $TopOffset = $Y - $Boundaries["T"]; + if ( $Boundaries["B"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries["B"] = $vY+$IconAreaHeight+$TopOffset; } + + if ( $Style == LEGEND_ROUND ) + $this->pChartObject->drawRoundedFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + elseif ( $Style == LEGEND_BOX ) + $this->pChartObject->drawFilledRectangle($Boundaries["L"]-$Margin,$Boundaries["T"]-$Margin,$Boundaries["R"]+$Margin,$Boundaries["B"]+$Margin,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"BorderR"=>$BorderR,"BorderG"=>$BorderG,"BorderB"=>$BorderB)); + + $RestoreShadow = $this->pChartObject->Shadow; $this->Shadow = FALSE; + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + $R = $Series["Color"]["R"]; $G = $Series["Color"]["G"]; $B = $Series["Color"]["B"]; + $Ticks = $Series["Ticks"]; $Weight = $Series["Weight"]; + + if ( isset($Series["Picture"]) ) + { + $Picture = $Series["Picture"]; + list($PicWidth,$PicHeight) = $this->pChartObject->getPicInfo($Picture); + $PicX = $X+$IconAreaWidth/2; $PicY = $Y+$IconAreaHeight/2; + + $this->pChartObject->drawFromPNG($PicX-$PicWidth/2,$PicY-$PicHeight/2,$Picture); + } + else + { + if ( $Family == LEGEND_FAMILY_BOX ) + { + if ( $BoxWidth != $IconAreaWidth ) { $XOffset = floor(($IconAreaWidth-$BoxWidth)/2); } else { $XOffset = 0; } + if ( $BoxHeight != $IconAreaHeight ) { $YOffset = floor(($IconAreaHeight-$BoxHeight)/2); } else { $YOffset = 0; } + + $this->pChartObject->drawFilledRectangle($X+1+$XOffset,$Y+1+$YOffset,$X+$BoxWidth+$XOffset+1,$Y+$BoxHeight+1+$YOffset,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + $this->pChartObject->drawFilledRectangle($X+$XOffset,$Y+$YOffset,$X+$BoxWidth+$XOffset,$Y+$BoxHeight+$YOffset,array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); + } + elseif ( $Family == LEGEND_FAMILY_CIRCLE ) + { + $this->pChartObject->drawFilledCircle($X+1+$IconAreaWidth/2,$Y+1+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20)); + $this->pChartObject->drawFilledCircle($X+$IconAreaWidth/2,$Y+$IconAreaHeight/2,min($IconAreaHeight/2,$IconAreaWidth/2),array("R"=>$R,"G"=>$G,"B"=>$B,"Surrounding"=>20)); + } + elseif ( $Family == LEGEND_FAMILY_LINE ) + { + $this->pChartObject->drawLine($X+1,$Y+1+$IconAreaHeight/2,$X+1+$IconAreaWidth,$Y+1+$IconAreaHeight/2,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>20,"Ticks"=>$Ticks,"Weight"=>$Weight)); + $this->pChartObject->drawLine($X,$Y+$IconAreaHeight/2,$X+$IconAreaWidth,$Y+$IconAreaHeight/2,array("R"=>$R,"G"=>$G,"B"=>$B,"Ticks"=>$Ticks,"Weight"=>$Weight)); + } + } + + if ( $Mode == LEGEND_VERTICAL ) + { + $Lines = preg_split("/\n/",$Series["Description"]); + foreach($Lines as $Key => $Value) + $this->pChartObject->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); + + $Y=$Y+max($this->pChartObject->FontSize*count($Lines),$IconAreaHeight) + 5; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $Lines = preg_split("/\n/",$Series["Description"]); + $Width = ""; + foreach($Lines as $Key => $Value) + { + $BoxArray = $this->pChartObject->drawText($X+$IconAreaWidth+4,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$Value,array("R"=>$FontR,"G"=>$FontG,"B"=>$FontB,"Align"=>TEXT_ALIGN_MIDDLELEFT)); + $Width[] = $BoxArray[1]["X"]; + } + $X=max($Width)+2+$XStep; + } + } + } + + $this->Shadow = $RestoreShadow; + } + + /* Get the legend box size */ + function getScatterLegendSize($Format="") + { + $FontName = isset($Format["FontName"]) ? $Format["FontName"] : $this->pChartObject->FontName; + $FontSize = isset($Format["FontSize"]) ? $Format["FontSize"] : $this->pChartObject->FontSize; + $BoxSize = isset($Format["BoxSize"]) ? $Format["BoxSize"] : 5; + $Margin = isset($Format["Margin"]) ? $Format["Margin"] : 5; + $Style = isset($Format["Style"]) ? $Format["Style"] : LEGEND_ROUND; + $Mode = isset($Format["Mode"]) ? $Format["Mode"] : LEGEND_VERTICAL; + + $YStep = max($this->pChartObject->FontSize,$BoxSize) + 5; + $XStep = $BoxSize + 5; + + $X=100; $Y=100; + + $Data = $this->pDataObject->getData(); + + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE && isset($Series["Picture"])) + { + list($PicWidth,$PicHeight) = $this->pChartObject->getPicInfo($Series["Picture"]); + if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; } + if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; } + } + } + + $YStep = max($this->pChartObject->FontSize,$IconAreaHeight) + 5; + $XStep = $IconAreaWidth + 5; + $XStep = $XSpacing; + + $Boundaries = ""; $Boundaries["L"] = $X; $Boundaries["T"] = $Y; $Boundaries["R"] = 0; $Boundaries["B"] = 0; $vY = $Y; $vX = $X; + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + if ( $Mode == LEGEND_VERTICAL ) + { + $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Series["Description"]); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Lines = preg_split("/\n/",$Series["Description"]); + $vY = $vY + max($this->pChartObject->FontSize*count($Lines),$IconAreaHeight) + 5; + } + elseif ( $Mode == LEGEND_HORIZONTAL ) + { + $Lines = preg_split("/\n/",$Series["Description"]); + $Width = ""; + foreach($Lines as $Key => $Value) + { + $BoxArray = $this->pChartObject->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->pChartObject->FontSize+3)*$Key),$FontName,$FontSize,0,$Value); + + if ( $Boundaries["T"] > $BoxArray[2]["Y"]+$IconAreaHeight/2 ) { $Boundaries["T"] = $BoxArray[2]["Y"]+$IconAreaHeight/2; } + if ( $Boundaries["R"] < $BoxArray[1]["X"]+2 ) { $Boundaries["R"] = $BoxArray[1]["X"]+2; } + if ( $Boundaries["B"] < $BoxArray[1]["Y"]+2+$IconAreaHeight/2 ) { $Boundaries["B"] = $BoxArray[1]["Y"]+2+$IconAreaHeight/2; } + + $Width[] = $BoxArray[1]["X"]; + } + + $vX=max($Width)+$XStep; + } + } + } + $vY=$vY-$YStep; $vX=$vX-$XStep; + + $TopOffset = $Y - $Boundaries["T"]; + if ( $Boundaries["B"]-($vY+$BoxSize) < $TopOffset ) { $Boundaries["B"] = $vY+$BoxSize+$TopOffset; } + + $Width = ($Boundaries["R"]+$Margin) - ($Boundaries["L"]-$Margin); + $Height = ($Boundaries["B"]+$Margin) - ($Boundaries["T"]-$Margin); + + return(array("Width"=>$Width,"Height"=>$Height)); + } + + /* Draw the line of best fit */ + function drawScatterBestFit($Format="") + { + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 0; + + $Data = $this->pDataObject->getData(); + + foreach($Data["ScatterSeries"] as $Key => $Series) + { + if ( $Series["isDrawable"] == TRUE ) + { + $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; + $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; + + $Color = array("R"=>$Series["Color"]["R"],"G"=>$Series["Color"]["G"],"B"=>$Series["Color"]["B"],"Alpha"=>$Series["Color"]["Alpha"]); + $Color["Ticks"] = $Ticks; + + $PosArrayX = $Data["Series"][$Series["X"]]["Data"]; + $PosArrayY = $Data["Series"][$Series["Y"]]["Data"]; + + $Sxy = 0; $Sx = 0; $Sy = 0; $Sxx = 0; + foreach($PosArrayX as $Key => $Value) + { + $X = $Value; $Y = $PosArrayY[$Key]; + + $Sxy = $Sxy + $X*$Y; + $Sx = $Sx + $X; + $Sy = $Sy + $Y; + $Sxx = $Sxx + $X*$X; + } + + $n = count($PosArrayX); + + if ((($n*$Sxx) == ($Sx*$Sx))) + { + $X1 = $this->getPosArray($Data["Axis"][$SerieXAxis]["ScaleMin"],$SerieXAxis); + $X2 = $X1; + $Y1 = $this->pChartObject->GraphAreaY1; + $Y2 = $this->pChartObject->GraphAreaY2; + } + else + { + $M = (($n*$Sxy)-($Sx*$Sy)) / (($n*$Sxx)-($Sx*$Sx)); + $B = (($Sy)-($M*$Sx))/($n); + + $X1 = $this->getPosArray($Data["Axis"][$SerieXAxis]["ScaleMin"],$SerieXAxis); + $Y1 = $this->getPosArray($M * $Data["Axis"][$SerieXAxis]["ScaleMin"] + $B,$SerieYAxis); + $X2 = $this->getPosArray($Data["Axis"][$SerieXAxis]["ScaleMax"],$SerieXAxis); + $Y2 = $this->getPosArray($M * $Data["Axis"][$SerieXAxis]["ScaleMax"] + $B,$SerieYAxis); + + $RealM = -($Y2-$Y1)/($X2-$X1); + + if ( $Y1 < $this->pChartObject->GraphAreaY1 ) { $X1 = $X1 + ($this->pChartObject->GraphAreaY1-$Y1/$RealM); $Y1 = $this->pChartObject->GraphAreaY1; } + if ( $Y1 > $this->pChartObject->GraphAreaY2 ) { $X1 = $X1 + ($Y1-$this->pChartObject->GraphAreaY2)/$RealM; $Y1 = $this->pChartObject->GraphAreaY2; } + if ( $Y2 < $this->pChartObject->GraphAreaY1 ) { $X2 = $X2 - ($this->pChartObject->GraphAreaY1-$Y2)/$RealM; $Y2 = $this->pChartObject->GraphAreaY1; } + if ( $Y2 > $this->pChartObject->GraphAreaY2 ) { $X2 = $X2 - ($Y2-$this->pChartObject->GraphAreaY2)/$RealM; $Y2 = $this->pChartObject->GraphAreaY2; } + } + + $this->pChartObject->drawLine($X1,$Y1,$X2,$Y2,$Color); + } + } + } + + function writeScatterLabel($ScatterSerieID,$Points,$Format="") + { + $OverrideTitle = isset($Format["OverrideTitle"]) ? $Format["OverrideTitle"] : NULL; + $DrawPoint = isset($Format["DrawPoint"]) ? $Format["DrawPoint"] : LABEL_POINT_BOX; + $Decimals = isset($Format["Decimals"]) ? $Format["Decimals"] : NULL; + + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + if ( !is_array($Points) ) { $Point = $Points; $Points = ""; $Points[0] = $Point; } + + if ( !isset($Data["ScatterSeries"][$ScatterSerieID]) ) + return(0); + + $Series = $Data["ScatterSeries"][$ScatterSerieID]; + $SerieX = $Series["X"]; $SerieValuesX = $Data["Series"][$SerieX]["Data"]; $SerieXAxis = $Data["Series"][$SerieX]["Axis"]; + $SerieY = $Series["Y"]; $SerieValuesY = $Data["Series"][$SerieY]["Data"]; $SerieYAxis = $Data["Series"][$SerieY]["Axis"]; + + $PosArrayX = $this->getPosArray($SerieValuesX,$SerieXAxis); + if ( !is_array($PosArrayX) ) { $Value = $PosArrayX; $PosArrayX = ""; $PosArrayX[0] = $Value; } + $PosArrayY = $this->getPosArray($SerieValuesY,$SerieYAxis); + if ( !is_array($PosArrayY) ) { $Value = $PosArrayY; $PosArrayY = ""; $PosArrayY[0] = $Value; } + + foreach($Points as $Key => $Point) + { + if ( isset($PosArrayX[$Point]) && isset($PosArrayY[$Point]) ) + { + $X = floor($PosArrayX[$Point]); + $Y = floor($PosArrayY[$Point]); + + if ( $DrawPoint == LABEL_POINT_CIRCLE ) + $this->pChartObject->drawFilledCircle($X,$Y,3,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + elseif ( $DrawPoint == LABEL_POINT_BOX ) + $this->pChartObject->drawFilledRectangle($X-2,$Y-2,$X+2,$Y+2,array("R"=>255,"G"=>255,"B"=>255,"BorderR"=>0,"BorderG"=>0,"BorderB"=>0)); + + $Serie = ""; + $Serie["R"] = $Series["Color"]["R"]; + $Serie["G"] = $Series["Color"]["G"]; + $Serie["B"] = $Series["Color"]["B"]; + $Serie["Alpha"] = $Series["Color"]["Alpha"]; + + $XAxisMode = $Data["Axis"][$SerieXAxis]["Display"]; + $XAxisFormat = $Data["Axis"][$SerieXAxis]["Format"]; + $XAxisUnit = $Data["Axis"][$SerieXAxis]["Unit"]; + if ( $Decimals == NULL ) { $XValue = $SerieValuesX[$Point]; } else { $XValue = round($SerieValuesX[$Point],$Decimals); } + $XValue = $this->pChartObject->scaleFormat($XValue,$XAxisMode,$XAxisFormat,$XAxisUnit); + + $YAxisMode = $Data["Axis"][$SerieYAxis]["Display"]; + $YAxisFormat = $Data["Axis"][$SerieYAxis]["Format"]; + $YAxisUnit = $Data["Axis"][$SerieYAxis]["Unit"]; + if ( $Decimals == NULL ) { $YValue = $SerieValuesY[$Point]; } else { $YValue = round($SerieValuesY[$Point],$Decimals); } + $YValue = $this->pChartObject->scaleFormat($YValue,$YAxisMode,$YAxisFormat,$YAxisUnit); + + $Caption = $XValue." / ".$YValue; + + if ( isset($Series["Description"]) ) + $Description = $Series["Description"]; + else + $Description = "No description"; + + $Series = ""; + $Series[] = array("Format"=>$Serie,"Caption"=>$Caption); + + $this->pChartObject->drawLabelBox($X,$Y-3,$Description,$Series,$Format); + } + } + } + + /* Draw a Scatter threshold */ + function drawScatterThreshold($Value,$Format="") + { + $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; + $R = isset($Format["R"]) ? $Format["R"] : 255; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 50; + $Weight = isset($Format["Weight"]) ? $Format["Weight"] : NULL; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 3; + $Wide = isset($Format["Wide"]) ? $Format["Wide"] : FALSE; + $WideFactor = isset($Format["WideFactor"]) ? $Format["WideFactor"] : 5; + $WriteCaption = isset($Format["WriteCaption"]) ? $Format["WriteCaption"] : FALSE; + $Caption = isset($Format["Caption"]) ? $Format["Caption"] : NULL; + $CaptionAlign = isset($Format["CaptionAlign"]) ? $Format["CaptionAlign"] : CAPTION_LEFT_TOP; + $CaptionOffset = isset($Format["CaptionOffset"]) ? $Format["CaptionOffset"] : 10; + $CaptionR = isset($Format["CaptionR"]) ? $Format["CaptionR"] : 255; + $CaptionG = isset($Format["CaptionG"]) ? $Format["CaptionG"] : 255; + $CaptionB = isset($Format["CaptionB"]) ? $Format["CaptionB"] : 255; + $CaptionAlpha = isset($Format["CaptionAlpha"]) ? $Format["CaptionAlpha"] : 100; + $DrawBox = isset($Format["DrawBox"]) ? $Format["DrawBox"] : TRUE; + $DrawBoxBorder = isset($Format["DrawBoxBorder"]) ? $Format["DrawBoxBorder"] : FALSE; + $BorderOffset = isset($Format["BorderOffset"]) ? $Format["BorderOffset"] : 5; + $BoxRounded = isset($Format["BoxRounded"]) ? $Format["BoxRounded"] : TRUE; + $RoundedRadius = isset($Format["RoundedRadius"]) ? $Format["RoundedRadius"] : 3; + $BoxR = isset($Format["BoxR"]) ? $Format["BoxR"] : 0; + $BoxG = isset($Format["BoxG"]) ? $Format["BoxG"] : 0; + $BoxB = isset($Format["BoxB"]) ? $Format["BoxB"] : 0; + $BoxAlpha = isset($Format["BoxAlpha"]) ? $Format["BoxAlpha"] : 20; + $BoxSurrounding = isset($Format["BoxSurrounding"]) ? $Format["BoxSurrounding"] : ""; + $BoxBorderR = isset($Format["BoxBorderR"]) ? $Format["BoxBorderR"] : 255; + $BoxBorderG = isset($Format["BoxBorderG"]) ? $Format["BoxBorderG"] : 255; + $BoxBorderB = isset($Format["BoxBorderB"]) ? $Format["BoxBorderB"] : 255; + $BoxBorderAlpha = isset($Format["BoxBorderAlpha"]) ? $Format["BoxBorderAlpha"] : 100; + + $CaptionSettings = array("DrawBox"=>$DrawBox,"DrawBoxBorder"=>$DrawBoxBorder,"BorderOffset"=>$BorderOffset,"BoxRounded"=>$BoxRounded,"RoundedRadius"=>$RoundedRadius, + "BoxR"=>$BoxR,"BoxG"=>$BoxG,"BoxB"=>$BoxB,"BoxAlpha"=>$BoxAlpha,"BoxSurrounding"=>$BoxSurrounding, + "BoxBorderR"=>$BoxBorderR,"BoxBorderG"=>$BoxBorderG,"BoxBorderB"=>$BoxBorderB,"BoxBorderAlpha"=>$BoxBorderAlpha, + "R"=>$CaptionR,"G"=>$CaptionG,"B"=>$CaptionB,"Alpha"=>$CaptionAlpha); + + if ( $Caption == NULL ) { $Caption = $Value; } + + $Data = $this->pDataObject->getData(); + + if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } + + if ( $Data["Axis"][$AxisID]["Identity"] == AXIS_Y ) + { + $X1 = $this->pChartObject->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"]; + $X2 = $this->pChartObject->GraphAreaX2 - $Data["Axis"][$AxisID]["Margin"]; + $Y = $this->getPosArray($Value,$AxisID); + + $this->pChartObject->drawLine($X1,$Y,$X2,$Y,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Wide ) + { + $this->pChartObject->drawLine($X1,$Y-1,$X2,$Y-1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + $this->pChartObject->drawLine($X1,$Y+1,$X2,$Y+1,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + } + + if ( $WriteCaption ) + { + if ( $CaptionAlign == CAPTION_LEFT_TOP ) + { $X = $this->pChartObject->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"] + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLELEFT; } + else + { $X = $this->pChartObject->GraphAreaX2 - $Data["Axis"][$AxisID]["Margin"] - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_MIDDLERIGHT; } + + $this->pChartObject->drawText($X,$Y,$Caption,$CaptionSettings); + } + + return(array("Y"=>$Y)); + } + elseif ( $Data["Axis"][$AxisID]["Identity"] == AXIS_X ) + { + $X = $this->getPosArray($Value,$AxisID); + $Y1 = $this->pChartObject->GraphAreaY1 + $Data["Axis"][$AxisID]["Margin"]; + $Y2 = $this->pChartObject->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"]; + + $this->pChartObject->drawLine($X,$Y1,$X,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks,"Weight"=>$Weight)); + + if ( $Wide ) + { + $this->pChartObject->drawLine($X-1,$Y1,$X-1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + $this->pChartObject->drawLine($X+1,$Y1,$X+1,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha/$WideFactor,"Ticks"=>$Ticks)); + } + + if ( $WriteCaption ) + { + if ( $CaptionAlign == CAPTION_LEFT_TOP ) + { $Y = $this->pChartObject->GraphAreaY1 + $Data["Axis"][$AxisID]["Margin"] + $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; } + else + { $Y = $this->pChartObject->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"] - $CaptionOffset; $CaptionSettings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; } + + $CaptionSettings["Align"] = TEXT_ALIGN_TOPMIDDLE; + $this->pChartObject->drawText($X,$Y,$Caption,$CaptionSettings); + } + + return(array("X"=>$X)); + } + } + + /* Draw a Scatter threshold area */ + function drawScatterThresholdArea($Value1,$Value2,$Format="") + { + $AxisID = isset($Format["AxisID"]) ? $Format["AxisID"] : 0; + $R = isset($Format["R"]) ? $Format["R"] : 255; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 20; + $Border = isset($Format["Border"]) ? $Format["Border"] : TRUE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : $R; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : $G; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : $B; + $BorderAlpha = isset($Format["BorderAlpha"]) ? $Format["BorderAlpha"] : $Alpha + 20; + $BorderTicks = isset($Format["BorderTicks"]) ? $Format["BorderTicks"] : 2; + $AreaName = isset($Format["AreaName"]) ? $Format["AreaName"] : "La ouate de phoque"; //NULL; + $NameAngle = isset($Format["NameAngle"]) ? $Format["NameAngle"] : ZONE_NAME_ANGLE_AUTO; + $NameR = isset($Format["NameR"]) ? $Format["NameR"] : 255; + $NameG = isset($Format["NameG"]) ? $Format["NameG"] : 255; + $NameB = isset($Format["NameB"]) ? $Format["NameB"] : 255; + $NameAlpha = isset($Format["NameAlpha"]) ? $Format["NameAlpha"] : 100; + $DisableShadowOnArea = isset($Format["DisableShadowOnArea"]) ? $Format["DisableShadowOnArea"] : TRUE; + + if ($Value1 > $Value2) { list($Value1, $Value2) = array($Value2, $Value1); } + + $RestoreShadow = $this->pChartObject->Shadow; + if ( $DisableShadowOnArea && $this->pChartObject->Shadow ) { $this->pChartObject->Shadow = FALSE; } + + if ($BorderAlpha >100) { $BorderAlpha = 100;} + + $Data = $this->pDataObject->getData(); + + if ( !isset($Data["Axis"][$AxisID]) ) { return(-1); } + + if ( $Data["Axis"][$AxisID]["Identity"] == AXIS_X ) + { + $Y1 = $this->pChartObject->GraphAreaY1 + $Data["Axis"][$AxisID]["Margin"]; + $Y2 = $this->pChartObject->GraphAreaY2 - $Data["Axis"][$AxisID]["Margin"]; + $X1 = $this->getPosArray($Value1,$AxisID); + $X2 = $this->getPosArray($Value2,$AxisID); + + if ( $X1 <= $this->pChartObject->GraphAreaX1 ) { $X1 = $this->pChartObject->GraphAreaX1+$Data["Axis"][$AxisID]["Margin"]; } + if ( $X2 >= $this->pChartObject->GraphAreaX2 ) { $X2 = $this->pChartObject->GraphAreaX2-$Data["Axis"][$AxisID]["Margin"]; } + + $this->pChartObject->drawFilledRectangle($X1,$Y1,$X2,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + if ( $Border ) + { + $this->pChartObject->drawLine($X1,$Y1,$X1,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + $this->pChartObject->drawLine($X2,$Y1,$X2,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + } + + if ( $AreaName != NULL ) + { + $XPos = ($X2-$X1)/2 + $X1; + $YPos = ($Y2-$Y1)/2 + $Y1; + + if ( $NameAngle == ZONE_NAME_ANGLE_AUTO ) + { + $TxtPos = $this->pChartObject->getTextBox($XPos,$YPos,$this->pChartObject->FontName,$this->pChartObject->FontSize,0,$AreaName); + $TxtWidth = $TxtPos[1]["X"] - $TxtPos[0]["X"]; + if ( abs($X2 - $X1) > $TxtWidth ) { $NameAngle = 0; } else { $NameAngle = 90; } + } + $this->pChartObject->Shadow = $RestoreShadow; + $this->pChartObject->drawText($XPos,$YPos,$AreaName,array("R"=>$NameR,"G"=>$NameG,"B"=>$NameB,"Alpha"=>$NameAlpha,"Angle"=>$NameAngle,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); + if ( $DisableShadowOnArea ) { $this->pChartObject->Shadow = FALSE; } + } + + $this->pChartObject->Shadow = $RestoreShadow; + return(array("X1"=>$X1,"X2"=>$X2)); + } + elseif ( $Data["Axis"][$AxisID]["Identity"] == AXIS_Y ) + { + $X1 = $this->pChartObject->GraphAreaX1 + $Data["Axis"][$AxisID]["Margin"]; + $X2 = $this->pChartObject->GraphAreaX2 - $Data["Axis"][$AxisID]["Margin"]; + $Y1 = $this->getPosArray($Value1,$AxisID); + $Y2 = $this->getPosArray($Value2,$AxisID); + + if ( $Y1 >= $this->pChartObject->GraphAreaY2 ) { $Y1 = $this->pChartObject->GraphAreaY2-$Data["Axis"][$AxisID]["Margin"]; } + if ( $Y2 <= $this->pChartObject->GraphAreaY1 ) { $Y2 = $this->pChartObject->GraphAreaY1+$Data["Axis"][$AxisID]["Margin"]; } + + $this->pChartObject->drawFilledRectangle($X1,$Y1,$X2,$Y2,array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha)); + + if ( $Border ) + { + $this->pChartObject->drawLine($X1,$Y1,$X2,$Y1,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + $this->pChartObject->drawLine($X1,$Y2,$X2,$Y2,array("R"=>$BorderR,"G"=>$BorderG,"B"=>$BorderB,"Alpha"=>$BorderAlpha,"Ticks"=>$BorderTicks)); + } + + if ( $AreaName != NULL ) + { + $XPos = ($X2-$X1)/2 + $X1; + $YPos = ($Y2-$Y1)/2 + $Y1; + + $this->pChartObject->Shadow = $RestoreShadow; + $this->pChartObject->drawText($YPos,$XPos,$AreaName,array("R"=>$NameR,"G"=>$NameG,"B"=>$NameB,"Alpha"=>$NameAlpha,"Angle"=>0,"Align"=>TEXT_ALIGN_MIDDLEMIDDLE)); + if ( $DisableShadowOnArea ) { $this->Shadow = FALSE; } + } + + $this->pChartObject->Shadow = $RestoreShadow; + return(array("Y1"=>$Y1,"Y2"=>$Y2)); + } + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSplit.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSplit.class.php new file mode 100644 index 0000000..248ffea --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSplit.class.php @@ -0,0 +1,131 @@ +pChartObject = $Object; + + $Spacing = isset($Format["Spacing"]) ? $Format["Spacing"] : 20; + $TextPadding = isset($Format["TextPadding"]) ? $Format["TextPadding"] : 2; + $TextPos = isset($Format["TextPos"]) ? $Format["TextPos"] : TEXT_POS_TOP; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : NULL; + $Force = isset($Format["Force"]) ? $Format["Force"] : 70; + $Segments = isset($Format["Segments"]) ? $Format["Segments"] : 15; + $FontSize = $Object->FontSize; + $X1 = $Object->GraphAreaX1; + $Y1 = $Object->GraphAreaY1; + $X2 = $Object->GraphAreaX2; + $Y2 = $Object->GraphAreaY2; + + /* Data Processing */ + $Data = $Values->getData(); + $Palette = $Values->getPalette(); + + $LabelSerie = $Data["Abscissa"]; + $DataSerie = ""; + + foreach($Data["Series"] as $SerieName => $Value) + { if ( $SerieName != $LabelSerie && $DataSerie == "" ) { $DataSerie = $SerieName; } } + + $DataSerieSum = array_sum($Data["Series"][$DataSerie]["Data"]); + $DataSerieCount = count($Data["Series"][$DataSerie]["Data"]); + + /* Scale Processing */ + if ( $TextPos == TEXT_POS_RIGHT ) + $YScale = (($Y2-$Y1) - (($DataSerieCount+1)*$Spacing)) / $DataSerieSum; + else + $YScale = (($Y2-$Y1) - ($DataSerieCount*$Spacing)) / $DataSerieSum; + $LeftHeight = $DataSerieSum * $YScale; + + /* Re-compute graph width depending of the text mode choosen */ + if ( $TextPos == TEXT_POS_RIGHT ) + { + $MaxWidth = 0; + foreach($Data["Series"][$LabelSerie]["Data"] as $Key => $Label) + { + $Boundardies = $Object->getTextBox(0,0,$Object->FontName,$Object->FontSize,0,$Label); + if ( $Boundardies[1]["X"] > $MaxWidth ) { $MaxWidth = $Boundardies[1]["X"] + $TextPadding*2; } + } + $X2 = $X2 - $MaxWidth; + } + + /* Drawing */ + $LeftY = ((($Y2-$Y1) / 2) + $Y1) - ($LeftHeight/2); + $RightY = $Y1; + $VectorX = (($X2-$X1) / 2); + + foreach($Data["Series"][$DataSerie]["Data"] as $Key => $Value) + { + if ( isset($Data["Series"][$LabelSerie]["Data"][$Key]) ) + $Label = $Data["Series"][$LabelSerie]["Data"][$Key]; + else + $Label = "-"; + + $LeftY1 = $LeftY; + $LeftY2 = $LeftY + $Value * $YScale; + + $RightY1 = $RightY + $Spacing; + $RightY2 = $RightY + $Spacing + $Value * $YScale;; + + $Settings = array("R"=>$Palette[$Key]["R"],"G"=>$Palette[$Key]["G"],"B"=>$Palette[$Key]["B"],"Alpha"=>$Palette[$Key]["Alpha"],"NoDraw"=>TRUE,"Segments"=>$Segments,"Surrounding"=>$Surrounding); + + $PolyGon = ""; + + $Angle = $Object->getAngle($X2,$RightY1,$X1,$LeftY1); + $VectorX1 = cos(deg2rad($Angle+90)) * $Force + ($X2-$X1)/2 + $X1; + $VectorY1 = sin(deg2rad($Angle+90)) * $Force + ($RightY1-$LeftY1)/2 + $LeftY1; + $VectorX2 = cos(deg2rad($Angle-90)) * $Force + ($X2-$X1)/2 + $X1; + $VectorY2 = sin(deg2rad($Angle-90)) * $Force + ($RightY1-$LeftY1)/2 + $LeftY1; + + $Points = $Object->drawBezier($X1,$LeftY1,$X2,$RightY1,$VectorX1,$VectorY1,$VectorX2,$VectorY2,$Settings); + foreach($Points as $Key => $Pos) { $PolyGon[] = $Pos["X"]; $PolyGon[] = $Pos["Y"]; } + + + $Angle = $Object->getAngle($X2,$RightY2,$X1,$LeftY2); + $VectorX1 = cos(deg2rad($Angle+90)) * $Force + ($X2-$X1)/2 +$X1; + $VectorY1 = sin(deg2rad($Angle+90)) * $Force + ($RightY2-$LeftY2)/2 + $LeftY2; + $VectorX2 = cos(deg2rad($Angle-90)) * $Force + ($X2-$X1)/2 +$X1; + $VectorY2 = sin(deg2rad($Angle-90)) * $Force + ($RightY2-$LeftY2)/2 + $LeftY2; + + $Points = $Object->drawBezier($X1,$LeftY2,$X2,$RightY2,$VectorX1,$VectorY1,$VectorX2,$VectorY2,$Settings); + $Points = array_reverse($Points); + foreach($Points as $Key => $Pos) { $PolyGon[] = $Pos["X"]; $PolyGon[] = $Pos["Y"]; } + + $Object->drawPolygon($PolyGon,$Settings); + + if ( $TextPos == TEXT_POS_RIGHT ) + $Object->drawText($X2+$TextPadding,($RightY2-$RightY1)/2+$RightY1,$Label,array("Align"=>TEXT_ALIGN_MIDDLELEFT)); + else + $Object->drawText($X2,$RightY1-$TextPadding,$Label,array("Align"=>TEXT_ALIGN_BOTTOMRIGHT)); + + $LeftY = $LeftY2; + $RightY = $RightY2; + } + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSpring.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSpring.class.php new file mode 100644 index 0000000..30ea1a6 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSpring.class.php @@ -0,0 +1,868 @@ +Data = ""; + $this->Links = ""; + + /* Set nodes defaults */ + $this->Default["R"] = 255; + $this->Default["G"] = 255; + $this->Default["B"] = 255; + $this->Default["Alpha"] = 100; + $this->Default["BorderR"] = 0; + $this->Default["BorderG"] = 0; + $this->Default["BorderB"] = 0; + $this->Default["BorderAlpha"] = 100; + $this->Default["Surrounding"] = NULL; + $this->Default["BackgroundR"] = 255; + $this->Default["BackgroundG"] = 255; + $this->Default["BackgroundB"] = 255; + $this->Default["BackgroundAlpha"] = 0; + $this->Default["Force"] = 1; + $this->Default["NodeType"] = NODE_TYPE_FREE; + $this->Default["Size"] = 5; + $this->Default["Shape"] = NODE_SHAPE_CIRCLE; + $this->Default["FreeZone"] = 40; + $this->Default["LinkR"] = 0; + $this->Default["LinkG"] = 0; + $this->Default["LinkB"] = 0; + $this->Default["LinkAlpha"] = 0; + + $this->Labels["Type"] = LABEL_CLASSIC; + $this->Labels["R"] = 0; + $this->Labels["G"] = 0; + $this->Labels["B"] = 0; + $this->Labels["Alpha"] = 100; + + $this->AutoComputeFreeZone = FALSE; + } + + /* Set default links options */ + function setLinkDefaults($Settings="") + { + if ( isset($Settings["R"]) ) { $this->Default["LinkR"] = $Settings["R"]; } + if ( isset($Settings["G"]) ) { $this->Default["LinkG"] = $Settings["G"]; } + if ( isset($Settings["B"]) ) { $this->Default["LinkB"] = $Settings["B"]; } + if ( isset($Settings["Alpha"]) ) { $this->Default["LinkAlpha"] = $Settings["Alpha"]; } + } + + /* Set default links options */ + function setLabelsSettings($Settings="") + { + if ( isset($Settings["Type"]) ) { $this->Labels["Type"] = $Settings["Type"]; } + if ( isset($Settings["R"]) ) { $this->Labels["R"] = $Settings["R"]; } + if ( isset($Settings["G"]) ) { $this->Labels["G"] = $Settings["G"]; } + if ( isset($Settings["B"]) ) { $this->Labels["B"] = $Settings["B"]; } + if ( isset($Settings["Alpha"]) ) { $this->Labels["Alpha"] = $Settings["Alpha"]; } + } + + /* Auto compute the FreeZone size based on the number of connections */ + function autoFreeZone() + { + /* Check connections reciprocity */ + foreach($this->Data as $Key => $Settings) + { + if ( isset($Settings["Connections"]) ) + { $this->Data[$Key]["FreeZone"] = count($Settings["Connections"])*10 + 20; } + else + { $this->Data[$Key]["FreeZone"] = 20; } + } + + } + + /* Set link properties */ + function linkProperties($FromNode,$ToNode,$Settings) + { + if ( !isset($this->Data[$FromNode]) ) { return(0); } + if ( !isset($this->Data[$ToNode]) ) { return(0); } + + $R = isset($Settings["R"]) ? $Settings["R"] : 0; + $G = isset($Settings["G"]) ? $Settings["G"] : 0; + $B = isset($Settings["B"]) ? $Settings["B"] : 0; + $Alpha = isset($Settings["Alpha"]) ? $Settings["Alpha"] : 100; + $Name = isset($Settings["Name"]) ? $Settings["Name"] : NULL; + $Ticks = isset($Settings["Ticks"]) ? $Settings["Ticks"] : NULL; + + $this->Links[$FromNode][$ToNode]["R"] = $R; $this->Links[$ToNode][$FromNode]["R"] = $R; + $this->Links[$FromNode][$ToNode]["G"] = $G; $this->Links[$ToNode][$FromNode]["G"] = $G; + $this->Links[$FromNode][$ToNode]["B"] = $B; $this->Links[$ToNode][$FromNode]["B"] = $B; + $this->Links[$FromNode][$ToNode]["Alpha"] = $Alpha; $this->Links[$ToNode][$FromNode]["Alpha"] = $Alpha; + $this->Links[$FromNode][$ToNode]["Name"] = $Name; $this->Links[$ToNode][$FromNode]["Name"] = $Name; + $this->Links[$FromNode][$ToNode]["Ticks"] = $Ticks; $this->Links[$ToNode][$FromNode]["Ticks"] = $Ticks; + } + + function setNodeDefaults($Settings="") + { + if ( isset($Settings["R"]) ) { $this->Default["R"] = $Settings["R"]; } + if ( isset($Settings["G"]) ) { $this->Default["G"] = $Settings["G"]; } + if ( isset($Settings["B"]) ) { $this->Default["B"] = $Settings["B"]; } + if ( isset($Settings["Alpha"]) ) { $this->Default["Alpha"] = $Settings["Alpha"]; } + if ( isset($Settings["BorderR"]) ) { $this->Default["BorderR"] = $Settings["BorderR"]; } + if ( isset($Settings["BorderG"]) ) { $this->Default["BorderG"] = $Settings["BorderG"]; } + if ( isset($Settings["BorderB"]) ) { $this->Default["BorderB"] = $Settings["BorderB"]; } + if ( isset($Settings["BorderAlpha"]) ) { $this->Default["BorderAlpha"] = $Settings["BorderAlpha"]; } + if ( isset($Settings["Surrounding"]) ) { $this->Default["Surrounding"] = $Settings["Surrounding"]; } + if ( isset($Settings["BackgroundR"]) ) { $this->Default["BackgroundR"] = $Settings["BackgroundR"]; } + if ( isset($Settings["BackgroundG"]) ) { $this->Default["BackgroundG"] = $Settings["BackgroundG"]; } + if ( isset($Settings["BackgroundB"]) ) { $this->Default["BackgroundB"] = $Settings["BackgroundB"]; } + if ( isset($Settings["BackgroundAlpha"]) ) { $this->Default["BackgroundAlpha"] = $Settings["BackgroundAlpha"]; } + if ( isset($Settings["NodeType"]) ) { $this->Default["NodeType"] = $Settings["NodeType"]; } + if ( isset($Settings["Size"]) ) { $this->Default["Size"] = $Settings["Size"]; } + if ( isset($Settings["Shape"]) ) { $this->Default["Shape"] = $Settings["Shape"]; } + if ( isset($Settings["FreeZone"]) ) { $this->Default["FreeZone"] = $Settings["FreeZone"]; } + } + + /* Add a node */ + function addNode($NodeID,$Settings="") + { + /* if the node already exists, ignore */ + if (isset($this->Data[$NodeID])) { return(0); } + + $Name = isset($Settings["Name"]) ? $Settings["Name"] : "Node ".$NodeID; + $Connections = isset($Settings["Connections"]) ? $Settings["Connections"] : NULL; + + $R = isset($Settings["R"]) ? $Settings["R"] : $this->Default["R"]; + $G = isset($Settings["G"]) ? $Settings["G"] : $this->Default["G"]; + $B = isset($Settings["B"]) ? $Settings["B"] : $this->Default["B"]; + $Alpha = isset($Settings["Alpha"]) ? $Settings["Alpha"] : $this->Default["Alpha"]; + $BorderR = isset($Settings["BorderR"]) ? $Settings["BorderR"] : $this->Default["BorderR"]; + $BorderG = isset($Settings["BorderG"]) ? $Settings["BorderG"] : $this->Default["BorderG"]; + $BorderB = isset($Settings["BorderB"]) ? $Settings["BorderB"] : $this->Default["BorderB"]; + $BorderAlpha = isset($Settings["BorderAlpha"]) ? $Settings["BorderAlpha"] : $this->Default["BorderAlpha"]; + $Surrounding = isset($Settings["Surrounding"]) ? $Settings["Surrounding"] : $this->Default["Surrounding"]; + $BackgroundR = isset($Settings["BackgroundR"]) ? $Settings["BackgroundR"] : $this->Default["BackgroundR"]; + $BackgroundG = isset($Settings["BackgroundG"]) ? $Settings["BackgroundG"] : $this->Default["BackgroundG"]; + $BackgroundB = isset($Settings["BackgroundB"]) ? $Settings["BackgroundB"] : $this->Default["BackgroundB"]; + $BackgroundAlpha = isset($Settings["BackgroundAlpha"]) ? $Settings["BackgroundAlpha"] : $this->Default["BackgroundAlpha"]; + $Force = isset($Settings["Force"]) ? $Settings["Force"] : $this->Default["Force"]; + $NodeType = isset($Settings["NodeType"]) ? $Settings["NodeType"] : $this->Default["NodeType"]; + $Size = isset($Settings["Size"]) ? $Settings["Size"] : $this->Default["Size"]; + $Shape = isset($Settings["Shape"]) ? $Settings["Shape"] : $this->Default["Shape"]; + $FreeZone = isset($Settings["FreeZone"]) ? $Settings["FreeZone"] : $this->Default["FreeZone"]; + + if ( $Surrounding != NULL ) { $BorderR = $R + $Surrounding; $BorderG = $G + $Surrounding; $BorderB = $B + $Surrounding; } + + $this->Data[$NodeID]["R"] = $R; $this->Data[$NodeID]["G"] = $G; $this->Data[$NodeID]["B"] = $B; $this->Data[$NodeID]["Alpha"] = $Alpha; + $this->Data[$NodeID]["BorderR"] = $BorderR; $this->Data[$NodeID]["BorderG"] = $BorderG; $this->Data[$NodeID]["BorderB"] = $BorderB; $this->Data[$NodeID]["BorderAlpha"] = $BorderAlpha; + $this->Data[$NodeID]["BackgroundR"] = $BackgroundR; $this->Data[$NodeID]["BackgroundG"] = $BackgroundG; $this->Data[$NodeID]["BackgroundB"] = $BackgroundB; $this->Data[$NodeID]["BackgroundAlpha"] = $BackgroundAlpha; + $this->Data[$NodeID]["Name"] = $Name; + $this->Data[$NodeID]["Force"] = $Force; + $this->Data[$NodeID]["Type"] = $NodeType; + $this->Data[$NodeID]["Size"] = $Size; + $this->Data[$NodeID]["Shape"] = $Shape; + $this->Data[$NodeID]["FreeZone"] = $FreeZone; + if ( $Connections != NULL ) + { + if ( is_array($Connections ) ) + { + foreach($Connections as $Key => $Value) + $this->Data[$NodeID]["Connections"][] = $Value; + } + else + $this->Data[$NodeID]["Connections"][] = $Connections; + } + } + + /* Set color attribute for a list of nodes */ + function setNodesColor($Nodes,$Settings="") + { + if ( is_array($Nodes) ) + { + foreach ($Nodes as $Key => $NodeID) + { + if (isset($this->Data[$NodeID]) ) + { + if ( isset($Settings["R"]) ) { $this->Data[$NodeID]["R"] = $Settings["R"]; } + if ( isset($Settings["G"]) ) { $this->Data[$NodeID]["G"] = $Settings["G"]; } + if ( isset($Settings["B"]) ) { $this->Data[$NodeID]["B"] = $Settings["B"]; } + if ( isset($Settings["Alpha"]) ) { $this->Data[$NodeID]["Alpha"] = $Settings["Alpha"]; } + if ( isset($Settings["BorderR"]) ) { $this->Data[$NodeID]["BorderR"] = $Settings["BorderR"]; } + if ( isset($Settings["BorderG"]) ) { $this->Data[$NodeID]["BorderG"] = $Settings["BorderG"]; } + if ( isset($Settings["BorderB"]) ) { $this->Data[$NodeID]["BorderB"] = $Settings["BorderB"]; } + if ( isset($Settings["BorderAlpha"]) ) { $this->Data[$NodeID]["BorderAlpha"] = $Settings["BorderAlpha"]; } + if ( isset($Settings["Surrounding"]) ) { $this->Data[$NodeID]["BorderR"] = $this->Data[$NodeID]["R"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderG"] = $this->Data[$NodeID]["G"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderB"] = $this->Data[$NodeID]["B"] + $Settings["Surrounding"]; } + } + } + } + else + { + if ( isset($Settings["R"]) ) { $this->Data[$Nodes]["R"] = $Settings["R"]; } + if ( isset($Settings["G"]) ) { $this->Data[$Nodes]["G"] = $Settings["G"]; } + if ( isset($Settings["B"]) ) { $this->Data[$Nodes]["B"] = $Settings["B"]; } + if ( isset($Settings["Alpha"]) ) { $this->Data[$Nodes]["Alpha"] = $Settings["Alpha"]; } + if ( isset($Settings["BorderR"]) ) { $this->Data[$Nodes]["BorderR"] = $Settings["BorderR"]; } + if ( isset($Settings["BorderG"]) ) { $this->Data[$Nodes]["BorderG"] = $Settings["BorderG"]; } + if ( isset($Settings["BorderB"]) ) { $this->Data[$Nodes]["BorderB"] = $Settings["BorderB"]; } + if ( isset($Settings["BorderAlpha"]) ) { $this->Data[$Nodes]["BorderAlpha"] = $Settings["BorderAlpha"]; } + if ( isset($Settings["Surrounding"]) ) { $this->Data[$Nodes]["BorderR"] = $this->Data[$NodeID]["R"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderG"] = $this->Data[$NodeID]["G"] + $Settings["Surrounding"]; $this->Data[$NodeID]["BorderB"] = $this->Data[$NodeID]["B"] + $Settings["Surrounding"]; } + } + } + + /* Returns all the nodes details */ + function dumpNodes() + { return($this->Data); } + + /* Check if a connection exists and create it if required */ + function checkConnection($SourceID, $TargetID) + { + if ( isset($this->Data[$SourceID]["Connections"]) ) + { + foreach ($this->Data[$SourceID]["Connections"] as $Key => $ConnectionID) + { if ( $TargetID == $ConnectionID ) { return(TRUE); } } + } + $this->Data[$SourceID]["Connections"][] = $TargetID; + } + /* Get the median linked nodes position */ + function getMedianOffset($Key,$X,$Y) + { + $Cpt = 1; + if ( isset($this->Data[$Key]["Connections"]) ) + { + foreach($this->Data[$Key]["Connections"] as $ID => $NodeID) + { + if ( isset($this->Data[$NodeID]["X"]) && isset($this->Data[$NodeID]["Y"]) ) + { + $X = $X + $this->Data[$NodeID]["X"]; + $Y = $Y + $this->Data[$NodeID]["Y"]; + $Cpt++; + } + } + } + return(array("X"=>$X/$Cpt,"Y"=>$Y/$Cpt)); + } + + /* Return the ID of the attached partner with the biggest weight */ + function getBiggestPartner($Key) + { + if ( !isset($this->Data[$Key]["Connections"]) ) { return(""); } + + $MaxWeight = 0; $Result = ""; + foreach($this->Data[$Key]["Connections"] as $Key => $PeerID) + { + if ( $this->Data[$PeerID]["Weight"] > $MaxWeight ) + { $MaxWeight = $this->Data[$PeerID]["Weight"]; $Result = $PeerID; } + } + return($Result); + } + + /* Do the initial node positions computing pass */ + function firstPass($Algorithm) + { + $CenterX = ($this->X2 - $this->X1) / 2 + $this->X1; + $CenterY = ($this->Y2 - $this->Y1) / 2 + $this->Y1; + + /* Check connections reciprocity */ + foreach($this->Data as $Key => $Settings) + { + if ( isset($Settings["Connections"]) ) + { + foreach($Settings["Connections"] as $ID => $ConnectionID) + $this->checkConnection($ConnectionID,$Key); + } + } + + if ( $this->AutoComputeFreeZone ) { $this->autoFreeZone(); } + + /* Get the max number of connections */ + $MaxConnections = 0; + foreach($this->Data as $Key => $Settings) + { if ( isset($Settings["Connections"]) ) { if ( $MaxConnections < count($Settings["Connections"] ) ) { $MaxConnections = count($Settings["Connections"]); } } } + + if ( $Algorithm == ALGORITHM_WEIGHTED ) + { + foreach($this->Data as $Key => $Settings) + { + if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } + if ( $Settings["Type"] == NODE_TYPE_FREE ) + { + if ( isset($Settings["Connections"]) ) + { $Connections = count($Settings["Connections"]); } + else + { $Connections = 0; } + + $Ring = $MaxConnections - $Connections; + $Angle = rand(0,360); + + $this->Data[$Key]["X"] = cos(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterX; + $this->Data[$Key]["Y"] = sin(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterY; + } + } + } + elseif ( $Algorithm == ALGORITHM_CENTRAL ) + { + /* Put a weight on each nodes */ + foreach($this->Data as $Key => $Settings) + { + if ( isset($Settings["Connections"]) ) + $this->Data[$Key]["Weight"] = count($Settings["Connections"]); + else + $this->Data[$Key]["Weight"] = 0; + } + + $MaxConnections = $MaxConnections + 1; + for($i=$MaxConnections;$i>=0;$i--) + { + foreach($this->Data as $Key => $Settings) + { + if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } + if ( $Settings["Type"] == NODE_TYPE_FREE ) + { + if ( isset($Settings["Connections"]) ) + { $Connections = count($Settings["Connections"]); } + else + { $Connections = 0; } + + if ( $Connections == $i ) + { + $BiggestPartner = $this->getBiggestPartner($Key); + if ( $BiggestPartner != "" ) + { + $Ring = $this->Data[$BiggestPartner]["FreeZone"]; + $Weight = $this->Data[$BiggestPartner]["Weight"]; + $AngleDivision = 360 / $this->Data[$BiggestPartner]["Weight"]; + $Done = FALSE; $Tries = 0; + while (!$Done && $Tries <= $Weight*2) + { + $Tries++; + $Angle = floor(rand(0,$Weight)*$AngleDivision); + if ( !isset($this->Data[$BiggestPartner]["Angular"][$Angle]) || !isset($this->Data[$BiggestPartner]["Angular"]) ) + { + $this->Data[$BiggestPartner]["Angular"][$Angle] = $Angle; + $Done = TRUE; + } + } + if ( !$Done ) + { $Angle = rand(0,360); $this->Data[$BiggestPartner]["Angular"][$Angle] = $Angle; } + + $X = cos(deg2rad($Angle)) * ($Ring) + $this->Data[$BiggestPartner]["X"]; + $Y = sin(deg2rad($Angle)) * ($Ring) + $this->Data[$BiggestPartner]["Y"]; + + $this->Data[$Key]["X"] = $X; + $this->Data[$Key]["Y"] = $Y; + } + } + } + } + } + } + elseif ( $Algorithm == ALGORITHM_CIRCULAR ) + { + $MaxConnections = $MaxConnections + 1; + for($i=$MaxConnections;$i>=0;$i--) + { + foreach($this->Data as $Key => $Settings) + { + if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } + if ( $Settings["Type"] == NODE_TYPE_FREE ) + { + if ( isset($Settings["Connections"]) ) + { $Connections = count($Settings["Connections"]); } + else + { $Connections = 0; } + + if ( $Connections == $i ) + { + $Ring = $MaxConnections - $Connections; + $Angle = rand(0,360); + + $X = cos(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterX; + $Y = sin(deg2rad($Angle)) * ($Ring*$this->RingSize) + $CenterY; + + $MedianOffset = $this->getMedianOffset($Key,$X,$Y); + + $this->Data[$Key]["X"] = $MedianOffset["X"]; + $this->Data[$Key]["Y"] = $MedianOffset["Y"]; + } + } + } + } + } + elseif ( $Algorithm == ALGORITHM_RANDOM ) + { + foreach($this->Data as $Key => $Settings) + { + if ( $Settings["Type"] == NODE_TYPE_FREE ) + { + $this->Data[$Key]["X"] = $CenterX + rand(-20,20); + $this->Data[$Key]["Y"] = $CenterY + rand(-20,20); + } + if ( $Settings["Type"] == NODE_TYPE_CENTRAL ) { $this->Data[$Key]["X"] = $CenterX; $this->Data[$Key]["Y"] = $CenterY; } + } + } + } + + /* Compute one pass */ + function doPass() + { + /* Compute vectors */ + foreach($this->Data as $Key => $Settings) + { + if ( $Settings["Type"] != NODE_TYPE_CENTRAL ) + { + unset($this->Data[$Key]["Vectors"]); + + $X1 = $Settings["X"]; + $Y1 = $Settings["Y"]; + + /* Repulsion vectors */ + foreach($this->Data as $Key2 => $Settings2) + { + if ( $Key != $Key2 ) + { + $X2 = $this->Data[$Key2]["X"]; + $Y2 = $this->Data[$Key2]["Y"]; + $FreeZone = $this->Data[$Key2]["FreeZone"]; + + $Distance = $this->getDistance($X1,$Y1,$X2,$Y2); + $Angle = $this->getAngle($X1,$Y1,$X2,$Y2) + 180; + + /* Nodes too close, repulsion occurs */ + if ( $Distance < $FreeZone ) + { + $Force = log(pow(2,$FreeZone-$Distance)); + if ( $Force > 1 ) + { $this->Data[$Key]["Vectors"][] = array("Type"=>"R","Angle"=>$Angle % 360,"Force"=>$Force); } + } + } + } + + /* Attraction vectors */ + if ( isset($Settings["Connections"]) ) + { + foreach($Settings["Connections"] as $ID => $NodeID) + { + if ( isset($this->Data[$NodeID]) ) + { + $X2 = $this->Data[$NodeID]["X"]; + $Y2 = $this->Data[$NodeID]["Y"]; + $FreeZone = $this->Data[$Key2]["FreeZone"]; + + $Distance = $this->getDistance($X1,$Y1,$X2,$Y2); + $Angle = $this->getAngle($X1,$Y1,$X2,$Y2); + + if ( $Distance > $FreeZone ) + $Force = log(($Distance-$FreeZone)+1); + else + { $Force = log(($FreeZone-$Distance)+1); ($Angle = $Angle + 180); } + + if ( $Force > 1 ) + $this->Data[$Key]["Vectors"][] = array("Type"=>"A","Angle"=>$Angle % 360,"Force"=>$Force); + } + } + } + } + } + + /* Move the nodes accoding to the vectors */ + foreach($this->Data as $Key => $Settings) + { + $X = $Settings["X"]; + $Y = $Settings["Y"]; + + if ( isset($Settings["Vectors"]) && $Settings["Type"] != NODE_TYPE_CENTRAL ) + { + foreach($Settings["Vectors"] as $ID => $Vector) + { + $Type = $Vector["Type"]; + $Force = $Vector["Force"]; + $Angle = $Vector["Angle"]; + $Factor = $Type == "A" ? $this->MagneticForceA : $this->MagneticForceR; + + $X = cos(deg2rad($Angle)) * $Force * $Factor + $X; + $Y = sin(deg2rad($Angle)) * $Force * $Factor + $Y; + } + } + + $this->Data[$Key]["X"] = $X; + $this->Data[$Key]["Y"] = $Y; + } + } + + function lastPass() + { + /* Put everything inside the graph area */ + foreach($this->Data as $Key => $Settings) + { + $X = $Settings["X"]; + $Y = $Settings["Y"]; + + if ( $X < $this->X1 ) { $X = $this->X1; } + if ( $X > $this->X2 ) { $X = $this->X2; } + if ( $Y < $this->Y1 ) { $Y = $this->Y1; } + if ( $Y > $this->Y2 ) { $Y = $this->Y2; } + + $this->Data[$Key]["X"] = $X; + $this->Data[$Key]["Y"] = $Y; + } + + /* Dump all links */ + $Links = ""; + foreach($this->Data as $Key => $Settings) + { + $X1 = $Settings["X"]; + $Y1 = $Settings["Y"]; + + if ( isset($Settings["Connections"]) ) + { + foreach ($Settings["Connections"] as $ID => $NodeID) + { + if ( isset($this->Data[$NodeID]) ) + { + $X2 = $this->Data[$NodeID]["X"]; + $Y2 = $this->Data[$NodeID]["Y"]; + + $Links[] = array("X1"=>$X1,"Y1"=>$Y1,"X2"=>$X2,"Y2"=>$Y2,"Source"=>$Settings["Name"],"Destination"=>$this->Data[$NodeID]["Name"]); + } + } + } + } + + /* Check collisions */ + $Conflicts = 0; + foreach($this->Data as $Key => $Settings) + { + $X1 = $Settings["X"]; + $Y1 = $Settings["Y"]; + + if ( isset($Settings["Connections"]) ) + { + foreach ($Settings["Connections"] as $ID => $NodeID) + { + if ( isset($this->Data[$NodeID]) ) + { + $X2 = $this->Data[$NodeID]["X"]; + $Y2 = $this->Data[$NodeID]["Y"]; + + foreach($Links as $IDLinks => $Link) + { + $X3 = $Link["X1"]; $Y3 = $Link["Y1"]; $X4 = $Link["X2"]; $Y4 = $Link["Y2"]; + + if ( !($X1 == $X3 && $X2 == $X4 && $Y1 == $Y3 && $Y2 == $Y4 ) ) + { + if ( $this->intersect($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4) ) + { + if ( $Link["Source"] != $Settings["Name"] && $Link["Source"] != $this->Data[$NodeID]["Name"] && $Link["Destination"] != $Settings["Name"] && $Link["Destination"] != $this->Data[$NodeID]["Name"] ) + { $Conflicts++; } + } + } + } + } + } + } + } + return($Conflicts/2); + } + + /* Center the graph */ + function center() + { + /* Determine the real center */ + $TargetCenterX = ($this->X2 - $this->X1) / 2 + $this->X1; + $TargetCenterY = ($this->Y2 - $this->Y1) / 2 + $this->Y1; + + /* Get current boundaries */ + $XMin = $this->X2; $XMax = $this->X1; + $YMin = $this->Y2; $YMax = $this->Y1; + foreach($this->Data as $Key => $Settings) + { + $X = $Settings["X"]; + $Y = $Settings["Y"]; + + if ( $X < $XMin) { $XMin = $X; } + if ( $X > $XMax) { $XMax = $X; } + if ( $Y < $YMin) { $YMin = $Y; } + if ( $Y > $YMax) { $YMax = $Y; } + } + $CurrentCenterX = ($XMax - $XMin) / 2 + $XMin; + $CurrentCenterY = ($YMax - $YMin) / 2 + $YMin; + + /* Compute the offset to apply */ + $XOffset = $TargetCenterX - $CurrentCenterX; + $YOffset = $TargetCenterY - $CurrentCenterY; + + /* Correct the points position */ + foreach($this->Data as $Key => $Settings) + { + $this->Data[$Key]["X"] = $Settings["X"] + $XOffset; + $this->Data[$Key]["Y"] = $Settings["Y"] + $YOffset; + } + } + + /* Create the encoded string */ + function drawSpring($Object,$Settings="") + { + $this->pChartObject = $Object; + + $Pass = isset($Settings["Pass"]) ? $Settings["Pass"] : 50; + $Retries = isset($Settings["Retry"]) ? $Settings["Retry"] : 10; + $this->MagneticForceA = isset($Settings["MagneticForceA"]) ? $Settings["MagneticForceA"] : 1.5; + $this->MagneticForceR = isset($Settings["MagneticForceR"]) ? $Settings["MagneticForceR"] : 2; + $this->RingSize = isset($Settings["RingSize"]) ? $Settings["RingSize"] : 40; + $DrawVectors = isset($Settings["DrawVectors"]) ? $Settings["DrawVectors"] : FALSE; + $DrawQuietZone = isset($Settings["DrawQuietZone"]) ? $Settings["DrawQuietZone"] : FALSE; + $CenterGraph = isset($Settings["CenterGraph"]) ? $Settings["CenterGraph"] : TRUE; + $TextPadding = isset($Settings["TextPadding"]) ? $Settings["TextPadding"] : 4; + $Algorithm = isset($Settings["Algorithm"]) ? $Settings["Algorithm"] : ALGORITHM_WEIGHTED; + + $FontSize = $Object->FontSize; + $this->X1 = $Object->GraphAreaX1; + $this->Y1 = $Object->GraphAreaY1; + $this->X2 = $Object->GraphAreaX2; + $this->Y2 = $Object->GraphAreaY2; + + $Conflicts = 1; $Jobs = 0; $this->History["MinimumConflicts"] = -1; + while ($Conflicts != 0 && $Jobs < $Retries ) + { + $Jobs++; + + /* Compute the initial settings */ + $this->firstPass($Algorithm); + + /* Apply the vectors */ + if ( $Pass > 0 ) + { + for ($i=0; $i<=$Pass; $i++) { $this->doPass(); } + } + + $Conflicts = $this->lastPass(); + if ( $this->History["MinimumConflicts"] == -1 || $Conflicts < $this->History["MinimumConflicts"] ) + { $this->History["MinimumConflicts"] = $Conflicts; $this->History["Result"] = $this->Data; } + } + + $Conflicts = $this->History["MinimumConflicts"]; + $this->Data = $this->History["Result"]; + + if ( $CenterGraph ) { $this->center(); } + + /* Draw the connections */ + $Drawn = ""; + foreach($this->Data as $Key => $Settings) + { + $X = $Settings["X"]; + $Y = $Settings["Y"]; + + if ( isset($Settings["Connections"]) ) + { + foreach ($Settings["Connections"] as $ID => $NodeID) + { + if ( !isset($Drawn[$Key]) ) { $Drawn[$Key] = ""; } + if ( !isset($Drawn[$NodeID]) ) { $Drawn[$NodeID] = ""; } + + if ( isset($this->Data[$NodeID]) && !isset($Drawn[$Key][$NodeID]) && !isset($Drawn[$NodeID][$Key]) ) + { + $Color = array("R"=>$this->Default["LinkR"],"G"=>$this->Default["LinkG"],"B"=>$this->Default["LinkB"],"Alpha"=>$this->Default["Alpha"]); + + if ( $this->Links != "" ) + { + if ( isset($this->Links[$Key][$NodeID]["R"]) ) + { $Color = array("R"=>$this->Links[$Key][$NodeID]["R"],"G"=>$this->Links[$Key][$NodeID]["G"],"B"=>$this->Links[$Key][$NodeID]["B"],"Alpha"=>$this->Links[$Key][$NodeID]["Alpha"]); } + + if ( isset($this->Links[$Key][$NodeID]["Ticks"]) ) + { $Color["Ticks"] = $this->Links[$Key][$NodeID]["Ticks"]; } + } + + $X2 = $this->Data[$NodeID]["X"]; + $Y2 = $this->Data[$NodeID]["Y"]; + $this->pChartObject->drawLine($X,$Y,$X2,$Y2,$Color); + $Drawn[$Key][$NodeID] = TRUE; + + if ( isset($this->Links) && $this->Links != "" ) + { + if ( isset($this->Links[$Key][$NodeID]["Name"]) || isset($this->Links[$NodeID][$Key]["Name"]) ) + { + $Name = isset($this->Links[$Key][$NodeID]["Name"]) ? $this->Links[$Key][$NodeID]["Name"] : $this->Links[$NodeID][$Key]["Name"]; + $TxtX = ($X2 - $X)/2 + $X; + $TxtY = ($Y2 - $Y)/2 + $Y; + + if ( $X <= $X2 ) + $Angle = (360-$this->getAngle($X,$Y,$X2,$Y2)) % 360; + else + $Angle = (360-$this->getAngle($X2,$Y2,$X,$Y)) % 360; + + $Settings = $Color; + $Settings["Angle"] = $Angle; + $Settings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; + $this->pChartObject->drawText($TxtX,$TxtY,$Name,$Settings); + } + } + } + } + } + } + + /* Draw the quiet zones */ + if ( $DrawQuietZone ) + { + foreach($this->Data as $Key => $Settings) + { + $X = $Settings["X"]; + $Y = $Settings["Y"]; + $FreeZone = $Settings["FreeZone"]; + + $this->pChartObject->drawFilledCircle($X,$Y,$FreeZone,array("R"=>0,"G"=>0,"B"=>0,"Alpha"=>2)); + } + } + + + /* Draw the nodes */ + foreach($this->Data as $Key => $Settings) + { + $X = $Settings["X"]; + $Y = $Settings["Y"]; + $Name = $Settings["Name"]; + $FreeZone = $Settings["FreeZone"]; + $Shape = $Settings["Shape"]; + $Size = $Settings["Size"]; + + $Color = array("R"=>$Settings["R"],"G"=>$Settings["G"],"B"=>$Settings["B"],"Alpha"=>$Settings["Alpha"],"BorderR"=>$Settings["BorderR"],"BorderG"=>$Settings["BorderG"],"BorderB"=>$Settings["BorderB"],"BorderApha"=>$Settings["BorderAlpha"]); + + if ( $Shape == NODE_SHAPE_CIRCLE ) + { + $this->pChartObject->drawFilledCircle($X,$Y,$Size,$Color); + } + elseif ( $Shape == NODE_SHAPE_TRIANGLE ) + { + $Points = ""; + $Points[] = cos(deg2rad(270)) * $Size + $X; $Points[] = sin(deg2rad(270)) * $Size + $Y; + $Points[] = cos(deg2rad(45)) * $Size + $X; $Points[] = sin(deg2rad(45)) * $Size + $Y; + $Points[] = cos(deg2rad(135)) * $Size + $X; $Points[] = sin(deg2rad(135)) * $Size + $Y; + $this->pChartObject->drawPolygon($Points,$Color); + } + elseif ( $Shape == NODE_SHAPE_SQUARE ) + { + $Offset = $Size/2; $Size = $Size / 2; + $this->pChartObject->drawFilledRectangle($X-$Offset,$Y-$Offset,$X+$Offset,$Y+$Offset,$Color); + } + + if ( $Name != "" ) + { + $LabelOptions = array("R"=>$this->Labels["R"],"G"=>$this->Labels["G"],"B"=>$this->Labels["B"],"Alpha"=>$this->Labels["Alpha"]); + + if ( $this->Labels["Type"] == LABEL_LIGHT ) + { + $LabelOptions["Align"] = TEXT_ALIGN_BOTTOMLEFT; + $this->pChartObject->drawText($X,$Y,$Name,$LabelOptions); + } + elseif ( $this->Labels["Type"] == LABEL_CLASSIC ) + { + $LabelOptions["Align"] = TEXT_ALIGN_TOPMIDDLE; + $LabelOptions["DrawBox"] = TRUE; + $LabelOptions["BoxAlpha"] = 50; + $LabelOptions["BorderOffset"] = 4; + $LabelOptions["RoundedRadius"] = 3; + $LabelOptions["BoxRounded"] = TRUE; + $LabelOptions["NoShadow"] = TRUE; + + $this->pChartObject->drawText($X,$Y+$Size+$TextPadding,$Name,$LabelOptions); + } + } + } + + /* Draw the vectors */ + if ( $DrawVectors ) + { + foreach($this->Data as $Key => $Settings) + { + $X1 = $Settings["X"]; + $Y1 = $Settings["Y"]; + + if ( isset($Settings["Vectors"]) && $Settings["Type"] != NODE_TYPE_CENTRAL ) + { + foreach($Settings["Vectors"] as $ID => $Vector) + { + $Type = $Vector["Type"]; + $Force = $Vector["Force"]; + $Angle = $Vector["Angle"]; + $Factor = $Type == "A" ? $this->MagneticForceA : $this->MagneticForceR; + $Color = $Type == "A" ? array("FillR"=>255,"FillG"=>0,"FillB"=>0) : array("FillR"=>0,"FillG"=>255,"FillB"=>0); + + $X2 = cos(deg2rad($Angle)) * $Force * $Factor + $X1; + $Y2 = sin(deg2rad($Angle)) * $Force * $Factor + $Y1; + + $this->pChartObject->drawArrow($X1,$Y1,$X2,$Y2,$Color); + } + } + } + } + + return(array("Pass"=>$Jobs,"Conflicts"=>$Conflicts)); + } + + /* Return the distance between two points */ + function getDistance($X1,$Y1,$X2,$Y2) + { return (sqrt(($X2-$X1)*($X2-$X1)+($Y2-$Y1)*($Y2-$Y1))); } + + /* Return the angle made by a line and the X axis */ + function getAngle($X1,$Y1,$X2,$Y2) + { + $Opposite = $Y2 - $Y1; $Adjacent = $X2 - $X1;$Angle = rad2deg(atan2($Opposite,$Adjacent)); + if ($Angle > 0) { return($Angle); } else { return(360-abs($Angle)); } + } + + function intersect($X1,$Y1,$X2,$Y2,$X3,$Y3,$X4,$Y4) + { + $A = (($X3 * $Y4 - $X4 * $Y3) * ($X1 - $X2) - ($X1 * $Y2 - $X2 * $Y1) * ($X3 - $X4)); + $B = (($Y1 - $Y2) * ($X3 - $X4) - ($Y3 - $Y4) * ($X1 - $X2)); + + if ( $B == 0 ) { return(FALSE); } + $Xi = $A / $B; + + $C = ($X1 - $X2); + if ( $C == 0 ) { return(FALSE); } + $Yi = $Xi * (($Y1 - $Y2)/$C) + (($X1 * $Y2 - $X2 * $Y1)/$C); + + if ( $Xi >= min($X1,$X2) && $Xi >= min($X3,$X4) && $Xi <= max($X1,$X2) && $Xi <= max($X3,$X4)) + { + if ( $Yi >= min($Y1,$Y2) && $Yi >= min($Y3,$Y4) && $Yi <= max($Y1,$Y2) && $Yi <= max($Y3,$Y4)) + { return(TRUE); } + } + + return(FALSE); + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pStock.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pStock.class.php new file mode 100644 index 0000000..9b59488 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pStock.class.php @@ -0,0 +1,216 @@ +pChartObject = $pChartObject; + $this->pDataObject = $pDataObject; + } + + /* Draw a stock chart */ + function drawStockChart($Format="") + { + $SerieOpen = isset($Format["SerieOpen"]) ? $Format["SerieOpen"] : "Open"; + $SerieClose = isset($Format["SerieClose"]) ? $Format["SerieClose"] : "Close"; + $SerieMin = isset($Format["SerieMin"]) ? $Format["SerieMin"] : "Min"; + $SerieMax = isset($Format["SerieMax"]) ? $Format["SerieMax"] : "Max"; + $SerieMedian = isset($Format["SerieMedian"]) ? $Format["SerieMedian"] : NULL; + $LineWidth = isset($Format["LineWidth"]) ? $Format["LineWidth"] : 1; + $LineR = isset($Format["LineR"]) ? $Format["LineR"] : 0; + $LineG = isset($Format["LineG"]) ? $Format["LineG"] : 0; + $LineB = isset($Format["LineB"]) ? $Format["LineB"] : 0; + $LineAlpha = isset($Format["LineAlpha"]) ? $Format["LineAlpha"] : 100; + $ExtremityWidth = isset($Format["ExtremityWidth"]) ? $Format["ExtremityWidth"] : 1; + $ExtremityLength = isset($Format["ExtremityLength"]) ? $Format["ExtremityLength"] : 3; + $ExtremityR = isset($Format["ExtremityR"]) ? $Format["ExtremityR"] : 0; + $ExtremityG = isset($Format["ExtremityG"]) ? $Format["ExtremityG"] : 0; + $ExtremityB = isset($Format["ExtremityB"]) ? $Format["ExtremityB"] : 0; + $ExtremityAlpha = isset($Format["ExtremityAlpha"]) ? $Format["ExtremityAlpha"] : 100; + $BoxWidth = isset($Format["BoxWidth"]) ? $Format["BoxWidth"] : 8; + $BoxUpR = isset($Format["BoxUpR"]) ? $Format["BoxUpR"] : 188; + $BoxUpG = isset($Format["BoxUpG"]) ? $Format["BoxUpG"] : 224; + $BoxUpB = isset($Format["BoxUpB"]) ? $Format["BoxUpB"] : 46; + $BoxUpAlpha = isset($Format["BoxUpAlpha"]) ? $Format["BoxUpAlpha"] : 100; + $BoxUpSurrounding = isset($Format["BoxUpSurrounding"]) ? $Format["BoxUpSurrounding"] : NULL; + $BoxUpBorderR = isset($Format["BoxUpBorderR"]) ? $Format["BoxUpBorderR"] : $BoxUpR-20; + $BoxUpBorderG = isset($Format["BoxUpBorderG"]) ? $Format["BoxUpBorderG"] : $BoxUpG-20; + $BoxUpBorderB = isset($Format["BoxUpBorderB"]) ? $Format["BoxUpBorderB"] : $BoxUpB-20; + $BoxUpBorderAlpha = isset($Format["BoxUpBorderAlpha"]) ? $Format["BoxUpBorderAlpha"] : 100; + $BoxDownR = isset($Format["BoxDownR"]) ? $Format["BoxDownR"] : 224; + $BoxDownG = isset($Format["BoxDownG"]) ? $Format["BoxDownG"] : 100; + $BoxDownB = isset($Format["BoxDownB"]) ? $Format["BoxDownB"] : 46; + $BoxDownAlpha = isset($Format["BoxDownAlpha"]) ? $Format["BoxDownAlpha"] : 100; + $BoxDownSurrounding= isset($Format["BoxDownSurrounding"]) ? $Format["BoxDownSurrounding"] : NULL; + $BoxDownBorderR = isset($Format["BoxDownBorderR"]) ? $Format["BoxDownBorderR"] : $BoxDownR-20; + $BoxDownBorderG = isset($Format["BoxDownBorderG"]) ? $Format["BoxDownBorderG"] : $BoxDownG-20; + $BoxDownBorderB = isset($Format["BoxDownBorderB"]) ? $Format["BoxDownBorderB"] : $BoxDownB-20; + $BoxDownBorderAlpha= isset($Format["BoxDownBorderAlpha"]) ? $Format["BoxDownBorderAlpha"] : 100; + $ShadowOnBoxesOnly = isset($Format["ShadowOnBoxesOnly"]) ? $Format["ShadowOnBoxesOnly"] : TRUE; + $MedianR = isset($Format["MedianR"]) ? $Format["MedianR"] : 255; + $MedianG = isset($Format["MedianG"]) ? $Format["MedianG"] : 0; + $MedianB = isset($Format["MedianB"]) ? $Format["MedianB"] : 0; + $MedianAlpha = isset($Format["MedianAlpha"]) ? $Format["MedianAlpha"] : 100; + $RecordImageMap = isset($Format["RecordImageMap"]) ? $Format["RecordImageMap"] : FALSE; + $ImageMapTitle = isset($Format["ImageMapTitle"]) ? $Format["ImageMapTitle"] : "Stock Chart"; + + + /* Data Processing */ + $Data = $this->pDataObject->getData(); + $Palette = $this->pDataObject->getPalette(); + + if ( $BoxUpSurrounding != NULL ) { $BoxUpBorderR = $BoxUpR + $BoxUpSurrounding; $BoxUpBorderG = $BoxUpG + $BoxUpSurrounding; $BoxUpBorderB = $BoxUpB + $BoxUpSurrounding; } + if ( $BoxDownSurrounding != NULL ) { $BoxDownBorderR = $BoxDownR + $BoxDownSurrounding; $BoxDownBorderG = $BoxDownG + $BoxDownSurrounding; $BoxDownBorderB = $BoxDownB + $BoxDownSurrounding; } + + if ( $LineWidth != 1 ) { $LineOffset = $LineWidth / 2; } + $BoxOffset = $BoxWidth / 2; + + $Data = $this->pChartObject->DataSet->getData(); + list($XMargin,$XDivs) = $this->pChartObject->scaleGetXSettings(); + + if ( !isset($Data["Series"][$SerieOpen]) || !isset($Data["Series"][$SerieClose]) || !isset($Data["Series"][$SerieMin]) || !isset($Data["Series"][$SerieMax]) ) + return(STOCK_MISSING_SERIE); + + $Plots = ""; + foreach($Data["Series"][$SerieOpen]["Data"] as $Key => $Value) + { + $Point = ""; + if ( isset($Data["Series"][$SerieClose]["Data"][$Key]) || isset($Data["Series"][$SerieMin]["Data"][$Key]) || isset($Data["Series"][$SerieMax]["Data"][$Key]) ) + $Point = array($Value,$Data["Series"][$SerieClose]["Data"][$Key],$Data["Series"][$SerieMin]["Data"][$Key],$Data["Series"][$SerieMax]["Data"][$Key]); + if ( $SerieMedian != NULL && isset($Data["Series"][$SerieMedian]["Data"][$Key]) ) + $Point[] = $Data["Series"][$SerieMedian]["Data"][$Key]; + + $Plots[] = $Point; + } + + $AxisID = $Data["Series"][$SerieOpen]["Axis"]; + $Mode = $Data["Axis"][$AxisID]["Display"]; + $Format = $Data["Axis"][$AxisID]["Format"]; + $Unit = $Data["Axis"][$AxisID]["Unit"]; + + $YZero = $this->pChartObject->scaleComputeY(0,array("AxisID"=>$AxisID)); + $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; + + $X = $this->pChartObject->GraphAreaX1 + $XMargin; + $Y = $this->pChartObject->GraphAreaY1 + $XMargin; + + $LineSettings = array("R"=>$LineR,"G"=>$LineG,"B"=>$LineB,"Alpha"=>$LineAlpha); + $ExtremitySettings = array("R"=>$ExtremityR,"G"=>$ExtremityG,"B"=>$ExtremityB,"Alpha"=>$ExtremityAlpha); + $BoxUpSettings = array("R"=>$BoxUpR,"G"=>$BoxUpG,"B"=>$BoxUpB,"Alpha"=>$BoxUpAlpha,"BorderR"=>$BoxUpBorderR,"BorderG"=>$BoxUpBorderG,"BorderB"=>$BoxUpBorderB,"BorderAlpha"=>$BoxUpBorderAlpha); + $BoxDownSettings = array("R"=>$BoxDownR,"G"=>$BoxDownG,"B"=>$BoxDownB,"Alpha"=>$BoxDownAlpha,"BorderR"=>$BoxDownBorderR,"BorderG"=>$BoxDownBorderG,"BorderB"=>$BoxDownBorderB,"BorderAlpha"=>$BoxDownBorderAlpha); + $MedianSettings = array("R"=>$MedianR,"G"=>$MedianG,"B"=>$MedianB,"Alpha"=>$MedianAlpha); + + foreach($Plots as $Key =>$Points) + { + $PosArray = $this->pChartObject->scaleComputeY($Points,array("AxisID"=>$AxisID)); + + $Values = "Open :".$Data["Series"][$SerieOpen]["Data"][$Key]."
Close : ".$Data["Series"][$SerieClose]["Data"][$Key]."
Min : ".$Data["Series"][$SerieMin]["Data"][$Key]."
Max : ".$Data["Series"][$SerieMax]["Data"][$Key]."
"; + if ( $SerieMedian != NULL ) { $Values = $Values."Median : ".$Data["Series"][$SerieMedian]["Data"][$Key]."
"; } + if ( $PosArray[0] > $PosArray[1] ) { $ImageMapColor = $this->pChartObject->toHTMLColor($BoxUpR,$BoxUpG,$BoxUpB); } else { $ImageMapColor = $this->pChartObject->toHTMLColor($BoxDownR,$BoxDownG,$BoxDownB); } + + if ( $Data["Orientation"] == SCALE_POS_LEFTRIGHT ) + { + if ( $YZero > $this->pChartObject->GraphAreaY2-1 ) { $YZero = $this->pChartObject->GraphAreaY2-1; } + if ( $YZero < $this->pChartObject->GraphAreaY1+1 ) { $YZero = $this->pChartObject->GraphAreaY1+1; } + + if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaX2-$this->pChartObject->GraphAreaX1-$XMargin*2)/$XDivs; } + + if ( $ShadowOnBoxesOnly ) { $RestoreShadow = $this->pChartObject->Shadow; $this->pChartObject->Shadow = FALSE; } + + if ( $LineWidth == 1 ) + $this->pChartObject->drawLine($X,$PosArray[2],$X,$PosArray[3],$LineSettings); + else + $this->pChartObject->drawFilledRectangle($X-$LineOffset,$PosArray[2],$X+$LineOffset,$PosArray[3],$LineSettings); + + if ( $ExtremityWidth == 1 ) + { + $this->pChartObject->drawLine($X-$ExtremityLength,$PosArray[2],$X+$ExtremityLength,$PosArray[2],$ExtremitySettings); + $this->pChartObject->drawLine($X-$ExtremityLength,$PosArray[3],$X+$ExtremityLength,$PosArray[3],$ExtremitySettings); + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("RECT",floor($X-$ExtremityLength).",".floor($PosArray[2]).",".floor($X+$ExtremityLength).",".floor($PosArray[3]),$ImageMapColor,$ImageMapTitle,$Values); } + } + else + { + $this->pChartObject->drawFilledRectangle($X-$ExtremityLength,$PosArray[2],$X+$ExtremityLength,$PosArray[2]-$ExtremityWidth,$ExtremitySettings); + $this->pChartObject->drawFilledRectangle($X-$ExtremityLength,$PosArray[3],$X+$ExtremityLength,$PosArray[3]+$ExtremityWidth,$ExtremitySettings); + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("RECT",floor($X-$ExtremityLength).",".floor($PosArray[2]-$ExtremityWidth).",".floor($X+$ExtremityLength).",".floor($PosArray[3]+$ExtremityWidth),$ImageMapColor,$ImageMapTitle,$Values); } + } + + if ( $ShadowOnBoxesOnly ) { $this->pChartObject->Shadow = $RestoreShadow; } + + if ( $PosArray[0] > $PosArray[1] ) + $this->pChartObject->drawFilledRectangle($X-$BoxOffset,$PosArray[0],$X+$BoxOffset,$PosArray[1],$BoxUpSettings); + else + $this->pChartObject->drawFilledRectangle($X-$BoxOffset,$PosArray[0],$X+$BoxOffset,$PosArray[1],$BoxDownSettings); + + if ( isset($PosArray[4]) ) + $this->pChartObject->drawLine($X-$ExtremityLength,$PosArray[4],$X+$ExtremityLength,$PosArray[4],$MedianSettings); + + $X = $X + $XStep; + } + elseif ( $Data["Orientation"] == SCALE_POS_TOPBOTTOM ) + { + if ( $YZero > $this->pChartObject->GraphAreaX2-1 ) { $YZero = $this->pChartObject->GraphAreaX2-1; } + if ( $YZero < $this->pChartObject->GraphAreaX1+1 ) { $YZero = $this->pChartObject->GraphAreaX1+1; } + + if ( $XDivs == 0 ) { $XStep = 0; } else { $XStep = ($this->pChartObject->GraphAreaY2-$this->pChartObject->GraphAreaY1-$XMargin*2)/$XDivs; } + + if ( $LineWidth == 1 ) + $this->pChartObject->drawLine($PosArray[2],$Y,$PosArray[3],$Y,$LineSettings); + else + $this->pChartObject->drawFilledRectangle($PosArray[2],$Y-$LineOffset,$PosArray[3],$Y+$LineOffset,$LineSettings); + + if ( $ShadowOnBoxesOnly ) { $RestoreShadow = $this->pChartObject->Shadow; $this->pChartObject->Shadow = FALSE; } + + if ( $ExtremityWidth == 1 ) + { + $this->pChartObject->drawLine($PosArray[2],$Y-$ExtremityLength,$PosArray[2],$Y+$ExtremityLength,$ExtremitySettings); + $this->pChartObject->drawLine($PosArray[3],$Y-$ExtremityLength,$PosArray[3],$Y+$ExtremityLength,$ExtremitySettings); + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("RECT",floor($PosArray[2]).",".floor($Y-$ExtremityLength).",".floor($PosArray[3]).",".floor($Y+$ExtremityLength),$ImageMapColor,$ImageMapTitle,$Values); } + } + else + { + $this->pChartObject->drawFilledRectangle($PosArray[2],$Y-$ExtremityLength,$PosArray[2]-$ExtremityWidth,$Y+$ExtremityLength,$ExtremitySettings); + $this->pChartObject->drawFilledRectangle($PosArray[3],$Y-$ExtremityLength,$PosArray[3]+$ExtremityWidth,$Y+$ExtremityLength,$ExtremitySettings); + + if ( $RecordImageMap ) { $this->pChartObject->addToImageMap("RECT",floor($PosArray[2]-$ExtremityWidth).",".floor($Y-$ExtremityLength).",".floor($PosArray[3]+$ExtremityWidth).",".floor($Y+$ExtremityLength),$ImageMapColor,$ImageMapTitle,$Values); } + } + + if ( $ShadowOnBoxesOnly ) { $this->pChartObject->Shadow = $RestoreShadow; } + + if ( $PosArray[0] < $PosArray[1] ) + $this->pChartObject->drawFilledRectangle($PosArray[0],$Y-$BoxOffset,$PosArray[1],$Y+$BoxOffset,$BoxUpSettings); + else + $this->pChartObject->drawFilledRectangle($PosArray[0],$Y-$BoxOffset,$PosArray[1],$Y+$BoxOffset,$BoxDownSettings); + + if ( isset($PosArray[4]) ) + $this->pChartObject->drawLine($PosArray[4],$Y-$ExtremityLength,$PosArray[4],$Y+$ExtremityLength,$MedianSettings); + + $Y = $Y + $XStep; + } + } + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSurface.class.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSurface.class.php new file mode 100644 index 0000000..0aeb9b9 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/class/pSurface.class.php @@ -0,0 +1,315 @@ +pChartObject = $pChartObject; + $this->GridSize = 10; + $this->Points = ""; + } + + /* Define the grid size and initialise the 2D matrix */ + function setGrid($XSize=10,$YSize=10) + { + for($X=0; $X<=$XSize; $X++) { for($Y=0; $Y<=$YSize; $Y++) { $this->Points[$X][$Y]=UNKNOWN; } } + + $this->GridSizeX = $XSize; + $this->GridSizeY = $YSize; + } + + /* Add a point on the grid */ + function addPoint($X,$Y,$Value,$Force=TRUE) + { + if ( $X < 0 || $X >$this->GridSizeX ) { return(0); } + if ( $Y < 0 || $Y >$this->GridSizeY ) { return(0); } + + if ( $this->Points[$X][$Y] == UNKNOWN || $Force ) + $this->Points[$X][$Y] = $Value; + elseif ( $this->Points[$X][$Y] == UNKNOWN ) + $this->Points[$X][$Y] = $Value; + else + $this->Points[$X][$Y] = ($this->Points[$X][$Y] + $Value)/2; + } + + /* Write the X labels */ + function writeXLabels($Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : $this->pChartObject->FontColorR; + $G = isset($Format["G"]) ? $Format["G"] : $this->pChartObject->FontColorG; + $B = isset($Format["B"]) ? $Format["B"] : $this->pChartObject->FontColorB; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $this->pChartObject->FontColorA; + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $Padding = isset($Format["Padding"]) ? $Format["Padding"] : 5; + $Position = isset($Format["Position"]) ? $Format["Position"] : LABEL_POSITION_TOP; + $Labels = isset($Format["Labels"]) ? $Format["Labels"] : NULL; + $CountOffset = isset($Format["CountOffset"]) ? $Format["CountOffset"] : 0; + + if ( $Labels != NULL && !is_array($Labels) ) { $Label = $Labels; $Labels = ""; $Labels[] = $Label; } + + $X0 = $this->pChartObject->GraphAreaX1; + $XSize = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) / ($this->GridSizeX+1); + + $Settings = array("Angle"=>$Angle,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + if ( $Position == LABEL_POSITION_TOP ) + { + $YPos = $this->pChartObject->GraphAreaY1 - $Padding; + if ($Angle == 0 ) { $Settings["Align"] = TEXT_ALIGN_BOTTOMMIDDLE; } + if ($Angle != 0 ) { $Settings["Align"] = TEXT_ALIGN_MIDDLELEFT; } + } + elseif ( $Position == LABEL_POSITION_BOTTOM ) + { + $YPos = $this->pChartObject->GraphAreaY2 + $Padding; + if ($Angle == 0 ) { $Settings["Align"] = TEXT_ALIGN_TOPMIDDLE; } + if ($Angle != 0 ) { $Settings["Align"] = TEXT_ALIGN_MIDDLERIGHT; } + } + else + return(-1); + + for($X=0;$X<=$this->GridSizeX;$X++) + { + $XPos = floor($X0+$X*$XSize + $XSize/2); + + if( $Labels == NULL || !isset($Labels[$X]) ) + $Value = $X+$CountOffset; + else + $Value = $Labels[$X]; + + $this->pChartObject->drawText($XPos,$YPos,$Value,$Settings); + } + } + + /* Write the Y labels */ + function writeYLabels($Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : $this->pChartObject->FontColorR; + $G = isset($Format["G"]) ? $Format["G"] : $this->pChartObject->FontColorG; + $B = isset($Format["B"]) ? $Format["B"] : $this->pChartObject->FontColorB; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : $this->pChartObject->FontColorA; + $Angle = isset($Format["Angle"]) ? $Format["Angle"] : 0; + $Padding = isset($Format["Padding"]) ? $Format["Padding"] : 5; + $Position = isset($Format["Position"]) ? $Format["Position"] : LABEL_POSITION_LEFT; + $Labels = isset($Format["Labels"]) ? $Format["Labels"] : NULL; + $CountOffset = isset($Format["CountOffset"]) ? $Format["CountOffset"] : 0; + + if ( $Labels != NULL && !is_array($Labels) ) { $Label = $Labels; $Labels = ""; $Labels[] = $Label; } + + $Y0 = $this->pChartObject->GraphAreaY1; + $YSize = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) / ($this->GridSizeY+1); + + $Settings = array("Angle"=>$Angle,"R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + if ( $Position == LABEL_POSITION_LEFT ) + { $XPos = $this->pChartObject->GraphAreaX1 - $Padding; $Settings["Align"] = TEXT_ALIGN_MIDDLERIGHT; } + elseif ( $Position == LABEL_POSITION_RIGHT ) + { $XPos = $this->pChartObject->GraphAreaX2 + $Padding; $Settings["Align"] = TEXT_ALIGN_MIDDLELEFT; } + else + return(-1); + + for($Y=0;$Y<=$this->GridSizeY;$Y++) + { + $YPos = floor($Y0+$Y*$YSize + $YSize/2); + + if( $Labels == NULL || !isset($Labels[$Y]) ) + $Value = $Y+$CountOffset; + else + $Value = $Labels[$Y]; + + $this->pChartObject->drawText($XPos,$YPos,$Value,$Settings); + } + } + + /* Draw the area arround the specified Threshold */ + function drawContour($Threshold,$Format="") + { + $R = isset($Format["R"]) ? $Format["R"] : 0; + $G = isset($Format["G"]) ? $Format["G"] : 0; + $B = isset($Format["B"]) ? $Format["B"] : 0; + $Alpha = isset($Format["Alpha"]) ? $Format["Alpha"] : 100; + $Ticks = isset($Format["Ticks"]) ? $Format["Ticks"] : 3; + $Padding = isset($Format["Padding"]) ? $Format["Padding"] : 0; + + $X0 = $this->pChartObject->GraphAreaX1; + $Y0 = $this->pChartObject->GraphAreaY1; + $XSize = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) / ($this->GridSizeX+1); + $YSize = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) / ($this->GridSizeY+1); + + $Color = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha,"Ticks"=>$Ticks); + + for($X=0;$X<=$this->GridSizeX;$X++) + { + for($Y=0;$Y<=$this->GridSizeY;$Y++) + { + $Value = $this->Points[$X][$Y]; + + if ( $Value != UNKNOWN && $Value != IGNORED && $Value >= $Threshold) + { + $X1 = floor($X0+$X*$XSize)+$Padding; + $Y1 = floor($Y0+$Y*$YSize)+$Padding; + $X2 = floor($X0+$X*$XSize+$XSize); + $Y2 = floor($Y0+$Y*$YSize+$YSize); + + if ( $X > 0 && $this->Points[$X-1][$Y] != UNKNOWN && $this->Points[$X-1][$Y] != IGNORED && $this->Points[$X-1][$Y] < $Threshold) + $this->pChartObject->drawLine($X1,$Y1,$X1,$Y2,$Color); + if ( $Y > 0 && $this->Points[$X][$Y-1] != UNKNOWN && $this->Points[$X][$Y-1] != IGNORED && $this->Points[$X][$Y-1] < $Threshold) + $this->pChartObject->drawLine($X1,$Y1,$X2,$Y1,$Color); + if ( $X < $this->GridSizeX && $this->Points[$X+1][$Y] != UNKNOWN && $this->Points[$X+1][$Y] != IGNORED && $this->Points[$X+1][$Y] < $Threshold) + $this->pChartObject->drawLine($X2,$Y1,$X2,$Y2,$Color); + if ( $Y < $this->GridSizeY && $this->Points[$X][$Y+1] != UNKNOWN && $this->Points[$X][$Y+1] != IGNORED && $this->Points[$X][$Y+1] < $Threshold) + $this->pChartObject->drawLine($X1,$Y2,$X2,$Y2,$Color); + } + } + } + } + + /* Draw the surface chart */ + function drawSurface($Format="") + { + $Palette = isset($Format["Palette"]) ? $Format["Palette"] : NULL; + $ShadeR1 = isset($Format["ShadeR1"]) ? $Format["ShadeR1"] : 77; + $ShadeG1 = isset($Format["ShadeG1"]) ? $Format["ShadeG1"] : 205; + $ShadeB1 = isset($Format["ShadeB1"]) ? $Format["ShadeB1"] : 21; + $ShadeA1 = isset($Format["ShadeA1"]) ? $Format["ShadeA1"] : 40; + $ShadeR2 = isset($Format["ShadeR2"]) ? $Format["ShadeR2"] : 227; + $ShadeG2 = isset($Format["ShadeG2"]) ? $Format["ShadeG2"] : 135; + $ShadeB2 = isset($Format["ShadeB2"]) ? $Format["ShadeB2"] : 61; + $ShadeA2 = isset($Format["ShadeA2"]) ? $Format["ShadeA2"] : 100; + $Border = isset($Format["Border"]) ? $Format["Border"] : FALSE; + $BorderR = isset($Format["BorderR"]) ? $Format["BorderR"] : 0; + $BorderG = isset($Format["BorderG"]) ? $Format["BorderG"] : 0; + $BorderB = isset($Format["BorderB"]) ? $Format["BorderB"] : 0; + $Surrounding = isset($Format["Surrounding"]) ? $Format["Surrounding"] : -1; + $Padding = isset($Format["Padding"]) ? $Format["Padding"] : 1; + + $X0 = $this->pChartObject->GraphAreaX1; + $Y0 = $this->pChartObject->GraphAreaY1; + $XSize = ($this->pChartObject->GraphAreaX2 - $this->pChartObject->GraphAreaX1) / ($this->GridSizeX+1); + $YSize = ($this->pChartObject->GraphAreaY2 - $this->pChartObject->GraphAreaY1) / ($this->GridSizeY+1); + + for($X=0;$X<=$this->GridSizeX;$X++) + { + for($Y=0;$Y<=$this->GridSizeY;$Y++) + { + $Value = $this->Points[$X][$Y]; + + if ( $Value != UNKNOWN && $Value != IGNORED ) + { + $X1 = floor($X0+$X*$XSize)+$Padding; + $Y1 = floor($Y0+$Y*$YSize)+$Padding; + $X2 = floor($X0+$X*$XSize+$XSize); + $Y2 = floor($Y0+$Y*$YSize+$YSize); + + if ( $Palette != NULL ) + { + if ( isset($Palette[$Value]) && isset($Palette[$Value]["R"]) ) { $R = $Palette[$Value]["R"]; } else { $R = 0; } + if ( isset($Palette[$Value]) && isset($Palette[$Value]["G"]) ) { $G = $Palette[$Value]["G"]; } else { $G = 0; } + if ( isset($Palette[$Value]) && isset($Palette[$Value]["B"]) ) { $B = $Palette[$Value]["B"]; } else { $B = 0; } + if ( isset($Palette[$Value]) && isset($Palette[$Value]["Alpha"]) ) { $Alpha = $Palette[$Value]["Alpha"]; } else { $Alpha = 1000; } + } + else + { + $R = (($ShadeR2-$ShadeR1)/100)*$Value + $ShadeR1; + $G = (($ShadeG2-$ShadeG1)/100)*$Value + $ShadeG1; + $B = (($ShadeB2-$ShadeB1)/100)*$Value + $ShadeB1; + $Alpha = (($ShadeA2-$ShadeA1)/100)*$Value + $ShadeA1; + } + + $Settings = array("R"=>$R,"G"=>$G,"B"=>$B,"Alpha"=>$Alpha); + if ( $Border ) { $Settings["BorderR"] = $BorderR; $Settings["BorderG"] = $BorderG; $Settings["BorderB"] = $BorderB; } + if ( $Surrounding != -1 ) { $Settings["BorderR"] = $R+$Surrounding; $Settings["BorderG"] = $G+$Surrounding; $Settings["BorderB"] = $B+$Surrounding; } + + $this->pChartObject->drawFilledRectangle($X1,$Y1,$X2-1,$Y2-1,$Settings); + } + } + } + } + + /* Compute the missing points */ + function computeMissing() + { + $Missing = ""; + for($X=0;$X<=$this->GridSizeX;$X++) + { + for($Y=0;$Y<=$this->GridSizeY;$Y++) + { + if ( $this->Points[$X][$Y] == UNKNOWN ) + $Missing[] = $X.",".$Y; + } + } + shuffle($Missing); + + foreach($Missing as $Key => $Pos) + { + $Pos = preg_split("/,/",$Pos); + $X = $Pos[0]; + $Y = $Pos[1]; + + if ( $this->Points[$X][$Y] == UNKNOWN ) + { + $NearestNeighbor = $this->getNearestNeighbor($X,$Y); + + $Value = 0; $Points = 0; + for($Xi=$X-$NearestNeighbor;$Xi<=$X+$NearestNeighbor;$Xi++) + { + for($Yi=$Y-$NearestNeighbor;$Yi<=$Y+$NearestNeighbor;$Yi++) + { + if ($Xi >=0 && $Yi >= 0 && $Xi <= $this->GridSizeX && $Yi <= $this->GridSizeY && $this->Points[$Xi][$Yi] != UNKNOWN && $this->Points[$Xi][$Yi] != IGNORED) + { + $Value = $Value + $this->Points[$Xi][$Yi]; $Points++; + } + } + } + + if ( $Points != 0 ) { $this->Points[$X][$Y] = $Value / $Points; } + } + } + } + + /* Return the nearest Neighbor distance of a point */ + function getNearestNeighbor($Xp,$Yp) + { + $Nearest = UNKNOWN; + for($X=0;$X<=$this->GridSizeX;$X++) + { + for($Y=0;$Y<=$this->GridSizeY;$Y++) + { + if ( $this->Points[$X][$Y] != UNKNOWN && $this->Points[$X][$Y] != IGNORED ) + { + $DistanceX = max($Xp,$X)-min($Xp,$X); + $DistanceY = max($Yp,$Y)-min($Yp,$Y); + $Distance = max($DistanceX,$DistanceY); + if ( $Distance < $Nearest || $Nearest == UNKNOWN ) { $Nearest = $Distance; } + } + } + } + return($Nearest); + } + } +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/data/128B.db b/tags/semmelstatzR_1_0_0_beta/includes/pChart/data/128B.db new file mode 100644 index 0000000..20de3c9 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/data/128B.db @@ -0,0 +1,107 @@ +0;32;11011001100 +1;33;11001101100 +2;34;11001100110 +3;35;10010011000 +4;36;10010001100 +5;37;10001001100 +6;38;10011001000 +7;39;10011000100 +8;40;10001100100 +9;41;11001001000 +10;42;11001000100 +11;43;11000100100 +12;44;10110011100 +13;45;10011011100 +14;46;10011001110 +15;47;10111001100 +16;48;10011101100 +17;49;10011100110 +18;50;11001110010 +19;51;11001011100 +20;52;11001001110 +21;53;11011100100 +22;54;11001110100 +23;55;11101101110 +24;56;11101001100 +25;57;11100101100 +26;58;11100100110 +27;59;11101100100 +28;60;11100110100 +29;61;11100110010 +30;62;11011011000 +31;63;11011000110 +32;64;11000110110 +33;65;10100011000 +34;66;10001011000 +35;67;10001000110 +36;68;10110001000 +37;69;10001101000 +38;70;10001100010 +39;71;11010001000 +40;72;11000101000 +41;73;11000100010 +42;74;10110111000 +43;75;10110001110 +44;76;10001101110 +45;77;10111011000 +46;78;10111000110 +47;79;10001110110 +48;80;11101110110 +49;81;11010001110 +50;82;11000101110 +51;83;11011101000 +52;84;11011100010 +53;85;11011101110 +54;86;11101011000 +55;87;11101000110 +56;88;11100010110 +57;89;11101101000 +58;90;11101100010 +59;91;11100011010 +60;92;11101111010 +61;93;11001000010 +62;94;11110001010 +63;95;10100110000 +64;96;10100001100 +65;97;10010110000 +66;98;10010000110 +67;99;10000101100 +68;100;10000100110 +69;101;10110010000 +70;102;10110000100 +71;103;10011010000 +72;104;10011000010 +73;105;10000110100 +74;106;10000110010 +75;107;11000010010 +76;108;11001010000 +77;109;11110111010 +78;110;11000010100 +79;111;10001111010 +80;112;10100111100 +81;113;10010111100 +82;114;10010011110 +83;115;10111100100 +84;116;10011110100 +85;117;10011110010 +86;118;11110100100 +87;119;11110010100 +88;120;11110010010 +89;121;11011011110 +90;122;11011110110 +91;123;11110110110 +92;124;10101111000 +93;125;10100011110 +94;126;10001011110 +95;200;10111101000 +96;201;10111100010 +97;202;11110101000 +98;203;11110100010 +99;204;10111011110 +100;205;10111101110 +101;206;11101011110 +102;207;11110101110 +103;208;11010000100 +104;209;11010010000 +105;210;11010011100 +106;211;1100011101011 \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/data/39.db b/tags/semmelstatzR_1_0_0_beta/includes/pChart/data/39.db new file mode 100644 index 0000000..b1a74d6 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/data/39.db @@ -0,0 +1,44 @@ +0;101001101101 +1;110100101011 +2;101100101011 +3;110110010101 +4;101001101011 +5;110100110101 +6;101100110101 +7;101001011011 +8;110100101101 +9;101100101101 +A;110101001011 +B;101101001011 +C;110110100101 +D;101011001011 +E;110101100101 +F;101101100101 +G;101010011011 +H;110101001101 +I;101101001101 +J;101011001101 +K;110101010011 +L;101101010011 +M;110110101001 +N;101011010011 +O;110101101001 +P;101101101001 +Q;101010110011 +R;110101011001 +S;101101011001 +T;101011011001 +U;110010101011 +V;100110101011 +W;110011010101 +X;100101101011 +Y;110010110101 +Z;100110110101 +-;100101011011 +.;110010101101 + ;100110101101 +$;100100100101 +/;100100101001 ++;100101001001 +%;101001001001 +*;100101101101 \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Bedizen.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Bedizen.ttf new file mode 100644 index 0000000..d115733 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Bedizen.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Forgotte.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Forgotte.ttf new file mode 100644 index 0000000..a2f7f4a Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Forgotte.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/GeosansLight.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/GeosansLight.ttf new file mode 100644 index 0000000..055932a Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/GeosansLight.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/MankSans.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/MankSans.ttf new file mode 100644 index 0000000..a6146a9 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/MankSans.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Silkscreen.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Silkscreen.ttf new file mode 100644 index 0000000..ae4425d Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/Silkscreen.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/advent_light.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/advent_light.ttf new file mode 100644 index 0000000..514030a Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/advent_light.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/calibri.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/calibri.ttf new file mode 100644 index 0000000..8b6e3c9 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/calibri.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/pf_arma_five.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/pf_arma_five.ttf new file mode 100644 index 0000000..db04ec3 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/pf_arma_five.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/verdana.ttf b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/verdana.ttf new file mode 100644 index 0000000..5a059d2 Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/fonts/verdana.ttf differ diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/index.php b/tags/semmelstatzR_1_0_0_beta/includes/pChart/index.php new file mode 100644 index 0000000..4df93fc --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/index.php @@ -0,0 +1,6 @@ + diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/autumn.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/autumn.color new file mode 100644 index 0000000..80ffbc0 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/autumn.color @@ -0,0 +1,6 @@ +185,106,154,100 +216,137,184,100 +156,192,137,100 +216,243,201,100 +253,232,215,100 +255,255,255,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/blind.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/blind.color new file mode 100644 index 0000000..9d62238 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/blind.color @@ -0,0 +1,6 @@ +109,152,171,100 +0,39,94,100 +254,183,41,100 +168,177,184,100 +255,255,255,100 +0,0,0,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/evening.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/evening.color new file mode 100644 index 0000000..5d0c1a5 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/evening.color @@ -0,0 +1,6 @@ +242,245,237,100 +255,194,0,100 +255,91,0,100 +184,0,40,100 +132,0,46,100 +74,192,242,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/kitchen.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/kitchen.color new file mode 100644 index 0000000..b0eeb33 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/kitchen.color @@ -0,0 +1,6 @@ +155,225,251,100 +197,239,253,100 +189,32,49,100 +35,31,32,100 +255,255,255,100 +0,98,149,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/light.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/light.color new file mode 100644 index 0000000..d0657db --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/light.color @@ -0,0 +1,7 @@ +239,210,121,100 +149,203,233,100 +2,71,105,100 +175,215,117,100 +44,87,0,100 +222,157,127,100 + diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/navy.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/navy.color new file mode 100644 index 0000000..3b6df5e --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/navy.color @@ -0,0 +1,6 @@ +25,78,132,100 +59,107,156,100 +31,36,42,100 +55,65,74,100 +96,187,34,100 +242,186,187,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/shade.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/shade.color new file mode 100644 index 0000000..0e43a1d --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/shade.color @@ -0,0 +1,6 @@ +117,113,22,100 +174,188,33,100 +217,219,86,100 +0,71,127,100 +76,136,190,100 +141,195,233,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/spring.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/spring.color new file mode 100644 index 0000000..386cbc4 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/spring.color @@ -0,0 +1,6 @@ +146,123,81,100 +168,145,102,100 +128,195,28,100 +188,221,90,100 +255,121,0,100 +251,179,107,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/summer.color b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/summer.color new file mode 100644 index 0000000..1609534 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/includes/pChart/palettes/summer.color @@ -0,0 +1,6 @@ +253,184,19,100 +246,139,31,100 +241,112,34,100 +98,194,204,100 +228,246,248,100 +238,246,108,100 diff --git a/tags/semmelstatzR_1_0_0_beta/includes/pChart/readme.txt b/tags/semmelstatzR_1_0_0_beta/includes/pChart/readme.txt new file mode 100644 index 0000000..1c3e21f Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/includes/pChart/readme.txt differ diff --git a/tags/semmelstatzR_1_0_0_beta/locale/semmelstatzR-de_DE.mo b/tags/semmelstatzR_1_0_0_beta/locale/semmelstatzR-de_DE.mo new file mode 100644 index 0000000..ba020ed Binary files /dev/null and b/tags/semmelstatzR_1_0_0_beta/locale/semmelstatzR-de_DE.mo differ diff --git a/tags/semmelstatzR_1_0_0_beta/locale/semmelstatzR-de_DE.po b/tags/semmelstatzR_1_0_0_beta/locale/semmelstatzR-de_DE.po new file mode 100644 index 0000000..8f2d193 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/locale/semmelstatzR-de_DE.po @@ -0,0 +1,90 @@ +msgid "" +msgstr "" +"Project-Id-Version: semmelstatzR\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-08-23 18:59+0100\n" +"PO-Revision-Date: 2011-08-23 18:59+0100\n" +"Last-Translator: Ortwin Pinke \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e;_n:1,2;_c;_ngettext:1,2;_x:2c,1;semr_i18n\n" +"X-Poedit-Basepath: ../../\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Poedit-Language: German\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SearchPath-0: semmelstatzR\n" + +#: semmelstatzR/semmelstatzR.php:96 +msgid "Current Statz" +msgstr "Aktuell" + +#: semmelstatzR/semmelstatzR.php:97 +msgid "History" +msgstr "Historie" + +#: semmelstatzR/semmelstatzR.php:98 +msgid "Log" +msgstr "Log" + +#: semmelstatzR/semmelstatzR.php:99 +msgid "Database" +msgstr "Datenbank" + +#: semmelstatzR/semmelstatzR.php:100 +msgid "Templates" +msgstr "Templates" + +#: semmelstatzR/semmelstatzR.php:101 +msgid "Options" +msgstr "Optionen" + +#: semmelstatzR/semmelstatzR.php:273 +#, php-format +msgid "%d Visitor online" +msgid_plural "%d Visitors online" +msgstr[0] "%d Besucher online" +msgstr[1] "%d Besucher online" + +#: semmelstatzR/semmelstatzR.php:275 +#, php-format +msgid "Today: %s" +msgstr "Heute: %s" + +#: semmelstatzR/semmelstatzR.php:276 +msgid "more..." +msgstr "mehr..." + +#: semmelstatzR/semmelstatzR.php:296 +msgid "Number of Items (max. 10):" +msgstr "Anzahl der Einträge (max. 20):" + +#: semmelstatzR/semmelstatzR.php:319 +msgid "... no entries" +msgstr "... keine Einträge" + +#: semmelstatzR/semmelstatzR.php:327 +#, php-format +msgid "%d Visitor" +msgid_plural "%d Visitors" +msgstr[0] "%d Besucher" +msgstr[1] "%d Besucher" + +#: semmelstatzR/semmelstatzR.php:328 +#, php-format +msgid "%d Hit" +msgid_plural "%d Hits" +msgstr[0] "%d Aufruf" +msgstr[1] "%d Aufrufe" + +#: semmelstatzR/semmelstatzR.php:329 +#, php-format +msgid "%d Referrer" +msgid_plural "%d Referrers" +msgstr[0] "%d Referer" +msgstr[1] "%d Referer" + +#~ msgid "Number of Whatever:" +#~ msgstr "Anzahl von Was auch immer:" diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR-database.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-database.php new file mode 100644 index 0000000..b8007a6 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-database.php @@ -0,0 +1,127 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +if(current_user_can('manage_statz')) { + + global $wpdb; + $pre = $wpdb->prefix; $lenpre = strlen($pre); + $tablesstatus = $wpdb->get_results("SHOW TABLE STATUS"); + + print "
"; + print "
"; + print "

"; + print "

SemmelstatzR › Datenbank

"; + + print "
Datenbank
"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + $row_usage = 0; + $data_usage = 0; + $index_usage = 0; + $total_usage = 0; + $overhead_usage = 0; + foreach($tablesstatus as $key=>$tablestatus) { + + if(substr($tablestatus->Name,0,$lenpre) != $pre) continue; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + if($tablestatus->Data_free > 0) { + print ""; + } + else { + print ""; + } + + $row_usage += $tablestatus->Rows; + $data_usage += $tablestatus->Data_length; + $index_usage += $tablestatus->Index_length; + $total_usage += $tablestatus->Data_length + $tablestatus->Index_length; + $overhead_usage += $tablestatus->Data_free; + echo ''; + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + + print "
Nr.TabellenDatensätzeDatenIndexDaten & IndexÜberhang".($key+1)."".$tablestatus->Name."".number_format($tablestatus->Rows,0,',','.')."".number_format($tablestatus->Data_length/1024,0,',','.')." kb".number_format($tablestatus->Index_length/1024,0,',','.')." kb".number_format(($tablestatus->Data_length + $tablestatus->Index_length)/1024,0,',','.')." kb"; + print " ".number_format($tablestatus->Data_free/1024,2,',','.')." kb"; + print "--
Gesamt ".number_format($row_usage,0,',','.')."".number_format($data_usage/1024,0,',','.')." kb".number_format($index_usage/1024,0,',','.')." kb".number_format($total_usage/1024,0,',','.')." kb".number_format($overhead_usage/1024,2,',','.')." kb

Es werden ausschließlich die WORDPRESS-Tabellen angezeigt, die zum Blog '".get_option('blogname')."' gehören.

"; + print "
"; + + sem_showCopyright(); + + print "
"; + +} else { + echo '

No permission to access this area

'; +} + +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR-history.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-history.php new file mode 100644 index 0000000..ec6282b --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-history.php @@ -0,0 +1,302 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + if(!current_user_can('manage_statz')) { + die('Zugriff verweigert'); +} + +include_once plugin_dir_path(__FILE__).'includes/pChart/class/pData.class.php'; +include_once plugin_dir_path(__FILE__).'includes/pChart/class/pDraw.class.php'; +include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php'; + +function sem_drawLast30DaysGoo() { + global $wpdb; + + //$sql = $wpdb->get_results("ALTER TABLE ".$wpdb->statzhist." ORDER BY date ASC"); + $results = $wpdb->get_results("SELECT DAY(date) as days, visitors FROM ".$wpdb->statzhist." WHERE date >= NOW() - INTERVAL 31 DAY ORDER BY date ASC"); + + print "
Besucher: Die letzten 30 Tage
"; + print "
"; + + if (empty($results)) { + print "... noch keine Einträge
"; + return; + } + + foreach ($results as $result) { + $visitors[] = $result->visitors; + $days[] = $result->days; + } + + $maxvalue = max($visitors); + $daylabels = implode('|', $days); + + $MyData = new pData(); + $MyData->addPoints($visitors,"Visitors"); + $MyData->setAxisName(0,"Hits"); + $MyData->addPoints($days,"Days"); + $MyData->setAbscissa("Days"); + + $myPicture = new pImage(780,150,$MyData); + $myPicture->Antialias = FALSE; + $myPicture->drawRectangle(0,0,779,149,array("R"=>0,"G"=>0,"B"=>0)); + $myPicture->setFontProperties(array("FontName"=>plugin_dir_path(__FILE__)."includes/pChart/fonts/Bedizen.ttf","FontSize"=>8)); + $myPicture->setGraphArea(30,20,760,130); + $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200); + $myPicture->drawScale($scaleSettings); + $myPicture->drawBarChart(); + @$myPicture->Render(WP_CONTENT_DIR."/cache/Last30DaysGoo.png"); + + print "
"; + + //print ""; + if(is_readable(WP_CONTENT_DIR."/cache/Last30DaysGoo.png")) { + print ''; + } else if(!is_dir(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Cannot find cache-folder!'); + } else if(!is_writable(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Missing rights for cache-folder!'); + } + print "
"; + + print ""; + print "
"; + } + +### HISTORY Monatsgrafik GOOGLE-API + + function sem_drawAllMonthGoo() { + global $wpdb; + + $nummonths = $wpdb->get_var("SELECT MONTH(date) FROM ".$wpdb->statzhist); + $results = $wpdb->get_results("SELECT MONTH(date) as months, SUM(visitors) as visitors FROM ".$wpdb->statzhist." GROUP BY months ORDER BY date ASC"); + + print "
Besucher: Die letzten ".$nummonths." Monate
"; + print "
"; + + if (empty($results)) { + print "... noch keine Einträge
"; + return; + } + + foreach ($results as $result) { + $visitors[] = $result->visitors; + $months[] = $result->months; + } + + $maxvalue = max($visitors); + $monthlabels = implode('|', $months); + + $MyData = new pData(); + $MyData->addPoints($visitors,"Visitors"); + $MyData->setAxisName(0,"Hits"); + $MyData->addPoints($months,"Month"); + $MyData->setAbscissa("Month"); + + $myPicture = new pImage(780,150,$MyData); + $myPicture->Antialias = FALSE; + $myPicture->drawRectangle(0,0,779,149,array("R"=>0,"G"=>0,"B"=>0)); + $myPicture->setFontProperties(array("FontName"=>plugin_dir_path(__FILE__)."includes/pChart/fonts/Bedizen.ttf","FontSize"=>8)); + $myPicture->setGraphArea(30,20,760,130); + $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200); + $myPicture->drawScale($scaleSettings); + $myPicture->drawBarChart(); + @$myPicture->Render(WP_CONTENT_DIR."/cache/AllMonthGoo.png"); + + print "
"; + + //print ""; + if(is_readable(WP_CONTENT_DIR."/cache/AllMonthGoo.png")) { + print ''; + } else if(!is_dir(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Cannot find cache-folder!'); + } else if(!is_writable(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Missing rights for cache-folder!'); + } + print "
"; + + print ""; + print "
"; + } + +### HISTORY ALLE historischen Tage + +function sem_drawAllDaysGoo() { + /* @var $wpdb wpdb */ + global $wpdb; + + $numdays = $wpdb->get_var("SELECT COUNT(date) FROM ".$wpdb->statzhist); + + $results = $wpdb->get_results("SELECT referers, visitors, hits, substring(date,1,10) AS date + FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date ASC"); + + + print "
Besucher: ".$numdays." Tage zurück
"; + print "
"; + + if (empty($results)) { + print "... noch keine Einträge
"; + return; + } + + foreach($results as $result) { + $visitors[] = $result->visitors; + $hits[] = $result->hits; + $referers[] = $result->referers; + } + + $maxvalue = max($visitors); + + $MyData = new pData(); + $MyData->addPoints($visitors,"Visitors"); + $MyData->setAxisName(0,"Hits"); + $MyData->addPoints($hits,"Hits"); + $MyData->setAbscissa("Hits"); + + $myPicture = new pImage(780,150,$MyData); + $myPicture->Antialias = FALSE; + $myPicture->drawRectangle(0,0,779,149,array("R"=>0,"G"=>0,"B"=>0)); + $myPicture->setFontProperties(array("FontName"=>plugin_dir_path(__FILE__)."includes/pChart/fonts/Bedizen.ttf","FontSize"=>8)); + $myPicture->setGraphArea(30,20,760,130); + $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200); + $myPicture->drawScale($scaleSettings); + $myPicture->drawBarChart(); + @$myPicture->Render(WP_CONTENT_DIR."/cache/AllDaysGoo.png"); + + print "
"; + //print ""; + if(is_readable(WP_CONTENT_DIR."/cache/AllDaysGoo.png")) { + print ''; + } else if(!is_dir(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Cannot find cache-folder!'); + } else if(!is_writable(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Missing rights for cache-folder!'); + } + print "
"; + + print ""; + print "
"; +} + + function sem_showAllDaysInNumbers() { + global $wpdb; + + $numdays = $wpdb->get_var("SELECT COUNT(date) as num FROM $wpdb->statzhist"); + + $results = $wpdb->get_results("SELECT referers, visitors, hits, substring(date,1,10) AS date + FROM ".$wpdb->statzhist." GROUP BY date ORDER BY date DESC"); + + print "
Die letzten ".$numdays." Tage
"; + if (empty($results)) { + print "... noch keine Einträge"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $sum_visitors = 0; + $sum_hits = 0; + $sum_referers = 0; + foreach($results as $key=>$result) { + $date = mysql2date('d.m.Y',$result->date); + $visitors = $result->visitors; + $sum_visitors += $visitors; + $hits = $result->hits; + $sum_hits += $hits; + $referers = $result->referers; + $sum_referers += $referers; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
DatumBesucherHitsReferer 
".$date."".$visitors."".$hits."".$referers." 
 
Gesamt".$sum_visitors."".$sum_hits."".$sum_referers."
Durchschnitt".ceil($sum_visitors / $numdays)."".ceil($sum_hits / $numdays)."".ceil($sum_referers / $numdays)."
"; + print "
"; + } + + +### ANZEIGE HISTORY + + print "
"; + print "

"; + print "

SemmelstatzR › Historie

"; + + sem_drawLast30DaysGoo(); + sem_drawAllMonthGoo(); + sem_drawAllDaysGoo(); + sem_showAllDaysInNumbers(); + sem_showCopyright(); + + print "
"; + +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR-log.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-log.php new file mode 100644 index 0000000..6a2b819 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-log.php @@ -0,0 +1,151 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +if(!current_user_can('manage_statz')) { + die('Zugriff verweigert'); +} + +### ANZEIGE LOG + + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"]; + $completerecords = + $wpdb->get_results("SELECT id, ip, time, referer, page, username FROM ".$wpdb->statz." ORDER BY time DESC LIMIT 0, ".$limit); + + print "
"; + print "

"; + print "

SemmelstatzR › Log

"; + print "
Die neuesten ".$limit." Datensätze
"; + + if ($completerecords == NULL) { + print "... noch keine Einträge"; + return; + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + foreach ($completerecords as $key=>$completerecord) { + $id = $completerecord->id; + $ip = $completerecord->ip; + if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip); + $date = mysql2date("d.m.Y G:i", $completerecord->time); + $referer = $completerecord->referer; + if($referer == "") { + $referer = "--"; + } + else { + if(strlen($referer) >= 50) { + $printreferer = substr($referer, 0, 50)."..."; + } + else { + $printreferer = $referer; + } + } + $keyword = sem_getKeyword($referer); + if(empty($keyword)) $keyword ='--'; + $page = $completerecord->page; + if ($page == 0) { + $link = get_option('siteurl'); + $title = "0"; //oder wie auch immer + } + else { + $link = get_permalink($page); + $postarray = get_post($page, ARRAY_A); + $title = $postarray['post_title']; + } + $username = $completerecord->username; + print ""; + print ""; + print ""; + print ""; + } + else { + if($mask != true) { + print "".$printreferer.""; + } + else { + $referer = htmlspecialchars($referer, ENT_QUOTES); + print "".$printreferer.""; + } + } + + print ""; + print ""; + print ""; + print ""; + } + + print ""; + print "
DatumTCP/IPRefererSuchbegriffPost/PageUsername
".$date." + +   + +   + + "; + if ($referer == "--") { + print "--".$keyword."".$title."".$username."
"; + print "
"; + + if (function_exists('sem_showCopyright')) sem_showCopyright(); + + print "
"; + +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR-options.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-options.php new file mode 100644 index 0000000..2035000 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-options.php @@ -0,0 +1,391 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +if(!current_user_can('manage_statz')) { + die('Zugriff verweigert'); +} + + if(isset($_POST['options_save'])) { + + $sem_options['statz_write_admins'] = $_POST['statz_write_admins']; + $sem_options['statz_write_users'] = $_POST['statz_write_users']; + $sem_options['statz_encode_ip'] = $_POST['statz_encode_ip']; + $sem_options['statz_days_limit'] = $_POST['statz_days_limit']; + $sem_options['statz_show_dailystatz'] = $_POST['statz_show_dailystatz']; + $sem_options['statz_referer_limit'] = $_POST['statz_referer_limit']; + $sem_options['statz_show_referers'] = $_POST['statz_show_referers']; + $sem_options['statz_mask_referer'] = $_POST['statz_mask_referer']; + $sem_options['statz_keyword_limit'] = $_POST['statz_keyword_limit']; + $sem_options['statz_show_keywords'] = $_POST['statz_show_keywords']; + $sem_options['statz_topreads_limit'] = $_POST['statz_topreads_limit']; + $sem_options['statz_show_reads'] = $_POST['statz_show_reads']; + $sem_options['statz_show_todayreads'] = $_POST['statz_show_todayreads']; + $sem_options['statz_comment_limit'] = $_POST['statz_comment_limit']; + $sem_options['statz_show_commenters'] = $_POST['statz_show_commenters']; + $sem_options['statz_show_topcommposts'] = $_POST['statz_show_topcommposts']; + $sem_options['statz_show_useronline'] = $_POST['statz_show_useronline']; + $sem_options['statz_online_time'] = $_POST['statz_online_time']; + $sem_options['statz_show_todayusers'] = $_POST['statz_show_todayusers']; + $sem_options['statz_on_dashboard'] = $_POST['statz_on_dashboard']; + $sem_options['statz_datarecs_limit'] = $_POST['statz_datarecs_limit']; + $sem_options['statz_use_img'] = $_POST['statz_use_img']; + update_option("semmelstatzR_options", $sem_options); + + echo '

'.semr_i18n('Options saved').'

'; + } + + if(isset($_POST['trunc_save'])) { + if (sem_truncateStatzTable()) { + echo "

".semr_i18n('statz-table emptied succesfully.')."

"; + } + } + + if(isset($_POST['limit_save'])) { + $sem_options["statz_recdays_limit"] = $_POST["statz_recdays_limit"]; + + if($sem_options["statz_recdays_limit"] < 1 || (!is_numeric($sem_options["statz_recdays_limit"]))) $sem_options["statz_recdays_limit"] = 1; + update_option("semmelstatzR_options", $sem_options); + + echo "

Der Wert für das Limit wurde erfolgreich gespeichert.

"; + } + + if(isset($_POST['limit_execute'])) { + $days = $sem_options["statz_recdays_limit"]; + if(($days >= sem_showStatzDays()) || (!is_numeric($days))) { + echo "

Der eingegebene Wert ist keine Zahl oder zu groß!

"; + } + else { + if ($result == sem_delOutOfLimit()) { + echo "

Die statz-Tabelle wurde erfolgreich auf ".$days." Tage gekürzt.

"; + } + } + } + + if(isset($_POST['cron_save'])) { + if($sem_options['statz_do_cron'] == true) { + $sem_options['statz_do_cron'] = false; + } + else { + $sem_options['statz_do_cron'] = true; + $sem_options['statz_next_cron'] = time() + 86400; + } + update_option("semmelstatzR_options", $sem_options); + } + +?> + +
+ +
+ +

+

SemmelstatzR ›

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
checked="checked" /> +
Blog-Administratoren aufzeichnen checked="checked" /> + Trackt alle Zugriffe des/der Blog-Admins im Frontend des Blogs - (default: AUS)
Blog-User aufzeichnen checked="checked" /> + Trackt alle Zugriffe der registrierten Blog-User im Frontend des Blogs - (default: AUS)
IP-Adressen codiert aufzeichnen checked="checked" /> + Der Gesetzgeber verbietet die Aufzeichnung der IP-Adresse eines Besuchers über dessen + zeitlichen Verbleib auf einer Webseite hinaus. Nach Aktivierung dieser Option rechnet SEMMELSTATZ + die IP-Adresse des Besuchers nach einem simplen arithmetischen Verfahren um. Somit schreibt + SEMMELSTATZ keine IP-Adressen im Klartext in die statz-Tabelle - (default: AUS)
Statz der letzten " style="text-align:center;" size="2" maxlength="2" /> + Tage anzeigen + checked="checked" /> + Tagesübersicht Besucher-Hits-Referer in absoluten Zahlen mit absteigendem Datum - (default: 7, AN)
" style="text-align:center;" size="2" maxlength="2" /> + Referer anzeigen + checked="checked" /> + Listet Links auf Webseiten, die auf dieses Blog + verweisen - (default: 10, AN)
Referer-Links via Google maskieren checked="checked" /> + Der Aufruf einer referenzierenden Webseite aus SEMMELSTATZ heraus würde die komplette URL + des Adminbereichs an den Webserver dieser Webseite übermitteln. Die Maskierung der Referer-Links + als GOOGLE-Weiterleitung verhindert dies. Funktioniert nicht mit allen Links - (default: AUS)
" style="text-align:center;" size="2" maxlength="2" /> + Suchbegriffe anzeigen + checked="checked" /> + Listet Links zu Suchbegriffen, mit denen Besucher + das Blog gefunden haben. Der Name der entsprechenden Searchengine (soweit bekannt) ist dem + Suchbegriff vorangestellt. Der WP-internen Suche steht ein INTERN voraus - (default: 10, AN)
Top" style="text-align:center;" size="2" maxlength="2" /> + Posts & Pages anzeigen + checked="checked" /> + Die meist gelesenen Posts & Pages, basierend + auf dem seit SEMMELSTATZ 3.2 neuen Zähler in der posts-Tabelle. Dieser Zähler ist, im Gegensatz + zur Ermittlung aus der statz-Tabelle, dauerhaft - (default: 10, AN)
Top10 Posts & Pages heute anzeigen checked="checked" /> + Die 10 meist gelesenen Posts & Pages des laufenden Tages mit Anzahl der Klicks - (default: AN)
Top" style="text-align:center;" size="2" maxlength="2" /> + Kommentierer anzeigen + checked="checked" /> + Die Top der Kommentierer auf Basis der + comments-Tabelle mit Anzahl ihrer Kommentare - (default: 10, AN)
Top10 kommentierter Posts anzeigen checked="checked" /> + Die Top10 der kommentierten Posts mit Anzahl der Kommentare - (default: AN)
Online-User anzeigen checked="checked" /> + Zeigt einen Besucher an, sobald er das Blog 'betreten' hat. Ist er ein Administrator oder regsitrierter + User des Blogs oder kommt mit einem Kommentar-COOKIE, wird er mit seinem Login- bzw. Kommentierer-Namen und + nicht als GAST angezeigt - (default: AN)
Sekunden, die ein User als anwesend gilt" style="text-align:center;" size="3" maxlength="4" /> + Dieser Wert legt fest, dass ein Besucher Sekunden als + anwesend gilt und so lange als ONLINE-Besucher angezeigt wird - (default: 180)
Heutige User anzeigen checked="checked" />(default: AN)
Mini-Statz im Dashboard anzeigen checked="checked" /> + Aktiviert das SEMMELSTATZ-Widget im Dashboard - (default: AUS)
Anzahl Datensätze im Log" style="text-align:center;" size="3" maxlength="4" /> + Anzahl der kompletten Datensätze DATUM-TCP/IP-REFERER-SUCHBEGRIFF-POST/PAGE-USERNAME + im SEMMELSTATZ-Log - (default: 100)
+ +

+ +
+ +

+

SemmelstatzR › Statz-Tabellen

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ statz-Tabelle: ,xx Tage (Der aktuelle Tag ist natürlich nie komplett!!!)
+ statzhist-Tabelle: Tage +
" style="text-align:center;" + size="2" maxlength="3" />-Tage-Limit für die statz-Tabelle festlegen. + + + + Um die statz-Tabelle nicht ins Unendliche anwachsen zu lassen, macht es Sinn sie zu limitieren, + egal, ob nun manuell oder automatisch. Links die Anzahl der Statistiktage (nicht der zu löschenden Tage) + eintragen und speichern. Der Wert muss eine Ganzzahl >= 1 (default: 20) sein, sonst werden falsche + Werte in die statzhist-Tabelle übertragen. Der Wert gilt dann sowohl für das manuelle, wie + auch das automatische Limit.
Dieser Schritt löscht noch keine Daten, sondern speichert nur den Wert + fü das Limit! +
statz-Tabelle manuell limitieren + + Es erfolgt keine Rückfrage! Die statz-Tabelle wird einmalig auf + Tage gekürzt. Alle Datensätze über diesen + Zeitraum hinaus werden unwiderruflich gelöscht. Dies gilt nicht für die historischen Daten. +
statz-Tabelle automatisch limitieren + + + + + + Das automatische Limitieren der statz-Tabelle ist +  deaktiviert  + +  aktiviert  + + +
Nächster Lauf am + gegen Uhr. + +
Es erfolgt keine automatische Limitierung + +
statz-Tabelle leeren + + Die Datensätze der statz-Tabelle werden unwiderruflich geleert, und der Speicherplatz in der Datenbank mittels + OPTIMIZE TABLE freigegeben. ACHTUNG: Es erfolgt keine Rückfrage! Die Aufzeichnung + läuft ohne Unterbrechung weiter. Die Daten der statzhist-Tabelle bleiben unberührt. +
+
+ + + +
\ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR-statz.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-statz.php new file mode 100644 index 0000000..9191b6f --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-statz.php @@ -0,0 +1,545 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +if(!current_user_can('manage_statz')) { + die('Zugriff verweigert'); +} + +include_once plugin_dir_path(__FILE__).'includes/pChart/class/pData.class.php'; +include_once plugin_dir_path(__FILE__).'includes/pChart/class/pDraw.class.php'; +include_once plugin_dir_path(__FILE__).'includes/pChart/class/pImage.class.php'; +### AKTUELL - Funktionen + + function sem_showWhoIsOnline() { + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $onlinetime = $sem_options["statz_online_time"]; + + $onlineusers = $wpdb->get_results("SELECT DISTINCT username, page, ip, time + FROM ".$wpdb->statz." WHERE time > Now() - INTERVAL ".$onlinetime." SECOND GROUP BY ip ORDER BY page DESC"); + + print "
".sem_showNumUsersOnline()." Besucher online - Heute: ".sem_showTodayStatz()."
"; + + if (empty($onlineusers)) { + print "... keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + foreach ($onlineusers as $key=>$onlineuser) { + $username = $onlineuser->username; + $page = $onlineuser->page; + if ($page == 0) { + $link = get_option('siteurl'); + $title = 'startseite'; //oder wie auch immer + } + else { + $link = get_permalink($page); + $title = get_post($page); // muss so sein, da get_post = ARRAY + $title = $title->post_title; // sonst könnte man gleich diese Zeile nehmen + } + + $ip = $onlineuser->ip; + if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip); + $time = mysql2date("H:i",$onlineuser->time); + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print ""; + print "
UsernamePost/PageTCP/IPZeit
".$username."".$title." + +   + +   + + $time
"; + print "
"; + } + + function sem_draw24HoursGoo() { + global $wpdb; + + $results = $wpdb->get_results("SELECT time as hours, COUNT(DISTINCT ip) as visitors + FROM ".$wpdb->statz." WHERE time >= NOW() - INTERVAL 23 HOUR GROUP BY HOUR(time) ORDER BY time ASC"); + + print "
Besucher: Die letzten 24 Stunden
"; + print "
"; + + if (empty($results)) { + print "... noch keine Einträge
"; + print "
"; + return; + } + + foreach ($results as $result) { + $visitors[] = $result->visitors; + $hours[] = mysql2date('H', $result->hours); + } + + $MyData = new pData(); + $MyData->addPoints($visitors,"Visitors"); + $MyData->setAxisName(0,"Visitors"); + $MyData->addPoints($hours,"Hours"); + $MyData->setAbscissa("Hours"); + + $myPicture = new pImage(780,150,$MyData); + $myPicture->Antialias = FALSE; + $myPicture->drawRectangle(0,0,779,149,array("R"=>0,"G"=>0,"B"=>0)); + $myPicture->setFontProperties(array("FontName"=>plugin_dir_path(__FILE__)."includes/pChart/fonts/Bedizen.ttf","FontSize"=>8)); + $myPicture->setGraphArea(30,20,760,130); + $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200); + $myPicture->drawScale($scaleSettings); + $myPicture->drawBarChart(); + @$myPicture->Render(WP_CONTENT_DIR."/cache/24HourGoo.png"); + + print "
"; + + if(is_readable(WP_CONTENT_DIR."/cache/24HourGoo.png")) { + print ''; + } else if(!is_dir(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Cannot find cache-folder!'); + } else if(!is_writable(WP_CONTENT_DIR."/cache")) { + print semr_i18n('No Chart: Missing rights for cache-folder!'); + } + print "
"; + print ""; + print "
"; +} + + function sem_showDailyStatz() { + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_days_limit"]; + $daylimit = $limit - 1; + + $thedays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, COUNT(DISTINCT referer) + AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY + GROUP BY date ORDER BY time DESC"); + + print "
".$limit."-Tage-Statistik
"; + if (empty($thedays)) { + print "... noch keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + foreach ($thedays as $key=>$theday) { + $date = $theday->date; + $date = strtotime(substr($theday->date,1,10)); + $today = time(); + $difference = ceil(($today - $date) / (60*60*24))-1; + if($difference == 0) { + $date = "Heute"; + } + elseif($difference == 1) { + $date = "Gestern"; + } + elseif($difference == 2) { + $date = "Vorgestern"; + } + else { + $date = mysql2date("d.m.Y",$theday->date); + } + $hits = $theday->hits; + $visitors = $theday->visitors; + $referers = $theday->referers; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print ""; + print ""; + print ""; + print ""; + print "
DatumBesucherHitsReferer
$date$visitors$hits$referers
mehr...
"; + print "
"; + } + + function sem_showReferers() { + global $wpdb, $homehost; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_referer_limit"]; + $mask = $sem_options["statz_mask_referer"]; + + $lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer + NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit); + + print "
Die letzten ".$limit." Referer
"; + if (empty($lastreferers)) { + print "... noch keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + foreach ($lastreferers as $key=>$lastreferer) { + $referer = $lastreferer->referer; + if(strlen($referer) >= 120) { + $printreferer = substr($referer, 0, 120)." ..."; + } + else { + $printreferer = $referer; + } + $time = mysql2date("d.m.Y - H:i",$lastreferer->time); + print ""; + print ""; + if($mask != true) { + print ""; + } + else { + $referer = htmlspecialchars($referer, ENT_QUOTES); + print ""; + } + print ""; + } + print ""; + print "
ZeitReferer
".$time."".$printreferer."".$printreferer."
"; + print "
"; + } + + function sem_showKeyword() { + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_keyword_limit"]; + + $results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC"); + + print "
Die letzten $limit Suchbegriffe
"; + if (empty($results)) { + print "... noch keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + $i=0; + foreach($results as $result) { + $referer = $result->referer; + $keyword = sem_getKeyword($referer); + $ip = $result->ip; + if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip); + $time = mysql2date('d.m.Y - H:i',$result->time); + if($keyword) { + print ""; + print ""; + print ""; + print ""; + + print ""; + $i++; + } + if($i == $limit) break; + } + print ""; + print "
ZeitSuchbegriffTCP/IP
".$time."".$keyword." + +   + +   + +
"; + print "
"; + } + + function sem_showTodayTopReads() { + global $wpdb; + $today = date("Y-m-d"); + $topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid, + COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE + ".$wpdb->statz.".page = ".$wpdb->posts.".ID AND time >= '$today' GROUP BY postid ORDER BY count DESC LIMIT 10"); + + print "
Die Top10 aller Posts & Pages heute
"; + if (empty($topreads)) { + print "... noch keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + foreach ($topreads as $key=>$topread) { + $posttitle = $topread->posttitle; + $postname = $topread->postname; + $postid = $topread->postid; + $count = $topread->count; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print ""; + print "
Post/PagePostnameHits
".$posttitle."".$postname."".$count."
"; + print "
"; + } + + function sem_showTopReads() { + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_topreads_limit"]; + + $topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid, + hits AS count FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, ".$limit); + + print "
Die Top".$limit." aller Posts & Pages
"; + if (empty($topreads)) { + print "... noch keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + foreach ($topreads as $key=>$topread) { + $posttitle = $topread->posttitle; + $postname = $topread->postname; + $postid = $topread->postid; + $count = $topread->count; + print ""; + print ""; + print ""; + print ""; + print ""; + } + print ""; + print "
Post/PagePostnameHits
".$posttitle."".$postname."".$count."
"; + print "
"; + } + + function sem_showWhoWasOnlineToday() { + global $wpdb; + $today = date("Y-m-d"); + $todaysonlineusers = $wpdb->get_results("SELECT DISTINCT username, COUNT(username) as num FROM ".$wpdb->statz." WHERE + time >= '$today' AND username != 'Gast' GROUP BY username ORDER BY num DESC"); + + print "
Bekannte Besucher heute
"; + if (empty($todaysonlineusers)) { + print "... noch keine Einträge"; + print "
"; + return; + } + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + foreach ($todaysonlineusers as $key=>$todayonlineuser) { + $username = $todayonlineuser->username; + $num = $todayonlineuser->num; + print ""; + print ""; + print ""; + } + print ""; + print "
Besucher (Hits)
".$username." (".$num.")
"; + print "
"; + } + + function sem_showTopCommented() { + global $wpdb; + $topcommentedposts = $wpdb->get_results("SELECT guid, id, post_title, COUNT(*) AS count FROM + ".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id + GROUP BY guid ORDER BY count DESC LIMIT 0, 10"); + + print "
Die Top10 aller kommentierter Posts
"; + if (empty($topcommentedposts)) { + print "... noch keine Einträge"; + print "
"; + return; + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + foreach ($topcommentedposts as $key => $topcommentedpost) { + $posttitle = $topcommentedpost->post_title; + $count = $topcommentedpost->count; + $postid = $topcommentedpost->guid; + print ""; + print ""; + print ""; + print ""; + } + + print ""; + print "
Post/PageKommentare
 ".$posttitle."".$count."
"; + print "
"; + } + + function sem_showCommenters() { + global $wpdb; + + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + $limit = $sem_options["statz_comment_limit"]; + + $topcommenters = $wpdb->get_results("SELECT comment_author AS commenter, COUNT(comment_ID) AS count, + comment_author_email AS email, comment_author_url AS homepage FROM " .$wpdb->comments . " WHERE + comment_approved = '1' GROUP BY comment_author ORDER BY count DESC LIMIT 0, ".$limit); + + print "
Die Top".$limit." aller Kommentierer
"; + if (empty($topcommenters)) { + print "... noch keine Einträge"; + print "
"; + return; + } + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + foreach ($topcommenters as $key=>$topcommenter) { + $commenter = $topcommenter->commenter; + $email = $topcommenter->email; + $homepage = $topcommenter->homepage; + if($homepage=="http://") $homepage=""; + $url=parse_url($homepage); + $homepage = $url['host']; + $count = $topcommenter->count; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + } + + print ""; + print "
UserEmailHomepageKommentare
".$commenter."".$email."".$homepage."".$count."
"; + print "
"; + } + +### AKTUELL Anzeige + + print "
"; + print "
"; + print "

"; + print "

SemmelstatzR › Aktuell

"; + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline(); + sem_draw24HoursGoo(); + if ($sem_options["statz_show_todayusers"]) sem_showWhoWasOnlineToday(); + if ($sem_options["statz_show_dailystatz"]) sem_showDailyStatz(); + if ($sem_options["statz_show_referers"]) sem_showReferers(); + if ($sem_options["statz_show_keywords"]) sem_showKeyword(); + if ($sem_options["statz_show_todayreads"]) sem_showTodayTopReads(); + if ($sem_options["statz_show_reads"]) sem_showTopReads(); + if ($sem_options["statz_show_topcommposts"]) sem_showTopCommented(); + if ($sem_options["statz_show_commenters"]) sem_showCommenters(); + sem_showCopyright(); + print "
"; + +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR-templates.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-templates.php new file mode 100644 index 0000000..5361a3a --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR-templates.php @@ -0,0 +1,255 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +if(!current_user_can('manage_statz')) { + die('Zugriff verweigert'); +} + +### TEMPLATES + + $totalposts = sem_showTotalPosts(); + $totalcomments = sem_showTotalComments(); + $totalusers = sem_showTotalUsers(); + $averageuserperday = sem_showAverageUserPerDay(); + $firstpostdate = sem_showFirstPostDate(); + $postdays = sem_showPostDays(); + $firstcommentdate = sem_showFirstCommentDate(); + $commentdays = sem_showCommentDays(); + $postsperday = sem_showPostsPerDay(); + $commentsperday = sem_showCommentsPerDay(); + $numcommenters = sem_showNumCommenters(); + $statzstartdate = sem_showStatzStartDate(); + $statzdays = sem_showStatzDays(); + $numusersonline = sem_showNumUsersOnline(); + + ### DIE ANZEIGE + + print "
"; + print "
"; + print "

"; + print "

SemmelstatzR › Template-Funktionen

"; + print "
"; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + + print ""; + print ""; + print ""; + + print ""; + print "
FunktionSyntaxRückgabewertHierBemerkung
sem_showTotalPostsGanzzahl$totalpostsAnzahl aller Beiträge
sem_showTotalCommentsGanzzahl$totalcommentsAnzahl aller Kommentare
sem_showTotalUsersGanzzahl$totalusersGesamtzahl aller Besucher seit Statistikaufzeichnung
sem_showAverageUserPerDayDezimal$averageuserperdayDurchschnittliche Anzahl der täglichen Besucher
sem_showFirstPostDateDatum (d.m.y)$firstpostdateDatum des 1. Posts
sem_showPostDaysGanzzahl$postdaysZeitraum in Tagen seit 1. Beitrag
em_showFirstCommentDateDatum (d.m.y)$firstcommentdateDatum des 1. Kommentars
sem_showCommentDaysGanzzahl$commentdaysZeitraum in Tagen seit 1. Kommentar
sem_showPostsPerDayDezimal$postsperdayDurchschnittliche Anzahl der Beiträge pro Tag
sem_showCommentsPerDayDezimal$commentsperdayDurchschnittliche Anzahl der Kommentare pro Tag
sem_showNumCommentersGanzzahl$numcommentersGesamtzahl aller Kommentierer
sem_showStatzStartDateDatum (d.m.y)$statzstartdateBeginn der Statistik
sem_showStatzDaysGanzzahl$statzdaysZeitraum der Statistik in Tagen
sem_showNumUsersOnlineGanzzahl$numusersonlineUser Online
sem_showLastCommentsFormatierte Listen/aDie neusten 'n' Kommentare mit Autor, Post, abwärts sortiert nach Datum
CSS-ID: #lastcomments
sem_showLastPostsFormatierte Listen/aDie neusten 'n' Posts mit Titel, abwärts sortiert nach Datum
CSS-ID: #lastposts
sem_showMostReadsFormatierte Listen/aDie 'n' meist gelesenen Post/Pages mit Hits in Klammern
CSS-ID: #mostreads
sem_showPostHitsInLoopGanzzahlNur im LoopZeigt die Anzahl der Hits eines Posts an. Funktioniert nur im LOOP.
"; + print "Sämtliche Funktionen (bis auf die letzte) sind außerhalb des LOOPS zu verwenden. Wird + SEMMELSTATZ deaktiviert, und die Verfügbarkeit der Templatefunktion ist nicht mittels + if (function_exists... sichergestellt, wird die Indexseite des Blogs fehlerhaft bzw. + überhaupt nicht dargestellt."; + print "
"; + print "
"; + print "
"; + + if (function_exists('sem_showCopyright')) sem_showCopyright(); + + print "
"; + + print "
"; + +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR.css b/tags/semmelstatzR_1_0_0_beta/semmelstatzR.css new file mode 100644 index 0000000..631875c --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR.css @@ -0,0 +1,132 @@ +/** + * file semmelstatzR.css + * + * @package SemmelstatzR + * @version $Rev$ + * @author Ortwin Pinke + * @author Andreas 'Redunzl' Mueller + * @copyright (c)2011 PHP-Backoffice + * @copyright (c)2005-2009 kopfhoch-studio + * @link http://www.php-backoffice.de/projects/semmelstatzR + * @link http://sourceforge.net/projects/semmelstatz/ + * @license http://www.gnu.org/licenses/gpl-2.0.html + * + * $Id$ +*/ + +p.statz, div.statz { + /* font-family: tahoma,verdana,arial,helvetica; */ + font-size: 17px; + font-weight: normal; + color: #344964; + text-align: left; + padding: 10px 0 5px 5px; + margin-top: 10px; +} + +hr { + color: #ddd; + background-color: #ddd; + height: 2px; + border: none; +} + +.statz a { + border: none; +} + +.statz a img { + border: none; + padding-top: 0px; +} + +table.statzelement { + width: 100%; +} + +.statzelement th, .statzelement td { + /* font-family: tahoma,verdana,arial,helvetica; */ + font-size: 11px; + color: #344964; + padding: 3px 0 3px 5px; +} + +.statzelement th { + font-weight: bold; + background: #eee; +} + +.statzelement td { + font-weight: normal; +} + +.statzelement td a { + text-decoration: none; +} + +.statzelement p { + /* font-family: tahoma,verdana,arial,helvetica; */ + font-size: 11px; +} + +.optionstable { + border:none; +} + +.optioncell { + border:1px solid #ccc; + padding:5px; + font-size:11px; + vertical-align:top; + width:20%; +} + +div.chart { + margin: 10px 0px 20px 30px; +} + +table.chartelement { + border: none; + border-collapse: collapse; +} + +.chartelement td { + vertical-align: bottom; + text-align: center; +} + +.chartelement td div { + border-top: 2px solid #dedede; + border-left: 2px solid #dedede; + border-right: 2px solid #999; + border-bottom: 2px solid #999; +} + +.chartelement th { + vertical-align: middle; + text-align: right; +} + +.copyright { + /* font-family: tahoma,verdana,arial,helvetica; */ + font-size: 11px; + text-align:center; + margin-top: 20px +} + +.alternate { + background: #eee; +} + +#icon-semmelstatzR { + background: transparent url(img/icon_observe.png); +} + +#icon-template { + background: transparent url(img/icon_template.png); +} + +input.regular-text { + font-size: 11px; + width: 28em; +} \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR.php new file mode 100644 index 0000000..0c9bef0 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR.php @@ -0,0 +1,333 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'semmelstatzR_startup.php'; + + +if(is_admin() == true) { + + /** + * add CSS + * + * @return void + */ + function semmelstatzR_css() { + print "\n"; + } + add_action('admin_head', 'semmelstatzR_css'); + ### End add CSS + + /** + * add toplevel menu into admin + * + * @todo localization + * + * @return void + */ + function semmelstatzR_menu() { + if (function_exists('add_menu_page')) { + add_menu_page('SemmelstatzR','SemmelstatzR', 'manage_statz', 'semmelstatzR/semmelstatzR-statz.php', '', plugins_url('semmelstatzR/img/statz_small.png')); + } + if (function_exists('add_submenu_page')) { + add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Current Statz'), semr_i18n('Current Statz'), 'manage_statz', 'semmelstatzR/semmelstatzR-statz.php'); + add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('History'), semr_i18n('History'), 'manage_statz', 'semmelstatzR/semmelstatzR-history.php'); + add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Log'), semr_i18n('Log'), 'manage_statz', 'semmelstatzR/semmelstatzR-log.php'); + add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Database'), semr_i18n('Database'), 'manage_statz', 'semmelstatzR/semmelstatzR-database.php'); + add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Templates'), semr_i18n('Templates'), 'manage_statz', 'semmelstatzR/semmelstatzR-templates.php'); + add_submenu_page('semmelstatzR/semmelstatzR-statz.php', semr_i18n('Options'), semr_i18n('Options'), 'manage_statz', 'semmelstatzR/semmelstatzR-options.php'); + } + } + add_action('admin_menu', 'semmelstatzR_menu'); + ### end add toplevel adminmenu + + + + /** + * write defaults to options-array + * + * @return void + */ + function sem_init_options() { + global $wpdb; + + if(get_option('statz_options')) { + $wpdb->query("DELETE FROM $wpdb->options WHERE option_name LIKE 'statz%';"); // Löschen der alten Optionen + } + + if(!get_option('semmelstatzR_options')) { + $sem_options = array( + "statz_comment_limit" => 10, + "statz_datarecs_limit" => 100, + "statz_days_limit" => 7, + "statz_do_cron" => false, + "statz_encode_ip" => false, + "statz_keyword_limit" =>10, + "statz_referer_limit" => 10, + "statz_mask_referer" => false, + "statz_on_dashboard" => false, + "statz_online_time" => 180, + "statz_recdays_limit" => 20, + "statz_show_commenters" => true, + "statz_show_dailystatz" => true, + "statz_show_keywords" => true, + "statz_show_reads" => true, + "statz_show_referers" => true, + "statz_show_todayreads" => true, + "statz_show_todayusers" => true, + "statz_show_topcommposts" => true, + "statz_show_useronline" => true, + "statz_topreads_limit" => 10, + "statz_write_admins" => false, + "statz_write_users" => false, + "statz_use_img" => true + ); + add_option( 'semmelstatzR_options', $sem_options ); + } + } + add_action('init', 'sem_init_options'); + ### End write defaults to options-array + +} + + +### Anlegen der Tabellen, Optionen schreiben +add_action('activate_semmelstatzR/semmelstatzR.php', 'sem_statzsetup'); +function sem_statzsetup() { + global $wpdb; + if(@is_file(ABSPATH.'/wp-admin/upgrade-functions.php')) { + include_once(ABSPATH.'/wp-admin/upgrade-functions.php'); + } elseif(@is_file(ABSPATH.'/wp-admin/includes/upgrade.php')) { + include_once(ABSPATH.'/wp-admin/includes/upgrade.php'); + } else { + die('Kann wp-admin/upgrade-functions.php und wp-admin/includes/upgrade.php nicht finden!'); + } + + $create_table = array(); + $create_table['statz'] = "CREATE TABLE $wpdb->statz ( + id int(11) unsigned NOT NULL auto_increment, + ip varchar(39) default NULL, + time datetime NOT NULL default '0000-00-00 00:00:00', + referer varchar(255) default NULL, + page int(11) unsigned NOT NULL default '0', + username varchar(255) default NULL, + PRIMARY KEY (`id`))"; + $create_table['statzhist'] = "CREATE TABLE $wpdb->statzhist ( + id int(10) unsigned NOT NULL auto_increment, + date datetime NOT NULL default '0000-00-00 00:00:00', + visitors int(10) unsigned NOT NULL default '0', + hits int(10) unsigned NOT NULL default '0', + referers int(10) unsigned NOT NULL default '0', + PRIMARY KEY (`id`))"; + + maybe_create_table($wpdb->statz, $create_table['statz']); + maybe_create_table($wpdb->statzhist, $create_table['statzhist']); + + $sql = $wpdb->query("SELECT host FROM $wpdb->statz"); + if($sql) { $wpdb->query("ALTER TABLE $wpdb->statz DROP host"); } + + $sql = $wpdb->query("SELECT keyword FROM $wpdb->statz"); + if($sql) { $wpdb->query("ALTER TABLE $wpdb->statz DROP keyword"); } + + maybe_add_column($wpdb->posts, 'hits', "ALTER TABLE $wpdb->posts ADD hits bigint(20) NOT NULL DEFAULT '0';"); // ab 3.2 + + $wpdb->query("ALTER TABLE $wpdb->statz CHANGE ip ip VARCHAR(39) NULL DEFAULT NULL;"); + + sem_init_options(); + sem_writeOldDaysToHist(); + + $role = get_role('administrator'); + if(!$role->has_cap('manage_statz')) { + $role->add_cap('manage_statz'); + } +} + +### Zugriff analysieren und in statz-Tabelle schreiben +add_action('wp_footer', 'sem_writeStatz'); +function sem_writeStatz() { + global $wpdb, $wp_query, $isBot, $isAdmin, $page; + $plugin_dir = basename(dirname(__FILE__)); + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + + // true === $sem_options['statz_use_img'] && + if(true == $sem_options['statz_use_img'] && !defined('SEMMELSTATZR_STATZIMG')) { + print ''; + return; ### nothing todo if stat image is used + } + + sem_writeYesterdayToHist(); + $useragent = $wpdb->escape($_SERVER['HTTP_USER_AGENT']); + $isBot = sem_AreYouBot($useragent); + $username = sem_getUsername(); + + if(($isBot == true) + || ($isAdmin == 0 && $sem_options['statz_write_users'] == false) + || ($isAdmin == 1 && $sem_options['statz_write_admins'] == false) + || is_404() + ) return; + + $userip = $wpdb->escape($_SERVER['REMOTE_ADDR']); + if($sem_options['statz_encode_ip'] == true) $userip = sem_encodeIP($userip); + +$referer = $wpdb->escape(urldecode($_SERVER['HTTP_REFERER'])); + $blogtime = gmdate('Y-m-d H:i:s', current_time('timestamp')); + + if (!empty($referer)) { + if(get_option('blog_charset') == 'iso-8859-1') $referer = utf8_decode($referer); +$referer = "'".$referer."'"; + } +else { +$referer = 'NULL'; +} + + $readingnow = wp_title('', false); + if(empty($readingnow)) { + $page = 0; + } else { + $page = $wp_query->post->ID; + } + +$wpdb->query("INSERT INTO $wpdb->statz (ip, time, referer, page, username) + VALUES('$userip', '$blogtime', $referer, $page, '$username')"); + + if($wpdb->query("SELECT COUNT(hits) FROM $wpdb->posts")) { + $wpdb->query("UPDATE $wpdb->posts SET hits = hits + 1 WHERE ID = $page"); // neu ab 3.2 + } +} + +### Zeitgesteuertes Limitieren der statz-Tabelle + // Wenn semmelKron JA UND statz_next_cron älter JETZT, dann... + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + if($sem_options['statz_do_cron'] == true && $sem_options['statz_next_cron'] < time()) { + add_action('shutdown', 'sem_doCronStatzLimit'); // ...limitiere statz-Tabelle auf vorgegebenen Wert + } + +### Rendert eine Mini-STATZ. Idee: René Tauchnitz +function sem_dashboardStatz_show() { + + $widgets = get_option( 'dashboard_widget_options' ); + echo '

'; + printf(_n("%d Visitor online", "%d Visitors online", sem_showNumUsersOnline(), "semmelstatzR"), sem_showNumUsersOnline()); + echo ' - '; + printf(__("Today: %s", "semmelstatzR"),sem_showTodayStatz()); + echo ' »»'; + echo '

'; +} + +function sem_dashboardStatz_control() { + if ( !$widget_options = get_option( 'dashboard_widget_options' ) ) + $widget_options = array(); + + if ( !isset($widget_options['dashboard_sem_dashboardStatz']) ) + $widget_options['dashboard_sem_dashboardStatz'] = array(); + + if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['dashboard-sem-dashboardStatz']) ) { + $number = absint( $_POST['dashboard-sem-dashboardStatz']['items'] ); + $number = ($number > 20)?20:$number; + $widget_options['dashboard_sem_dashboardStatz']['items'] = $number; + update_option( 'dashboard_widget_options', $widget_options ); + } + + $number = isset( $widget_options['dashboard_sem_dashboardStatz']['items'] ) ? (int) $widget_options['dashboard_sem_dashboardStatz']['items'] : ''; + + echo '

'; + echo '

'; + + //print_r($widget_options['dashboard_sem_dashboardStatz']); +} + +/** + * Callback generating a small dashboard widget + * + * @uses sem_showTodayStatz() to generate the content + * @uses wp_add_dashboard_widget() to generate widget + * + * @return void + */ +function sem_dashboardStatz_setup() { + $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen + if(!current_user_can('manage_statz')) return; + if($sem_options['statz_on_dashboard'] != true) return; + wp_add_dashboard_widget( 'sem_dashboardStatz', 'SemmelstatzR', 'sem_dashboardStatz_show', 'sem_dashboardStatz_control' ); +} + +add_action('wp_dashboard_setup', 'sem_dashboardStatz_setup'); + +/** + * generates and returns content for a small dashboard widget + * + * @global wpdb $wpdb + * @return string formated string/html for dashboard + */ + function sem_showTodayStatz() { + global $wpdb; + $thedays = $wpdb->get_results("SELECT COUNT(ip) AS hits, COUNT(DISTINCT ip) AS visitors, COUNT(DISTINCT referer) + AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() GROUP BY date"); + //$thedays = array(array('hits' => 33)); + if (empty($thedays)) { + return "".semr_i18n("... no entries").""; + } + foreach($thedays as $key=>$theday) { + $date = mysql2date("l",$theday->date); + $hits = $theday->hits; + $visitors = $theday->visitors; + $referers = $theday->referers; + } + return sprintf(semr_i18np("%d Visitor","%d Visitors",$visitors),$visitors)." - " + .sprintf(semr_i18np("%d Hit","%d Hits",$hits),$hits)." - " + .sprintf(semr_i18np("%d Referer","%d Referers",$referers),$referers); + } +?> diff --git a/tags/semmelstatzR_1_0_0_beta/semmelstatzR_startup.php b/tags/semmelstatzR_1_0_0_beta/semmelstatzR_startup.php new file mode 100644 index 0000000..d9eacd6 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semmelstatzR_startup.php @@ -0,0 +1,81 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ +### constants +define('SEMMELSTATZR_VERSION', '1.0.0 Beta'); +define('SEMMELSTATZR_SRVPATH', dirname(__FILE__)); +define('SEMMELSTATZR_HTML_RELPATH', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__))); + +### Deklaration der Tabellennamen +global $wpdb; +$wpdb->statz = $wpdb->prefix . 'statz'; +$wpdb->statzhist = $wpdb->prefix . 'statzhist'; + +### Auslesen des Domainnamens +global $homehost; +if(substr($_SERVER['SERVER_NAME'],0,4) == 'www.') { + $homehost = '%' . substr($_SERVER['SERVER_NAME'],4) . '%'; +} else { + $homehost = '%' . $_SERVER['SERVER_NAME'] . '%'; +} + +### localization +if(!load_plugin_textdomain('semmelstatzR')) { + $plugin_dir = basename(dirname(__FILE__)); + load_plugin_textdomain('semmelstatzR',null,$plugin_dir.'/locale/'); +} + +include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr.php'; +include_once SEMMELSTATZR_SRVPATH.'/includes/functions.semr_template.php'; +include_once SEMMELSTATZR_SRVPATH.'/includes/class.upgrademe.php'; +if(class_exists("Upgrademe")) { + function semmelstatzR_upgrademe() { + // will be changed to sf.net soon as website is ready + //return 'http://semmelstatz.sourceforge.net/semr_update.php'; + return 'http://www.php-backoffice.de/updates/semr_update.php'; + } +} +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/semr_image.php b/tags/semmelstatzR_1_0_0_beta/semr_image.php new file mode 100644 index 0000000..39aa268 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/semr_image.php @@ -0,0 +1,69 @@ +. + * + * $Id$ + * + */ +/** + * based upon semmelstatz + * Copyright (c) 2005-2009 Andreas 'Redunzl' Mueller (redunzl@gmx.de) + * + * @license http://www.gnu.org/licenses/gpl-2.0.html + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License (version 2) as + * published by the Free Software Foundation. + * + * 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, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ +/** + * security fix + */ +define('SEMMELSTATZR_STATZIMG', true); +/* +echo "
";
+print_r($_SERVER);
+echo "
"; +*/ +header('Cache-Control: no-cache'); +header("X-Robots-Tag: noindex, nofollow", true); + +require '../../../wp-load.php'; +sem_writeStatz(); + + +// Output transparent gif + +header('Content-type: image/gif'); +header('Content-length: 43'); + +echo base64_decode('R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); +?> \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/test/agents.php b/tags/semmelstatzR_1_0_0_beta/test/agents.php new file mode 100644 index 0000000..ac913cb --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/test/agents.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/tags/semmelstatzR_1_0_0_beta/test/semr_update.php b/tags/semmelstatzR_1_0_0_beta/test/semr_update.php new file mode 100644 index 0000000..50018b3 --- /dev/null +++ b/tags/semmelstatzR_1_0_0_beta/test/semr_update.php @@ -0,0 +1,26 @@ +{ +"new_version": "1.0.0 RC1", +"url": "http://sourceforge.net/projects/semmelstatz", +"package": "http://sourceforge.net/projects/semmelstatz/files", +"info": { +"name": "semmelstatzR", +"author": "SEM-Team", +"author_profile": "", +"requires": "2.8", +"tested": "3.2.1", +"rating": 0, +"num_ratings": 0, +"downloaded": 0, +"last_upated": "2011-07-15", +"added": "2011-07-15", +"homepage": "http://sourceforge.net/projects/semmelstatz", +"tags": {"wordpress":"wordpress","upgrade":"upgrade","update":"update","wp":"wp","repository":"repsitory","plugins":"plugins","hacks":"hacks","trucks":"trucks"}, +"sections":{ +"description": "The best Statz-Tool!", +"installation": "Take a look in the readme file.", +"screenshots":"", +"changelog":"", +"faq":"" +} +} +} \ No newline at end of file