Merge branch 'core4' into feature/core4-atys
commit
7cba0c8794
@ -1,15 +1,17 @@
|
||||
title Ryzom Core: 0_setup.py --noconf
|
||||
0_setup.py --noconf
|
||||
title Ryzom Core: 1_export.py
|
||||
1_export.py
|
||||
title Ryzom Core: 2_build.py
|
||||
2_build.py
|
||||
title Ryzom Core: 3_install.py
|
||||
3_install.py
|
||||
title Ryzom Core: a1_worldedit_data.py
|
||||
a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready
|
||||
title Ryzom Core: 0_setup.py --noconf
|
||||
python 0_setup.py --noconf
|
||||
title Ryzom Core: 1_export.py
|
||||
python 1_export.py
|
||||
title Ryzom Core: 2_build.py
|
||||
python 2_build.py
|
||||
title Ryzom Core: 3_install.py
|
||||
python 3_install.py
|
||||
title Ryzom Core: a1_worldedit_data.py
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: b3_shard_dev.py
|
||||
python b3_shard_dev.py
|
||||
title Ryzom Core: Ready
|
||||
|
@ -1,9 +1,11 @@
|
||||
title Ryzom Core: 3_install.py
|
||||
3_install.py
|
||||
title Ryzom Core: a1_worldedit_data.py
|
||||
a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready
|
||||
title Ryzom Core: 3_install.py
|
||||
python 3_install.py
|
||||
title Ryzom Core: a1_worldedit_data.py
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: b3_shard_dev.py
|
||||
python b3_shard_dev.py
|
||||
title Ryzom Core: Ready
|
||||
|
@ -1,11 +1,11 @@
|
||||
title Ryzom Core: 1_export.py (CHARACTERS)
|
||||
1_export.py -ipj common/characters common/characters_maps_hr
|
||||
title Ryzom Core: 2_build.py (CHARACTERS)
|
||||
2_build.py -ipj common/characters common/characters_maps_hr
|
||||
title Ryzom Core: 3_install.py (CHARACTERS)
|
||||
3_install.py -ipj common/characters common/characters_maps_hr
|
||||
title Ryzom Core: b1_client_dev.py (CHARACTERS)
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (CHARACTERS)
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready (CHARACTERS)
|
||||
title Ryzom Core: 1_export.py (CHARACTERS)
|
||||
python 1_export.py -ipj common/characters common/characters_maps_hr
|
||||
title Ryzom Core: 2_build.py (CHARACTERS)
|
||||
python 2_build.py -ipj common/characters common/characters_maps_hr
|
||||
title Ryzom Core: 3_install.py (CHARACTERS)
|
||||
python 3_install.py -ipj common/characters common/characters_maps_hr
|
||||
title Ryzom Core: b1_client_dev.py (CHARACTERS)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (CHARACTERS)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (CHARACTERS)
|
||||
|
@ -1,13 +1,15 @@
|
||||
title Ryzom Core: 0_setup.py (EXECUTABLES)
|
||||
0_setup.py --noconf -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: 1_export.py (EXECUTABLES)
|
||||
1_export.py -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: 2_build.py (EXECUTABLES)
|
||||
2_build.py -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: 3_install.py (EXECUTABLES)
|
||||
3_install.py -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready
|
||||
title Ryzom Core: 0_setup.py (EXECUTABLES)
|
||||
python 0_setup.py --noconf -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: 1_export.py (EXECUTABLES)
|
||||
python 1_export.py -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: 2_build.py (EXECUTABLES)
|
||||
python 2_build.py -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: 3_install.py (EXECUTABLES)
|
||||
python 3_install.py -ipj common/gamedev common/exedll common/cfg common/data_common
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: b3_shard_dev.py
|
||||
python b3_shard_dev.py
|
||||
title Ryzom Core: Ready
|
||||
|
@ -0,0 +1,11 @@
|
||||
title Ryzom Core: 1_export.py (FAUNA)
|
||||
python 1_export.py -ipj common/fauna
|
||||
title Ryzom Core: 2_build.py (FAUNA)
|
||||
python 2_build.py -ipj common/fauna
|
||||
title Ryzom Core: 3_install.py (FAUNA)
|
||||
python 3_install.py -ipj common/fauna
|
||||
title Ryzom Core: b1_client_dev.py (FAUNA)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (FAUNA)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (FAUNA)
|
@ -1,9 +1,9 @@
|
||||
title Ryzom Core: 1_export.py (INTERFACE)
|
||||
1_export.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||
title Ryzom Core: 2_build.py (INTERFACE)
|
||||
2_build.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||
title Ryzom Core: 3_install.py (INTERFACE)
|
||||
3_install.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: Ready
|
||||
title Ryzom Core: 1_export.py (INTERFACE)
|
||||
python 1_export.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||
title Ryzom Core: 2_build.py (INTERFACE)
|
||||
python 2_build.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||
title Ryzom Core: 3_install.py (INTERFACE)
|
||||
python 3_install.py -ipj common/gamedev common/data_common common/exedll common/cfg common/interface common/sfx common/fonts common/outgame
|
||||
title Ryzom Core: b1_client_dev.py
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: Ready
|
||||
|
@ -1,11 +1,13 @@
|
||||
title Ryzom Core: 1_export.py (LEVELDESIGN)
|
||||
1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 2_build.py (LEVELDESIGN)
|
||||
2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 3_install.py (LEVELDESIGN)
|
||||
3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: b1_client_dev.py (LEVELDESIGN)
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (LEVELDESIGN)
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready
|
||||
title Ryzom Core: 1_export.py (LEVELDESIGN)
|
||||
python 1_export.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 2_build.py (LEVELDESIGN)
|
||||
python 2_build.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 3_install.py (LEVELDESIGN)
|
||||
python 3_install.py -ipj common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: b1_client_dev.py (LEVELDESIGN)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (LEVELDESIGN)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: b3_shard_dev.py
|
||||
python b3_shard_dev.py
|
||||
title Ryzom Core: Ready
|
||||
|
@ -0,0 +1,11 @@
|
||||
title Ryzom Core: 1_export.py (OBJECTS)
|
||||
python 1_export.py -ipj common/objects
|
||||
title Ryzom Core: 2_build.py (OBJECTS)
|
||||
python 2_build.py -ipj common/objects
|
||||
title Ryzom Core: 3_install.py (OBJECTS)
|
||||
python 3_install.py -ipj common/objects
|
||||
title Ryzom Core: b1_client_dev.py (OBJECTS)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (OBJECTS)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (OBJECTS)
|
@ -1,11 +1,11 @@
|
||||
title Ryzom Core: 1_export.py (PANOPLY)
|
||||
1_export.py -ipj common/characters_maps_hr
|
||||
title Ryzom Core: 2_build.py (PANOPLY)
|
||||
2_build.py -ipj common/characters_maps_hr
|
||||
title Ryzom Core: 3_install.py (PANOPLY)
|
||||
3_install.py -ipj common/characters_maps_hr
|
||||
title Ryzom Core: b1_client_dev.py (PANOPLY)
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (PANOPLY)
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready (PANOPLY)
|
||||
title Ryzom Core: 1_export.py (PANOPLY)
|
||||
python 1_export.py -ipj common/characters_maps_hr
|
||||
title Ryzom Core: 2_build.py (PANOPLY)
|
||||
python 2_build.py -ipj common/characters_maps_hr
|
||||
title Ryzom Core: 3_install.py (PANOPLY)
|
||||
python 3_install.py -ipj common/characters_maps_hr
|
||||
title Ryzom Core: b1_client_dev.py (PANOPLY)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (PANOPLY)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (PANOPLY)
|
||||
|
@ -1,15 +1,15 @@
|
||||
title Ryzom Core: 0_setup.py (RING LANDSCAPE)
|
||||
0_setup.py --noconf -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
python 0_setup.py --noconf -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
title Ryzom Core: 1_export.py (RING LANDSCAPE)
|
||||
1_export.py -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
python 1_export.py -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
title Ryzom Core: 2_build.py (RING LANDSCAPE)
|
||||
2_build.py -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
python 2_build.py -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
title Ryzom Core: 3_install.py (RING LANDSCAPE)
|
||||
3_install.py -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
python 3_install.py -ipj continents/r2_desert continents/r2_forest continents/r2_jungle continents/r2_lakes continents/r2_roots
|
||||
title Ryzom Core: a1_worldedit_data.py (RING LANDSCAPE)
|
||||
a1_worldedit_data.py
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py (RING LANDSCAPE)
|
||||
b1_client_dev.py
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (RING LANDSCAPE)
|
||||
b2_shard_data.py
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (RING LANDSCAPE)
|
||||
|
@ -0,0 +1,15 @@
|
||||
title Ryzom Core: 0_setup.py (RING LANDSCAPE)
|
||||
python 0_setup.py --noconf -ipj continents/r2_forest
|
||||
title Ryzom Core: 1_export.py (RING LANDSCAPE)
|
||||
python 1_export.py -ipj continents/r2_forest
|
||||
title Ryzom Core: 2_build.py (RING LANDSCAPE)
|
||||
python 2_build.py -ipj continents/r2_forest
|
||||
title Ryzom Core: 3_install.py (RING LANDSCAPE)
|
||||
python 3_install.py -ipj continents/r2_forest
|
||||
title Ryzom Core: a1_worldedit_data.py (RING LANDSCAPE)
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py (RING LANDSCAPE)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (RING LANDSCAPE)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (RING LANDSCAPE)
|
@ -0,0 +1,15 @@
|
||||
title Ryzom Core: 0_setup.py (RING LANDSCAPE)
|
||||
python 0_setup.py --noconf -ipj continents/r2_jungle
|
||||
title Ryzom Core: 1_export.py (RING LANDSCAPE)
|
||||
python 1_export.py -ipj continents/r2_jungle
|
||||
title Ryzom Core: 2_build.py (RING LANDSCAPE)
|
||||
python 2_build.py -ipj continents/r2_jungle
|
||||
title Ryzom Core: 3_install.py (RING LANDSCAPE)
|
||||
python 3_install.py -ipj continents/r2_jungle
|
||||
title Ryzom Core: a1_worldedit_data.py (RING LANDSCAPE)
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py (RING LANDSCAPE)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (RING LANDSCAPE)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (RING LANDSCAPE)
|
@ -0,0 +1,15 @@
|
||||
title Ryzom Core: 0_setup.py (RING LANDSCAPE)
|
||||
python 0_setup.py --noconf -ipj continents/r2_lakes
|
||||
title Ryzom Core: 1_export.py (RING LANDSCAPE)
|
||||
python 1_export.py -ipj continents/r2_lakes
|
||||
title Ryzom Core: 2_build.py (RING LANDSCAPE)
|
||||
python 2_build.py -ipj continents/r2_lakes
|
||||
title Ryzom Core: 3_install.py (RING LANDSCAPE)
|
||||
python 3_install.py -ipj continents/r2_lakes
|
||||
title Ryzom Core: a1_worldedit_data.py (RING LANDSCAPE)
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py (RING LANDSCAPE)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (RING LANDSCAPE)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (RING LANDSCAPE)
|
@ -0,0 +1,15 @@
|
||||
title Ryzom Core: 0_setup.py (RING LANDSCAPE)
|
||||
python 0_setup.py --noconf -ipj continents/r2_roots
|
||||
title Ryzom Core: 1_export.py (RING LANDSCAPE)
|
||||
python 1_export.py -ipj continents/r2_roots
|
||||
title Ryzom Core: 2_build.py (RING LANDSCAPE)
|
||||
python 2_build.py -ipj continents/r2_roots
|
||||
title Ryzom Core: 3_install.py (RING LANDSCAPE)
|
||||
python 3_install.py -ipj continents/r2_roots
|
||||
title Ryzom Core: a1_worldedit_data.py (RING LANDSCAPE)
|
||||
python a1_worldedit_data.py
|
||||
title Ryzom Core: b1_client_dev.py (RING LANDSCAPE)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (RING LANDSCAPE)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready (RING LANDSCAPE)
|
@ -1,11 +1,11 @@
|
||||
title Ryzom Core: 1_export.py (LEVELDESIGN)
|
||||
1_export.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 2_build.py (LEVELDESIGN)
|
||||
2_build.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 3_install.py (LEVELDESIGN)
|
||||
3_install.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: b1_client_dev.py (LEVELDESIGN)
|
||||
b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (LEVELDESIGN)
|
||||
b2_shard_data.py
|
||||
title Ryzom Core: Ready
|
||||
title Ryzom Core: 1_export.py (LEVELDESIGN)
|
||||
python 1_export.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 2_build.py (LEVELDESIGN)
|
||||
python 2_build.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: 3_install.py (LEVELDESIGN)
|
||||
python 3_install.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share
|
||||
title Ryzom Core: b1_client_dev.py (LEVELDESIGN)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: b2_shard_data.py (LEVELDESIGN)
|
||||
python b2_shard_data.py
|
||||
title Ryzom Core: Ready
|
||||
|
@ -0,0 +1,9 @@
|
||||
title Ryzom Core: 1_export.py (SOUND)
|
||||
python 1_export.py -ipj common/sound
|
||||
title Ryzom Core: 2_build.py (SOUND)
|
||||
python 2_build.py -ipj common/sound
|
||||
title Ryzom Core: 3_install.py (SOUND)
|
||||
python 3_install.py -ipj common/sound
|
||||
title Ryzom Core: b1_client_dev.py (SOUND)
|
||||
python b1_client_dev.py
|
||||
title Ryzom Core: Ready (SOUND)
|
@ -0,0 +1,24 @@
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
distribute this software, either in source code form or as a compiled
|
||||
binary, for any purpose, commercial or non-commercial, and by any
|
||||
means.
|
||||
|
||||
In jurisdictions that recognize copyright laws, the author or authors
|
||||
of this software dedicate any and all copyright interest in the
|
||||
software to the public domain. We make this dedication for the benefit
|
||||
of the public at large and to the detriment of our heirs and
|
||||
successors. We intend this dedication to be an overt act of
|
||||
relinquishment in perpetuity of all present and future rights to this
|
||||
software under copyright law.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
For more information, please refer to <https://unlicense.org>
|
@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
cd mariadb
|
||||
title MariaDB
|
||||
echo MariaDB on localhost:9040
|
||||
echo Launch `cmd_tools.bat` and run `mysql --port=9040` to connect
|
||||
@echo on
|
||||
if not exist ..\..\pipeline\shard_dev\mysql\my.ini goto :setup
|
||||
goto :done
|
||||
:setup
|
||||
.\bin\mysql_install_db --default-user --datadir=..\..\pipeline\shard_dev\mysql
|
||||
if %errorlevel% neq 0 pause
|
||||
if not exist ..\phpmyadmin.sql goto :done
|
||||
start .\bin\mysqld --no-defaults --port=9040 --datadir=..\..\pipeline\shard_dev\mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --standalone
|
||||
if %errorlevel% neq 0 pause
|
||||
.\bin\mysql -P 9040 -u root < ..\phpmyadmin.sql
|
||||
if %errorlevel% neq 0 pause
|
||||
.\bin\mysqladmin -u root -P 9040 shutdown
|
||||
if %errorlevel% neq 0 pause
|
||||
:done
|
||||
rem .\bin\mysqld --no-defaults --port=9040 --datadir=..\..\pipeline\shard_dev\mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --console --standalone
|
||||
cd ..
|
@ -0,0 +1,48 @@
|
||||
@echo off
|
||||
title NGINX
|
||||
echo NGINX on http://localhost:9042/
|
||||
if /I "%RC_ROOT%"=="" call ..\path_config.bat
|
||||
copy config.inc.php .\phpmyadmin\config.inc.php
|
||||
cd nginx
|
||||
for /f "usebackq delims=" %%i in (
|
||||
`powershell -noprofile -c "\"%RC_ROOT%\" -replace '\\', '/'"`
|
||||
) do set "RC_ROOT_FW=%%i"
|
||||
(
|
||||
echo worker_processes 1;
|
||||
echo events {
|
||||
echo worker_connections 1024;
|
||||
echo }
|
||||
echo http {
|
||||
echo include mime.types;
|
||||
echo default_type application/octet-stream;
|
||||
echo sendfile on;
|
||||
echo keepalive_timeout 65;
|
||||
echo server {
|
||||
echo listen 9042;
|
||||
echo server_name localhost;
|
||||
echo root %RC_ROOT_FW%/code/web/public_php;
|
||||
echo index index.php index.html index.htm;
|
||||
echo location ~ /\.ht {
|
||||
echo deny all;
|
||||
echo }
|
||||
echo location /phpmyadmin {
|
||||
echo root %RC_ROOT_FW%/external;
|
||||
echo location ~ ^^/phpmyadmin/^(.+\.php^)$ {
|
||||
echo fastcgi_pass 127.0.0.1:9041;
|
||||
echo fastcgi_index index.php;
|
||||
echo fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
echo include fastcgi_params;
|
||||
echo }
|
||||
echo }
|
||||
echo location ~ \.php$ {
|
||||
echo fastcgi_pass 127.0.0.1:9041;
|
||||
echo fastcgi_index index.php;
|
||||
echo fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
echo include fastcgi_params;
|
||||
echo }
|
||||
echo }
|
||||
echo }
|
||||
)> .\conf\nginx.conf
|
||||
@echo on
|
||||
rem nginx
|
||||
cd ..
|
@ -0,0 +1,468 @@
|
||||
-- phpMyAdmin SQL Dump
|
||||
-- version 5.1.0
|
||||
-- https://www.phpmyadmin.net/
|
||||
--
|
||||
-- Host: localhost:9040
|
||||
-- Generation Time: Jun 21, 2021 at 03:09 AM
|
||||
-- Server version: 10.5.10-MariaDB
|
||||
-- PHP Version: 7.4.20
|
||||
|
||||
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
START TRANSACTION;
|
||||
SET time_zone = "+00:00";
|
||||
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
|
||||
--
|
||||
-- Database: `phpmyadmin`
|
||||
--
|
||||
CREATE DATABASE `phpmyadmin`;
|
||||
USE `phpmyadmin`
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__bookmark`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__bookmark` (
|
||||
`id` int(10) UNSIGNED NOT NULL,
|
||||
`dbase` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`user` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`label` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
`query` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Bookmarks';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__central_columns`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__central_columns` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`col_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`col_type` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`col_length` text COLLATE utf8_bin DEFAULT NULL,
|
||||
`col_collation` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`col_isNull` tinyint(1) NOT NULL,
|
||||
`col_extra` varchar(255) COLLATE utf8_bin DEFAULT '',
|
||||
`col_default` text COLLATE utf8_bin DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Central list of columns';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__column_info`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__column_info` (
|
||||
`id` int(5) UNSIGNED NOT NULL,
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`column_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`comment` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
`mimetype` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
`transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`input_transformation` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`input_transformation_options` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column information for phpMyAdmin';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__designer_settings`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__designer_settings` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`settings_data` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Settings related to Designer';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__export_templates`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__export_templates` (
|
||||
`id` int(5) UNSIGNED NOT NULL,
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`export_type` varchar(10) COLLATE utf8_bin NOT NULL,
|
||||
`template_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`template_data` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Saved export templates';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__favorite`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__favorite` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`tables` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Favorite tables';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__history`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__history` (
|
||||
`id` bigint(20) UNSIGNED NOT NULL,
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`timevalue` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`sqlquery` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='SQL history for phpMyAdmin';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__navigationhiding`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__navigationhiding` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`item_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`item_type` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Hidden items of navigation tree';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__pdf_pages`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__pdf_pages` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`page_nr` int(10) UNSIGNED NOT NULL,
|
||||
`page_descr` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='PDF relation pages for phpMyAdmin';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__recent`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__recent` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`tables` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Recently accessed tables';
|
||||
|
||||
--
|
||||
-- Dumping data for table `pma__recent`
|
||||
--
|
||||
|
||||
INSERT INTO `pma__recent` (`username`, `tables`) VALUES
|
||||
('root', '[{\"db\":\"phpmyadmin\",\"table\":\"pma__export_templates\"},{\"db\":\"phpmyadmin\",\"table\":\"pma__central_columns\"},{\"db\":\"phpmyadmin\",\"table\":\"pma__bookmark\"}]');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__relation`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__relation` (
|
||||
`master_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`master_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`master_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`foreign_db` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`foreign_table` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`foreign_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Relation table';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__savedsearches`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__savedsearches` (
|
||||
`id` int(5) UNSIGNED NOT NULL,
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`search_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`search_data` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Saved searches';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__table_coords`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__table_coords` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`pdf_page_number` int(11) NOT NULL DEFAULT 0,
|
||||
`x` float UNSIGNED NOT NULL DEFAULT 0,
|
||||
`y` float UNSIGNED NOT NULL DEFAULT 0
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table coordinates for phpMyAdmin PDF output';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__table_info`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__table_info` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`display_field` varchar(64) COLLATE utf8_bin NOT NULL DEFAULT ''
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table information for phpMyAdmin';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__table_uiprefs`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__table_uiprefs` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`prefs` text COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Tables'' UI preferences';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__tracking`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__tracking` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`version` int(10) UNSIGNED NOT NULL,
|
||||
`date_created` datetime NOT NULL,
|
||||
`date_updated` datetime NOT NULL,
|
||||
`schema_snapshot` text COLLATE utf8_bin NOT NULL,
|
||||
`schema_sql` text COLLATE utf8_bin DEFAULT NULL,
|
||||
`data_sql` longtext COLLATE utf8_bin DEFAULT NULL,
|
||||
`tracking` set('UPDATE','REPLACE','INSERT','DELETE','TRUNCATE','CREATE DATABASE','ALTER DATABASE','DROP DATABASE','CREATE TABLE','ALTER TABLE','RENAME TABLE','DROP TABLE','CREATE INDEX','DROP INDEX','CREATE VIEW','ALTER VIEW','DROP VIEW') COLLATE utf8_bin DEFAULT NULL,
|
||||
`tracking_active` int(1) UNSIGNED NOT NULL DEFAULT 1
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database changes tracking for phpMyAdmin';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__userconfig`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__userconfig` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`timevalue` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`config_data` text COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User preferences storage for phpMyAdmin';
|
||||
|
||||
--
|
||||
-- Dumping data for table `pma__userconfig`
|
||||
--
|
||||
|
||||
INSERT INTO `pma__userconfig` (`username`, `timevalue`, `config_data`) VALUES
|
||||
('root', '2021-06-21 03:08:02', '{\"Console\\/Mode\":\"collapse\",\"ShowDatabasesNavigationAsTree\":false,\"Server\\/hide_db\":\"\",\"Server\\/only_db\":\"\"}');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__usergroups`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__usergroups` (
|
||||
`usergroup` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`tab` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`allowed` enum('Y','N') COLLATE utf8_bin NOT NULL DEFAULT 'N'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User groups with configured menu items';
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `pma__users`
|
||||
--
|
||||
|
||||
CREATE TABLE `pma__users` (
|
||||
`username` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`usergroup` varchar(64) COLLATE utf8_bin NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and their assignments to user groups';
|
||||
|
||||
--
|
||||
-- Indexes for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__bookmark`
|
||||
--
|
||||
ALTER TABLE `pma__bookmark`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__central_columns`
|
||||
--
|
||||
ALTER TABLE `pma__central_columns`
|
||||
ADD PRIMARY KEY (`db_name`,`col_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__column_info`
|
||||
--
|
||||
ALTER TABLE `pma__column_info`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__designer_settings`
|
||||
--
|
||||
ALTER TABLE `pma__designer_settings`
|
||||
ADD PRIMARY KEY (`username`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__export_templates`
|
||||
--
|
||||
ALTER TABLE `pma__export_templates`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `u_user_type_template` (`username`,`export_type`,`template_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__favorite`
|
||||
--
|
||||
ALTER TABLE `pma__favorite`
|
||||
ADD PRIMARY KEY (`username`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__history`
|
||||
--
|
||||
ALTER TABLE `pma__history`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `username` (`username`,`db`,`table`,`timevalue`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__navigationhiding`
|
||||
--
|
||||
ALTER TABLE `pma__navigationhiding`
|
||||
ADD PRIMARY KEY (`username`,`item_name`,`item_type`,`db_name`,`table_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__pdf_pages`
|
||||
--
|
||||
ALTER TABLE `pma__pdf_pages`
|
||||
ADD PRIMARY KEY (`page_nr`),
|
||||
ADD KEY `db_name` (`db_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__recent`
|
||||
--
|
||||
ALTER TABLE `pma__recent`
|
||||
ADD PRIMARY KEY (`username`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__relation`
|
||||
--
|
||||
ALTER TABLE `pma__relation`
|
||||
ADD PRIMARY KEY (`master_db`,`master_table`,`master_field`),
|
||||
ADD KEY `foreign_field` (`foreign_db`,`foreign_table`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__savedsearches`
|
||||
--
|
||||
ALTER TABLE `pma__savedsearches`
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD UNIQUE KEY `u_savedsearches_username_dbname` (`username`,`db_name`,`search_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__table_coords`
|
||||
--
|
||||
ALTER TABLE `pma__table_coords`
|
||||
ADD PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__table_info`
|
||||
--
|
||||
ALTER TABLE `pma__table_info`
|
||||
ADD PRIMARY KEY (`db_name`,`table_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__table_uiprefs`
|
||||
--
|
||||
ALTER TABLE `pma__table_uiprefs`
|
||||
ADD PRIMARY KEY (`username`,`db_name`,`table_name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__tracking`
|
||||
--
|
||||
ALTER TABLE `pma__tracking`
|
||||
ADD PRIMARY KEY (`db_name`,`table_name`,`version`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__userconfig`
|
||||
--
|
||||
ALTER TABLE `pma__userconfig`
|
||||
ADD PRIMARY KEY (`username`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__usergroups`
|
||||
--
|
||||
ALTER TABLE `pma__usergroups`
|
||||
ADD PRIMARY KEY (`usergroup`,`tab`,`allowed`);
|
||||
|
||||
--
|
||||
-- Indexes for table `pma__users`
|
||||
--
|
||||
ALTER TABLE `pma__users`
|
||||
ADD PRIMARY KEY (`username`,`usergroup`);
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for dumped tables
|
||||
--
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `pma__bookmark`
|
||||
--
|
||||
ALTER TABLE `pma__bookmark`
|
||||
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `pma__column_info`
|
||||
--
|
||||
ALTER TABLE `pma__column_info`
|
||||
MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `pma__export_templates`
|
||||
--
|
||||
ALTER TABLE `pma__export_templates`
|
||||
MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `pma__history`
|
||||
--
|
||||
ALTER TABLE `pma__history`
|
||||
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `pma__pdf_pages`
|
||||
--
|
||||
ALTER TABLE `pma__pdf_pages`
|
||||
MODIFY `page_nr` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `pma__savedsearches`
|
||||
--
|
||||
ALTER TABLE `pma__savedsearches`
|
||||
MODIFY `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||||
COMMIT;
|
||||
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
@ -1,7 +0,0 @@
|
||||
call ..\path_config.bat
|
||||
set PATH=%RC_PYTHON2%;%PATH%
|
||||
python web_config.py
|
||||
cd mariadb
|
||||
.\bin\mysql -P 9040 -u root < ..\web_config_local.sql
|
||||
cd ..
|
||||
pause
|
@ -1,6 +0,0 @@
|
||||
import socket
|
||||
hostname = socket.gethostname()
|
||||
with open("web_config.sql", "r") as fr:
|
||||
with open("web_config_local.sql", "w") as fw:
|
||||
for l in fr:
|
||||
fw.write(l.replace("%RC_HOSTNAME%", hostname))
|
@ -0,0 +1,38 @@
|
||||
[]
|
||||
Title=Web
|
||||
|
||||
[access_log]
|
||||
Terminal=1
|
||||
Title=Access Log
|
||||
LaunchCmd=powershell
|
||||
LaunchArgs=Get-Content -Path ".\nginx\logs\access.log" -Wait
|
||||
|
||||
[error_log]
|
||||
Terminal=1
|
||||
Title=Error Log
|
||||
LaunchCmd=powershell
|
||||
LaunchArgs=Get-Content -Path ".\nginx\logs\error.log" -Wait
|
||||
|
||||
[mariadb]
|
||||
Terminal=1
|
||||
Title=MariaDB
|
||||
WorkingDirectory=.\mariadb
|
||||
LaunchCmd=.\bin\mysqld
|
||||
LaunchArgs=--no-defaults --port=9040 --datadir=..\..\pipeline\shard_dev\mysql --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci --console --standalone
|
||||
ShutdownCmd=.\bin\mysqladmin
|
||||
ShutdownArgs=-u root -P 9040 shutdown
|
||||
|
||||
[php]
|
||||
Terminal=1
|
||||
Title=PHP-CGI
|
||||
WorkingDirectory=.\php
|
||||
LaunchCmd=.\php-cgi
|
||||
LaunchArgs=-b 127.0.0.1:9041
|
||||
|
||||
[nginx]
|
||||
Terminal=1
|
||||
Title=Nginx
|
||||
WorkingDirectory=.\nginx
|
||||
LaunchCmd=.\nginx
|
||||
ShutdownCmd=.\nginx
|
||||
ShutdownArgs=-s stop
|
@ -1,15 +1,15 @@
|
||||
-- Add the domain to the NeL database
|
||||
USE `nel`;
|
||||
INSERT INTO `domain` (`domain_id`, `domain_name`, `status`, `patch_version`, `backup_patch_url`, `patch_urls`, `login_address`, `session_manager_address`, `ring_db_name`, `web_host`, `web_host_php`, `description`)
|
||||
VALUES ('90', 'dev', 'ds_open', '1', NULL, NULL, 'athena:49998', 'athena:49999', 'ring_dev', 'http://athena:9042', 'http://athena:9042', 'Development Domain');
|
||||
VALUES ('90', 'dev', 'ds_open', '1', NULL, NULL, '%RC_HOSTNAME%:46993', '%RC_HOSTNAME%:46994', 'ring_dev', 'http://%RC_HOSTNAME%:9042', 'http://%RC_HOSTNAME%:9042', 'Development Domain');
|
||||
|
||||
-- Add the domain to the NeL Admin Tool database
|
||||
USE `nel_tool`;
|
||||
INSERT INTO `neltool_domains` (`domain_id`, `domain_name`, `domain_as_host`, `domain_as_port`, `domain_rrd_path`, `domain_las_admin_path`, `domain_las_local_path`, `domain_application`, `domain_sql_string`, `domain_hd_check`, `domain_mfs_web`, `domain_cs_sql_string`) VALUES ('90', 'dev', 'athena', '47690', 'Y:\\ryzomclassic\\pipeline\\shard_dev\\rrd_graphs', '', '', 'dev', 'mysql://root@athena:9040/ring_dev', '0', NULL, NULL);
|
||||
INSERT INTO `neltool_domains` (`domain_id`, `domain_name`, `domain_as_host`, `domain_as_port`, `domain_rrd_path`, `domain_las_admin_path`, `domain_las_local_path`, `domain_application`, `domain_sql_string`, `domain_hd_check`, `domain_mfs_web`, `domain_cs_sql_string`) VALUES ('90', 'dev', '%RC_HOSTNAME%', '46999', '%RC_SHARD_DEV%/rrd_graphs', '', '', 'dev', 'mysql://root@%RC_HOSTNAME%:9040/ring_dev', '0', NULL, NULL);
|
||||
|
||||
-- Add the mainland shard to the NeL database
|
||||
use `nel`;
|
||||
INSERT INTO `shard` (`ShardId`, `domain_id`, `WsAddr`, `Name`, `State`, `MOTD`) VALUES ('901', '90', 'athena', 'mainland', 'ds_open', '');
|
||||
INSERT INTO `shard` (`ShardId`, `domain_id`, `WsAddr`, `Name`, `State`, `MOTD`) VALUES ('901', '90', '%RC_HOSTNAME%', 'mainland', 'ds_open', '');
|
||||
|
||||
-- Add the mainland and ring shards to the Ring database
|
||||
use `ring_dev`;
|
@ -0,0 +1,63 @@
|
||||
README FOR JPGRAPH 4.3.4
|
||||
=========================
|
||||
|
||||
This package contains the JpGraph PHP library version 4.3.4
|
||||
|
||||
The library is Copyright (C) 2000-2010 Asial Corporatoin and
|
||||
released under dual license QPL 1.0 for open source and educational
|
||||
use and JpGraph Professional License for commercial use.
|
||||
|
||||
Please see full license details at
|
||||
http://jpgraph.net/pro/
|
||||
http://jpgraph.net/download/
|
||||
|
||||
|
||||
Requirements:
|
||||
-------------
|
||||
Miminum:
|
||||
* PHP 5.1.0 or higher
|
||||
* GD 2.0.28 or higher
|
||||
Note: Earlier versions might work but is unsupported.
|
||||
|
||||
Recommended:
|
||||
* >= PHP 5.2.0
|
||||
* PHP Builtin GD library
|
||||
|
||||
Installation
|
||||
------------
|
||||
1. Make sure that the PHP version is compatible with the stated
|
||||
requirements and that the PHP installation has support for
|
||||
the GD library. Please run phpinfo() to check if GD library
|
||||
is supported in the installation.
|
||||
If the GD library doesn't seem to be installed
|
||||
please consult the PHP manual under section "Image" for
|
||||
instructions on where to find this library. Please refer to
|
||||
the manual section "Verifying your PHP installation"
|
||||
|
||||
2. Unzip and copy the files to a directory of your choice where Your
|
||||
httpd sever can access them.
|
||||
For a global site installation you should copy the files to
|
||||
somewhere in the PHP search path.
|
||||
|
||||
3. Check that the default directory paths in jpg-config.inc.php
|
||||
for cache directory and TTF directory suits your installation.
|
||||
Note1: The default directories are different depending on if
|
||||
the library is running on Windows or UNIX.
|
||||
Note2: Apache/PHP must have write permission to your cache
|
||||
directory if you enable the cache feature. By default the cache
|
||||
is disabled.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
The installation includes HTML documentation and reference guide for the
|
||||
library. The portal page for all documentation is
|
||||
<YOUR-INSTALLATION-DIRECTORY>/docs/index.html
|
||||
|
||||
|
||||
Bug reports and suggestions
|
||||
---------------------------
|
||||
Should be reported using the contact form at
|
||||
|
||||
http://jpgraph.net/contact/
|
||||
|
@ -0,0 +1,75 @@
|
||||
<?php
|
||||
require_once "jpgraph/jpgraph.php";
|
||||
require_once "jpgraph/jpgraph_canvas.php";
|
||||
require_once "jpgraph/jpgraph_barcode.php";
|
||||
|
||||
$params = array(
|
||||
array('code',1),array('data',''),array('modwidth',1),array('info',false),
|
||||
array('notext',false),array('checksum',false),array('showframe',false),
|
||||
array('vertical',false) , array('backend','IMAGE'), array('file',''),
|
||||
array('scale',1), array('height',70), array('pswidth','') );
|
||||
|
||||
$n=count($params);
|
||||
for($i=0; $i < $n; ++$i ) {
|
||||
$v = $params[$i][0];
|
||||
if( empty($_GET[$params[$i][0]]) ) {
|
||||
$$v = $params[$i][1];
|
||||
}
|
||||
else
|
||||
$$v = $_GET[$params[$i][0]];
|
||||
}
|
||||
|
||||
if( $modwidth < 1 || $modwidth > 5 ) {
|
||||
echo "<h4>Module width must be between 1 and 5 pixels</h4>";
|
||||
}
|
||||
elseif( $data==="" ) {
|
||||
echo "<h3>Please enter data to be encoded, select symbology and press 'Ok'.</h3>";
|
||||
echo "<i>Note: Data must be valid for the choosen encoding.</i>";
|
||||
}
|
||||
elseif( $code==-1 ) {
|
||||
echo "<h4>No code symbology selected.</h4>";
|
||||
}
|
||||
elseif( $height < 10 || $height > 500 ) {
|
||||
echo "<h4> Height must be in range [10, 500]</h4>";
|
||||
}
|
||||
elseif( $scale < 0.1 || $scale > 15 ) {
|
||||
echo "<h4> Scale must be in range [0.1, 15]</h4>";
|
||||
}
|
||||
else {
|
||||
if( $code==20 ) {
|
||||
$encoder = BarcodeFactory::Create(6);
|
||||
$encoder->UseExtended();
|
||||
}
|
||||
else {
|
||||
$encoder = BarcodeFactory::Create($code);
|
||||
}
|
||||
$b = $backend=='EPS' ? 'PS' : $backend;
|
||||
$b = substr($backend,0,5) == 'IMAGE' ? 'IMAGE' : $b;
|
||||
$e = BackendFactory::Create($b,$encoder);
|
||||
if( substr($backend,0,5) == 'IMAGE' ) {
|
||||
if( substr($backend,5,1) == 'J' )
|
||||
$e->SetImgFormat('JPEG');
|
||||
}
|
||||
if( $e ) {
|
||||
if( $backend == 'EPS' )
|
||||
$e->SetEPS();
|
||||
if( $pswidth!='' )
|
||||
$modwidth = $pswidth;
|
||||
$e->SetModuleWidth($modwidth);
|
||||
$e->AddChecksum($checksum);
|
||||
$e->NoText($notext);
|
||||
$e->SetScale($scale);
|
||||
$e->SetVertical($vertical);
|
||||
$e->ShowFrame($showframe);
|
||||
$e->SetHeight($height);
|
||||
$r = $e->Stroke($data,$file,$info,$info);
|
||||
if( $r )
|
||||
echo nl2br(htmlspecialchars($r));
|
||||
if( $file != '' )
|
||||
echo "<p>Wrote file $file.";
|
||||
}
|
||||
else
|
||||
echo "<h3>Can't create choosen backend: $backend.</h3>";
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,125 @@
|
||||
<H2>JpGraph Barcode 1.0</h2>
|
||||
<hr>
|
||||
</font>
|
||||
<form name="barcodespec" action="barcode_image.php" target=barcode
|
||||
method post>
|
||||
<table cellspacing=4 cellpadding=0>
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
Data:<br>
|
||||
<input type=text name=data size=25 maxlength=30>
|
||||
</td>
|
||||
<tr><td>
|
||||
Encoding:<br>
|
||||
<select name=code>
|
||||
<option selected value=-1> Choose encoding </option>
|
||||
<option value=4> UPC A </option>
|
||||
<option value=5> UPC E </option>
|
||||
<option value=3> EAN 8 </option>
|
||||
<option value=2> EAN 13 </option>
|
||||
<option value=1> EAN 128 </option>
|
||||
<option value=11> Industrial 2 of 5 </option>
|
||||
<option value=12> Interleaved 2 of 5 </option>
|
||||
<option value=14> CODE 11 </option>
|
||||
<option value=6> CODE 39 </option>
|
||||
<option value=20> CODE 39 Extended </option>
|
||||
<option value=8> CODE 128 </option>
|
||||
<option value=13> CODABAR </option>
|
||||
<option value=10> BOOKLAND (ISBN) </option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
Module width:<br>
|
||||
<select name=modwidth>
|
||||
<option value=1> One </option>
|
||||
<option value=2> Two </option>
|
||||
<option value=3> Three </option>
|
||||
<option value=4> Four </option>
|
||||
<option value=5> Five </option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Add checksum:<br>
|
||||
<input type=checkbox value=1 name=checksum>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
Hide text:<br>
|
||||
<input type=checkbox value=1 name=notext>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Show frame:<br>
|
||||
<input type=checkbox value=1 name=showframe>
|
||||
</td>
|
||||
<td>
|
||||
Vertical layout:<br>
|
||||
<input type=checkbox value=1 name=vertical>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Height:<br>
|
||||
<input type=text name=height value="70" size=3 maxlength=3>
|
||||
</td>
|
||||
<td>
|
||||
Scale:<br>
|
||||
<input type=text name=scale value="1.0" size=4 maxlength=4>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Write to file:<br>
|
||||
<input type=text name=file size=15 maxlength=80>
|
||||
</td>
|
||||
<td>
|
||||
Format:<br>
|
||||
<select name=backend>
|
||||
<option selected value="IMAGEPNG">Image (PNG)</option>
|
||||
<option value="IMAGEJPG">Image (JPEG)</option>
|
||||
<option value="PS">Postscript</option>
|
||||
<option value="EPS">EPS</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
PS module width:
|
||||
</td>
|
||||
<td>
|
||||
<input type=text name=pswidth size=4 maxlength=4><br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan=2>
|
||||
<small><i>(If specified will override Module width above)</i></small><br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Debug info:<br>
|
||||
<input type=checkbox value=1 name=info>
|
||||
</td>
|
||||
<td align=right valign=bottom>
|
||||
<br>
|
||||
<input type=submit name=submit value=" Create " style="font-weight:bold;">
|
||||
</td>
|
||||
</tr></table>
|
||||
</form>
|
||||
|
||||
<p>
|
||||
<hr>
|
||||
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
<!doctype html public "-//W3C//DTD HTML 4.0 Frameset//EN">
|
||||
<HTML><HEAD>
|
||||
<LINK REL=STYLESHEET TYPE="text/css" HREF="de_normal.css">
|
||||
<title>Barcode SYSTEMTEST</title>
|
||||
</head>
|
||||
<frameset cols="280,*">
|
||||
<frame src=barcode_menu.php name=menu>;
|
||||
<frame src=barcode_image.php name=barcode>
|
||||
</frameset>
|
||||
</html>
|
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
// ==============================================
|
||||
// Output Image using Code 39 using only default values
|
||||
// ==============================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
try {
|
||||
$encoder = BarcodeFactory::Create(ENCODING_CODE39);
|
||||
$e = BackendFactory::Create(BACKEND_IMAGE,$encoder);
|
||||
$e->Stroke('abc123');
|
||||
} catch( JpGraphException $e ) {
|
||||
//echo 'Error: ' . $e->getMessage()."\n";
|
||||
JpGraphError::Raise($e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
// ==============================================
|
||||
// Output Image using Code 39 using only default values
|
||||
// ==============================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
$encoder = BarcodeFactory::Create(ENCODING_CODE39);
|
||||
$e = BackendFactory::Create(BACKEND_IMAGE,$encoder);
|
||||
$e->Stroke('ABC123');
|
||||
|
||||
?>
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// ==============================================
|
||||
// Output Image using Code 128
|
||||
// ==============================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
$encoder = BarcodeFactory::Create(ENCODING_CODE128);
|
||||
$e = BackendFactory::Create(BACKEND_PS,$encoder);
|
||||
$e->SetModuleWidth(2);
|
||||
$e->SetHeight(20);
|
||||
echo nl2br($e->Stroke('3125134772'));
|
||||
|
||||
|
||||
?>
|
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
// ==============================================
|
||||
// Output Postscript of nterleaved 2 of 5
|
||||
// ==============================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
$encoder = BarcodeFactory::Create(ENCODING_CODEI25);
|
||||
$e = BackendFactory::Create(BACKEND_PS,$encoder);
|
||||
$e->SetModuleWidth(2);
|
||||
$e->SetHeight(70);
|
||||
$ps = $e->Stroke('3125134772');
|
||||
echo nl2br(htmlspecialchars($ps));
|
||||
|
||||
?>
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
// ==============================================
|
||||
// Output Encapsulated Postscript of interleaved 2 of 5
|
||||
// ==============================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
echo "Start ...<br>";
|
||||
$encoder = BarcodeFactory::Create(ENCODING_CODEI25);
|
||||
$e = BackendFactory::Create(BACKEND_PS,$encoder);
|
||||
$e->SetModuleWidth(2);
|
||||
$e->SetHeight(70);
|
||||
$e->SetEPS();
|
||||
$ps = $e->Stroke('3125134772');
|
||||
echo nl2br(htmlspecialchars($ps));
|
||||
|
||||
|
||||
?>
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// ==============================================
|
||||
// Output Image using Code Interleaved 2 of 5
|
||||
// ==============================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
$encoder = BarcodeFactory::Create(ENCODING_CODEI25);
|
||||
$e = BackendFactory::Create(BACKEND_IMAGE,$encoder);
|
||||
$e->SetModuleWidth(2);
|
||||
$e->Stroke('1234');
|
||||
|
||||
?>
|
@ -0,0 +1,74 @@
|
||||
<?php
|
||||
// =======================================================
|
||||
// Example of how to format US Postal shipping information
|
||||
// =======================================================
|
||||
require_once ('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
// The Full barcode standard is described in
|
||||
// http://www.usps.com/cpim/ftp/pubs/pub91/91c4.html#508hdr1
|
||||
//
|
||||
// The data start with AI=420 which means
|
||||
// "Ship to/Deliver To Postal Code (within single authority)
|
||||
//
|
||||
class USPS_Confirmation {
|
||||
function USPS_Confirmation() {
|
||||
}
|
||||
|
||||
// Private utility function
|
||||
function _USPS_chkd($aData) {
|
||||
$n = strlen($aData);
|
||||
|
||||
// Add all even numbers starting from position 1 from the end
|
||||
$et = 0 ;
|
||||
for( $i=1; $i <= $n; $i+=2 ) {
|
||||
$d = intval(substr($aData,-$i,1));
|
||||
$et += $d;
|
||||
}
|
||||
|
||||
// Add all odd numbers starting from position 2 from the end
|
||||
$ot = 0 ;
|
||||
for( $i=2; $i <= $n; $i+=2 ) {
|
||||
$d = intval(substr($aData,-$i,1));
|
||||
$ot += $d;
|
||||
}
|
||||
$tot = 3*$et + $ot;
|
||||
$chkdigit = (10 - ($tot % 10))%10;;
|
||||
return $chkdigit;
|
||||
}
|
||||
|
||||
// Get type 1 of confirmation code (with ZIP)
|
||||
function GetPICwithZIP($aZIP,$aServiceType,$aDUNS,$aSeqNbr) {
|
||||
// Convert to USPS format with AI=420 and extension starting with AI=91
|
||||
$data = '420'. $aZIP . '91' . $aServiceType . $aDUNS . $aSeqNbr;
|
||||
// Only calculate the checkdigit from the AI=91 and forward
|
||||
// and do not include the ~1 (FUNC1) in the calculation
|
||||
$cd = $this->_USPS_chkd(substr($data,8));
|
||||
$data = '420'. $aZIP . '~191' . $aServiceType . $aDUNS . $aSeqNbr;
|
||||
return $data . $cd;
|
||||
}
|
||||
|
||||
// Get type 2 of confirmation code (without ZIP)
|
||||
function GetPIC($aServiceType,$aDUNS,$aSeqNbr) {
|
||||
// Convert to USPS format with AI=91
|
||||
$data = '91' . $aServiceType . $aDUNS . $aSeqNbr;
|
||||
$cd = $this->_USPS_chkd($data);
|
||||
return $data . $cd;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$usps = new USPS_Confirmation();
|
||||
$zip = '92663';
|
||||
$service = '21';
|
||||
$DUNS = '805213907';
|
||||
$seqnr = '04508735';
|
||||
$data = $usps->GetPICwithZIP($zip,$service,$DUNS,$seqnr);
|
||||
//$data = $usps->GetPIC('01','123456789','00000001');
|
||||
|
||||
$encoder = BarcodeFactory::Create(ENCODING_EAN128);
|
||||
$e = BackendFactory::Create(BACKEND_IMAGE,$encoder);
|
||||
$e->SetModuleWidth(2);
|
||||
$e->SetFont(FF_ARIAL,FS_NORMAL,14);
|
||||
$e->Stroke($data);
|
||||
|
||||
?>
|
@ -0,0 +1,281 @@
|
||||
<?php
|
||||
require_once('jpgraph/jpgraph_barcode.php');
|
||||
|
||||
/*=======================================================================
|
||||
// File: MKBARCODE.PHP
|
||||
// Description: Comman line tool to generate linear barcodes
|
||||
// Created: 2009-06-20
|
||||
// Ver: $Id: mkbarcode.php 1455 2009-07-03 18:52:25Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//=======================================================================
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// CLASS ParseArgs
|
||||
// Parse command line arguments and make sanity checks
|
||||
//----------------------------------------------------------------------
|
||||
class ParseArgs {
|
||||
var $argc,$argv;
|
||||
|
||||
function ParseArgs() {
|
||||
// Get command line argument
|
||||
$this->argv = ($_SERVER['argv']);
|
||||
$this->argc = ($_SERVER['argc']);
|
||||
}
|
||||
|
||||
function PrintUsage() {
|
||||
$n = $this->argv[0];
|
||||
echo "$n -b <symbology> [-r -h -c -o <output format> -m <width> -s <scale> -y <height> -f <filename> ] datastring \n".
|
||||
"Create the specified barcode\n".
|
||||
"-b What symbology to use, one of the following strings (case insensitive)\n".
|
||||
" UPCA \n".
|
||||
" UPCE \n".
|
||||
" EAN128 \n".
|
||||
" EAN13 \n".
|
||||
" EAN8 \n".
|
||||
" CODE11 \n".
|
||||
" CODE39 \n".
|
||||
" CODE128 \n".
|
||||
" CODE25 \n".
|
||||
" CODEI25 \n".
|
||||
" CODABAR \n".
|
||||
" BOOKLAND \n".
|
||||
"-c Add checkdigit for symbologies where this is optional\n".
|
||||
"-o Output format. 0=Image, 1=PS, 2=EPS\n".
|
||||
"-m Module width\n".
|
||||
"-s Scale factor\n".
|
||||
"-h Show this help\n".
|
||||
"-f Filename to write to\n".
|
||||
"-r Rotate barcode 90 degrees\n".
|
||||
"-y height Set height in pixels\n".
|
||||
"-x Hide the human readable text\n".
|
||||
"--silent Silent. Don't give any error mesages\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
function Get() {
|
||||
$barcode='code39';
|
||||
$hide=false;
|
||||
$checkdigit=false;
|
||||
$modulewidth=2;
|
||||
$scale=1;
|
||||
$output=0;
|
||||
$filename='';
|
||||
$data = '';
|
||||
$rotate = false;
|
||||
$silent=false;
|
||||
$height = 70;
|
||||
if( ($n=$this->GetNum()) > 0 ) {
|
||||
$i=1;
|
||||
while( $i <= $n ) {
|
||||
switch( $this->argv[$i] ) {
|
||||
case '-h':
|
||||
$this->PrintUsage();
|
||||
exit(0);
|
||||
break;
|
||||
case '-b':
|
||||
$barcode = $this->argv[++$i];
|
||||
break;
|
||||
case '-o':
|
||||
$output = (int)$this->argv[++$i];
|
||||
break;
|
||||
case '-y':
|
||||
$height = (int)$this->argv[++$i];
|
||||
break;
|
||||
case '-x':
|
||||
$hide=true;
|
||||
break;
|
||||
case '-r':
|
||||
$rotate=true;
|
||||
break;
|
||||
case '-c':
|
||||
$checkdigit=true;
|
||||
break;
|
||||
case '--silent':
|
||||
$silent=true;
|
||||
break;
|
||||
case '-s':
|
||||
$scale = (float)$this->argv[++$i];
|
||||
break;
|
||||
case '-m':
|
||||
$modulewidth = (float)$this->argv[++$i];
|
||||
break;
|
||||
case '-f':
|
||||
$filename = $this->argv[++$i];
|
||||
break;
|
||||
default:
|
||||
if( $data == '' ) {
|
||||
$data = $this->argv[$i];
|
||||
}
|
||||
else {
|
||||
$this->PrintUsage();
|
||||
die("Illegal specified parameters");
|
||||
}
|
||||
break;
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if( $output < 0 || $output > 2 ) {
|
||||
fwrite(STDERR,"Unkown output format ($output)\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if( $output === 0 ) {
|
||||
$modulewidth = floor($modulewidth);
|
||||
}
|
||||
|
||||
// Sanity check
|
||||
if( $modulewidth > 15 ) {
|
||||
fwrite(STDERR,"Too large modulewidth\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Sanity check
|
||||
if( $height > 1000 ) {
|
||||
fwrite(STDERR,"Too large height\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Sanity check
|
||||
if( $scale > 15 ) {
|
||||
fwrite(STDERR,"Too large scale factor\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if( strlen($filename) > 256 ) {
|
||||
fwrite(STDERR,"Too long filename\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if( trim($data) == '' ) {
|
||||
fwrite(STDERR,"No input data specified\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$barcodes = array(
|
||||
'UPCA' => ENCODING_UPCA,
|
||||
'UPCE' => ENCODING_UPCE,
|
||||
'EAN128' => ENCODING_EAN128,
|
||||
'EAN13' => ENCODING_EAN13,
|
||||
'EAN8' => ENCODING_EAN8,
|
||||
'CODE11' => ENCODING_CODE11,
|
||||
'CODE39' => ENCODING_CODE39,
|
||||
'CODE128' => ENCODING_CODE128,
|
||||
'CODE25' => ENCODING_CODE25,
|
||||
'CODEI25' => ENCODING_CODEI25,
|
||||
'CODABAR' => ENCODING_CODABAR,
|
||||
'BOOKLAND' => ENCODING_BOOKLAND,
|
||||
);
|
||||
$barcode = strtoupper($barcode);
|
||||
if( key_exists($barcode,$barcodes) ) {
|
||||
$barcode = $barcodes[$barcode];
|
||||
}
|
||||
else {
|
||||
fwrite(STDERR,'Specified barcode symbology ('.$barcode.") is not supported\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$ret = array(
|
||||
'barcode' => $barcode,
|
||||
'hide' => $hide,
|
||||
'modulewidth' => $modulewidth,
|
||||
'scale' => $scale,
|
||||
'output' => $output,
|
||||
'data' => $data,
|
||||
'silent' => $silent,
|
||||
'rotate' => $rotate,
|
||||
'height' => $height,
|
||||
'checkdigit' => $checkdigit,
|
||||
'filename' => $filename
|
||||
);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
function _Dump() {
|
||||
var_dump($this->argv);
|
||||
}
|
||||
|
||||
function GetNum() {
|
||||
return $this->argc-1;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// CLASS Driver
|
||||
// Main driver class to create barcodes with the parmeters specified on
|
||||
// the command line.
|
||||
//----------------------------------------------------------------------
|
||||
class Driver {
|
||||
|
||||
private $iParams;
|
||||
static public $silent=false;
|
||||
|
||||
static public function ErrHandlerPS(Exception $e) {
|
||||
if( !Driver::$silent )
|
||||
fwrite(STDERR,$e->getMessage()."\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static public function ErrHandlerImg(Exception $e) {
|
||||
if( !Driver::$silent )
|
||||
fwrite(STDERR,$e->getMessage()."\n");
|
||||
$errobj = new JpGraphErrObjectImg();
|
||||
$errobj->Raise($e->getMessage());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
function Run($aParams) {
|
||||
|
||||
$this->iParams = $aParams;
|
||||
|
||||
Driver::$silent = $aParams['silent'];
|
||||
|
||||
$encoder = BarcodeFactory::Create($aParams['barcode']);
|
||||
$encoder->AddChecksum($aParams['checkdigit']);
|
||||
switch( $aParams['output'] ) {
|
||||
case 0:
|
||||
$e = BackendFactory::Create(BACKEND_IMAGE,$encoder);
|
||||
set_exception_handler(array('Driver','ErrHandlerImg'));
|
||||
break;
|
||||
case 1:
|
||||
$e = BackendFactory::Create(BACKEND_PS,$encoder);
|
||||
set_exception_handler(array('Driver','ErrHandlerPS'));
|
||||
break;
|
||||
case 2:
|
||||
$e = BackendFactory::Create(BACKEND_PS,$encoder);
|
||||
$e->SetEPS();
|
||||
set_exception_handler(array('Driver','ErrHandlerPS'));
|
||||
break;
|
||||
}
|
||||
$e->SetHeight($aParams['height']);
|
||||
$e->SetVertical($aParams['rotate']);
|
||||
$e->SetModuleWidth($aParams['modulewidth']);
|
||||
$e->SetScale($aParams['scale']);
|
||||
$e->HideText($aParams['hide']);
|
||||
if( $aParams['output'] === 0 ) {
|
||||
$err = $e->Stroke($aParams['data'], $aParams['filename']);
|
||||
}
|
||||
else {
|
||||
$s = $e->Stroke($aParams['data'], $aParams['filename']);
|
||||
if( $aParams['filename'] == '' ) {
|
||||
// If no filename specified then return the generated postscript
|
||||
echo $s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$pa = new ParseArgs();
|
||||
$params = $pa->Get();
|
||||
$driver = new Driver();
|
||||
$driver->Run($params);
|
||||
|
||||
// Successfull termination
|
||||
exit(0);
|
||||
|
||||
?>
|
@ -0,0 +1,237 @@
|
||||
class JpCountryFlags {
|
||||
|
||||
$iCountryFlags = array(
|
||||
'Afghanistan' => 'afgh.gif',
|
||||
'Republic of Angola' => 'agla.gif',
|
||||
'Republic of Albania' => 'alba.gif',
|
||||
'Alderney' => 'alde.gif',
|
||||
'Democratic and Popular Republic of Algeria' => 'alge.gif',
|
||||
'Territory of American Samoa' => 'amsa.gif',
|
||||
'Principality of Andorra' => 'andr.gif',
|
||||
'British Overseas Territory of Anguilla' => 'angu.gif',
|
||||
'Antarctica' => 'anta.gif',
|
||||
'Argentine Republic' => 'arge.gif',
|
||||
'League of Arab States' => 'arle.gif',
|
||||
'Republic of Armenia' => 'arme.gif',
|
||||
'Aruba' => 'arub.gif',
|
||||
'Commonwealth of Australia' => 'astl.gif',
|
||||
'Republic of Austria' => 'aust.gif',
|
||||
'Azerbaijani Republic' => 'azer.gif',
|
||||
'British Antarctic Territory' => 'bant.gif',
|
||||
'Kingdom of Belgium' => 'belg.gif',
|
||||
'British Overseas Territory of Bermuda' => 'berm.gif',
|
||||
'Commonwealth of the Bahamas' => 'bhms.gif',
|
||||
'Kingdom of Bahrain' => 'bhrn.gif',
|
||||
'Republic of Belarus' => 'blru.gif',
|
||||
'Republic of Bolivia' => 'blva.gif',
|
||||
'Belize' => 'blze.gif',
|
||||
'Republic of Benin' => 'bnin.gif',
|
||||
'Republic of Botswana' => 'bots.gif',
|
||||
'Federative Republic of Brazil' => 'braz.gif',
|
||||
'Barbados' => 'brbd.gif',
|
||||
'British Indian Ocean Territory' => 'brin.gif',
|
||||
'Brunei Darussalam' => 'brun.gif',
|
||||
'Republic of Burkina' => 'bufa.gif',
|
||||
'Republic of Bulgaria' => 'bulg.gif',
|
||||
'Republic of Burundi' => 'buru.gif',
|
||||
'Overseas Territory of the British Virgin Islands' => 'bvis.gif',
|
||||
'Central African Republic' => 'cafr.gif',
|
||||
'Kingdom of Cambodia' => 'camb.gif',
|
||||
'Republic of Cameroon' => 'came.gif',
|
||||
'Dominion of Canada' => 'cana.gif',
|
||||
'Caribbean Community' => 'cari.gif',
|
||||
'Republic of Cape Verde' => 'cave.gif',
|
||||
'Republic of Chad' => 'chad.gif',
|
||||
'Republic of Chile' => 'chil.gif',
|
||||
'Territory of Christmas Island' => 'chms.gif',
|
||||
'Commonwealth of Independent States' => 'cins.gif',
|
||||
'Cook Islands' => 'ckis.gif',
|
||||
'Republic of Colombia' => 'clmb.gif',
|
||||
'Territory of Cocos Islands' => 'cois.gif',
|
||||
'Commonwealth' => 'comn.gif',
|
||||
'Union of the Comoros' => 'como.gif',
|
||||
'Republic of the Congo' => 'cong.gif',
|
||||
'Republic of Costa Rica' => 'corc.gif',
|
||||
'Republic of Croatia' => 'croa.gif',
|
||||
'Republic of Cuba' => 'cuba.gif',
|
||||
'British Overseas Territory of the Cayman Islands' => 'cyis.gif',
|
||||
'Republic of Cyprus' => 'cypr.gif',
|
||||
'The Czech Republic' => 'czec.gif',
|
||||
'Kingdom of Denmark' => 'denm.gif',
|
||||
'Republic of Djibouti' => 'djib.gif',
|
||||
'Commonwealth of Dominica' => 'domn.gif',
|
||||
'Dominican Republic' => 'dore.gif',
|
||||
'Republic of Ecuador' => 'ecua.gif',
|
||||
'Arab Republic of Egypt' => 'egyp.gif',
|
||||
'Republic of El Salvador' => 'elsa.gif',
|
||||
'England' => 'engl.gif',
|
||||
'Republic of Equatorial Guinea' => 'eqgu.gif',
|
||||
'State of Eritrea' => 'erit.gif',
|
||||
'Republic of Estonia' => 'estn.gif',
|
||||
'Ethiopia' => 'ethp.gif',
|
||||
'European Union' => 'euun.gif',
|
||||
'British Overseas Territory of the Falkland Islands' => 'fais.gif',
|
||||
'International Federation of Vexillological Associations' => 'fiav.gif',
|
||||
'Republic of Fiji' => 'fiji.gif',
|
||||
'Republic of Finland' => 'finl.gif',
|
||||
'Territory of French Polynesia' => 'fpol.gif',
|
||||
'French Republic' => 'fran.gif',
|
||||
'Overseas Department of French Guiana' => 'frgu.gif',
|
||||
'Gabonese Republic' => 'gabn.gif',
|
||||
'Republic of the Gambia' => 'gamb.gif',
|
||||
'Republic of Georgia' => 'geor.gif',
|
||||
'Federal Republic of Germany' => 'germ.gif',
|
||||
'Republic of Ghana' => 'ghan.gif',
|
||||
'Gibraltar' => 'gibr.gif',
|
||||
'Hellenic Republic' => 'grec.gif',
|
||||
'State of Grenada' => 'gren.gif',
|
||||
'Overseas Department of Guadeloupe' => 'guad.gif',
|
||||
'Territory of Guam' => 'guam.gif',
|
||||
'Republic of Guatemala' => 'guat.gif',
|
||||
'The Bailiwick of Guernsey' => 'guer.gif',
|
||||
'Republic of Guinea' => 'guin.gif',
|
||||
'Republic of Haiti' => 'hait.gif',
|
||||
'Hong Kong Special Administrative Region' => 'hokn.gif',
|
||||
'Republic of Honduras' => 'hond.gif',
|
||||
'Republic of Hungary' => 'hung.gif',
|
||||
'Republic of Iceland' => 'icel.gif',
|
||||
'International Committee of the Red Cross' => 'icrc.gif',
|
||||
'Republic of India' => 'inda.gif',
|
||||
'Republic of Indonesia' => 'indn.gif',
|
||||
'Republic of Iraq' => 'iraq.gif',
|
||||
'Republic of Ireland' => 'irel.gif',
|
||||
'Organization of the Islamic Conference' => 'isco.gif',
|
||||
'Isle of Man' => 'isma.gif',
|
||||
'State of Israel' => 'isra.gif',
|
||||
'Italian Republic' => 'ital.gif',
|
||||
'Jamaica' => 'jama.gif',
|
||||
'Japan' => 'japa.gif',
|
||||
'The Bailiwick of Jersey' => 'jers.gif',
|
||||
'Hashemite Kingdom of Jordan' => 'jord.gif',
|
||||
'Republic of Kazakhstan' => 'kazk.gif',
|
||||
'Republic of Kenya' => 'keny.gif',
|
||||
'Republic of Kiribati' => 'kirb.gif',
|
||||
'State of Kuwait' => 'kuwa.gif',
|
||||
'Kyrgyz Republic' => 'kyrg.gif',
|
||||
'Republic of Latvia' => 'latv.gif',
|
||||
'Lebanese Republic' => 'leba.gif',
|
||||
'Kingdom of Lesotho' => 'lest.gif',
|
||||
'Republic of Liberia' => 'libe.gif',
|
||||
'Principality of Liechtenstein' => 'liec.gif',
|
||||
'Republic of Lithuania' => 'lith.gif',
|
||||
'Grand Duchy of Luxembourg' => 'luxe.gif',
|
||||
'Macao Special Administrative Region' => 'maca.gif',
|
||||
'Republic of Macedonia' => 'mace.gif',
|
||||
'Republic of Madagascar' => 'mada.gif',
|
||||
'Republic of the Marshall Islands' => 'mais.gif',
|
||||
'Republic of Maldives' => 'mald.gif',
|
||||
'Republic of Mali' => 'mali.gif',
|
||||
'Federation of Malaysia' => 'mals018.gif',
|
||||
'Republic of Malta' => 'malt.gif',
|
||||
'Republic of Malawi' => 'malw.gif',
|
||||
'Overseas Department of Martinique' => 'mart.gif',
|
||||
'Islamic Republic of Mauritania' => 'maur.gif',
|
||||
'Territorial Collectivity of Mayotte' => 'mayt.gif',
|
||||
'United Mexican States' => 'mexc.gif',
|
||||
'Federated States of Micronesia' => 'micr.gif',
|
||||
'Midway Islands' => 'miis.gif',
|
||||
'Republic of Moldova' => 'mold.gif',
|
||||
'Principality of Monaco' => 'mona.gif',
|
||||
'Republic of Mongolia' => 'mong.gif',
|
||||
'British Overseas Territory of Montserrat' => 'mont.gif',
|
||||
'Kingdom of Morocco' => 'morc.gif',
|
||||
'Republic of Mozambique' => 'moza.gif',
|
||||
'Republic of Mauritius' => 'mrts.gif',
|
||||
'Union of Myanmar' => 'myan.gif',
|
||||
'Republic of Namibia' => 'namb.gif',
|
||||
'North Atlantic Treaty Organization' => 'nato.gif',
|
||||
'Republic of Nauru' => 'naur.gif',
|
||||
'Turkish Republic of Northern Cyprus' => 'ncyp.gif',
|
||||
'Netherlands Antilles' => 'nean.gif',
|
||||
'Kingdom of Nepal' => 'nepa.gif',
|
||||
'Kingdom of the Netherlands' => 'neth.gif',
|
||||
'Territory of Norfolk Island' => 'nfis.gif',
|
||||
'Federal Republic of Nigeria' => 'ngra.gif',
|
||||
'Republic of Nicaragua' => 'nica.gif',
|
||||
'Republic of Niger' => 'nigr.gif',
|
||||
'Niue' => 'niue.gif',
|
||||
'Commonwealth of the Northern Mariana Islands' => 'nmar.gif',
|
||||
'Province of Northern Ireland' => 'noir.gif',
|
||||
'Nordic Council' => 'nord.gif',
|
||||
'Kingdom of Norway' => 'norw.gif',
|
||||
'Territory of New Caledonia and Dependencies' => 'nwca.gif',
|
||||
'New Zealand' => 'nwze.gif',
|
||||
'Organization of American States' => 'oast.gif',
|
||||
'Organization of African Unity' => 'oaun.gif',
|
||||
'International Olympic Committee' => 'olym.gif',
|
||||
'Sultanate of Oman' => 'oman.gif',
|
||||
'Organization of Petroleum Exporting Countries' => 'opec.gif',
|
||||
'Islamic Republic of Pakistan' => 'paks.gif',
|
||||
'Republic of Palau' => 'pala.gif',
|
||||
'Independent State of Papua New Guinea' => 'pang.gif',
|
||||
'Republic of Paraguay' => 'para.gif',
|
||||
'Republic of the Philippines' => 'phil.gif',
|
||||
'British Overseas Territory of the Pitcairn Islands' => 'piis.gif',
|
||||
'Republic of Poland' => 'pola.gif',
|
||||
'Republic of Portugal' => 'port.gif',
|
||||
'Commonwealth of Puerto Rico' => 'purc.gif',
|
||||
'State of Qatar' => 'qata.gif',
|
||||
'Russian Federation' => 'russ.gif',
|
||||
'Republic of Rwanda' => 'rwan.gif',
|
||||
'Kingdom of Saudi Arabia' => 'saar.gif',
|
||||
'Republic of San Marino' => 'sama.gif',
|
||||
'Nordic Sami Conference' => 'sami.gif',
|
||||
'Sark' => 'sark.gif',
|
||||
'Scotland' => 'scot.gif',
|
||||
'Principality of Seborga' => 'sebo.gif',
|
||||
'Republic of Sierra Leone' => 'sile.gif',
|
||||
'Republic of Singapore' => 'sing.gif',
|
||||
'Republic of Korea' => 'skor.gif',
|
||||
'Republic of Slovenia' => 'slva.gif',
|
||||
'Somali Republic' => 'smla.gif',
|
||||
'Republic of Somaliland' => 'smld.gif',
|
||||
'Republic of South Africa' => 'soaf.gif',
|
||||
'Solomon Islands' => 'sois.gif',
|
||||
'Kingdom of Spain' => 'span.gif',
|
||||
'Secretariat of the Pacific Community' => 'spco.gif',
|
||||
'Democratic Socialist Republic of Sri Lanka' => 'srla.gif',
|
||||
'Saint Lucia' => 'stlu.gif',
|
||||
'Republic of the Sudan' => 'suda.gif',
|
||||
'Republic of Suriname' => 'surn.gif',
|
||||
'Slovak Republic' => 'svka.gif',
|
||||
'Kingdom of Sweden' => 'swdn.gif',
|
||||
'Swiss Confederation' => 'swit.gif',
|
||||
'Syrian Arab Republic' => 'syra.gif',
|
||||
'Kingdom of Swaziland' => 'szld.gif',
|
||||
'Republic of China' => 'taiw.gif',
|
||||
'Republic of Tajikistan' => 'tajk.gif',
|
||||
'United Republic of Tanzania' => 'tanz.gif',
|
||||
'Kingdom of Thailand' => 'thal.gif',
|
||||
'Autonomous Region of Tibet' => 'tibe.gif',
|
||||
'Turkmenistan' => 'tkst.gif',
|
||||
'Togolese Republic' => 'togo.gif',
|
||||
'Tokelau' => 'toke.gif',
|
||||
'Kingdom of Tonga' => 'tong.gif',
|
||||
'Tristan da Cunha' => 'trdc.gif',
|
||||
'Tromelin' => 'tris.gif',
|
||||
'Republic of Tunisia' => 'tuns.gif',
|
||||
'Republic of Turkey' => 'turk.gif',
|
||||
'Tuvalu' => 'tuva.gif',
|
||||
'United Arab Emirates' => 'uaem.gif',
|
||||
'Republic of Uganda' => 'ugan.gif',
|
||||
'Ukraine' => 'ukrn.gif',
|
||||
'United Kingdom of Great Britain' => 'unkg.gif',
|
||||
'United Nations' => 'unna.gif',
|
||||
'United States of America' => 'unst.gif',
|
||||
'Oriental Republic of Uruguay' => 'urgy.gif',
|
||||
'Virgin Islands of the United States' => 'usvs.gif',
|
||||
'Republic of Uzbekistan' => 'uzbk.gif',
|
||||
'State of the Vatican City' => 'vacy.gif',
|
||||
'Republic of Vanuatu' => 'vant.gif',
|
||||
'Bolivarian Republic of Venezuela' => 'venz.gif',
|
||||
'Republic of Yemen' => 'yemn.gif',
|
||||
'Democratic Republic of Congo' => 'zare.gif',
|
||||
'Republic of Zimbabwe' => 'zbwe.gif'
|
||||
) ;
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,344 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|
||||
Copyright (c) 2006-2008 Ulrich Mierendorff
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Changelog:
|
||||
version 1.1
|
||||
- improved the rendering speed by ~20%
|
||||
|
||||
- Thanks to Matthias Mächler for fixing some small errors:
|
||||
* uninitialized variables
|
||||
* deprecated passing of $img reference in imageSmoothArc ()
|
||||
|
||||
version 1.0
|
||||
Release of rewritten script
|
||||
|
||||
*/
|
||||
|
||||
function imageSmoothArcDrawSegment (&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $seg)
|
||||
{
|
||||
// Originally written from scratch by Ulrich Mierendorff, 06/2006
|
||||
// Rewritten and improved, 04/2007, 07/2007
|
||||
|
||||
// Please do not use THIS function directly. Scroll down to imageSmoothArc(...).
|
||||
|
||||
$fillColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], $color[3] );
|
||||
|
||||
$xStart = abs($a * cos($start));
|
||||
$yStart = abs($b * sin($start));
|
||||
$xStop = abs($a * cos($stop));
|
||||
$yStop = abs($b * sin($stop));
|
||||
$dxStart = 0;
|
||||
$dyStart = 0;
|
||||
$dxStop = 0;
|
||||
$dyStop = 0;
|
||||
if ($xStart != 0)
|
||||
$dyStart = $yStart/$xStart;
|
||||
if ($xStop != 0)
|
||||
$dyStop = $yStop/$xStop;
|
||||
if ($yStart != 0)
|
||||
$dxStart = $xStart/$yStart;
|
||||
if ($yStop != 0)
|
||||
$dxStop = $xStop/$yStop;
|
||||
if (abs($xStart) >= abs($yStart)) {
|
||||
$aaStartX = true;
|
||||
} else {
|
||||
$aaStartX = false;
|
||||
}
|
||||
if ($xStop >= $yStop) {
|
||||
$aaStopX = true;
|
||||
} else {
|
||||
$aaStopX = false;
|
||||
}
|
||||
//$xp = +1; $yp = -1; $xa = +1; $ya = 0;
|
||||
for ( $x = 0; $x < $a; $x += 1 ) {
|
||||
/*$y = $b * sqrt( 1 - ($x*$x)/($a*$a) );
|
||||
|
||||
$error = $y - (int)($y);
|
||||
$y = (int)($y);
|
||||
|
||||
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );*/
|
||||
|
||||
$_y1 = $dyStop*$x;
|
||||
$_y2 = $dyStart*$x;
|
||||
if ($xStart > $xStop)
|
||||
{
|
||||
$error1 = $_y1 - (int)($_y1);
|
||||
$error2 = 1 - $_y2 + (int)$_y2;
|
||||
$_y1 = $_y1-$error1;
|
||||
$_y2 = $_y2+$error2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error1 = 1 - $_y1 + (int)$_y1;
|
||||
$error2 = $_y2 - (int)($_y2);
|
||||
$_y1 = $_y1+$error1;
|
||||
$_y2 = $_y2-$error2;
|
||||
}
|
||||
/*
|
||||
if ($aaStopX)
|
||||
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
||||
if ($aaStartX)
|
||||
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
||||
*/
|
||||
|
||||
if ($seg == 0 || $seg == 2)
|
||||
{
|
||||
$i = $seg;
|
||||
if (!($start > $i*M_PI/2 && $x > $xStart)) {
|
||||
if ($i == 0) {
|
||||
$xp = +1; $yp = -1; $xa = +1; $ya = 0;
|
||||
} else {
|
||||
$xp = -1; $yp = +1; $xa = 0; $ya = +1;
|
||||
}
|
||||
if ( $stop < ($i+1)*(M_PI/2) && $x <= $xStop ) {
|
||||
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
||||
$y1 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*($x)+$xa, $cy+$yp*($y1+1)+$ya, $diffColor1);
|
||||
|
||||
} else {
|
||||
$y = $b * sqrt( 1 - ($x*$x)/($a*$a) );
|
||||
$error = $y - (int)($y);
|
||||
$y = (int)($y);
|
||||
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
||||
$y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor);
|
||||
}
|
||||
if ($start > $i*M_PI/2 && $x <= $xStart) {
|
||||
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
||||
$y2 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor2);
|
||||
} else {
|
||||
$y2 = 0;
|
||||
}
|
||||
if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya , $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor);
|
||||
}
|
||||
}
|
||||
|
||||
if ($seg == 1 || $seg == 3)
|
||||
{
|
||||
$i = $seg;
|
||||
if (!($stop < ($i+1)*M_PI/2 && $x > $xStop)) {
|
||||
if ($i == 1) {
|
||||
$xp = -1; $yp = -1; $xa = 0; $ya = 0;
|
||||
} else {
|
||||
$xp = +1; $yp = +1; $xa = 1; $ya = 1;
|
||||
}
|
||||
if ( $start > $i*M_PI/2 && $x < $xStart ) {
|
||||
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
||||
$y1 = $_y2; if ($aaStartX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor2);
|
||||
|
||||
} else {
|
||||
$y = $b * sqrt( 1 - ($x*$x)/($a*$a) );
|
||||
$error = $y - (int)($y);
|
||||
$y = (int) $y;
|
||||
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
||||
$y1 = $y; if ($x < $aaAngleX ) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y1+1)+$ya, $diffColor);
|
||||
}
|
||||
if ($stop < ($i+1)*M_PI/2 && $x <= $xStop) {
|
||||
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
||||
$y2 = $_y1; if ($aaStopX) imageSetPixel($img, $cx+$xp*$x+$xa, $cy+$yp*($y2-1)+$ya, $diffColor1);
|
||||
} else {
|
||||
$y2 = 0;
|
||||
}
|
||||
if ($y2 <= $y1) imageLine($img, $cx+$xp*$x+$xa, $cy+$yp*$y1+$ya, $cx+$xp*$x+$xa, $cy+$yp*$y2+$ya, $fillColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///YYYYY
|
||||
|
||||
for ( $y = 0; $y < $b; $y += 1 ) {
|
||||
/*$x = $a * sqrt( 1 - ($y*$y)/($b*$b) );
|
||||
|
||||
$error = $x - (int)($x);
|
||||
$x = (int)($x);
|
||||
|
||||
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
||||
*/
|
||||
$_x1 = $dxStop*$y;
|
||||
$_x2 = $dxStart*$y;
|
||||
if ($yStart > $yStop)
|
||||
{
|
||||
$error1 = $_x1 - (int)($_x1);
|
||||
$error2 = 1 - $_x2 + (int)$_x2;
|
||||
$_x1 = $_x1-$error1;
|
||||
$_x2 = $_x2+$error2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$error1 = 1 - $_x1 + (int)$_x1;
|
||||
$error2 = $_x2 - (int)($_x2);
|
||||
$_x1 = $_x1+$error1;
|
||||
$_x2 = $_x2-$error2;
|
||||
}
|
||||
/*
|
||||
if (!$aaStopX)
|
||||
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
||||
if (!$aaStartX)
|
||||
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
||||
*/
|
||||
|
||||
if ($seg == 0 || $seg == 2)
|
||||
{
|
||||
$i = $seg;
|
||||
if (!($start > $i*M_PI/2 && $y > $yStop)) {
|
||||
if ($i == 0) {
|
||||
$xp = +1; $yp = -1; $xa = 1; $ya = 0;
|
||||
} else {
|
||||
$xp = -1; $yp = +1; $xa = 0; $ya = 1;
|
||||
}
|
||||
if ( $stop < ($i+1)*(M_PI/2) && $y <= $yStop ) {
|
||||
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
||||
$x1 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*($y)+$ya, $diffColor1);
|
||||
}
|
||||
if ($start > $i*M_PI/2 && $y < $yStart) {
|
||||
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
||||
$x2 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*($y)+$ya, $diffColor2);
|
||||
} else {
|
||||
$x = $a * sqrt( 1 - ($y*$y)/($b*$b) );
|
||||
$error = $x - (int)($x);
|
||||
$x = (int)($x);
|
||||
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
||||
$x1 = $x; if ($y < $aaAngleY && $y <= $yStop ) imageSetPixel($img, $cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($seg == 1 || $seg == 3)
|
||||
{
|
||||
$i = $seg;
|
||||
if (!($stop < ($i+1)*M_PI/2 && $y > $yStart)) {
|
||||
if ($i == 1) {
|
||||
$xp = -1; $yp = -1; $xa = 0; $ya = 0;
|
||||
} else {
|
||||
$xp = +1; $yp = +1; $xa = 1; $ya = 1;
|
||||
}
|
||||
if ( $start > $i*M_PI/2 && $y < $yStart ) {
|
||||
$diffColor2 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error2 );
|
||||
$x1 = $_x2; if (!$aaStartX) imageSetPixel($img, $cx+$xp*($x1-1)+$xa, $cy+$yp*$y+$ya, $diffColor2);
|
||||
}
|
||||
if ($stop < ($i+1)*M_PI/2 && $y <= $yStop) {
|
||||
$diffColor1 = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error1 );
|
||||
$x2 = $_x1; if (!$aaStopX) imageSetPixel($img, $cx+$xp*($x2+1)+$xa, $cy+$yp*$y+$ya, $diffColor1);
|
||||
} else {
|
||||
$x = $a * sqrt( 1 - ($y*$y)/($b*$b) );
|
||||
$error = $x - (int)($x);
|
||||
$x = (int)($x);
|
||||
$diffColor = imageColorExactAlpha( $img, $color[0], $color[1], $color[2], 127-(127-$color[3])*$error );
|
||||
$x1 = $x; if ($y < $aaAngleY && $y < $yStart) imageSetPixel($img,$cx+$xp*($x1+1)+$xa, $cy+$yp*$y+$ya, $diffColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function imageSmoothArc ( &$img, $cx, $cy, $w, $h, $color, $start, $stop)
|
||||
{
|
||||
// Originally written from scratch by Ulrich Mierendorff, 06/2006
|
||||
// Rewritten and improved, 04/2007, 07/2007
|
||||
// compared to old version:
|
||||
// + Support for transparency added
|
||||
// + Improved quality of edges & antialiasing
|
||||
|
||||
// note: This function does not represent the fastest way to draw elliptical
|
||||
// arcs. It was written without reading any papers on that subject. Better
|
||||
// algorithms may be twice as fast or even more.
|
||||
|
||||
// what it cannot do: It does not support outlined arcs, only filled
|
||||
|
||||
// Parameters:
|
||||
// $cx - Center of ellipse, X-coord
|
||||
// $cy - Center of ellipse, Y-coord
|
||||
// $w - Width of ellipse ($w >= 2)
|
||||
// $h - Height of ellipse ($h >= 2 )
|
||||
// $color - Color of ellipse as a four component array with RGBA
|
||||
// $start - Starting angle of the arc, no limited range!
|
||||
// $stop - Stop angle of the arc, no limited range!
|
||||
// $start _can_ be greater than $stop!
|
||||
// If any value is not in the given range, results are undefined!
|
||||
|
||||
// This script does not use any special algorithms, everything is completely
|
||||
// written from scratch; see http://de.wikipedia.org/wiki/Ellipse for formulas.
|
||||
|
||||
while ($start < 0)
|
||||
$start += 2*M_PI;
|
||||
while ($stop < 0)
|
||||
$stop += 2*M_PI;
|
||||
|
||||
while ($start > 2*M_PI)
|
||||
$start -= 2*M_PI;
|
||||
|
||||
while ($stop > 2*M_PI)
|
||||
$stop -= 2*M_PI;
|
||||
|
||||
|
||||
if ($start > $stop)
|
||||
{
|
||||
imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, $start, 2*M_PI);
|
||||
imageSmoothArc ( $img, $cx, $cy, $w, $h, $color, 0, $stop);
|
||||
return;
|
||||
}
|
||||
|
||||
$a = 1.0*round ($w/2);
|
||||
$b = 1.0*round ($h/2);
|
||||
$cx = 1.0*round ($cx);
|
||||
$cy = 1.0*round ($cy);
|
||||
|
||||
$aaAngle = atan(($b*$b)/($a*$a)*tan(0.25*M_PI));
|
||||
$aaAngleX = $a*cos($aaAngle);
|
||||
$aaAngleY = $b*sin($aaAngle);
|
||||
|
||||
$a -= 0.5; // looks better...
|
||||
$b -= 0.5;
|
||||
|
||||
for ($i=0; $i<4;$i++)
|
||||
{
|
||||
if ($start < ($i+1)*M_PI/2)
|
||||
{
|
||||
if ($start > $i*M_PI/2)
|
||||
{
|
||||
if ($stop > ($i+1)*M_PI/2)
|
||||
{
|
||||
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY , $color, $start, ($i+1)*M_PI/2, $i);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($stop > ($i+1)*M_PI/2)
|
||||
{
|
||||
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, ($i+1)*M_PI/2, $i);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageSmoothArcDrawSegment($img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $i*M_PI/2, $stop, $i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,105 +0,0 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_BEVELS.INC
|
||||
// Description: Base64 encoded images for round bevels
|
||||
// Created: 2003-03-20
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: imgdata_bevels.inc,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_Bevels extends ImgData {
|
||||
var $name = 'Round Bevels';
|
||||
var $an = array(MARK_IMG_BEVEL => 'imgdata');
|
||||
|
||||
var $colors = array('green','purple','orange','red','yellow');
|
||||
var $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3);
|
||||
var $maxidx = 4 ;
|
||||
|
||||
var $imgdata ;
|
||||
|
||||
function ImgData_Bevels() {
|
||||
//==========================================================
|
||||
// File: bullets_balls_red_013.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 337 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'.
|
||||
'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'.
|
||||
'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'.
|
||||
'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'.
|
||||
'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'.
|
||||
'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_green_013.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 344 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'.
|
||||
'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'.
|
||||
'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'.
|
||||
'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'.
|
||||
'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'.
|
||||
'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'.
|
||||
'VORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_oy_035.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 341 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'.
|
||||
'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'.
|
||||
'+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'.
|
||||
'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'.
|
||||
'5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'.
|
||||
'9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'.
|
||||
'5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_oy_036.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 340 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'.
|
||||
'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'.
|
||||
'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'.
|
||||
'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'.
|
||||
'4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'.
|
||||
'7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'.
|
||||
'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_pp_019.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 334 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'.
|
||||
'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'.
|
||||
'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'.
|
||||
'5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'.
|
||||
'4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'.
|
||||
'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_BEVELS.INC
|
||||
// Description: Base64 encoded images for round bevels
|
||||
// Created: 2003-03-20
|
||||
// Ver: $Id: imgdata_bevels.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_Bevels extends ImgData {
|
||||
protected $name = 'Round Bevels';
|
||||
protected $an = array(MARK_IMG_BEVEL => 'imgdata');
|
||||
|
||||
protected $colors = array('green','purple','orange','red','yellow');
|
||||
protected $index = array('green'=>1,'purple'=>4,'orange'=>2,'red'=>0,'yellow'=>3);
|
||||
protected $maxidx = 4 ;
|
||||
|
||||
protected $imgdata ;
|
||||
|
||||
function __construct() {
|
||||
//==========================================================
|
||||
// File: bullets_balls_red_013.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 337 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/f3+LFwcmNxMuxm62DmqKth1VpZmIWg6fv'.
|
||||
'HCa7K0BwMEytCjFnIyUlEBg9vhQvAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNhk+pYJVAAAAl0lEQVR4nE2Q2xLDIAgFHUWBKJf//9'.
|
||||
'oekmbafVDZARRbK/pYTKP9WNcNv64zzUdd9BjmrgnsVXRNSzO3'.
|
||||
'CJ5ahdhy0XKQkxld1kxb45j7dp0x2lBNOyVgQpMaoadX7Hs7zr'.
|
||||
'P1yKj47DKBnKaBKiSAkNss7O6PkMx6kIgYXISQJpcZCqdY6KR+'.
|
||||
'J1PkS5Xob/h7MNz8x6D3fz5DKQjpkZOBYAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_green_013.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 344 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/e3+K3vriUub/Dm18j4xc3ob10k0ItqQlU'.
|
||||
'e5JBmwpxY1ENaKBgUh0iHgwsSre9AAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNTfJXtxZAAAAnklEQVR4nE2QWY4EMQhDUVhSIRC4/2'.
|
||||
'kbaqLp9p+f2AxAayAzDfiK9znPORuvH0x8Ss9z6I9sHp6tcxE9'.
|
||||
'nLmWmebmt5F5p2AR0+C9AWpLBjXRaZsCAT3SqklVp0YkAWaGtd'.
|
||||
'c5Z41/STYpPzW7BjyiRrwkVmQto/Cw9tNEMvsgcekyCyFPboIu'.
|
||||
'IsuXiKffYB4NK4r/h6d4g9HPPwCR7i8+GscIiiaonUAAAAAASU'.
|
||||
'VORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_oy_035.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 341 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/f3+K5tbqNwcjnkjXjbxR2i5anfEoNkbis'.
|
||||
'PBxpU0sZbZejKgdqIRIlERIwYtkYAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNgK0wEu5AAAAm0lEQVR4nE3QVxIEIQgEUErAgTHA/U'.
|
||||
'+7zbipf9RXgoGo0liMmX6RdSPLPtZM9F4LuuSIaZtZWffiU6Iz'.
|
||||
'Y8SOMF0NogBj30ioGRGLZgiPvce1TbIRz6oBQEbOFGK0rIoxrn'.
|
||||
'5hDomMA1cfGRCaRVhjS3gkzheM+4HtnlkXcvdZhWG4qZawewe6'.
|
||||
'9Jnz/TKLB/ML6HUepn//QczazuwFO/0Ivpolhi4AAAAASUVORK'.
|
||||
'5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_oy_036.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 340 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////////27t/e3+LO3hfYzz65ubiNwci6uQ12ipadgVGa'.
|
||||
'fwsNkbhnVkcaZ5dwSA8lFg7CEepmAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxEAAAsRAX9kX5EAAAAHdElN'.
|
||||
'RQfTAxcCBySi1nevAAAAjElEQVR4nFXPWw7EIAgFUNMoCMhj/6'.
|
||||
'staKczc/2RkwjS2glQ+w3YytgXCXCZpRo8gJdGxZadJws13CUP'.
|
||||
'4SZI4MYiUxypeiGGw1XShVBTNN9kLXP2GRrZPFvKgd7z/sqGGV'.
|
||||
'7C7r7r3l09alYN3iA8Yn+ImdVrNoEeSRqJPAaHfhZzLYwXstdZ'.
|
||||
'rP3n2bvdAI4INwtihiwAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bullets_balls_pp_019.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 334 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAMAAAAMs7fIAAAAM1'.
|
||||
'BMVEX////+/v7i4eO/w8eHxcvKroNVormtfkjrMN2BeXQrepPc'.
|
||||
'Esy4IL+OFaR7F25LHF8mFRh5XXtUAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAxcBNgkjEpIxAAAAlElEQVR4nE2QAQ7FIAhDDTAVndL7n3'.
|
||||
'ZV/7JfEwMvFIWUlkTMVNInbVv5ZeJqG7Smh2QTBwJBpsdizAZP'.
|
||||
'5NyW0awhK8kYodnZxS6ECvPRp2sI+y7PBv1mN02KH7h77QCJ8D'.
|
||||
'4VvY5NUgEmCwj6ZMzHtJRgRSXwC1gfcqJJH0GBnSnK1kUQ72DY'.
|
||||
'CPBv+MCS/e0jib77eQAJxwiEWm7hFwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
@ -1,178 +0,0 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_DIAMONDS.INC
|
||||
// Description: Base64 encoded images for diamonds
|
||||
// Created: 2003-03-20
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: imgdata_diamonds.inc,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_Diamonds extends ImgData {
|
||||
var $name = 'Diamonds';
|
||||
var $an = array(MARK_IMG_DIAMOND =>'imgdata');
|
||||
var $colors = array('lightblue','darkblue','gray',
|
||||
'blue','pink','purple','red','yellow');
|
||||
var $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6,
|
||||
'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3);
|
||||
|
||||
var $maxidx = 7 ;
|
||||
var $imgdata ;
|
||||
|
||||
function ImgData_Diamonds() {
|
||||
//==========================================================
|
||||
// File: diam_red.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 668 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
||||
'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'.
|
||||
'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'.
|
||||
'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'.
|
||||
'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'.
|
||||
'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'.
|
||||
'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'.
|
||||
'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'.
|
||||
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
||||
'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'.
|
||||
'1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'.
|
||||
'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'.
|
||||
'/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'.
|
||||
'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'.
|
||||
'+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'.
|
||||
'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'.
|
||||
'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'.
|
||||
'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 262 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 662 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'.
|
||||
'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'.
|
||||
'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'.
|
||||
'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'.
|
||||
'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'.
|
||||
'/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'.
|
||||
'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'.
|
||||
'9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'.
|
||||
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
||||
'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'.
|
||||
'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'.
|
||||
'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'.
|
||||
'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'.
|
||||
'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'.
|
||||
'6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'.
|
||||
'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'.
|
||||
'5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'.
|
||||
'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_yellow.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 262 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_lightblue.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 671 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'.
|
||||
'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'.
|
||||
'//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'.
|
||||
'8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'.
|
||||
'//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'.
|
||||
'8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'.
|
||||
'1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'.
|
||||
'+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'.
|
||||
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
||||
'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'.
|
||||
'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'.
|
||||
'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'.
|
||||
'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'.
|
||||
'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'.
|
||||
'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'.
|
||||
'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'.
|
||||
'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'.
|
||||
'7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_purple.png
|
||||
//==========================================================
|
||||
$this->imgdata[5][0]= 657 ;
|
||||
$this->imgdata[5][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
||||
'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'.
|
||||
'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'.
|
||||
'+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'.
|
||||
'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'.
|
||||
'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'.
|
||||
'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'.
|
||||
'/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'.
|
||||
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
||||
'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'.
|
||||
'1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'.
|
||||
'+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'.
|
||||
'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'.
|
||||
'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'.
|
||||
'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'.
|
||||
'25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'.
|
||||
'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'.
|
||||
'EdF1ECWW1SAAAAAElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_gray.png
|
||||
//==========================================================
|
||||
$this->imgdata[6][0]= 262 ;
|
||||
$this->imgdata[6][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_blgr.png
|
||||
//==========================================================
|
||||
$this->imgdata[7][0]= 262 ;
|
||||
$this->imgdata[7][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,177 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_DIAMONDS.INC
|
||||
// Description: Base64 encoded images for diamonds
|
||||
// Created: 2003-03-20
|
||||
// Ver: $Id: imgdata_diamonds.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_Diamonds extends ImgData {
|
||||
protected $name = 'Diamonds';
|
||||
protected $an = array(MARK_IMG_DIAMOND =>'imgdata');
|
||||
protected $colors = array('lightblue','darkblue','gray',
|
||||
'blue','pink','purple','red','yellow');
|
||||
protected $index = array('lightblue' =>7,'darkblue'=>2,'gray'=>6,
|
||||
'blue'=>4,'pink'=>1,'purple'=>5,'red'=>0,'yellow'=>3);
|
||||
|
||||
protected $maxidx = 7 ;
|
||||
protected $imgdata ;
|
||||
|
||||
function __construct() {
|
||||
//==========================================================
|
||||
// File: diam_red.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 668 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
||||
'BMVEX///////+cAAD/AADOAABjAABrAADWGBjOCAj/CAj/GBj/'.
|
||||
'EBCcCAiMOTl7KSl7ISFzGBilGBjOEBBrCAjv5+eMQkK1QkKtMT'.
|
||||
'GtKSnWKSn/KSlzEBCcEBDexsb/tbXOe3ucWlqcUlKUSkr/e3vn'.
|
||||
'a2u9UlL/a2uEMTHeUlLeSkqtOTn/UlL/SkrWOTn/QkL/OTmlIS'.
|
||||
'H/MTH/ISH39/f/9/f35+fezs7/5+fvzs7WtbXOra3nvb3/zs7G'.
|
||||
'nJzvtbXGlJTepaW9jIy1hITWlJS1e3uta2ulY2P/lJTnhITne3'.
|
||||
'vGY2O9Wlr/c3PeY2O1Skr/Y2P/WlreQkLWISGlEBCglEUaAAAA'.
|
||||
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
||||
'sSAdLdfvwAAAAHdElNRQfTAwsWEw5WI4qnAAABGUlEQVR4nHXQ'.
|
||||
'1XLDMBAFUKUCM1NiO8zcpIxpp8z0//9SWY7b2LHv6EU6s1qtAN'.
|
||||
'iMBAojLPkigpJvogKC4pxDuQipjanlICXof1RQDkYEF21mKIfg'.
|
||||
'/GGKtjAmOKt9oSyuCU7OhyiDCQnjowGfRnooCJIkiWJvv8NxnG'.
|
||||
'nyNAwFcekvZpPP3mu7Vrp8fOq8DYbTyjdnAvBj7Jbd7nP95urs'.
|
||||
'+MC2D6unF+Cu0VJULQBAlsOQuueN3Hrp2nGUvqppemBZ0aU7Se'.
|
||||
'SXvYZFMKaLJn7MH3btJmZEMEmGSOreqy0SI/4ffo3uiUOYEACy'.
|
||||
'OFopmNWlP5uZd9uPWmUoxvK9ilO9NtBo6mS7KkZD0fOJYqgGBU'.
|
||||
'S/T7OKCAA9tfsFOicXcbxt29cAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 262 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX///+AgID/M5n/Zpn/zMz/mZn1xELhAAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWEi3tX8qUAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 662 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA+V'.
|
||||
'BMVEX///+AgIAAAJwAAP8AAM4AAGMAAGsQEP8YGHMQEHMYGP8Q'.
|
||||
'EKUICJwICM5KSpQxMYQpKXsYGNYQEM4ICGsICP97e85aWpw5OY'.
|
||||
'xSUv85ObVCQt4xMa0pKa0hIaUpKf+9vd6EhLVra+dzc/9SUr1r'.
|
||||
'a/9aWt5SUt5CQrVaWv9KSv8hIXs5Of8xMf8pKdYhIdYYGKUhIf'.
|
||||
'/Ozs739//v7/fn5+/v7//n5/fW1ufOzufOzu/W1v+trc69veel'.
|
||||
'pc6trd6UlMa9vf+MjL21tfe1tf+UlNZzc61ra6Wlpf+EhOeMjP'.
|
||||
'9ra8ZSUpyEhP9CQoxKSrVCQv85Od4xMdYQENZnJhlWAAAAAXRS'.
|
||||
'TlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAd'.
|
||||
'LdfvwAAAAHdElNRQfTAwsWEx3Snct5AAABFklEQVR4nHXR5XbD'.
|
||||
'IBgGYM6AuHsaqbvOfeuknev9X8xISbplSd5/8JyXwwcA/I0AKm'.
|
||||
'PFchVBdvKNKggKQx2VIoRwMZihMiQE49YUlWBCcPL0hYq4ITh+'.
|
||||
'qKECUoLDZWqoQNA766F/mJHlHXblPJJNiyURhM5eU9cNw5BlmS'.
|
||||
'IrLOLxhzfotF7vwO2j3ez2ap/TmW4AIM7DoN9+tu+vLk6Pdg9O'.
|
||||
'6ufXjfXLm6pxPACSJIpRFAa+/26DhuK6qjbiON40k0N3skjOvm'.
|
||||
'NijBmchF5mi+1jhQqDmWyIzPp1hUlrv8On5l+6mMm1tigFNyrt'.
|
||||
'5R97g+FKKyGKkTNKesXPJTZXOFIrUoKiypcTQVHjK4g8H2dWEQ'.
|
||||
'B8bvUDLSQXSr41rmEAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_yellow.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 262 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX///+AgIBmMwCZZgD/zADMmQD/QLMZAAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWEwcv/zIDAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_lightblue.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 671 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/1'.
|
||||
'BMVEX///+AgIAAnP8A//8Azv8AY/8Aa/8I//8Y1v8Izv8Y//8Q'.
|
||||
'//8InP8Qzv8Ypf85jP8he/8Yc/8Ia/8pe/8p//8p1v9Ctf8xrf'.
|
||||
'8prf8QnP8Qc/9CjP+1//97//9r//9S//9K//9C//85//8x//8h'.
|
||||
'//9r5/9K3v9S3v851v97zv9Svf85rf8hpf/G3v9SnP9anP9KlP'.
|
||||
'8xhP/n7//v7+f3///n///O//+U//9z//9j//9a//975/9C3v8h'.
|
||||
'1v+E5/+17/9j3v/O7//n9/+95/+l3v9jxv+U1v8Qpf9avf9Ktf'.
|
||||
'+Uxv+11v97tf9rrf+cxv+Mvf9jpf+tzv+Etf/O3v/39/8Akkxr'.
|
||||
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
||||
'IAAAsSAdLdfvwAAAAHdElNRQfTAwsWEiHk6Ya/AAABGUlEQVR4'.
|
||||
'nHXQ13KDMBAF0J2o0E01GHDvJa7p3em95/+/JQJMYjDc0Yt0Zr'.
|
||||
'VaAaxHgtxwbSGPkGQpOIeQ2ORxJiJmNWYZyAhZR0WcgQGhViU0'.
|
||||
'nEGoedDHGxgRapRPcRpXhOr7XZzCmLjaXk9IIjvkOEmSRLG62+'.
|
||||
'F5XlEElhA5sW21GvXj6mGlDBfnJ51lr9svnvEKwH1hu2QPbwd3'.
|
||||
'N9eXVzuL7/Hn29frdKaamgcgy67L3HFG9gDefV+dm5qme4YRXL'.
|
||||
'oVR374mRqUELZYosf84XAxISFRQuMh4rrH8YxGSP6HX6H97NNQ'.
|
||||
'KEAaR08qCeuSnx2a8zIPWqUowtKHSRK91rAw0elmVYQFVc8mhq'.
|
||||
'7p5RD7Ps3IIwA9sfsFxFUX6eZ4Zh4AAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_purple.png
|
||||
//==========================================================
|
||||
$this->imgdata[5][0]= 657 ;
|
||||
$this->imgdata[5][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbCAMAAAC6CgRnAAAA/F'.
|
||||
'BMVEX///////8xAP/OAP+cAP9jAP9rAP+cCP85CP/OEP9SKf/O'.
|
||||
'CP9CEP9zGP9rCP+lGP/WOf/WIf9KIf9jOf+MQv+EMf97If9zEP'.
|
||||
'+1Sv+lIf/ne//eUv/na//n5//Oxv/Wzv+chP9zUv97Wv9rQv9a'.
|
||||
'Mf9KGP/v5/+te/97Kf+9Y/+tOf+tKf+lEP/vtf/WMf/WKf/v7+'.
|
||||
'f39/+tnP+9rf9rSv9jQv9CGP+ljP+EY//Gtf+tlP+Ma/9zSv/e'.
|
||||
'zv+UUv+9lP+cWv+lY/+cUv+MOf+EKf+UQv/Opf/OhP/Ga/+1Qv'.
|
||||
'/Oe/+9Uv/ntf/eWv/eSv/WGP/3zv/vlP/WEP//9/+pL4oHAAAA'.
|
||||
'AXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAA'.
|
||||
'sSAdLdfvwAAAAHdElNRQfTAwsWEjX+M1LCAAABDklEQVR4nHXQ'.
|
||||
'1bLDIBAGYFqIEW+ksbr7cXd3ff93OUCamdOE/Mxw882yywLwPz'.
|
||||
'+gNKotlRFUVnNUQlCxTMRFCKEdE+MgpJaEiIOU4DKaoSIygtb3'.
|
||||
'FBUQrm3xjPK4JvXjK0A5hFniYSBtIilQVYUm+X0KTVNiYah+2q'.
|
||||
'ulFb8nUbSovD2+TCavwXQWmnMA6ro+di+uR5cPzfPhVqPV3N1p'.
|
||||
'n3b3+rimAWAYhP3xnXd7P6oc9vadPsa1wYEs00dFQRAFehlX21'.
|
||||
'25Sg9NOgwF5jeNTjVL9om0TjDc1lmeCKZ17nFPzhPtSRt6J06R'.
|
||||
'WKUoeG3MoXRa/wjLHGLodwZcotPqjsYngnWslRBZH91hWTbpD2'.
|
||||
'EdF1ECWW1SAAAAAElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_gray.png
|
||||
//==========================================================
|
||||
$this->imgdata[6][0]= 262 ;
|
||||
$this->imgdata[6][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX//////wAzMzNmZmbMzMyZmZlq4Qo5AAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWExZFTxLxAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: diam_blgr.png
|
||||
//==========================================================
|
||||
$this->imgdata[7][0]= 262 ;
|
||||
$this->imgdata[7][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABsAAAAbBAMAAAB/+ulmAAAAEl'.
|
||||
'BMVEX///+AgIBmzP9m///M//+Z//8hMmBVAAAAAXRSTlMAQObY'.
|
||||
'ZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAA'.
|
||||
'AHdElNRQfTAwsWEwCxm6egAAAAbUlEQVR4nFXJwQ3AMAhDUdRm'.
|
||||
'kKojuCswABf2X6UEEiC+WF+PyDfoGEuvwXogq3Rk1Y6W0tBSG8'.
|
||||
'6Uwpla6CmJnpoYKRsjjb/Y63vo9kIkLcZCCsbGYGwMRqIzEp1R'.
|
||||
'OBmFk9HQGA2N0ZEIz5HX+h/jailYpfz4dAAAAABJRU5ErkJggg'.
|
||||
'==' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,518 +0,0 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_PUSHPINS.INC
|
||||
// Description: Base64 encoded images for pushpins
|
||||
// Created: 2003-03-20
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: imgdata_pushpins.inc,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_PushPins extends ImgData {
|
||||
var $name = 'Push pins';
|
||||
var $an = array(MARK_IMG_PUSHPIN => 'imgdata_small',
|
||||
MARK_IMG_SPUSHPIN => 'imgdata_small',
|
||||
MARK_IMG_LPUSHPIN => 'imgdata_large');
|
||||
|
||||
var $colors = array('blue','green','orange','pink','red');
|
||||
var $index = array('red' => 0, 'orange' => 1, 'pink' => 2, 'blue' => 3, 'green' => 4 ) ;
|
||||
var $maxidx = 4 ;
|
||||
var $imgdata_large, $imgdata_small ;
|
||||
|
||||
function ImgData_PushPins() {
|
||||
|
||||
// The anchor should be where the needle "hits" the paper
|
||||
// (bottom left corner)
|
||||
$this->anchor_x = 0;
|
||||
$this->anchor_y = 1;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_red.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[0][0]= 2490 ;
|
||||
$this->imgdata_large[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMKBh4Ryh89CgAACUdJREFUeJy9mNtTFFcexz+/7p'.
|
||||
'4Lw1wZJKDGCAwmDAqUySamcCq1ed6k9mn3UfMP7F+1T3nYqn2J'.
|
||||
'lZdoDEjpbq0KG8EBFBFBEJye6Zmenkv32Ydu5GYiUMmeqq6uqT'.
|
||||
'6Xz3zP73aOcIKmAQkIFyD3N/jrBPwlKjLQEglVlJKyUjR3u7cc'.
|
||||
'WLoP3/4dvv03LNrQ8I6x1rFbDML9kOmHvh7IRHU9JKmUSG8vpF'.
|
||||
'IoXX/TV0AiEM5A5jT0noFMFMJHXUt/d5f9TUAbhtQ3cPFruDog'.
|
||||
'8klHMnmO0dGYe/myOJGINEwTz3F2higFXgy8PpAkOC+h8hoaCt'.
|
||||
'4ppHFcQAWSgOQlyI/p+lUjmRxWAwNJd3xca/f34yoFi4tgmjtD'.
|
||||
'NIFkJ4xcgBCgVqEBFJ9DqcZea/gNAAVEg7AOGYnHe9XoaJd3+X'.
|
||||
'LISSSwnz6lsbKCZ9sHh4UVdBkwdA6cPwNnIfJPmC3Ctgft3wwQ'.
|
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==========================================================
|
||||
// File: ppl_orange.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[1][0]= 2753 ;
|
||||
$this->imgdata_large[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFQ0VCkHCzQAACk5JREFUeJytmGtzG0d2hp8zNw'.
|
||||
'AEcRdJ6EJK9FL0CqZUm9jWbkwq3vhDstl8dmLvz8rP2H8Q75ZT'.
|
||||
'pkRfpLgqsS6WIFEKGYkiSBCDO+banQ8DUpRWEkklXQUUqlCDfv'.
|
||||
'rp857pgfAOQ4AMOJdg4R/hX96Hf06bvDc5iT07i8yeg8ksiIAI'.
|
||||
'4TBi/ds9/vivD/njapNHvRBfHXMu410AM+BUoVSF05NQsi1sO4'.
|
||||
'8402AXwLQTuP31OAZO2aG0MEn14iSlnI1z3LnMk8IZYJyBwjIs'.
|
||||
'/TWsVIWPJkvMFS4zMfMhUp5BsoCpAAEBLYKaMFGn00jBxnvu02'.
|
||||
'35+JHmSJEnBpQEcPo38MmCxd/nS9Ry71Ga/g1W9a8gn0GsHkgA'.
|
||||
'6DGjxkqb5CoO+YxF3A3p+jGjQUzoK+L/V0ADzFMwtSR8eLbAr8'.
|
||||
'uXOTf9NzhTc0geSLUQcYHgYEH786RMg0zWJHV2Aitv4x/HpHVS'.
|
||||
'QA2YBqTTGIUq5qkPMWaWkVwPnPtAA/BevmZcjxaaUtHh8pJJGu'.
|
||||
'DpCB9FvT7A7YT7S3p5vFMNzmWo/O0MSx/Ms3TqI8r59zFTfUQe'.
|
||||
'I7SBODE3tnfoIxYnNHligwik0zAzDdVpyKbA8sff5YAeMEwgkV'.
|
||||
'cufQeTJzZoCsaFLKXPTnNpoUTNsSgJmNoGsuNQjIDwYD2HlnZy'.
|
||||
'k++yxTKXZfKTU8zOpjhneeQYkorSm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ezZszemWAE9rfUdYBOwtVLRbrPZ+48ff+wDvuu6Sr3MB4Dr'.
|
||||
'uty6desgfa1WC3iRyrNnz4pSSmezWUzTfGtYtNYcdvC/9sMlgP'.
|
||||
'n5N4cAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[2][0]= 2779 ;
|
||||
$this->imgdata_large[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFQolY9lkpgAACmhJREFUeJy9mOtzFNl5h5+3b9'.
|
||||
'Mz0kzPBWmEVtIiWYhIiC0HCDhB8lb8ISk7nzdZ5+/zJ/8BTmpT'.
|
||||
'660CZLwG1pVFgBkgGIHECEaa+/T9nHzQCCQuRpCNz6mp6g893U'.
|
||||
'8/c37ve3qEjxiC4OA4n/Lp/EUu/tsMM/+aEWduVBx7WhdkShcY'.
|
||||
'xUH2zo0Dwod/5N6vf8V//PoGdx8M8EOFPtK9jI8BdHCcMuVSmf'.
|
||||
'LxHLmSZdm2U8xIbmKETDGDZZnIy4dBbCynyGhphurEDBOlHFnn'.
|
||||
'qPcyPxTOwDCOccw7w5nlBRZWylI+ny/mZ6rL1dzUZ5/IWGZU3D'.
|
||||
'ZIOMQDDaJcHDVGWUbJBi9odVr0QoVSPzigIEaZ8vgSS/8wZU3/'.
|
||||
'k1fylipz5dLM2WlrZqHKaGCKbEbontq3KAKWQyZfZKTgYqc9Bp'.
|
||||
'2I2PcJ4ogk/UEBQcwipbFZmT13vDBx8fhnE1Ofnp9yJopFyT3X'.
|
||||
'yANfks0QHSQMDaL37pOxMLIu2UyVkjVKLjyKSeuD8dAYCFkso1'.
|
||||
'gYMaeWJ40T56cl8yAi/O4FSa2P6kYczIDsgVpAqcDImZPMuAB1'.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
'+61EK1QUEnbbtN+9Bh3Hsebn54u//PdfLq9eWl2ZnZ1dSnaSwu'.
|
||||
'Pin40b9g3doKE0WoNIl65xj3v75njd3BBubQi6ExKmDWkMRKSl'.
|
||||
'tSbVKQcMao1Go5Ugb0+x53nOyZMnSysrKydXLq1cWlxa/McgCB'.
|
||||
'Yev3hU+GPrD3I5/q94k3pXYQY58q6B5Bs0HB//neaGx00gyWaz'.
|
||||
'VCoV7bquCoKAnZ0dfN/f03egLGj0m3XQNE1jdnY2/+WXXy6trq'.
|
||||
'6uzP3oR5eCIFi4detW5feXL1vr679Let37zVB3/mQytjXJwmSB'.
|
||||
'wikHp9ShY0RESqObwPrr5oBERKhUKly4cIFqtUq9XufmzZtsbW'.
|
||||
'2hXvuDwTTNtxZq8TyvsLy8vLS4uLgahOHphw8elL69fNlc++qr'.
|
||||
'uFOrNXPddm1cczVL5f5P+Lv5MuOJgTGxwYbZpZsCdeAq8M1Bcw'.
|
||||
'CGYeC6LtVqlRMnTjAyMkKn0yGXyx0N0LZt03Ec1zCMSrfXO37v'.
|
||||
'zp3S769csb+/ciXt1mrNdHf3ltZ6Lca8ZpJsduhtCdb2gEFJoQ'.
|
||||
'xADYHuHDS3f32lFEEQUK/XGRkZoVAocP78eZaXl9FaI/Jq25Uk'.
|
||||
'yWHAYrHozM/PlxYWFibTND32sFbLXrtyxVz76qukXas1M61WTW'.
|
||||
'm99gx+20TdN9jqtfjP7QzOwwYNp037Zd0DukDnIByA1pqdnR2+'.
|
||||
'++472u02Z8+eZWJiAsMwDsEBRNGBzYJpmsaJEyfyX3zxxdLS0t'.
|
||||
'KlVqu1dP3q1cLta9ekU6u1dat1J9b6Sk9kraV1rYXegW7apDYw'.
|
||||
'kFY6fPc4MNTw88bwfZ/NzU2UUnieRxAEiAiGcXiXfcigiIjruo'.
|
||||
'VyubxkWdbK7fX1xWvffFMInjzBM82uMT5+p++6V1UUrSe7u03t'.
|
||||
'+8lezlKt3gHyl0aSJDQaDa5fv876+vo+w6FzDq1BpZRsb2/bly'.
|
||||
'9f9vL5/Njdu3fzG0+eMJHNxsfn532vXN5NPG/7abPZal6/Hvfe'.
|
||||
'kroPHfsm98f7AHW9Xo+//vrrlmVZm71+37QNw3JnZ9PK4uJGpV'.
|
||||
'pt4Dh+vLGhsrmcfv1iHzu01m89HjIdCon2fb8TBMHtvYeRUn50'.
|
||||
'1Oj4vqp3Ok1f5LYSadfr9dQfDN642P/XeF2DA+SBAuA4jkOhUK'.
|
||||
'BQKESO43S11p3BYBDt7u4y+CtB/i/q7jp1GMiw2AAAAABJRU5E'.
|
||||
'rkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[3][0]= 2284 ;
|
||||
$this->imgdata_large[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFRAiTZAL3gAACHlJREFUeJy9mGtv29YZgJ9zKF'.
|
||||
'F3y/Q9jh05tuQkarKgbYasde0UBdZgwNou/Vqga/sD9mP2B4a1'.
|
||||
'BbZ9atFPxb5sqOtmXbI19bqsluPYiR3HN90vFEWRZx/IJI5zqa'.
|
||||
'x0OwBBSgR5Hj7v+55zSEFXTUgIJyA9C6/9RsjMjAyFIxxJCDc7'.
|
||||
'iBqKgyZACGg3G2x9+xXf/fG33P3mC9qNKsp1O+1JdkEnQTdgIO'.
|
||||
'ttCSMUi8gj072MnugllAyB9G8rBGi6RsToJTF6iuRoFi1kHKZf'.
|
||||
'7fB8Iggj0/Dy23D2dakNTR3JDsXPvzstxmZGRMER1EwHhQAEgE'.
|
||||
'CLhIkPD6InY9S3djGLJVBtQP1Qb4HDAyoJYQOOZkPx49nhTH9i'.
|
||||
'7MUBGT7egxkJgd70wZS/CUkoZtA/fRoE1DZ2ACiv52ibReCp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/7DmiApWCjxIMXpYNznYuXM+6TAKWUMppOZzLvv//ery5cuDCT'.
|
||||
'SqVS336bCwr1JfAPB9r+2KAFwJS+OcETzZHz/7v3etl6ipz77X'.
|
||||
'GAMh6PG+l0OjM3NzczOzs3k0pNnFlbW43+e/GKtMqrblSsF03V'.
|
||||
'WHcJA0PjIAzvg9JTze2H67g9DjAwOTmZ+uCDD96anZ2dnZiYmF'.
|
||||
'5dW41++Lvfa1fnr7qllVK9103mXNTnJgPA+YugsvB3HTaEl+Qs'.
|
||||
'AZ/yeHPPDCiTyaRx5syZbGoilV1dW00szC9oV+avusuLy0Xd0X'.
|
||||
'MgFkDM+zkYBZEHV8f7wwKu84zmngQoNU0LaZoWUa4K31y5qX/8'.
|
||||
'4cfyyvwVN5/L10NOKNeg8UmDxoKF5Vfj1xXAgD0JrgAcvBDfel'.
|
||||
'a4g4AykUgY6XR6emJiIru2ttZXq9S0K19eUcuLy8WQE8o5OAsN'.
|
||||
'Ggsmpl+NpoL1g9X4UBU+C9xDgEKIwNTUVOqdd955M9mbnJ3/cj'.
|
||||
'6Vu5aTheXCQXNdVeMzAwJSCGEA2XKpnF1cXIzlFnOVhJPIKdR+'.
|
||||
'c88ctq4AlVKsrKzw0UcfKcC5uXqzXnNqSzb2pwLxOHP/l7Z/BN'.
|
||||
'eB01LKt4HTrusKvGr8jB+hGn8MQAkYQMrfw4Nq/MFPtf+rdvDb'.
|
||||
'k8QL+/5Z4Uepxm7bfwHuTAVUWpWaqAAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_green.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[4][0]= 2854 ;
|
||||
$this->imgdata_large[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFQ4hANhluwAACrNJREFU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VfszuFqdHXgAAAABJRU5E'.
|
||||
'rkJggg==' ;
|
||||
|
||||
|
||||
//==========================================================
|
||||
// File: pp_red.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[0][0]= 384 ;
|
||||
$this->imgdata_small[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhouFobZrQAAAQ1JREFUeJyV1dFtwyAQBuD/og'.
|
||||
'xQdYxa8gRY6hJ0jK6QdohMkTEuE5wUj5ERen05IoLvID7Jkn2G'.
|
||||
'j8MgTMyMXqRlUQBYq9ydmaL2h1cwqD7l30t+L1iwlbYFRegY7I'.
|
||||
'SHjkEifGg4ww3aBa/l4+9AhxWWr/dLhEunXUGHq6yGniw3QkOw'.
|
||||
'3jJ7UBd82n/VVAlAtvsfp98lAj2sAJOhU4AeQ7DC1ubVBODWDJ'.
|
||||
'TtCsEWa6u5M1NeFs1NzgdtuhHGtj+9Q2IDppQUAL6Cyrlz0gDN'.
|
||||
'ohSMiJCt861672EiAhEhESG3woJ9V9OKTkwRKbdqz4cHmFLSFg'.
|
||||
's69+LvAZKdeZ/n89uLnd2g0S+gjd5g8zzjH5Y/eLLi+NPEAAAA'.
|
||||
'AElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
// File: pp_orange.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[1][0]= 403 ;
|
||||
$this->imgdata_small[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhwAnApz5AAAASBJREFUeJyN1dFthDAMBuDf7S'.
|
||||
'3BCm2VCRKpS4QxbhikW6IewzcBqm6Fm6JyH7iEEByCn5AJH38g'.
|
||||
'BBIRHNUzBAWAGNfe/SrUGv92CtNt309BrfFdMGPjvt9CD8Fyml'.
|
||||
'ZZaDchRgA/59FDMD18pvNoNyHxMnUmgLmPHoJ+CqqfMaNAH22C'.
|
||||
'fgqKRwR+GRpxGjXBEiuXDBWQhTK3plxijyWWvtKVS5KNG1xM8I'.
|
||||
'OBr7geV1WupDqpmTAPKjCqLhxk/z0PImQmjKrAuI6vMXlhFroD'.
|
||||
'vfdqITXWqg2YMSJEAFcReoag6UXU2DzPG8w5t09YYsAyLWvHrL'.
|
||||
'HUy6D3XmvMAAhAay8kAJpBosX4vt0G4+4Jam6s6Rz1fgFG0ncA'.
|
||||
'f3XfOQcA+Acv5IUSdQw9hgAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: pp_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[2][0]= 419 ;
|
||||
$this->imgdata_small[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhsQzvz1RwAAATBJREFUeJyd1MFthDAQheF/oi'.
|
||||
'gF+JYWQKICkCJRA1vGtrDbxFbhGvY0HVjCLeS2BeTiHFgTB2wg'.
|
||||
'eRISstCnmcG2qCpbuXf3ADBQzWsPfZfS9y9HsEu4/Fo33Wf4Fx'.
|
||||
'gxL3a1XkI3wbTNXHLoboVeLFUYDqObYBy+Fw/Uh9DdCmtOwIjF'.
|
||||
'YvG76CZoOhNGRmpO8zz30CJoOhMAqlDxFzQLppgXj2XaNlP7FF'.
|
||||
'GLL7ccMYCBgZERgCvXLBrfi2DEclmiKZwFY4tp6sW26bVfnede'.
|
||||
'e5Hc5dC2bUgrXGKqWrwcXnNYDjmCrcCIiQgDcFYV05kQ8SXmnB'.
|
||||
'NgPiVN06wrTDGAhz5EWY/FOccTk+cTnHM/YNu2YYllgFxCWuUM'.
|
||||
'ikzGx+2Gc+4N+CoJW8n+5a2UKm2aBoBvGA6L7wfl8aoAAAAASU'.
|
||||
'VORK5CYII=' ;
|
||||
|
||||
|
||||
//==========================================================
|
||||
// File: pp_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[3][0]= 883 ;
|
||||
$this->imgdata_small[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAACi1'.
|
||||
'BMVEX///8AAAAAADMAAGYAAJkAAMwAAP8zAAAzADMzAGYzAJkz'.
|
||||
'AMwzAP9mAABmADNmAGZmAJlmAMxmAP+ZAACZADOZAGaZAJmZAM'.
|
||||
'yZAP/MAADMADPMAGbMAJnMAMzMAP//AAD/ADP/AGb/AJn/AMz/'.
|
||||
'AP8AMwAAMzMAM2YAM5kAM8wAM/8zMwAzMzMzM2YzM5kzM8wzM/'.
|
||||
'9mMwBmMzNmM2ZmM5lmM8xmM/+ZMwCZMzOZM2aZM5mZM8yZM//M'.
|
||||
'MwDMMzPMM2bMM5nMM8zMM///MwD/MzP/M2b/M5n/M8z/M/8AZg'.
|
||||
'AAZjMAZmYAZpkAZswAZv8zZgAzZjMzZmYzZpkzZswzZv9mZgBm'.
|
||||
'ZjNmZmZmZplmZsxmZv+ZZgCZZjOZZmaZZpmZZsyZZv/MZgDMZj'.
|
||||
'PMZmbMZpnMZszMZv//ZgD/ZjP/Zmb/Zpn/Zsz/Zv8AmQAAmTMA'.
|
||||
'mWYAmZkAmcwAmf8zmQAzmTMzmWYzmZkzmcwzmf9mmQBmmTNmmW'.
|
||||
'ZmmZlmmcxmmf+ZmQCZmTOZmWaZmZmZmcyZmf/MmQDMmTPMmWbM'.
|
||||
'mZnMmczMmf//mQD/mTP/mWb/mZn/mcz/mf8AzAAAzDMAzGYAzJ'.
|
||||
'kAzMwAzP8zzAAzzDMzzGYzzJkzzMwzzP9mzABmzDNmzGZmzJlm'.
|
||||
'zMxmzP+ZzACZzDOZzGaZzJmZzMyZzP/MzADMzDPMzGbMzJnMzM'.
|
||||
'zMzP//zAD/zDP/zGb/zJn/zMz/zP8A/wAA/zMA/2YA/5kA/8wA'.
|
||||
'//8z/wAz/zMz/2Yz/5kz/8wz//9m/wBm/zNm/2Zm/5lm/8xm//'.
|
||||
'+Z/wCZ/zOZ/2aZ/5mZ/8yZ///M/wDM/zPM/2bM/5nM/8zM////'.
|
||||
'/wD//zP//2b//5n//8z///9jJVUgAAAAAXRSTlMAQObYZgAAAA'.
|
||||
'FiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElN'.
|
||||
'RQfTAwkWGTNerea3AAAAYUlEQVR4nHXNwQ3AIAxDUUfyoROxRZ'.
|
||||
'icARin0EBTIP3Hp1gBRqSqYo0seqjZpnngojlWBir5+b8o06lM'.
|
||||
'ha5uFKEpDZulV8l52axhVzqaCdxQp32qVSSwC1wN3fYiw7b76w'.
|
||||
'bN4SMue4/KbwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: pp_green.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[4][0]= 447 ;
|
||||
$this->imgdata_small[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhkLdq9eKQAAAUxJREFUeJyN1LFVwzAQxvH/8f'.
|
||||
'IeDS0FLKABlN6eIwPYAzCHB0gWYI2jj+i1ABUTQN4TRSQ7iiWZ'.
|
||||
'qxLn9Mt9ydmiqrSq930AYFiu6YdKrf/hP1gYQn6960PxwBaYMG'.
|
||||
'E9UA3dBFtVQjdBOQmBakLennK0CapRwbZRZ3N0O/IeEsqp3HKL'.
|
||||
'Smtt5pUZgTPg4gdDud+6xoS97wM2rsxxmRSoTgoVcMZsXJkBho'.
|
||||
'SmKqCuOuEtls6nmGMFPTUmxBKx/MeyNfQGLoOOiC2ddsxb1Kzv'.
|
||||
'ZzUqu5IXbGDvBJf+hDisi77qFSuhq7Xpuu66TyJLRGbsXVUPxV'.
|
||||
'SxsgkzDMt0mKT3/RcjL8C5hHnvJToXY0xYRZ4xnVKsV/S+a8YA'.
|
||||
'AvCb3s9g13UhYj+TTo93B3fApRV1FVlEAD6H42DjN9/WvzDYuJ'.
|
||||
'dL5b1/ji+/IX8EGWP4AwRii8PdFHTqAAAAAElFTkSuQmCC' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,517 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_PUSHPINS.INC
|
||||
// Description: Base64 encoded images for pushpins
|
||||
// Created: 2003-03-20
|
||||
// Ver: $Id: imgdata_pushpins.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_PushPins extends ImgData {
|
||||
protected $name = 'Push pins';
|
||||
protected $an = array(MARK_IMG_PUSHPIN => 'imgdata_small',
|
||||
MARK_IMG_SPUSHPIN => 'imgdata_small',
|
||||
MARK_IMG_LPUSHPIN => 'imgdata_large');
|
||||
|
||||
protected $colors = array('blue','green','orange','pink','red');
|
||||
protected $index = array('red' => 0, 'orange' => 1, 'pink' => 2, 'blue' => 3, 'green' => 4 ) ;
|
||||
protected $maxidx = 4 ;
|
||||
protected $imgdata_large, $imgdata_small ;
|
||||
|
||||
function __construct() {
|
||||
|
||||
// The anchor should be where the needle "hits" the paper
|
||||
// (bottom left corner)
|
||||
$this->anchor_x = 0;
|
||||
$this->anchor_y = 1;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_red.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[0][0]= 2490 ;
|
||||
$this->imgdata_large[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAA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
'AdBR+9SzkAz/NwHIeXL18iIui6TjgcJplMMjY2th8wHo+Hh4aG'.
|
||||
'MsPDw6fddru7+Phxx51bt/RbN260qwsLpZhlFZsw9QJ+2Pbrga'.
|
||||
'oJG2FY2oKwuTtVEz9uV34NbqdtbW0xPT1NNBoF4MyZM1y5coWu'.
|
||||
'rq5dQBHRcrlc4tq1a/l8Pj9RMs38ndu3Ez//9JNXLRZNyuXZJk'.
|
||||
'xVYKoExQpsK/+IaAuYb7no8zjC/R+A4zisrq7u+53NZjl16tQ+'.
|
||||
'QIlEIslsNpuPRCJXZ2dnh2/duNFRW1oy07a96MKd575yxRqU1B'.
|
||||
'5vPMpF5HHa1tYW9+7do7Ozc/eQpZTSQ6FQt1Lq8pMnT/5w7969'.
|
||||
'nuLcXE1rNufO9fRMhlKpOyvt9qPtVmvb25fFfvvWbrepVCqHwo'.
|
||||
'xaX19vff/996ZhGC8qlkW9Wt1Onz073fXxxz+6MB+9e9dUjuO+'.
|
||||
'7ebq9wLdB9hoNCrr6+s/4wf3FCJW3fPmTZhXsNWCprjuW66Dfr'.
|
||||
'928KAfBhJAEgiJSLuzs7OSTqctoFkqlZRt26j/I+L/AGjPTN4d'.
|
||||
'Nqn4AAAAAElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_orange.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[1][0]= 2753 ;
|
||||
$this->imgdata_large[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFQ0VCkHCzQAACk5JREFUeJytmGtzG0d2hp8zNw'.
|
||||
'AEcRdJ6EJK9FL0CqZUm9jWbkwq3vhDstl8dmLvz8rP2H8Q75ZT'.
|
||||
'pkRfpLgqsS6WIFEKGYkiSBCDO+banQ8DUpRWEkklXQUUqlCDfv'.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OFC7vPPP6/VarXldqdTu7m2lrv7'.
|
||||
'7beq++BBO263b/tKrfWSXlbvwJ6CuAtDgTYiaBFMw6BSqfDxxx'.
|
||||
'+rarWqGo0GN2/eZGtrC6XenAkRoVKpcPXqVWZmZmg0Gty6desF'.
|
||||
'oIhIOp3Ol8vlmmVZK3fv3Lm09uc/Zwbr653ccPgoNIzvnmn99Z'.
|
||||
'7W9QG46lAaM5mM2l95GIYUi0VOnz7N7OwsWmsymQzyuse5Q8Mw'.
|
||||
'DNLpNDMzM5w/f/7A6AGgUkoajYa9urpayOXzUz/fvZutr68Pim'.
|
||||
'F4/2y1+n2o9Q/ru7uPesPhXnyo4A+vfHp6mmazybNnz9jZ2UFr'.
|
||||
'TbPZJAhe+8/aS0Mphed5NBoNABqNBqPR6MWBVWstvu/nnj9/Pv'.
|
||||
'vo0aPq5uZmPBgM/qcwPf39xV/9ajU1M3Nvq9PZaw8GoT50PjdN'.
|
||||
'k6mpKa5cucL58+eJ45j19XWePHnCzs4OnudhmiaWZRGGIVH05r'.
|
||||
'yEYYjrumxubrKxsfFyDQJ6NBp1Pc+7C4jWumBaVm+kVL2l1H2l'.
|
||||
'1G6otS+H6V6z8u3tbVzXpdFooJRicXGRqakptre3uXXr1ltrcT'.
|
||||
'Qa8ezZszemWAE9rfUdYBOwtVLRbrPZ+48ff+wDvuu6Sr3MB4Dr'.
|
||||
'uty6desgfa1WC3iRyrNnz4pSSmezWUzTfGtYtNYcdvC/9sMlgP'.
|
||||
'n5N4cAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[2][0]= 2779 ;
|
||||
$this->imgdata_large[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFQolY9lkpgA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mzZtsbW'.
|
||||
'2hXvuDwTTNtxZq8TyvsLy8vLS4uLgahOHphw8elL69fNlc++qr'.
|
||||
'uFOrNXPddm1cczVL5f5P+Lv5MuOJgTGxwYbZpZsCdeAq8M1Bcw'.
|
||||
'CGYeC6LtVqlRMnTjAyMkKn0yGXyx0N0LZt03Ec1zCMSrfXO37v'.
|
||||
'zp3S769csb+/ciXt1mrNdHf3ltZ6Lca8ZpJsduhtCdb2gEFJoQ'.
|
||||
'xADYHuHDS3f32lFEEQUK/XGRkZoVAocP78eZaXl9FaI/Jq25Uk'.
|
||||
'yWHAYrHozM/PlxYWFibTND32sFbLXrtyxVz76qukXas1M61WTW'.
|
||||
'm99gx+20TdN9jqtfjP7QzOwwYNp037Zd0DukDnIByA1pqdnR2+'.
|
||||
'++472u02Z8+eZWJiAsMwDsEBRNGBzYJpmsaJEyfyX3zxxdLS0t'.
|
||||
'KlVqu1dP3q1cLta9ekU6u1dat1J9b6Sk9kraV1rYXegW7apDYw'.
|
||||
'kFY6fPc4MNTw88bwfZ/NzU2UUnieRxAEiAiGcXiXfcigiIjruo'.
|
||||
'VyubxkWdbK7fX1xWvffFMInjzBM82uMT5+p++6V1UUrSe7u03t'.
|
||||
'+8lezlKt3gHyl0aSJDQaDa5fv876+vo+w6FzDq1BpZRsb2/bly'.
|
||||
'9f9vL5/Njdu3fzG0+eMJHNxsfn532vXN5NPG/7abPZal6/Hvfe'.
|
||||
'kroPHfsm98f7AHW9Xo+//vrrlmVZm71+37QNw3JnZ9PK4uJGpV'.
|
||||
'pt4Dh+vLGhsrmcfv1iHzu01m89HjIdCon2fb8TBMHtvYeRUn50'.
|
||||
'1Oj4vqp3Ok1f5LYSadfr9dQfDN642P/XeF2DA+SBAuA4jkOhUK'.
|
||||
'BQKESO43S11p3BYBDt7u4y+CtB/i/q7jp1GMiw2AAAAABJRU5E'.
|
||||
'rkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[3][0]= 2284 ;
|
||||
$this->imgdata_large[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFRAiTZAL3gAACHlJREFUeJy9mGtv29YZgJ9zKF'.
|
||||
'F3y/Q9jh05tuQkarKgbYasde0UBdZgwNou/Vqga/sD9mP2B4a1'.
|
||||
'BbZ9atFPxb5sqOtmXbI19bqsluPYiR3HN90vFEWRZx/IJI5zqa'.
|
||||
'x0OwBBSgR5Hj7v+55zSEFXTUgIJyA9C6/9RsjMjAyFIxxJCDc7'.
|
||||
'iBqKgyZACGg3G2x9+xXf/fG33P3mC9qNKsp1O+1JdkEnQTdgIO'.
|
||||
'ttCSMUi8gj072MnugllAyB9G8rBGi6RsToJTF6iuRoFi1kHKZf'.
|
||||
'7fB8Iggj0/Dy23D2dakNTR3JDsXPvzstxmZGRMER1EwHhQAEgE'.
|
||||
'CLhIkPD6InY9S3djGLJVBtQP1Qb4HDAyoJYQOOZkPx49nhTH9i'.
|
||||
'7MUBGT7egxkJgd70wZS/CUkoZtA/fRoE1DZ2ACiv52ibReCp4e'.
|
||||
'7CIEHomxDiuVdGTqUnf/ZeOjR8fpiVXZul5ZrY3bWwbdcLr/dA'.
|
||||
'AAIpAwQjUWIjQ+g9HZvswiCgBVF9/SI6OSLGzo0i+oLi6+Utbq'.
|
||||
'+bKEftgwOE/0Ohocf66M+cBjo22U2RQLIHMhmYnvaOpR9S8bSU'.
|
||||
'UqCURGpRkuMZMm9cIvPGJZLj0yBjT2LprkiSkykx9cuXIhOnUs'.
|
||||
'm+QNC2XdG02ggBTcvFabsPWwTPpBAChSCgh4kYBpoeplWp47Qs'.
|
||||
'7EYDt21xINzd5GCAxLExRl89Z+nHjpbKMmjbmkgfDzI0JEW53K'.
|
||||
'Jaa6NcAOEX8v52uJz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4K31y5qX/8'.
|
||||
'4cfyyvwVN5/L10NOKNeg8UmDxoKF5Vfj1xXAgD0JrgAcvBDfel'.
|
||||
'a4g4AykUgY6XR6emJiIru2ttZXq9S0K19eUcuLy8WQE8o5OAsN'.
|
||||
'Ggsmpl+NpoL1g9X4UBU+C9xDgEKIwNTUVOqdd955M9mbnJ3/cj'.
|
||||
'6Vu5aTheXCQXNdVeMzAwJSCGEA2XKpnF1cXIzlFnOVhJPIKdR+'.
|
||||
'c88ctq4AlVKsrKzw0UcfKcC5uXqzXnNqSzb2pwLxOHP/l7Z/BN'.
|
||||
'eB01LKt4HTrusKvGr8jB+hGn8MQAkYQMrfw4Nq/MFPtf+rdvDb'.
|
||||
'k8QL+/5Z4Uepxm7bfwHuTAVUWpWaqAAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: ppl_green.png
|
||||
//==========================================================
|
||||
$this->imgdata_large[4][0]= 2854 ;
|
||||
$this->imgdata_large[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFQ4hANhluwAACrNJREFUeJytmF1zE1eagJ+3u9'.
|
||||
'XdkvUty2AbmLEtEzDBgZ0UpDBOalNTUzU3czl7tct/2n+wt3M/'.
|
||||
'NVM12SSTQQSyW2TA+QAJQogtYYFtyfrqL3WfvWj5g8AEjzfvhS'.
|
||||
'SXjk8//Zz3Pf3qCMcJAWxMKlT4kH+jwu/FknnJSUItKFHzCrKA'.
|
||||
'BggBQx5ziz/wn/yBz3hED4/oaJfSjgVoYjJJgTLTZCjohp7IGT'.
|
||||
'k5aZ4kb+bRTR30Q7djj8f/kpPMUSCFedRL6W8e8qMQNE6S4xpv'.
|
||||
'c5HrTPFubiJ3ZnlyOXV59rJYU5Z00h1c3d0brxAiUkScRijisk'.
|
||||
'6X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WE2XT'.
|
||||
'nrHFzbjh1tYLz3XdPjD4R3BKKba2tqhWq4dzUO3noBPn4H5PKy'.
|
||||
'LaO++8U7hx48byhQsXVne7u6tf3/v64t3P7mbq9+odt+OuaWi3'.
|
||||
'PLxbW2ytubjbQCgiMnt6VlaurWgz0zM0m02q1WrUaDSUUuqI56'.
|
||||
'ivDxE5MCgiYllWtlwuL5mmufLV/a/O/uXPf9Ff1F+80Lv6Yx29'.
|
||||
'2qHzyZBh3cdvc7gaTZuZkzPh/Py8ACqVSv1/uPZDKXUAGEWRtF'.
|
||||
'qtxEcffZTL5XLF+2v39fqjeivshA/TpP83JLwzYFBzcA4370Cc'.
|
||||
'S81nTRBUs9lkOByi1GuOPI4Rh3+26JZlnSkWi781DOPXvV4v3+'.
|
||||
'/2G0R8kSBxB/jew+tERK+c49m2TblcxrZtXNfl+fPneJ6HZVmU'.
|
||||
'y2VJJpNyaJ9TSinlOA5bW1u4rntkQA0oAG8D54gb9W3ianxM3A'.
|
||||
'e/cn73U3Hq1Cm5du2aPjs7a+ztcSIShmE4ajQa6tatWzQajZ+0'.
|
||||
'fbiKI+It4SvijVUj7kL2qvGfgkskEqTTaZmcnDROnTplJhIJTU'.
|
||||
'QiwPd9P/Q8T6XTaQzDIAiCfzjP/wFVfszuFqdHXgAAAABJRU5E'.
|
||||
'rkJggg==' ;
|
||||
|
||||
|
||||
//==========================================================
|
||||
// File: pp_red.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[0][0]= 384 ;
|
||||
$this->imgdata_small[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhouFobZrQAAAQ1JREFUeJyV1dFtwyAQBuD/og'.
|
||||
'xQdYxa8gRY6hJ0jK6QdohMkTEuE5wUj5ERen05IoLvID7Jkn2G'.
|
||||
'j8MgTMyMXqRlUQBYq9ydmaL2h1cwqD7l30t+L1iwlbYFRegY7I'.
|
||||
'SHjkEifGg4ww3aBa/l4+9AhxWWr/dLhEunXUGHq6yGniw3QkOw'.
|
||||
'3jJ7UBd82n/VVAlAtvsfp98lAj2sAJOhU4AeQ7DC1ubVBODWDJ'.
|
||||
'TtCsEWa6u5M1NeFs1NzgdtuhHGtj+9Q2IDppQUAL6Cyrlz0gDN'.
|
||||
'ohSMiJCt861672EiAhEhESG3woJ9V9OKTkwRKbdqz4cHmFLSFg'.
|
||||
's69+LvAZKdeZ/n89uLnd2g0S+gjd5g8zzjH5Y/eLLi+NPEAAAA'.
|
||||
'AElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
// File: pp_orange.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[1][0]= 403 ;
|
||||
$this->imgdata_small[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhwAnApz5AAAASBJREFUeJyN1dFthDAMBuDf7S'.
|
||||
'3BCm2VCRKpS4QxbhikW6IewzcBqm6Fm6JyH7iEEByCn5AJH38g'.
|
||||
'BBIRHNUzBAWAGNfe/SrUGv92CtNt309BrfFdMGPjvt9CD8Fyml'.
|
||||
'ZZaDchRgA/59FDMD18pvNoNyHxMnUmgLmPHoJ+CqqfMaNAH22C'.
|
||||
'fgqKRwR+GRpxGjXBEiuXDBWQhTK3plxijyWWvtKVS5KNG1xM8I'.
|
||||
'OBr7geV1WupDqpmTAPKjCqLhxk/z0PImQmjKrAuI6vMXlhFroD'.
|
||||
'vfdqITXWqg2YMSJEAFcReoag6UXU2DzPG8w5t09YYsAyLWvHrL'.
|
||||
'HUy6D3XmvMAAhAay8kAJpBosX4vt0G4+4Jam6s6Rz1fgFG0ncA'.
|
||||
'f3XfOQcA+Acv5IUSdQw9hgAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: pp_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[2][0]= 419 ;
|
||||
$this->imgdata_small[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhsQzvz1RwAAATBJREFUeJyd1MFthDAQheF/oi'.
|
||||
'gF+JYWQKICkCJRA1vGtrDbxFbhGvY0HVjCLeS2BeTiHFgTB2wg'.
|
||||
'eRISstCnmcG2qCpbuXf3ADBQzWsPfZfS9y9HsEu4/Fo33Wf4Fx'.
|
||||
'gxL3a1XkI3wbTNXHLoboVeLFUYDqObYBy+Fw/Uh9DdCmtOwIjF'.
|
||||
'YvG76CZoOhNGRmpO8zz30CJoOhMAqlDxFzQLppgXj2XaNlP7FF'.
|
||||
'GLL7ccMYCBgZERgCvXLBrfi2DEclmiKZwFY4tp6sW26bVfnede'.
|
||||
'e5Hc5dC2bUgrXGKqWrwcXnNYDjmCrcCIiQgDcFYV05kQ8SXmnB'.
|
||||
'NgPiVN06wrTDGAhz5EWY/FOccTk+cTnHM/YNu2YYllgFxCWuUM'.
|
||||
'ikzGx+2Gc+4N+CoJW8n+5a2UKm2aBoBvGA6L7wfl8aoAAAAASU'.
|
||||
'VORK5CYII=' ;
|
||||
|
||||
|
||||
//==========================================================
|
||||
// File: pp_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[3][0]= 883 ;
|
||||
$this->imgdata_small[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAACi1'.
|
||||
'BMVEX///8AAAAAADMAAGYAAJkAAMwAAP8zAAAzADMzAGYzAJkz'.
|
||||
'AMwzAP9mAABmADNmAGZmAJlmAMxmAP+ZAACZADOZAGaZAJmZAM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R4nHXNwQ3AIAxDUUfyoROxRZ'.
|
||||
'icARin0EBTIP3Hp1gBRqSqYo0seqjZpnngojlWBir5+b8o06lM'.
|
||||
'ha5uFKEpDZulV8l52axhVzqaCdxQp32qVSSwC1wN3fYiw7b76w'.
|
||||
'bN4SMue4/KbwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: pp_green.png
|
||||
//==========================================================
|
||||
$this->imgdata_small[4][0]= 447 ;
|
||||
$this->imgdata_small[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsSAAALEgHS3X78AAAA'.
|
||||
'B3RJTUUH0wMJFhkLdq9eKQAAAUxJREFUeJyN1LFVwzAQxvH/8f'.
|
||||
'IeDS0FLKABlN6eIwPYAzCHB0gWYI2jj+i1ABUTQN4TRSQ7iiWZ'.
|
||||
'qxLn9Mt9ydmiqrSq930AYFiu6YdKrf/hP1gYQn6960PxwBaYMG'.
|
||||
'E9UA3dBFtVQjdBOQmBakLennK0CapRwbZRZ3N0O/IeEsqp3HKL'.
|
||||
'Smtt5pUZgTPg4gdDud+6xoS97wM2rsxxmRSoTgoVcMZsXJkBho'.
|
||||
'SmKqCuOuEtls6nmGMFPTUmxBKx/MeyNfQGLoOOiC2ddsxb1Kzv'.
|
||||
'ZzUqu5IXbGDvBJf+hDisi77qFSuhq7Xpuu66TyJLRGbsXVUPxV'.
|
||||
'SxsgkzDMt0mKT3/RcjL8C5hHnvJToXY0xYRZ4xnVKsV/S+a8YA'.
|
||||
'AvCb3s9g13UhYj+TTo93B3fApRV1FVlEAD6H42DjN9/WvzDYuJ'.
|
||||
'dL5b1/ji+/IX8EGWP4AwRii8PdFHTqAAAAAElFTkSuQmCC' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,151 +0,0 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_SQUARES.INC
|
||||
// Description: Base64 encoded images for squares
|
||||
// Created: 2003-03-20
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: imgdata_squares.inc,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_Squares extends ImgData {
|
||||
var $name = 'Squares';
|
||||
var $an = array(MARK_IMG_SQUARE =>'imgdata');
|
||||
|
||||
var $colors = array('bluegreen','blue','green',
|
||||
'lightblue','orange','purple','red','yellow');
|
||||
var $index = array('bluegreen' =>2,'blue'=>5,'green'=>6,
|
||||
'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1);
|
||||
var $maxidx = 7 ;
|
||||
var $imgdata ;
|
||||
|
||||
function ImgData_Squares () {
|
||||
//==========================================================
|
||||
//sq_lblue.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 362 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'.
|
||||
'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'.
|
||||
'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'.
|
||||
'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'.
|
||||
'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'.
|
||||
'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'.
|
||||
'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'.
|
||||
'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_yellow.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 338 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'.
|
||||
'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'.
|
||||
'/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'.
|
||||
'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'.
|
||||
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'.
|
||||
'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'.
|
||||
'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'.
|
||||
'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'.
|
||||
'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'.
|
||||
'I=' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_blgr.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 347 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'.
|
||||
'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'.
|
||||
'0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'.
|
||||
'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'.
|
||||
'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'.
|
||||
'1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'.
|
||||
'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'.
|
||||
'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'.
|
||||
'0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'.
|
||||
'AASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_red.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 324 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
||||
'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'.
|
||||
'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'.
|
||||
'3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'.
|
||||
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'.
|
||||
'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'.
|
||||
'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'.
|
||||
'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'.
|
||||
'/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 445 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'.
|
||||
'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'.
|
||||
'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'.
|
||||
'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'.
|
||||
'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'.
|
||||
'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'.
|
||||
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'.
|
||||
'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'.
|
||||
'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'.
|
||||
'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'.
|
||||
'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'.
|
||||
'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata[5][0]= 283 ;
|
||||
$this->imgdata[5][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'.
|
||||
'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'.
|
||||
'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'.
|
||||
'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'.
|
||||
'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'.
|
||||
'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'.
|
||||
'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'.
|
||||
'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_green.png
|
||||
//==========================================================
|
||||
$this->imgdata[6][0]= 325 ;
|
||||
$this->imgdata[6][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
||||
'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'.
|
||||
'6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'.
|
||||
'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'.
|
||||
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'.
|
||||
'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'.
|
||||
'5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'.
|
||||
'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'.
|
||||
'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_orange.png
|
||||
//==========================================================
|
||||
$this->imgdata[7][0]= 321 ;
|
||||
$this->imgdata[7][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'.
|
||||
'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'.
|
||||
'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'.
|
||||
'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'.
|
||||
'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'.
|
||||
'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'.
|
||||
'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'.
|
||||
'1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'.
|
||||
'AbWuGMOr5COSAAAAAElFTkSuQmCC' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,150 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_SQUARES.INC
|
||||
// Description: Base64 encoded images for squares
|
||||
// Created: 2003-03-20
|
||||
// Ver: $Id: imgdata_squares.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class ImgData_Squares extends ImgData {
|
||||
protected $name = 'Squares';
|
||||
protected $an = array(MARK_IMG_SQUARE =>'imgdata');
|
||||
|
||||
protected $colors = array('bluegreen','blue','green',
|
||||
'lightblue','orange','purple','red','yellow');
|
||||
protected $index = array('bluegreen' =>2,'blue'=>5,'green'=>6,
|
||||
'lightblue'=>0,'orange'=>7,'purple'=>4,'red'=>3,'yellow'=>1);
|
||||
protected $maxidx = 7 ;
|
||||
protected $imgdata ;
|
||||
|
||||
function ImgData_Squares () {
|
||||
//==========================================================
|
||||
//sq_lblue.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 362 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAABm'.
|
||||
'JLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsRAAALEQF/ZF+RAAAA'.
|
||||
'B3RJTUUH0wMLFgojiPx/ygAAAPdJREFUeNpj/P377+kzHx89/c'.
|
||||
'VAHNBQ5VBX52HavPWWjg6nnDQbkXoUFTnnL7zD9PPXrz17HxCj'.
|
||||
'E6Jn6fL7H7/+ZWJgYCBGJ7IeBgYGJogofp1oehDa8OjE1IOiDa'.
|
||||
'tOrHoYGBhY0NwD0enirMDAwMDFxYRVD7ptyDrNTAU0NXix6sGu'.
|
||||
'jYGBgZOT9e/f/0xMjFyczFgVsGAKCfBza2kKzpl3hIuT1c9Xb/'.
|
||||
'PW58/foKchJqx6tmy98vbjj8cvPm/afMnXW1JShA2fNmQ9EBFc'.
|
||||
'Opnw6MGjkwm/Hlw6mQjqwaqTiRg9mDoZv//4M2/+UYJ64EBWgj'.
|
||||
'cm2hwA8l24oNDl+DMAAAAASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_yellow.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 338 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAWl'.
|
||||
'BMVEX////+/+H+/9/9/9v8/8P8/8H8/7v8/7n6/4P5/335/3n5'.
|
||||
'/3X4/1f4/1P3/031/w30/wn0/wPt+ADp9ADm8ADk7gDc5gDa5A'.
|
||||
'DL1ADFzgCwuACqsgClrABzeAC9M0MzAAAAAWJLR0QAiAUdSAAA'.
|
||||
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEDlOgDj'.
|
||||
'EAAAB+SURBVHjaVcpbCsQgDEDRGERGKopjDa2a/W9zfLWj9/Nw'.
|
||||
'Ac21ZRBOtZlRN9ApzSYFaDUj79KIorRDbJNO9bN/GUSh2ZRJFJ'.
|
||||
'S18iorURBiyksO8buT0zkfYaUqzI91ckfhWhoGXTLzsDjI68Sz'.
|
||||
'pGMjrzPzauA/iXk1AtykmvgBC8UcWUdc9HkAAAAASUVORK5CYI'.
|
||||
'I=' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_blgr.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 347 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAZl'.
|
||||
'BMVEX////0+vv0+vrz+fry+frv+Png7e/d7e/a6+zY6+250tSz'.
|
||||
'0tSyztCtztGM0NWIz9SDzdNfsLVcrrRZrbJOp61MpqtIr7dHn6'.
|
||||
'RErrZArLQ6q7M2g4kygYcsp68npa4ctr8QZ20JnqepKsl4AAAA'.
|
||||
'AWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU'.
|
||||
'1FB9MDCxYEByp8tpUAAAB7SURBVHjaVcjRFoIgDADQWZpWJpjY'.
|
||||
'MsnG//9kzIFn3McLzfArDA3MndFjrhvgfDHFBEB9pt0CVzwrY3'.
|
||||
'n2yicjhY4vTSp0nbXtN+hCV53SHDWe61dZY+/9463r2XuifHAM'.
|
||||
'0SoH+6xEcovUlCfefeFSIwfTTQ3fB+pi4lV/bTIgvmaA7a0AAA'.
|
||||
'AASUVORK5CYII=' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_red.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 324 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
||||
'BMVEX////++Pn99/j99ff99fb98/X98/T98PL55uj43+P24+bw'.
|
||||
'kKPvjaHviJ3teJHpxMnoL2Pjs73WW3rWNljVWXnUVnbUK1DTJk'.
|
||||
'3SUHPOBz/KQmmxPVmuOFasNFOeIkWVka/fAAAAAWJLR0QAiAUd'.
|
||||
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEHd'.
|
||||
'ceT+8AAABtSURBVHjaVchbAkMwEAXQq6i3VrQiQfa/zDYTw8z5'.
|
||||
'PCjGt9JVWFt1XWPh1fWNdfDy+tq6WPfRUPENNKnSnXNWPB4uv2'.
|
||||
'b54nSZ8jHrMtOxvWZZZtpD4KP6xLkO9/AhzhaCOMhJh68cOjzV'.
|
||||
'/K/4Ac2cG+nBcaRuAAAAAElFTkSuQmCC' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_pink.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 445 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAApV'.
|
||||
'BMVEX////6+Pz69/v49Pr38/r17/jr4+/l3Onj2efh1ua/L+i+'.
|
||||
'q8m+Lue9Lua8qsS8LuW8LeS7pca5LOG4LN+2Y9O2YNW1ZdO1Kt'.
|
||||
'y0atC0aNGzb82zbc6zKtuzKdqycsuwa8qtJtOISZ2GRpuFN6GE'.
|
||||
'NqCDQpmCMZ+BPpd/LJ1/K519S5B9Jpx9Jpt9JZt6RY11BJZ1BJ'.
|
||||
'V0BJV0BJRzBJNvNoRtIoJUEmdZ/XbrAAAAAWJLR0QAiAUdSAAA'.
|
||||
'AAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYDF3iKMD'.
|
||||
'YAAACeSURBVHjaVczbEoIgGARgCiMtrexoWpaa2FHUgvd/tH4Y'.
|
||||
'BnEvv9ldhNPradPnnGBUTtPDzMRPSIF46SaBoR25dYjz3I20Lb'.
|
||||
'ek6BgQz73Il7KKpSgCO0pTHU0886J1sCe0ZYbALjGhjFnEM2es'.
|
||||
'VhZVI4d+B1QtfnV47ywCEaKeP/p7JdLejSYt0j6NIiOq1wJZIs'.
|
||||
'QTDA0ELHwhPBCwyR/Cni9cOmzJtwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_blue.png
|
||||
//==========================================================
|
||||
$this->imgdata[5][0]= 283 ;
|
||||
$this->imgdata[5][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAQl'.
|
||||
'BMVEX////4+fz39/z19vvy8vru7/ni4+7g4fHW1ue8vteXmt6B'.
|
||||
'hdhiZ7FQVaZETcxCSJo1Oq4zNoMjKakhJHcKFaMEC2jRVYdWAA'.
|
||||
'AAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0'.
|
||||
'SU1FB9MDCxYDN0PkEP4AAABfSURBVHjaVchHAoAgDATAVcCCIF'.
|
||||
'j4/1elJEjmOFDHKVgDv4iz640gLs+LMF6ZUv/VqcXXplU7Gqpy'.
|
||||
'PFzBT5qml9NzlOX259riWHlS4kOffviHD8PQYZx2EFMPRkw+9Q'.
|
||||
'FSnRPeWEDzKAAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_green.png
|
||||
//==========================================================
|
||||
$this->imgdata[6][0]= 325 ;
|
||||
$this->imgdata[6][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAXV'.
|
||||
'BMVEX////2+vX1+vX1+fT0+fPz+PPx9/Dv9u7u9e3h7uHe697a'.
|
||||
'6dnO2s3I1sa10LOvza2ay5aEwYBWlE9TqE5Tkk1RkEpMrUJMg0'.
|
||||
'hKiUNGpEFBojw8oTcsbScaYBMWlwmMT0NtAAAAAWJLR0QAiAUd'.
|
||||
'SAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEFd'.
|
||||
'nFx90AAABuSURBVHjaVc9HAoAgDADB2HuJWLDx/2cKBITscW4L'.
|
||||
'5byzMIWtZobNDZIZtrcCGZsRQ8GwvRSRNxIiMuysODKG3alikl'.
|
||||
'ueOPlpKTLBaRmOZxQxaXlfb5ZWI9om4WntrXiDSJzp7SBkwMQa'.
|
||||
'FEy0VR/NAB2kNuj7rgAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
//sq_orange.png
|
||||
//==========================================================
|
||||
$this->imgdata[7][0]= 321 ;
|
||||
$this->imgdata[7][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAAUV'.
|
||||
'BMVEX/////8+n/8uf/8OP/59H/5Mv/zqH/zJ3/ypv/yJf/vYH/'.
|
||||
'u33/uXn/n0n/nUX/m0H/lzn/ljf/lDP/kS3/kCv/iR//hxv/fg'.
|
||||
'n/fAX/eQDYZgDW6ia5AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAAL'.
|
||||
'EgAACxIB0t1+/AAAAAd0SU1FB9MDCxYEJIgbx+cAAAB2SURBVH'.
|
||||
'jaVczRCoQwDETRbLAWLZSGUA35/w/dVI0283i4DODew3YESmWW'.
|
||||
'kg5gWkoQAe6TleUQI/66Sy7i56+kLk7cht2N0+hcnJgQu0SqiC'.
|
||||
'1SzSIbzWSi6gavqJ63wSduRi2f+kwyD5rEukwCdZ1kGAMGMfv9'.
|
||||
'AbWuGMOr5COSAAAAAElFTkSuQmCC' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,145 +0,0 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_STARS.INC
|
||||
// Description: Base64 encoded images for stars
|
||||
// Created: 2003-03-20
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: imgdata_stars.inc,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
class ImgData_Stars extends ImgData {
|
||||
var $name = 'Stars';
|
||||
var $an = array(MARK_IMG_STAR => 'imgdata');
|
||||
|
||||
var $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow');
|
||||
var $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1,
|
||||
'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6);
|
||||
var $maxidx = 7 ;
|
||||
var $imgdata ;
|
||||
|
||||
function ImgData_Stars() {
|
||||
//==========================================================
|
||||
// File: bstar_green_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 329 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'.
|
||||
'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'.
|
||||
'/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'.
|
||||
'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
||||
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'.
|
||||
'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'.
|
||||
'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'.
|
||||
'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'.
|
||||
'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ;
|
||||
//==========================================================
|
||||
// File: bstar_blred.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 325 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'.
|
||||
'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'.
|
||||
'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'.
|
||||
'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_red_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 325 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'.
|
||||
'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'.
|
||||
'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'.
|
||||
'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_blgr_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 325 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'.
|
||||
'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'.
|
||||
'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'.
|
||||
'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_blgr_002.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 325 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'.
|
||||
'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'.
|
||||
'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'.
|
||||
'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_blue_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[5][0]= 325 ;
|
||||
$this->imgdata[5][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'.
|
||||
'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'.
|
||||
'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'.
|
||||
'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_oy_007.png
|
||||
//==========================================================
|
||||
$this->imgdata[6][0]= 325 ;
|
||||
$this->imgdata[6][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'.
|
||||
'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'.
|
||||
'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'.
|
||||
'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_lred.png
|
||||
//==========================================================
|
||||
$this->imgdata[7][0]= 325 ;
|
||||
$this->imgdata[7][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'.
|
||||
'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'.
|
||||
'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'.
|
||||
'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: IMGDATA_STARS.INC
|
||||
// Description: Base64 encoded images for stars
|
||||
// Created: 2003-03-20
|
||||
// Ver: $Id: imgdata_stars.inc.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
class ImgData_Stars extends ImgData {
|
||||
protected $name = 'Stars';
|
||||
protected $an = array(MARK_IMG_STAR => 'imgdata');
|
||||
|
||||
protected $colors = array('bluegreen','lightblue','purple','blue','green','pink','red','yellow');
|
||||
protected $index = array('bluegreen'=>3,'lightblue'=>4,'purple'=>1,
|
||||
'blue'=>5,'green'=>0,'pink'=>7,'red'=>2,'yellow'=>6);
|
||||
protected $maxidx = 7 ;
|
||||
protected $imgdata ;
|
||||
|
||||
function __construct() {
|
||||
//==========================================================
|
||||
// File: bstar_green_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[0][0]= 329 ;
|
||||
$this->imgdata[0][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAAUV'.
|
||||
'BMVEX///////+/v7+83rqcyY2Q/4R7/15y/1tp/05p/0lg/zdX'.
|
||||
'/zdX/zVV/zdO/zFJ9TFJvDFD4yg+8Bw+3iU68hwurhYotxYosx'.
|
||||
'YokBoTfwANgQFUp7DWAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgF'.
|
||||
'HUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJj'.
|
||||
'CRyxgTAAAAcUlEQVR4nH3MSw6AIAwEUBL/IKBWwXL/g0pLojUS'.
|
||||
'ZzGLl8ko9Zumhr5iy66/GH0dp49llNPB5sTotDY5PVuLG6tnM9'.
|
||||
'CVKSIe1joSgPsAKSuANNaENFQvTAGzmheSkUpMBWeJZwqBT8wo'.
|
||||
'hmysD4bnnPsC/x8ItUdGPfAAAAAASUVORK5CYII=' ;
|
||||
//==========================================================
|
||||
// File: bstar_blred.png
|
||||
//==========================================================
|
||||
$this->imgdata[1][0]= 325 ;
|
||||
$this->imgdata[1][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79uRJ6jWPOSUtKrb+ejWO+gWPaGTruJTr6rZvF2'.
|
||||
'RqC2ocqdVuCeV+egV/GsnLuIXL66rMSpcOyATbipY/OdWOp+VK'.
|
||||
'aTU9WhV+yJKBoLAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJwynv1'.
|
||||
'XVAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_red_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[2][0]= 325 ;
|
||||
$this->imgdata[2][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v7+eRFHzWG3SUmHnb37vWGr2WHG7Tlm+TljxZneg'.
|
||||
'Rk3KoaXgVmXnV2nxV227nJ++XGzErK3scIS4TVzzY3fqWG2mVF'.
|
||||
'zVU2PsV2rJFw9VAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJzCI0C'.
|
||||
'lSAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_blgr_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[3][0]= 325 ;
|
||||
$this->imgdata[3][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79Ehp5Yx/NSq9Jvw+dYwu9YzfZOmbtOmb5myPFG'.
|
||||
'gqChvcpWteBXvedXxvGcsbtcpb6su8RwzOxNmrhjyvNYwupUjK'.
|
||||
'ZTr9VXwOyJhmWNAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJTC65k'.
|
||||
'vQAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_blgr_002.png
|
||||
//==========================================================
|
||||
$this->imgdata[4][0]= 325 ;
|
||||
$this->imgdata[4][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79EnpxY8/FS0dJv5+dY7+9Y9vBOubtOur5m8fFG'.
|
||||
'nKChycpW3uBX5+ZX8e2curtcvrqswsRw7OdNuLZj8/BY6udUpK'.
|
||||
'ZT1dRX7OtNkrW5AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJgXHeN'.
|
||||
'wwAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_blue_001.png
|
||||
//==========================================================
|
||||
$this->imgdata[5][0]= 325 ;
|
||||
$this->imgdata[5][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v79EY55Yi/NSetJvledYiO9YkPZOb7tObr5mkvFG'.
|
||||
'X6ChrcpWgOBXhedXi/Gcpbtcf76sssRwnOxNcbhjk/NYiepUbK'.
|
||||
'ZTfdVXh+ynNEzzAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJhStyP'.
|
||||
'zCAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_oy_007.png
|
||||
//==========================================================
|
||||
$this->imgdata[6][0]= 325 ;
|
||||
$this->imgdata[6][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v7+ejUTz11jSvVLn02/v1lj21li7q06+r07x2mag'.
|
||||
'lUbKxKHgy1bnz1fx1Ve7t5y+qlzEwqzs03C4pE3z2WPqz1imml'.
|
||||
'TVv1Ps01dGRjeyAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJjsGGc'.
|
||||
'GbAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
|
||||
//==========================================================
|
||||
// File: bstar_lred.png
|
||||
//==========================================================
|
||||
$this->imgdata[7][0]= 325 ;
|
||||
$this->imgdata[7][1]=
|
||||
'iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAMAAABsDg4iAAAATl'.
|
||||
'BMVEX///+/v7+eRJPzWN3SUr7nb9TvWNj2WOS7Tqi+TqnxZtyg'.
|
||||
'Ro/KocPgVsjnV9LxV927nLa+XLTErL7scN24TarzY9/qWNemVJ'.
|
||||
'jVU8LsV9VCwcc9AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgA'.
|
||||
'AAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfTAxYTJxi9ZY'.
|
||||
'GoAAAAcElEQVR4nH3MyQ6AIAwEUFIqiwju2///qLQmWiJxDnN4'.
|
||||
'mYxSv5lqGCs2nvaLLtZx/VhGOW1MjnPJWp0zsw2wsUY2jd09BY'.
|
||||
'DFmESC+BwA5UCUxhqAhqrA4CGrLpCMVGK4sZe4B+/5RLdiyMb6'.
|
||||
'on/PuS9CdQNC7yBXEQAAAABJRU5ErkJggg==' ;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -1,201 +0,0 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPG-CONFIG.INC
|
||||
// Description: Configuration file for JpGraph library
|
||||
// Created: 2004-03-27
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpg-config.inc,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Directories for cache and font directory.
|
||||
//
|
||||
// CACHE_DIR:
|
||||
// The full absolute name of the directory to be used to store the
|
||||
// cached image files. This directory will not be used if the USE_CACHE
|
||||
// define (further down) is false. If you enable the cache please note that
|
||||
// this directory MUST be readable and writable for the process running PHP.
|
||||
// Must end with '/'
|
||||
//
|
||||
// TTF_DIR:
|
||||
// Directory where TTF fonts can be found. Must end with '/'
|
||||
//
|
||||
// The default values used if these defines are left commented out are:
|
||||
//
|
||||
// UNIX:
|
||||
// CACHE_DIR /tmp/jpgraph_cache/
|
||||
// TTF_DIR /usr/X11R6/lib/X11/fonts/truetype/
|
||||
// MBTTF_DIR /usr/share/fonts/ja/TrueType/
|
||||
//
|
||||
// WINDOWS:
|
||||
// CACHE_DIR $SERVER_TEMP/jpgraph_cache/
|
||||
// TTF_DIR $SERVER_SYSTEMROOT/fonts/
|
||||
// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
// DEFINE("CACHE_DIR","/tmp/jpgraph_cache/");
|
||||
// DEFINE("TTF_DIR","/usr/X11R6/lib/X11/fonts/truetype/");
|
||||
// DEFINE("MBTTF_DIR","/usr/share/fonts/ja/TrueType/");
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Cache directory specification for use with CSIM graphs that are
|
||||
// using the cache.
|
||||
// The directory must be the filesysystem name as seen by PHP
|
||||
// and the 'http' version must be the same directory but as
|
||||
// seen by the HTTP server relative to the 'htdocs' ddirectory.
|
||||
// If a relative path is specified it is taken to be relative from where
|
||||
// the image script is executed.
|
||||
// Note: The default setting is to create a subdirectory in the
|
||||
// directory from where the image script is executed and store all files
|
||||
// there. As ususal this directory must be writeable by the PHP process.
|
||||
DEFINE("CSIMCACHE_DIR","csimcache/");
|
||||
DEFINE("CSIMCACHE_HTTP_DIR","csimcache/");
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Defines for font setup
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Actual name of the TTF file used together with FF_CHINESE aka FF_BIG5
|
||||
// This is the TTF file being used when the font family is specified as
|
||||
// either FF_CHINESE or FF_BIG5
|
||||
DEFINE('CHINESE_TTF_FONT','bkai00mp.ttf');
|
||||
|
||||
// Special unicode cyrillic language support
|
||||
DEFINE("LANGUAGE_CYRILLIC",false);
|
||||
|
||||
// If you are setting this config to true the conversion
|
||||
// will assume that the input text is windows 1251, if
|
||||
// false it will assume koi8-r
|
||||
DEFINE("CYRILLIC_FROM_WINDOWS",false);
|
||||
|
||||
// Japanese TrueType font used with FF_MINCHO, FF_PMINCHO, FF_GOTHIC, FF_PGOTHIC
|
||||
DEFINE('MINCHO_TTF_FONT','ipam.ttf');
|
||||
DEFINE('PMINCHO_TTF_FONT','ipamp.ttf');
|
||||
DEFINE('GOTHIC_TTF_FONT','ipag.ttf');
|
||||
DEFINE('PGOTHIC_TTF_FONT','ipagp.ttf');
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Various JpGraph Settings. Adjust accordingly to your
|
||||
// preferences. Note that cache functionality is turned off by
|
||||
// default (Enable by setting USE_CACHE to true)
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Deafult graphic format set to "auto" which will automatically
|
||||
// choose the best available format in the order png,gif,jpeg
|
||||
// (The supported format depends on what your PHP installation supports)
|
||||
DEFINE("DEFAULT_GFORMAT","auto");
|
||||
|
||||
// Should the image be a truecolor image?
|
||||
// Note 1: Has only effect with GD 2.0.1 and above.
|
||||
// Note 2: GD 2.0.1 + PHP 4.0.6 on Win32 crashes when trying to use
|
||||
// trucolor.
|
||||
// Note 3: MUST be enabled to get background images working with GD2
|
||||
DEFINE('USE_TRUECOLOR',true);
|
||||
|
||||
// Specify what version of the GD library is installed.
|
||||
// If this is set to 'auto' the version will be automatically
|
||||
// determined.
|
||||
// However since determining the library takes ~1ms you can also
|
||||
// manually specify the version if you know what version you have.
|
||||
// This means that you should
|
||||
// set this define to true if you have GD 2.x installed to save 1ms.
|
||||
DEFINE("USE_LIBRARY_GD2",'auto');
|
||||
|
||||
// Should the cache be used at all? By setting this to false no
|
||||
// files will be generated in the cache directory.
|
||||
// The difference from READ_CACHE being that setting READ_CACHE to
|
||||
// false will still create the image in the cache directory
|
||||
// just not use it. By setting USE_CACHE=false no files will even
|
||||
// be generated in the cache directory.
|
||||
DEFINE("USE_CACHE",false);
|
||||
|
||||
// Should we try to find an image in the cache before generating it?
|
||||
// Set this define to false to bypass the reading of the cache and always
|
||||
// regenerate the image. Note that even if reading the cache is
|
||||
// disabled the cached will still be updated with the newly generated
|
||||
// image. Set also "USE_CACHE" below.
|
||||
DEFINE("READ_CACHE",true);
|
||||
|
||||
// Determine if the error handler should be image based or purely
|
||||
// text based. Image based makes it easier since the script will
|
||||
// always return an image even in case of errors.
|
||||
DEFINE("USE_IMAGE_ERROR_HANDLER",true);
|
||||
|
||||
// Determine if the library should also setup the default PHP
|
||||
// error handler to generate a graphic error mesage. This is useful
|
||||
// during development to be able to see the error message as an image
|
||||
// instead as a "red-cross" in a page where an image is expected.
|
||||
DEFINE("INSTALL_PHP_ERR_HANDLER",false);
|
||||
|
||||
// Should the library examin the global php_errmsg string and convert
|
||||
// any error in it to a graphical representation. This is handy for the
|
||||
// occasions when, for example, header files cannot be found and this results
|
||||
// in the graph not being created and just a "red-cross" image would be seen.
|
||||
// This should be turned off for a production site.
|
||||
DEFINE("CATCH_PHPERRMSG",true);
|
||||
|
||||
// If the color palette is full should JpGraph try to allocate
|
||||
// the closest match? If you plan on using background images or
|
||||
// gradient fills it might be a good idea to enable this.
|
||||
// If not you will otherwise get an error saying that the color palette is
|
||||
// exhausted. The drawback of using approximations is that the colors
|
||||
// might not be exactly what you specified.
|
||||
// Note1: This does only apply to paletted images, not truecolor
|
||||
// images since they don't have the limitations of maximum number
|
||||
// of colors.
|
||||
DEFINE("USE_APPROX_COLORS",true);
|
||||
|
||||
// Should usage of deprecated functions and parameters give a fatal error?
|
||||
// (Useful to check if code is future proof.)
|
||||
DEFINE("ERR_DEPRECATED",true);
|
||||
|
||||
// Should the time taken to generate each picture be branded to the lower
|
||||
// left in corner in each generated image? Useful for performace measurements
|
||||
// generating graphs
|
||||
DEFINE("BRAND_TIMING",false);
|
||||
|
||||
// What format should be used for the timing string?
|
||||
DEFINE("BRAND_TIME_FORMAT","(%01.3fs)");
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// The following constants should rarely have to be changed !
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// What group should the cached file belong to
|
||||
// (Set to "" will give the default group for the "PHP-user")
|
||||
// Please note that the Apache user must be a member of the
|
||||
// specified group since otherwise it is impossible for Apache
|
||||
// to set the specified group.
|
||||
DEFINE("CACHE_FILE_GROUP","wwwadmin");
|
||||
|
||||
// What permissions should the cached file have
|
||||
// (Set to "" will give the default persmissions for the "PHP-user")
|
||||
DEFINE("CACHE_FILE_MOD",0664);
|
||||
|
||||
// Decide if we should use the bresenham circle algorithm or the
|
||||
// built in Arc(). Bresenham gives better visual apperance of circles
|
||||
// but is more CPU intensive and slower then the built in Arc() function
|
||||
// in GD. Turned off by default for speed
|
||||
DEFINE("USE_BRESENHAM",false);
|
||||
|
||||
// Special file name to indicate that we only want to calc
|
||||
// the image map in the call to Graph::Stroke() used
|
||||
// internally from the GetHTMLCSIM() method.
|
||||
DEFINE("_CSIM_SPECIALFILE","_csim_special_");
|
||||
|
||||
// HTTP GET argument that is used with image map
|
||||
// to indicate to the script to just generate the image
|
||||
// and not the full CSIM HTML page.
|
||||
DEFINE("_CSIM_DISPLAY","_jpg_csimd");
|
||||
|
||||
// Special filename for Graph::Stroke(). If this filename is given
|
||||
// then the image will NOT be streamed to browser of file. Instead the
|
||||
// Stroke call will return the handler for the created GD image.
|
||||
DEFINE("_IMG_HANDLER","__handle");
|
||||
|
||||
|
||||
?>
|
@ -0,0 +1,138 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPG-CONFIG.INC
|
||||
// Description: Configuration file for JpGraph library
|
||||
// Created: 2004-03-27
|
||||
// Ver: $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Directories for cache and font directory.
|
||||
//
|
||||
// CACHE_DIR:
|
||||
// The full absolute name of the directory to be used to store the
|
||||
// cached image files. This directory will not be used if the USE_CACHE
|
||||
// define (further down) is false. If you enable the cache please note that
|
||||
// this directory MUST be readable and writable for the process running PHP.
|
||||
// Must end with '/'
|
||||
//
|
||||
// TTF_DIR:
|
||||
// Directory where TTF fonts can be found. Must end with '/'
|
||||
//
|
||||
// The default values used if these defines are left commented out are:
|
||||
//
|
||||
// UNIX:
|
||||
// CACHE_DIR /tmp/jpgraph_cache/
|
||||
// TTF_DIR /usr/share/fonts/truetype/
|
||||
// MBTTF_DIR /usr/share/fonts/truetype/
|
||||
//
|
||||
// WINDOWS:
|
||||
// CACHE_DIR $SERVER_TEMP/jpgraph_cache/
|
||||
// TTF_DIR $SERVER_SYSTEMROOT/fonts/
|
||||
// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
|
||||
//
|
||||
//------------------------------------------------------------------------
|
||||
// define('CACHE_DIR','/tmp/jpgraph_cache/');
|
||||
// define('TTF_DIR','/usr/share/fonts/TrueType/');
|
||||
// define('MBTTF_DIR','/usr/share/fonts/TrueType/');
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Cache directory specification for use with CSIM graphs that are
|
||||
// using the cache.
|
||||
// The directory must be the filesysystem name as seen by PHP
|
||||
// and the 'http' version must be the same directory but as
|
||||
// seen by the HTTP server relative to the 'htdocs' ddirectory.
|
||||
// If a relative path is specified it is taken to be relative from where
|
||||
// the image script is executed.
|
||||
// Note: The default setting is to create a subdirectory in the
|
||||
// directory from where the image script is executed and store all files
|
||||
// there. As ususal this directory must be writeable by the PHP process.
|
||||
define('CSIMCACHE_DIR','csimcache/');
|
||||
define('CSIMCACHE_HTTP_DIR','csimcache/');
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Various JpGraph Settings. Adjust accordingly to your
|
||||
// preferences. Note that cache functionality is turned off by
|
||||
// default (Enable by setting USE_CACHE to true)
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// Deafult locale for error messages.
|
||||
// This defaults to English = 'en'
|
||||
define('DEFAULT_ERR_LOCALE','en');
|
||||
|
||||
// Deafult graphic format set to 'auto' which will automatically
|
||||
// choose the best available format in the order png,gif,jpeg
|
||||
// (The supported format depends on what your PHP installation supports)
|
||||
define('DEFAULT_GFORMAT','auto');
|
||||
|
||||
// Should the cache be used at all? By setting this to false no
|
||||
// files will be generated in the cache directory.
|
||||
// The difference from READ_CACHE being that setting READ_CACHE to
|
||||
// false will still create the image in the cache directory
|
||||
// just not use it. By setting USE_CACHE=false no files will even
|
||||
// be generated in the cache directory.
|
||||
define('USE_CACHE',false);
|
||||
|
||||
// Should we try to find an image in the cache before generating it?
|
||||
// Set this define to false to bypass the reading of the cache and always
|
||||
// regenerate the image. Note that even if reading the cache is
|
||||
// disabled the cached will still be updated with the newly generated
|
||||
// image. Set also 'USE_CACHE' below.
|
||||
define('READ_CACHE',true);
|
||||
|
||||
// Determine if the error handler should be image based or purely
|
||||
// text based. Image based makes it easier since the script will
|
||||
// always return an image even in case of errors.
|
||||
define('USE_IMAGE_ERROR_HANDLER',true);
|
||||
|
||||
// Should the library examine the global php_errmsg string and convert
|
||||
// any error in it to a graphical representation. This is handy for the
|
||||
// occasions when, for example, header files cannot be found and this results
|
||||
// in the graph not being created and just a 'red-cross' image would be seen.
|
||||
// This should be turned off for a production site.
|
||||
define('CATCH_PHPERRMSG',true);
|
||||
|
||||
// Determine if the library should also setup the default PHP
|
||||
// error handler to generate a graphic error mesage. This is useful
|
||||
// during development to be able to see the error message as an image
|
||||
// instead as a 'red-cross' in a page where an image is expected.
|
||||
define('INSTALL_PHP_ERR_HANDLER',false);
|
||||
|
||||
// Should usage of deprecated functions and parameters give a fatal error?
|
||||
// (Useful to check if code is future proof.)
|
||||
define('ERR_DEPRECATED',true);
|
||||
|
||||
// The builtin GD function imagettfbbox() fuction which calculates the bounding box for
|
||||
// text using TTF fonts is buggy. By setting this define to true the library
|
||||
// uses its own compensation for this bug. However this will give a
|
||||
// slightly different visual apparance than not using this compensation.
|
||||
// Enabling this compensation will in general give text a bit more space to more
|
||||
// truly reflect the actual bounding box which is a bit larger than what the
|
||||
// GD function thinks.
|
||||
define('USE_LIBRARY_IMAGETTFBBOX',true);
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// The following constants should rarely have to be changed !
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
// What group should the cached file belong to
|
||||
// (Set to '' will give the default group for the 'PHP-user')
|
||||
// Please note that the Apache user must be a member of the
|
||||
// specified group since otherwise it is impossible for Apache
|
||||
// to set the specified group.
|
||||
define('CACHE_FILE_GROUP','www');
|
||||
|
||||
// What permissions should the cached file have
|
||||
// (Set to '' will give the default persmissions for the 'PHP-user')
|
||||
define('CACHE_FILE_MOD',0664);
|
||||
|
||||
// Default theme class name
|
||||
define('DEFAULT_THEME_CLASS', 'UniversalTheme');
|
||||
|
||||
define('SUPERSAMPLING', true);
|
||||
define('SUPERSAMPLING_SCALE', 1);
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,205 +1,205 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ANTISPAM.PHP
|
||||
// Description: Genarate anti-spam challenge
|
||||
// Created: 2004-10-07
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_antispam-digits.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class HandDigits {
|
||||
var $digits_thumb30x30 = array();
|
||||
var $iHeight=30, $iWidth=30;
|
||||
function HandDigits() {
|
||||
//==========================================================
|
||||
// d6-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['6'][0]= 645 ;
|
||||
$this->digits['6'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'.
|
||||
'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'.
|
||||
'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'.
|
||||
'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'.
|
||||
'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'.
|
||||
'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'.
|
||||
'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ;
|
||||
|
||||
//==========================================================
|
||||
// d2-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['2'][0]= 606 ;
|
||||
$this->digits['2'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'.
|
||||
'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'.
|
||||
'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'.
|
||||
'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'.
|
||||
'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'.
|
||||
'7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'.
|
||||
'DLZ6f//Z' ;
|
||||
|
||||
//==========================================================
|
||||
// d9-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['9'][0]= 680 ;
|
||||
$this->digits['9'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'.
|
||||
'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'.
|
||||
'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'.
|
||||
'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'.
|
||||
'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'.
|
||||
'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'.
|
||||
'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'.
|
||||
'1V1//9k=' ;
|
||||
|
||||
//==========================================================
|
||||
// d5-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['5'][0]= 632 ;
|
||||
$this->digits['5'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'.
|
||||
'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'.
|
||||
'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'.
|
||||
'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'.
|
||||
'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'.
|
||||
'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'.
|
||||
'8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ;
|
||||
|
||||
//==========================================================
|
||||
// d1-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['1'][0]= 646 ;
|
||||
$this->digits['1'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'.
|
||||
'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'.
|
||||
'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'.
|
||||
'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'.
|
||||
'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'.
|
||||
'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'.
|
||||
'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d8-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['8'][0]= 694 ;
|
||||
$this->digits['8'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'.
|
||||
'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'.
|
||||
'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'.
|
||||
'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'.
|
||||
'44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'.
|
||||
'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'.
|
||||
'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'.
|
||||
'EylmLHQltptPZKQOBo1FzH//2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d4-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['4'][0]= 643 ;
|
||||
$this->digits['4'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'.
|
||||
'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'.
|
||||
'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'.
|
||||
'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'.
|
||||
'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'.
|
||||
'27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'.
|
||||
'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d7-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['7'][0]= 658 ;
|
||||
$this->digits['7'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'.
|
||||
'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'.
|
||||
'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'.
|
||||
'19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'.
|
||||
'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'.
|
||||
'8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'.
|
||||
'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d3-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['3'][0]= 662 ;
|
||||
$this->digits['3'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'.
|
||||
'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'.
|
||||
'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'.
|
||||
'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'.
|
||||
'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'.
|
||||
'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'.
|
||||
'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ;
|
||||
}
|
||||
}
|
||||
|
||||
class AntiSpam {
|
||||
|
||||
var $iNumber='';
|
||||
|
||||
function AntiSpam($aNumber='') {
|
||||
$this->iNumber = $aNumber;
|
||||
}
|
||||
|
||||
function Rand($aLen) {
|
||||
$d='';
|
||||
for($i=0; $i < $aLen; ++$i) {
|
||||
$d .= rand(1,9);
|
||||
}
|
||||
$this->iNumber = $d;
|
||||
return $d;
|
||||
}
|
||||
|
||||
function Stroke() {
|
||||
|
||||
$n=strlen($this->iNumber);
|
||||
for($i=0; $i < $n; ++$i ) {
|
||||
if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$dd = new HandDigits();
|
||||
$n = strlen($this->iNumber);
|
||||
$img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight);
|
||||
if( $img < 1 ) {
|
||||
return false;
|
||||
}
|
||||
$start=0;
|
||||
for($i=0; $i < $n; ++$i ) {
|
||||
$size = $dd->digits[$this->iNumber[$i]][0];
|
||||
$dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1]));
|
||||
imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight);
|
||||
$start += imagesx($dimg);
|
||||
}
|
||||
$resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4);
|
||||
if( $resimg < 1 ) {
|
||||
return false;
|
||||
}
|
||||
imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight);
|
||||
header("Content-type: image/jpeg");
|
||||
imagejpeg($resimg);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ANTISPAM.PHP
|
||||
// Description: Genarate anti-spam challenge
|
||||
// Created: 2004-10-07
|
||||
// Ver: $Id: jpgraph_antispam-digits.php 1930 2010-01-22 20:19:27Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
class HandDigits {
|
||||
public $digits = array();
|
||||
public $iHeight=30, $iWidth=30;
|
||||
|
||||
function __construct() {
|
||||
//==========================================================
|
||||
// d6-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['6'][0]= 645 ;
|
||||
$this->digits['6'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAEBAAMBAAAAAAAAAAAAAAAABgMEBwX/xAAvEAABAwMC'.
|
||||
'BAQEBwAAAAAAAAABAgMEAAURBiESIjFRBxMUQRUWMmFTYnGRkrHC/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFhEBAQEAAAAA'.
|
||||
'AAAAAAAAAAAAAAER/9oADAMBAAIRAxEAPwDslwiR3oDku8ONttsAvDiVyMcO/ET7ke5/aoOz6k1Vr5htNjW7a7M1yO3NTQU9JUDu'.
|
||||
'GgrlSn8xyf6p4gXaHJvNps9/mKZtSkGdMjRwpfqAFBLLACRlZUrJONsI2717No1lbZ10kx7XGnRpKWQ/6GVGMfzEJ5VFIVtsOH6e'.
|
||||
'wyKVhYsia0y22pLThSkJK1uniVgdThOM0ol+StIUhpopIyCFq3H8aUVCwnG3PGe4Rp6fLXJtMdyM0ojcIWvIz3HFnAPfrWTXb6GN'.
|
||||
'WaLXDwZjVz8pKEfhuIUFg/bAz9sVJ61nt61mxJFslLtq7e5yPqiBT4UDklKw4MDpt+u+9bFiu9riXNu83R+fcr6tohuQ5HQhmK37'.
|
||||
'paaC8DruScmg6X8KkjZEhbaB9KEyFYSOw26Uqd+e7Qerl5z74DY/1SomP//Z' ;
|
||||
|
||||
//==========================================================
|
||||
// d2-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['2'][0]= 606 ;
|
||||
$this->digits['2'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEQMBIgACEQEDEQH/xAAYAAEBAQEBAAAAAAAAAAAAAAAFAAQHAv/EACsQAAEDBAEC'.
|
||||
'BAYDAAAAAAAAAAIBAwQABQYRIRIxQVFhcQcTFSJSU5GU0f/EABcBAAMBAAAAAAAAAAAAAAAAAAECAwT/xAAZEQACAwEAAAAAAAAA'.
|
||||
'AAAAAAAAARESUUH/2gAMAwEAAhEDEQA/AOqXm/Q8dxmOL4PPSnCSNFixx6nXnkXgRT3Te17JWbGsveueSyLZdbPItNxOKLzTLjou'.
|
||||
'gYCSoSoY8ISKSbFeUrzkdlnTL1YshskiErkQnFEZaF8kkdBBVdjyi6RNL5+9F486eS/ECVkcBtDt1vZcho5viS8ZCp9C9tAIAm/F'.
|
||||
'VoPRU+HRtJ5JVRP1kP0PfwP+1VKrHBMliXG4Nw8VgE4xGkuqk2S1wTUNEVdIvgpL9iL6KtNxY7WOwo9tt0RCitj0sR2uCbFPPzH1'.
|
||||
'7+6rRuSRcljMBMsUy2tky045KOawZk5xtEFBJEROO3hx61kh2rPCIX3MhsyC4QmfTbC6lH8dq5212qwkiG5H6Y/9R2qm+ofxqqsL'.
|
||||
'DLZ6f//Z' ;
|
||||
|
||||
//==========================================================
|
||||
// d9-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['9'][0]= 680 ;
|
||||
$this->digits['9'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwP/xAArEAABAwMD'.
|
||||
'AgYBBQAAAAAAAAABAgMEBQYRABIhE1EUIjEzQUIHMlJhcdH/xAAWAQEBAQAAAAAAAAAAAAAAAAACAQD/xAAYEQEAAwEAAAAAAAAA'.
|
||||
'AAAAAAAAAREhQf/aAAwDAQACEQMRAD8AkK7brF6X7XpMeGoKhFMLEeT4ZUheEhanF4OcZ2pTgDykk92bZpdCsi7aezLjxkIPUZiV'.
|
||||
'RSCy8hah7EkZ27yM7V+iscal5bE22Lon1qNDmSKROd8Sl+Ix1lMOlIS4HGgQpbStoUCnlJz8HmsXtW3Lst2rmBAelLMRRekOwnYz'.
|
||||
'Edls9QKKnOVLyk7UgcbzzrdBthqEJJwZbAI4x1U/7o1TaFa9lG36aXaZTy54VrcXUgrzsGdx+T30aNydweqVw1GS87T6Lb86Q4ha'.
|
||||
'my/IAYjZBx+snKk99oOQMf1AViE65SY348hzFy6hPKnqtKz7DC1lbqyPrvJKUJ7H+M6Wrt3InP7o1brFNp4bCDGhxGAsqz69VSiQ'.
|
||||
'ORwBxrrQ7itm1ac7Hp0WoGTIc3PSn0pccdcP2WorycfA1RaRHjxosZqOyhtDTSAhCf2gDAGjVHTd9sKSCumynFEZK1tIJUe58/ro'.
|
||||
'1V1//9k=' ;
|
||||
|
||||
//==========================================================
|
||||
// d5-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['5'][0]= 632 ;
|
||||
$this->digits['5'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgIFBwT/xAAoEAABAwME'.
|
||||
'AQQCAwAAAAAAAAABAgMEBQYRABIhIkEUMVFhBxNCgaH/xAAVAQEBAAAAAAAAAAAAAAAAAAAAAv/EABcRAQEBAQAAAAAAAAAAAAAA'.
|
||||
'AAABEUH/2gAMAwEAAhEDEQA/ANGvW4YVOeiRX5b4mv5Sin05IdlupPKdo/j2SO3+6TbPNQvOsTVz33KRT4csR3YUF7Dsh5OSFvug'.
|
||||
'kqG4FPBxnjxpvvi4KZb1pTpU+QwxUi2Y7ZIAefUk5ATxnB9/gbtL/wCH1UpuhPUlZlMVaQ0mS8zJjqZOPfc2TwpIUonI9tw40R1r'.
|
||||
'WNGq/wBdJR1XT3lqHBUnGCfkfWjRWs1ve249erQqQYjOtN1FqPUpCXQ4WIzQSsJwT0UpRwQPG0nzqyuNHobjsl9kBuWqoOoXtT1/'.
|
||||
'WppZcA8lKRj64HxqU+3KpAr6plElRVKef3S4E0K9O8pLXVzKcqSsJAB9wSAca6bSoNXeuA1+5pEV+SGFNU1iKVFqI0Vdx2AJUeoz'.
|
||||
'8DGlTDwG3CAf3q/pI0ah6MDhLz6U+EpXwPoaNMU//9k=' ;
|
||||
|
||||
//==========================================================
|
||||
// d1-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['1'][0]= 646 ;
|
||||
$this->digits['1'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEwMBIgACEQEDEQH/xAAZAAADAAMAAAAAAAAAAAAAAAAABQYCBAf/xAApEAACAQMD'.
|
||||
'AwQBBQAAAAAAAAABAgMEBREABiESMUEHEyJRkSNCYXGB/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAEC/8QAFxEBAQEBAAAAAAAAAAAA'.
|
||||
'AAAAAAEREv/aAAwDAQACEQMRAD8A6jdd4WLbstILnc4Uq0VoWpkJknb6IjXLHJUePOlez923fcW4r1SxWlqC2UbdKirQif3Xw3yA'.
|
||||
'OFAGT09/kO3OmV3a20MFRf6lIYPcpy7yRRAzgxjIy2M8YwcdiBzpX6d22VNvUlTXsFkuwkrKqNSfnK7F8OTzwrAY+l5zoxKskudN'.
|
||||
'EgQPUT9PBkWF3DH+1GPxo1mLnRoAqF2VRgGOFmX/AAgY/GjRUP6hVMFv2FuFqUvUGrpDFJMBnpdyF5bsAQew7Hxzp6LZNT0yQ1DI'.
|
||||
'wp0QCFBhD0jCsfLZHxbx5xxpTuvb1+v9PV7Ztk9roLPLCjmSSN3mX5ZwqjCgZX7PfWxDQb2in96pv9qq46aTE0bW4x9ceAWAYPwS'.
|
||||
'PsYzoixgmheBGjIVcYCnjp/jHjHbRpe1JLn9OnopE/a0ykvjwDx47aNMXqP/2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d8-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['8'][0]= 694 ;
|
||||
$this->digits['8'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AFQMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABgcEBf/EACsQAAEDAwMD'.
|
||||
'AwMFAAAAAAAAAAECAwQFBhEAEiEUMVEHE0EVYYEiIzJCsf/EABYBAQEBAAAAAAAAAAAAAAAAAAIAAf/EABcRAQEBAQAAAAAAAAAA'.
|
||||
'AAAAAAABERL/2gAMAwEAAhEDEQA/AKL6gVVUa0i1T5QjvTprUJMlxW4R9zgQXe/AH+kaWrntqlWjaq7gpcmotXAw82ht9yY4tch8'.
|
||||
'uAFC0k7VBXPGMY51ruiaue+bThIj+7NbWqS+7HDxajFf6AlB/k44o8ZOABk4xkL0X0tZiojKrlRuGRJjugqldSlKGf6t7BuUQe3J'.
|
||||
'44xxxrA1a4KVJipLidri8uLHgqOcfjOPxo0o2hdDvS1CmV2Yl6fS5ioipIQR1CAlKkLKR2UUqAI8g6NRSwuuyHab6s1ufLI/Zai7'.
|
||||
'UBJOxhTS0+6B32pWSFH4CidOdWU0ukLiN1BLr0zG5Sdm3GRvcPhIT858DvjXNrVsSLnm/VIdTXS6tTnFsxZTSN3jchaTwps+O/z9'.
|
||||
'tcBVq3hIX0tYqlIiQHdy5CqRHKHXEjAOMgBKjnvyRk4xrQa7OiGt1K5biYZL8SoVEpjOqkFsONtJCNwASeCQrn7aNUKnQYtLp7EC'.
|
||||
'EylmLHQltptPZKQOBo1FzH//2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d4-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['4'][0]= 643 ;
|
||||
$this->digits['4'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAYAAADAQEAAAAAAAAAAAAAAAAABAYHAv/EAC0QAAIBAwQA'.
|
||||
'BAMJAAAAAAAAAAECAwQFEQAGEiETFDFBUmGBByIjUVNxobHR/8QAFgEBAQEAAAAAAAAAAAAAAAAAAAIB/8QAGBEBAAMBAAAAAAAA'.
|
||||
'AAAAAAAAAAERIVH/2gAMAwEAAhEDEQA/ANjM00Nxmt1xiWW31CZp5uJwoAAaOQ/n7qfcZHqO5my3q5XX7R6ijiqnNut9u4NyJ4yv'.
|
||||
'JJyjYr8Xhrn5g599J7x3ulBNU7Zo7dXXXcLQ8kURYi4epYtkALjOePv1nUvbLvV7P3BZm3DR3eh88Kp7pVzBZI6iUhGWRRGWwE44'.
|
||||
'HX3V+uiL1uHgt+vL/H+aNJQ3CSeCOaFqSaJ1DJKs/TqRkMOvQjvRorHE4pRDLNWLGlRHGUeYIORXs9e5B7OP31E0fmdyb/t0DJ4Q'.
|
||||
'27bfx3YZzPUIoAAz7IpOD6cuxq0uNumqLfVNDOqXBoZEjnZcqhIPXH4c46+WkdoWOltu3IDDLLLVVR83UVcuPEmmcZZ2/rHoAANG'.
|
||||
'GI7KIY1ijoLeEQBVCwIoAHpgY6Hy0aZe7mJ2jeHLKcEhusj6aNKgzr//2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d7-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['7'][0]= 658 ;
|
||||
$this->digits['7'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABgEFBwT/xAAuEAABAwIE'.
|
||||
'BAQGAwAAAAAAAAABAgMEBREABiExEhMiQSMyUXEHFBclVJFhk9L/xAAXAQADAQAAAAAAAAAAAAAAAAAAAQID/8QAGREBAQEAAwAA'.
|
||||
'AAAAAAAAAAAAAAEREiFR/9oADAMBAAIRAxEAPwDXq9mCjZeQ05VZ5ZST4bfEpa3VdglCbqUe+g9MZ5Uq7V8415WXoMSdQ6etgSps'.
|
||||
'19wpkCMDZKUpv0FZvbi1NzpYasMDLDUbMVXrtQdbeeU23xLWkj5RlLYK0J7anW9gbAjCzkOtsVSUJUdtc6dVZK51UeaFm4LKbhpC'.
|
||||
'l7EhIFkDW974GbRI2XorUVls1OTdKAOqUpR0Hc3198GITQ6k+hLwrEpoODiDenRfW23bBicg78JXxPpD0mgVOW5PAivNNpahsPW5'.
|
||||
'8xxQaSVkboQnhsnYm5OHqDGp1IpsalMKjMsMIC3+XZKbJFth62/QOEfMOZqZXp9JcKZTcGmTky3meSi7xQklI81vMR+sXIz/AEgp'.
|
||||
'Q0qPNu6ea8Q2jqtbp8+2w9h/OKORc/cpHjt1dDSHOtLZ4ekHW23bBjj+o9H/AB539aP94MG0+L//2Q==' ;
|
||||
|
||||
//==========================================================
|
||||
// d3-small.jpg
|
||||
//==========================================================
|
||||
$this->digits['3'][0]= 662 ;
|
||||
$this->digits['3'][1]=
|
||||
'/9j/4AAQSkZJRgABAQEASgBKAAD//gAJSnBHcmFwaP/bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicg'.
|
||||
'IiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0Mv/bAEMBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy'.
|
||||
'MjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAB4AEgMBIgACEQEDEQH/xAAZAAACAwEAAAAAAAAAAAAAAAAABAUGBwL/xAArEAABBAED'.
|
||||
'AwMDBQEAAAAAAAABAgMEBREABhIhMUEiMmETFZEHFkJDUdH/xAAWAQEBAQAAAAAAAAAAAAAAAAABAAL/xAAYEQEBAQEBAAAAAAAA'.
|
||||
'AAAAAAAAEQExQf/aAAwDAQACEQMRAD8A0vclruBdk3VVLLUNssGRJsZSCtqOjlgJAHvcOD6c4HnOdIbcttw1W5P29cFEhuawqTXS'.
|
||||
'VsJjnCMBxKkJJx7goAde+ceJfdNxU0UNlyymyXHi6kxWUNl1S3EnkAEIHX2nv86qtTuZr9Q9+1VhRsOoYpYcgSVyAE/TdewkJxnK'.
|
||||
'sBCjkdPGpnOtFMd3PqsXgfOAgD8Y0aX+11H9rDDjn8lr9yj5J+dGqsqxaw6Cc9cQZU4Sp7zTJsIrKlcUEKwhSin1JABI45GUjqOu'.
|
||||
'lbOvjbc3Ts9ynjGCy445UuFLYRzbWgrT6fhSCQSMDke+pew2zYVly/d7YchNqkMJZnQpgV9J8IzwWFJyUrAJHYgjvpLbu37G5nR7'.
|
||||
'vck5C3YRKYEOEVJZj8kjKypXqWvirjk9h+dB9i4faa89TDZUfKlIyT8k+To10a6KTkpcJ/0vL/7o0TS//9k=' ;
|
||||
}
|
||||
}
|
||||
|
||||
class AntiSpam {
|
||||
|
||||
private $iNumber='';
|
||||
|
||||
function __construct($aNumber='') {
|
||||
$this->iNumber = $aNumber;
|
||||
}
|
||||
|
||||
function Rand($aLen) {
|
||||
$d='';
|
||||
for($i=0; $i < $aLen; ++$i) {
|
||||
$d .= rand(1,9);
|
||||
}
|
||||
$this->iNumber = $d;
|
||||
return $d;
|
||||
}
|
||||
|
||||
function Stroke() {
|
||||
|
||||
$n=strlen($this->iNumber);
|
||||
for($i=0; $i < $n; ++$i ) {
|
||||
if( !is_numeric($this->iNumber[$i]) || $this->iNumber[$i]==0 ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$dd = new HandDigits();
|
||||
$n = strlen($this->iNumber);
|
||||
$img = @imagecreatetruecolor($n*$dd->iWidth, $dd->iHeight);
|
||||
if( $img < 1 ) {
|
||||
return false;
|
||||
}
|
||||
$start=0;
|
||||
for($i=0; $i < $n; ++$i ) {
|
||||
$size = $dd->digits[$this->iNumber[$i]][0];
|
||||
$dimg = imagecreatefromstring(base64_decode($dd->digits[$this->iNumber[$i]][1]));
|
||||
imagecopy($img,$dimg,$start,0,0,0,imagesx($dimg), $dd->iHeight);
|
||||
$start += imagesx($dimg);
|
||||
}
|
||||
$resimg = @imagecreatetruecolor($start+4, $dd->iHeight+4);
|
||||
if( $resimg < 1 ) {
|
||||
return false;
|
||||
}
|
||||
imagecopy($resimg,$img,2,2,0,0,$start, $dd->iHeight);
|
||||
header("Content-type: image/jpeg");
|
||||
imagejpeg($resimg);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,77 +1,95 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_CANVAS.PHP
|
||||
// Description: Canvas drawing extension for JpGraph
|
||||
// Created: 2001-01-08
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_canvas.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
//===================================================
|
||||
// CLASS CanvasGraph
|
||||
// Description: Creates a simple canvas graph which
|
||||
// might be used together with the basic Image drawing
|
||||
// primitives. Useful to auickoly produce some arbitrary
|
||||
// graphic which benefits from all the functionality in the
|
||||
// graph liek caching for example.
|
||||
//===================================================
|
||||
class CanvasGraph extends Graph {
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function CanvasGraph($aWidth=300,$aHeight=200,$aCachedName="",$timeout=0,$inline=1) {
|
||||
$this->Graph($aWidth,$aHeight,$aCachedName,$timeout,$inline);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
|
||||
function InitFrame() {
|
||||
$this->StrokePlotArea();
|
||||
}
|
||||
|
||||
// Method description
|
||||
function Stroke($aStrokeFileName="") {
|
||||
if( $this->texts != null ) {
|
||||
for($i=0; $i < count($this->texts); ++$i) {
|
||||
$this->texts[$i]->Stroke($this->img);
|
||||
}
|
||||
}
|
||||
if( $this->iTables !== null ) {
|
||||
for($i=0; $i < count($this->iTables); ++$i) {
|
||||
$this->iTables[$i]->Stroke($this->img);
|
||||
}
|
||||
}
|
||||
$this->StrokeTitles();
|
||||
|
||||
// Should we do any final image transformation
|
||||
if( $this->iImgTrans ) {
|
||||
if( !class_exists('ImgTrans') ) {
|
||||
require_once('jpgraph_imgtrans.php');
|
||||
}
|
||||
|
||||
$tform = new ImgTrans($this->img->img);
|
||||
$this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist,
|
||||
$this->iImgTransDirection,$this->iImgTransHighQ,
|
||||
$this->iImgTransMinSize,$this->iImgTransFillColor,
|
||||
$this->iImgTransBorder);
|
||||
}
|
||||
|
||||
|
||||
// If the filename is given as the special _IMG_HANDLER
|
||||
// then the image handler is returned and the image is NOT
|
||||
// streamed back
|
||||
if( $aStrokeFileName == _IMG_HANDLER ) {
|
||||
return $this->img->img;
|
||||
}
|
||||
else {
|
||||
// Finally stream the generated picture
|
||||
$this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} // Class
|
||||
/* EOF */
|
||||
?>
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_CANVAS.PHP
|
||||
// Description: Canvas drawing extension for JpGraph
|
||||
// Created: 2001-01-08
|
||||
// Ver: $Id: jpgraph_canvas.php 1923 2010-01-11 13:48:49Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
//===================================================
|
||||
// CLASS CanvasGraph
|
||||
// Description: Creates a simple canvas graph which
|
||||
// might be used together with the basic Image drawing
|
||||
// primitives. Useful to auickoly produce some arbitrary
|
||||
// graphic which benefits from all the functionality in the
|
||||
// graph liek caching for example.
|
||||
//===================================================
|
||||
class CanvasGraph extends Graph {
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct($aWidth=300,$aHeight=200,$aCachedName="",$timeout=0,$inline=1) {
|
||||
parent::__construct($aWidth,$aHeight,$aCachedName,$timeout,$inline);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
|
||||
function InitFrame() {
|
||||
$this->StrokePlotArea();
|
||||
}
|
||||
|
||||
// Method description
|
||||
function Stroke($aStrokeFileName="") {
|
||||
if( $this->texts != null ) {
|
||||
for($i=0; $i < count($this->texts); ++$i) {
|
||||
$this->texts[$i]->Stroke($this->img);
|
||||
}
|
||||
}
|
||||
if( $this->iTables !== null ) {
|
||||
for($i=0; $i < count($this->iTables); ++$i) {
|
||||
$this->iTables[$i]->Stroke($this->img);
|
||||
}
|
||||
}
|
||||
$this->StrokeTitles();
|
||||
|
||||
// If the filename is the predefined value = '_csim_special_'
|
||||
// we assume that the call to stroke only needs to do enough
|
||||
// to correctly generate the CSIM maps.
|
||||
// We use this variable to skip things we don't strictly need
|
||||
// to do to generate the image map to improve performance
|
||||
// a best we can. Therefor you will see a lot of tests !$_csim in the
|
||||
// code below.
|
||||
$_csim = ($aStrokeFileName===_CSIM_SPECIALFILE);
|
||||
|
||||
// We need to know if we have stroked the plot in the
|
||||
// GetCSIMareas. Otherwise the CSIM hasn't been generated
|
||||
// and in the case of GetCSIM called before stroke to generate
|
||||
// CSIM without storing an image to disk GetCSIM must call Stroke.
|
||||
$this->iHasStroked = true;
|
||||
|
||||
if( !$_csim ) {
|
||||
|
||||
// Should we do any final image transformation
|
||||
if( $this->iImgTrans ) {
|
||||
if( !class_exists('ImgTrans',false) ) {
|
||||
require_once('jpgraph_imgtrans.php');
|
||||
}
|
||||
|
||||
$tform = new ImgTrans($this->img->img);
|
||||
$this->img->img = $tform->Skew3D($this->iImgTransHorizon,$this->iImgTransSkewDist,
|
||||
$this->iImgTransDirection,$this->iImgTransHighQ,
|
||||
$this->iImgTransMinSize,$this->iImgTransFillColor,
|
||||
$this->iImgTransBorder);
|
||||
}
|
||||
|
||||
|
||||
// If the filename is given as the special _IMG_HANDLER
|
||||
// then the image handler is returned and the image is NOT
|
||||
// streamed back
|
||||
if( $aStrokeFileName == _IMG_HANDLER ) {
|
||||
return $this->img->img;
|
||||
}
|
||||
else {
|
||||
// Finally stream the generated picture
|
||||
$this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // Class
|
||||
|
||||
/* EOF */
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,587 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_CONTOUR.PHP
|
||||
// Description: Contour plot
|
||||
// Created: 2009-03-08
|
||||
// Ver: $Id: jpgraph_contour.php 1870 2009-09-29 04:24:18Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
require_once('jpgraph_meshinterpolate.inc.php');
|
||||
define('HORIZ_EDGE',0);
|
||||
define('VERT_EDGE',1);
|
||||
|
||||
/**
|
||||
* This class encapsulates the core contour plot algorithm. It will find the path
|
||||
* of the specified isobars in the data matrix specified. It is assumed that the
|
||||
* data matrix models an equspaced X-Y mesh of datavalues corresponding to the Z
|
||||
* values.
|
||||
*
|
||||
*/
|
||||
class Contour {
|
||||
|
||||
private $dataPoints = array();
|
||||
private $nbrCols=0,$nbrRows=0;
|
||||
private $horizEdges = array(), $vertEdges=array();
|
||||
private $isobarValues = array();
|
||||
private $stack = null;
|
||||
private $isobarCoord = array();
|
||||
private $nbrIsobars = 10, $isobarColors = array();
|
||||
private $invert = true;
|
||||
private $highcontrast = false, $highcontrastbw = false;
|
||||
|
||||
/**
|
||||
* Create a new contour level "algorithm machine".
|
||||
* @param $aMatrix The values to find the contour from
|
||||
* @param $aIsobars Mixed. If integer it determines the number of isobars to be used. The levels are determined
|
||||
* automatically as equdistance between the min and max value of the matrice.
|
||||
* If $aIsobars is an array then this is interpretated as an array of values to be used as isobars in the
|
||||
* contour plot.
|
||||
* @return an instance of the contour algorithm
|
||||
*/
|
||||
function __construct($aMatrix,$aIsobars=10, $aColors=null) {
|
||||
|
||||
$this->nbrRows = count($aMatrix);
|
||||
$this->nbrCols = count($aMatrix[0]);
|
||||
$this->dataPoints = $aMatrix;
|
||||
|
||||
if( is_array($aIsobars) ) {
|
||||
// use the isobar values supplied
|
||||
$this->nbrIsobars = count($aIsobars);
|
||||
$this->isobarValues = $aIsobars;
|
||||
}
|
||||
else {
|
||||
// Determine the isobar values automatically
|
||||
$this->nbrIsobars = $aIsobars;
|
||||
list($min,$max) = $this->getMinMaxVal();
|
||||
$stepSize = ($max-$min) / $aIsobars ;
|
||||
$isobar = $min+$stepSize/2;
|
||||
for ($i = 0; $i < $aIsobars; $i++) {
|
||||
$this->isobarValues[$i] = $isobar;
|
||||
$isobar += $stepSize;
|
||||
}
|
||||
}
|
||||
|
||||
if( $aColors !== null && count($aColors) > 0 ) {
|
||||
|
||||
if( !is_array($aColors) ) {
|
||||
JpGraphError::RaiseL(28001);
|
||||
//'Third argument to Contour must be an array of colors.'
|
||||
}
|
||||
|
||||
if( count($aColors) != count($this->isobarValues) ) {
|
||||
JpGraphError::RaiseL(28002);
|
||||
//'Number of colors must equal the number of isobar lines specified';
|
||||
}
|
||||
|
||||
$this->isobarColors = $aColors;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flip the plot around the Y-coordinate. This has the same affect as flipping the input
|
||||
* data matrice
|
||||
*
|
||||
* @param $aFlg If true the the vertice in input data matrice position (0,0) corresponds to the top left
|
||||
* corner of teh plot otherwise it will correspond to the bottom left corner (a horizontal flip)
|
||||
*/
|
||||
function SetInvert($aFlg=true) {
|
||||
$this->invert = $aFlg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find the min and max values in the data matrice
|
||||
*
|
||||
* @return array(min_value,max_value)
|
||||
*/
|
||||
function getMinMaxVal() {
|
||||
$min = $this->dataPoints[0][0];
|
||||
$max = $this->dataPoints[0][0];
|
||||
for ($i = 0; $i < $this->nbrRows; $i++) {
|
||||
if( ($mi=min($this->dataPoints[$i])) < $min ) $min = $mi;
|
||||
if( ($ma=max($this->dataPoints[$i])) > $max ) $max = $ma;
|
||||
}
|
||||
return array($min,$max);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the two matrices that keeps track on where the isobars crosses the
|
||||
* horizontal and vertical edges
|
||||
*/
|
||||
function resetEdgeMatrices() {
|
||||
for ($k = 0; $k < 2; $k++) {
|
||||
for ($i = 0; $i <= $this->nbrRows; $i++) {
|
||||
for ($j = 0; $j <= $this->nbrCols; $j++) {
|
||||
$this->edges[$k][$i][$j] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the specified isobar crosses the horizontal edge specified by its row and column
|
||||
*
|
||||
* @param $aRow Row index of edge to be checked
|
||||
* @param $aCol Col index of edge to be checked
|
||||
* @param $aIsobar Isobar value
|
||||
* @return true if the isobar is crossing this edge
|
||||
*/
|
||||
function isobarHCrossing($aRow,$aCol,$aIsobar) {
|
||||
|
||||
if( $aCol >= $this->nbrCols-1 ) {
|
||||
JpGraphError::RaiseL(28003,$aCol);
|
||||
//'ContourPlot Internal Error: isobarHCrossing: Coloumn index too large (%d)'
|
||||
}
|
||||
if( $aRow >= $this->nbrRows ) {
|
||||
JpGraphError::RaiseL(28004,$aRow);
|
||||
//'ContourPlot Internal Error: isobarHCrossing: Row index too large (%d)'
|
||||
}
|
||||
|
||||
$v1 = $this->dataPoints[$aRow][$aCol];
|
||||
$v2 = $this->dataPoints[$aRow][$aCol+1];
|
||||
|
||||
return ($aIsobar-$v1)*($aIsobar-$v2) < 0 ;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the specified isobar crosses the vertical edge specified by its row and column
|
||||
*
|
||||
* @param $aRow Row index of edge to be checked
|
||||
* @param $aCol Col index of edge to be checked
|
||||
* @param $aIsobar Isobar value
|
||||
* @return true if the isobar is crossing this edge
|
||||
*/
|
||||
function isobarVCrossing($aRow,$aCol,$aIsobar) {
|
||||
|
||||
if( $aRow >= $this->nbrRows-1) {
|
||||
JpGraphError::RaiseL(28005,$aRow);
|
||||
//'isobarVCrossing: Row index too large
|
||||
}
|
||||
if( $aCol >= $this->nbrCols ) {
|
||||
JpGraphError::RaiseL(28006,$aCol);
|
||||
//'isobarVCrossing: Col index too large
|
||||
}
|
||||
|
||||
$v1 = $this->dataPoints[$aRow][$aCol];
|
||||
$v2 = $this->dataPoints[$aRow+1][$aCol];
|
||||
|
||||
return ($aIsobar-$v1)*($aIsobar-$v2) < 0 ;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine all edges, horizontal and vertical that the specified isobar crosses. The crossings
|
||||
* are recorded in the two edge matrices.
|
||||
*
|
||||
* @param $aIsobar The value of the isobar to be checked
|
||||
*/
|
||||
function determineIsobarEdgeCrossings($aIsobar) {
|
||||
|
||||
$ib = $this->isobarValues[$aIsobar];
|
||||
|
||||
for ($i = 0; $i < $this->nbrRows-1; $i++) {
|
||||
for ($j = 0; $j < $this->nbrCols-1; $j++) {
|
||||
$this->edges[HORIZ_EDGE][$i][$j] = $this->isobarHCrossing($i,$j,$ib);
|
||||
$this->edges[VERT_EDGE][$i][$j] = $this->isobarVCrossing($i,$j,$ib);
|
||||
}
|
||||
}
|
||||
|
||||
// We now have the bottom and rightmost edges unsearched
|
||||
for ($i = 0; $i < $this->nbrRows-1; $i++) {
|
||||
$this->edges[VERT_EDGE][$i][$j] = $this->isobarVCrossing($i,$this->nbrCols-1,$ib);
|
||||
}
|
||||
for ($j = 0; $j < $this->nbrCols-1; $j++) {
|
||||
$this->edges[HORIZ_EDGE][$i][$j] = $this->isobarHCrossing($this->nbrRows-1,$j,$ib);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the normalized coordinates for the crossing of the specified edge with the specified
|
||||
* isobar- The crossing is simpy detrmined with a linear interpolation between the two vertices
|
||||
* on each side of the edge and the value of the isobar
|
||||
*
|
||||
* @param $aRow Row of edge
|
||||
* @param $aCol Column of edge
|
||||
* @param $aEdgeDir Determine if this is a horizontal or vertical edge
|
||||
* @param $ib The isobar value
|
||||
* @return unknown_type
|
||||
*/
|
||||
function getCrossingCoord($aRow,$aCol,$aEdgeDir,$aIsobarVal) {
|
||||
|
||||
// In order to avoid numerical problem when two vertices are very close
|
||||
// we have to check and avoid dividing by close to zero denumerator.
|
||||
if( $aEdgeDir == HORIZ_EDGE ) {
|
||||
$d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow][$aCol+1]);
|
||||
if( $d > 0.001 ) {
|
||||
$xcoord = $aCol + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d;
|
||||
}
|
||||
else {
|
||||
$xcoord = $aCol;
|
||||
}
|
||||
$ycoord = $aRow;
|
||||
}
|
||||
else {
|
||||
$d = abs($this->dataPoints[$aRow][$aCol] - $this->dataPoints[$aRow+1][$aCol]);
|
||||
if( $d > 0.001 ) {
|
||||
$ycoord = $aRow + abs($aIsobarVal - $this->dataPoints[$aRow][$aCol]) / $d;
|
||||
}
|
||||
else {
|
||||
$ycoord = $aRow;
|
||||
}
|
||||
$xcoord = $aCol;
|
||||
}
|
||||
if( $this->invert ) {
|
||||
$ycoord = $this->nbrRows-1 - $ycoord;
|
||||
}
|
||||
return array($xcoord,$ycoord);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* In order to avoid all kinds of unpleasent extra checks and complex boundary
|
||||
* controls for the degenerated case where the contour levels exactly crosses
|
||||
* one of the vertices we add a very small delta (0.1%) to the data point value.
|
||||
* This has no visible affect but it makes the code sooooo much cleaner.
|
||||
*
|
||||
*/
|
||||
function adjustDataPointValues() {
|
||||
|
||||
$ni = count($this->isobarValues);
|
||||
for ($k = 0; $k < $ni; $k++) {
|
||||
$ib = $this->isobarValues[$k];
|
||||
for ($row = 0 ; $row < $this->nbrRows-1; ++$row) {
|
||||
for ($col = 0 ; $col < $this->nbrCols-1; ++$col ) {
|
||||
if( abs($this->dataPoints[$row][$col] - $ib) < 0.0001 ) {
|
||||
$this->dataPoints[$row][$col] += $this->dataPoints[$row][$col]*0.001;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $aFlg
|
||||
* @param $aBW
|
||||
* @return unknown_type
|
||||
*/
|
||||
function UseHighContrastColor($aFlg=true,$aBW=false) {
|
||||
$this->highcontrast = $aFlg;
|
||||
$this->highcontrastbw = $aBW;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate suitable colors for each defined isobar
|
||||
*
|
||||
*/
|
||||
function CalculateColors() {
|
||||
if ( $this->highcontrast ) {
|
||||
if ( $this->highcontrastbw ) {
|
||||
for ($ib = 0; $ib < $this->nbrIsobars; $ib++) {
|
||||
$this->isobarColors[$ib] = 'black';
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Use only blue/red scale
|
||||
$step = round(255/($this->nbrIsobars-1));
|
||||
for ($ib = 0; $ib < $this->nbrIsobars; $ib++) {
|
||||
$this->isobarColors[$ib] = array($ib*$step, 50, 255-$ib*$step);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$n = $this->nbrIsobars;
|
||||
$v = 0; $step = 1 / ($this->nbrIsobars-1);
|
||||
for ($ib = 0; $ib < $this->nbrIsobars; $ib++) {
|
||||
$this->isobarColors[$ib] = RGB::GetSpectrum($v);
|
||||
$v += $step;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is where the main work is done. For each isobar the crossing of the edges are determined
|
||||
* and then each cell is analyzed to find the 0, 2 or 4 crossings. Then the normalized coordinate
|
||||
* for the crossings are determined and pushed on to the isobar stack. When the method is finished
|
||||
* the $isobarCoord will hold one arrayfor each isobar where all the line segments that makes
|
||||
* up the contour plot are stored.
|
||||
*
|
||||
* @return array( $isobarCoord, $isobarValues, $isobarColors )
|
||||
*/
|
||||
function getIsobars() {
|
||||
|
||||
$this->adjustDataPointValues();
|
||||
|
||||
for ($isobar = 0; $isobar < $this->nbrIsobars; $isobar++) {
|
||||
|
||||
$ib = $this->isobarValues[$isobar];
|
||||
$this->resetEdgeMatrices();
|
||||
$this->determineIsobarEdgeCrossings($isobar);
|
||||
$this->isobarCoord[$isobar] = array();
|
||||
|
||||
$ncoord = 0;
|
||||
|
||||
for ($row = 0 ; $row < $this->nbrRows-1; ++$row) {
|
||||
for ($col = 0 ; $col < $this->nbrCols-1; ++$col ) {
|
||||
|
||||
// Find out how many crossings around the edges
|
||||
$n = 0;
|
||||
if ( $this->edges[HORIZ_EDGE][$row][$col] ) $neigh[$n++] = array($row, $col, HORIZ_EDGE);
|
||||
if ( $this->edges[HORIZ_EDGE][$row+1][$col] ) $neigh[$n++] = array($row+1,$col, HORIZ_EDGE);
|
||||
if ( $this->edges[VERT_EDGE][$row][$col] ) $neigh[$n++] = array($row, $col, VERT_EDGE);
|
||||
if ( $this->edges[VERT_EDGE][$row][$col+1] ) $neigh[$n++] = array($row, $col+1,VERT_EDGE);
|
||||
|
||||
if ( $n == 2 ) {
|
||||
$n1=0; $n2=1;
|
||||
$this->isobarCoord[$isobar][$ncoord++] = array(
|
||||
$this->getCrossingCoord($neigh[$n1][0],$neigh[$n1][1],$neigh[$n1][2],$ib),
|
||||
$this->getCrossingCoord($neigh[$n2][0],$neigh[$n2][1],$neigh[$n2][2],$ib) );
|
||||
}
|
||||
elseif ( $n == 4 ) {
|
||||
// We must determine how to connect the edges either northwest->southeast or
|
||||
// northeast->southwest. We do that by calculating the imaginary middle value of
|
||||
// the cell by averaging the for corners. This will compared with the value of the
|
||||
// top left corner will help determine the orientation of the ridge/creek
|
||||
$midval = ($this->dataPoints[$row][$col]+$this->dataPoints[$row][$col+1]+$this->dataPoints[$row+1][$col]+$this->dataPoints[$row+1][$col+1])/4;
|
||||
$v = $this->dataPoints[$row][$col];
|
||||
if( $midval == $ib ) {
|
||||
// Orientation "+"
|
||||
$n1=0; $n2=1; $n3=2; $n4=3;
|
||||
} elseif ( ($midval > $ib && $v > $ib) || ($midval < $ib && $v < $ib) ) {
|
||||
// Orientation of ridge/valley = "\"
|
||||
$n1=0; $n2=3; $n3=2; $n4=1;
|
||||
} elseif ( ($midval > $ib && $v < $ib) || ($midval < $ib && $v > $ib) ) {
|
||||
// Orientation of ridge/valley = "/"
|
||||
$n1=0; $n2=2; $n3=3; $n4=1;
|
||||
}
|
||||
|
||||
$this->isobarCoord[$isobar][$ncoord++] = array(
|
||||
$this->getCrossingCoord($neigh[$n1][0],$neigh[$n1][1],$neigh[$n1][2],$ib),
|
||||
$this->getCrossingCoord($neigh[$n2][0],$neigh[$n2][1],$neigh[$n2][2],$ib) );
|
||||
|
||||
$this->isobarCoord[$isobar][$ncoord++] = array(
|
||||
$this->getCrossingCoord($neigh[$n3][0],$neigh[$n3][1],$neigh[$n3][2],$ib),
|
||||
$this->getCrossingCoord($neigh[$n4][0],$neigh[$n4][1],$neigh[$n4][2],$ib) );
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( count($this->isobarColors) == 0 ) {
|
||||
// No manually specified colors. Calculate them automatically.
|
||||
$this->CalculateColors();
|
||||
}
|
||||
return array( $this->isobarCoord, $this->isobarValues, $this->isobarColors );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This class represent a plotting of a contour outline of data given as a X-Y matrice
|
||||
*
|
||||
*/
|
||||
class ContourPlot extends Plot {
|
||||
|
||||
private $contour, $contourCoord, $contourVal, $contourColor;
|
||||
private $nbrCountours = 0 ;
|
||||
private $dataMatrix = array();
|
||||
private $invertLegend = false;
|
||||
private $interpFactor = 1;
|
||||
private $flipData = false;
|
||||
private $isobar = 10;
|
||||
private $showLegend = false;
|
||||
private $highcontrast = false, $highcontrastbw = false;
|
||||
private $manualIsobarColors = array();
|
||||
|
||||
/**
|
||||
* Construct a contour plotting algorithm. The end result of the algorithm is a sequence of
|
||||
* line segments for each isobar given as two vertices.
|
||||
*
|
||||
* @param $aDataMatrix The Z-data to be used
|
||||
* @param $aIsobar A mixed variable, if it is an integer then this specified the number of isobars to use.
|
||||
* The values of the isobars are automatically detrmined to be equ-spaced between the min/max value of the
|
||||
* data. If it is an array then it explicetely gives the isobar values
|
||||
* @param $aInvert By default the matrice with row index 0 corresponds to Y-value 0, i.e. in the bottom of
|
||||
* the plot. If this argument is true then the row with the highest index in the matrice corresponds to
|
||||
* Y-value 0. In affect flipping the matrice around an imaginary horizontal axis.
|
||||
* @param $aHighContrast Use high contrast colors (blue/red:ish)
|
||||
* @param $aHighContrastBW Use only black colors for contours
|
||||
* @return an instance of the contour plot algorithm
|
||||
*/
|
||||
function __construct($aDataMatrix, $aIsobar=10, $aFactor=1, $aInvert=false, $aIsobarColors=array()) {
|
||||
|
||||
$this->dataMatrix = $aDataMatrix;
|
||||
$this->flipData = $aInvert;
|
||||
$this->isobar = $aIsobar;
|
||||
$this->interpFactor = $aFactor;
|
||||
|
||||
if ( $this->interpFactor > 1 ) {
|
||||
|
||||
if( $this->interpFactor > 5 ) {
|
||||
JpGraphError::RaiseL(28007);// ContourPlot interpolation factor is too large (>5)
|
||||
}
|
||||
|
||||
$ip = new MeshInterpolate();
|
||||
$this->dataMatrix = $ip->Linear($this->dataMatrix, $this->interpFactor);
|
||||
}
|
||||
|
||||
$this->contour = new Contour($this->dataMatrix,$this->isobar,$aIsobarColors);
|
||||
|
||||
if( is_array($aIsobar) )
|
||||
$this->nbrContours = count($aIsobar);
|
||||
else
|
||||
$this->nbrContours = $aIsobar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Flipe the data around the center
|
||||
*
|
||||
* @param $aFlg
|
||||
*
|
||||
*/
|
||||
function SetInvert($aFlg=true) {
|
||||
$this->flipData = $aFlg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the colors for the isobar lines
|
||||
*
|
||||
* @param $aColorArray
|
||||
*
|
||||
*/
|
||||
function SetIsobarColors($aColorArray) {
|
||||
$this->manualIsobarColors = $aColorArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the legend
|
||||
*
|
||||
* @param $aFlg true if the legend should be shown
|
||||
*
|
||||
*/
|
||||
function ShowLegend($aFlg=true) {
|
||||
$this->showLegend = $aFlg;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $aFlg true if the legend should start with the lowest isobar on top
|
||||
* @return unknown_type
|
||||
*/
|
||||
function Invertlegend($aFlg=true) {
|
||||
$this->invertLegend = $aFlg;
|
||||
}
|
||||
|
||||
/* Internal method. Give the min value to be used for the scaling
|
||||
*
|
||||
*/
|
||||
function Min() {
|
||||
return array(0,0);
|
||||
}
|
||||
|
||||
/* Internal method. Give the max value to be used for the scaling
|
||||
*
|
||||
*/
|
||||
function Max() {
|
||||
return array(count($this->dataMatrix[0])-1,count($this->dataMatrix)-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal ramewrok method to setup the legend to be used for this plot.
|
||||
* @param $aGraph The parent graph class
|
||||
*/
|
||||
function Legend($aGraph) {
|
||||
|
||||
if( ! $this->showLegend )
|
||||
return;
|
||||
|
||||
if( $this->invertLegend ) {
|
||||
for ($i = 0; $i < $this->nbrContours; $i++) {
|
||||
$aGraph->legend->Add(sprintf('%.1f',$this->contourVal[$i]), $this->contourColor[$i]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for ($i = $this->nbrContours-1; $i >= 0 ; $i--) {
|
||||
$aGraph->legend->Add(sprintf('%.1f',$this->contourVal[$i]), $this->contourColor[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Framework function which gets called before the Stroke() method is called
|
||||
*
|
||||
* @see Plot#PreScaleSetup($aGraph)
|
||||
*
|
||||
*/
|
||||
function PreScaleSetup($aGraph) {
|
||||
$xn = count($this->dataMatrix[0])-1;
|
||||
$yn = count($this->dataMatrix)-1;
|
||||
|
||||
$aGraph->xaxis->scale->Update($aGraph->img,0,$xn);
|
||||
$aGraph->yaxis->scale->Update($aGraph->img,0,$yn);
|
||||
|
||||
$this->contour->SetInvert($this->flipData);
|
||||
list($this->contourCoord,$this->contourVal,$this->contourColor) = $this->contour->getIsobars();
|
||||
}
|
||||
|
||||
/**
|
||||
* Use high contrast color schema
|
||||
*
|
||||
* @param $aFlg True, to use high contrast color
|
||||
* @param $aBW True, Use only black and white color schema
|
||||
*/
|
||||
function UseHighContrastColor($aFlg=true,$aBW=false) {
|
||||
$this->highcontrast = $aFlg;
|
||||
$this->highcontrastbw = $aBW;
|
||||
$this->contour->UseHighContrastColor($this->highcontrast,$this->highcontrastbw);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal method. Stroke the contour plot to the graph
|
||||
*
|
||||
* @param $img Image handler
|
||||
* @param $xscale Instance of the xscale to use
|
||||
* @param $yscale Instance of the yscale to use
|
||||
*/
|
||||
function Stroke($img,$xscale,$yscale) {
|
||||
|
||||
if( count($this->manualIsobarColors) > 0 ) {
|
||||
$this->contourColor = $this->manualIsobarColors;
|
||||
if( count($this->manualIsobarColors) != $this->nbrContours ) {
|
||||
JpGraphError::RaiseL(28002);
|
||||
}
|
||||
}
|
||||
|
||||
$img->SetLineWeight($this->line_weight);
|
||||
|
||||
for ($c = 0; $c < $this->nbrContours; $c++) {
|
||||
|
||||
$img->SetColor( $this->contourColor[$c] );
|
||||
|
||||
$n = count($this->contourCoord[$c]);
|
||||
$i = 0;
|
||||
while ( $i < $n ) {
|
||||
list($x1,$y1) = $this->contourCoord[$c][$i][0];
|
||||
$x1t = $xscale->Translate($x1);
|
||||
$y1t = $yscale->Translate($y1);
|
||||
|
||||
list($x2,$y2) = $this->contourCoord[$c][$i++][1];
|
||||
$x2t = $xscale->Translate($x2);
|
||||
$y2t = $yscale->Translate($y2);
|
||||
|
||||
$img->Line($x1t,$y1t,$x2t,$y2t);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// EOF
|
||||
?>
|
@ -1,492 +1,505 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_DATE.PHP
|
||||
// Description: Classes to handle Date scaling
|
||||
// Created: 2005-05-02
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_date.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
DEFINE('HOURADJ_1',0+30);
|
||||
DEFINE('HOURADJ_2',1+30);
|
||||
DEFINE('HOURADJ_3',2+30);
|
||||
DEFINE('HOURADJ_4',3+30);
|
||||
DEFINE('HOURADJ_6',4+30);
|
||||
DEFINE('HOURADJ_12',5+30);
|
||||
|
||||
DEFINE('MINADJ_1',0+20);
|
||||
DEFINE('MINADJ_5',1+20);
|
||||
DEFINE('MINADJ_10',2+20);
|
||||
DEFINE('MINADJ_15',3+20);
|
||||
DEFINE('MINADJ_30',4+20);
|
||||
|
||||
DEFINE('SECADJ_1',0);
|
||||
DEFINE('SECADJ_5',1);
|
||||
DEFINE('SECADJ_10',2);
|
||||
DEFINE('SECADJ_15',3);
|
||||
DEFINE('SECADJ_30',4);
|
||||
|
||||
|
||||
DEFINE('YEARADJ_1',0+30);
|
||||
DEFINE('YEARADJ_2',1+30);
|
||||
DEFINE('YEARADJ_5',2+30);
|
||||
|
||||
DEFINE('MONTHADJ_1',0+20);
|
||||
DEFINE('MONTHADJ_6',1+20);
|
||||
|
||||
DEFINE('DAYADJ_1',0);
|
||||
DEFINE('DAYADJ_WEEK',1);
|
||||
DEFINE('DAYADJ_7',1);
|
||||
|
||||
DEFINE('SECPERYEAR',31536000);
|
||||
DEFINE('SECPERDAY',86400);
|
||||
DEFINE('SECPERHOUR',3600);
|
||||
DEFINE('SECPERMIN',60);
|
||||
|
||||
|
||||
class DateScale extends LinearScale {
|
||||
var $date_format = '';
|
||||
var $iStartAlign = false, $iEndAlign = false;
|
||||
var $iStartTimeAlign = false, $iEndTimeAlign = false;
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function DateScale($aMin=0,$aMax=0,$aType='x') {
|
||||
assert($aType=="x");
|
||||
assert($aMin<=$aMax);
|
||||
|
||||
$this->type=$aType;
|
||||
$this->scale=array($aMin,$aMax);
|
||||
$this->world_size=$aMax-$aMin;
|
||||
$this->ticks = new LinearTicks();
|
||||
$this->intscale=true;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Utility Function AdjDate()
|
||||
// Description: Will round a given time stamp to an even year, month or day
|
||||
// argument.
|
||||
//------------------------------------------------------------------------------------------
|
||||
|
||||
function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h=0;$i=0;$s=0;
|
||||
if( $aYearType !== false ) {
|
||||
$yearAdj = array(0=>1, 1=>2, 2=>5);
|
||||
if( $aRound == 0 ) {
|
||||
$y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
||||
}
|
||||
else {
|
||||
++$y;
|
||||
$y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
||||
}
|
||||
$m=1;$d=1;
|
||||
}
|
||||
elseif( $aMonthType !== false ) {
|
||||
$monthAdj = array(0=>1, 1=>6);
|
||||
if( $aRound == 0 ) {
|
||||
$m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
||||
$d=1;
|
||||
}
|
||||
else {
|
||||
++$m;
|
||||
$m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
||||
$d=1;
|
||||
}
|
||||
}
|
||||
elseif( $aDayType !== false ) {
|
||||
if( $aDayType == 0 ) {
|
||||
if( $aRound == 1 ) {
|
||||
//++$d;
|
||||
$h=23;$i=59;$s=59;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Adjust to an even week boundary.
|
||||
$w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat
|
||||
if( true ) { // Adjust to start on Mon
|
||||
if( $w==0 ) $w=6;
|
||||
else --$w;
|
||||
}
|
||||
if( $aRound == 0 ) {
|
||||
$d -= $w;
|
||||
}
|
||||
else {
|
||||
$d += (7-$w);
|
||||
$h=23;$i=59;$s=59;
|
||||
}
|
||||
}
|
||||
}
|
||||
return mktime($h,$i,$s,$m,$d,$y);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
||||
// it downwards.
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||
return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
||||
// it upwards
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||
return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Utility Function AdjTime()
|
||||
// Description: Will round a given time stamp to an even time according to
|
||||
// argument.
|
||||
//------------------------------------------------------------------------------------------
|
||||
|
||||
function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime);
|
||||
if( $aHourType !== false ) {
|
||||
$aHourType %= 6;
|
||||
$hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12);
|
||||
if( $aRound == 0 )
|
||||
$h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
||||
else {
|
||||
if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) {
|
||||
$h++;
|
||||
}
|
||||
$h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
||||
if( $h >= 24 ) {
|
||||
$aTime += 86400;
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h -= 24;
|
||||
}
|
||||
}
|
||||
$i=0;$s=0;
|
||||
}
|
||||
elseif( $aMinType !== false ) {
|
||||
$aMinType %= 5;
|
||||
$minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
||||
if( $aRound == 0 ) {
|
||||
$i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
||||
}
|
||||
else {
|
||||
if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) {
|
||||
$i++;
|
||||
}
|
||||
$i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
||||
if( $i >= 60) {
|
||||
$aTime += 3600;
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h = (int)date('H',$aTime); $i = 0;
|
||||
}
|
||||
}
|
||||
$s=0;
|
||||
}
|
||||
elseif( $aSecType !== false ) {
|
||||
$aSecType %= 5;
|
||||
$secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
||||
if( $aRound == 0 ) {
|
||||
$s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType];
|
||||
}
|
||||
else {
|
||||
$s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType];
|
||||
if( $s >= 60) {
|
||||
$s=0;
|
||||
$aTime += 60;
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mktime($h,$i,$s,$m,$d,$y);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
||||
// it downwards.
|
||||
// Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||
return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
||||
// it upwards
|
||||
// Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||
return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// DateAutoScale
|
||||
// Autoscale a date axis given start and end time
|
||||
// Returns an array ($start,$end,$major,$minor,$format)
|
||||
//------------------------------------------------------------------------------------------
|
||||
function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) {
|
||||
// Format of array
|
||||
// array ( Decision point, array( array( Major-scale-step-array ),
|
||||
// array( Minor-scale-step-array ),
|
||||
// array( 0=date-adjust, 1=time-adjust, adjustment-alignment) )
|
||||
//
|
||||
$scalePoints =
|
||||
array(
|
||||
/* Intervall larger than 10 years */
|
||||
SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2),
|
||||
array(SECPERYEAR),
|
||||
array(0,YEARADJ_1, 0,YEARADJ_1) ),
|
||||
|
||||
/* Intervall larger than 2 years */
|
||||
SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR),
|
||||
array(0,YEARADJ_1) ),
|
||||
|
||||
/* Intervall larger than 90 days (approx 3 month) */
|
||||
SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY),
|
||||
array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY),
|
||||
array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)),
|
||||
|
||||
/* Intervall larger than 30 days (approx 1 month) */
|
||||
SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY),
|
||||
array(SECPERDAY,SECPERDAY.SECPERDAY,SECPERDAY),
|
||||
array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)),
|
||||
|
||||
/* Intervall larger than 7 days */
|
||||
SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2),
|
||||
array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR),
|
||||
array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)),
|
||||
|
||||
/* Intervall larger than 1 day */
|
||||
SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR),
|
||||
array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR),
|
||||
array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)),
|
||||
|
||||
/* Intervall larger than 12 hours */
|
||||
SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600),
|
||||
array(1800,1800,900,300,300),
|
||||
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||
|
||||
/* Intervall larger than 2 hours */
|
||||
SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300),
|
||||
array(1800,900,300,120,60),
|
||||
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||
|
||||
/* Intervall larger than 1 hours */
|
||||
SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60),
|
||||
array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||
|
||||
/* Intervall larger than 30 min */
|
||||
SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN),
|
||||
array(300,300,60,10),
|
||||
array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)),
|
||||
|
||||
/* Intervall larger than 1 min */
|
||||
SECPERMIN,array(array(SECPERMIN,15,10,5),
|
||||
array(15,5,2,1),
|
||||
array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)),
|
||||
|
||||
/* Intervall larger than 10 sec */
|
||||
10,array(array(5,2),
|
||||
array(1,1),
|
||||
array(1,SECADJ_5, 1,SECADJ_1)),
|
||||
|
||||
/* Intervall larger than 1 sec */
|
||||
1,array(array(1),
|
||||
array(1),
|
||||
array(1,SECADJ_1)),
|
||||
);
|
||||
|
||||
$ns = count($scalePoints);
|
||||
// Establish major and minor scale units for the date scale
|
||||
$diff = $aEndTime - $aStartTime;
|
||||
if( $diff < 1 ) return false;
|
||||
$done=false;
|
||||
$i=0;
|
||||
while( ! $done ) {
|
||||
if( $diff > $scalePoints[2*$i] ) {
|
||||
// Get major and minor scale for this intervall
|
||||
$scaleSteps = $scalePoints[2*$i+1];
|
||||
$major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)];
|
||||
// Try to find out which minor step looks best
|
||||
$minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)];
|
||||
if( $aAdjust ) {
|
||||
// Find out how we should align the start and end timestamps
|
||||
$idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1);
|
||||
if( $scaleSteps[2][$idx] === 0 ) {
|
||||
// Use date adjustment
|
||||
$adj = $scaleSteps[2][$idx+1];
|
||||
if( $adj >= 30 ) {
|
||||
$start = $this->AdjStartDate($aStartTime,$adj-30);
|
||||
$end = $this->AdjEndDate($aEndTime,$adj-30);
|
||||
}
|
||||
elseif( $adj >= 20 ) {
|
||||
$start = $this->AdjStartDate($aStartTime,false,$adj-20);
|
||||
$end = $this->AdjEndDate($aEndTime,false,$adj-20);
|
||||
}
|
||||
else {
|
||||
$start = $this->AdjStartDate($aStartTime,false,false,$adj);
|
||||
$end = $this->AdjEndDate($aEndTime,false,false,$adj);
|
||||
// We add 1 second for date adjustment to make sure we end on 00:00 the following day
|
||||
// This makes the final major tick be srawn when we step day-by-day instead of ending
|
||||
// on xx:59:59 which would not draw the final major tick
|
||||
$end++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Use time adjustment
|
||||
$adj = $scaleSteps[2][$idx+1];
|
||||
if( $adj >= 30 ) {
|
||||
$start = $this->AdjStartTime($aStartTime,$adj-30);
|
||||
$end = $this->AdjEndTime($aEndTime,$adj-30);
|
||||
}
|
||||
elseif( $adj >= 20 ) {
|
||||
$start = $this->AdjStartTime($aStartTime,false,$adj-20);
|
||||
$end = $this->AdjEndTime($aEndTime,false,$adj-20);
|
||||
}
|
||||
else {
|
||||
$start = $this->AdjStartTime($aStartTime,false,false,$adj);
|
||||
$end = $this->AdjEndTime($aEndTime,false,false,$adj);
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the overall date span is larger than 1 day ten we show date
|
||||
$format = '';
|
||||
if( ($end-$start) > SECPERDAY ) {
|
||||
$format = 'Y-m-d ';
|
||||
}
|
||||
// If the major step is less than 1 day we need to whow hours + min
|
||||
if( $major < SECPERDAY ) {
|
||||
$format .= 'H:i';
|
||||
}
|
||||
// If the major step is less than 1 min we need to show sec
|
||||
if( $major < 60 ) {
|
||||
$format .= ':s';
|
||||
}
|
||||
$done=true;
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
return array($start,$end,$major,$minor,$format);
|
||||
}
|
||||
|
||||
// Overrides the automatic determined date format. Must be a valid date() format string
|
||||
function SetDateFormat($aFormat) {
|
||||
$this->date_format = $aFormat;
|
||||
}
|
||||
|
||||
function SetDateAlign($aStartAlign,$aEndAlign=false) {
|
||||
if( $aEndAlign === false ) {
|
||||
$aEndAlign=$aStartAlign;
|
||||
}
|
||||
$this->iStartAlign = $aStartAlign;
|
||||
$this->iEndAlign = $aEndAlign;
|
||||
}
|
||||
|
||||
function SetTimeAlign($aStartAlign,$aEndAlign=false) {
|
||||
if( $aEndAlign === false ) {
|
||||
$aEndAlign=$aStartAlign;
|
||||
}
|
||||
$this->iStartTimeAlign = $aStartAlign;
|
||||
$this->iEndTimeAlign = $aEndAlign;
|
||||
}
|
||||
|
||||
|
||||
function AutoScale(&$img,$aStartTime,$aEndTime,$aNumSteps) {
|
||||
if( $aStartTime == $aEndTime ) {
|
||||
// Special case when we only have one data point.
|
||||
// Create a small artifical intervall to do the autoscaling
|
||||
$aStartTime -= 10;
|
||||
$aEndTime += 10;
|
||||
}
|
||||
$done=false;
|
||||
$i=0;
|
||||
while( ! $done && $i < 5) {
|
||||
list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i);
|
||||
$n = floor(($adjend-$adjstart)/$maj);
|
||||
if( $n * 1.7 > $aNumSteps ) {
|
||||
$done=true;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
/*
|
||||
if( 0 ) { // DEBUG
|
||||
echo " Start =".date("Y-m-d H:i:s",$aStartTime)."<br>";
|
||||
echo " End =".date("Y-m-d H:i:s",$aEndTime)."<br>";
|
||||
echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."<br>";
|
||||
echo "Adj End =".date("Y-m-d H:i:s",$adjend)."<p>";
|
||||
echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day<br>";
|
||||
echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day<br>";
|
||||
echo "Format=$format<p>";
|
||||
}
|
||||
*/
|
||||
|
||||
if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) {
|
||||
JpGraphError::RaiseL(3001);
|
||||
//('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both');
|
||||
}
|
||||
|
||||
if( $this->iStartTimeAlign !== false ) {
|
||||
if( $this->iStartTimeAlign >= 30 ) {
|
||||
$adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30);
|
||||
}
|
||||
elseif( $this->iStartTimeAlign >= 20 ) {
|
||||
$adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign);
|
||||
}
|
||||
}
|
||||
if( $this->iEndTimeAlign !== false ) {
|
||||
if( $this->iEndTimeAlign >= 30 ) {
|
||||
$adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30);
|
||||
}
|
||||
elseif( $this->iEndTimeAlign >= 20 ) {
|
||||
$adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( $this->iStartAlign !== false ) {
|
||||
if( $this->iStartAlign >= 30 ) {
|
||||
$adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30);
|
||||
}
|
||||
elseif( $this->iStartAlign >= 20 ) {
|
||||
$adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign);
|
||||
}
|
||||
}
|
||||
if( $this->iEndAlign !== false ) {
|
||||
if( $this->iEndAlign >= 30 ) {
|
||||
$adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30);
|
||||
}
|
||||
elseif( $this->iEndAlign >= 20 ) {
|
||||
$adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign);
|
||||
}
|
||||
}
|
||||
$this->Update($img,$adjstart,$adjend);
|
||||
if( ! $this->ticks->IsSpecified() )
|
||||
$this->ticks->Set($maj,$min);
|
||||
if( $this->date_format == '' )
|
||||
$this->ticks->SetLabelDateFormat($format);
|
||||
else
|
||||
$this->ticks->SetLabelDateFormat($this->date_format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_DATE.PHP
|
||||
// Description: Classes to handle Date scaling
|
||||
// Created: 2005-05-02
|
||||
// Ver: $Id: jpgraph_date.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
define('HOURADJ_1',0+30);
|
||||
define('HOURADJ_2',1+30);
|
||||
define('HOURADJ_3',2+30);
|
||||
define('HOURADJ_4',3+30);
|
||||
define('HOURADJ_6',4+30);
|
||||
define('HOURADJ_12',5+30);
|
||||
|
||||
define('MINADJ_1',0+20);
|
||||
define('MINADJ_5',1+20);
|
||||
define('MINADJ_10',2+20);
|
||||
define('MINADJ_15',3+20);
|
||||
define('MINADJ_30',4+20);
|
||||
|
||||
define('SECADJ_1',0);
|
||||
define('SECADJ_5',1);
|
||||
define('SECADJ_10',2);
|
||||
define('SECADJ_15',3);
|
||||
define('SECADJ_30',4);
|
||||
|
||||
|
||||
define('YEARADJ_1',0+30);
|
||||
define('YEARADJ_2',1+30);
|
||||
define('YEARADJ_5',2+30);
|
||||
|
||||
define('MONTHADJ_1',0+20);
|
||||
define('MONTHADJ_6',1+20);
|
||||
|
||||
define('DAYADJ_1',0);
|
||||
define('DAYADJ_WEEK',1);
|
||||
define('DAYADJ_7',1);
|
||||
|
||||
define('SECPERYEAR',31536000);
|
||||
define('SECPERDAY',86400);
|
||||
define('SECPERHOUR',3600);
|
||||
define('SECPERMIN',60);
|
||||
|
||||
|
||||
class DateScale extends LinearScale {
|
||||
private $date_format = '';
|
||||
private $iStartAlign = false, $iEndAlign = false;
|
||||
private $iStartTimeAlign = false, $iEndTimeAlign = false;
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct($aMin=0,$aMax=0,$aType='x') {
|
||||
assert($aType=="x");
|
||||
assert($aMin<=$aMax);
|
||||
|
||||
$this->type=$aType;
|
||||
$this->scale=array($aMin,$aMax);
|
||||
$this->world_size=$aMax-$aMin;
|
||||
$this->ticks = new LinearTicks();
|
||||
$this->intscale=true;
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Utility Function AdjDate()
|
||||
// Description: Will round a given time stamp to an even year, month or day
|
||||
// argument.
|
||||
//------------------------------------------------------------------------------------------
|
||||
|
||||
function AdjDate($aTime,$aRound=0,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h=0;$i=0;$s=0;
|
||||
if( $aYearType !== false ) {
|
||||
$yearAdj = array(0=>1, 1=>2, 2=>5);
|
||||
if( $aRound == 0 ) {
|
||||
$y = floor($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
||||
}
|
||||
else {
|
||||
++$y;
|
||||
$y = ceil($y/$yearAdj[$aYearType])*$yearAdj[$aYearType];
|
||||
}
|
||||
$m=1;$d=1;
|
||||
}
|
||||
elseif( $aMonthType !== false ) {
|
||||
$monthAdj = array(0=>1, 1=>6);
|
||||
if( $aRound == 0 ) {
|
||||
$m = floor($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
||||
$d=1;
|
||||
}
|
||||
else {
|
||||
++$m;
|
||||
$m = ceil($m/$monthAdj[$aMonthType])*$monthAdj[$aMonthType];
|
||||
$d=1;
|
||||
}
|
||||
}
|
||||
elseif( $aDayType !== false ) {
|
||||
if( $aDayType == 0 ) {
|
||||
if( $aRound == 1 ) {
|
||||
//++$d;
|
||||
$h=23;$i=59;$s=59;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Adjust to an even week boundary.
|
||||
$w = (int)date('w',$aTime); // Day of week 0=Sun, 6=Sat
|
||||
if( true ) { // Adjust to start on Mon
|
||||
if( $w==0 ) $w=6;
|
||||
else --$w;
|
||||
}
|
||||
if( $aRound == 0 ) {
|
||||
$d -= $w;
|
||||
}
|
||||
else {
|
||||
$d += (7-$w);
|
||||
$h=23;$i=59;$s=59;
|
||||
}
|
||||
}
|
||||
}
|
||||
return mktime($h,$i,$s,$m,$d,$y);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
||||
// it downwards.
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjStartDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||
return $this->AdjDate($aTime,0,$aYearType,$aMonthType,$aDayType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjDate that will round a timestamp to an even date rounding
|
||||
// it upwards
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjEndDate($aTime,$aYearType=false,$aMonthType=false,$aDayType=false) {
|
||||
return $this->AdjDate($aTime,1,$aYearType,$aMonthType,$aDayType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Utility Function AdjTime()
|
||||
// Description: Will round a given time stamp to an even time according to
|
||||
// argument.
|
||||
//------------------------------------------------------------------------------------------
|
||||
|
||||
function AdjTime($aTime,$aRound=0,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime); $s = (int)date('s',$aTime);
|
||||
if( $aHourType !== false ) {
|
||||
$aHourType %= 6;
|
||||
$hourAdj = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>6, 5=>12);
|
||||
if( $aRound == 0 )
|
||||
$h = floor($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
||||
else {
|
||||
if( ($h % $hourAdj[$aHourType]==0) && ($i > 0 || $s > 0) ) {
|
||||
$h++;
|
||||
}
|
||||
$h = ceil($h/$hourAdj[$aHourType])*$hourAdj[$aHourType];
|
||||
if( $h >= 24 ) {
|
||||
$aTime += 86400;
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h -= 24;
|
||||
}
|
||||
}
|
||||
$i=0;$s=0;
|
||||
}
|
||||
elseif( $aMinType !== false ) {
|
||||
$aMinType %= 5;
|
||||
$minAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
||||
if( $aRound == 0 ) {
|
||||
$i = floor($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
||||
}
|
||||
else {
|
||||
if( ($i % $minAdj[$aMinType]==0) && $s > 0 ) {
|
||||
$i++;
|
||||
}
|
||||
$i = ceil($i/$minAdj[$aMinType])*$minAdj[$aMinType];
|
||||
if( $i >= 60) {
|
||||
$aTime += 3600;
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h = (int)date('H',$aTime); $i = 0;
|
||||
}
|
||||
}
|
||||
$s=0;
|
||||
}
|
||||
elseif( $aSecType !== false ) {
|
||||
$aSecType %= 5;
|
||||
$secAdj = array(0=>1, 1=>5, 2=>10, 3=>15, 4=>30);
|
||||
if( $aRound == 0 ) {
|
||||
$s = floor($s/$secAdj[$aSecType])*$secAdj[$aSecType];
|
||||
}
|
||||
else {
|
||||
$s = ceil($s/$secAdj[$aSecType]*1.0)*$secAdj[$aSecType];
|
||||
if( $s >= 60) {
|
||||
$s=0;
|
||||
$aTime += 60;
|
||||
$y = (int)date('Y',$aTime); $m = (int)date('m',$aTime); $d = (int)date('d',$aTime);
|
||||
$h = (int)date('H',$aTime); $i = (int)date('i',$aTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
return mktime($h,$i,$s,$m,$d,$y);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
||||
// it downwards.
|
||||
// Example: AdjStartTime(mktime(18,27,13,2,22,2005),false,2) => 18:20
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjStartTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||
return $this->AdjTime($aTime,0,$aHourType,$aMinType,$aSecType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// Wrapper for AdjTime that will round a timestamp to an even time rounding
|
||||
// it upwards
|
||||
// Example: AdjEndTime(mktime(18,27,13,2,22,2005),false,2) => 18:30
|
||||
//------------------------------------------------------------------------------------------
|
||||
function AdjEndTime($aTime,$aHourType=false,$aMinType=false,$aSecType=false) {
|
||||
return $this->AdjTime($aTime,1,$aHourType,$aMinType,$aSecType);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------
|
||||
// DateAutoScale
|
||||
// Autoscale a date axis given start and end time
|
||||
// Returns an array ($start,$end,$major,$minor,$format)
|
||||
//------------------------------------------------------------------------------------------
|
||||
function DoDateAutoScale($aStartTime,$aEndTime,$aDensity=0,$aAdjust=true) {
|
||||
// Format of array
|
||||
// array ( Decision point, array( array( Major-scale-step-array ),
|
||||
// array( Minor-scale-step-array ),
|
||||
// array( 0=date-adjust, 1=time-adjust, adjustment-alignment) )
|
||||
//
|
||||
$scalePoints =
|
||||
array(
|
||||
/* Intervall larger than 10 years */
|
||||
SECPERYEAR*10,array(array(SECPERYEAR*5,SECPERYEAR*2),
|
||||
array(SECPERYEAR),
|
||||
array(0,YEARADJ_1, 0,YEARADJ_1) ),
|
||||
|
||||
/* Intervall larger than 2 years */
|
||||
SECPERYEAR*2,array(array(SECPERYEAR),array(SECPERYEAR),
|
||||
array(0,YEARADJ_1) ),
|
||||
|
||||
/* Intervall larger than 90 days (approx 3 month) */
|
||||
SECPERDAY*90,array(array(SECPERDAY*30,SECPERDAY*14,SECPERDAY*7,SECPERDAY),
|
||||
array(SECPERDAY*5,SECPERDAY*7,SECPERDAY,SECPERDAY),
|
||||
array(0,MONTHADJ_1, 0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1)),
|
||||
|
||||
/* Intervall larger than 30 days (approx 1 month) */
|
||||
SECPERDAY*30,array(array(SECPERDAY*14,SECPERDAY*7,SECPERDAY*2, SECPERDAY),
|
||||
array(SECPERDAY,SECPERDAY,SECPERDAY,SECPERDAY),
|
||||
array(0,DAYADJ_WEEK, 0,DAYADJ_1, 0,DAYADJ_1, 0,DAYADJ_1)),
|
||||
|
||||
/* Intervall larger than 7 days */
|
||||
SECPERDAY*7,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2),
|
||||
array(SECPERHOUR*6,SECPERHOUR*3,SECPERHOUR,SECPERHOUR),
|
||||
array(0,DAYADJ_1, 1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1)),
|
||||
|
||||
/* Intervall larger than 1 day */
|
||||
SECPERDAY,array(array(SECPERDAY,SECPERHOUR*12,SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR),
|
||||
array(SECPERHOUR*6,SECPERHOUR*2,SECPERHOUR,SECPERHOUR,SECPERHOUR),
|
||||
array(1,HOURADJ_12, 1,HOURADJ_6, 1,HOURADJ_1, 1,HOURADJ_1)),
|
||||
|
||||
/* Intervall larger than 12 hours */
|
||||
SECPERHOUR*12,array(array(SECPERHOUR*2,SECPERHOUR,SECPERMIN*30,900,600),
|
||||
array(1800,1800,900,300,300),
|
||||
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||
|
||||
/* Intervall larger than 2 hours */
|
||||
SECPERHOUR*2,array(array(SECPERHOUR,SECPERMIN*30,900,600,300),
|
||||
array(1800,900,300,120,60),
|
||||
array(1,HOURADJ_1, 1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||
|
||||
/* Intervall larger than 1 hours */
|
||||
SECPERHOUR,array(array(SECPERMIN*30,900,600,300),array(900,300,120,60),
|
||||
array(1,MINADJ_30, 1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5) ),
|
||||
|
||||
/* Intervall larger than 30 min */
|
||||
SECPERMIN*30,array(array(SECPERMIN*15,SECPERMIN*10,SECPERMIN*5,SECPERMIN),
|
||||
array(300,300,60,10),
|
||||
array(1,MINADJ_15, 1,MINADJ_10, 1,MINADJ_5, 1,MINADJ_1)),
|
||||
|
||||
/* Intervall larger than 1 min */
|
||||
SECPERMIN,array(array(SECPERMIN,15,10,5),
|
||||
array(15,5,2,1),
|
||||
array(1,MINADJ_1, 1,SECADJ_15, 1,SECADJ_10, 1,SECADJ_5)),
|
||||
|
||||
/* Intervall larger than 10 sec */
|
||||
10,array(array(5,2),
|
||||
array(1,1),
|
||||
array(1,SECADJ_5, 1,SECADJ_1)),
|
||||
|
||||
/* Intervall larger than 1 sec */
|
||||
1,array(array(1),
|
||||
array(1),
|
||||
array(1,SECADJ_1)),
|
||||
);
|
||||
|
||||
$ns = count($scalePoints);
|
||||
// Establish major and minor scale units for the date scale
|
||||
$diff = $aEndTime - $aStartTime;
|
||||
if( $diff < 1 ) return false;
|
||||
$done=false;
|
||||
$i=0;
|
||||
while( ! $done ) {
|
||||
if( $diff > $scalePoints[2*$i] ) {
|
||||
// Get major and minor scale for this intervall
|
||||
$scaleSteps = $scalePoints[2*$i+1];
|
||||
$major = $scaleSteps[0][min($aDensity,count($scaleSteps[0])-1)];
|
||||
// Try to find out which minor step looks best
|
||||
$minor = $scaleSteps[1][min($aDensity,count($scaleSteps[1])-1)];
|
||||
if( $aAdjust ) {
|
||||
// Find out how we should align the start and end timestamps
|
||||
$idx = 2*min($aDensity,floor(count($scaleSteps[2])/2)-1);
|
||||
if( $scaleSteps[2][$idx] === 0 ) {
|
||||
// Use date adjustment
|
||||
$adj = $scaleSteps[2][$idx+1];
|
||||
if( $adj >= 30 ) {
|
||||
$start = $this->AdjStartDate($aStartTime,$adj-30);
|
||||
$end = $this->AdjEndDate($aEndTime,$adj-30);
|
||||
}
|
||||
elseif( $adj >= 20 ) {
|
||||
$start = $this->AdjStartDate($aStartTime,false,$adj-20);
|
||||
$end = $this->AdjEndDate($aEndTime,false,$adj-20);
|
||||
}
|
||||
else {
|
||||
$start = $this->AdjStartDate($aStartTime,false,false,$adj);
|
||||
$end = $this->AdjEndDate($aEndTime,false,false,$adj);
|
||||
// We add 1 second for date adjustment to make sure we end on 00:00 the following day
|
||||
// This makes the final major tick be srawn when we step day-by-day instead of ending
|
||||
// on xx:59:59 which would not draw the final major tick
|
||||
$end++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Use time adjustment
|
||||
$adj = $scaleSteps[2][$idx+1];
|
||||
if( $adj >= 30 ) {
|
||||
$start = $this->AdjStartTime($aStartTime,$adj-30);
|
||||
$end = $this->AdjEndTime($aEndTime,$adj-30);
|
||||
}
|
||||
elseif( $adj >= 20 ) {
|
||||
$start = $this->AdjStartTime($aStartTime,false,$adj-20);
|
||||
$end = $this->AdjEndTime($aEndTime,false,$adj-20);
|
||||
}
|
||||
else {
|
||||
$start = $this->AdjStartTime($aStartTime,false,false,$adj);
|
||||
$end = $this->AdjEndTime($aEndTime,false,false,$adj);
|
||||
}
|
||||
}
|
||||
}
|
||||
// If the overall date span is larger than 1 day ten we show date
|
||||
$format = '';
|
||||
if( ($end-$start) > SECPERDAY ) {
|
||||
$format = 'Y-m-d ';
|
||||
}
|
||||
// If the major step is less than 1 day we need to whow hours + min
|
||||
if( $major < SECPERDAY ) {
|
||||
$format .= 'H:i';
|
||||
}
|
||||
// If the major step is less than 1 min we need to show sec
|
||||
if( $major < 60 ) {
|
||||
$format .= ':s';
|
||||
}
|
||||
$done=true;
|
||||
}
|
||||
++$i;
|
||||
}
|
||||
return array($start,$end,$major,$minor,$format);
|
||||
}
|
||||
|
||||
// Overrides the automatic determined date format. Must be a valid date() format string
|
||||
function SetDateFormat($aFormat) {
|
||||
$this->date_format = $aFormat;
|
||||
$this->ticks->SetLabelDateFormat($this->date_format);
|
||||
}
|
||||
|
||||
function AdjustForDST($aFlg=true) {
|
||||
$this->ticks->AdjustForDST($aFlg);
|
||||
}
|
||||
|
||||
|
||||
function SetDateAlign($aStartAlign,$aEndAlign=false) {
|
||||
if( $aEndAlign === false ) {
|
||||
$aEndAlign=$aStartAlign;
|
||||
}
|
||||
$this->iStartAlign = $aStartAlign;
|
||||
$this->iEndAlign = $aEndAlign;
|
||||
}
|
||||
|
||||
function SetTimeAlign($aStartAlign,$aEndAlign=false) {
|
||||
if( $aEndAlign === false ) {
|
||||
$aEndAlign=$aStartAlign;
|
||||
}
|
||||
$this->iStartTimeAlign = $aStartAlign;
|
||||
$this->iEndTimeAlign = $aEndAlign;
|
||||
}
|
||||
|
||||
|
||||
function AutoScale($img,$aStartTime,$aEndTime,$aNumSteps,$_adummy=false) {
|
||||
// We need to have one dummy argument to make the signature of AutoScale()
|
||||
// identical to LinearScale::AutoScale
|
||||
if( $aStartTime == $aEndTime ) {
|
||||
// Special case when we only have one data point.
|
||||
// Create a small artificial interval to do the autoscaling
|
||||
$aStartTime -= 10;
|
||||
$aEndTime += 10;
|
||||
}
|
||||
if( abs($aEndTime - $aStartTime) <= 1 ) {
|
||||
// Special case when we only have one second.
|
||||
// Create a small artificial interval to do the autoscaling
|
||||
$aStartTime -= 1;
|
||||
$aEndTime += 1;
|
||||
}
|
||||
$done=false;
|
||||
$i=0;
|
||||
while( ! $done && $i < 5) {
|
||||
list($adjstart,$adjend,$maj,$min,$format) = $this->DoDateAutoScale($aStartTime,$aEndTime,$i);
|
||||
$n = floor(($adjend-$adjstart)/$maj);
|
||||
if( $n * 1.7 > $aNumSteps ) {
|
||||
$done=true;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
/*
|
||||
if( 0 ) { // DEBUG
|
||||
echo " Start =".date("Y-m-d H:i:s",$aStartTime)."<br>";
|
||||
echo " End =".date("Y-m-d H:i:s",$aEndTime)."<br>";
|
||||
echo "Adj Start =".date("Y-m-d H:i:s",$adjstart)."<br>";
|
||||
echo "Adj End =".date("Y-m-d H:i:s",$adjend)."<p>";
|
||||
echo "Major = $maj s, ".floor($maj/60)."min, ".floor($maj/3600)."h, ".floor($maj/86400)."day<br>";
|
||||
echo "Min = $min s, ".floor($min/60)."min, ".floor($min/3600)."h, ".floor($min/86400)."day<br>";
|
||||
echo "Format=$format<p>";
|
||||
}
|
||||
*/
|
||||
|
||||
if( $this->iStartTimeAlign !== false && $this->iStartAlign !== false ) {
|
||||
JpGraphError::RaiseL(3001);
|
||||
//('It is only possible to use either SetDateAlign() or SetTimeAlign() but not both');
|
||||
}
|
||||
|
||||
if( $this->iStartTimeAlign !== false ) {
|
||||
if( $this->iStartTimeAlign >= 30 ) {
|
||||
$adjstart = $this->AdjStartTime($aStartTime,$this->iStartTimeAlign-30);
|
||||
}
|
||||
elseif( $this->iStartTimeAlign >= 20 ) {
|
||||
$adjstart = $this->AdjStartTime($aStartTime,false,$this->iStartTimeAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjstart = $this->AdjStartTime($aStartTime,false,false,$this->iStartTimeAlign);
|
||||
}
|
||||
}
|
||||
if( $this->iEndTimeAlign !== false ) {
|
||||
if( $this->iEndTimeAlign >= 30 ) {
|
||||
$adjend = $this->AdjEndTime($aEndTime,$this->iEndTimeAlign-30);
|
||||
}
|
||||
elseif( $this->iEndTimeAlign >= 20 ) {
|
||||
$adjend = $this->AdjEndTime($aEndTime,false,$this->iEndTimeAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjend = $this->AdjEndTime($aEndTime,false,false,$this->iEndTimeAlign);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( $this->iStartAlign !== false ) {
|
||||
if( $this->iStartAlign >= 30 ) {
|
||||
$adjstart = $this->AdjStartDate($aStartTime,$this->iStartAlign-30);
|
||||
}
|
||||
elseif( $this->iStartAlign >= 20 ) {
|
||||
$adjstart = $this->AdjStartDate($aStartTime,false,$this->iStartAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjstart = $this->AdjStartDate($aStartTime,false,false,$this->iStartAlign);
|
||||
}
|
||||
}
|
||||
if( $this->iEndAlign !== false ) {
|
||||
if( $this->iEndAlign >= 30 ) {
|
||||
$adjend = $this->AdjEndDate($aEndTime,$this->iEndAlign-30);
|
||||
}
|
||||
elseif( $this->iEndAlign >= 20 ) {
|
||||
$adjend = $this->AdjEndDate($aEndTime,false,$this->iEndAlign-20);
|
||||
}
|
||||
else {
|
||||
$adjend = $this->AdjEndDate($aEndTime,false,false,$this->iEndAlign);
|
||||
}
|
||||
}
|
||||
$this->Update($img,$adjstart,$adjend);
|
||||
if( ! $this->ticks->IsSpecified() )
|
||||
$this->ticks->Set($maj,$min);
|
||||
if( $this->date_format == '' )
|
||||
$this->ticks->SetLabelDateFormat($format);
|
||||
else
|
||||
$this->ticks->SetLabelDateFormat($this->date_format);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -0,0 +1,369 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ERRHANDLER.PHP
|
||||
// Description: Error handler class together with handling of localized
|
||||
// error messages. All localized error messages are stored
|
||||
// in a separate file under the "lang/" subdirectory.
|
||||
// Created: 2006-09-24
|
||||
// Ver: $Id: jpgraph_errhandler.inc.php 1920 2009-12-08 10:02:26Z ljp $
|
||||
//
|
||||
// Copyright 2006 (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
if( !defined('DEFAULT_ERR_LOCALE') ) {
|
||||
define('DEFAULT_ERR_LOCALE','en');
|
||||
}
|
||||
|
||||
if( !defined('USE_IMAGE_ERROR_HANDLER') ) {
|
||||
define('USE_IMAGE_ERROR_HANDLER',true);
|
||||
}
|
||||
|
||||
GLOBAL $__jpg_err_locale ;
|
||||
$__jpg_err_locale = DEFAULT_ERR_LOCALE;
|
||||
|
||||
class ErrMsgText {
|
||||
private $lt=NULL;
|
||||
function __construct() {
|
||||
GLOBAL $__jpg_err_locale;
|
||||
$file = 'lang/'.$__jpg_err_locale.'.inc.php';
|
||||
|
||||
// If the chosen locale doesn't exist try english
|
||||
if( !file_exists(dirname(__FILE__).'/'.$file) ) {
|
||||
$__jpg_err_locale = 'en';
|
||||
}
|
||||
|
||||
$file = 'lang/'.$__jpg_err_locale.'.inc.php';
|
||||
if( !file_exists(dirname(__FILE__).'/'.$file) ) {
|
||||
die('Chosen locale file ("'.$file.'") for error messages does not exist or is not readable for the PHP process. Please make sure that the file exists and that the file permissions are such that the PHP process is allowed to read this file.');
|
||||
}
|
||||
require($file);
|
||||
$this->lt = $_jpg_messages;
|
||||
}
|
||||
|
||||
function Get($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
|
||||
GLOBAL $__jpg_err_locale;
|
||||
if( !isset($this->lt[$errnbr]) ) {
|
||||
return 'Internal error: The specified error message ('.$errnbr.') does not exist in the chosen locale ('.$__jpg_err_locale.')';
|
||||
}
|
||||
$ea = $this->lt[$errnbr];
|
||||
$j=0;
|
||||
if( $a1 !== null ) {
|
||||
$argv[$j++] = $a1;
|
||||
if( $a2 !== null ) {
|
||||
$argv[$j++] = $a2;
|
||||
if( $a3 !== null ) {
|
||||
$argv[$j++] = $a3;
|
||||
if( $a4 !== null ) {
|
||||
$argv[$j++] = $a4;
|
||||
if( $a5 !== null ) {
|
||||
$argv[$j++] = $a5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$numargs = $j;
|
||||
if( $ea[1] != $numargs ) {
|
||||
// Error message argument count do not match.
|
||||
// Just return the error message without arguments.
|
||||
return $ea[0];
|
||||
}
|
||||
switch( $numargs ) {
|
||||
case 1:
|
||||
$msg = sprintf($ea[0],$argv[0]);
|
||||
break;
|
||||
case 2:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1]);
|
||||
break;
|
||||
case 3:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2]);
|
||||
break;
|
||||
case 4:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3]);
|
||||
break;
|
||||
case 5:
|
||||
$msg = sprintf($ea[0],$argv[0],$argv[1],$argv[2],$argv[3],$argv[4]);
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
$msg = sprintf($ea[0]);
|
||||
break;
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// A wrapper class that is used to access the specified error object
|
||||
// (to hide the global error parameter and avoid having a GLOBAL directive
|
||||
// in all methods.
|
||||
//
|
||||
class JpGraphError {
|
||||
private static $__iImgFlg = true;
|
||||
private static $__iLogFile = '';
|
||||
private static $__iTitle = 'JpGraph Error: ';
|
||||
public static function Raise($aMsg,$aHalt=true){
|
||||
throw new JpGraphException($aMsg);
|
||||
}
|
||||
public static function SetErrLocale($aLoc) {
|
||||
GLOBAL $__jpg_err_locale ;
|
||||
$__jpg_err_locale = $aLoc;
|
||||
}
|
||||
public static function RaiseL($errnbr,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
|
||||
throw new JpGraphExceptionL($errnbr,$a1,$a2,$a3,$a4,$a5);
|
||||
}
|
||||
public static function SetImageFlag($aFlg=true) {
|
||||
self::$__iImgFlg = $aFlg;
|
||||
}
|
||||
public static function GetImageFlag() {
|
||||
return self::$__iImgFlg;
|
||||
}
|
||||
public static function SetLogFile($aFile) {
|
||||
self::$__iLogFile = $aFile;
|
||||
}
|
||||
public static function GetLogFile() {
|
||||
return self::$__iLogFile;
|
||||
}
|
||||
public static function SetTitle($aTitle) {
|
||||
self::$__iTitle = $aTitle;
|
||||
}
|
||||
public static function GetTitle() {
|
||||
return self::$__iTitle;
|
||||
}
|
||||
}
|
||||
|
||||
class JpGraphException extends Exception {
|
||||
// Redefine the exception so message isn't optional
|
||||
public function __construct($message, $code = 0) {
|
||||
// make sure everything is assigned properly
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
// custom string representation of object
|
||||
public function _toString() {
|
||||
return __CLASS__ . ": [{$this->code}]: {$this->message} at " . basename($this->getFile()) . ":" . $this->getLine() . "\n" . $this->getTraceAsString() . "\n";
|
||||
}
|
||||
// custom representation of error as an image
|
||||
public function Stroke() {
|
||||
if( JpGraphError::GetImageFlag() ) {
|
||||
$errobj = new JpGraphErrObjectImg();
|
||||
$errobj->SetTitle(JpGraphError::GetTitle());
|
||||
}
|
||||
else {
|
||||
$errobj = new JpGraphErrObject();
|
||||
$errobj->SetTitle(JpGraphError::GetTitle());
|
||||
$errobj->SetStrokeDest(JpGraphError::GetLogFile());
|
||||
}
|
||||
$errobj->Raise($this->getMessage());
|
||||
}
|
||||
static public function defaultHandler(Throwable $exception) {
|
||||
global $__jpg_OldHandler;
|
||||
if( $exception instanceof JpGraphException ) {
|
||||
$exception->Stroke();
|
||||
}
|
||||
else {
|
||||
// Restore old handler
|
||||
if( $__jpg_OldHandler !== NULL ) {
|
||||
set_exception_handler($__jpg_OldHandler);
|
||||
}
|
||||
throw $exception;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class JpGraphExceptionL extends JpGraphException {
|
||||
// Redefine the exception so message isn't optional
|
||||
public function __construct($errcode,$a1=null,$a2=null,$a3=null,$a4=null,$a5=null) {
|
||||
// make sure everything is assigned properly
|
||||
$errtxt = new ErrMsgText();
|
||||
JpGraphError::SetTitle('JpGraph Error: '.$errcode);
|
||||
parent::__construct($errtxt->Get($errcode,$a1,$a2,$a3,$a4,$a5), 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Setup the default handler
|
||||
global $__jpg_OldHandler;
|
||||
$__jpg_OldHandler = set_exception_handler(array('JpGraphException','defaultHandler'));
|
||||
|
||||
//
|
||||
// First of all set up a default error handler
|
||||
//
|
||||
|
||||
//=============================================================
|
||||
// The default trivial text error handler.
|
||||
//=============================================================
|
||||
class JpGraphErrObject {
|
||||
|
||||
protected $iTitle = "JpGraph error: ";
|
||||
protected $iDest = false;
|
||||
|
||||
|
||||
function __construct() {
|
||||
// Empty. Reserved for future use
|
||||
}
|
||||
|
||||
function SetTitle($aTitle) {
|
||||
$this->iTitle = $aTitle;
|
||||
}
|
||||
|
||||
function SetStrokeDest($aDest) {
|
||||
$this->iDest = $aDest;
|
||||
}
|
||||
|
||||
// If aHalt is true then execution can't continue. Typical used for fatal errors
|
||||
function Raise($aMsg,$aHalt=false) {
|
||||
if( $this->iDest != '' ) {
|
||||
if( $this->iDest == 'syslog' ) {
|
||||
error_log($this->iTitle.$aMsg);
|
||||
}
|
||||
else {
|
||||
$str = '['.date('r').'] '.$this->iTitle.$aMsg."\n";
|
||||
$f = @fopen($this->iDest,'a');
|
||||
if( $f ) {
|
||||
@fwrite($f,$str);
|
||||
@fclose($f);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$aMsg = $this->iTitle.$aMsg;
|
||||
// Check SAPI and if we are called from the command line
|
||||
// send the error to STDERR instead
|
||||
if( PHP_SAPI == 'cli' ) {
|
||||
fwrite(STDERR,$aMsg);
|
||||
}
|
||||
else {
|
||||
echo $aMsg;
|
||||
}
|
||||
}
|
||||
if( $aHalt )
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
//==============================================================
|
||||
// An image based error handler
|
||||
//==============================================================
|
||||
class JpGraphErrObjectImg extends JpGraphErrObject {
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
// Empty. Reserved for future use
|
||||
}
|
||||
|
||||
function Raise($aMsg,$aHalt=true) {
|
||||
$img_iconerror =
|
||||
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV'.
|
||||
'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/'.
|
||||
'f0VyckJlZT9YWDxMTDjAwMDy8sLl5bnY2K/MzKW/v5yyspKlpY'.
|
||||
'iYmH+MjHY/PzV/f2xycmJlZVlZWU9MTEXY2Ms/PzwyMjLFTjea'.
|
||||
'AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACx'.
|
||||
'IAAAsSAdLdfvwAAAAHdElNRQfTBgISOCqusfs5AAABLUlEQVR4'.
|
||||
'2tWV3XKCMBBGWfkranCIVClKLd/7P2Q3QsgCxjDTq+6FE2cPH+'.
|
||||
'xJ0Ogn2lQbsT+Wrs+buAZAV4W5T6Bs0YXBBwpKgEuIu+JERAX6'.
|
||||
'wM2rHjmDdEITmsQEEmWADgZm6rAjhXsoMGY9B/NZBwJzBvn+e3'.
|
||||
'wHntCAJdGu9SviwIwoZVDxPB9+Rc0TSEbQr0j3SA1gwdSn6Db0'.
|
||||
'6Tm1KfV6yzWGQO7zdpvyKLKBDmRFjzeB3LYgK7r6A/noDAfjtS'.
|
||||
'IXaIzbJSv6WgUebTMV4EoRB8a2mQiQjgtF91HdKDKZ1gtFtQjk'.
|
||||
'YcWaR5OKOhkYt+ZsTFdJRfPAApOpQYJTNHvCRSJR6SJngQadfc'.
|
||||
'vd69OLMddVOPCGVnmrFD8bVYd3JXfxXPtLR/+mtv59/ALWiiMx'.
|
||||
'qL72fwAAAABJRU5ErkJggg==' ;
|
||||
|
||||
|
||||
if( function_exists("imagetypes") ) {
|
||||
$supported = imagetypes();
|
||||
} else {
|
||||
$supported = 0;
|
||||
}
|
||||
|
||||
if( !function_exists('imagecreatefromstring') ) {
|
||||
$supported = 0;
|
||||
}
|
||||
|
||||
if( ob_get_length() || headers_sent() || !($supported & IMG_PNG) ) {
|
||||
// Special case for headers already sent or that the installation doesn't support
|
||||
// the PNG format (which the error icon is encoded in).
|
||||
// Dont return an image since it can't be displayed
|
||||
die($this->iTitle.' '.$aMsg);
|
||||
}
|
||||
|
||||
$aMsg = wordwrap($aMsg,55);
|
||||
$lines = substr_count($aMsg,"\n");
|
||||
|
||||
// Create the error icon GD
|
||||
$erricon = Image::CreateFromString(base64_decode($img_iconerror));
|
||||
|
||||
// Create an image that contains the error text.
|
||||
$w=400;
|
||||
$h=100 + 15*max(0,$lines-3);
|
||||
|
||||
$img = new Image($w,$h);
|
||||
|
||||
|
||||
// Drop shadow
|
||||
$img->SetColor("gray");
|
||||
$img->FilledRectangle(5,5,$w-1,$h-1,10);
|
||||
$img->SetColor("gray:0.7");
|
||||
$img->FilledRectangle(5,5,$w-3,$h-3,10);
|
||||
|
||||
// Window background
|
||||
$img->SetColor("lightblue");
|
||||
$img->FilledRectangle(1,1,$w-5,$h-5);
|
||||
$img->CopyCanvasH($img->img,$erricon,5,30,0,0,40,40);
|
||||
|
||||
// Window border
|
||||
$img->SetColor("black");
|
||||
$img->Rectangle(1,1,$w-5,$h-5);
|
||||
$img->Rectangle(0,0,$w-4,$h-4);
|
||||
|
||||
// Window top row
|
||||
$img->SetColor("darkred");
|
||||
for($y=3; $y < 18; $y += 2 )
|
||||
$img->Line(1,$y,$w-6,$y);
|
||||
|
||||
// "White shadow"
|
||||
$img->SetColor("white");
|
||||
|
||||
// Left window edge
|
||||
$img->Line(2,2,2,$h-5);
|
||||
$img->Line(2,2,$w-6,2);
|
||||
|
||||
// "Gray button shadow"
|
||||
$img->SetColor("darkgray");
|
||||
|
||||
// Gray window shadow
|
||||
$img->Line(2,$h-6,$w-5,$h-6);
|
||||
$img->Line(3,$h-7,$w-5,$h-7);
|
||||
|
||||
// Window title
|
||||
$m = floor($w/2-5);
|
||||
$l = 110;
|
||||
$img->SetColor("lightgray:1.3");
|
||||
$img->FilledRectangle($m-$l,2,$m+$l,16);
|
||||
|
||||
// Stroke text
|
||||
$img->SetColor("darkred");
|
||||
$img->SetFont(FF_FONT2,FS_BOLD);
|
||||
$img->StrokeText($m-90,15,$this->iTitle);
|
||||
$img->SetColor("black");
|
||||
$img->SetFont(FF_FONT1,FS_NORMAL);
|
||||
$txt = new Text($aMsg,52,25);
|
||||
$txt->SetFont(FF_FONT1);
|
||||
$txt->Align("left","top");
|
||||
$txt->Stroke($img);
|
||||
if ($this->iDest) {
|
||||
$img->Stream($this->iDest);
|
||||
} else {
|
||||
$img->Headers();
|
||||
$img->Stream();
|
||||
}
|
||||
if( $aHalt )
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if( ! USE_IMAGE_ERROR_HANDLER ) {
|
||||
JpGraphError::SetImageFlag(false);
|
||||
}
|
||||
?>
|
@ -1,157 +1,157 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_ERROR.PHP
|
||||
// Description: Error plot extension for JpGraph
|
||||
// Created: 2001-01-08
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_error.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
//===================================================
|
||||
// CLASS ErrorPlot
|
||||
// Description: Error plot with min/max value for
|
||||
// each datapoint
|
||||
//===================================================
|
||||
class ErrorPlot extends Plot {
|
||||
var $errwidth=2;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function ErrorPlot(&$datay,$datax=false) {
|
||||
$this->Plot($datay,$datax);
|
||||
$this->numpoints /= 2;
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
|
||||
// Gets called before any axis are stroked
|
||||
function PreStrokeAdjust(&$graph) {
|
||||
if( $this->center ) {
|
||||
$a=0.5; $b=0.5;
|
||||
++$this->numpoints;
|
||||
} else {
|
||||
$a=0; $b=0;
|
||||
}
|
||||
$graph->xaxis->scale->ticks->SetXLabelOffset($a);
|
||||
$graph->SetTextScaleOff($b);
|
||||
//$graph->xaxis->scale->ticks->SupressMinorTickMarks();
|
||||
}
|
||||
|
||||
// Method description
|
||||
function Stroke(&$img,&$xscale,&$yscale) {
|
||||
$numpoints=count($this->coords[0])/2;
|
||||
$img->SetColor($this->color);
|
||||
$img->SetLineWeight($this->weight);
|
||||
|
||||
if( isset($this->coords[1]) ) {
|
||||
if( count($this->coords[1])!=$numpoints )
|
||||
JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints);
|
||||
//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints");
|
||||
else
|
||||
$exist_x = true;
|
||||
}
|
||||
else
|
||||
$exist_x = false;
|
||||
|
||||
for( $i=0; $i<$numpoints; ++$i) {
|
||||
if( $exist_x )
|
||||
$x=$this->coords[1][$i];
|
||||
else
|
||||
$x=$i;
|
||||
|
||||
if( !is_numeric($x) ||
|
||||
!is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1]) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$xt = $xscale->Translate($x);
|
||||
$yt1 = $yscale->Translate($this->coords[0][$i*2]);
|
||||
$yt2 = $yscale->Translate($this->coords[0][$i*2+1]);
|
||||
$img->Line($xt,$yt1,$xt,$yt2);
|
||||
$img->Line($xt-$this->errwidth,$yt1,$xt+$this->errwidth,$yt1);
|
||||
$img->Line($xt-$this->errwidth,$yt2,$xt+$this->errwidth,$yt2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS ErrorLinePlot
|
||||
// Description: Combine a line and error plot
|
||||
// THIS IS A DEPRECATED PLOT TYPE JUST KEPT FOR
|
||||
// BACKWARD COMPATIBILITY
|
||||
//===================================================
|
||||
class ErrorLinePlot extends ErrorPlot {
|
||||
var $line=null;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function ErrorLinePlot(&$datay,$datax=false) {
|
||||
$this->ErrorPlot($datay,$datax);
|
||||
// Calculate line coordinates as the average of the error limits
|
||||
$n = count($datay);
|
||||
for($i=0; $i < $n; $i+=2 ) {
|
||||
$ly[]=($datay[$i]+$datay[$i+1])/2;
|
||||
}
|
||||
$this->line=new LinePlot($ly,$datax);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function Legend(&$graph) {
|
||||
if( $this->legend != "" )
|
||||
$graph->legend->Add($this->legend,$this->color);
|
||||
$this->line->Legend($graph);
|
||||
}
|
||||
|
||||
function Stroke(&$img,&$xscale,&$yscale) {
|
||||
parent::Stroke($img,$xscale,$yscale);
|
||||
$this->line->Stroke($img,$xscale,$yscale);
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS LineErrorPlot
|
||||
// Description: Combine a line and error plot
|
||||
//===================================================
|
||||
class LineErrorPlot extends ErrorPlot {
|
||||
var $line=null;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
// Data is (val, errdeltamin, errdeltamax)
|
||||
function LineErrorPlot(&$datay,$datax=false) {
|
||||
$ly=array(); $ey=array();
|
||||
$n = count($datay);
|
||||
if( $n % 3 != 0 ) {
|
||||
JpGraphError::RaiseL(4002);
|
||||
//('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3');
|
||||
}
|
||||
for($i=0; $i < $n; $i+=3 ) {
|
||||
$ly[]=$datay[$i];
|
||||
$ey[]=$datay[$i]+$datay[$i+1];
|
||||
$ey[]=$datay[$i]+$datay[$i+2];
|
||||
}
|
||||
$this->ErrorPlot($ey,$datax);
|
||||
$this->line=new LinePlot($ly,$datax);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function Legend(&$graph) {
|
||||
if( $this->legend != "" )
|
||||
$graph->legend->Add($this->legend,$this->color);
|
||||
$this->line->Legend($graph);
|
||||
}
|
||||
|
||||
function Stroke(&$img,&$xscale,&$yscale) {
|
||||
parent::Stroke($img,$xscale,$yscale);
|
||||
$this->line->Stroke($img,$xscale,$yscale);
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
/* EOF */
|
||||
?>
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_ERROR.PHP
|
||||
// Description: Error plot extension for JpGraph
|
||||
// Created: 2001-01-08
|
||||
// Ver: $Id: jpgraph_error.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
//===================================================
|
||||
// CLASS ErrorPlot
|
||||
// Description: Error plot with min/max value for
|
||||
// each datapoint
|
||||
//===================================================
|
||||
class ErrorPlot extends Plot {
|
||||
private $errwidth=2;
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct($datay,$datax=false) {
|
||||
parent::__construct($datay,$datax);
|
||||
$this->numpoints /= 2;
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
|
||||
// Gets called before any axis are stroked
|
||||
function PreStrokeAdjust($graph) {
|
||||
if( $this->center ) {
|
||||
$a=0.5; $b=0.5;
|
||||
++$this->numpoints;
|
||||
} else {
|
||||
$a=0; $b=0;
|
||||
}
|
||||
$graph->xaxis->scale->ticks->SetXLabelOffset($a);
|
||||
$graph->SetTextScaleOff($b);
|
||||
//$graph->xaxis->scale->ticks->SupressMinorTickMarks();
|
||||
}
|
||||
|
||||
// Method description
|
||||
function Stroke($img,$xscale,$yscale) {
|
||||
$numpoints=count($this->coords[0])/2;
|
||||
$img->SetColor($this->color);
|
||||
$img->SetLineWeight($this->weight);
|
||||
|
||||
if( isset($this->coords[1]) ) {
|
||||
if( count($this->coords[1])!=$numpoints )
|
||||
JpGraphError::RaiseL(2003,count($this->coords[1]),$numpoints);
|
||||
//("Number of X and Y points are not equal. Number of X-points:".count($this->coords[1])." Number of Y-points:$numpoints");
|
||||
else
|
||||
$exist_x = true;
|
||||
}
|
||||
else
|
||||
$exist_x = false;
|
||||
|
||||
for( $i=0; $i<$numpoints; ++$i) {
|
||||
if( $exist_x )
|
||||
$x=$this->coords[1][$i];
|
||||
else
|
||||
$x=$i;
|
||||
|
||||
if( !is_numeric($x) ||
|
||||
!is_numeric($this->coords[0][$i*2]) || !is_numeric($this->coords[0][$i*2+1]) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$xt = $xscale->Translate($x);
|
||||
$yt1 = $yscale->Translate($this->coords[0][$i*2]);
|
||||
$yt2 = $yscale->Translate($this->coords[0][$i*2+1]);
|
||||
$img->Line($xt,$yt1,$xt,$yt2);
|
||||
$img->Line($xt-$this->errwidth,$yt1,$xt+$this->errwidth,$yt1);
|
||||
$img->Line($xt-$this->errwidth,$yt2,$xt+$this->errwidth,$yt2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS ErrorLinePlot
|
||||
// Description: Combine a line and error plot
|
||||
// THIS IS A DEPRECATED PLOT TYPE JUST KEPT FOR
|
||||
// BACKWARD COMPATIBILITY
|
||||
//===================================================
|
||||
class ErrorLinePlot extends ErrorPlot {
|
||||
public $line=null;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct($datay,$datax=false) {
|
||||
parent::__construct($datay,$datax);
|
||||
// Calculate line coordinates as the average of the error limits
|
||||
$n = count($datay);
|
||||
for($i=0; $i < $n; $i+=2 ) {
|
||||
$ly[]=($datay[$i]+$datay[$i+1])/2;
|
||||
}
|
||||
$this->line=new LinePlot($ly,$datax);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function Legend($graph) {
|
||||
if( $this->legend != "" )
|
||||
$graph->legend->Add($this->legend,$this->color);
|
||||
$this->line->Legend($graph);
|
||||
}
|
||||
|
||||
function Stroke($img,$xscale,$yscale) {
|
||||
parent::Stroke($img,$xscale,$yscale);
|
||||
$this->line->Stroke($img,$xscale,$yscale);
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS LineErrorPlot
|
||||
// Description: Combine a line and error plot
|
||||
//===================================================
|
||||
class LineErrorPlot extends ErrorPlot {
|
||||
public $line=null;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
// Data is (val, errdeltamin, errdeltamax)
|
||||
function __construct($datay,$datax=false) {
|
||||
$ly=array(); $ey=array();
|
||||
$n = count($datay);
|
||||
if( $n % 3 != 0 ) {
|
||||
JpGraphError::RaiseL(4002);
|
||||
//('Error in input data to LineErrorPlot. Number of data points must be a multiple of 3');
|
||||
}
|
||||
for($i=0; $i < $n; $i+=3 ) {
|
||||
$ly[]=$datay[$i];
|
||||
$ey[]=$datay[$i]+$datay[$i+1];
|
||||
$ey[]=$datay[$i]+$datay[$i+2];
|
||||
}
|
||||
parent::__construct($ey,$datax);
|
||||
$this->line=new LinePlot($ly,$datax);
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function Legend($graph) {
|
||||
if( $this->legend != "" )
|
||||
$graph->legend->Add($this->legend,$this->color);
|
||||
$this->line->Legend($graph);
|
||||
}
|
||||
|
||||
function Stroke($img,$xscale,$yscale) {
|
||||
parent::Stroke($img,$xscale,$yscale);
|
||||
$this->line->Stroke($img,$xscale,$yscale);
|
||||
}
|
||||
} // Class
|
||||
|
||||
|
||||
/* EOF */
|
||||
?>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,377 +1,434 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_GRADIENT.PHP
|
||||
// Description: Create a color gradient
|
||||
// Created: 2003-02-01
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_gradient.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
// Styles for gradient color fill
|
||||
DEFINE("GRAD_VER",1);
|
||||
DEFINE("GRAD_VERT",1);
|
||||
DEFINE("GRAD_HOR",2);
|
||||
DEFINE("GRAD_MIDHOR",3);
|
||||
DEFINE("GRAD_MIDVER",4);
|
||||
DEFINE("GRAD_CENTER",5);
|
||||
DEFINE("GRAD_WIDE_MIDVER",6);
|
||||
DEFINE("GRAD_WIDE_MIDHOR",7);
|
||||
DEFINE("GRAD_LEFT_REFLECTION",8);
|
||||
DEFINE("GRAD_RIGHT_REFLECTION",9);
|
||||
DEFINE("GRAD_RAISED_PANEL",10);
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS Gradient
|
||||
// Description: Handles gradient fills. This is to be
|
||||
// considered a "friend" class of Class Image.
|
||||
//===================================================
|
||||
class Gradient {
|
||||
var $img=null;
|
||||
var $numcolors=100;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct(&$img) {
|
||||
$this->img = &$img;
|
||||
}
|
||||
|
||||
|
||||
function SetNumColors($aNum) {
|
||||
$this->numcolors=$aNum;
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
// Produce a gradient filled rectangle with a smooth transition between
|
||||
// two colors.
|
||||
// ($xl,$yt) Top left corner
|
||||
// ($xr,$yb) Bottom right
|
||||
// $from_color Starting color in gradient
|
||||
// $to_color End color in the gradient
|
||||
// $style Which way is the gradient oriented?
|
||||
function FilledRectangle($xl,$yt,$xr,$yb,$from_color,$to_color,$style=1) {
|
||||
switch( $style ) {
|
||||
case GRAD_VER:
|
||||
$steps = round(abs($xr-$xl));
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for( $i=0, $x=$xl; $i < $steps; ++$i ) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yt,$x,$yb);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_HOR:
|
||||
$steps = round(abs($yb-$yt));
|
||||
$delta = $yb>=$yt ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for($i=0,$y=$yt; $i < $steps; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_MIDHOR:
|
||||
$steps = round(abs($yb-$yt)/2);
|
||||
$delta = $yb >= $yt ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for($y=$yt, $i=0; $i < $steps; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
--$i;
|
||||
if( abs($yb-$yt) % 2 == 1 ) --$steps;
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
break;
|
||||
|
||||
case GRAD_MIDVER:
|
||||
$steps = round(abs($xr-$xl)/2);
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for($x=$xl, $i=0; $i < $steps; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
--$i;
|
||||
if( abs($xr-$xl) % 2 == 1 ) --$steps;
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
break;
|
||||
|
||||
case GRAD_WIDE_MIDVER:
|
||||
$diff = round(abs($xr-$xl));
|
||||
$steps = floor(abs($diff)/3);
|
||||
$firststep = $diff - 2*$steps ;
|
||||
$delta = $xr >= $xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
||||
for($x=$xl, $i=0; $i < $firststep; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
--$i;
|
||||
$this->img->current_color = $colors[$i];
|
||||
for($j=0; $j< $steps; ++$j) {
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_WIDE_MIDHOR:
|
||||
$diff = round(abs($yb-$yt));
|
||||
$steps = floor(abs($diff)/3);
|
||||
$firststep = $diff - 2*$steps ;
|
||||
$delta = $yb >= $yt? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
||||
for($y=$yt, $i=0; $i < $firststep; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
--$i;
|
||||
$this->img->current_color = $colors[$i];
|
||||
for($j=0; $j < $steps; ++$j) {
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_LEFT_REFLECTION:
|
||||
$steps1 = round(0.3*abs($xr-$xl));
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
|
||||
$from_color = $this->img->rgb->Color($from_color);
|
||||
$adj = 1.4;
|
||||
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
||||
$from_color2 = array(min(255,$from_color[0]+$m),
|
||||
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
||||
|
||||
$this->GetColArray($from_color2,$to_color,$steps1,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$steps2 = max(1,round(0.08*abs($xr-$xl)));
|
||||
$this->img->SetColor($to_color);
|
||||
for($j=0; $j< $steps2; ++$j) {
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$steps = abs($xr-$xl)-$steps1-$steps2;
|
||||
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($i=0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_RIGHT_REFLECTION:
|
||||
$steps1 = round(0.7*abs($xr-$xl));
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
|
||||
$this->GetColArray($from_color,$to_color,$steps1,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$steps2 = max(1,round(0.08*abs($xr-$xl)));
|
||||
$this->img->SetColor($to_color);
|
||||
for($j=0; $j< $steps2; ++$j) {
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
$from_color = $this->img->rgb->Color($from_color);
|
||||
$adj = 1.4;
|
||||
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
||||
$from_color = array(min(255,$from_color[0]+$m),
|
||||
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
||||
|
||||
$steps = abs($xr-$xl)-$steps1-$steps2;
|
||||
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($i=0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_CENTER:
|
||||
$steps = ceil(min(($yb-$yt)+1,($xr-$xl)+1)/2);
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
$dx = ($xr-$xl)/2;
|
||||
$dy = ($yb-$yt)/2;
|
||||
$x=$xl;$y=$yt;$x2=$xr;$y2=$yb;
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $x < $xl+$dx && $y < $yt+$dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Rectangle($x,$y,$x2,$y2);
|
||||
}
|
||||
$this->img->Line($x,$y,$x2,$y2);
|
||||
break;
|
||||
|
||||
case GRAD_RAISED_PANEL:
|
||||
// right to left
|
||||
$steps1 = $xr-$xl;
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($to_color,$from_color,$steps1,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
// left to right
|
||||
$xr -= 3;
|
||||
$xl += 3;
|
||||
$yb -= 3;
|
||||
$yt += 3;
|
||||
$steps2 = $xr-$xl;
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
for($x=$xl, $j=$steps2; $j >= 0; --$j) {
|
||||
$this->img->current_color = $colors[$j];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
JpGraphError::RaiseL(7001,$style);
|
||||
//("Unknown gradient style (=$style).");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Fill a special case of a polygon with a flat bottom
|
||||
// with a gradient. Can be used for filled line plots.
|
||||
// Please note that this is NOT a generic gradient polygon fill
|
||||
// routine. It assumes that the bottom is flat (like a drawing
|
||||
// of a mountain)
|
||||
function FilledFlatPolygon($pts,$from_color,$to_color) {
|
||||
if( count($pts) == 0 ) return;
|
||||
|
||||
$maxy=$pts[1];
|
||||
$miny=$pts[1];
|
||||
$n = count($pts) ;
|
||||
for( $i=0, $idx=0; $i < $n; $i += 2) {
|
||||
$x = round($pts[$i]);
|
||||
$y = round($pts[$i+1]);
|
||||
$miny = min($miny,$y);
|
||||
$maxy = max($maxy,$y);
|
||||
}
|
||||
|
||||
$colors = array();
|
||||
$this->GetColArray($from_color,$to_color,abs($maxy-$miny)+1,$colors,$this->numcolors);
|
||||
for($i=$miny, $idx=0; $i <= $maxy; ++$i ) {
|
||||
$colmap[$i] = $colors[$idx++];
|
||||
}
|
||||
|
||||
$n = count($pts)/2 ;
|
||||
$idx = 0 ;
|
||||
while( $idx < $n-1 ) {
|
||||
$p1 = array(round($pts[$idx*2]),round($pts[$idx*2+1]));
|
||||
$p2 = array(round($pts[++$idx*2]),round($pts[$idx*2+1]));
|
||||
|
||||
// Find the largest rectangle we can fill
|
||||
$y = max($p1[1],$p2[1]) ;
|
||||
for($yy=$maxy; $yy > $y; --$yy) {
|
||||
$this->img->current_color = $colmap[$yy];
|
||||
$this->img->Line($p1[0],$yy,$p2[0]-1,$yy);
|
||||
}
|
||||
|
||||
if( $p1[1] == $p2[1] ) continue;
|
||||
|
||||
// Fill the rest using lines (slow...)
|
||||
$slope = ($p2[0]-$p1[0])/($p1[1]-$p2[1]);
|
||||
$x1 = $p1[0];
|
||||
$x2 = $p2[0]; //-1;
|
||||
$start = $y;
|
||||
if( $p1[1] > $p2[1] ) {
|
||||
while( $y >= $p2[1] ) {
|
||||
$x1=$slope*($start-$y)+$p1[0];
|
||||
$this->img->current_color = $colmap[$y];
|
||||
$this->img->Line($x1,$y,$x2,$y);
|
||||
--$y;
|
||||
}
|
||||
}
|
||||
else {
|
||||
while( $y >= $p1[1] ) {
|
||||
$x2=$p2[0]+$slope*($start-$y);
|
||||
$this->img->current_color = $colmap[$y];
|
||||
$this->img->Line($x1,$y,$x2,$y);
|
||||
--$y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PRIVATE METHODS
|
||||
// Add to the image color map the necessary colors to do the transition
|
||||
// between the two colors using $numcolors intermediate colors
|
||||
function GetColArray($from_color,$to_color,$arr_size,&$colors,$numcols=100) {
|
||||
if( $arr_size==0 ) return;
|
||||
// If color is given as text get it's corresponding r,g,b values
|
||||
$from_color = $this->img->rgb->Color($from_color);
|
||||
$to_color = $this->img->rgb->Color($to_color);
|
||||
|
||||
$rdelta=($to_color[0]-$from_color[0])/$numcols;
|
||||
$gdelta=($to_color[1]-$from_color[1])/$numcols;
|
||||
$bdelta=($to_color[2]-$from_color[2])/$numcols;
|
||||
$colorsperstep = $numcols/$arr_size;
|
||||
$prevcolnum = -1;
|
||||
$from_alpha = $from_color[3];
|
||||
$to_alpha = $to_color[3];
|
||||
$adelta = ( $to_alpha - $from_alpha ) / $numcols ;
|
||||
for ($i=0; $i < $arr_size; ++$i) {
|
||||
$colnum = floor($colorsperstep*$i);
|
||||
if ( $colnum == $prevcolnum )
|
||||
$colors[$i] = $colidx;
|
||||
else {
|
||||
$r = floor($from_color[0] + $colnum*$rdelta);
|
||||
$g = floor($from_color[1] + $colnum*$gdelta);
|
||||
$b = floor($from_color[2] + $colnum*$bdelta);
|
||||
$alpha = $from_alpha + $colnum*$adelta;
|
||||
$colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x",$r,$g,$b),$alpha);
|
||||
$colors[$i] = $colidx;
|
||||
}
|
||||
$prevcolnum = $colnum;
|
||||
}
|
||||
}
|
||||
} // Class
|
||||
|
||||
?>
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_GRADIENT.PHP
|
||||
// Description: Create a color gradient
|
||||
// Created: 2003-02-01
|
||||
// Ver: $Id: jpgraph_gradient.php 1761 2009-08-01 08:31:28Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
// Styles for gradient color fill
|
||||
define("GRAD_VER",1);
|
||||
define("GRAD_VERT",1);
|
||||
define("GRAD_HOR",2);
|
||||
define("GRAD_MIDHOR",3);
|
||||
define("GRAD_MIDVER",4);
|
||||
define("GRAD_CENTER",5);
|
||||
define("GRAD_WIDE_MIDVER",6);
|
||||
define("GRAD_WIDE_MIDHOR",7);
|
||||
define("GRAD_LEFT_REFLECTION",8);
|
||||
define("GRAD_RIGHT_REFLECTION",9);
|
||||
define("GRAD_RAISED_PANEL",10);
|
||||
define("GRAD_DIAGONAL",11);
|
||||
|
||||
//===================================================
|
||||
// CLASS Gradient
|
||||
// Description: Handles gradient fills. This is to be
|
||||
// considered a "friend" class of Class Image.
|
||||
//===================================================
|
||||
class Gradient {
|
||||
private $img=null, $numcolors=100;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct(&$img) {
|
||||
$this->img = $img;
|
||||
}
|
||||
|
||||
|
||||
function SetNumColors($aNum) {
|
||||
$this->numcolors=$aNum;
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
// Produce a gradient filled rectangle with a smooth transition between
|
||||
// two colors.
|
||||
// ($xl,$yt) Top left corner
|
||||
// ($xr,$yb) Bottom right
|
||||
// $from_color Starting color in gradient
|
||||
// $to_color End color in the gradient
|
||||
// $style Which way is the gradient oriented?
|
||||
function FilledRectangle($xl,$yt,$xr,$yb,$from_color,$to_color,$style=1) {
|
||||
$this->img->SetLineWeight(1);
|
||||
switch( $style ) {
|
||||
case GRAD_VER:
|
||||
$steps = ceil(abs($xr-$xl)+1);
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for( $i=0, $x=$xl; $i < $steps; ++$i ) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yt,$x,$yb);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_HOR:
|
||||
$steps = ceil(abs($yb-$yt)+1);
|
||||
$delta = $yb >= $yt ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for($i=0,$y=$yt; $i < $steps; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_MIDHOR:
|
||||
$steps = ceil(abs($yb-$yt)/2);
|
||||
$delta = $yb >= $yt ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for($y=$yt, $i=0; $i < $steps; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
--$i;
|
||||
if( abs($yb-$yt) % 2 == 1 ) {
|
||||
--$steps;
|
||||
}
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
break;
|
||||
|
||||
case GRAD_MIDVER:
|
||||
$steps = ceil(abs($xr-$xl)/2);
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
for($x=$xl, $i=0; $i < $steps; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
--$i;
|
||||
if( abs($xr-$xl) % 2 == 1 ) {
|
||||
--$steps;
|
||||
}
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
break;
|
||||
|
||||
case GRAD_WIDE_MIDVER:
|
||||
$diff = ceil(abs($xr-$xl));
|
||||
$steps = floor(abs($diff)/3);
|
||||
$firststep = $diff - 2*$steps ;
|
||||
$delta = $xr >= $xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
||||
for($x=$xl, $i=0; $i < $firststep; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
--$i;
|
||||
$this->img->current_color = $colors[$i];
|
||||
for($j=0; $j< $steps; ++$j) {
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_WIDE_MIDHOR:
|
||||
$diff = ceil(abs($yb-$yt));
|
||||
$steps = floor(abs($diff)/3);
|
||||
$firststep = $diff - 2*$steps ;
|
||||
$delta = $yb >= $yt? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$firststep,$colors,$this->numcolors);
|
||||
for($y=$yt, $i=0; $i < $firststep; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
--$i;
|
||||
$this->img->current_color = $colors[$i];
|
||||
for($j=0; $j < $steps; ++$j) {
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
for($j=0; $j < $steps; ++$j, --$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($xl,$y,$xr,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_LEFT_REFLECTION:
|
||||
$steps1 = ceil(0.3*abs($xr-$xl));
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
|
||||
$from_color = $this->img->rgb->Color($from_color);
|
||||
$adj = 1.4;
|
||||
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
||||
$from_color2 = array(min(255,$from_color[0]+$m),
|
||||
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
||||
|
||||
$this->GetColArray($from_color2,$to_color,$steps1,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$steps2 = max(1,ceil(0.08*abs($xr-$xl)));
|
||||
$this->img->SetColor($to_color);
|
||||
for($j=0; $j< $steps2; ++$j) {
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$steps = abs($xr-$xl)-$steps1-$steps2;
|
||||
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($i=0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_RIGHT_REFLECTION:
|
||||
$steps1 = ceil(0.7*abs($xr-$xl));
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
|
||||
$this->GetColArray($from_color,$to_color,$steps1,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
$steps2 = max(1,ceil(0.08*abs($xr-$xl)));
|
||||
$this->img->SetColor($to_color);
|
||||
for($j=0; $j< $steps2; ++$j) {
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
$from_color = $this->img->rgb->Color($from_color);
|
||||
$adj = 1.4;
|
||||
$m = ($adj-1.0)*(255-min(255,min($from_color[0],min($from_color[1],$from_color[2]))));
|
||||
$from_color = array(min(255,$from_color[0]+$m),
|
||||
min(255,$from_color[1]+$m), min(255,$from_color[2]+$m));
|
||||
|
||||
$steps = abs($xr-$xl)-$steps1-$steps2;
|
||||
$this->GetColArray($to_color,$from_color,$steps,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($i=0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_CENTER:
|
||||
$steps = ceil(min(($yb-$yt)+1,($xr-$xl)+1)/2);
|
||||
$this->GetColArray($from_color,$to_color,$steps,$colors,$this->numcolors);
|
||||
$dx = ($xr-$xl)/2;
|
||||
$dy = ($yb-$yt)/2;
|
||||
$x=$xl;$y=$yt;$x2=$xr;$y2=$yb;
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $x < $xl+$dx && $y < $yt+$dy && $i < $n; ++$x, ++$y, --$x2, --$y2, ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Rectangle($x,$y,$x2,$y2);
|
||||
}
|
||||
$this->img->Line($x,$y,$x2,$y2);
|
||||
break;
|
||||
|
||||
case GRAD_RAISED_PANEL:
|
||||
// right to left
|
||||
$steps1 = $xr-$xl;
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($to_color,$from_color,$steps1,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
for($x=$xl, $i=0; $i < $steps1 && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
// left to right
|
||||
$xr -= 3;
|
||||
$xl += 3;
|
||||
$yb -= 3;
|
||||
$yt += 3;
|
||||
$steps2 = $xr-$xl;
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
for($x=$xl, $j=$steps2; $j >= 0; --$j) {
|
||||
$this->img->current_color = $colors[$j];
|
||||
$this->img->Line($x,$yb,$x,$yt);
|
||||
$x += $delta;
|
||||
}
|
||||
break;
|
||||
|
||||
case GRAD_DIAGONAL:
|
||||
// use the longer dimension to determine the required number of steps.
|
||||
// first loop draws from one corner to the mid-diagonal and the second
|
||||
// loop draws from the mid-diagonal to the opposing corner.
|
||||
if($xr-$xl > $yb - $yt) {
|
||||
// width is greater than height -> use x-dimension for steps
|
||||
$steps = $xr-$xl;
|
||||
$delta = $xr>=$xl ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
|
||||
for($x=$xl, $i=0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$y = $yt+($i/$steps)*($yb-$yt)*$delta;
|
||||
$this->img->Line($x,$yt,$xl,$y);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
for($x=$xl, $i = 0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$steps+$i];
|
||||
$y = $yt+($i/$steps)*($yb-$yt)*$delta;
|
||||
$this->img->Line($x,$yb,$xr,$y);
|
||||
$x += $delta;
|
||||
}
|
||||
} else {
|
||||
// height is greater than width -> use y-dimension for steps
|
||||
$steps = $yb-$yt;
|
||||
$delta = $yb>=$yt ? 1 : -1;
|
||||
$this->GetColArray($from_color,$to_color,$steps*2,$colors,$this->numcolors);
|
||||
$n = count($colors);
|
||||
|
||||
for($y=$yt, $i=0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$i];
|
||||
$x = $xl+($i/$steps)*($xr-$xl)*$delta;
|
||||
$this->img->Line($x,$yt,$xl,$y);
|
||||
$y += $delta;
|
||||
}
|
||||
|
||||
for($y=$yt, $i = 0; $i < $steps && $i < $n; ++$i) {
|
||||
$this->img->current_color = $colors[$steps+$i];
|
||||
$x = $xl+($i/$steps)*($xr-$xl)*$delta;
|
||||
$this->img->Line($x,$yb,$xr,$y);
|
||||
$x += $delta;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
JpGraphError::RaiseL(7001,$style);
|
||||
//("Unknown gradient style (=$style).");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Fill a special case of a polygon with a flat bottom
|
||||
// with a gradient. Can be used for filled line plots.
|
||||
// Please note that this is NOT a generic gradient polygon fill
|
||||
// routine. It assumes that the bottom is flat (like a drawing
|
||||
// of a mountain)
|
||||
function FilledFlatPolygon($pts,$from_color,$to_color) {
|
||||
if( count($pts) == 0 ) return;
|
||||
|
||||
$maxy=$pts[1];
|
||||
$miny=$pts[1];
|
||||
$n = count($pts) ;
|
||||
for( $i=0, $idx=0; $i < $n; $i += 2) {
|
||||
$x = round($pts[$i]);
|
||||
$y = round($pts[$i+1]);
|
||||
$miny = min($miny,$y);
|
||||
$maxy = max($maxy,$y);
|
||||
}
|
||||
|
||||
$colors = array();
|
||||
$this->GetColArray($from_color,$to_color,abs($maxy-$miny)+1,$colors,$this->numcolors);
|
||||
for($i=$miny, $idx=0; $i <= $maxy; ++$i ) {
|
||||
$colmap[$i] = $colors[$idx++];
|
||||
}
|
||||
|
||||
$n = count($pts)/2 ;
|
||||
$idx = 0 ;
|
||||
while( $idx < $n-1 ) {
|
||||
$p1 = array(round($pts[$idx*2]),round($pts[$idx*2+1]));
|
||||
$p2 = array(round($pts[++$idx*2]),round($pts[$idx*2+1]));
|
||||
|
||||
// Find the largest rectangle we can fill
|
||||
$y = max($p1[1],$p2[1]) ;
|
||||
for($yy=$maxy; $yy > $y; --$yy) {
|
||||
$this->img->current_color = $colmap[$yy];
|
||||
$this->img->Line($p1[0],$yy,$p2[0]-1,$yy);
|
||||
}
|
||||
|
||||
if( $p1[1] == $p2[1] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Fill the rest using lines (slow...)
|
||||
$slope = ($p2[0]-$p1[0])/($p1[1]-$p2[1]);
|
||||
$x1 = $p1[0];
|
||||
$x2 = $p2[0]-1;
|
||||
$start = $y;
|
||||
if( $p1[1] > $p2[1] ) {
|
||||
while( $y >= $p2[1] ) {
|
||||
$x1=$slope*($start-$y)+$p1[0];
|
||||
$this->img->current_color = $colmap[$y];
|
||||
$this->img->Line($x1,$y,$x2,$y);
|
||||
--$y;
|
||||
}
|
||||
}
|
||||
else {
|
||||
while( $y >= $p1[1] ) {
|
||||
$x2=$p2[0]+$slope*($start-$y);
|
||||
$this->img->current_color = $colmap[$y];
|
||||
$this->img->Line($x1,$y,$x2,$y);
|
||||
--$y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PRIVATE METHODS
|
||||
// Add to the image color map the necessary colors to do the transition
|
||||
// between the two colors using $numcolors intermediate colors
|
||||
function GetColArray($from_color,$to_color,$arr_size,&$colors,$numcols=100) {
|
||||
if( $arr_size==0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If color is given as text get it's corresponding r,g,b values
|
||||
$from_color = $this->img->rgb->Color($from_color);
|
||||
$to_color = $this->img->rgb->Color($to_color);
|
||||
|
||||
$rdelta=($to_color[0]-$from_color[0])/$numcols;
|
||||
$gdelta=($to_color[1]-$from_color[1])/$numcols;
|
||||
$bdelta=($to_color[2]-$from_color[2])/$numcols;
|
||||
$colorsperstep = $numcols/$arr_size;
|
||||
$prevcolnum = -1;
|
||||
$from_alpha = floatval($from_color[3]);
|
||||
$to_alpha = floatval($to_color[3]);
|
||||
$adelta = ( $to_alpha - $from_alpha ) / $numcols ;
|
||||
for ($i=0; $i < $arr_size; ++$i) {
|
||||
$colnum = floor($colorsperstep*$i);
|
||||
if ( $colnum == $prevcolnum ) {
|
||||
$colors[$i] = $colidx;
|
||||
}
|
||||
else {
|
||||
$r = floor($from_color[0] + $colnum*$rdelta);
|
||||
$g = floor($from_color[1] + $colnum*$gdelta);
|
||||
$b = floor($from_color[2] + $colnum*$bdelta);
|
||||
$alpha = $from_alpha + $colnum*$adelta;
|
||||
$colidx = $this->img->rgb->Allocate(sprintf("#%02x%02x%02x",$r,$g,$b),$alpha);
|
||||
$colors[$i] = $colidx;
|
||||
}
|
||||
$prevcolnum = $colnum;
|
||||
}
|
||||
}
|
||||
} // Class
|
||||
|
||||
?>
|
||||
|
@ -1,190 +1,190 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ICONPLOT.PHP
|
||||
// Description: PHP4 Graph Plotting library. Extension module.
|
||||
// Created: 2004-02-18
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_iconplot.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS IconPlot
|
||||
// Description: Make it possible to add a (small) image
|
||||
// to the graph
|
||||
//===================================================
|
||||
class IconPlot {
|
||||
var $iHorAnchor='left',$iVertAnchor='top';
|
||||
var $iX=0,$iY=0;
|
||||
var $iFile='';
|
||||
var $iScale=1.0,$iMix=100;
|
||||
var $iAnchors = array('left','right','top','bottom','center');
|
||||
var $iCountryFlag='',$iCountryStdSize=3;
|
||||
var $iScalePosY=null,$iScalePosX=null;
|
||||
var $iImgString='';
|
||||
|
||||
function IconPlot($aFile="",$aX=0,$aY=0,$aScale=1.0,$aMix=100) {
|
||||
$this->iFile = $aFile;
|
||||
$this->iX=$aX;
|
||||
$this->iY=$aY;
|
||||
$this->iScale= $aScale;
|
||||
if( $aMix < 0 || $aMix > 100 ) {
|
||||
JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.');
|
||||
}
|
||||
$this->iMix = $aMix ;
|
||||
}
|
||||
|
||||
function CreateFromString($aStr) {
|
||||
$this->iImgString = $aStr;
|
||||
}
|
||||
|
||||
function SetCountryFlag($aFlag,$aX=0,$aY=0,$aScale=1.0,$aMix=100,$aStdSize=3) {
|
||||
$this->iCountryFlag = $aFlag;
|
||||
$this->iX=$aX;
|
||||
$this->iY=$aY;
|
||||
$this->iScale= $aScale;
|
||||
if( $aMix < 0 || $aMix > 100 ) {
|
||||
JpGraphError::RaiseL(8001);//'Mix value for icon must be between 0 and 100.');
|
||||
}
|
||||
$this->iMix = $aMix;
|
||||
$this->iCountryStdSize = $aStdSize;
|
||||
}
|
||||
|
||||
function SetPos($aX,$aY) {
|
||||
$this->iX=$aX;
|
||||
$this->iY=$aY;
|
||||
}
|
||||
|
||||
function SetScalePos($aX,$aY) {
|
||||
$this->iScalePosX = $aX;
|
||||
$this->iScalePosY = $aY;
|
||||
}
|
||||
|
||||
function SetScale($aScale) {
|
||||
$this->iScale = $aScale;
|
||||
}
|
||||
|
||||
function SetMix($aMix) {
|
||||
if( $aMix < 0 || $aMix > 100 ) {
|
||||
JpGraphError::RaiseL(8001);//('Mix value for icon must be between 0 and 100.');
|
||||
}
|
||||
$this->iMix = $aMix ;
|
||||
}
|
||||
|
||||
function SetAnchor($aXAnchor='left',$aYAnchor='center') {
|
||||
if( !in_array($aXAnchor,$this->iAnchors) ||
|
||||
!in_array($aYAnchor,$this->iAnchors) ) {
|
||||
JpGraphError::RaiseL(8002);//("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'");
|
||||
}
|
||||
$this->iHorAnchor=$aXAnchor;
|
||||
$this->iVertAnchor=$aYAnchor;
|
||||
}
|
||||
|
||||
function PreStrokeAdjust($aGraph) {
|
||||
// Nothing to do ...
|
||||
}
|
||||
|
||||
function DoLegend($aGraph) {
|
||||
// Nothing to do ...
|
||||
}
|
||||
|
||||
function Max() {
|
||||
return array(false,false);
|
||||
}
|
||||
|
||||
|
||||
// The next four function are framework function tht gets called
|
||||
// from Gantt and is not menaiungfull in the context of Icons but
|
||||
// they must be implemented to avoid errors.
|
||||
function GetMaxDate() { return false; }
|
||||
function GetMinDate() { return false; }
|
||||
function GetLineNbr() { return 0; }
|
||||
function GetAbsHeight() {return 0; }
|
||||
|
||||
|
||||
function Min() {
|
||||
return array(false,false);
|
||||
}
|
||||
|
||||
function StrokeMargin(&$aImg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function Stroke(&$aImg,$axscale,$ayscale) {
|
||||
$this->StrokeWithScale($aImg,$axscale,$ayscale);
|
||||
}
|
||||
|
||||
function StrokeWithScale(&$aImg,$axscale,$ayscale) {
|
||||
if( $this->iScalePosX === null ||
|
||||
$this->iScalePosY === null ) {
|
||||
$this->_Stroke($aImg);
|
||||
}
|
||||
else {
|
||||
$this->_Stroke($aImg,
|
||||
round($axscale->Translate($this->iScalePosX)),
|
||||
round($ayscale->Translate($this->iScalePosY)));
|
||||
}
|
||||
}
|
||||
|
||||
function GetWidthHeight() {
|
||||
$dummy=0;
|
||||
return $this->_Stroke($dummy,null,null,true);
|
||||
}
|
||||
|
||||
function _Stroke(&$aImg,$x=null,$y=null,$aReturnWidthHeight=false) {
|
||||
if( $this->iFile != '' && $this->iCountryFlag != '' ) {
|
||||
JpGraphError::RaiseL(8003);//('It is not possible to specify both an image file and a country flag for the same icon.');
|
||||
}
|
||||
if( $this->iFile != '' ) {
|
||||
$gdimg = Graph::LoadBkgImage('',$this->iFile);
|
||||
}
|
||||
elseif( $this->iImgString != '') {
|
||||
$gdimg = Image::CreateFromString($this->iImgString);
|
||||
}
|
||||
else {
|
||||
if( ! class_exists('FlagImages') ) {
|
||||
JpGraphError::RaiseL(8004);//('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.');
|
||||
}
|
||||
$fobj = new FlagImages($this->iCountryStdSize);
|
||||
$dummy='';
|
||||
$gdimg = $fobj->GetImgByName($this->iCountryFlag,$dummy);
|
||||
}
|
||||
|
||||
$iconw = imagesx($gdimg);
|
||||
$iconh = imagesy($gdimg);
|
||||
|
||||
if( $aReturnWidthHeight ) {
|
||||
return array(round($iconw*$this->iScale),round($iconh*$this->iScale));
|
||||
}
|
||||
|
||||
if( $x !== null && $y !== null ) {
|
||||
$this->iX = $x; $this->iY = $y;
|
||||
}
|
||||
if( $this->iX >= 0 && $this->iX <= 1.0 ) {
|
||||
$w = imagesx($aImg->img);
|
||||
$this->iX = round($w*$this->iX);
|
||||
}
|
||||
if( $this->iY >= 0 && $this->iY <= 1.0 ) {
|
||||
$h = imagesy($aImg->img);
|
||||
$this->iY = round($h*$this->iY);
|
||||
}
|
||||
|
||||
if( $this->iHorAnchor == 'center' )
|
||||
$this->iX -= round($iconw*$this->iScale/2);
|
||||
if( $this->iHorAnchor == 'right' )
|
||||
$this->iX -= round($iconw*$this->iScale);
|
||||
if( $this->iVertAnchor == 'center' )
|
||||
$this->iY -= round($iconh*$this->iScale/2);
|
||||
if( $this->iVertAnchor == 'bottom' )
|
||||
$this->iY -= round($iconh*$this->iScale);
|
||||
|
||||
$aImg->CopyMerge($gdimg,$this->iX,$this->iY,0,0,
|
||||
round($iconw*$this->iScale),round($iconh*$this->iScale),
|
||||
$iconw,$iconh,
|
||||
$this->iMix);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ICONPLOT.PHP
|
||||
// Description: Extension module to add icons to plots
|
||||
// Created: 2004-02-18
|
||||
// Ver: $Id: jpgraph_iconplot.php 1404 2009-06-28 15:25:41Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS IconPlot
|
||||
// Description: Make it possible to add a (small) image
|
||||
// to the graph
|
||||
//===================================================
|
||||
class IconPlot {
|
||||
public $iX=0,$iY=0,$iScale=1.0,$iMix=100;
|
||||
private $iHorAnchor='left',$iVertAnchor='top';
|
||||
private $iFile='';
|
||||
private $iAnchors = array('left','right','top','bottom','center');
|
||||
private $iCountryFlag='',$iCountryStdSize=3;
|
||||
private $iScalePosY=null,$iScalePosX=null;
|
||||
private $iImgString='';
|
||||
|
||||
|
||||
function __construct($aFile="",$aX=0,$aY=0,$aScale=1.0,$aMix=100) {
|
||||
$this->iFile = $aFile;
|
||||
$this->iX=$aX;
|
||||
$this->iY=$aY;
|
||||
$this->iScale= $aScale;
|
||||
if( $aMix < 0 || $aMix > 100 ) {
|
||||
JpGraphError::RaiseL(8001); //('Mix value for icon must be between 0 and 100.');
|
||||
}
|
||||
$this->iMix = $aMix ;
|
||||
}
|
||||
|
||||
function SetCountryFlag($aFlag,$aX=0,$aY=0,$aScale=1.0,$aMix=100,$aStdSize=3) {
|
||||
$this->iCountryFlag = $aFlag;
|
||||
$this->iX=$aX;
|
||||
$this->iY=$aY;
|
||||
$this->iScale= $aScale;
|
||||
if( $aMix < 0 || $aMix > 100 ) {
|
||||
JpGraphError::RaiseL(8001);//'Mix value for icon must be between 0 and 100.');
|
||||
}
|
||||
$this->iMix = $aMix;
|
||||
$this->iCountryStdSize = $aStdSize;
|
||||
}
|
||||
|
||||
function SetPos($aX,$aY) {
|
||||
$this->iX=$aX;
|
||||
$this->iY=$aY;
|
||||
}
|
||||
|
||||
function CreateFromString($aStr) {
|
||||
$this->iImgString = $aStr;
|
||||
}
|
||||
|
||||
function SetScalePos($aX,$aY) {
|
||||
$this->iScalePosX = $aX;
|
||||
$this->iScalePosY = $aY;
|
||||
}
|
||||
|
||||
function SetScale($aScale) {
|
||||
$this->iScale = $aScale;
|
||||
}
|
||||
|
||||
function SetMix($aMix) {
|
||||
if( $aMix < 0 || $aMix > 100 ) {
|
||||
JpGraphError::RaiseL(8001);//('Mix value for icon must be between 0 and 100.');
|
||||
}
|
||||
$this->iMix = $aMix ;
|
||||
}
|
||||
|
||||
function SetAnchor($aXAnchor='left',$aYAnchor='center') {
|
||||
if( !in_array($aXAnchor,$this->iAnchors) ||
|
||||
!in_array($aYAnchor,$this->iAnchors) ) {
|
||||
JpGraphError::RaiseL(8002);//("Anchor position for icons must be one of 'top', 'bottom', 'left', 'right' or 'center'");
|
||||
}
|
||||
$this->iHorAnchor=$aXAnchor;
|
||||
$this->iVertAnchor=$aYAnchor;
|
||||
}
|
||||
|
||||
function PreStrokeAdjust($aGraph) {
|
||||
// Nothing to do ...
|
||||
}
|
||||
|
||||
function DoLegend($aGraph) {
|
||||
// Nothing to do ...
|
||||
}
|
||||
|
||||
function Max() {
|
||||
return array(false,false);
|
||||
}
|
||||
|
||||
|
||||
// The next four function are framework function tht gets called
|
||||
// from Gantt and is not menaiungfull in the context of Icons but
|
||||
// they must be implemented to avoid errors.
|
||||
function GetMaxDate() { return false; }
|
||||
function GetMinDate() { return false; }
|
||||
function GetLineNbr() { return 0; }
|
||||
function GetAbsHeight() {return 0; }
|
||||
|
||||
|
||||
function Min() {
|
||||
return array(false,false);
|
||||
}
|
||||
|
||||
function StrokeMargin(&$aImg) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function Stroke($aImg,$axscale=null,$ayscale=null) {
|
||||
$this->StrokeWithScale($aImg,$axscale,$ayscale);
|
||||
}
|
||||
|
||||
function StrokeWithScale($aImg,$axscale,$ayscale) {
|
||||
if( $this->iScalePosX === null || $this->iScalePosY === null ||
|
||||
$axscale === null || $ayscale === null ) {
|
||||
$this->_Stroke($aImg);
|
||||
}
|
||||
else {
|
||||
$this->_Stroke($aImg,
|
||||
round($axscale->Translate($this->iScalePosX)),
|
||||
round($ayscale->Translate($this->iScalePosY)));
|
||||
}
|
||||
}
|
||||
|
||||
function GetWidthHeight() {
|
||||
$dummy=0;
|
||||
return $this->_Stroke($dummy,null,null,true);
|
||||
}
|
||||
|
||||
function _Stroke($aImg,$x=null,$y=null,$aReturnWidthHeight=false) {
|
||||
if( $this->iFile != '' && $this->iCountryFlag != '' ) {
|
||||
JpGraphError::RaiseL(8003);//('It is not possible to specify both an image file and a country flag for the same icon.');
|
||||
}
|
||||
if( $this->iFile != '' ) {
|
||||
$gdimg = Graph::LoadBkgImage('',$this->iFile);
|
||||
}
|
||||
elseif( $this->iImgString != '') {
|
||||
$gdimg = Image::CreateFromString($this->iImgString);
|
||||
}
|
||||
|
||||
else {
|
||||
if( ! class_exists('FlagImages',false) ) {
|
||||
JpGraphError::RaiseL(8004);//('In order to use Country flags as icons you must include the "jpgraph_flags.php" file.');
|
||||
}
|
||||
$fobj = new FlagImages($this->iCountryStdSize);
|
||||
$dummy='';
|
||||
$gdimg = $fobj->GetImgByName($this->iCountryFlag,$dummy);
|
||||
}
|
||||
|
||||
$iconw = imagesx($gdimg);
|
||||
$iconh = imagesy($gdimg);
|
||||
|
||||
if( $aReturnWidthHeight ) {
|
||||
return array(round($iconw*$this->iScale),round($iconh*$this->iScale));
|
||||
}
|
||||
|
||||
if( $x !== null && $y !== null ) {
|
||||
$this->iX = $x; $this->iY = $y;
|
||||
}
|
||||
if( $this->iX >= 0 && $this->iX <= 1.0 ) {
|
||||
$w = imagesx($aImg->img);
|
||||
$this->iX = round($w*$this->iX);
|
||||
}
|
||||
if( $this->iY >= 0 && $this->iY <= 1.0 ) {
|
||||
$h = imagesy($aImg->img);
|
||||
$this->iY = round($h*$this->iY);
|
||||
}
|
||||
|
||||
if( $this->iHorAnchor == 'center' )
|
||||
$this->iX -= round($iconw*$this->iScale/2);
|
||||
if( $this->iHorAnchor == 'right' )
|
||||
$this->iX -= round($iconw*$this->iScale);
|
||||
if( $this->iVertAnchor == 'center' )
|
||||
$this->iY -= round($iconh*$this->iScale/2);
|
||||
if( $this->iVertAnchor == 'bottom' )
|
||||
$this->iY -= round($iconh*$this->iScale);
|
||||
|
||||
$aImg->CopyMerge($gdimg,$this->iX,$this->iY,0,0,
|
||||
round($iconw*$this->iScale),round($iconh*$this->iScale),
|
||||
$iconw,$iconh,
|
||||
$this->iMix);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,224 +1,223 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_IMGTRANS.PHP
|
||||
// Description: Extension for JpGraph to do some simple img transformations
|
||||
// Created: 2003-09-06
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_imgtrans.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Class ImgTrans
|
||||
// Perform some simple image transformations.
|
||||
//------------------------------------------------------------------------
|
||||
class ImgTrans {
|
||||
var $gdImg=null;
|
||||
|
||||
function ImgTrans($aGdImg) {
|
||||
// Constructor
|
||||
$this->gdImg = $aGdImg;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// _TransVert3D() and _TransHor3D() are helper methods to
|
||||
// Skew3D().
|
||||
// --------------------------------------------------------------------
|
||||
function _TransVert3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_DOWN,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
||||
|
||||
|
||||
// Parameter check
|
||||
if( $aHorizonPos < 0 || $aHorizonPos > 1.0 ) {
|
||||
JpGraphError::RaiseL(9001);
|
||||
//("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1.");
|
||||
}
|
||||
|
||||
$w = imagesx($aGdImg);
|
||||
$h = imagesy($aGdImg);
|
||||
|
||||
// Create new image
|
||||
$ww = $w;
|
||||
if( $aMinSize )
|
||||
$hh = ceil($h * $aHorizon / ($aSkewDist+$h));
|
||||
else
|
||||
$hh = $h;
|
||||
|
||||
$newgdh = imagecreatetruecolor($ww,$hh);
|
||||
$crgb = new RGB( $newgdh );
|
||||
$fillColor = $crgb->Allocate($aFillColor);
|
||||
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
||||
|
||||
if( $aBorder ) {
|
||||
$colidx = $crgb->Allocate($aBorder);
|
||||
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
||||
}
|
||||
|
||||
$mid = round($w * $aHorizonPos);
|
||||
|
||||
$last=$h;
|
||||
for($y=0; $y < $h; ++$y) {
|
||||
|
||||
$yp = $h-$y-1;
|
||||
$yt = floor($yp * $aHorizon / ($aSkewDist + $yp));
|
||||
|
||||
if( !$aQuality ) {
|
||||
if( $last <= $yt ) continue ;
|
||||
$last = $yt;
|
||||
}
|
||||
|
||||
for($x=0; $x < $w; ++$x) {
|
||||
$xt = ($x-$mid) * $aSkewDist / ($aSkewDist + $yp);
|
||||
if( $aDir == SKEW3D_UP )
|
||||
$rgb = imagecolorat($aGdImg,$x,$h-$y-1);
|
||||
else
|
||||
$rgb = imagecolorat($aGdImg,$x,$y);
|
||||
$r = ($rgb >> 16) & 0xFF;
|
||||
$g = ($rgb >> 8) & 0xFF;
|
||||
$b = $rgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
||||
$xt = round($xt+$mid);
|
||||
if( $aDir == SKEW3D_UP ) {
|
||||
$syt = $yt;
|
||||
}
|
||||
else {
|
||||
$syt = $hh-$yt-1;
|
||||
}
|
||||
|
||||
if( !empty($set[$yt]) ) {
|
||||
$nrgb = imagecolorat($newgdh,$xt,$syt);
|
||||
$nr = ($nrgb >> 16) & 0xFF;
|
||||
$ng = ($nrgb >> 8) & 0xFF;
|
||||
$nb = $nrgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
||||
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
||||
}
|
||||
|
||||
imagesetpixel($newgdh,$xt,$syt,$colidx);
|
||||
}
|
||||
|
||||
$set[$yt] = true;
|
||||
}
|
||||
|
||||
return $newgdh;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// _TransVert3D() and _TransHor3D() are helper methods to
|
||||
// Skew3D().
|
||||
// --------------------------------------------------------------------
|
||||
function _TransHor3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_LEFT,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
||||
|
||||
$w = imagesx($aGdImg);
|
||||
$h = imagesy($aGdImg);
|
||||
|
||||
// Create new image
|
||||
$hh = $h;
|
||||
if( $aMinSize )
|
||||
$ww = ceil($w * $aHorizon / ($aSkewDist+$w));
|
||||
else
|
||||
$ww = $w;
|
||||
|
||||
$newgdh = imagecreatetruecolor($ww,$hh);
|
||||
$crgb = new RGB( $newgdh );
|
||||
$fillColor = $crgb->Allocate($aFillColor);
|
||||
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
||||
|
||||
if( $aBorder ) {
|
||||
$colidx = $crgb->Allocate($aBorder);
|
||||
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
||||
}
|
||||
|
||||
$mid = round($h * $aHorizonPos);
|
||||
|
||||
$last = -1;
|
||||
for($x=0; $x < $w-1; ++$x) {
|
||||
$xt = floor($x * $aHorizon / ($aSkewDist + $x));
|
||||
if( !$aQuality ) {
|
||||
if( $last >= $xt ) continue ;
|
||||
$last = $xt;
|
||||
}
|
||||
|
||||
for($y=0; $y < $h; ++$y) {
|
||||
$yp = $h-$y-1;
|
||||
$yt = ($yp-$mid) * $aSkewDist / ($aSkewDist + $x);
|
||||
|
||||
if( $aDir == SKEW3D_RIGHT )
|
||||
$rgb = imagecolorat($aGdImg,$w-$x-1,$y);
|
||||
else
|
||||
$rgb = imagecolorat($aGdImg,$x,$y);
|
||||
$r = ($rgb >> 16) & 0xFF;
|
||||
$g = ($rgb >> 8) & 0xFF;
|
||||
$b = $rgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
||||
$yt = floor($hh-$yt-$mid-1);
|
||||
if( $aDir == SKEW3D_RIGHT ) {
|
||||
$sxt = $ww-$xt-1;
|
||||
}
|
||||
else
|
||||
$sxt = $xt ;
|
||||
|
||||
if( !empty($set[$xt]) ) {
|
||||
$nrgb = imagecolorat($newgdh,$sxt,$yt);
|
||||
$nr = ($nrgb >> 16) & 0xFF;
|
||||
$ng = ($nrgb >> 8) & 0xFF;
|
||||
$nb = $nrgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
||||
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
||||
}
|
||||
imagesetpixel($newgdh,$sxt,$yt,$colidx);
|
||||
}
|
||||
|
||||
$set[$xt] = true;
|
||||
}
|
||||
|
||||
return $newgdh;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// Skew image for the apperance of a 3D effect
|
||||
// This transforms an image into a 3D-skewed version
|
||||
// of the image. The transformation is specified by giving the height
|
||||
// of the artificial horizon and specifying a "skew" factor which
|
||||
// is the distance on the horizon line between the point of
|
||||
// convergence and perspective line.
|
||||
//
|
||||
// The function returns the GD handle of the transformed image
|
||||
// leaving the original image untouched.
|
||||
//
|
||||
// Parameters:
|
||||
// * $aGdImg, GD handle to the image to be transformed
|
||||
// * $aHorizon, Distance to the horizon
|
||||
// * $aSkewDist, Distance from the horizon point of convergence
|
||||
// on the horizon line to the perspective points. A larger
|
||||
// value will fore-shorten the image more
|
||||
// * $aDir, parameter specifies type of convergence. This of this
|
||||
// as the walls in a room you are looking at. This specifies if the
|
||||
// image should be applied on the left,right,top or bottom walls.
|
||||
// * $aMinSize, true=make the new image just as big as needed,
|
||||
// false = keep the image the same size as the original image
|
||||
// * $aFillColor, Background fill color in the image
|
||||
// * $aHiQuality, true=performa some interpolation that improves
|
||||
// the image quality but at the expense of performace. Enabling
|
||||
// high quality will have a dramatic effect on the time it takes
|
||||
// to transform an image.
|
||||
// * $aBorder, if set to anything besides false this will draw a
|
||||
// a border of the speciied color around the image
|
||||
// --------------------------------------------------------------------
|
||||
function Skew3D($aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
||||
return $this->_Skew3D($this->gdImg,$aHorizon,$aSkewDist,$aDir,$aHiQuality,
|
||||
$aMinSize,$aFillColor,$aBorder);
|
||||
}
|
||||
|
||||
function _Skew3D($aGdImg,$aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
||||
if( $aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP )
|
||||
return $this->_TransVert3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
||||
else
|
||||
return $this->_TransHor3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_IMGTRANS.PHP
|
||||
// Description: Extension for JpGraph to do some simple img transformations
|
||||
// Created: 2003-09-06
|
||||
// Ver: $Id: jpgraph_imgtrans.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// Class ImgTrans
|
||||
// Perform some simple image transformations.
|
||||
//------------------------------------------------------------------------
|
||||
class ImgTrans {
|
||||
private $gdImg=null;
|
||||
|
||||
function __construct($aGdImg) {
|
||||
// Constructor
|
||||
$this->gdImg = $aGdImg;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// _TransVert3D() and _TransHor3D() are helper methods to
|
||||
// Skew3D().
|
||||
// --------------------------------------------------------------------
|
||||
function _TransVert3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_DOWN,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
||||
|
||||
|
||||
// Parameter check
|
||||
if( $aHorizonPos < 0 || $aHorizonPos > 1.0 ) {
|
||||
JpGraphError::RaiseL(9001);
|
||||
//("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1.");
|
||||
}
|
||||
|
||||
$w = imagesx($aGdImg);
|
||||
$h = imagesy($aGdImg);
|
||||
|
||||
// Create new image
|
||||
$ww = $w;
|
||||
if( $aMinSize )
|
||||
$hh = ceil($h * $aHorizon / ($aSkewDist+$h));
|
||||
else
|
||||
$hh = $h;
|
||||
|
||||
$newgdh = imagecreatetruecolor($ww,$hh);
|
||||
$crgb = new RGB( $newgdh );
|
||||
$fillColor = $crgb->Allocate($aFillColor);
|
||||
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
||||
|
||||
if( $aBorder ) {
|
||||
$colidx = $crgb->Allocate($aBorder);
|
||||
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
||||
}
|
||||
|
||||
$mid = round($w * $aHorizonPos);
|
||||
|
||||
$last=$h;
|
||||
for($y=0; $y < $h; ++$y) {
|
||||
|
||||
$yp = $h-$y-1;
|
||||
$yt = floor($yp * $aHorizon / ($aSkewDist + $yp));
|
||||
|
||||
if( !$aQuality ) {
|
||||
if( $last <= $yt ) continue ;
|
||||
$last = $yt;
|
||||
}
|
||||
|
||||
for($x=0; $x < $w; ++$x) {
|
||||
$xt = ($x-$mid) * $aSkewDist / ($aSkewDist + $yp);
|
||||
if( $aDir == SKEW3D_UP )
|
||||
$rgb = imagecolorat($aGdImg,$x,$h-$y-1);
|
||||
else
|
||||
$rgb = imagecolorat($aGdImg,$x,$y);
|
||||
$r = ($rgb >> 16) & 0xFF;
|
||||
$g = ($rgb >> 8) & 0xFF;
|
||||
$b = $rgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
||||
$xt = round($xt+$mid);
|
||||
if( $aDir == SKEW3D_UP ) {
|
||||
$syt = $yt;
|
||||
}
|
||||
else {
|
||||
$syt = $hh-$yt-1;
|
||||
}
|
||||
|
||||
if( !empty($set[$yt]) ) {
|
||||
$nrgb = imagecolorat($newgdh,$xt,$syt);
|
||||
$nr = ($nrgb >> 16) & 0xFF;
|
||||
$ng = ($nrgb >> 8) & 0xFF;
|
||||
$nb = $nrgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
||||
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
||||
}
|
||||
|
||||
imagesetpixel($newgdh,$xt,$syt,$colidx);
|
||||
}
|
||||
|
||||
$set[$yt] = true;
|
||||
}
|
||||
|
||||
return $newgdh;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// _TransVert3D() and _TransHor3D() are helper methods to
|
||||
// Skew3D().
|
||||
// --------------------------------------------------------------------
|
||||
function _TransHor3D($aGdImg,$aHorizon=100,$aSkewDist=120,$aDir=SKEW3D_LEFT,$aMinSize=true,$aFillColor='#FFFFFF',$aQuality=false,$aBorder=false,$aHorizonPos=0.5) {
|
||||
|
||||
$w = imagesx($aGdImg);
|
||||
$h = imagesy($aGdImg);
|
||||
|
||||
// Create new image
|
||||
$hh = $h;
|
||||
if( $aMinSize )
|
||||
$ww = ceil($w * $aHorizon / ($aSkewDist+$w));
|
||||
else
|
||||
$ww = $w;
|
||||
|
||||
$newgdh = imagecreatetruecolor($ww,$hh);
|
||||
$crgb = new RGB( $newgdh );
|
||||
$fillColor = $crgb->Allocate($aFillColor);
|
||||
imagefilledrectangle($newgdh,0,0,$ww-1,$hh-1,$fillColor);
|
||||
|
||||
if( $aBorder ) {
|
||||
$colidx = $crgb->Allocate($aBorder);
|
||||
imagerectangle($newgdh,0,0,$ww-1,$hh-1,$colidx);
|
||||
}
|
||||
|
||||
$mid = round($h * $aHorizonPos);
|
||||
|
||||
$last = -1;
|
||||
for($x=0; $x < $w-1; ++$x) {
|
||||
$xt = floor($x * $aHorizon / ($aSkewDist + $x));
|
||||
if( !$aQuality ) {
|
||||
if( $last >= $xt ) continue ;
|
||||
$last = $xt;
|
||||
}
|
||||
|
||||
for($y=0; $y < $h; ++$y) {
|
||||
$yp = $h-$y-1;
|
||||
$yt = ($yp-$mid) * $aSkewDist / ($aSkewDist + $x);
|
||||
|
||||
if( $aDir == SKEW3D_RIGHT )
|
||||
$rgb = imagecolorat($aGdImg,$w-$x-1,$y);
|
||||
else
|
||||
$rgb = imagecolorat($aGdImg,$x,$y);
|
||||
$r = ($rgb >> 16) & 0xFF;
|
||||
$g = ($rgb >> 8) & 0xFF;
|
||||
$b = $rgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,$r,$g,$b);
|
||||
$yt = floor($hh-$yt-$mid-1);
|
||||
if( $aDir == SKEW3D_RIGHT ) {
|
||||
$sxt = $ww-$xt-1;
|
||||
}
|
||||
else
|
||||
$sxt = $xt ;
|
||||
|
||||
if( !empty($set[$xt]) ) {
|
||||
$nrgb = imagecolorat($newgdh,$sxt,$yt);
|
||||
$nr = ($nrgb >> 16) & 0xFF;
|
||||
$ng = ($nrgb >> 8) & 0xFF;
|
||||
$nb = $nrgb & 0xFF;
|
||||
$colidx = imagecolorallocate($newgdh,floor(($r+$nr)/2),
|
||||
floor(($g+$ng)/2),floor(($b+$nb)/2));
|
||||
}
|
||||
imagesetpixel($newgdh,$sxt,$yt,$colidx);
|
||||
}
|
||||
|
||||
$set[$xt] = true;
|
||||
}
|
||||
|
||||
return $newgdh;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// Skew image for the apperance of a 3D effect
|
||||
// This transforms an image into a 3D-skewed version
|
||||
// of the image. The transformation is specified by giving the height
|
||||
// of the artificial horizon and specifying a "skew" factor which
|
||||
// is the distance on the horizon line between the point of
|
||||
// convergence and perspective line.
|
||||
//
|
||||
// The function returns the GD handle of the transformed image
|
||||
// leaving the original image untouched.
|
||||
//
|
||||
// Parameters:
|
||||
// * $aGdImg, GD handle to the image to be transformed
|
||||
// * $aHorizon, Distance to the horizon
|
||||
// * $aSkewDist, Distance from the horizon point of convergence
|
||||
// on the horizon line to the perspective points. A larger
|
||||
// value will fore-shorten the image more
|
||||
// * $aDir, parameter specifies type of convergence. This of this
|
||||
// as the walls in a room you are looking at. This specifies if the
|
||||
// image should be applied on the left,right,top or bottom walls.
|
||||
// * $aMinSize, true=make the new image just as big as needed,
|
||||
// false = keep the image the same size as the original image
|
||||
// * $aFillColor, Background fill color in the image
|
||||
// * $aHiQuality, true=performa some interpolation that improves
|
||||
// the image quality but at the expense of performace. Enabling
|
||||
// high quality will have a dramatic effect on the time it takes
|
||||
// to transform an image.
|
||||
// * $aBorder, if set to anything besides false this will draw a
|
||||
// a border of the speciied color around the image
|
||||
// --------------------------------------------------------------------
|
||||
function Skew3D($aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
||||
return $this->_Skew3D($this->gdImg,$aHorizon,$aSkewDist,$aDir,$aHiQuality,
|
||||
$aMinSize,$aFillColor,$aBorder);
|
||||
}
|
||||
|
||||
function _Skew3D($aGdImg,$aHorizon=120,$aSkewDist=150,$aDir=SKEW3D_DOWN,$aHiQuality=false,$aMinSize=true,$aFillColor='#FFFFFF',$aBorder=false) {
|
||||
if( $aDir == SKEW3D_DOWN || $aDir == SKEW3D_UP )
|
||||
return $this->_TransVert3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
||||
else
|
||||
return $this->_TransHor3D($aGdImg,$aHorizon,$aSkewDist,$aDir,$aMinSize,$aFillColor,$aHiQuality,$aBorder);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
@ -0,0 +1,494 @@
|
||||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_LEGEND.INC.PHP
|
||||
// Description: Class to handle the legend box in the graph that gives
|
||||
// names on the data series. The number of rows and columns
|
||||
// in the legend are user specifyable.
|
||||
// Created: 2001-01-08 (Refactored to separate file 2008-08-01)
|
||||
// Ver: $Id: jpgraph_legend.inc.php 1926 2010-01-11 16:33:07Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
DEFINE('_DEFAULT_LPM_SIZE',8); // Default Legend Plot Mark size
|
||||
|
||||
|
||||
//===================================================
|
||||
// CLASS Legend
|
||||
// Description: Responsible for drawing the box containing
|
||||
// all the legend text for the graph
|
||||
//===================================================
|
||||
|
||||
class Legend {
|
||||
public $txtcol=array();
|
||||
public $font_family=FF_DEFAULT,$font_style=FS_NORMAL,$font_size=8; // old. 12
|
||||
private $color=array(120,120,120); // Default frame color
|
||||
private $fill_color=array(245,245,245); // Default fill color
|
||||
private $shadow=false; // Shadow around legend "box"
|
||||
private $shadow_color='darkgray';
|
||||
private $mark_abs_hsize=_DEFAULT_LPM_SIZE,$mark_abs_vsize=_DEFAULT_LPM_SIZE;
|
||||
private $xmargin=10,$ymargin=0,$shadow_width=2;
|
||||
private $xlmargin=4;
|
||||
private $ylinespacing=5;
|
||||
|
||||
// We need a separate margin since the baseline of the last text would coincide with the bottom otherwise
|
||||
private $ybottom_margin = 8;
|
||||
|
||||
private $xpos=0.05, $ypos=0.15, $xabspos=-1, $yabspos=-1;
|
||||
private $halign="right", $valign="top";
|
||||
private $font_color='black';
|
||||
private $hide=false,$layout_n=1;
|
||||
private $weight=1,$frameweight=1;
|
||||
private $csimareas='';
|
||||
private $reverse = false ;
|
||||
private $bkg_gradtype=-1, $bkg_gradfrom='lightgray', $bkg_gradto='gray';
|
||||
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct() {
|
||||
// Empty
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function Hide($aHide=true) {
|
||||
$this->hide=$aHide;
|
||||
}
|
||||
|
||||
function SetHColMargin($aXMarg) {
|
||||
$this->xmargin = $aXMarg;
|
||||
}
|
||||
|
||||
function SetVColMargin($aSpacing) {
|
||||
$this->ylinespacing = $aSpacing ;
|
||||
}
|
||||
|
||||
function SetLeftMargin($aXMarg) {
|
||||
$this->xlmargin = $aXMarg;
|
||||
}
|
||||
|
||||
// Synonym
|
||||
function SetLineSpacing($aSpacing) {
|
||||
$this->ylinespacing = $aSpacing ;
|
||||
}
|
||||
|
||||
function SetShadow($aShow='gray',$aWidth=4) {
|
||||
if( is_string($aShow) ) {
|
||||
$this->shadow_color = $aShow;
|
||||
$this->shadow=true;
|
||||
}
|
||||
else {
|
||||
$this->shadow = $aShow;
|
||||
}
|
||||
$this->shadow_width = $aWidth;
|
||||
}
|
||||
|
||||
function SetMarkAbsSize($aSize) {
|
||||
$this->mark_abs_vsize = $aSize ;
|
||||
$this->mark_abs_hsize = $aSize ;
|
||||
}
|
||||
|
||||
function SetMarkAbsVSize($aSize) {
|
||||
$this->mark_abs_vsize = $aSize ;
|
||||
}
|
||||
|
||||
function SetMarkAbsHSize($aSize) {
|
||||
$this->mark_abs_hsize = $aSize ;
|
||||
}
|
||||
|
||||
function SetLineWeight($aWeight) {
|
||||
$this->weight = $aWeight;
|
||||
}
|
||||
|
||||
function SetFrameWeight($aWeight) {
|
||||
$this->frameweight = $aWeight;
|
||||
}
|
||||
|
||||
function SetLayout($aDirection=LEGEND_VERT) {
|
||||
$this->layout_n = $aDirection==LEGEND_VERT ? 1 : 99 ;
|
||||
}
|
||||
|
||||
function SetColumns($aCols) {
|
||||
$this->layout_n = $aCols ;
|
||||
}
|
||||
|
||||
function SetReverse($f=true) {
|
||||
$this->reverse = $f ;
|
||||
}
|
||||
|
||||
// Set color on frame around box
|
||||
function SetColor($aFontColor,$aColor='black') {
|
||||
$this->font_color=$aFontColor;
|
||||
$this->color=$aColor;
|
||||
}
|
||||
|
||||
function SetFont($aFamily,$aStyle=FS_NORMAL,$aSize=10) {
|
||||
$this->font_family = $aFamily;
|
||||
$this->font_style = $aStyle;
|
||||
$this->font_size = $aSize;
|
||||
}
|
||||
|
||||
function SetPos($aX,$aY,$aHAlign='right',$aVAlign='top') {
|
||||
$this->Pos($aX,$aY,$aHAlign,$aVAlign);
|
||||
}
|
||||
|
||||
function SetAbsPos($aX,$aY,$aHAlign='right',$aVAlign='top') {
|
||||
$this->xabspos=$aX;
|
||||
$this->yabspos=$aY;
|
||||
$this->halign=$aHAlign;
|
||||
$this->valign=$aVAlign;
|
||||
}
|
||||
|
||||
function Pos($aX,$aY,$aHAlign='right',$aVAlign='top') {
|
||||
if( !($aX<1 && $aY<1) ) {
|
||||
JpGraphError::RaiseL(25120);//(" Position for legend must be given as percentage in range 0-1");
|
||||
}
|
||||
$this->xpos=$aX;
|
||||
$this->ypos=$aY;
|
||||
$this->halign=$aHAlign;
|
||||
$this->valign=$aVAlign;
|
||||
}
|
||||
|
||||
function SetFillColor($aColor) {
|
||||
$this->fill_color=$aColor;
|
||||
}
|
||||
|
||||
function Clear() {
|
||||
$this->txtcol = array();
|
||||
}
|
||||
|
||||
function Add($aTxt,$aColor,$aPlotmark='',$aLinestyle=0,$csimtarget='',$csimalt='',$csimwintarget='') {
|
||||
$this->txtcol[]=array($aTxt,$aColor,$aPlotmark,$aLinestyle,$csimtarget,$csimalt,$csimwintarget);
|
||||
}
|
||||
|
||||
function GetCSIMAreas() {
|
||||
return $this->csimareas;
|
||||
}
|
||||
|
||||
function SetBackgroundGradient($aFrom='navy',$aTo='silver',$aGradType=2) {
|
||||
$this->bkg_gradtype=$aGradType;
|
||||
$this->bkg_gradfrom = $aFrom;
|
||||
$this->bkg_gradto = $aTo;
|
||||
}
|
||||
|
||||
function HasItems() {
|
||||
return (boolean)(count($this->txtcol));
|
||||
}
|
||||
|
||||
function Stroke($aImg) {
|
||||
// Constant
|
||||
$fillBoxFrameWeight=1;
|
||||
|
||||
if( $this->hide ) return;
|
||||
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
|
||||
if( $this->reverse ) {
|
||||
$this->txtcol = array_reverse($this->txtcol);
|
||||
}
|
||||
|
||||
$n=count($this->txtcol);
|
||||
if( $n == 0 ) return;
|
||||
|
||||
// Find out the max width and height of each column to be able
|
||||
// to size the legend box.
|
||||
$numcolumns = ($n > $this->layout_n ? $this->layout_n : $n);
|
||||
for( $i=0; $i < $numcolumns; ++$i ) {
|
||||
$colwidth[$i] = $aImg->GetTextWidth($this->txtcol[$i][0]) +
|
||||
2*$this->xmargin + 2*$this->mark_abs_hsize;
|
||||
$colheight[$i] = 0;
|
||||
|
||||
}
|
||||
|
||||
// Find our maximum height in each row
|
||||
$rows = 0 ; $rowheight[0] = 0;
|
||||
for( $i=0; $i < $n; ++$i ) {
|
||||
$h = max($this->mark_abs_vsize,$aImg->GetTextHeight($this->txtcol[$i][0]))+$this->ylinespacing;
|
||||
|
||||
// Makes sure we always have a minimum of 1/4 (1/2 on each side) of the mark as space
|
||||
// between two vertical legend entries
|
||||
//$h = round(max($h,$this->mark_abs_vsize+$this->ymargin));
|
||||
//echo "Textheight #$i: tetxheight=".$aImg->GetTextHeight($this->txtcol[$i][0]).', ';
|
||||
//echo "h=$h ({$this->mark_abs_vsize},{$this->ymargin})<br>";
|
||||
if( $i % $numcolumns == 0 ) {
|
||||
$rows++;
|
||||
$rowheight[$rows-1] = 0;
|
||||
}
|
||||
$rowheight[$rows-1] = max($rowheight[$rows-1],$h)+1;
|
||||
}
|
||||
|
||||
$abs_height = 0;
|
||||
for( $i=0; $i < $rows; ++$i ) {
|
||||
$abs_height += $rowheight[$i] ;
|
||||
}
|
||||
|
||||
// Make sure that the height is at least as high as mark size + ymargin
|
||||
$abs_height = max($abs_height,$this->mark_abs_vsize);
|
||||
$abs_height += $this->ybottom_margin;
|
||||
|
||||
// Find out the maximum width in each column
|
||||
for( $i=$numcolumns; $i < $n; ++$i ) {
|
||||
$colwidth[$i % $numcolumns] = max(
|
||||
$aImg->GetTextWidth($this->txtcol[$i][0])+2*$this->xmargin+2*$this->mark_abs_hsize,
|
||||
$colwidth[$i % $numcolumns]);
|
||||
}
|
||||
|
||||
// Get the total width
|
||||
$mtw = 0;
|
||||
for( $i=0; $i < $numcolumns; ++$i ) {
|
||||
$mtw += $colwidth[$i] ;
|
||||
}
|
||||
|
||||
// remove the last rows interpace margin (since there is no next row)
|
||||
$abs_height -= $this->ylinespacing;
|
||||
|
||||
|
||||
// Find out maximum width we need for legend box
|
||||
$abs_width = $mtw+$this->xlmargin+($numcolumns-1)*$this->mark_abs_hsize;
|
||||
|
||||
if( $this->xabspos === -1 && $this->yabspos === -1 ) {
|
||||
$this->xabspos = $this->xpos*$aImg->width ;
|
||||
$this->yabspos = $this->ypos*$aImg->height ;
|
||||
}
|
||||
|
||||
// Positioning of the legend box
|
||||
if( $this->halign == 'left' ) {
|
||||
$xp = $this->xabspos;
|
||||
}
|
||||
elseif( $this->halign == 'center' ) {
|
||||
$xp = $this->xabspos - $abs_width/2;
|
||||
}
|
||||
else {
|
||||
$xp = $aImg->width - $this->xabspos - $abs_width;
|
||||
}
|
||||
|
||||
$yp=$this->yabspos;
|
||||
if( $this->valign == 'center' ) {
|
||||
$yp-=$abs_height/2;
|
||||
}
|
||||
elseif( $this->valign == 'bottom' ) {
|
||||
$yp-=$abs_height;
|
||||
}
|
||||
|
||||
// Stroke legend box
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($this->frameweight);
|
||||
$aImg->SetLineStyle('solid');
|
||||
|
||||
if( $this->shadow ) {
|
||||
$aImg->ShadowRectangle($xp,$yp,
|
||||
$xp+$abs_width+$this->shadow_width+2,
|
||||
$yp+$abs_height+$this->shadow_width+2,
|
||||
$this->fill_color,$this->shadow_width+2,$this->shadow_color);
|
||||
}
|
||||
else {
|
||||
$aImg->SetColor($this->fill_color);
|
||||
$aImg->FilledRectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height);
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->Rectangle($xp,$yp,$xp+$abs_width,$yp+$abs_height);
|
||||
}
|
||||
|
||||
if( $this->bkg_gradtype >= 0 ) {
|
||||
$grad = new Gradient($aImg);
|
||||
$grad->FilledRectangle($xp+1, $yp+1,
|
||||
$xp+$abs_width-3, $yp+$abs_height-3,
|
||||
$this->bkg_gradfrom, $this->bkg_gradto,
|
||||
$this->bkg_gradtype);
|
||||
}
|
||||
|
||||
// x1,y1 is the position for the legend marker + text
|
||||
// The vertical position is the baseline position for the text
|
||||
// and every marker is adjusted acording to that.
|
||||
|
||||
// For multiline texts this get more complicated.
|
||||
|
||||
$x1 = $xp + $this->xlmargin;
|
||||
$y1 = $yp + $rowheight[0] - $this->ylinespacing + 2 ; // The ymargin is included in rowheight
|
||||
|
||||
// Now, y1 is the bottom vertical position of the first legend, i.e if
|
||||
// the legend has multiple lines it is the bottom line.
|
||||
|
||||
$grad = new Gradient($aImg);
|
||||
$patternFactory = null;
|
||||
|
||||
// Now stroke each legend in turn
|
||||
// Each plot has added the following information to the legend
|
||||
// p[0] = Legend text
|
||||
// p[1] = Color,
|
||||
// p[2] = For markers a reference to the PlotMark object
|
||||
// p[3] = For lines the line style, for gradient the negative gradient style
|
||||
// p[4] = CSIM target
|
||||
// p[5] = CSIM Alt text
|
||||
$i = 1 ; $row = 0;
|
||||
foreach($this->txtcol as $p) {
|
||||
|
||||
// STROKE DEBUG BOX
|
||||
if( _JPG_DEBUG ) {
|
||||
$aImg->SetLineWeight(1);
|
||||
$aImg->SetColor('red');
|
||||
$aImg->SetLineStyle('solid');
|
||||
$aImg->Rectangle($x1,$y1,$xp+$abs_width-1,$y1-$rowheight[$row]);
|
||||
}
|
||||
|
||||
$aImg->SetLineWeight($this->weight);
|
||||
$x1 = round($x1)+1; // We add one to not collide with the border
|
||||
$y1=round($y1);
|
||||
|
||||
// This is the center offset up from the baseline which is
|
||||
// considered the "center" of the marks. This gets slightly complicated since
|
||||
// we need to consider if the text is a multiline paragraph or if it is only
|
||||
// a single line. The reason is that for single line the y1 corresponds to the baseline
|
||||
// and that is fine. However for a multiline paragraph there is no single baseline
|
||||
// and in that case the y1 corresponds to the lowest y for the bounding box. In that
|
||||
// case we center the mark in the middle of the paragraph
|
||||
if( !preg_match('/\n/',$p[0]) ) {
|
||||
// Single line
|
||||
$marky = ceil($y1-$this->mark_abs_vsize/2)-1;
|
||||
} else {
|
||||
// Paragraph
|
||||
$marky = $y1 - $aImg->GetTextHeight($p[0])/2;
|
||||
|
||||
// echo "y1=$y1, p[o]={$p[0]}, marky=$marky<br>";
|
||||
}
|
||||
|
||||
//echo "<br>Mark #$i: marky=$marky<br>";
|
||||
|
||||
$x1 += $this->mark_abs_hsize;
|
||||
|
||||
if ( !empty($p[2]) && $p[2]->GetType() > -1 ) {
|
||||
|
||||
|
||||
// Make a plot mark legend. This is constructed with a mark which
|
||||
// is run through with a line
|
||||
|
||||
// First construct a bit of the line that looks exactly like the
|
||||
// line in the plot
|
||||
$aImg->SetColor($p[1]);
|
||||
if( is_string($p[3]) || $p[3]>0 ) {
|
||||
$aImg->SetLineStyle($p[3]);
|
||||
$aImg->StyleLine($x1-$this->mark_abs_hsize,$marky,$x1+$this->mark_abs_hsize,$marky);
|
||||
}
|
||||
|
||||
// Stroke a mark using image
|
||||
if( $p[2]->GetType() == MARK_IMG ) {
|
||||
$p[2]->Stroke($aImg,$x1,$marky);
|
||||
}
|
||||
|
||||
// Stroke a mark with the standard size
|
||||
// (As long as it is not an image mark )
|
||||
if( $p[2]->GetType() != MARK_IMG ) {
|
||||
|
||||
// Clear any user callbacks since we ont want them called for
|
||||
// the legend marks
|
||||
$p[2]->iFormatCallback = '';
|
||||
$p[2]->iFormatCallback2 = '';
|
||||
|
||||
// Since size for circles is specified as the radius
|
||||
// this means that we must half the size to make the total
|
||||
// width behave as the other marks
|
||||
if( $p[2]->GetType() == MARK_FILLEDCIRCLE || $p[2]->GetType() == MARK_CIRCLE ) {
|
||||
$p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize)/2);
|
||||
$p[2]->Stroke($aImg,$x1,$marky);
|
||||
}
|
||||
else {
|
||||
$p[2]->SetSize(min($this->mark_abs_vsize,$this->mark_abs_hsize));
|
||||
$p[2]->Stroke($aImg,$x1,$marky);
|
||||
}
|
||||
}
|
||||
}
|
||||
elseif ( !empty($p[2]) && (is_string($p[3]) || $p[3]>0 ) ) {
|
||||
// Draw a styled line
|
||||
$aImg->SetColor($p[1]);
|
||||
$aImg->SetLineStyle($p[3]);
|
||||
$aImg->StyleLine($x1-$this->mark_abs_hsize,$marky,$x1+$this->mark_abs_hsize,$marky);
|
||||
$aImg->StyleLine($x1-$this->mark_abs_hsize,$marky+1,$x1+$this->mark_abs_hsize,$marky+1);
|
||||
}
|
||||
else {
|
||||
// Draw a colored box
|
||||
$color = $p[1] ;
|
||||
|
||||
// We make boxes slightly larger to better show
|
||||
$boxsize = max($this->mark_abs_vsize,$this->mark_abs_hsize) + 2 ;
|
||||
|
||||
$ym = $marky-ceil($boxsize/2) ; // Marker y-coordinate
|
||||
|
||||
// We either need to plot a gradient or a
|
||||
// pattern. To differentiate we use a kludge.
|
||||
// Patterns have a p[3] value of < -100
|
||||
if( $p[3] < -100 ) {
|
||||
// p[1][0] == iPattern, p[1][1] == iPatternColor, p[1][2] == iPatternDensity
|
||||
if( $patternFactory == null ) {
|
||||
$patternFactory = new RectPatternFactory();
|
||||
}
|
||||
$prect = $patternFactory->Create($p[1][0],$p[1][1],1);
|
||||
$prect->SetBackground($p[1][3]);
|
||||
$prect->SetDensity($p[1][2]+1);
|
||||
$prect->SetPos(new Rectangle($x1,$ym,$boxsize,$boxsize));
|
||||
$prect->Stroke($aImg);
|
||||
$prect=null;
|
||||
}
|
||||
else {
|
||||
if( is_array($color) && count($color)==2 ) {
|
||||
// The client want a gradient color
|
||||
$grad->FilledRectangle($x1-$boxsize/2,$ym,
|
||||
$x1+$boxsize/2,$ym+$boxsize,
|
||||
$color[0],$color[1],-$p[3]);
|
||||
}
|
||||
else {
|
||||
$aImg->SetColor($p[1]);
|
||||
$aImg->FilledRectangle($x1-$boxsize/2,$ym, $x1+$boxsize/2,$ym+$boxsize);
|
||||
}
|
||||
|
||||
// Draw a plot frame line
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($fillBoxFrameWeight);
|
||||
$aImg->Rectangle($x1-$boxsize/2,$ym,
|
||||
$x1+$boxsize/2,$ym+$boxsize);
|
||||
}
|
||||
}
|
||||
$aImg->SetColor($this->font_color);
|
||||
$aImg->SetFont($this->font_family,$this->font_style,$this->font_size);
|
||||
$aImg->SetTextAlign('left','baseline');
|
||||
|
||||
$debug=false;
|
||||
$aImg->StrokeText($x1+$this->mark_abs_hsize+$this->xmargin,$y1,$p[0],
|
||||
0,'left',$debug);
|
||||
|
||||
// Add CSIM for Legend if defined
|
||||
if( !empty($p[4]) ) {
|
||||
|
||||
$xs = $x1 - $this->mark_abs_hsize ;
|
||||
$ys = $y1 + 1 ;
|
||||
$xe = $x1 + $aImg->GetTextWidth($p[0]) + $this->mark_abs_hsize + $this->xmargin ;
|
||||
$ye = $y1-$rowheight[$row]+1;
|
||||
$coords = "$xs,$ys,$xe,$y1,$xe,$ye,$xs,$ye";
|
||||
if( ! empty($p[4]) ) {
|
||||
$this->csimareas .= "<area shape=\"poly\" coords=\"$coords\" href=\"".htmlentities($p[4])."\"";
|
||||
|
||||
if( !empty($p[6]) ) {
|
||||
$this->csimareas .= " target=\"".$p[6]."\"";
|
||||
}
|
||||
|
||||
if( !empty($p[5]) ) {
|
||||
$tmp=sprintf($p[5],$p[0]);
|
||||
$this->csimareas .= " title=\"$tmp\" alt=\"$tmp\" ";
|
||||
}
|
||||
$this->csimareas .= " />\n";
|
||||
}
|
||||
}
|
||||
|
||||
if( $i >= $this->layout_n ) {
|
||||
$x1 = $xp+$this->xlmargin;
|
||||
$row++;
|
||||
if( !empty($rowheight[$row]) )
|
||||
$y1 += $rowheight[$row];
|
||||
$i = 1;
|
||||
}
|
||||
else {
|
||||
$x1 += $colwidth[($i-1) % $numcolumns] ;
|
||||
++$i;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // Class
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,268 +1,305 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_LOG.PHP
|
||||
// Description: Log scale plot extension for JpGraph
|
||||
// Created: 2001-01-08
|
||||
// Author: Johan Persson (johanp@aditus.nu)
|
||||
// Ver: $Id: jpgraph_log.php,v 1.1 2006/07/07 13:37:14 powles Exp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
|
||||
DEFINE('LOGLABELS_PLAIN',0);
|
||||
DEFINE('LOGLABELS_MAGNITUDE',1);
|
||||
|
||||
//===================================================
|
||||
// CLASS LogScale
|
||||
// Description: Logarithmic scale between world and screen
|
||||
//===================================================
|
||||
class LogScale extends LinearScale {
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
|
||||
// Log scale is specified using the log of min and max
|
||||
function __construct($min,$max,$type="y") {
|
||||
parent::__construct($min,$max,$type);
|
||||
$this->ticks = new LogTicks();
|
||||
$this->name = 'log';
|
||||
}
|
||||
|
||||
//----------------
|
||||
// PUBLIC METHODS
|
||||
|
||||
// Translate between world and screen
|
||||
function Translate($a) {
|
||||
if( !is_numeric($a) ) {
|
||||
if( $a != '' && $a != '-' && $a != 'x' )
|
||||
JpGraphError::RaiseL(11001);
|
||||
//('Your data contains non-numeric values.');
|
||||
return 1;
|
||||
}
|
||||
if( $a < 0 ) {
|
||||
JpGraphError::RaiseL(11002);
|
||||
//("Negative data values can not be used in a log scale.");
|
||||
exit(1);
|
||||
}
|
||||
if( $a==0 ) $a=1;
|
||||
$a=log10($a);
|
||||
return ceil($this->off + ($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
||||
}
|
||||
|
||||
// Relative translate (don't include offset) usefull when we just want
|
||||
// to know the relative position (in pixels) on the axis
|
||||
function RelTranslate($a) {
|
||||
if( !is_numeric($a) ) {
|
||||
if( $a != '' && $a != '-' && $a != 'x' )
|
||||
JpGraphError::RaiseL(11001);
|
||||
//('Your data contains non-numeric values.');
|
||||
return 1;
|
||||
}
|
||||
if( $a==0 ) $a=1;
|
||||
$a=log10($a);
|
||||
return round(($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
||||
}
|
||||
|
||||
// Use bcpow() for increased precision
|
||||
function GetMinVal() {
|
||||
if( function_exists("bcpow") )
|
||||
return round(bcpow(10,$this->scale[0],15),14);
|
||||
else
|
||||
return round(pow(10,$this->scale[0]),14);
|
||||
}
|
||||
|
||||
function GetMaxVal() {
|
||||
if( function_exists("bcpow") )
|
||||
return round(bcpow(10,$this->scale[1],15),14);
|
||||
else
|
||||
return round(pow(10,$this->scale[1]),14);
|
||||
}
|
||||
|
||||
// Logarithmic autoscaling is much simplier since we just
|
||||
// set the min and max to logs of the min and max values.
|
||||
// Note that for log autoscale the "maxstep" the fourth argument
|
||||
// isn't used. This is just included to give the method the same
|
||||
// signature as the linear counterpart.
|
||||
function AutoScale(&$img,$min,$max,$dummy, $dummy2 = true) {
|
||||
if( $min==0 ) $min=1;
|
||||
|
||||
if( $max <= 0 ) {
|
||||
JpGraphError::RaiseL(11004);
|
||||
//('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.');
|
||||
}
|
||||
$smin = floor(log10($min));
|
||||
$smax = ceil(log10($max));
|
||||
$this->Update($img,$smin,$smax);
|
||||
}
|
||||
//---------------
|
||||
// PRIVATE METHODS
|
||||
} // Class
|
||||
|
||||
//===================================================
|
||||
// CLASS LogTicks
|
||||
// Description:
|
||||
//===================================================
|
||||
class LogTicks extends Ticks{
|
||||
var $label_logtype=LOGLABELS_MAGNITUDE;
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function IsSpecified() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function SetLabelLogType($aType) {
|
||||
$this->label_logtype = $aType;
|
||||
}
|
||||
|
||||
// For log scale it's meaningless to speak about a major step
|
||||
// We just return -1 to make the framework happy (specifically
|
||||
// StrokeLabels() )
|
||||
function GetMajor() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
function SetTextLabelStart($aStart) {
|
||||
JpGraphError::RaiseL(11005);
|
||||
//('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.');
|
||||
}
|
||||
|
||||
function SetXLabelOffset($dummy) {
|
||||
// For log scales we dont care about XLabel offset
|
||||
}
|
||||
|
||||
// Draw ticks on image "img" using scale "scale". The axis absolute
|
||||
// position in the image is specified in pos, i.e. for an x-axis
|
||||
// it specifies the absolute y-coord and for Y-ticks it specified the
|
||||
// absolute x-position.
|
||||
function Stroke(&$img,&$scale,$pos) {
|
||||
$start = $scale->GetMinVal();
|
||||
$limit = $scale->GetMaxVal();
|
||||
$nextMajor = 10*$start;
|
||||
$step = $nextMajor / 10.0;
|
||||
|
||||
|
||||
$img->SetLineWeight($this->weight);
|
||||
|
||||
if( $scale->type == "y" ) {
|
||||
// member direction specified if the ticks should be on
|
||||
// left or right side.
|
||||
$a=$pos + $this->direction*$this->GetMinTickAbsSize();
|
||||
$a2=$pos + $this->direction*$this->GetMajTickAbsSize();
|
||||
|
||||
$count=1;
|
||||
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
||||
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
||||
if( $this->supress_first )
|
||||
$this->maj_ticks_label[0]="";
|
||||
else {
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
||||
}
|
||||
elseif( $this->label_logtype == LOGLABELS_PLAIN )
|
||||
$this->maj_ticks_label[0]=$start;
|
||||
else
|
||||
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
||||
}
|
||||
$i=1;
|
||||
for($y=$start; $y<=$limit; $y+=$step,++$count ) {
|
||||
$ys=$scale->Translate($y);
|
||||
$this->ticks_pos[]=$ys;
|
||||
$this->ticklabels_pos[]=$ys;
|
||||
if( $count % 10 == 0 ) {
|
||||
if( !$this->supress_tickmarks ) {
|
||||
if( $this->majcolor!="" ) {
|
||||
$img->PushColor($this->majcolor);
|
||||
$img->Line($pos,$ys,$a2,$ys);
|
||||
$img->PopColor();
|
||||
}
|
||||
else
|
||||
$img->Line($pos,$ys,$a2,$ys);
|
||||
}
|
||||
|
||||
$this->maj_ticks_pos[$i]=$ys;
|
||||
$this->maj_ticklabels_pos[$i]=$ys;
|
||||
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
||||
}
|
||||
elseif( $this->label_logtype == 0 )
|
||||
$this->maj_ticks_label[$i]=$nextMajor;
|
||||
else
|
||||
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
||||
++$i;
|
||||
$nextMajor *= 10;
|
||||
$step *= 10;
|
||||
$count=1;
|
||||
}
|
||||
else {
|
||||
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
||||
if( $this->mincolor!="" ) $img->PushColor($this->mincolor);
|
||||
$img->Line($pos,$ys,$a,$ys);
|
||||
if( $this->mincolor!="" ) $img->PopColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$a=$pos - $this->direction*$this->GetMinTickAbsSize();
|
||||
$a2=$pos - $this->direction*$this->GetMajTickAbsSize();
|
||||
$count=1;
|
||||
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
||||
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
||||
if( $this->supress_first )
|
||||
$this->maj_ticks_label[0]="";
|
||||
else {
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
||||
}
|
||||
elseif( $this->label_logtype == 0 )
|
||||
$this->maj_ticks_label[0]=$start;
|
||||
else
|
||||
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
||||
}
|
||||
$i=1;
|
||||
for($x=$start; $x<=$limit; $x+=$step,++$count ) {
|
||||
$xs=$scale->Translate($x);
|
||||
$this->ticks_pos[]=$xs;
|
||||
$this->ticklabels_pos[]=$xs;
|
||||
if( $count % 10 == 0 ) {
|
||||
if( !$this->supress_tickmarks ) {
|
||||
$img->Line($xs,$pos,$xs,$a2);
|
||||
}
|
||||
$this->maj_ticks_pos[$i]=$xs;
|
||||
$this->maj_ticklabels_pos[$i]=$xs;
|
||||
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
||||
}
|
||||
elseif( $this->label_logtype == 0 )
|
||||
$this->maj_ticks_label[$i]=$nextMajor;
|
||||
else
|
||||
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
||||
++$i;
|
||||
$nextMajor *= 10;
|
||||
$step *= 10;
|
||||
$count=1;
|
||||
}
|
||||
else {
|
||||
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
||||
$img->Line($xs,$pos,$xs,$a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // Class
|
||||
/* EOF */
|
||||
?>
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_LOG.PHP
|
||||
// Description: Log scale plot extension for JpGraph
|
||||
// Created: 2001-01-08
|
||||
// Ver: $Id: jpgraph_log.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
DEFINE('LOGLABELS_PLAIN',0);
|
||||
DEFINE('LOGLABELS_MAGNITUDE',1);
|
||||
|
||||
//===================================================
|
||||
// CLASS LogScale
|
||||
// Description: Logarithmic scale between world and screen
|
||||
//===================================================
|
||||
class LogScale extends LinearScale {
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
|
||||
// Log scale is specified using the log of min and max
|
||||
function __construct($min,$max,$type="y") {
|
||||
parent::__construct($min,$max,$type);
|
||||
$this->ticks = new LogTicks();
|
||||
$this->name = 'log';
|
||||
}
|
||||
|
||||
//----------------
|
||||
// PUBLIC METHODS
|
||||
|
||||
// Translate between world and screen
|
||||
function Translate($a) {
|
||||
if( !is_numeric($a) ) {
|
||||
if( $a != '' && $a != '-' && $a != 'x' ) {
|
||||
JpGraphError::RaiseL(11001);
|
||||
// ('Your data contains non-numeric values.');
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if( $a < 0 ) {
|
||||
JpGraphError::RaiseL(11002);
|
||||
//("Negative data values can not be used in a log scale.");
|
||||
exit(1);
|
||||
}
|
||||
if( $a==0 ) $a=1;
|
||||
$a=log10($a);
|
||||
return ceil($this->off + ($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
||||
}
|
||||
|
||||
// Relative translate (don't include offset) usefull when we just want
|
||||
// to know the relative position (in pixels) on the axis
|
||||
function RelTranslate($a) {
|
||||
if( !is_numeric($a) ) {
|
||||
if( $a != '' && $a != '-' && $a != 'x' ) {
|
||||
JpGraphError::RaiseL(11001);
|
||||
//('Your data contains non-numeric values.');
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if( $a==0 ) {
|
||||
$a=1;
|
||||
}
|
||||
$a=log10($a);
|
||||
return round(($a*1.0 - $this->scale[0]) * $this->scale_factor);
|
||||
}
|
||||
|
||||
// Use bcpow() for increased precision
|
||||
function GetMinVal() {
|
||||
if( function_exists("bcpow") ) {
|
||||
return round(bcpow(10,$this->scale[0],15),14);
|
||||
}
|
||||
else {
|
||||
return round(pow(10,$this->scale[0]),14);
|
||||
}
|
||||
}
|
||||
|
||||
function GetMaxVal() {
|
||||
if( function_exists("bcpow") ) {
|
||||
return round(bcpow(10,$this->scale[1],15),14);
|
||||
}
|
||||
else {
|
||||
return round(pow(10,$this->scale[1]),14);
|
||||
}
|
||||
}
|
||||
|
||||
// Logarithmic autoscaling is much simplier since we just
|
||||
// set the min and max to logs of the min and max values.
|
||||
// Note that for log autoscale the "maxstep" the fourth argument
|
||||
// isn't used. This is just included to give the method the same
|
||||
// signature as the linear counterpart.
|
||||
function AutoScale($img,$min,$max,$maxsteps,$majend=true) {
|
||||
if( $min==0 ) $min=1;
|
||||
|
||||
if( $max <= 0 ) {
|
||||
JpGraphError::RaiseL(11004);
|
||||
//('Scale error for logarithmic scale. You have a problem with your data values. The max value must be greater than 0. It is mathematically impossible to have 0 in a logarithmic scale.');
|
||||
}
|
||||
if( is_numeric($this->autoscale_min) ) {
|
||||
$smin = round($this->autoscale_min);
|
||||
$smax = ceil(log10($max));
|
||||
if( $min >= $max ) {
|
||||
JpGraphError::RaiseL(25071);//('You have specified a min value with SetAutoMin() which is larger than the maximum value used for the scale. This is not possible.');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$smin = floor(log10($min));
|
||||
if( is_numeric($this->autoscale_max) ) {
|
||||
$smax = round($this->autoscale_max);
|
||||
if( $smin >= $smax ) {
|
||||
JpGraphError::RaiseL(25072);//('You have specified a max value with SetAutoMax() which is smaller than the miminum value used for the scale. This is not possible.');
|
||||
}
|
||||
}
|
||||
else
|
||||
$smax = ceil(log10($max));
|
||||
}
|
||||
|
||||
$this->Update($img,$smin,$smax);
|
||||
}
|
||||
//---------------
|
||||
// PRIVATE METHODS
|
||||
} // Class
|
||||
|
||||
//===================================================
|
||||
// CLASS LogTicks
|
||||
// Description:
|
||||
//===================================================
|
||||
class LogTicks extends Ticks{
|
||||
private $label_logtype=LOGLABELS_MAGNITUDE;
|
||||
private $ticklabels_pos = array();
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function __construct() {
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
function IsSpecified() {
|
||||
return true;
|
||||
}
|
||||
|
||||
function SetLabelLogType($aType) {
|
||||
$this->label_logtype = $aType;
|
||||
}
|
||||
|
||||
// For log scale it's meaningless to speak about a major step
|
||||
// We just return -1 to make the framework happy (specifically
|
||||
// StrokeLabels() )
|
||||
function GetMajor() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
function SetTextLabelStart($aStart) {
|
||||
JpGraphError::RaiseL(11005);
|
||||
//('Specifying tick interval for a logarithmic scale is undefined. Remove any calls to SetTextLabelStart() or SetTextTickInterval() on the logarithmic scale.');
|
||||
}
|
||||
|
||||
function SetXLabelOffset($dummy) {
|
||||
// For log scales we dont care about XLabel offset
|
||||
}
|
||||
|
||||
// Draw ticks on image "img" using scale "scale". The axis absolute
|
||||
// position in the image is specified in pos, i.e. for an x-axis
|
||||
// it specifies the absolute y-coord and for Y-ticks it specified the
|
||||
// absolute x-position.
|
||||
function Stroke($img,$scale,$pos) {
|
||||
$start = $scale->GetMinVal();
|
||||
$limit = $scale->GetMaxVal();
|
||||
$nextMajor = 10*$start;
|
||||
$step = $nextMajor / 10.0;
|
||||
|
||||
|
||||
$img->SetLineWeight($this->weight);
|
||||
|
||||
if( $scale->type == "y" ) {
|
||||
// member direction specified if the ticks should be on
|
||||
// left or right side.
|
||||
$a=$pos + $this->direction*$this->GetMinTickAbsSize();
|
||||
$a2=$pos + $this->direction*$this->GetMajTickAbsSize();
|
||||
|
||||
$count=1;
|
||||
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
||||
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
||||
if( $this->supress_first )
|
||||
$this->maj_ticks_label[0]="";
|
||||
else {
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
||||
}
|
||||
elseif( $this->label_logtype == LOGLABELS_PLAIN ) {
|
||||
$this->maj_ticks_label[0]=$start;
|
||||
}
|
||||
else {
|
||||
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
||||
}
|
||||
}
|
||||
$i=1;
|
||||
for($y=$start; $y<=$limit; $y+=$step,++$count ) {
|
||||
$ys=$scale->Translate($y);
|
||||
$this->ticks_pos[]=$ys;
|
||||
$this->ticklabels_pos[]=$ys;
|
||||
if( $count % 10 == 0 ) {
|
||||
if( !$this->supress_tickmarks ) {
|
||||
if( $this->majcolor!="" ) {
|
||||
$img->PushColor($this->majcolor);
|
||||
$img->Line($pos,$ys,$a2,$ys);
|
||||
$img->PopColor();
|
||||
}
|
||||
else {
|
||||
$img->Line($pos,$ys,$a2,$ys);
|
||||
}
|
||||
}
|
||||
|
||||
$this->maj_ticks_pos[$i]=$ys;
|
||||
$this->maj_ticklabels_pos[$i]=$ys;
|
||||
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
||||
}
|
||||
elseif( $this->label_logtype == 0 ) {
|
||||
$this->maj_ticks_label[$i]=$nextMajor;
|
||||
}
|
||||
else {
|
||||
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
||||
}
|
||||
++$i;
|
||||
$nextMajor *= 10;
|
||||
$step *= 10;
|
||||
$count=1;
|
||||
}
|
||||
else {
|
||||
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
||||
if( $this->mincolor!="" ) {
|
||||
$img->PushColor($this->mincolor);
|
||||
}
|
||||
$img->Line($pos,$ys,$a,$ys);
|
||||
if( $this->mincolor!="" ) {
|
||||
$img->PopColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$a=$pos - $this->direction*$this->GetMinTickAbsSize();
|
||||
$a2=$pos - $this->direction*$this->GetMajTickAbsSize();
|
||||
$count=1;
|
||||
$this->maj_ticks_pos[0]=$scale->Translate($start);
|
||||
$this->maj_ticklabels_pos[0]=$scale->Translate($start);
|
||||
if( $this->supress_first ) {
|
||||
$this->maj_ticks_label[0]="";
|
||||
}
|
||||
else {
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[0]=call_user_func($f,$start);
|
||||
}
|
||||
elseif( $this->label_logtype == 0 ) {
|
||||
$this->maj_ticks_label[0]=$start;
|
||||
}
|
||||
else {
|
||||
$this->maj_ticks_label[0]='10^'.round(log10($start));
|
||||
}
|
||||
}
|
||||
$i=1;
|
||||
for($x=$start; $x<=$limit; $x+=$step,++$count ) {
|
||||
$xs=$scale->Translate($x);
|
||||
$this->ticks_pos[]=$xs;
|
||||
$this->ticklabels_pos[]=$xs;
|
||||
if( $count % 10 == 0 ) {
|
||||
if( !$this->supress_tickmarks ) {
|
||||
$img->Line($xs,$pos,$xs,$a2);
|
||||
}
|
||||
$this->maj_ticks_pos[$i]=$xs;
|
||||
$this->maj_ticklabels_pos[$i]=$xs;
|
||||
|
||||
if( $this->label_formfunc != '' ) {
|
||||
$f = $this->label_formfunc;
|
||||
$this->maj_ticks_label[$i]=call_user_func($f,$nextMajor);
|
||||
}
|
||||
elseif( $this->label_logtype == 0 ) {
|
||||
$this->maj_ticks_label[$i]=$nextMajor;
|
||||
}
|
||||
else {
|
||||
$this->maj_ticks_label[$i]='10^'.round(log10($nextMajor));
|
||||
}
|
||||
++$i;
|
||||
$nextMajor *= 10;
|
||||
$step *= 10;
|
||||
$count=1;
|
||||
}
|
||||
else {
|
||||
if( !$this->supress_tickmarks && !$this->supress_minor_tickmarks) {
|
||||
$img->Line($xs,$pos,$xs,$a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} // Class
|
||||
/* EOF */
|
||||
?>
|
||||
|
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_MESHINTERPOLATE.INC.PHP
|
||||
// Description: Utility class to do mesh linear interpolation of a matrix
|
||||
// Created: 2009-03-09
|
||||
// Ver: $Id: jpgraph_meshinterpolate.inc.php 1709 2009-07-30 08:00:08Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utility function to do linear mesh interpolation
|
||||
* @param $aDat Matrix to interpolate
|
||||
* @param $aFactor Interpolation factor
|
||||
*/
|
||||
function doMeshInterpolate( &$aData, $aFactor ) {
|
||||
$m = new MeshInterpolate();
|
||||
$aData = $m->Linear($aData,$aFactor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility class to interpolate a given data matrix
|
||||
*
|
||||
*/
|
||||
class MeshInterpolate {
|
||||
private $data = array();
|
||||
|
||||
/**
|
||||
* Calculate the mid points of the given rectangle which has its top left
|
||||
* corner at $row,$col. The $aFactordecides how many spliots should be done.
|
||||
* i.e. how many more divisions should be done recursively
|
||||
*
|
||||
* @param $row Top left corner of square to work with
|
||||
* @param $col Top left corner of square to work with
|
||||
* $param $aFactor In how many subsquare should we split this square. A value of 1 indicates that no action
|
||||
*/
|
||||
function IntSquare( $aRow, $aCol, $aFactor ) {
|
||||
if ( $aFactor <= 1 )
|
||||
return;
|
||||
|
||||
$step = pow( 2, $aFactor-1 );
|
||||
|
||||
$v0 = $this->data[$aRow][$aCol];
|
||||
$v1 = $this->data[$aRow][$aCol + $step];
|
||||
$v2 = $this->data[$aRow + $step][$aCol];
|
||||
$v3 = $this->data[$aRow + $step][$aCol + $step];
|
||||
|
||||
$this->data[$aRow][$aCol + $step / 2] = ( $v0 + $v1 ) / 2;
|
||||
$this->data[$aRow + $step / 2][$aCol] = ( $v0 + $v2 ) / 2;
|
||||
$this->data[$aRow + $step][$aCol + $step / 2] = ( $v2 + $v3 ) / 2;
|
||||
$this->data[$aRow + $step / 2][$aCol + $step] = ( $v1 + $v3 ) / 2;
|
||||
$this->data[$aRow + $step / 2][$aCol + $step / 2] = ( $v0 + $v1 + $v2 + $v3 ) / 4;
|
||||
|
||||
$this->IntSquare( $aRow, $aCol, $aFactor-1 );
|
||||
$this->IntSquare( $aRow, $aCol + $step / 2, $aFactor-1 );
|
||||
$this->IntSquare( $aRow + $step / 2, $aCol, $aFactor-1 );
|
||||
$this->IntSquare( $aRow + $step / 2, $aCol + $step / 2, $aFactor-1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Interpolate values in a matrice so that the total number of data points
|
||||
* in vert and horizontal axis are $aIntNbr more. For example $aIntNbr=2 will
|
||||
* make the data matrice have tiwce as many vertical and horizontal dta points.
|
||||
*
|
||||
* Note: This will blow up the matrcide in memory size in the order of $aInNbr^2
|
||||
*
|
||||
* @param $ &$aData The original data matricde
|
||||
* @param $aInNbr Interpolation factor
|
||||
* @return the interpolated matrice
|
||||
*/
|
||||
function Linear( &$aData, $aIntFactor ) {
|
||||
$step = pow( 2, $aIntFactor-1 );
|
||||
|
||||
$orig_cols = count( $aData[0] );
|
||||
$orig_rows = count( $aData );
|
||||
// Number of new columns/rows
|
||||
// N = (a-1) * 2^(f-1) + 1
|
||||
$p = pow( 2, $aIntFactor-1 );
|
||||
$new_cols = $p * ( $orig_cols - 1 ) + 1;
|
||||
$new_rows = $p * ( $orig_rows - 1 ) + 1;
|
||||
|
||||
$this->data = array_fill( 0, $new_rows, array_fill( 0, $new_cols, 0 ) );
|
||||
// Initialize the new matrix with the values that we know
|
||||
for ( $i = 0; $i < $new_rows; $i++ ) {
|
||||
for ( $j = 0; $j < $new_cols; $j++ ) {
|
||||
$v = 0 ;
|
||||
if ( ( $i % $step == 0 ) && ( $j % $step == 0 ) ) {
|
||||
$v = $aData[$i / $step][$j / $step];
|
||||
}
|
||||
$this->data[$i][$j] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
for ( $i = 0; $i < $new_rows-1; $i += $step ) {
|
||||
for ( $j = 0; $j < $new_cols-1; $j += $step ) {
|
||||
$this->IntSquare( $i, $j, $aIntFactor );
|
||||
}
|
||||
}
|
||||
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -0,0 +1,345 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_MGRAPH.PHP
|
||||
// Description: Class to handle multiple graphs in the same image
|
||||
// Created: 2006-01-15
|
||||
// Ver: $Id: jpgraph_mgraph.php 1770 2009-08-17 06:10:22Z ljp $
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
//=============================================================================
|
||||
// CLASS MGraph
|
||||
// Description: Create a container image that can hold several graph
|
||||
//=============================================================================
|
||||
class MGraph {
|
||||
|
||||
public $title = null, $subtitle = null, $subsubtitle = null;
|
||||
|
||||
protected $img=NULL;
|
||||
protected $iCnt=0,$iGraphs = array(); // image_handle, x, y, fx, fy, sizex, sizey
|
||||
protected $iFillColor='white', $iCurrentColor=0;
|
||||
protected $lm=4,$rm=4,$tm=4,$bm=4;
|
||||
protected $iDoFrame = FALSE, $iFrameColor = 'black', $iFrameWeight = 1;
|
||||
protected $iLineWeight = 1;
|
||||
protected $expired=false;
|
||||
protected $cache=null,$cache_name = '',$inline=true;
|
||||
protected $image_format='png',$image_quality=75;
|
||||
protected $iWidth=NULL,$iHeight=NULL;
|
||||
protected $background_image='',$background_image_center=true,
|
||||
$backround_image_format='',$background_image_mix=100,
|
||||
$background_image_y=NULL, $background_image_x=NULL;
|
||||
private $doshadow=false, $shadow_width=4, $shadow_color='gray@0.5';
|
||||
public $footer;
|
||||
|
||||
|
||||
// Create a new instane of the combined graph
|
||||
function __construct($aWidth=NULL,$aHeight=NULL,$aCachedName='',$aTimeOut=0,$aInline=true) {
|
||||
$this->iWidth = $aWidth;
|
||||
$this->iHeight = $aHeight;
|
||||
|
||||
// If the cached version exist just read it directly from the
|
||||
// cache, stream it back to browser and exit
|
||||
if( $aCachedName!='' && READ_CACHE && $aInline ) {
|
||||
$this->cache = new ImgStreamCache();
|
||||
$this->cache->SetTimeOut($aTimeOut);
|
||||
$image = new Image();
|
||||
if( $this->cache->GetAndStream($image,$aCachedName) ) {
|
||||
exit();
|
||||
}
|
||||
}
|
||||
$this->inline = $aInline;
|
||||
$this->cache_name = $aCachedName;
|
||||
|
||||
$this->title = new Text();
|
||||
$this->title->ParagraphAlign('center');
|
||||
$this->title->SetFont(FF_FONT2,FS_BOLD);
|
||||
$this->title->SetMargin(3);
|
||||
$this->title->SetAlign('center');
|
||||
|
||||
$this->subtitle = new Text();
|
||||
$this->subtitle->ParagraphAlign('center');
|
||||
$this->subtitle->SetFont(FF_FONT1,FS_BOLD);
|
||||
$this->subtitle->SetMargin(3);
|
||||
$this->subtitle->SetAlign('center');
|
||||
|
||||
$this->subsubtitle = new Text();
|
||||
$this->subsubtitle->ParagraphAlign('center');
|
||||
$this->subsubtitle->SetFont(FF_FONT1,FS_NORMAL);
|
||||
$this->subsubtitle->SetMargin(3);
|
||||
$this->subsubtitle->SetAlign('center');
|
||||
|
||||
$this->footer = new Footer();
|
||||
|
||||
}
|
||||
|
||||
// Specify background fill color for the combined graph
|
||||
function SetFillColor($aColor) {
|
||||
$this->iFillColor = $aColor;
|
||||
}
|
||||
|
||||
// Add a frame around the combined graph
|
||||
function SetFrame($aFlg,$aColor='black',$aWeight=1) {
|
||||
$this->iDoFrame = $aFlg;
|
||||
$this->iFrameColor = $aColor;
|
||||
$this->iFrameWeight = $aWeight;
|
||||
}
|
||||
|
||||
// Specify a background image blend
|
||||
function SetBackgroundImageMix($aMix) {
|
||||
$this->background_image_mix = $aMix ;
|
||||
}
|
||||
|
||||
// Specify a background image
|
||||
function SetBackgroundImage($aFileName,$aCenter_aX=NULL,$aY=NULL) {
|
||||
// Second argument can be either a boolean value or
|
||||
// a numeric
|
||||
$aCenter=TRUE;
|
||||
$aX=NULL;
|
||||
|
||||
if( is_numeric($aCenter_aX) ) {
|
||||
$aX=$aCenter_aX;
|
||||
}
|
||||
|
||||
// Get extension to determine image type
|
||||
$e = explode('.',$aFileName);
|
||||
if( !$e ) {
|
||||
JpGraphError::RaiseL(12002,$aFileName);
|
||||
//('Incorrect file name for MGraph::SetBackgroundImage() : '.$aFileName.' Must have a valid image extension (jpg,gif,png) when using autodetection of image type');
|
||||
}
|
||||
|
||||
$valid_formats = array('png', 'jpg', 'gif');
|
||||
$aImgFormat = strtolower($e[count($e)-1]);
|
||||
if ($aImgFormat == 'jpeg') {
|
||||
$aImgFormat = 'jpg';
|
||||
}
|
||||
elseif (!in_array($aImgFormat, $valid_formats) ) {
|
||||
JpGraphError::RaiseL(12003,$aImgFormat,$aFileName);
|
||||
//('Unknown file extension ($aImgFormat) in MGraph::SetBackgroundImage() for filename: '.$aFileName);
|
||||
}
|
||||
|
||||
$this->background_image = $aFileName;
|
||||
$this->background_image_center=$aCenter;
|
||||
$this->background_image_format=$aImgFormat;
|
||||
$this->background_image_x = $aX;
|
||||
$this->background_image_y = $aY;
|
||||
}
|
||||
|
||||
function _strokeBackgroundImage() {
|
||||
if( $this->background_image == '' ) return;
|
||||
|
||||
$bkgimg = Graph::LoadBkgImage('',$this->background_image);
|
||||
|
||||
// Background width & Heoght
|
||||
$bw = imagesx($bkgimg);
|
||||
$bh = imagesy($bkgimg);
|
||||
|
||||
// Canvas width and height
|
||||
$cw = imagesx($this->img);
|
||||
$ch = imagesy($this->img);
|
||||
|
||||
if( $this->doshadow ) {
|
||||
$cw -= $this->shadow_width;
|
||||
$ch -= $this->shadow_width;
|
||||
}
|
||||
|
||||
if( $this->background_image_x === NULL || $this->background_image_y === NULL ) {
|
||||
if( $this->background_image_center ) {
|
||||
// Center original image in the plot area
|
||||
$x = round($cw/2-$bw/2); $y = round($ch/2-$bh/2);
|
||||
}
|
||||
else {
|
||||
// Just copy the image from left corner, no resizing
|
||||
$x=0; $y=0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$x = $this->background_image_x;
|
||||
$y = $this->background_image_y;
|
||||
}
|
||||
imagecopymerge($this->img,$bkgimg,$x,$y,0,0,$bw,$bh,$this->background_image_mix);
|
||||
}
|
||||
|
||||
function AddMix($aGraph,$x=0,$y=0,$mix=100,$fx=0,$fy=0,$w=0,$h=0) {
|
||||
$this->_gdImgHandle($aGraph->Stroke( _IMG_HANDLER),$x,$y,$fx=0,$fy=0,$w,$h,$mix);
|
||||
}
|
||||
|
||||
function Add($aGraph,$x=0,$y=0,$fx=0,$fy=0,$w=0,$h=0) {
|
||||
$this->_gdImgHandle($aGraph->Stroke( _IMG_HANDLER),$x,$y,$fx=0,$fy=0,$w,$h);
|
||||
}
|
||||
|
||||
function _gdImgHandle($agdCanvas,$x,$y,$fx=0,$fy=0,$w=0,$h=0,$mix=100) {
|
||||
if( $w == 0 ) {
|
||||
$w = @imagesx($agdCanvas);
|
||||
}
|
||||
if( $w === NULL ) {
|
||||
JpGraphError::RaiseL(12007);
|
||||
//('Argument to MGraph::Add() is not a valid GD image handle.');
|
||||
return;
|
||||
}
|
||||
if( $h == 0 ) {
|
||||
$h = @imagesy($agdCanvas);
|
||||
}
|
||||
$this->iGraphs[$this->iCnt++] = array($agdCanvas,$x,$y,$fx,$fy,$w,$h,$mix);
|
||||
}
|
||||
|
||||
function SetMargin($lm,$rm,$tm,$bm) {
|
||||
$this->lm = $lm;
|
||||
$this->rm = $rm;
|
||||
$this->tm = $tm;
|
||||
$this->bm = $bm;
|
||||
}
|
||||
|
||||
function SetExpired($aFlg=true) {
|
||||
$this->expired = $aFlg;
|
||||
}
|
||||
|
||||
function SetImgFormat($aFormat,$aQuality=75) {
|
||||
$this->image_format = $aFormat;
|
||||
$this->image_quality = $aQuality;
|
||||
}
|
||||
|
||||
// Set the shadow around the whole image
|
||||
function SetShadow($aShowShadow=true,$aShadowWidth=4,$aShadowColor='gray@0.3') {
|
||||
$this->doshadow = $aShowShadow;
|
||||
$this->shadow_color = $aShadowColor;
|
||||
$this->shadow_width = $aShadowWidth;
|
||||
$this->footer->iBottomMargin += $aShadowWidth;
|
||||
$this->footer->iRightMargin += $aShadowWidth;
|
||||
}
|
||||
|
||||
function StrokeTitle($image,$w,$h) {
|
||||
// Stroke title
|
||||
if( $this->title->t !== '' ) {
|
||||
|
||||
$margin = 3;
|
||||
|
||||
$y = $this->title->margin;
|
||||
if( $this->title->halign == 'center' ) {
|
||||
$this->title->Center(0,$w,$y);
|
||||
}
|
||||
elseif( $this->title->halign == 'left' ) {
|
||||
$this->title->SetPos($this->title->margin+2,$y);
|
||||
}
|
||||
elseif( $this->title->halign == 'right' ) {
|
||||
$indent = 0;
|
||||
if( $this->doshadow ) {
|
||||
$indent = $this->shadow_width+2;
|
||||
}
|
||||
$this->title->SetPos($w-$this->title->margin-$indent,$y,'right');
|
||||
}
|
||||
$this->title->Stroke($image);
|
||||
|
||||
// ... and subtitle
|
||||
$y += $this->title->GetTextHeight($image) + $margin + $this->subtitle->margin;
|
||||
if( $this->subtitle->halign == 'center' ) {
|
||||
$this->subtitle->Center(0,$w,$y);
|
||||
}
|
||||
elseif( $this->subtitle->halign == 'left' ) {
|
||||
$this->subtitle->SetPos($this->subtitle->margin+2,$y);
|
||||
}
|
||||
elseif( $this->subtitle->halign == 'right' ) {
|
||||
$indent = 0;
|
||||
if( $this->doshadow ) {
|
||||
$indent = $this->shadow_width+2;
|
||||
}
|
||||
$this->subtitle->SetPos($this->img->width-$this->subtitle->margin-$indent,$y,'right');
|
||||
}
|
||||
$this->subtitle->Stroke($image);
|
||||
|
||||
// ... and subsubtitle
|
||||
$y += $this->subtitle->GetTextHeight($image) + $margin + $this->subsubtitle->margin;
|
||||
if( $this->subsubtitle->halign == 'center' ) {
|
||||
$this->subsubtitle->Center(0,$w,$y);
|
||||
}
|
||||
elseif( $this->subsubtitle->halign == 'left' ) {
|
||||
$this->subsubtitle->SetPos($this->subsubtitle->margin+2,$y);
|
||||
}
|
||||
elseif( $this->subsubtitle->halign == 'right' ) {
|
||||
$indent = 0;
|
||||
if( $this->doshadow ) {
|
||||
$indent = $this->shadow_width+2;
|
||||
}
|
||||
$this->subsubtitle->SetPos($w-$this->subsubtitle->margin-$indent,$y,'right');
|
||||
}
|
||||
$this->subsubtitle->Stroke($image);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function Stroke($aFileName='') {
|
||||
// Find out the necessary size for the container image
|
||||
$w=0; $h=0;
|
||||
for($i=0; $i < $this->iCnt; ++$i ) {
|
||||
$maxw = $this->iGraphs[$i][1]+$this->iGraphs[$i][5];
|
||||
$maxh = $this->iGraphs[$i][2]+$this->iGraphs[$i][6];
|
||||
$w = max( $w, $maxw );
|
||||
$h = max( $h, $maxh );
|
||||
}
|
||||
$w += $this->lm+$this->rm;
|
||||
$h += $this->tm+$this->bm;
|
||||
|
||||
// User specified width,height overrides
|
||||
if( $this->iWidth !== NULL && $this->iWidth !== 0 ) $w = $this->iWidth;
|
||||
if( $this->iHeight!== NULL && $this->iHeight !== 0) $h = $this->iHeight;
|
||||
|
||||
if( $this->doshadow ) {
|
||||
$w += $this->shadow_width;
|
||||
$h += $this->shadow_width;
|
||||
}
|
||||
|
||||
$image = new Image($w,$h);
|
||||
$image->SetImgFormat( $this->image_format,$this->image_quality);
|
||||
|
||||
if( $this->doshadow ) {
|
||||
$image->SetColor($this->iFrameColor);
|
||||
$image->ShadowRectangle(0,0,$w-1,$h-1,$this->iFillColor,$this->shadow_width,$this->shadow_color);
|
||||
$w -= $this->shadow_width;
|
||||
$h -= $this->shadow_width;
|
||||
}
|
||||
else {
|
||||
$image->SetColor($this->iFillColor);
|
||||
$image->FilledRectangle(0,0,$w-1,$h-1);
|
||||
}
|
||||
$image->SetExpired($this->expired);
|
||||
|
||||
$this->img = $image->img;
|
||||
$this->_strokeBackgroundImage();
|
||||
|
||||
if( $this->iDoFrame && ! $this->doshadow ) {
|
||||
$image->SetColor($this->iFrameColor);
|
||||
$image->SetLineWeight($this->iFrameWeight);
|
||||
$image->Rectangle(0,0,$w-1,$h-1);
|
||||
}
|
||||
|
||||
// Copy all sub graphs to the container
|
||||
for($i=0; $i < $this->iCnt; ++$i ) {
|
||||
$image->CopyMerge($this->iGraphs[$i][0],
|
||||
$this->iGraphs[$i][1]+$this->lm,$this->iGraphs[$i][2]+$this->tm,
|
||||
$this->iGraphs[$i][3],$this->iGraphs[$i][4],
|
||||
$this->iGraphs[$i][5],$this->iGraphs[$i][6],
|
||||
-1,-1, /* Full from width and height */
|
||||
$this->iGraphs[$i][7]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
$this->StrokeTitle($image,$w,$h);
|
||||
$this->footer->Stroke($image);
|
||||
|
||||
// Output image
|
||||
if( $aFileName == _IMG_HANDLER ) {
|
||||
return $image->img;
|
||||
}
|
||||
else {
|
||||
//Finally stream the generated picture
|
||||
$this->cache = new ImgStreamCache();
|
||||
$this->cache->PutAndStream($image,$this->cache_name,$this->inline,$aFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EOF
|
||||
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,142 @@
|
||||
<?php
|
||||
/*=======================================================================
|
||||
// File: JPGRAPH_PLOTLINE.PHP
|
||||
// Description: PlotLine extension for JpGraph
|
||||
// Created: 2009-03-24
|
||||
// Ver: $Id: jpgraph_plotline.php 1931 2010-03-22 15:05:48Z ljp $
|
||||
//
|
||||
// CLASS PlotLine
|
||||
// Data container class to hold properties for a static
|
||||
// line that is drawn directly in the plot area.
|
||||
// Useful to add static borders inside a plot to show for example set-values
|
||||
//
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
*/
|
||||
|
||||
class PlotLine {
|
||||
public $scaleposition, $direction=-1;
|
||||
protected $weight=1;
|
||||
protected $color = 'black';
|
||||
private $legend='',$hidelegend=false, $legendcsimtarget='', $legendcsimalt='',$legendcsimwintarget='';
|
||||
private $iLineStyle='solid';
|
||||
public $numpoints=0; // Needed since the framework expects this property
|
||||
|
||||
function __construct($aDir=HORIZONTAL,$aPos=0,$aColor='black',$aWeight=1) {
|
||||
$this->direction = $aDir;
|
||||
$this->color=$aColor;
|
||||
$this->weight=$aWeight;
|
||||
$this->scaleposition=$aPos;
|
||||
}
|
||||
|
||||
function SetLegend($aLegend,$aCSIM='',$aCSIMAlt='',$aCSIMWinTarget='') {
|
||||
$this->legend = $aLegend;
|
||||
$this->legendcsimtarget = $aCSIM;
|
||||
$this->legendcsimwintarget = $aCSIMWinTarget;
|
||||
$this->legendcsimalt = $aCSIMAlt;
|
||||
}
|
||||
|
||||
function HideLegend($f=true) {
|
||||
$this->hidelegend = $f;
|
||||
}
|
||||
|
||||
function SetPosition($aScalePosition) {
|
||||
$this->scaleposition=$aScalePosition;
|
||||
}
|
||||
|
||||
function SetDirection($aDir) {
|
||||
$this->direction = $aDir;
|
||||
}
|
||||
|
||||
function SetColor($aColor) {
|
||||
$this->color=$aColor;
|
||||
}
|
||||
|
||||
function SetWeight($aWeight) {
|
||||
$this->weight=$aWeight;
|
||||
}
|
||||
|
||||
function SetLineStyle($aStyle) {
|
||||
$this->iLineStyle = $aStyle;
|
||||
}
|
||||
|
||||
function GetCSIMAreas() {
|
||||
return '';
|
||||
}
|
||||
|
||||
//---------------
|
||||
// PRIVATE METHODS
|
||||
|
||||
function DoLegend($graph) {
|
||||
if( !$this->hidelegend ) $this->Legend($graph);
|
||||
}
|
||||
|
||||
// Framework function the chance for each plot class to set a legend
|
||||
function Legend($aGraph) {
|
||||
if( $this->legend != '' ) {
|
||||
$dummyPlotMark = new PlotMark();
|
||||
$lineStyle = 1;
|
||||
$aGraph->legend->Add($this->legend,$this->color,$dummyPlotMark,$lineStyle,
|
||||
$this->legendcsimtarget,$this->legendcsimalt,$this->legendcsimwintarget);
|
||||
}
|
||||
}
|
||||
|
||||
function PreStrokeAdjust($aGraph) {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
// Called by framework to allow the object to draw
|
||||
// optional information in the margin area
|
||||
function StrokeMargin($aImg) {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
// Framework function to allow the object to adjust the scale
|
||||
function PrescaleSetup($aGraph) {
|
||||
// Nothing to do
|
||||
}
|
||||
|
||||
function Min() {
|
||||
return array(null,null);
|
||||
}
|
||||
|
||||
function Max() {
|
||||
return array(null,null);
|
||||
}
|
||||
|
||||
function _Stroke($aImg,$aMinX,$aMinY,$aMaxX,$aMaxY,$aXPos,$aYPos) {
|
||||
$aImg->SetColor($this->color);
|
||||
$aImg->SetLineWeight($this->weight);
|
||||
$oldStyle = $aImg->SetLineStyle($this->iLineStyle);
|
||||
if( $this->direction == VERTICAL ) {
|
||||
$ymin_abs = $aMinY;
|
||||
$ymax_abs = $aMaxY;
|
||||
$xpos_abs = $aXPos;
|
||||
$aImg->StyleLine($xpos_abs, $ymin_abs, $xpos_abs, $ymax_abs);
|
||||
}
|
||||
elseif( $this->direction == HORIZONTAL ) {
|
||||
$xmin_abs = $aMinX;
|
||||
$xmax_abs = $aMaxX;
|
||||
$ypos_abs = $aYPos;
|
||||
$aImg->StyleLine($xmin_abs, $ypos_abs, $xmax_abs, $ypos_abs);
|
||||
}
|
||||
else {
|
||||
JpGraphError::RaiseL(25125);//(" Illegal direction for static line");
|
||||
}
|
||||
$aImg->SetLineStyle($oldStyle);
|
||||
}
|
||||
|
||||
function Stroke($aImg,$aXScale,$aYScale) {
|
||||
$this->_Stroke($aImg,
|
||||
$aImg->left_margin,
|
||||
$aYScale->Translate($aYScale->GetMinVal()),
|
||||
$aImg->width-$aImg->right_margin,
|
||||
$aYScale->Translate($aYScale->GetMaxVal()),
|
||||
$aXScale->Translate($this->scaleposition),
|
||||
$aYScale->Translate($this->scaleposition)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue