From 27aee719b09a66e0e0ca5a6ef0f97d6a0f2b7499 Mon Sep 17 00:00:00 2001
From: Deon George
Date: Mon, 3 Aug 2009 14:10:16 +1000
Subject: [PATCH] Changes to AgileBill
---
admin.php | 28 +-
ajax.php | 68 +-
config.inc.php | 4 +-
cookie.index.php | 103 -
htaccess_index.php | 266 -
includes/fpdf/font/courier.php | 7 +
includes/fpdf/font/desktop.ini | 4 +
includes/fpdf/font/helvetica.php | 15 +
includes/fpdf/font/helveticab.php | 15 +
includes/fpdf/font/helveticabi.php | 15 +
includes/fpdf/font/helveticai.php | 15 +
includes/fpdf/font/makefont/cp1250.map | 251 +
includes/fpdf/font/makefont/cp1251.map | 255 +
includes/fpdf/font/makefont/cp1252.map | 251 +
includes/fpdf/font/makefont/cp1253.map | 239 +
includes/fpdf/font/makefont/cp1254.map | 249 +
includes/fpdf/font/makefont/cp1255.map | 233 +
includes/fpdf/font/makefont/cp1257.map | 244 +
includes/fpdf/font/makefont/cp1258.map | 247 +
includes/fpdf/font/makefont/cp874.map | 225 +
includes/fpdf/font/makefont/iso-8859-1.map | 256 +
includes/fpdf/font/makefont/iso-8859-11.map | 248 +
includes/fpdf/font/makefont/iso-8859-15.map | 256 +
includes/fpdf/font/makefont/iso-8859-16.map | 256 +
includes/fpdf/font/makefont/iso-8859-2.map | 256 +
includes/fpdf/font/makefont/iso-8859-4.map | 256 +
includes/fpdf/font/makefont/iso-8859-5.map | 256 +
includes/fpdf/font/makefont/iso-8859-7.map | 250 +
includes/fpdf/font/makefont/iso-8859-9.map | 256 +
includes/fpdf/font/makefont/koi8-r.map | 256 +
includes/fpdf/font/makefont/koi8-u.map | 256 +
includes/fpdf/font/makefont/makefont.php | 419 +
includes/fpdf/font/symbol.php | 15 +
includes/fpdf/font/times.php | 15 +
includes/fpdf/font/timesb.php | 15 +
includes/fpdf/font/timesbi.php | 15 +
includes/fpdf/font/timesi.php | 15 +
includes/fpdf/font/zapfdingbats.php | 15 +
includes/fpdf/fpdf.php | 1732 +
includes/fpdf/license.txt | 6 +
includes/javascript/controls.js | 4 +-
includes/pdf/invoice_base.inc.php | 254 -
includes/pdf/pdf_invoice_overview.inc.php | 278 -
.../pdf/pdf_invoice_voip-detailed.inc.php | 406 -
includes/pdf/pdf_invoice_voip.inc.php | 321 -
includes/smarty/plugins/block.account.php | 20 -
includes/smarty/plugins/block.group.php | 38 -
includes/smarty/plugins/block.htmlarea.php | 55 -
includes/smarty/plugins/block.is_auth.php | 23 -
.../smarty/plugins/block.is_auth_method.php | 25 -
includes/smarty/plugins/block.panel.php | 39 -
includes/smarty/plugins/block.translate.php | 38 -
.../smarty/plugins/function.ab_version.php | 19 -
includes/smarty/plugins/function.assign.php | 30 -
includes/smarty/plugins/function.block.php | 29 -
includes/smarty/plugins/function.date.php | 16 -
.../smarty/plugins/function.date_time.php | 18 -
.../smarty/plugins/function.db_lookup.php | 33 -
includes/smarty/plugins/function.exe.php | 22 -
includes/smarty/plugins/function.graph.php | 41 -
.../smarty/plugins/function.grid_bool.php | 20 -
.../plugins/function.grid_column_heading.php | 31 -
.../plugins/function.grid_column_refine.php | 26 -
.../smarty/plugins/function.html_bool.php | 28 -
.../smarty/plugins/function.html_button.php | 58 -
.../smarty/plugins/function.html_date.php | 28 -
.../smarty/plugins/function.html_link.php | 77 -
.../smarty/plugins/function.html_menu.php | 41 -
.../plugins/function.html_menu_files.php | 80 -
.../plugins/function.html_menu_multi.php | 51 -
.../function.html_menu_product_host.php | 41 -
...unction.html_menu_product_subscription.php | 42 -
.../function.html_menu_search_expr.php | 63 -
.../smarty/plugins/function.html_menu_sub.php | 96 -
.../plugins/function.html_select_account.php | 49 -
.../function.html_select_affiliate.php | 56 -
.../smarty/plugins/function.input_text.php | 21 -
includes/smarty/plugins/function.osb.php | 445 +
includes/smarty/plugins/function.plugin.php | 70 -
.../smarty/plugins/function.style_hide.php | 17 -
includes/smarty/plugins/modifier.date.php | 7 -
.../smarty/plugins/modifier.linkalize.php | 28 -
includes/smarty/plugins/modifier.markdown.php | 1989 -
.../smarty/plugins/modifier.smartypants.php | 854 -
includes/smarty/plugins/modifier.textile.php | 4089 ---
includes/smarty/plugins/postfilter.lang.php | 37 -
includes/tcpdf/2dbarcodes.php | 126 +
includes/tcpdf/LICENSE.TXT | 504 +
includes/tcpdf/barcodes.php | 1978 +
includes/tcpdf/config/lang/eng.php | 50 +
includes/tcpdf/config/lang/ita.php | 50 +
includes/tcpdf/config/tcpdf_config.php | 232 +
includes/tcpdf/config/tcpdf_config_alt.php | 227 +
includes/tcpdf/fonts/README.TXT | 3 +
includes/tcpdf/fonts/ZarBold.ctg.z | Bin 0 -> 1107 bytes
includes/tcpdf/fonts/ZarBold.z | Bin 0 -> 32143 bytes
includes/tcpdf/fonts/almohanad.ctg.z | Bin 0 -> 2780 bytes
includes/tcpdf/fonts/almohanad.php | 102 +
includes/tcpdf/fonts/almohanad.z | Bin 0 -> 121292 bytes
includes/tcpdf/fonts/arialunicid0.php | 1768 +
includes/tcpdf/fonts/courier.php | 33 +
.../tcpdf/fonts/dejavu-fonts-ttf-2.30/AUTHORS | 46 +
.../tcpdf/fonts/dejavu-fonts-ttf-2.30/BUGS | 3 +
.../tcpdf/fonts/dejavu-fonts-ttf-2.30/LICENSE | 99 +
.../tcpdf/fonts/dejavu-fonts-ttf-2.30/NEWS | 1215 +
.../tcpdf/fonts/dejavu-fonts-ttf-2.30/README | 59 +
.../fonts/dejavu-fonts-ttf-2.30/langcover.txt | 242 +
.../fonts/dejavu-fonts-ttf-2.30/status.txt | 6237 ++++
.../fonts/dejavu-fonts-ttf-2.30/unicover.txt | 177 +
includes/tcpdf/fonts/dejavusans.ctg.z | Bin 0 -> 9768 bytes
includes/tcpdf/fonts/dejavusans.php | 517 +
includes/tcpdf/fonts/dejavusans.z | Bin 0 -> 334954 bytes
includes/tcpdf/fonts/dejavusansb.ctg.z | Bin 0 -> 9507 bytes
includes/tcpdf/fonts/dejavusansb.php | 504 +
includes/tcpdf/fonts/dejavusansb.z | Bin 0 -> 305270 bytes
includes/tcpdf/fonts/dejavusansbi.ctg.z | Bin 0 -> 8547 bytes
includes/tcpdf/fonts/dejavusansbi.php | 458 +
includes/tcpdf/fonts/dejavusansbi.z | Bin 0 -> 289397 bytes
.../tcpdf/fonts/dejavusanscondensed.ctg.z | Bin 0 -> 9768 bytes
includes/tcpdf/fonts/dejavusanscondensed.php | 517 +
includes/tcpdf/fonts/dejavusanscondensed.z | Bin 0 -> 286380 bytes
.../tcpdf/fonts/dejavusanscondensedb.ctg.z | Bin 0 -> 9507 bytes
includes/tcpdf/fonts/dejavusanscondensedb.php | 504 +
includes/tcpdf/fonts/dejavusanscondensedb.z | Bin 0 -> 283491 bytes
.../tcpdf/fonts/dejavusanscondensedbi.ctg.z | Bin 0 -> 8547 bytes
.../tcpdf/fonts/dejavusanscondensedbi.php | 458 +
includes/tcpdf/fonts/dejavusanscondensedbi.z | Bin 0 -> 275613 bytes
.../tcpdf/fonts/dejavusanscondensedi.ctg.z | Bin 0 -> 8794 bytes
includes/tcpdf/fonts/dejavusanscondensedi.php | 471 +
includes/tcpdf/fonts/dejavusanscondensedi.z | Bin 0 -> 271731 bytes
includes/tcpdf/fonts/dejavusansi.ctg.z | Bin 0 -> 8794 bytes
includes/tcpdf/fonts/dejavusansi.php | 471 +
includes/tcpdf/fonts/dejavusansi.z | Bin 0 -> 289088 bytes
includes/tcpdf/fonts/dejavusansmono.ctg.z | Bin 0 -> 6039 bytes
includes/tcpdf/fonts/dejavusansmono.php | 320 +
includes/tcpdf/fonts/dejavusansmono.z | Bin 0 -> 188525 bytes
includes/tcpdf/fonts/dejavusansmonob.ctg.z | Bin 0 -> 5814 bytes
includes/tcpdf/fonts/dejavusansmonob.php | 307 +
includes/tcpdf/fonts/dejavusansmonob.z | Bin 0 -> 181506 bytes
includes/tcpdf/fonts/dejavusansmonobi.ctg.z | Bin 0 -> 4676 bytes
includes/tcpdf/fonts/dejavusansmonobi.php | 250 +
includes/tcpdf/fonts/dejavusansmonobi.z | Bin 0 -> 133442 bytes
includes/tcpdf/fonts/dejavusansmonoi.ctg.z | Bin 0 -> 4929 bytes
includes/tcpdf/fonts/dejavusansmonoi.php | 262 +
includes/tcpdf/fonts/dejavusansmonoi.z | Bin 0 -> 135140 bytes
includes/tcpdf/fonts/dejavuserif.ctg.z | Bin 0 -> 5821 bytes
includes/tcpdf/fonts/dejavuserif.php | 313 +
includes/tcpdf/fonts/dejavuserif.z | Bin 0 -> 180867 bytes
includes/tcpdf/fonts/dejavuserifb.ctg.z | Bin 0 -> 5558 bytes
includes/tcpdf/fonts/dejavuserifb.php | 299 +
includes/tcpdf/fonts/dejavuserifb.z | Bin 0 -> 166879 bytes
includes/tcpdf/fonts/dejavuserifbi.ctg.z | Bin 0 -> 5570 bytes
includes/tcpdf/fonts/dejavuserifbi.php | 299 +
includes/tcpdf/fonts/dejavuserifbi.z | Bin 0 -> 165164 bytes
.../tcpdf/fonts/dejavuserifcondensed.ctg.z | Bin 0 -> 5821 bytes
includes/tcpdf/fonts/dejavuserifcondensed.php | 313 +
includes/tcpdf/fonts/dejavuserifcondensed.z | Bin 0 -> 160024 bytes
.../tcpdf/fonts/dejavuserifcondensedb.ctg.z | Bin 0 -> 5558 bytes
.../tcpdf/fonts/dejavuserifcondensedb.php | 299 +
includes/tcpdf/fonts/dejavuserifcondensedb.z | Bin 0 -> 151074 bytes
.../tcpdf/fonts/dejavuserifcondensedbi.ctg.z | Bin 0 -> 5570 bytes
.../tcpdf/fonts/dejavuserifcondensedbi.php | 299 +
includes/tcpdf/fonts/dejavuserifcondensedbi.z | Bin 0 -> 166119 bytes
.../tcpdf/fonts/dejavuserifcondensedi.ctg.z | Bin 0 -> 5796 bytes
.../tcpdf/fonts/dejavuserifcondensedi.php | 312 +
includes/tcpdf/fonts/dejavuserifcondensedi.z | Bin 0 -> 168063 bytes
includes/tcpdf/fonts/dejavuserifi.ctg.z | Bin 0 -> 5796 bytes
includes/tcpdf/fonts/dejavuserifi.php | 312 +
includes/tcpdf/fonts/dejavuserifi.z | Bin 0 -> 166877 bytes
.../tcpdf/fonts/freefont-20090104/AUTHORS | 208 +
.../tcpdf/fonts/freefont-20090104/COPYING | 674 +
.../tcpdf/fonts/freefont-20090104/CREDITS | 528 +
.../tcpdf/fonts/freefont-20090104/ChangeLog | 4525 +++
.../tcpdf/fonts/freefont-20090104/INSTALL | 86 +
includes/tcpdf/fonts/freefont-20090104/README | 108 +
includes/tcpdf/fonts/freemono.ctg.z | Bin 0 -> 6361 bytes
includes/tcpdf/fonts/freemono.php | 348 +
includes/tcpdf/fonts/freemono.z | Bin 0 -> 146378 bytes
includes/tcpdf/fonts/freemonob.ctg.z | Bin 0 -> 3715 bytes
includes/tcpdf/fonts/freemonob.php | 204 +
includes/tcpdf/fonts/freemonob.z | Bin 0 -> 85241 bytes
includes/tcpdf/fonts/freemonobi.ctg.z | Bin 0 -> 2749 bytes
includes/tcpdf/fonts/freemonobi.php | 153 +
includes/tcpdf/fonts/freemonobi.z | Bin 0 -> 82287 bytes
includes/tcpdf/fonts/freemonoi.ctg.z | Bin 0 -> 4000 bytes
includes/tcpdf/fonts/freemonoi.php | 221 +
includes/tcpdf/fonts/freemonoi.z | Bin 0 -> 107860 bytes
includes/tcpdf/fonts/freesans.ctg.z | Bin 0 -> 5822 bytes
includes/tcpdf/fonts/freesans.php | 311 +
includes/tcpdf/fonts/freesans.z | Bin 0 -> 308238 bytes
includes/tcpdf/fonts/freesansb.ctg.z | Bin 0 -> 4308 bytes
includes/tcpdf/fonts/freesansb.php | 236 +
includes/tcpdf/fonts/freesansb.z | Bin 0 -> 149951 bytes
includes/tcpdf/fonts/freesansbi.ctg.z | Bin 0 -> 4065 bytes
includes/tcpdf/fonts/freesansbi.php | 225 +
includes/tcpdf/fonts/freesansbi.z | Bin 0 -> 144094 bytes
includes/tcpdf/fonts/freesansi.ctg.z | Bin 0 -> 4349 bytes
includes/tcpdf/fonts/freesansi.php | 239 +
includes/tcpdf/fonts/freesansi.z | Bin 0 -> 224360 bytes
includes/tcpdf/fonts/freeserif.ctg.z | Bin 0 -> 9573 bytes
includes/tcpdf/fonts/freeserif.php | 504 +
includes/tcpdf/fonts/freeserif.z | Bin 0 -> 785794 bytes
includes/tcpdf/fonts/freeserifb.ctg.z | Bin 0 -> 5162 bytes
includes/tcpdf/fonts/freeserifb.php | 282 +
includes/tcpdf/fonts/freeserifb.z | Bin 0 -> 232589 bytes
includes/tcpdf/fonts/freeserifbi.ctg.z | Bin 0 -> 4316 bytes
includes/tcpdf/fonts/freeserifbi.php | 238 +
includes/tcpdf/fonts/freeserifbi.z | Bin 0 -> 229394 bytes
includes/tcpdf/fonts/freeserifi.ctg.z | Bin 0 -> 4703 bytes
includes/tcpdf/fonts/freeserifi.php | 259 +
includes/tcpdf/fonts/freeserifi.z | Bin 0 -> 331961 bytes
includes/tcpdf/fonts/helvetica.php | 33 +
includes/tcpdf/fonts/helveticab.php | 33 +
includes/tcpdf/fonts/helveticabi.php | 33 +
includes/tcpdf/fonts/helveticai.php | 33 +
includes/tcpdf/fonts/hysmyeongjostdmedium.php | 48 +
includes/tcpdf/fonts/kozgopromedium.php | 65 +
includes/tcpdf/fonts/kozminproregular.php | 63 +
includes/tcpdf/fonts/msungstdlight.php | 38 +
includes/tcpdf/fonts/stsongstdlight.php | 39 +
includes/tcpdf/fonts/symbol.php | 32 +
includes/tcpdf/fonts/times.php | 33 +
includes/tcpdf/fonts/timesb.php | 33 +
includes/tcpdf/fonts/timesbi.php | 33 +
includes/tcpdf/fonts/timesi.php | 33 +
includes/tcpdf/fonts/uni2cid_ac15.php | 23613 ++++++++++++
includes/tcpdf/fonts/uni2cid_ag15.php | 30222 ++++++++++++++++
includes/tcpdf/fonts/uni2cid_aj16.php | 15705 ++++++++
includes/tcpdf/fonts/uni2cid_ak12.php | 17530 +++++++++
includes/tcpdf/fonts/utils/README.TXT | 130 +
includes/tcpdf/fonts/utils/enc/cp1250.map | 251 +
includes/tcpdf/fonts/utils/enc/cp1251.map | 255 +
includes/tcpdf/fonts/utils/enc/cp1252.map | 251 +
includes/tcpdf/fonts/utils/enc/cp1253.map | 239 +
includes/tcpdf/fonts/utils/enc/cp1254.map | 249 +
includes/tcpdf/fonts/utils/enc/cp1255.map | 233 +
includes/tcpdf/fonts/utils/enc/cp1257.map | 244 +
includes/tcpdf/fonts/utils/enc/cp1258.map | 247 +
includes/tcpdf/fonts/utils/enc/cp874.map | 225 +
includes/tcpdf/fonts/utils/enc/iso-8859-1.map | 256 +
.../tcpdf/fonts/utils/enc/iso-8859-11.map | 248 +
.../tcpdf/fonts/utils/enc/iso-8859-15.map | 256 +
.../tcpdf/fonts/utils/enc/iso-8859-16.map | 256 +
includes/tcpdf/fonts/utils/enc/iso-8859-2.map | 256 +
includes/tcpdf/fonts/utils/enc/iso-8859-4.map | 256 +
includes/tcpdf/fonts/utils/enc/iso-8859-5.map | 256 +
includes/tcpdf/fonts/utils/enc/iso-8859-7.map | 250 +
includes/tcpdf/fonts/utils/enc/iso-8859-9.map | 256 +
includes/tcpdf/fonts/utils/enc/koi8-r.map | 256 +
includes/tcpdf/fonts/utils/enc/koi8-u.map | 256 +
includes/tcpdf/fonts/utils/freetype6.dll | Bin 0 -> 455680 bytes
.../tcpdf/fonts/utils/makeallttffonts.php | 71 +
includes/tcpdf/fonts/utils/makefont.php | 610 +
includes/tcpdf/fonts/utils/pfm2afm | Bin 0 -> 20031 bytes
includes/tcpdf/fonts/utils/pfm2afm.exe | Bin 0 -> 22891 bytes
.../tcpdf/fonts/utils/src/pfm2afm-src.tar.gz | Bin 0 -> 21325 bytes
includes/tcpdf/fonts/utils/src/readme.txt | 17 +
.../tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz | Bin 0 -> 714480 bytes
includes/tcpdf/fonts/utils/ttf2ufm | Bin 0 -> 157374 bytes
includes/tcpdf/fonts/utils/ttf2ufm.exe | Bin 0 -> 184320 bytes
includes/tcpdf/fonts/utils/zlib1.dll | Bin 0 -> 75264 bytes
includes/tcpdf/fonts/zapfdingbats.php | 32 +
includes/tcpdf/fonts/zarbold.php | 47 +
includes/tcpdf/htmlcolors.php | 210 +
includes/tcpdf/tcpdf.crt | 40 +
includes/tcpdf/tcpdf.php | 16247 +++++++++
includes/tcpdf/unicode_data.php | 18360 ++++++++++
index.php | 116 +-
install/config.inc | 93 +-
install/install.inc | 528 +-
install/install_db_core.inc | 486 -
install/step1.php | 116 +-
install/step2.php | 103 +-
install/step3.php | 35 +-
install/template.inc | 110 +-
language/Makefile | 85 +
.../account_admin/english_account_admin.xml | 6 +-
.../english_account_billing.xml | 87 +-
.../account_memo/english_account_memo.xml | 40 +-
language/core/english_core.xml | 5 +-
language/country/english_country.xml | 26 -
language/db_mapping/english_db_mapping.xml | 33 -
language/file/english_file.xml | 52 -
.../file_category/english_file_category.xml | 27 -
language/group/english_group.xml | 48 -
language/htaccess/english_htaccess.xml | 32 -
.../htaccess_dir/english_htaccess_dir.xml | 46 -
.../english_htaccess_exclude.xml | 15 -
language/import/english_import.xml | 36 -
language/invoice/english_invoice.xml | 287 +-
language/log_error/english_log_error.xml | 19 -
language/login_log/english_login_log.xml | 18 -
language/messages.header | 15 +
language/net_term/english_net_term.xml | 38 +-
language/newsletter/english_newsletter.xml | 2 +-
language/product_cat/english_product_cat.xml | 30 -
language/setup/english_setup.xml | 1 -
.../setup_invoice/english_setup_invoice.xml | 32 +-
language/staff/english_staff.xml | 1 -
.../english_staff_department.xml | 17 -
.../english_static_relation.xml | 22 -
language/static_var/english_static_var.xml | 49 -
language/task/english_task.xml | 31 -
language/ticket/english_ticket.xml | 100 -
.../english_ticket_department.xml | 21 -
.../ticket_message/english_ticket_message.xml | 19 -
modules/account/account.inc.php | 3109 +-
modules/account/account_construct.xml | 496 +-
modules/account/account_install.xml | 107 +-
modules/account/account_install_data.xml | 62 +-
modules/account/auth.inc.php | 47 +-
modules/account_admin/account_admin.inc.php | 2651 --
.../account_admin/account_admin_construct.xml | 180 -
.../account_admin/account_admin_install.xml | 77 -
.../account_group/account_group_construct.xml | 112 +-
.../account_group/account_group_install.xml | 6 +-
.../account_group_install_data.xml | 85 +-
modules/account_memo/account_memo.inc.php | 126 +-
.../account_memo/account_memo_construct.xml | 157 +-
modules/account_memo/account_memo_install.xml | 11 +-
modules/affiliate/affiliate.inc.php | 60 +-
modules/affiliate/affiliate_construct.xml | 253 +-
modules/affiliate/affiliate_install.xml | 107 +-
.../affiliate_commission.inc.php | 96 +-
.../affiliate_commission_construct.xml | 173 +-
.../affiliate_commission_install.xml | 95 +-
.../affiliate_template.inc.php | 126 +-
.../affiliate_template_construct.xml | 206 +-
.../affiliate_template_install.xml | 82 +-
.../affiliate_template_install_data.xml | 38 +-
modules/blocked_email/blocked_email.inc.php | 158 +-
.../blocked_email/blocked_email_construct.xml | 148 +-
.../blocked_email/blocked_email_install.xml | 93 +-
modules/blocked_ip/blocked_ip.inc.php | 158 +-
modules/blocked_ip/blocked_ip_construct.xml | 146 +-
modules/blocked_ip/blocked_ip_install.xml | 93 +-
modules/campaign/campaign.inc.php | 437 +-
modules/campaign/campaign_construct.xml | 526 +-
modules/campaign/campaign_install.xml | 130 +-
modules/campaign/index.php | 141 +-
modules/cart/cart.inc.php | 925 +-
modules/cart/cart_construct.xml | 227 +-
modules/cart/cart_install.xml | 51 +-
modules/charge/charge.inc.php | 912 +-
modules/charge/charge_construct.xml | 224 +-
modules/charge/charge_install.xml | 136 +-
.../checkout/base_checkout_plugin.class.php | 39 +-
modules/checkout/checkout.inc.php | 638 +-
modules/checkout/checkout_construct.xml | 312 +-
modules/checkout/checkout_install.xml | 105 +-
modules/core/auth.inc.php | 401 +-
modules/core/auth_generate_admin_menu.inc.php | 171 +-
modules/core/crypt.inc.php | 362 +-
modules/core/database.inc.php | 469 +-
modules/core/database_add.inc.php | 343 +-
modules/core/database_delete.inc.php | 73 +-
modules/core/database_mass_delete.inc.php | 194 +-
modules/core/database_search.inc.php | 416 +-
modules/core/database_search_form.inc.php | 10 +-
modules/core/database_search_show.inc.php | 302 +-
modules/core/database_update.inc.php | 312 +-
modules/core/database_view.inc.php | 225 +-
modules/core/email.inc.php | 324 +-
modules/core/list.inc.php | 461 +-
modules/core/list_calendar.inc.php | 80 +-
modules/core/list_card_type_menu.inc.php | 114 +-
modules/core/list_menu_files.inc.php | 132 +-
modules/core/list_menu_multi.inc.php | 97 +-
modules/core/list_select_groups.inc.php | 20 +-
modules/core/list_setup_default_date.inc.php | 95 +-
modules/core/login.inc.php | 49 +-
modules/core/method.inc.php | 274 +-
modules/core/search.inc.php | 438 +-
modules/core/service_group.inc.php | 10 +-
modules/core/session.inc.php | 5 +-
modules/core/setup.inc.php | 232 +-
modules/core/sort_array.inc.php | 4 +-
modules/core/static_var.inc.php | 20 +-
modules/core/theme.inc.php | 272 +-
modules/core/translate.inc.php | 253 +-
modules/core/trigger.inc.php | 85 +-
modules/core/validate.inc.php | 1081 +-
modules/core/version.inc.php | 4 -
modules/core/xml.inc.php | 5 +-
modules/country/country.inc.php | 129 +-
modules/country/country_construct.xml | 165 +-
modules/country/country_install.xml | 86 +-
modules/country/country_install_data.xml | 3359 +-
modules/currency/currency.inc.php | 212 +-
modules/currency/currency_construct.xml | 162 +-
modules/currency/currency_install.xml | 6 +-
modules/currency/currency_install_data.xml | 253 +-
modules/db_mapping/db_mapping.inc.php | 2079 --
modules/db_mapping/db_mapping_construct.xml | 90 -
modules/db_mapping/db_mapping_install.xml | 35 -
modules/discount/discount.inc.php | 101 +-
modules/discount/discount_construct.xml | 290 +-
modules/discount/discount_install.xml | 90 +-
modules/email_log/email_log.inc.php | 149 +-
modules/email_log/email_log_construct.xml | 150 +-
modules/email_log/email_log_install.xml | 81 +-
modules/email_queue/email_queue.inc.php | 202 +-
modules/email_queue/email_queue_construct.xml | 188 +-
modules/email_queue/email_queue_install.xml | 45 +-
modules/email_template/email_template.inc.php | 712 +-
.../email_template_construct.xml | 186 +-
.../email_template/email_template_install.xml | 82 +-
.../email_template_install_data.xml | 112 +-
.../email_template_translate.inc.php | 128 +-
.../email_template_translate_construct.xml | 159 +-
.../email_template_translate_install.xml | 79 +-
.../email_template_translate_install_data.xml | 1969 +-
modules/faq/auth.inc.php | 41 +-
modules/faq/faq.inc.php | 153 +-
modules/faq/faq_construct.xml | 176 +-
modules/faq/faq_install.xml | 102 +-
modules/faq_category/auth.inc.php | 35 +-
modules/faq_category/faq_category.inc.php | 146 +-
.../faq_category/faq_category_construct.xml | 159 +-
modules/faq_category/faq_category_install.xml | 88 +-
modules/faq_translate/faq_translate.inc.php | 130 +-
.../faq_translate/faq_translate_construct.xml | 166 +-
.../faq_translate/faq_translate_install.xml | 77 +-
modules/file/auth.inc.php | 11 -
modules/file/file.inc.php | 492 -
modules/file/file_construct.xml | 100 -
modules/file/file_install.xml | 50 -
modules/file/file_install_data.xml | 3 -
modules/file_category/file_category.inc.php | 123 -
.../file_category/file_category_construct.xml | 71 -
.../file_category/file_category_install.xml | 44 -
.../file_category_install_data.xml | 26 -
modules/group/group.inc.php | 380 +-
modules/group/group_construct.xml | 169 +-
modules/group/group_install.xml | 91 +-
modules/group/group_install_data.xml | 98 +-
modules/group_method/group_method_install.xml | 4 +-
.../host_registrar_plugin.inc.php | 106 +-
.../host_registrar_plugin_construct.xml | 134 +-
.../host_registrar_plugin_install.xml | 84 +-
.../host_registrar_plugin_install_data.xml | 24 +-
modules/host_server/host_server.inc.php | 168 +-
modules/host_server/host_server_construct.xml | 231 +-
modules/host_server/host_server_install.xml | 89 +-
modules/host_tld/host_tld.inc.php | 106 +-
modules/host_tld/host_tld_construct.xml | 219 +-
modules/host_tld/host_tld_install.xml | 86 +-
modules/host_tld/host_tld_install_data.xml | 46 +-
modules/htaccess/auth.inc.php | 10 -
modules/htaccess/htaccess.inc.php | 362 -
modules/htaccess/htaccess_construct.xml | 70 -
modules/htaccess/htaccess_install.xml | 37 -
modules/htaccess/mod_auth_remote.inc.php | 103 -
modules/htaccess_dir/htaccess_dir.inc.php | 472 -
.../htaccess_dir/htaccess_dir_construct.xml | 114 -
modules/htaccess_dir/htaccess_dir_install.xml | 33 -
.../htaccess_exclude/htaccess_exclude.inc.php | 126 -
.../htaccess_exclude_construct.xml | 49 -
.../htaccess_exclude_install.xml | 36 -
.../htaccess_exclude_install_data.xml | 153 -
modules/import/import.inc.php | 422 +-
modules/import/import_construct.xml | 139 +-
modules/import/import_install.xml | 84 +-
.../PDF/pdf_invoice_itemised-fpdf.inc.php | 621 +
.../PDF/pdf_invoice_itemised-fpdi.inc.php | 638 +
.../PDF/pdf_invoice_itemised-tcpdf.inc.php | 624 +
modules/invoice/auth.inc.php | 52 +-
modules/invoice/invoice.inc.php | 4652 ++-
modules/invoice/invoice_base_fpdf.inc.php | 197 +
modules/invoice/invoice_base_fpdi.inc.php | 314 +
modules/invoice/invoice_base_tcpdf.inc.php | 182 +
modules/invoice/invoice_construct.xml | 480 +-
modules/invoice/invoice_fpdf.inc.php | 393 -
modules/invoice/invoice_install.xml | 156 +-
modules/invoice/receipt_print.php | 6 +-
modules/invoice_item/invoice_item.inc.php | 129 +-
.../invoice_item/invoice_item_construct.xml | 255 +-
modules/invoice_memo/invoice_memo.inc.php | 129 +-
.../invoice_memo/invoice_memo_construct.xml | 157 +-
modules/invoice_memo/invoice_memo_install.xml | 5 +-
modules/log_error/log_error.inc.php | 170 +-
modules/log_error/log_error_construct.xml | 150 +-
modules/log_error/log_error_install.xml | 84 +-
modules/login_log/login_log.inc.php | 172 +-
modules/login_log/login_log_construct.xml | 150 +-
modules/login_log/login_log_install.xml | 79 +-
modules/module.inc.php | 461 +
modules/module/module.inc.php | 1688 +-
modules/module/module_construct.xml | 201 +-
modules/module/module_install.xml | 139 +-
modules/module_method/module_method.inc.php | 356 +-
.../module_method/module_method_construct.xml | 166 +-
.../module_method/module_method_install.xml | 92 +-
modules/net_term/net_term.inc.php | 402 +-
modules/net_term/net_term_construct.xml | 203 +-
modules/net_term/net_term_install.xml | 90 +-
modules/product/base_product_plugin.inc.php | 193 +-
modules/product/product.inc.php | 658 +-
modules/product/product_construct.xml | 456 +-
modules/product/product_install.xml | 102 +-
.../product_attr/product_attr_construct.xml | 170 +-
modules/product_attr/product_attr_install.xml | 77 +-
modules/product_cat/product_cat.inc.php | 735 +-
modules/product_cat/product_cat_construct.xml | 193 +-
modules/product_cat/product_cat_install.xml | 91 +-
.../product_cat_translate.inc.php | 107 +-
.../product_cat_translate_construct.xml | 127 +-
.../product_cat_translate_install.xml | 79 +-
.../product_cat_translate_install_data.xml | 3 +-
modules/product_img/product_img_construct.xml | 116 +-
modules/product_img/product_img_install.xml | 77 +-
.../product_translate_construct.xml | 148 +-
.../product_translate_install.xml | 77 +-
modules/search/search_construct.xml | 144 +-
modules/search/search_install.xml | 27 +-
modules/search/search_install_data.xml | 58 -
modules/search_saved/search_saved_install.xml | 4 +-
modules/service/service.inc.php | 697 +-
modules/service/service_construct.xml | 516 +-
modules/service/service_install.xml | 134 +-
modules/service_memo/service_memo.inc.php | 128 +-
.../service_memo/service_memo_construct.xml | 157 +-
modules/service_memo/service_memo_install.xml | 11 +-
modules/session/session.inc.php | 147 +-
modules/session/session_construct.xml | 242 +-
modules/session/session_install.xml | 80 +-
.../session_auth_cache_install.xml | 5 +-
modules/setup/setup.inc.php | 163 +-
modules/setup/setup_construct.xml | 632 +-
modules/setup/setup_install.xml | 75 +-
modules/setup/setup_install_data.xml | 128 +-
modules/setup_email/setup_email.inc.php | 128 +-
modules/setup_email/setup_email_construct.xml | 243 +-
modules/setup_email/setup_email_install.xml | 83 +-
modules/setup_invoice/setup_invoice.inc.php | 74 +-
.../setup_invoice/setup_invoice_construct.xml | 201 +-
.../setup_invoice/setup_invoice_install.xml | 63 +-
.../setup_invoice_install_data.xml | 43 +-
modules/staff/staff.inc.php | 371 +-
modules/staff/staff_construct.xml | 178 +-
modules/staff/staff_install.xml | 89 +-
.../staff_department/staff_department.inc.php | 128 +-
.../staff_department_construct.xml | 141 +-
.../staff_department_install.xml | 78 +-
.../staff_department_install_data.xml | 25 +-
modules/static_page/static_page.inc.php | 483 +-
modules/static_page/static_page_construct.xml | 199 +-
modules/static_page/static_page_install.xml | 92 +-
.../static_page_category.inc.php | 228 +-
.../static_page_category_construct.xml | 166 +-
.../static_page_category_install.xml | 83 +-
.../static_page_category_install_data.xml | 27 +-
.../static_page_translate.inc.php | 135 +-
.../static_page_translate_construct.xml | 170 +-
.../static_page_translate_install.xml | 70 +-
.../static_relation/static_relation.inc.php | 135 +-
.../static_relation_construct.xml | 177 +-
.../static_relation_install.xml | 74 +-
modules/static_var/static_var.inc.php | 140 +-
modules/static_var/static_var_construct.xml | 165 +-
modules/static_var/static_var_install.xml | 83 +-
.../static_var/static_var_install_data.xml | 117 +-
.../static_var_record.inc.php | 50 +-
.../static_var_record_construct.xml | 122 +-
.../static_var_record_install.xml | 27 +-
modules/task/task.inc.php | 342 +-
modules/task/task_construct.xml | 287 +-
modules/task/task_install.xml | 89 +-
modules/task/task_install_data.xml | 26 +-
modules/task_log/task_log.inc.php | 129 +-
modules/task_log/task_log_construct.xml | 123 +-
modules/task_log/task_log_install.xml | 65 +-
modules/tax/tax.inc.php | 222 +-
modules/tax/tax_construct.xml | 214 +-
modules/tax/tax_install.xml | 89 +-
modules/tax/tax_install_data.xml | 18 +
modules/temporary_data/temporary_data.inc.php | 50 +-
.../temporary_data_construct.xml | 127 +-
.../temporary_data/temporary_data_install.xml | 27 +-
modules/ticket/auth.inc.php | 15 -
modules/ticket/ticket.inc.php | 2710 --
modules/ticket/ticket_construct.xml | 98 -
modules/ticket/ticket_install.xml | 62 -
modules/ticket_attachment/auth.inc.php | 6 -
.../ticket_attachment.inc.php | 56 -
.../ticket_attachment_construct.xml | 43 -
.../ticket_attachment_install.xml | 11 -
.../ticket_department.inc.php | 126 -
.../ticket_department_construct.xml | 74 -
.../ticket_department_install.xml | 36 -
.../ticket_department_install_data.xml | 28 -
modules/ticket_message/ticket_message.inc.php | 166 -
.../ticket_message_construct.xml | 46 -
.../ticket_message/ticket_message_install.xml | 30 -
.../ticket_message_install_data.xml | 153 -
plugins/checkout/CLASS_MONERIS/mpgClasses.php | 1 -
plugins/checkout/PAYPAL.php | 293 +-
plugins/checkout/PAYPAL/PAYPAL.php | 91 +
plugins/checkout/PAYPAL_RECURRING.php | 453 +-
plugins/checkout/REMIT_BANK_WIRE.php | 6 +-
plugins/checkout/REMIT_CHECK.php | 6 +-
plugins/db_mapping/Apache_mod_auth_mysql.php | 380 -
.../Apache_mod_auth_mysql_group.php | 380 -
plugins/db_mapping/Drupal_431.php | 299 -
plugins/db_mapping/Expression_Engine_1_1.php | 341 -
plugins/db_mapping/FlySpray_95.php | 349 -
plugins/db_mapping/GeekLog_138.php | 277 -
plugins/db_mapping/HiveMail_122.php | 360 -
.../db_mapping/Invision_Power_Board_13.php | 853 -
plugins/db_mapping/Invision_Power_Board_2.php | 479 -
plugins/db_mapping/Mambo_4O14.php | 322 -
plugins/db_mapping/Mambo_4_5.php | 468 -
plugins/db_mapping/Mantis_18rc1.php | 321 -
plugins/db_mapping/PostNuke_726.php | 316 -
plugins/db_mapping/SMF_101.php | 603 -
plugins/db_mapping/SMF_102.php | 483 -
plugins/db_mapping/SendStudio_2004.php | 396 -
plugins/db_mapping/Support_Logic_111.php | 571 -
plugins/db_mapping/WowBB_162.php | 350 -
plugins/db_mapping/XMB_Forums_19.php | 299 -
plugins/db_mapping/Xaraya_914.php | 349 -
plugins/db_mapping/Xoops_2.php | 318 -
plugins/db_mapping/YabbSe_151.php | 295 -
plugins/db_mapping/miniBB_17.php | 284 -
plugins/db_mapping/osCommerce_22.php | 303 -
plugins/db_mapping/osCommerce_22/notes.txt | 4 -
.../osCommerce_22/password_funcs.php | 39 -
plugins/db_mapping/pMachine_Pro_21.php | 286 -
plugins/db_mapping/phorum_345.php | 304 -
plugins/db_mapping/phpBB_2O6.php | 334 -
plugins/db_mapping/phpNuke_69.php | 286 -
plugins/db_mapping/punBB_101.php | 322 -
plugins/db_mapping/vBulletin_229.php | 313 -
plugins/db_mapping/vBulletin_3.php | 532 -
plugins/db_mapping/xcart_gold_351.php | 306 -
plugins/import/WHMCS.php | 1103 +
plugins/import/WHMCS_map.xml | 11 +
plugins/product/EXAMPLE.php | 172 +-
reports/ticket/department.xml | 37 -
reports/ticket/staff.xml | 37 -
reports/ticket/ticket_volume.xml | 158 -
task.php | 54 -
test.php | 366 +-
themes/default/blocks/account/account.tpl | 403 +-
themes/default/blocks/account/add.tpl | 570 +-
themes/default/blocks/account/login.tpl | 107 -
.../default/blocks/account/login_cookie.tpl | 40 -
.../default/blocks/account/login_htaccess.tpl | 40 -
themes/default/blocks/account/login_small.tpl | 61 -
themes/default/blocks/account/mail_multi.tpl | 68 +
themes/default/blocks/account/mail_one.tpl | 67 +
themes/default/blocks/account/merge.tpl | 44 +
themes/default/blocks/account/password.tpl | 73 -
.../default/blocks/account/password_reset.tpl | 90 -
themes/default/blocks/account/search_form.tpl | 322 +
themes/default/blocks/account/search_show.tpl | 12 +
themes/default/blocks/account/sub_account.tpl | 63 +-
.../blocks/account/sub_account_add.tpl | 476 +-
.../blocks/account/sub_account_view.tpl | 4 +-
themes/default/blocks/account/user_add.tpl | 169 +
themes/default/blocks/account/user_login.tpl | 69 +
.../default/blocks/account/user_password.tpl | 49 +
.../blocks/account/user_password_reset.tpl | 68 +
themes/default/blocks/account/user_verify.tpl | 107 +
themes/default/blocks/account/user_view.tpl | 197 +
themes/default/blocks/account/verify.tpl | 157 -
themes/default/blocks/account/view.tpl | 876 +-
themes/default/blocks/account_admin/add.tpl | 457 -
.../blocks/account_admin/iframe_mail_one.tpl | 102 -
.../blocks/account_admin/mail_multi.tpl | 96 -
.../default/blocks/account_admin/mail_one.tpl | 96 -
themes/default/blocks/account_admin/merge.tpl | 55 -
.../blocks/account_admin/search_form.tpl | 567 -
.../blocks/account_admin/search_show.tpl | 155 -
themes/default/blocks/account_admin/view.tpl | 1042 -
themes/default/blocks/account_memo/add.tpl | 88 +-
.../blocks/account_memo/search_show.tpl | 166 +-
themes/default/blocks/account_memo/view.tpl | 200 +-
themes/default/blocks/affiliate/add.tpl | 102 +-
themes/default/blocks/affiliate/affiliate.tpl | 25 +-
.../default/blocks/affiliate/mail_multi.tpl | 157 +-
.../blocks/affiliate/new_tier_iframe.tpl | 117 +-
.../blocks/affiliate/plugin_EBULLION.tpl | 15 +-
.../blocks/affiliate/plugin_MAIL_CHECK.tpl | 85 +-
.../blocks/affiliate/plugin_MONEYBOOKERS.tpl | 15 +-
.../blocks/affiliate/plugin_PAYPAL.tpl | 15 +-
.../blocks/affiliate/recurr_tier_iframe.tpl | 116 +-
.../default/blocks/affiliate/search_form.tpl | 211 +-
.../default/blocks/affiliate/search_show.tpl | 187 +-
themes/default/blocks/affiliate/user_add.tpl | 346 +-
.../blocks/affiliate/user_new_tier_iframe.tpl | 117 +-
.../affiliate/user_recurr_tier_iframe.tpl | 115 +-
themes/default/blocks/affiliate/user_view.tpl | 660 +-
themes/default/blocks/affiliate/view.tpl | 838 +-
.../blocks/affiliate_commission/add.tpl | 88 +-
.../affiliate_commission/search_form.tpl | 146 +-
.../affiliate_commission/search_show.tpl | 151 +-
.../blocks/affiliate_commission/view.tpl | 330 +-
.../default/blocks/affiliate_template/add.tpl | 365 +-
.../blocks/affiliate_template/search_show.tpl | 135 +-
.../blocks/affiliate_template/view.tpl | 637 +-
themes/default/blocks/blocked_email/add.tpl | 94 +-
.../blocks/blocked_email/search_form.tpl | 134 +-
.../blocks/blocked_email/search_show.tpl | 100 +-
themes/default/blocks/blocked_email/view.tpl | 171 +-
themes/default/blocks/blocked_ip/add.tpl | 91 +-
.../default/blocks/blocked_ip/search_form.tpl | 132 +-
.../default/blocks/blocked_ip/search_show.tpl | 100 +-
themes/default/blocks/blocked_ip/view.tpl | 160 +-
themes/default/blocks/campaign/add.tpl | 376 +-
themes/default/blocks/campaign/click.tpl | 10 +-
themes/default/blocks/campaign/display.tpl | 10 +-
.../default/blocks/campaign/search_form.tpl | 202 +-
.../default/blocks/campaign/search_show.tpl | 211 +-
themes/default/blocks/campaign/view.tpl | 1481 +-
themes/default/blocks/cart/ad_hoc.tpl | 231 +-
.../default/blocks/cart/admin_changeqty.tpl | 29 +-
themes/default/blocks/cart/admin_view.tpl | 613 +-
themes/default/blocks/cart/cart.tpl | 564 +-
.../default/blocks/cart/cart_table_assoc.tpl | 48 +
.../default/blocks/cart/cart_table_type_2.tpl | 52 +
.../default/blocks/cart/cart_table_type_3.tpl | 47 +
.../default/blocks/cart/cart_table_type_x.tpl | 91 +
.../blocks/cart/cart_tr_adhocdiscount.tpl | 4 +
themes/default/blocks/cart/changeqty.tpl | 29 +-
themes/default/blocks/charge/add.tpl | 221 +-
themes/default/blocks/charge/search_form.tpl | 253 +-
themes/default/blocks/charge/search_show.tpl | 148 +-
themes/default/blocks/charge/view.tpl | 278 +-
themes/default/blocks/checkout/add.tpl | 525 +-
.../blocks/checkout/admin_checkout.tpl | 31 +-
themes/default/blocks/checkout/ajax.js | 79 +-
themes/default/blocks/checkout/checkout.tpl | 910 +-
.../default/blocks/checkout/search_show.tpl | 117 +-
themes/default/blocks/checkout/view.tpl | 607 +-
.../checkout_plugin/credit_card_avs.tpl | 6 +-
.../default/blocks/checkout_plugin/echeck.tpl | 6 +-
.../checkout_plugin/plugin_cfg_PAYPAL.tpl | 40 +-
.../plugin_cfg_PAYPAL_RECURRING.tpl | 40 +-
.../plugin_cfg_REMIT_BANK_WIRE.tpl | 36 +-
.../checkout_plugin/plugin_ord_PAYPAL.tpl | 2 +-
.../plugin_ord_PAYPAL_RECURRING.tpl | 2 +-
.../plugin_ord_REMIT_BANK_WIRE.tpl | 4 +-
.../plugin_ord_REMIT_BANK_WIRE_ALERT.tpl | 109 +-
.../plugin_ord_REMIT_CHECK.tpl | 4 +-
.../plugin_ord_REMIT_CHECK_ALERT.tpl | 98 +-
.../blocks/checkout_plugin/plugin_tr_fee.tpl | 28 +
.../blocks/checkout_plugin/plugin_tr_mode.tpl | 4 +
.../blocks/checkout_plugin/third_party.tpl | 67 +-
.../checkout_plugin/third_party_noconf.tpl | 69 +-
themes/default/blocks/core/add_tr_submit.tpl | 15 +
themes/default/blocks/core/admin.tpl | 448 -
themes/default/blocks/core/alert.tpl | 60 +-
themes/default/blocks/core/alert_fields.tpl | 55 +-
themes/default/blocks/core/htmlarea.tpl | 3 -
themes/default/blocks/core/invalid_page.tpl | 2 +-
themes/default/blocks/core/method_error.tpl | 13 +-
.../default/blocks/core/recent_searches.tpl | 72 +-
themes/default/blocks/core/saved_searches.tpl | 72 +-
themes/default/blocks/core/search.tpl | 147 +-
themes/default/blocks/core/search_iframe.tpl | 93 +-
themes/default/blocks/core/search_post.tpl | 23 +
.../blocks/core/search_show_post-1.tpl | 16 +
.../blocks/core/search_show_post-2.tpl | 20 +
.../default/blocks/core/search_show_pre.tpl | 33 +
.../blocks/core/search_show_tr_record.tpl | 4 +
themes/default/blocks/core/top_clean.tpl | 51 +-
themes/default/blocks/core/user_search.tpl | 97 +-
.../blocks/core/user_search_show_pre.tpl | 33 +
.../core/user_search_show_tr_record.tpl | 4 +
themes/default/blocks/core/user_view_pre.tpl | 7 +
themes/default/blocks/core/view_post.tpl | 8 +
themes/default/blocks/core/view_pre.tpl | 7 +
themes/default/blocks/core/view_td_delete.tpl | 4 +
themes/default/blocks/core/view_td_submit.tpl | 1 +
.../blocks/core/view_tr_submit_delete.tpl | 11 +
themes/default/blocks/country/add.tpl | 131 +-
themes/default/blocks/country/main.tpl | 26 -
themes/default/blocks/country/search_show.tpl | 133 +-
themes/default/blocks/country/view.tpl | 198 +-
themes/default/blocks/currency/add.tpl | 132 +-
themes/default/blocks/currency/main.tpl | 26 -
.../default/blocks/currency/search_show.tpl | 122 +-
themes/default/blocks/currency/view.tpl | 298 +-
themes/default/blocks/db_mapping/add.tpl | 117 -
.../blocks/db_mapping/group_map_db-status.tpl | 44 -
.../blocks/db_mapping/group_map_db.tpl | 18 -
.../blocks/db_mapping/group_map_status.tpl | 38 -
themes/default/blocks/db_mapping/main.tpl | 27 -
.../default/blocks/db_mapping/search_show.tpl | 95 -
themes/default/blocks/db_mapping/view.tpl | 199 -
themes/default/blocks/discount/add.tpl | 512 +-
.../default/blocks/discount/search_form.tpl | 230 +-
.../default/blocks/discount/search_show.tpl | 164 +-
themes/default/blocks/discount/view.tpl | 571 +-
.../default/blocks/email_log/search_form.tpl | 173 +-
.../default/blocks/email_log/search_show.tpl | 111 +-
themes/default/blocks/email_log/user_list.tpl | 92 +-
themes/default/blocks/email_log/user_view.tpl | 83 +-
themes/default/blocks/email_log/view.tpl | 163 +-
themes/default/blocks/email_queue/add.tpl | 196 +-
.../blocks/email_queue/search_form.tpl | 151 +-
.../blocks/email_queue/search_show.tpl | 125 +-
themes/default/blocks/email_queue/view.tpl | 264 +-
themes/default/blocks/email_template/add.tpl | 170 +-
.../blocks/email_template/search_show.tpl | 123 +-
themes/default/blocks/email_template/view.tpl | 302 +-
.../blocks/email_template_translate/add.tpl | 244 +-
.../email_template_translate/fields.tpl | 34 +
.../email_template_translate/search_show.tpl | 126 +-
.../blocks/email_template_translate/view.tpl | 276 +-
themes/default/blocks/faq/add.tpl | 144 +-
themes/default/blocks/faq/faq.tpl | 157 +-
themes/default/blocks/faq/menu.tpl | 54 +-
themes/default/blocks/faq/search_form.tpl | 168 +-
themes/default/blocks/faq/search_show.tpl | 115 +-
themes/default/blocks/faq/view.tpl | 297 +-
themes/default/blocks/faq_category/add.tpl | 130 +-
.../blocks/faq_category/faq_category.tpl | 21 +-
.../blocks/faq_category/search_show.tpl | 125 +-
themes/default/blocks/faq_category/view.tpl | 207 +-
themes/default/blocks/faq_translate/add.tpl | 148 +-
.../blocks/faq_translate/search_show.tpl | 126 +-
themes/default/blocks/faq_translate/view.tpl | 185 +-
themes/default/blocks/file/add.tpl | 163 -
themes/default/blocks/file/download.tpl | 5 -
themes/default/blocks/file/file.tpl | 39 -
themes/default/blocks/file/file_list.tpl | 19 -
themes/default/blocks/file/list.tpl | 72 -
themes/default/blocks/file/menu.tpl | 32 -
themes/default/blocks/file/search_form.tpl | 139 -
themes/default/blocks/file/search_show.tpl | 115 -
themes/default/blocks/file/view.tpl | 218 -
themes/default/blocks/file_category/add.tpl | 102 -
.../blocks/file_category/search_form.tpl | 98 -
.../blocks/file_category/search_show.tpl | 107 -
themes/default/blocks/file_category/view.tpl | 153 -
themes/default/blocks/group/add.tpl | 181 +-
themes/default/blocks/group/search_show.tpl | 127 +-
themes/default/blocks/group/view.tpl | 320 +-
.../host_provision_plugin/plugin_cfg_WHM.tpl | 63 +-
.../blocks/host_registrar_plugin/add.tpl | 105 +-
.../plugin_cfg_MANUAL.tpl | 120 +-
.../host_registrar_plugin/search_show.tpl | 136 +-
.../blocks/host_registrar_plugin/view.tpl | 155 +-
themes/default/blocks/host_server/add.tpl | 260 +-
.../blocks/host_server/search_show.tpl | 146 +-
themes/default/blocks/host_server/view.tpl | 361 +-
themes/default/blocks/host_tld/add.tpl | 167 +-
.../default/blocks/host_tld/search_show.tpl | 135 +-
themes/default/blocks/host_tld/view.tpl | 869 +-
themes/default/blocks/htaccess/add.tpl | 81 -
themes/default/blocks/htaccess/htaccess.tpl | 38 -
themes/default/blocks/htaccess/list.tpl | 27 -
.../default/blocks/htaccess/search_show.tpl | 107 -
themes/default/blocks/htaccess/view.tpl | 223 -
themes/default/blocks/htaccess_dir/add.tpl | 129 -
.../blocks/htaccess_dir/search_show.tpl | 119 -
themes/default/blocks/htaccess_dir/view.tpl | 222 -
.../default/blocks/htaccess_exclude/add.tpl | 59 -
.../default/blocks/htaccess_exclude/main.tpl | 27 -
.../blocks/htaccess_exclude/search_form.tpl | 80 -
.../blocks/htaccess_exclude/search_show.tpl | 103 -
.../default/blocks/htaccess_exclude/view.tpl | 114 -
themes/default/blocks/import/add.tpl | 104 -
themes/default/blocks/import/import.tpl | 131 +-
themes/default/blocks/import/search_show.tpl | 100 +-
themes/default/blocks/import/view.tpl | 211 +-
themes/default/blocks/invoice/add.tpl | 274 +-
.../blocks/invoice/checkout_multiple.tpl | 71 +-
.../default/blocks/invoice/checkoutoption.tpl | 14 +-
.../blocks/invoice/checkoutoptions.tpl | 116 +-
themes/default/blocks/invoice/invoicesoon.tpl | 72 +
themes/default/blocks/invoice/search_form.tpl | 436 +-
themes/default/blocks/invoice/search_show.tpl | 185 +-
themes/default/blocks/invoice/thankyou.tpl | 76 +-
.../blocks/invoice/user_search_show.tpl | 218 +-
themes/default/blocks/invoice/user_view.tpl | 1099 +-
themes/default/blocks/invoice/view.tpl | 1890 +-
themes/default/blocks/invoice_item/add.tpl | 195 +-
themes/default/blocks/invoice_item/main.tpl | 47 +-
.../blocks/invoice_item/search_form.tpl | 232 +-
.../blocks/invoice_item/search_show.tpl | 251 +-
themes/default/blocks/invoice_item/view.tpl | 250 +-
themes/default/blocks/invoice_memo/add.tpl | 88 +-
.../blocks/invoice_memo/search_show.tpl | 166 +-
themes/default/blocks/invoice_memo/view.tpl | 214 +-
.../default/blocks/log_error/search_form.tpl | 180 +-
.../default/blocks/log_error/search_show.tpl | 122 +-
themes/default/blocks/log_error/view.tpl | 208 +-
themes/default/blocks/login_log/map.tpl | 8 +-
.../default/blocks/login_log/search_form.tpl | 158 +-
.../default/blocks/login_log/search_show.tpl | 148 +-
themes/default/blocks/login_log/whois.tpl | 8 +-
themes/default/blocks/module/add.tpl | 160 +-
themes/default/blocks/module/install.tpl | 82 +-
themes/default/blocks/module/install_2.tpl | 99 +-
themes/default/blocks/module/main.tpl | 27 -
themes/default/blocks/module/search_show.tpl | 129 +-
themes/default/blocks/module/view.tpl | 355 +-
themes/default/blocks/module_method/add.tpl | 133 +-
.../blocks/module_method/search_show.tpl | 142 +-
themes/default/blocks/module_method/view.tpl | 198 +-
.../blocks/module_method/view_methods.tpl | 200 +-
themes/default/blocks/net_term/add.tpl | 211 +-
.../default/blocks/net_term/search_show.tpl | 133 +-
themes/default/blocks/net_term/view.tpl | 264 +-
themes/default/blocks/product/add.tpl | 296 +-
.../default/blocks/product/admin_details.tpl | 746 +-
themes/default/blocks/product/details.tpl | 877 +-
.../blocks/product/iframe_associations.tpl | 308 +-
.../blocks/product/iframe_price_recurring.tpl | 233 +-
themes/default/blocks/product/search_form.tpl | 190 +-
themes/default/blocks/product/search_show.tpl | 199 +-
themes/default/blocks/product/view.tpl | 824 +-
themes/default/blocks/product_attr/add.tpl | 4 +-
.../blocks/product_attr/search_show.tpl | 2 +-
themes/default/blocks/product_attr/view.tpl | 359 +-
themes/default/blocks/product_cat/add.tpl | 218 +-
.../blocks/product_cat/imagePreview.js | 37 +
themes/default/blocks/product_cat/menu.tpl | 114 +-
.../blocks/product_cat/post_t_Pages.tpl | 14 +
.../product_cat/pre_t_CategoryDrill.tpl | 26 +
.../product_cat/pre_t_SubCategories.tpl | 50 +
.../blocks/product_cat/search_show.tpl | 109 +-
.../blocks/product_cat/t_Multi Column.tpl | 252 +-
.../blocks/product_cat/t_Paged Listing.tpl | 236 +-
.../default/blocks/product_cat/t_Wizard.tpl | 191 +-
.../cat.tpl => product_cat/user_menu.tpl} | 0
themes/default/blocks/product_cat/view.tpl | 408 +-
.../blocks/product_cat_translate/add.tpl | 4 +-
.../blocks/product_cat_translate/view.tpl | 201 +-
themes/default/blocks/product_img/add.tpl | 4 +-
.../blocks/product_img/search_show.tpl | 2 +-
themes/default/blocks/product_img/view.tpl | 111 +-
.../plugin_prod_TICKET_INCIDENT.tpl | 25 -
.../default/blocks/product_translate/add.tpl | 4 +-
.../default/blocks/product_translate/view.tpl | 26 +-
themes/default/blocks/service/add.tpl | 1227 +-
themes/default/blocks/service/modify.tpl | 641 +-
themes/default/blocks/service/none.tpl | 3 +-
themes/default/blocks/service/search_form.tpl | 583 +-
themes/default/blocks/service/search_show.tpl | 216 +-
themes/default/blocks/service/user_modify.tpl | 634 +-
.../blocks/service/user_search_show.tpl | 172 +-
themes/default/blocks/service/user_view.tpl | 907 +-
themes/default/blocks/service/view.tpl | 1557 +-
themes/default/blocks/service_memo/add.tpl | 88 +-
.../blocks/service_memo/search_show.tpl | 166 +-
themes/default/blocks/service_memo/view.tpl | 200 +-
themes/default/blocks/session/search_form.tpl | 257 +-
themes/default/blocks/session/search_show.tpl | 169 +-
themes/default/blocks/session/view.tpl | 307 +-
themes/default/blocks/setup/_php_info.tpl | 11 +-
themes/default/blocks/setup/search_show.tpl | 116 +-
themes/default/blocks/setup/view.tpl | 1042 +-
themes/default/blocks/setup_email/add.tpl | 319 +-
.../blocks/setup_email/search_show.tpl | 135 +-
themes/default/blocks/setup_email/view.tpl | 386 +-
.../blocks/setup_invoice/search_show.tpl | 109 +-
themes/default/blocks/setup_invoice/view.tpl | 283 +-
themes/default/blocks/staff/add.tpl | 135 +-
themes/default/blocks/staff/search_form.tpl | 172 +-
themes/default/blocks/staff/search_show.tpl | 143 +-
themes/default/blocks/staff/staff.tpl | 235 +-
themes/default/blocks/staff/view.tpl | 242 +-
.../default/blocks/staff_department/add.tpl | 110 +-
.../blocks/staff_department/search_form.tpl | 136 +-
.../blocks/staff_department/search_show.tpl | 117 +-
.../default/blocks/staff_department/view.tpl | 178 +-
themes/default/blocks/static_page/add.tpl | 180 +-
themes/default/blocks/static_page/list.tpl | 36 -
themes/default/blocks/static_page/menu.tpl | 30 -
.../default/blocks/static_page/page_list.tpl | 36 +
.../default/blocks/static_page/page_show.tpl | 22 +
.../blocks/static_page/search_form.tpl | 180 +-
.../blocks/static_page/search_show.tpl | 120 +-
themes/default/blocks/static_page/show.tpl | 34 -
themes/default/blocks/static_page/view.tpl | 284 +-
.../blocks/static_page_category/add.tpl | 131 +-
.../blocks/static_page_category/main.tpl | 27 -
.../blocks/static_page_category/menu.tpl | 28 +
.../static_page_category/search_form.tpl | 62 -
.../static_page_category/search_show.tpl | 125 +-
.../blocks/static_page_category/view.tpl | 207 +-
.../blocks/static_page_translate/add.tpl | 191 +-
.../static_page_translate/search_show.tpl | 126 +-
.../blocks/static_page_translate/view.tpl | 261 +-
themes/default/blocks/static_relation/add.tpl | 147 +-
.../blocks/static_relation/search_show.tpl | 121 +-
.../default/blocks/static_relation/view.tpl | 211 +-
themes/default/blocks/static_var/add.tpl | 270 +-
.../default/blocks/static_var/search_show.tpl | 138 +-
themes/default/blocks/static_var/view.tpl | 424 +-
themes/default/blocks/task/add.tpl | 273 +-
themes/default/blocks/task/main.tpl | 27 -
themes/default/blocks/task/search_form.tpl | 239 +-
themes/default/blocks/task/search_show.tpl | 125 +-
themes/default/blocks/task/view.tpl | 343 +-
themes/default/blocks/tax/add.tpl | 177 +-
themes/default/blocks/tax/main.tpl | 27 -
themes/default/blocks/tax/search_form.tpl | 136 +-
themes/default/blocks/tax/search_show.tpl | 125 +-
themes/default/blocks/tax/view.tpl | 231 +-
themes/default/blocks/ticket/add.tpl | 139 -
themes/default/blocks/ticket/auth.tpl | 112 -
themes/default/blocks/ticket/main.tpl | 2 -
themes/default/blocks/ticket/overview.tpl | 104 -
themes/default/blocks/ticket/search_form.tpl | 222 -
themes/default/blocks/ticket/search_quick.tpl | 169 -
.../blocks/ticket/search_quick_show.tpl | 32 -
themes/default/blocks/ticket/search_show.tpl | 140 -
themes/default/blocks/ticket/ticket.tpl | 185 -
themes/default/blocks/ticket/user.tpl | 51 -
themes/default/blocks/ticket/user_add.tpl | 142 -
themes/default/blocks/ticket/user_view.tpl | 330 -
themes/default/blocks/ticket/view.tpl | 580 -
themes/default/blocks/ticket/view_quick.tpl | 20 -
.../default/blocks/ticket_department/add.tpl | 113 -
.../blocks/ticket_department/search_show.tpl | 108 -
.../default/blocks/ticket_department/view.tpl | 199 -
themes/default/cart.js | 41 +
themes/default/images/htaccess_error.gif | Bin 1543 -> 0 bytes
themes/default/images/logo-big.png | Bin 0 -> 26666 bytes
themes/default/images/logo-small.png | Bin 0 -> 5653 bytes
.../default/invoice/invoice-0.pdf | Bin
.../default/invoice/invoice-1.pdf | Bin
.../default/invoice/invoice-2.pdf | Bin
.../default/invoice/invoice-3.pdf | Bin
themes/default/invoice/invoice-blank.pdf | Bin 0 -> 13016 bytes
themes/default/invoice/invoice-logo.png | Bin 0 -> 7880 bytes
themes/default/invoice/invoice-payment-dd.png | Bin 0 -> 6352 bytes
themes/default/invoice/invoice-payment-pp.png | Bin 0 -> 796 bytes
themes/default/left.tpl | 158 -
themes/default/search.js | 352 -
themes/default/template.tpl | 161 +-
themes/default/top.js | 127 +-
themes/default/user_search.js | 576 +-
themes/default/user_view.js | 68 +
themes/default_admin/blocks/core/admin.tpl | 334 +-
.../blocks/core/bottom_frame.tpl | 2 +
.../blocks/core/leftFrameBlue.tpl | 283 +-
.../default_admin/blocks/core/top_clean.tpl | 66 +-
.../default_admin/blocks/core/top_frame.tpl | 70 +-
themes/default_admin/delete_record.js | 16 +
.../default_admin/images/htaccess_error.gif | Bin 1543 -> 0 bytes
themes/default_admin/search.js | 612 +-
themes/default_admin/template.tpl | 33 +-
themes/default_admin/tinymce.js | 18 +
themes/default_admin/view-advanced.js | 179 +
themes/default_admin/view.js | 126 +-
1051 files changed, 219109 insertions(+), 117219 deletions(-)
delete mode 100644 cookie.index.php
delete mode 100644 htaccess_index.php
create mode 100755 includes/fpdf/font/courier.php
create mode 100755 includes/fpdf/font/desktop.ini
create mode 100755 includes/fpdf/font/helvetica.php
create mode 100755 includes/fpdf/font/helveticab.php
create mode 100755 includes/fpdf/font/helveticabi.php
create mode 100755 includes/fpdf/font/helveticai.php
create mode 100755 includes/fpdf/font/makefont/cp1250.map
create mode 100755 includes/fpdf/font/makefont/cp1251.map
create mode 100755 includes/fpdf/font/makefont/cp1252.map
create mode 100755 includes/fpdf/font/makefont/cp1253.map
create mode 100755 includes/fpdf/font/makefont/cp1254.map
create mode 100755 includes/fpdf/font/makefont/cp1255.map
create mode 100755 includes/fpdf/font/makefont/cp1257.map
create mode 100755 includes/fpdf/font/makefont/cp1258.map
create mode 100755 includes/fpdf/font/makefont/cp874.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-1.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-11.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-15.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-16.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-2.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-4.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-5.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-7.map
create mode 100755 includes/fpdf/font/makefont/iso-8859-9.map
create mode 100755 includes/fpdf/font/makefont/koi8-r.map
create mode 100755 includes/fpdf/font/makefont/koi8-u.map
create mode 100755 includes/fpdf/font/makefont/makefont.php
create mode 100755 includes/fpdf/font/symbol.php
create mode 100755 includes/fpdf/font/times.php
create mode 100755 includes/fpdf/font/timesb.php
create mode 100755 includes/fpdf/font/timesbi.php
create mode 100755 includes/fpdf/font/timesi.php
create mode 100755 includes/fpdf/font/zapfdingbats.php
create mode 100755 includes/fpdf/fpdf.php
create mode 100755 includes/fpdf/license.txt
delete mode 100644 includes/pdf/invoice_base.inc.php
delete mode 100644 includes/pdf/pdf_invoice_overview.inc.php
delete mode 100644 includes/pdf/pdf_invoice_voip-detailed.inc.php
delete mode 100644 includes/pdf/pdf_invoice_voip.inc.php
delete mode 100644 includes/smarty/plugins/block.account.php
delete mode 100644 includes/smarty/plugins/block.group.php
delete mode 100644 includes/smarty/plugins/block.htmlarea.php
delete mode 100644 includes/smarty/plugins/block.is_auth.php
delete mode 100644 includes/smarty/plugins/block.is_auth_method.php
delete mode 100644 includes/smarty/plugins/block.panel.php
delete mode 100644 includes/smarty/plugins/block.translate.php
delete mode 100644 includes/smarty/plugins/function.ab_version.php
delete mode 100644 includes/smarty/plugins/function.assign.php
delete mode 100644 includes/smarty/plugins/function.block.php
delete mode 100644 includes/smarty/plugins/function.date.php
delete mode 100644 includes/smarty/plugins/function.date_time.php
delete mode 100644 includes/smarty/plugins/function.db_lookup.php
delete mode 100644 includes/smarty/plugins/function.exe.php
delete mode 100644 includes/smarty/plugins/function.graph.php
delete mode 100644 includes/smarty/plugins/function.grid_bool.php
delete mode 100644 includes/smarty/plugins/function.grid_column_heading.php
delete mode 100644 includes/smarty/plugins/function.grid_column_refine.php
delete mode 100644 includes/smarty/plugins/function.html_bool.php
delete mode 100644 includes/smarty/plugins/function.html_button.php
delete mode 100644 includes/smarty/plugins/function.html_date.php
delete mode 100644 includes/smarty/plugins/function.html_link.php
delete mode 100644 includes/smarty/plugins/function.html_menu.php
delete mode 100644 includes/smarty/plugins/function.html_menu_files.php
delete mode 100644 includes/smarty/plugins/function.html_menu_multi.php
delete mode 100644 includes/smarty/plugins/function.html_menu_product_host.php
delete mode 100644 includes/smarty/plugins/function.html_menu_product_subscription.php
delete mode 100644 includes/smarty/plugins/function.html_menu_search_expr.php
delete mode 100644 includes/smarty/plugins/function.html_menu_sub.php
delete mode 100644 includes/smarty/plugins/function.html_select_account.php
delete mode 100644 includes/smarty/plugins/function.html_select_affiliate.php
delete mode 100644 includes/smarty/plugins/function.input_text.php
create mode 100644 includes/smarty/plugins/function.osb.php
delete mode 100644 includes/smarty/plugins/function.plugin.php
delete mode 100644 includes/smarty/plugins/function.style_hide.php
delete mode 100644 includes/smarty/plugins/modifier.date.php
delete mode 100644 includes/smarty/plugins/modifier.linkalize.php
delete mode 100644 includes/smarty/plugins/modifier.markdown.php
delete mode 100644 includes/smarty/plugins/modifier.smartypants.php
delete mode 100644 includes/smarty/plugins/modifier.textile.php
delete mode 100644 includes/smarty/plugins/postfilter.lang.php
create mode 100644 includes/tcpdf/2dbarcodes.php
create mode 100644 includes/tcpdf/LICENSE.TXT
create mode 100644 includes/tcpdf/barcodes.php
create mode 100644 includes/tcpdf/config/lang/eng.php
create mode 100644 includes/tcpdf/config/lang/ita.php
create mode 100644 includes/tcpdf/config/tcpdf_config.php
create mode 100644 includes/tcpdf/config/tcpdf_config_alt.php
create mode 100755 includes/tcpdf/fonts/README.TXT
create mode 100755 includes/tcpdf/fonts/ZarBold.ctg.z
create mode 100755 includes/tcpdf/fonts/ZarBold.z
create mode 100755 includes/tcpdf/fonts/almohanad.ctg.z
create mode 100755 includes/tcpdf/fonts/almohanad.php
create mode 100755 includes/tcpdf/fonts/almohanad.z
create mode 100755 includes/tcpdf/fonts/arialunicid0.php
create mode 100755 includes/tcpdf/fonts/courier.php
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/AUTHORS
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/BUGS
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/LICENSE
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/NEWS
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/README
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/langcover.txt
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/status.txt
create mode 100644 includes/tcpdf/fonts/dejavu-fonts-ttf-2.30/unicover.txt
create mode 100644 includes/tcpdf/fonts/dejavusans.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusans.php
create mode 100644 includes/tcpdf/fonts/dejavusans.z
create mode 100644 includes/tcpdf/fonts/dejavusansb.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansb.php
create mode 100644 includes/tcpdf/fonts/dejavusansb.z
create mode 100644 includes/tcpdf/fonts/dejavusansbi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansbi.php
create mode 100644 includes/tcpdf/fonts/dejavusansbi.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensed.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensed.php
create mode 100644 includes/tcpdf/fonts/dejavusanscondensed.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedb.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedb.php
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedb.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedbi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedbi.php
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedbi.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedi.php
create mode 100644 includes/tcpdf/fonts/dejavusanscondensedi.z
create mode 100644 includes/tcpdf/fonts/dejavusansi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansi.php
create mode 100644 includes/tcpdf/fonts/dejavusansi.z
create mode 100644 includes/tcpdf/fonts/dejavusansmono.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansmono.php
create mode 100644 includes/tcpdf/fonts/dejavusansmono.z
create mode 100644 includes/tcpdf/fonts/dejavusansmonob.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansmonob.php
create mode 100644 includes/tcpdf/fonts/dejavusansmonob.z
create mode 100644 includes/tcpdf/fonts/dejavusansmonobi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansmonobi.php
create mode 100644 includes/tcpdf/fonts/dejavusansmonobi.z
create mode 100644 includes/tcpdf/fonts/dejavusansmonoi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavusansmonoi.php
create mode 100644 includes/tcpdf/fonts/dejavusansmonoi.z
create mode 100644 includes/tcpdf/fonts/dejavuserif.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserif.php
create mode 100644 includes/tcpdf/fonts/dejavuserif.z
create mode 100644 includes/tcpdf/fonts/dejavuserifb.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifb.php
create mode 100644 includes/tcpdf/fonts/dejavuserifb.z
create mode 100644 includes/tcpdf/fonts/dejavuserifbi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifbi.php
create mode 100644 includes/tcpdf/fonts/dejavuserifbi.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensed.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensed.php
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensed.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedb.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedb.php
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedb.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedbi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedbi.php
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedbi.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedi.php
create mode 100644 includes/tcpdf/fonts/dejavuserifcondensedi.z
create mode 100644 includes/tcpdf/fonts/dejavuserifi.ctg.z
create mode 100644 includes/tcpdf/fonts/dejavuserifi.php
create mode 100644 includes/tcpdf/fonts/dejavuserifi.z
create mode 100644 includes/tcpdf/fonts/freefont-20090104/AUTHORS
create mode 100644 includes/tcpdf/fonts/freefont-20090104/COPYING
create mode 100644 includes/tcpdf/fonts/freefont-20090104/CREDITS
create mode 100644 includes/tcpdf/fonts/freefont-20090104/ChangeLog
create mode 100644 includes/tcpdf/fonts/freefont-20090104/INSTALL
create mode 100644 includes/tcpdf/fonts/freefont-20090104/README
create mode 100644 includes/tcpdf/fonts/freemono.ctg.z
create mode 100644 includes/tcpdf/fonts/freemono.php
create mode 100644 includes/tcpdf/fonts/freemono.z
create mode 100644 includes/tcpdf/fonts/freemonob.ctg.z
create mode 100644 includes/tcpdf/fonts/freemonob.php
create mode 100644 includes/tcpdf/fonts/freemonob.z
create mode 100644 includes/tcpdf/fonts/freemonobi.ctg.z
create mode 100644 includes/tcpdf/fonts/freemonobi.php
create mode 100644 includes/tcpdf/fonts/freemonobi.z
create mode 100644 includes/tcpdf/fonts/freemonoi.ctg.z
create mode 100644 includes/tcpdf/fonts/freemonoi.php
create mode 100644 includes/tcpdf/fonts/freemonoi.z
create mode 100644 includes/tcpdf/fonts/freesans.ctg.z
create mode 100644 includes/tcpdf/fonts/freesans.php
create mode 100644 includes/tcpdf/fonts/freesans.z
create mode 100644 includes/tcpdf/fonts/freesansb.ctg.z
create mode 100644 includes/tcpdf/fonts/freesansb.php
create mode 100644 includes/tcpdf/fonts/freesansb.z
create mode 100644 includes/tcpdf/fonts/freesansbi.ctg.z
create mode 100644 includes/tcpdf/fonts/freesansbi.php
create mode 100644 includes/tcpdf/fonts/freesansbi.z
create mode 100644 includes/tcpdf/fonts/freesansi.ctg.z
create mode 100644 includes/tcpdf/fonts/freesansi.php
create mode 100644 includes/tcpdf/fonts/freesansi.z
create mode 100644 includes/tcpdf/fonts/freeserif.ctg.z
create mode 100644 includes/tcpdf/fonts/freeserif.php
create mode 100644 includes/tcpdf/fonts/freeserif.z
create mode 100644 includes/tcpdf/fonts/freeserifb.ctg.z
create mode 100644 includes/tcpdf/fonts/freeserifb.php
create mode 100644 includes/tcpdf/fonts/freeserifb.z
create mode 100644 includes/tcpdf/fonts/freeserifbi.ctg.z
create mode 100644 includes/tcpdf/fonts/freeserifbi.php
create mode 100644 includes/tcpdf/fonts/freeserifbi.z
create mode 100644 includes/tcpdf/fonts/freeserifi.ctg.z
create mode 100644 includes/tcpdf/fonts/freeserifi.php
create mode 100644 includes/tcpdf/fonts/freeserifi.z
create mode 100755 includes/tcpdf/fonts/helvetica.php
create mode 100755 includes/tcpdf/fonts/helveticab.php
create mode 100755 includes/tcpdf/fonts/helveticabi.php
create mode 100755 includes/tcpdf/fonts/helveticai.php
create mode 100755 includes/tcpdf/fonts/hysmyeongjostdmedium.php
create mode 100755 includes/tcpdf/fonts/kozgopromedium.php
create mode 100755 includes/tcpdf/fonts/kozminproregular.php
create mode 100755 includes/tcpdf/fonts/msungstdlight.php
create mode 100755 includes/tcpdf/fonts/stsongstdlight.php
create mode 100755 includes/tcpdf/fonts/symbol.php
create mode 100755 includes/tcpdf/fonts/times.php
create mode 100755 includes/tcpdf/fonts/timesb.php
create mode 100755 includes/tcpdf/fonts/timesbi.php
create mode 100755 includes/tcpdf/fonts/timesi.php
create mode 100755 includes/tcpdf/fonts/uni2cid_ac15.php
create mode 100755 includes/tcpdf/fonts/uni2cid_ag15.php
create mode 100755 includes/tcpdf/fonts/uni2cid_aj16.php
create mode 100755 includes/tcpdf/fonts/uni2cid_ak12.php
create mode 100755 includes/tcpdf/fonts/utils/README.TXT
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1250.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1251.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1252.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1253.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1254.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1255.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1257.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp1258.map
create mode 100755 includes/tcpdf/fonts/utils/enc/cp874.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-1.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-11.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-15.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-16.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-2.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-4.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-5.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-7.map
create mode 100755 includes/tcpdf/fonts/utils/enc/iso-8859-9.map
create mode 100755 includes/tcpdf/fonts/utils/enc/koi8-r.map
create mode 100755 includes/tcpdf/fonts/utils/enc/koi8-u.map
create mode 100755 includes/tcpdf/fonts/utils/freetype6.dll
create mode 100755 includes/tcpdf/fonts/utils/makeallttffonts.php
create mode 100755 includes/tcpdf/fonts/utils/makefont.php
create mode 100755 includes/tcpdf/fonts/utils/pfm2afm
create mode 100755 includes/tcpdf/fonts/utils/pfm2afm.exe
create mode 100755 includes/tcpdf/fonts/utils/src/pfm2afm-src.tar.gz
create mode 100755 includes/tcpdf/fonts/utils/src/readme.txt
create mode 100755 includes/tcpdf/fonts/utils/src/ttf2ufm-src.tar.gz
create mode 100755 includes/tcpdf/fonts/utils/ttf2ufm
create mode 100755 includes/tcpdf/fonts/utils/ttf2ufm.exe
create mode 100755 includes/tcpdf/fonts/utils/zlib1.dll
create mode 100755 includes/tcpdf/fonts/zapfdingbats.php
create mode 100755 includes/tcpdf/fonts/zarbold.php
create mode 100644 includes/tcpdf/htmlcolors.php
create mode 100644 includes/tcpdf/tcpdf.crt
create mode 100644 includes/tcpdf/tcpdf.php
create mode 100644 includes/tcpdf/unicode_data.php
delete mode 100644 install/install_db_core.inc
create mode 100644 language/Makefile
delete mode 100644 language/country/english_country.xml
delete mode 100644 language/db_mapping/english_db_mapping.xml
delete mode 100644 language/file/english_file.xml
delete mode 100644 language/file_category/english_file_category.xml
delete mode 100644 language/group/english_group.xml
delete mode 100644 language/htaccess/english_htaccess.xml
delete mode 100644 language/htaccess_dir/english_htaccess_dir.xml
delete mode 100644 language/htaccess_exclude/english_htaccess_exclude.xml
delete mode 100644 language/import/english_import.xml
delete mode 100644 language/log_error/english_log_error.xml
delete mode 100644 language/login_log/english_login_log.xml
create mode 100644 language/messages.header
delete mode 100644 language/product_cat/english_product_cat.xml
delete mode 100644 language/staff_department/english_staff_department.xml
delete mode 100644 language/static_relation/english_static_relation.xml
delete mode 100644 language/static_var/english_static_var.xml
delete mode 100644 language/task/english_task.xml
delete mode 100644 language/ticket/english_ticket.xml
delete mode 100644 language/ticket_department/english_ticket_department.xml
delete mode 100644 language/ticket_message/english_ticket_message.xml
delete mode 100644 modules/account_admin/account_admin.inc.php
delete mode 100644 modules/account_admin/account_admin_construct.xml
delete mode 100644 modules/account_admin/account_admin_install.xml
delete mode 100644 modules/db_mapping/db_mapping.inc.php
delete mode 100644 modules/db_mapping/db_mapping_construct.xml
delete mode 100644 modules/db_mapping/db_mapping_install.xml
delete mode 100644 modules/file/auth.inc.php
delete mode 100644 modules/file/file.inc.php
delete mode 100644 modules/file/file_construct.xml
delete mode 100644 modules/file/file_install.xml
delete mode 100644 modules/file/file_install_data.xml
delete mode 100644 modules/file_category/file_category.inc.php
delete mode 100644 modules/file_category/file_category_construct.xml
delete mode 100644 modules/file_category/file_category_install.xml
delete mode 100644 modules/file_category/file_category_install_data.xml
delete mode 100644 modules/htaccess/auth.inc.php
delete mode 100644 modules/htaccess/htaccess.inc.php
delete mode 100644 modules/htaccess/htaccess_construct.xml
delete mode 100644 modules/htaccess/htaccess_install.xml
delete mode 100644 modules/htaccess/mod_auth_remote.inc.php
delete mode 100644 modules/htaccess_dir/htaccess_dir.inc.php
delete mode 100644 modules/htaccess_dir/htaccess_dir_construct.xml
delete mode 100644 modules/htaccess_dir/htaccess_dir_install.xml
delete mode 100644 modules/htaccess_exclude/htaccess_exclude.inc.php
delete mode 100644 modules/htaccess_exclude/htaccess_exclude_construct.xml
delete mode 100644 modules/htaccess_exclude/htaccess_exclude_install.xml
delete mode 100644 modules/htaccess_exclude/htaccess_exclude_install_data.xml
create mode 100644 modules/invoice/PDF/pdf_invoice_itemised-fpdf.inc.php
create mode 100644 modules/invoice/PDF/pdf_invoice_itemised-fpdi.inc.php
create mode 100644 modules/invoice/PDF/pdf_invoice_itemised-tcpdf.inc.php
create mode 100644 modules/invoice/invoice_base_fpdf.inc.php
create mode 100644 modules/invoice/invoice_base_fpdi.inc.php
create mode 100644 modules/invoice/invoice_base_tcpdf.inc.php
delete mode 100644 modules/invoice/invoice_fpdf.inc.php
create mode 100644 modules/module.inc.php
delete mode 100644 modules/search/search_install_data.xml
create mode 100644 modules/tax/tax_install_data.xml
delete mode 100644 modules/ticket/auth.inc.php
delete mode 100644 modules/ticket/ticket.inc.php
delete mode 100644 modules/ticket/ticket_construct.xml
delete mode 100644 modules/ticket/ticket_install.xml
delete mode 100644 modules/ticket_attachment/auth.inc.php
delete mode 100644 modules/ticket_attachment/ticket_attachment.inc.php
delete mode 100644 modules/ticket_attachment/ticket_attachment_construct.xml
delete mode 100644 modules/ticket_attachment/ticket_attachment_install.xml
delete mode 100644 modules/ticket_department/ticket_department.inc.php
delete mode 100644 modules/ticket_department/ticket_department_construct.xml
delete mode 100644 modules/ticket_department/ticket_department_install.xml
delete mode 100644 modules/ticket_department/ticket_department_install_data.xml
delete mode 100644 modules/ticket_message/ticket_message.inc.php
delete mode 100644 modules/ticket_message/ticket_message_construct.xml
delete mode 100644 modules/ticket_message/ticket_message_install.xml
delete mode 100644 modules/ticket_message/ticket_message_install_data.xml
create mode 100644 plugins/checkout/PAYPAL/PAYPAL.php
delete mode 100644 plugins/db_mapping/Apache_mod_auth_mysql.php
delete mode 100644 plugins/db_mapping/Apache_mod_auth_mysql_group.php
delete mode 100644 plugins/db_mapping/Drupal_431.php
delete mode 100644 plugins/db_mapping/Expression_Engine_1_1.php
delete mode 100644 plugins/db_mapping/FlySpray_95.php
delete mode 100644 plugins/db_mapping/GeekLog_138.php
delete mode 100644 plugins/db_mapping/HiveMail_122.php
delete mode 100644 plugins/db_mapping/Invision_Power_Board_13.php
delete mode 100644 plugins/db_mapping/Invision_Power_Board_2.php
delete mode 100644 plugins/db_mapping/Mambo_4O14.php
delete mode 100644 plugins/db_mapping/Mambo_4_5.php
delete mode 100644 plugins/db_mapping/Mantis_18rc1.php
delete mode 100644 plugins/db_mapping/PostNuke_726.php
delete mode 100644 plugins/db_mapping/SMF_101.php
delete mode 100644 plugins/db_mapping/SMF_102.php
delete mode 100644 plugins/db_mapping/SendStudio_2004.php
delete mode 100644 plugins/db_mapping/Support_Logic_111.php
delete mode 100644 plugins/db_mapping/WowBB_162.php
delete mode 100644 plugins/db_mapping/XMB_Forums_19.php
delete mode 100644 plugins/db_mapping/Xaraya_914.php
delete mode 100644 plugins/db_mapping/Xoops_2.php
delete mode 100644 plugins/db_mapping/YabbSe_151.php
delete mode 100644 plugins/db_mapping/miniBB_17.php
delete mode 100644 plugins/db_mapping/osCommerce_22.php
delete mode 100644 plugins/db_mapping/osCommerce_22/notes.txt
delete mode 100644 plugins/db_mapping/osCommerce_22/password_funcs.php
delete mode 100644 plugins/db_mapping/pMachine_Pro_21.php
delete mode 100644 plugins/db_mapping/phorum_345.php
delete mode 100644 plugins/db_mapping/phpBB_2O6.php
delete mode 100644 plugins/db_mapping/phpNuke_69.php
delete mode 100644 plugins/db_mapping/punBB_101.php
delete mode 100644 plugins/db_mapping/vBulletin_229.php
delete mode 100644 plugins/db_mapping/vBulletin_3.php
delete mode 100644 plugins/db_mapping/xcart_gold_351.php
create mode 100644 plugins/import/WHMCS.php
create mode 100644 plugins/import/WHMCS_map.xml
delete mode 100644 reports/ticket/department.xml
delete mode 100644 reports/ticket/staff.xml
delete mode 100644 reports/ticket/ticket_volume.xml
delete mode 100644 task.php
delete mode 100644 themes/default/blocks/account/login.tpl
delete mode 100644 themes/default/blocks/account/login_cookie.tpl
delete mode 100644 themes/default/blocks/account/login_htaccess.tpl
delete mode 100644 themes/default/blocks/account/login_small.tpl
create mode 100644 themes/default/blocks/account/mail_multi.tpl
create mode 100644 themes/default/blocks/account/mail_one.tpl
create mode 100644 themes/default/blocks/account/merge.tpl
delete mode 100644 themes/default/blocks/account/password.tpl
delete mode 100644 themes/default/blocks/account/password_reset.tpl
create mode 100644 themes/default/blocks/account/search_form.tpl
create mode 100644 themes/default/blocks/account/search_show.tpl
create mode 100644 themes/default/blocks/account/user_add.tpl
create mode 100644 themes/default/blocks/account/user_login.tpl
create mode 100644 themes/default/blocks/account/user_password.tpl
create mode 100644 themes/default/blocks/account/user_password_reset.tpl
create mode 100644 themes/default/blocks/account/user_verify.tpl
create mode 100644 themes/default/blocks/account/user_view.tpl
delete mode 100644 themes/default/blocks/account/verify.tpl
delete mode 100644 themes/default/blocks/account_admin/add.tpl
delete mode 100644 themes/default/blocks/account_admin/iframe_mail_one.tpl
delete mode 100644 themes/default/blocks/account_admin/mail_multi.tpl
delete mode 100644 themes/default/blocks/account_admin/mail_one.tpl
delete mode 100644 themes/default/blocks/account_admin/merge.tpl
delete mode 100644 themes/default/blocks/account_admin/search_form.tpl
delete mode 100644 themes/default/blocks/account_admin/search_show.tpl
delete mode 100644 themes/default/blocks/account_admin/view.tpl
create mode 100644 themes/default/blocks/cart/cart_table_assoc.tpl
create mode 100644 themes/default/blocks/cart/cart_table_type_2.tpl
create mode 100644 themes/default/blocks/cart/cart_table_type_3.tpl
create mode 100644 themes/default/blocks/cart/cart_table_type_x.tpl
create mode 100644 themes/default/blocks/cart/cart_tr_adhocdiscount.tpl
create mode 100644 themes/default/blocks/checkout_plugin/plugin_tr_fee.tpl
create mode 100644 themes/default/blocks/checkout_plugin/plugin_tr_mode.tpl
create mode 100644 themes/default/blocks/core/add_tr_submit.tpl
delete mode 100644 themes/default/blocks/core/admin.tpl
delete mode 100644 themes/default/blocks/core/htmlarea.tpl
create mode 100644 themes/default/blocks/core/search_post.tpl
create mode 100644 themes/default/blocks/core/search_show_post-1.tpl
create mode 100644 themes/default/blocks/core/search_show_post-2.tpl
create mode 100644 themes/default/blocks/core/search_show_pre.tpl
create mode 100644 themes/default/blocks/core/search_show_tr_record.tpl
create mode 100644 themes/default/blocks/core/user_search_show_pre.tpl
create mode 100644 themes/default/blocks/core/user_search_show_tr_record.tpl
create mode 100644 themes/default/blocks/core/user_view_pre.tpl
create mode 100644 themes/default/blocks/core/view_post.tpl
create mode 100644 themes/default/blocks/core/view_pre.tpl
create mode 100644 themes/default/blocks/core/view_td_delete.tpl
create mode 100644 themes/default/blocks/core/view_td_submit.tpl
create mode 100644 themes/default/blocks/core/view_tr_submit_delete.tpl
delete mode 100644 themes/default/blocks/country/main.tpl
delete mode 100644 themes/default/blocks/currency/main.tpl
delete mode 100644 themes/default/blocks/db_mapping/add.tpl
delete mode 100644 themes/default/blocks/db_mapping/group_map_db-status.tpl
delete mode 100644 themes/default/blocks/db_mapping/group_map_db.tpl
delete mode 100644 themes/default/blocks/db_mapping/group_map_status.tpl
delete mode 100644 themes/default/blocks/db_mapping/main.tpl
delete mode 100644 themes/default/blocks/db_mapping/search_show.tpl
delete mode 100644 themes/default/blocks/db_mapping/view.tpl
create mode 100644 themes/default/blocks/email_template_translate/fields.tpl
delete mode 100644 themes/default/blocks/file/add.tpl
delete mode 100644 themes/default/blocks/file/download.tpl
delete mode 100644 themes/default/blocks/file/file.tpl
delete mode 100644 themes/default/blocks/file/file_list.tpl
delete mode 100644 themes/default/blocks/file/list.tpl
delete mode 100644 themes/default/blocks/file/menu.tpl
delete mode 100644 themes/default/blocks/file/search_form.tpl
delete mode 100644 themes/default/blocks/file/search_show.tpl
delete mode 100644 themes/default/blocks/file/view.tpl
delete mode 100644 themes/default/blocks/file_category/add.tpl
delete mode 100644 themes/default/blocks/file_category/search_form.tpl
delete mode 100644 themes/default/blocks/file_category/search_show.tpl
delete mode 100644 themes/default/blocks/file_category/view.tpl
delete mode 100644 themes/default/blocks/htaccess/add.tpl
delete mode 100644 themes/default/blocks/htaccess/htaccess.tpl
delete mode 100644 themes/default/blocks/htaccess/list.tpl
delete mode 100644 themes/default/blocks/htaccess/search_show.tpl
delete mode 100644 themes/default/blocks/htaccess/view.tpl
delete mode 100644 themes/default/blocks/htaccess_dir/add.tpl
delete mode 100644 themes/default/blocks/htaccess_dir/search_show.tpl
delete mode 100644 themes/default/blocks/htaccess_dir/view.tpl
delete mode 100644 themes/default/blocks/htaccess_exclude/add.tpl
delete mode 100644 themes/default/blocks/htaccess_exclude/main.tpl
delete mode 100644 themes/default/blocks/htaccess_exclude/search_form.tpl
delete mode 100644 themes/default/blocks/htaccess_exclude/search_show.tpl
delete mode 100644 themes/default/blocks/htaccess_exclude/view.tpl
delete mode 100644 themes/default/blocks/import/add.tpl
create mode 100644 themes/default/blocks/invoice/invoicesoon.tpl
delete mode 100644 themes/default/blocks/module/main.tpl
create mode 100644 themes/default/blocks/product_cat/imagePreview.js
create mode 100644 themes/default/blocks/product_cat/post_t_Pages.tpl
create mode 100644 themes/default/blocks/product_cat/pre_t_CategoryDrill.tpl
create mode 100644 themes/default/blocks/product_cat/pre_t_SubCategories.tpl
rename themes/default/blocks/{product/cat.tpl => product_cat/user_menu.tpl} (100%)
delete mode 100644 themes/default/blocks/product_plugin/plugin_prod_TICKET_INCIDENT.tpl
delete mode 100644 themes/default/blocks/static_page/list.tpl
delete mode 100644 themes/default/blocks/static_page/menu.tpl
create mode 100644 themes/default/blocks/static_page/page_list.tpl
create mode 100644 themes/default/blocks/static_page/page_show.tpl
delete mode 100644 themes/default/blocks/static_page/show.tpl
delete mode 100644 themes/default/blocks/static_page_category/main.tpl
create mode 100644 themes/default/blocks/static_page_category/menu.tpl
delete mode 100644 themes/default/blocks/static_page_category/search_form.tpl
delete mode 100644 themes/default/blocks/task/main.tpl
delete mode 100644 themes/default/blocks/tax/main.tpl
delete mode 100644 themes/default/blocks/ticket/add.tpl
delete mode 100644 themes/default/blocks/ticket/auth.tpl
delete mode 100644 themes/default/blocks/ticket/main.tpl
delete mode 100644 themes/default/blocks/ticket/overview.tpl
delete mode 100644 themes/default/blocks/ticket/search_form.tpl
delete mode 100644 themes/default/blocks/ticket/search_quick.tpl
delete mode 100644 themes/default/blocks/ticket/search_quick_show.tpl
delete mode 100644 themes/default/blocks/ticket/search_show.tpl
delete mode 100644 themes/default/blocks/ticket/ticket.tpl
delete mode 100644 themes/default/blocks/ticket/user.tpl
delete mode 100644 themes/default/blocks/ticket/user_add.tpl
delete mode 100644 themes/default/blocks/ticket/user_view.tpl
delete mode 100644 themes/default/blocks/ticket/view.tpl
delete mode 100644 themes/default/blocks/ticket/view_quick.tpl
delete mode 100644 themes/default/blocks/ticket_department/add.tpl
delete mode 100644 themes/default/blocks/ticket_department/search_show.tpl
delete mode 100644 themes/default/blocks/ticket_department/view.tpl
create mode 100644 themes/default/cart.js
delete mode 100644 themes/default/images/htaccess_error.gif
create mode 100644 themes/default/images/logo-big.png
create mode 100644 themes/default/images/logo-small.png
rename includes/pdf/invoice.pdf => themes/default/invoice/invoice-0.pdf (100%)
rename includes/pdf/invoice1.pdf => themes/default/invoice/invoice-1.pdf (100%)
rename includes/pdf/invoice2.pdf => themes/default/invoice/invoice-2.pdf (100%)
rename includes/pdf/invoice_backup.pdf => themes/default/invoice/invoice-3.pdf (100%)
create mode 100644 themes/default/invoice/invoice-blank.pdf
create mode 100644 themes/default/invoice/invoice-logo.png
create mode 100644 themes/default/invoice/invoice-payment-dd.png
create mode 100644 themes/default/invoice/invoice-payment-pp.png
delete mode 100644 themes/default/left.tpl
delete mode 100644 themes/default/search.js
create mode 100644 themes/default/user_view.js
create mode 100644 themes/default_admin/blocks/core/bottom_frame.tpl
create mode 100644 themes/default_admin/delete_record.js
delete mode 100644 themes/default_admin/images/htaccess_error.gif
create mode 100644 themes/default_admin/tinymce.js
create mode 100644 themes/default_admin/view-advanced.js
diff --git a/admin.php b/admin.php
index 40a50940..7f6de066 100644
--- a/admin.php
+++ b/admin.php
@@ -1,26 +1,32 @@
+ * @copyright 2009 Deon George
+ * @link http://osb.leenooks.net
*
* @link http://www.agileco.com/
* @copyright 2004-2008 Agileco, LLC.
* @license http://www.agileco.com/agilebill/license1-4.txt
- * @author Tony Landis
+ * @author Tony Landis
* @package AgileBill
- * @version 1.4.93
+ * @subpackage Core
*/
-if(!isset($_POST["default_admin"]) && !isset($_POST["default_admin"]))
-{
- DEFINE('ADMIN_FORCE', true);
-}
+/**
+ * The main AgileBill Entry Page
+ */
+
+if(! isset($_POST['default_admin']) && ! isset($_POST['default_admin']))
+ DEFINE('ADMIN_FORCE',true);
+
include_once('index.php');
-?>
\ No newline at end of file
+?>
diff --git a/ajax.php b/ajax.php
index 0abcd892..43992d95 100644
--- a/ajax.php
+++ b/ajax.php
@@ -1,49 +1,61 @@
+ * @copyright 2009 Deon George
+ * @link http://osb.leenooks.net
*
* @link http://www.agileco.com/
* @copyright 2004-2008 Agileco, LLC.
* @license http://www.agileco.com/agilebill/license1-4.txt
- * @author Tony Landis
+ * @author Tony Landis
* @package AgileBill
- * @version 1.4.93
+ * @subpackage Core
*/
+/**
+ * The main AgileBill AJAX rendering
+ */
+
+ob_start();
+define('AJAX',1);
-ob_start();
-define('AJAX', 1);
require_once('config.inc.php');
+require_once('modules/module.inc.php');
require_once('modules/core/vars.inc.php');
-$C_vars = new CORE_vars;
-$VAR = $C_vars->f;
-require_once('includes/adodb/adodb.inc.php');
-require_once('modules/core/auth.inc.php');
-require_once('modules/core/database.inc.php');
-require_once('modules/core/method_ajax.inc.php');
-require_once('modules/core/session.inc.php');
-require_once('modules/core/setup.inc.php');
-$C_debug = new CORE_debugger;
-$C_setup = new CORE_setup;
-$C_sess = new CORE_session;
-$C_sess->session_constant();
-$C_method = new CORE_method;
+$C_vars = new CORE_vars;
+$VAR = $C_vars->f;
+
+require_once('includes/adodb/adodb.inc.php');
+require_once(PATH_CORE.'auth.inc.php');
+require_once(PATH_CORE.'database.inc.php');
+require_once(PATH_CORE.'method_ajax.inc.php');
+require_once(PATH_CORE.'session.inc.php');
+require_once(PATH_CORE.'setup.inc.php');
+require_once(PATH_CORE.'xml.inc.php');
+
+$C_debug = new CORE_debugger;
+$C_setup = new CORE_setup;
+$C_sess = new CORE_session;
+$C_sess->session_constant();
+$C_method = new CORE_method;
+
if ((isset($VAR['_login'])) && (isset($VAR['_username'])) && (isset($VAR['_password']))) {
- require_once(PATH_CORE . 'login.inc.php');
+ require_once(PATH_CORE.'login.inc.php');
$C_login = new CORE_login_handler();
$C_login->login($VAR);
-}
-$C_sess->session_constant_log();
-$C_auth = new CORE_auth (false);
-$C_method->do_all();
-ob_end_flush();
+}
-?>
\ No newline at end of file
+$C_sess->session_constant_log();
+$C_auth = new CORE_auth(false);
+$C_method->do_all();
+ob_end_flush();
+?>
diff --git a/config.inc.php b/config.inc.php
index 8778f18e..63b667e4 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -1 +1,3 @@
-# this file must be writable by php to proceed with installation
\ No newline at end of file
+
diff --git a/cookie.index.php b/cookie.index.php
deleted file mode 100644
index 72e77915..00000000
--- a/cookie.index.php
+++ /dev/null
@@ -1,103 +0,0 @@
-f;
-
- # initialize the site setup
- $C_setup = new CORE_setup;
-
- # initialize the session handler
- $C_sess = new CORE_session;
-
- # define the other session variables as constants
- $C_sess->session_constant();
-
- # update the session constants
- $C_sess->session_constant_log();
-
- # initialze the authentication handler
- $force = false;
- $C_auth = new CORE_auth ($force);
-
- ############################################################################
- # Verify the User's Access
- $authorized = false;
- if(defined("SESS_LOGGED") && SESS_LOGGED == "1" && agile_check_auth ( _HTACCESS_ID ) )
- $authorized = true;
-
- ############################################################################
- ## forward to login page:
- if ( !$authorized )
- {
- header("Location: ".URL."?_page=account:login_cookie&_htaccess_id=" . _HTACCESS_ID. "&_next_page="._RETURN_URL);
- exit();
- }
-
-
- ### Reset the 's' var
- if(isset($_POST_s))
- {
- $_POST['s'] = $_POST_s;
- }
- else if (isset($_GET_s))
- {
- $_GET['s'] = $_GET_s;
- }
-
-
- ##############################
- ## Check Authentication ##
- ##############################
- function agile_check_auth($id)
- {
- ### Check if user is a member of one of the authorized groups:
- $db = &DB();
- $sql = 'SELECT status,group_avail FROM ' . AGILE_DB_PREFIX . 'htaccess WHERE
- site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND
- status = ' . $db->qstr('1') . ' AND
- id = ' . $db->qstr($id);
- $result = $db->Execute($sql);
- if($result->RecordCount() > 0)
- {
- global $C_auth;
- @$arr = unserialize($result->fields['group_avail']);
- for($i=0; $iauth_group_by_id($arr[$i]))
- {
- return true;
- }
- }
- }
- return false;
- }
-
- ob_end_flush();
-?>
\ No newline at end of file
diff --git a/htaccess_index.php b/htaccess_index.php
deleted file mode 100644
index dee70bae..00000000
--- a/htaccess_index.php
+++ /dev/null
@@ -1,266 +0,0 @@
- 'jpg', 'type' => 'image/jpeg', 'disposition' => 'inline'),
- Array ('name' => 'jpeg', 'type' => 'image/jpeg', 'disposition' => 'inline'),
- Array ('name' => 'jpe', 'type' => 'image/jpeg', 'disposition' => 'inline'),
- Array ('name' => 'gif', 'type' => 'image/gif', 'disposition' => 'inline'),
- Array ('name' => 'bmp', 'type' => 'image/bmp', 'disposition' => 'inline'),
- Array ('name' => 'tif', 'type' => 'image/tif', 'disposition' => 'inline'),
- Array ('name' => 'png', 'type' => 'image/png', 'disposition' => 'inline'),
- Array ('name' => 'wbmp', 'type' => 'image/vnd.wap.wbmp', 'disposition' => 'inline'),
-
- Array ('name' => 'pdf', 'type' => 'application/pdf', 'disposition' => 'inline'),
- Array ('name' => 'exe', 'type' => 'application/octet-stream', 'disposition'=> 'attatchment'),
- Array ('name' => 'zip', 'type' => 'application/x-zip', 'disposition' => 'attatchment'),
- Array ('name' => 'gzip', 'type' => 'application/gzip', 'disposition' => 'attatchment'),
- Array ('name' => 'tgz', 'type' => 'application/tgz', 'disposition' => 'attatchment'),
- Array ('name' => 'gz', 'type' => 'application/gz', 'disposition' => 'attatchment'),
- Array ('name' => 'doc', 'type' => 'application/ms-word', 'disposition' => 'inline'),
- Array ('name' => 'xls', 'type' => 'application/ms-excel', 'disposition' => 'inline'),
- Array ('name' => 'csv', 'type' => 'application/ms-excel', 'disposition' => 'inline'),
- Array ('name' => 'swf', 'type' => 'application/x-shockwave-flash', 'disposition' => 'inline'),
-
- Array ('name' => 'txt', 'type' => 'text/plain', 'disposition' => 'inline'),
- Array ('name' => 'text', 'type' => 'text/plain', 'disposition' => 'inline'),
- Array ('name' => 'rtf', 'type' => 'text/richtext', 'disposition' => 'inline'),
- Array ('name' => 'xml', 'type' => 'text/xml', 'disposition' => 'inline'),
- Array ('name' => 'css', 'type' => 'text/css', 'disposition' => 'inline'),
- Array ('name' => 'js', 'type' => 'text/plain', 'disposition' => 'inline'),
- Array ('name' => 'wml', 'type' => 'text/vnd.wap.wml', 'disposition' => 'inline'),
-
- Array ('name' => 'avi', 'type' => 'video/avi', 'disposition' => 'attatchment'),
- Array ('name' => 'mpg', 'type' => 'video/mpeg', 'disposition' => 'attatchment'),
- Array ('name' => 'mpeg', 'type' => 'video/mpeg', 'disposition' => 'attatchment'),
- Array ('name' => 'mpe', 'type' => 'video/mpeg', 'disposition' => 'attatchment'),
- Array ('name' => 'wmv', 'type' => 'video/x-ms-wmv', 'disposition' => 'attatchment'),
- Array ('name' => 'asf', 'type' => 'video/x-ms-asf', 'disposition' => 'attatchment')
- );
-
- # Load the config file:
- require_once('config.inc.php');
-
- # Require the needed files...
- require_once(PATH_ADODB . 'adodb.inc.php');
- require_once(PATH_CORE . 'auth.inc.php');
- require_once(PATH_CORE . 'database.inc.php');
- require_once(PATH_CORE . 'method.inc.php');
- require_once(PATH_CORE . 'session.inc.php');
- require_once(PATH_CORE . 'translate.inc.php');
- require_once(PATH_CORE . 'setup.inc.php');
- require_once(PATH_CORE . 'vars.inc.php');
- require_once(PATH_CORE . 'xml.inc.php');
-
- ## Path to the error file
- define ( 'ERROR_GIF', PATH_THEMES.DEF_THEME_N.'/images/htaccess_error.gif' );
-
- # start the debugger
- $C_debug = new CORE_debugger;
-
- # initialize the GET/POST vars
- $C_vars = new CORE_vars;
- $VAR = $C_vars->f;
-
- # initialize the site setup
- $C_setup = new CORE_setup;
-
- # initialize the session handler
- $C_sess = new CORE_session;
-
- # define the other session variables as constants
- $C_sess->session_constant();
-
- # initialize the translation handler
- $C_translate = new CORE_translate;
-
- # update the session constants
- $C_sess->session_constant_log();
-
- # initialze the authentication handler
- $force = false;
- $C_auth = new CORE_auth ($force);
-
- ########################################################################
- # Verify the User's Access
- $authorized = false;
- if(defined("SESS_LOGGED"))
- if(SESS_LOGGED == "1" && check_auth($VAR['_HTACCESS_ID']))
- $authorized = true;
-
- ############################################################################
- ## If this was a GET:
- if ( isset($REQUEST_URI ) )
- {
- $ARRAY = explode ( '?', $REQUEST_URI);
- $REQUEST_URI = $ARRAY[0] ;
- }
-
- ## Define global system vars...
- if(!isset($DOCUMENT_ROOT)) $DOCUMENT_ROOT = $_SERVER["DOCUMENT_ROOT"];
- if(!isset($REQUEST_URI)) $REQUEST_URI = $_SERVER["REQUEST_URI"];
- if(!isset($SCRIPT_FILENAME)) $SCRIPT_FILENAME = $_SERVER["SCRIPT_FILENAME"];
-
-
- ############################################################################
- ### Check if File Exists:
- if (file_exists($DOCUMENT_ROOT.$REQUEST_URI) &&
- ($SCRIPT_FILENAME != $DOCUMENT_ROOT.$REQUEST_URI) &&
- ($REQUEST_URI != "/") &&
- (!ereg( '[////]{2,}$', $REQUEST_URI ) ) )
- {
-
- $url = $REQUEST_URI;
-
- ########################################################################
- # Check Passthu File Types:
-
- for ($i=0; $iPAGE NOT FOUND ";
- exit();
- }
- } else {
- ## forward to login page:
- header("Location: ".URL."?_page=account:login_htaccess&_htaccess_id=" . $VAR['_HTACCESS_ID'] . '&_htaccess_dir_id=' . $VAR['_HTACCESS_DIR_ID']);
- exit();
- }
-
-
- ########################################################################
- # Filetype not defined, force download:
-
- header("Pragma: public");
- header("Expires: 0");
- header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
- header("Content-Type: application/force-download");
- header("Content-Type: application/octet-stream");
- header("Content-Type: application/download");
- header("Content-Disposition: attachment; filename=".@basename($DOCUMENT_ROOT.$url).";");
- header("Content-Transfer-Encoding: binary");
- header("Content-Length: ".@filesize($DOCUMENT_ROOT.$url));
- @readfile("$DOCUMENT_ROOT.$url");
- exit();
-
-
- ##############################
- ## Check Authentication ##
- ##############################
- function check_auth($id)
- {
- ### Check if user is a member of one of the authorized groups:
- $db = &DB();
- $sql = 'SELECT status,group_avail FROM ' . AGILE_DB_PREFIX . 'htaccess WHERE
- site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND
- status = ' . $db->qstr('1') . ' AND
- id = ' . $db->qstr($id);
- $result = $db->Execute($sql);
- if($result->RecordCount() > 0) {
- global $C_auth;
- @$arr = unserialize($result->fields['group_avail']);
- for($i=0; $iauth_group_by_id($arr[$i]))
- return true;
- }
- return false;
- }
-
- ob_end_flush();
-?>
\ No newline at end of file
diff --git a/includes/fpdf/font/courier.php b/includes/fpdf/font/courier.php
new file mode 100755
index 00000000..913f9a45
--- /dev/null
+++ b/includes/fpdf/font/courier.php
@@ -0,0 +1,7 @@
+
diff --git a/includes/fpdf/font/desktop.ini b/includes/fpdf/font/desktop.ini
new file mode 100755
index 00000000..8a96fbb7
--- /dev/null
+++ b/includes/fpdf/font/desktop.ini
@@ -0,0 +1,4 @@
+[ViewState]
+Mode=
+Vid=
+FolderType=NotSpecified
diff --git a/includes/fpdf/font/helvetica.php b/includes/fpdf/font/helvetica.php
new file mode 100755
index 00000000..ca94cdf2
--- /dev/null
+++ b/includes/fpdf/font/helvetica.php
@@ -0,0 +1,15 @@
+278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
+ chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
+ ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
+ 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
+ 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
+ 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
+ chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
+ chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
+ chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
+ chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
+?>
diff --git a/includes/fpdf/font/helveticab.php b/includes/fpdf/font/helveticab.php
new file mode 100755
index 00000000..276cfa8c
--- /dev/null
+++ b/includes/fpdf/font/helveticab.php
@@ -0,0 +1,15 @@
+278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
+ chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
+ ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
+ 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
+ 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
+ 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
+ chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
+ chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
+ chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
+ chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
+?>
diff --git a/includes/fpdf/font/helveticabi.php b/includes/fpdf/font/helveticabi.php
new file mode 100755
index 00000000..8d217743
--- /dev/null
+++ b/includes/fpdf/font/helveticabi.php
@@ -0,0 +1,15 @@
+278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
+ chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
+ ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
+ 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
+ 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
+ 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
+ chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
+ chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
+ chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
+ chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
+?>
diff --git a/includes/fpdf/font/helveticai.php b/includes/fpdf/font/helveticai.php
new file mode 100755
index 00000000..88bf4371
--- /dev/null
+++ b/includes/fpdf/font/helveticai.php
@@ -0,0 +1,15 @@
+278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
+ chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
+ ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
+ 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
+ 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
+ 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
+ chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
+ chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
+ chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
+ chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
+?>
diff --git a/includes/fpdf/font/makefont/cp1250.map b/includes/fpdf/font/makefont/cp1250.map
new file mode 100755
index 00000000..ec110af0
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1250.map
@@ -0,0 +1,251 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!89 U+2030 perthousand
+!8A U+0160 Scaron
+!8B U+2039 guilsinglleft
+!8C U+015A Sacute
+!8D U+0164 Tcaron
+!8E U+017D Zcaron
+!8F U+0179 Zacute
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!99 U+2122 trademark
+!9A U+0161 scaron
+!9B U+203A guilsinglright
+!9C U+015B sacute
+!9D U+0165 tcaron
+!9E U+017E zcaron
+!9F U+017A zacute
+!A0 U+00A0 space
+!A1 U+02C7 caron
+!A2 U+02D8 breve
+!A3 U+0141 Lslash
+!A4 U+00A4 currency
+!A5 U+0104 Aogonek
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+015E Scedilla
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+017B Zdotaccent
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+02DB ogonek
+!B3 U+0142 lslash
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00B8 cedilla
+!B9 U+0105 aogonek
+!BA U+015F scedilla
+!BB U+00BB guillemotright
+!BC U+013D Lcaron
+!BD U+02DD hungarumlaut
+!BE U+013E lcaron
+!BF U+017C zdotaccent
+!C0 U+0154 Racute
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+0102 Abreve
+!C4 U+00C4 Adieresis
+!C5 U+0139 Lacute
+!C6 U+0106 Cacute
+!C7 U+00C7 Ccedilla
+!C8 U+010C Ccaron
+!C9 U+00C9 Eacute
+!CA U+0118 Eogonek
+!CB U+00CB Edieresis
+!CC U+011A Ecaron
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+010E Dcaron
+!D0 U+0110 Dcroat
+!D1 U+0143 Nacute
+!D2 U+0147 Ncaron
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+0150 Ohungarumlaut
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+0158 Rcaron
+!D9 U+016E Uring
+!DA U+00DA Uacute
+!DB U+0170 Uhungarumlaut
+!DC U+00DC Udieresis
+!DD U+00DD Yacute
+!DE U+0162 Tcommaaccent
+!DF U+00DF germandbls
+!E0 U+0155 racute
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+0103 abreve
+!E4 U+00E4 adieresis
+!E5 U+013A lacute
+!E6 U+0107 cacute
+!E7 U+00E7 ccedilla
+!E8 U+010D ccaron
+!E9 U+00E9 eacute
+!EA U+0119 eogonek
+!EB U+00EB edieresis
+!EC U+011B ecaron
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+010F dcaron
+!F0 U+0111 dcroat
+!F1 U+0144 nacute
+!F2 U+0148 ncaron
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+0151 ohungarumlaut
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+0159 rcaron
+!F9 U+016F uring
+!FA U+00FA uacute
+!FB U+0171 uhungarumlaut
+!FC U+00FC udieresis
+!FD U+00FD yacute
+!FE U+0163 tcommaaccent
+!FF U+02D9 dotaccent
diff --git a/includes/fpdf/font/makefont/cp1251.map b/includes/fpdf/font/makefont/cp1251.map
new file mode 100755
index 00000000..de6a198d
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1251.map
@@ -0,0 +1,255 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0402 afii10051
+!81 U+0403 afii10052
+!82 U+201A quotesinglbase
+!83 U+0453 afii10100
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!88 U+20AC Euro
+!89 U+2030 perthousand
+!8A U+0409 afii10058
+!8B U+2039 guilsinglleft
+!8C U+040A afii10059
+!8D U+040C afii10061
+!8E U+040B afii10060
+!8F U+040F afii10145
+!90 U+0452 afii10099
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!99 U+2122 trademark
+!9A U+0459 afii10106
+!9B U+203A guilsinglright
+!9C U+045A afii10107
+!9D U+045C afii10109
+!9E U+045B afii10108
+!9F U+045F afii10193
+!A0 U+00A0 space
+!A1 U+040E afii10062
+!A2 U+045E afii10110
+!A3 U+0408 afii10057
+!A4 U+00A4 currency
+!A5 U+0490 afii10050
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+0401 afii10023
+!A9 U+00A9 copyright
+!AA U+0404 afii10053
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+0407 afii10056
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+0406 afii10055
+!B3 U+0456 afii10103
+!B4 U+0491 afii10098
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+0451 afii10071
+!B9 U+2116 afii61352
+!BA U+0454 afii10101
+!BB U+00BB guillemotright
+!BC U+0458 afii10105
+!BD U+0405 afii10054
+!BE U+0455 afii10102
+!BF U+0457 afii10104
+!C0 U+0410 afii10017
+!C1 U+0411 afii10018
+!C2 U+0412 afii10019
+!C3 U+0413 afii10020
+!C4 U+0414 afii10021
+!C5 U+0415 afii10022
+!C6 U+0416 afii10024
+!C7 U+0417 afii10025
+!C8 U+0418 afii10026
+!C9 U+0419 afii10027
+!CA U+041A afii10028
+!CB U+041B afii10029
+!CC U+041C afii10030
+!CD U+041D afii10031
+!CE U+041E afii10032
+!CF U+041F afii10033
+!D0 U+0420 afii10034
+!D1 U+0421 afii10035
+!D2 U+0422 afii10036
+!D3 U+0423 afii10037
+!D4 U+0424 afii10038
+!D5 U+0425 afii10039
+!D6 U+0426 afii10040
+!D7 U+0427 afii10041
+!D8 U+0428 afii10042
+!D9 U+0429 afii10043
+!DA U+042A afii10044
+!DB U+042B afii10045
+!DC U+042C afii10046
+!DD U+042D afii10047
+!DE U+042E afii10048
+!DF U+042F afii10049
+!E0 U+0430 afii10065
+!E1 U+0431 afii10066
+!E2 U+0432 afii10067
+!E3 U+0433 afii10068
+!E4 U+0434 afii10069
+!E5 U+0435 afii10070
+!E6 U+0436 afii10072
+!E7 U+0437 afii10073
+!E8 U+0438 afii10074
+!E9 U+0439 afii10075
+!EA U+043A afii10076
+!EB U+043B afii10077
+!EC U+043C afii10078
+!ED U+043D afii10079
+!EE U+043E afii10080
+!EF U+043F afii10081
+!F0 U+0440 afii10082
+!F1 U+0441 afii10083
+!F2 U+0442 afii10084
+!F3 U+0443 afii10085
+!F4 U+0444 afii10086
+!F5 U+0445 afii10087
+!F6 U+0446 afii10088
+!F7 U+0447 afii10089
+!F8 U+0448 afii10090
+!F9 U+0449 afii10091
+!FA U+044A afii10092
+!FB U+044B afii10093
+!FC U+044C afii10094
+!FD U+044D afii10095
+!FE U+044E afii10096
+!FF U+044F afii10097
diff --git a/includes/fpdf/font/makefont/cp1252.map b/includes/fpdf/font/makefont/cp1252.map
new file mode 100755
index 00000000..dd490e59
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1252.map
@@ -0,0 +1,251 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!83 U+0192 florin
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!88 U+02C6 circumflex
+!89 U+2030 perthousand
+!8A U+0160 Scaron
+!8B U+2039 guilsinglleft
+!8C U+0152 OE
+!8E U+017D Zcaron
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!98 U+02DC tilde
+!99 U+2122 trademark
+!9A U+0161 scaron
+!9B U+203A guilsinglright
+!9C U+0153 oe
+!9E U+017E zcaron
+!9F U+0178 Ydieresis
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+00AA ordfeminine
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00B8 cedilla
+!B9 U+00B9 onesuperior
+!BA U+00BA ordmasculine
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00BF questiondown
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+00C3 Atilde
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+00CC Igrave
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+00D0 Eth
+!D1 U+00D1 Ntilde
+!D2 U+00D2 Ograve
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+00DD Yacute
+!DE U+00DE Thorn
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+00E3 atilde
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+00EC igrave
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+00F0 eth
+!F1 U+00F1 ntilde
+!F2 U+00F2 ograve
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+00FD yacute
+!FE U+00FE thorn
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/cp1253.map b/includes/fpdf/font/makefont/cp1253.map
new file mode 100755
index 00000000..4bd826fb
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1253.map
@@ -0,0 +1,239 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!83 U+0192 florin
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!89 U+2030 perthousand
+!8B U+2039 guilsinglleft
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!99 U+2122 trademark
+!9B U+203A guilsinglright
+!A0 U+00A0 space
+!A1 U+0385 dieresistonos
+!A2 U+0386 Alphatonos
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+2015 afii00208
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+0384 tonos
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+0388 Epsilontonos
+!B9 U+0389 Etatonos
+!BA U+038A Iotatonos
+!BB U+00BB guillemotright
+!BC U+038C Omicrontonos
+!BD U+00BD onehalf
+!BE U+038E Upsilontonos
+!BF U+038F Omegatonos
+!C0 U+0390 iotadieresistonos
+!C1 U+0391 Alpha
+!C2 U+0392 Beta
+!C3 U+0393 Gamma
+!C4 U+0394 Delta
+!C5 U+0395 Epsilon
+!C6 U+0396 Zeta
+!C7 U+0397 Eta
+!C8 U+0398 Theta
+!C9 U+0399 Iota
+!CA U+039A Kappa
+!CB U+039B Lambda
+!CC U+039C Mu
+!CD U+039D Nu
+!CE U+039E Xi
+!CF U+039F Omicron
+!D0 U+03A0 Pi
+!D1 U+03A1 Rho
+!D3 U+03A3 Sigma
+!D4 U+03A4 Tau
+!D5 U+03A5 Upsilon
+!D6 U+03A6 Phi
+!D7 U+03A7 Chi
+!D8 U+03A8 Psi
+!D9 U+03A9 Omega
+!DA U+03AA Iotadieresis
+!DB U+03AB Upsilondieresis
+!DC U+03AC alphatonos
+!DD U+03AD epsilontonos
+!DE U+03AE etatonos
+!DF U+03AF iotatonos
+!E0 U+03B0 upsilondieresistonos
+!E1 U+03B1 alpha
+!E2 U+03B2 beta
+!E3 U+03B3 gamma
+!E4 U+03B4 delta
+!E5 U+03B5 epsilon
+!E6 U+03B6 zeta
+!E7 U+03B7 eta
+!E8 U+03B8 theta
+!E9 U+03B9 iota
+!EA U+03BA kappa
+!EB U+03BB lambda
+!EC U+03BC mu
+!ED U+03BD nu
+!EE U+03BE xi
+!EF U+03BF omicron
+!F0 U+03C0 pi
+!F1 U+03C1 rho
+!F2 U+03C2 sigma1
+!F3 U+03C3 sigma
+!F4 U+03C4 tau
+!F5 U+03C5 upsilon
+!F6 U+03C6 phi
+!F7 U+03C7 chi
+!F8 U+03C8 psi
+!F9 U+03C9 omega
+!FA U+03CA iotadieresis
+!FB U+03CB upsilondieresis
+!FC U+03CC omicrontonos
+!FD U+03CD upsilontonos
+!FE U+03CE omegatonos
diff --git a/includes/fpdf/font/makefont/cp1254.map b/includes/fpdf/font/makefont/cp1254.map
new file mode 100755
index 00000000..829473b2
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1254.map
@@ -0,0 +1,249 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!83 U+0192 florin
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!88 U+02C6 circumflex
+!89 U+2030 perthousand
+!8A U+0160 Scaron
+!8B U+2039 guilsinglleft
+!8C U+0152 OE
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!98 U+02DC tilde
+!99 U+2122 trademark
+!9A U+0161 scaron
+!9B U+203A guilsinglright
+!9C U+0153 oe
+!9F U+0178 Ydieresis
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+00AA ordfeminine
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00B8 cedilla
+!B9 U+00B9 onesuperior
+!BA U+00BA ordmasculine
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00BF questiondown
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+00C3 Atilde
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+00CC Igrave
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+011E Gbreve
+!D1 U+00D1 Ntilde
+!D2 U+00D2 Ograve
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+0130 Idotaccent
+!DE U+015E Scedilla
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+00E3 atilde
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+00EC igrave
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+011F gbreve
+!F1 U+00F1 ntilde
+!F2 U+00F2 ograve
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+0131 dotlessi
+!FE U+015F scedilla
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/cp1255.map b/includes/fpdf/font/makefont/cp1255.map
new file mode 100755
index 00000000..079e10c6
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1255.map
@@ -0,0 +1,233 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!83 U+0192 florin
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!88 U+02C6 circumflex
+!89 U+2030 perthousand
+!8B U+2039 guilsinglleft
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!98 U+02DC tilde
+!99 U+2122 trademark
+!9B U+203A guilsinglright
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+20AA afii57636
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+00D7 multiply
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD sfthyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 middot
+!B8 U+00B8 cedilla
+!B9 U+00B9 onesuperior
+!BA U+00F7 divide
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00BF questiondown
+!C0 U+05B0 afii57799
+!C1 U+05B1 afii57801
+!C2 U+05B2 afii57800
+!C3 U+05B3 afii57802
+!C4 U+05B4 afii57793
+!C5 U+05B5 afii57794
+!C6 U+05B6 afii57795
+!C7 U+05B7 afii57798
+!C8 U+05B8 afii57797
+!C9 U+05B9 afii57806
+!CB U+05BB afii57796
+!CC U+05BC afii57807
+!CD U+05BD afii57839
+!CE U+05BE afii57645
+!CF U+05BF afii57841
+!D0 U+05C0 afii57842
+!D1 U+05C1 afii57804
+!D2 U+05C2 afii57803
+!D3 U+05C3 afii57658
+!D4 U+05F0 afii57716
+!D5 U+05F1 afii57717
+!D6 U+05F2 afii57718
+!D7 U+05F3 gereshhebrew
+!D8 U+05F4 gershayimhebrew
+!E0 U+05D0 afii57664
+!E1 U+05D1 afii57665
+!E2 U+05D2 afii57666
+!E3 U+05D3 afii57667
+!E4 U+05D4 afii57668
+!E5 U+05D5 afii57669
+!E6 U+05D6 afii57670
+!E7 U+05D7 afii57671
+!E8 U+05D8 afii57672
+!E9 U+05D9 afii57673
+!EA U+05DA afii57674
+!EB U+05DB afii57675
+!EC U+05DC afii57676
+!ED U+05DD afii57677
+!EE U+05DE afii57678
+!EF U+05DF afii57679
+!F0 U+05E0 afii57680
+!F1 U+05E1 afii57681
+!F2 U+05E2 afii57682
+!F3 U+05E3 afii57683
+!F4 U+05E4 afii57684
+!F5 U+05E5 afii57685
+!F6 U+05E6 afii57686
+!F7 U+05E7 afii57687
+!F8 U+05E8 afii57688
+!F9 U+05E9 afii57689
+!FA U+05EA afii57690
+!FD U+200E afii299
+!FE U+200F afii300
diff --git a/includes/fpdf/font/makefont/cp1257.map b/includes/fpdf/font/makefont/cp1257.map
new file mode 100755
index 00000000..2f2ecfa2
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1257.map
@@ -0,0 +1,244 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!89 U+2030 perthousand
+!8B U+2039 guilsinglleft
+!8D U+00A8 dieresis
+!8E U+02C7 caron
+!8F U+00B8 cedilla
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!99 U+2122 trademark
+!9B U+203A guilsinglright
+!9D U+00AF macron
+!9E U+02DB ogonek
+!A0 U+00A0 space
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00D8 Oslash
+!A9 U+00A9 copyright
+!AA U+0156 Rcommaaccent
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00C6 AE
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00F8 oslash
+!B9 U+00B9 onesuperior
+!BA U+0157 rcommaaccent
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00E6 ae
+!C0 U+0104 Aogonek
+!C1 U+012E Iogonek
+!C2 U+0100 Amacron
+!C3 U+0106 Cacute
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+0118 Eogonek
+!C7 U+0112 Emacron
+!C8 U+010C Ccaron
+!C9 U+00C9 Eacute
+!CA U+0179 Zacute
+!CB U+0116 Edotaccent
+!CC U+0122 Gcommaaccent
+!CD U+0136 Kcommaaccent
+!CE U+012A Imacron
+!CF U+013B Lcommaaccent
+!D0 U+0160 Scaron
+!D1 U+0143 Nacute
+!D2 U+0145 Ncommaaccent
+!D3 U+00D3 Oacute
+!D4 U+014C Omacron
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+0172 Uogonek
+!D9 U+0141 Lslash
+!DA U+015A Sacute
+!DB U+016A Umacron
+!DC U+00DC Udieresis
+!DD U+017B Zdotaccent
+!DE U+017D Zcaron
+!DF U+00DF germandbls
+!E0 U+0105 aogonek
+!E1 U+012F iogonek
+!E2 U+0101 amacron
+!E3 U+0107 cacute
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+0119 eogonek
+!E7 U+0113 emacron
+!E8 U+010D ccaron
+!E9 U+00E9 eacute
+!EA U+017A zacute
+!EB U+0117 edotaccent
+!EC U+0123 gcommaaccent
+!ED U+0137 kcommaaccent
+!EE U+012B imacron
+!EF U+013C lcommaaccent
+!F0 U+0161 scaron
+!F1 U+0144 nacute
+!F2 U+0146 ncommaaccent
+!F3 U+00F3 oacute
+!F4 U+014D omacron
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+0173 uogonek
+!F9 U+0142 lslash
+!FA U+015B sacute
+!FB U+016B umacron
+!FC U+00FC udieresis
+!FD U+017C zdotaccent
+!FE U+017E zcaron
+!FF U+02D9 dotaccent
diff --git a/includes/fpdf/font/makefont/cp1258.map b/includes/fpdf/font/makefont/cp1258.map
new file mode 100755
index 00000000..fed915f7
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp1258.map
@@ -0,0 +1,247 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!82 U+201A quotesinglbase
+!83 U+0192 florin
+!84 U+201E quotedblbase
+!85 U+2026 ellipsis
+!86 U+2020 dagger
+!87 U+2021 daggerdbl
+!88 U+02C6 circumflex
+!89 U+2030 perthousand
+!8B U+2039 guilsinglleft
+!8C U+0152 OE
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!98 U+02DC tilde
+!99 U+2122 trademark
+!9B U+203A guilsinglright
+!9C U+0153 oe
+!9F U+0178 Ydieresis
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+00AA ordfeminine
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00B8 cedilla
+!B9 U+00B9 onesuperior
+!BA U+00BA ordmasculine
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00BF questiondown
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+0102 Abreve
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+0300 gravecomb
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+0110 Dcroat
+!D1 U+00D1 Ntilde
+!D2 U+0309 hookabovecomb
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+01A0 Ohorn
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+01AF Uhorn
+!DE U+0303 tildecomb
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+0103 abreve
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+0301 acutecomb
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+0111 dcroat
+!F1 U+00F1 ntilde
+!F2 U+0323 dotbelowcomb
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+01A1 ohorn
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+01B0 uhorn
+!FE U+20AB dong
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/cp874.map b/includes/fpdf/font/makefont/cp874.map
new file mode 100755
index 00000000..1006e6b1
--- /dev/null
+++ b/includes/fpdf/font/makefont/cp874.map
@@ -0,0 +1,225 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+20AC Euro
+!85 U+2026 ellipsis
+!91 U+2018 quoteleft
+!92 U+2019 quoteright
+!93 U+201C quotedblleft
+!94 U+201D quotedblright
+!95 U+2022 bullet
+!96 U+2013 endash
+!97 U+2014 emdash
+!A0 U+00A0 space
+!A1 U+0E01 kokaithai
+!A2 U+0E02 khokhaithai
+!A3 U+0E03 khokhuatthai
+!A4 U+0E04 khokhwaithai
+!A5 U+0E05 khokhonthai
+!A6 U+0E06 khorakhangthai
+!A7 U+0E07 ngonguthai
+!A8 U+0E08 chochanthai
+!A9 U+0E09 chochingthai
+!AA U+0E0A chochangthai
+!AB U+0E0B sosothai
+!AC U+0E0C chochoethai
+!AD U+0E0D yoyingthai
+!AE U+0E0E dochadathai
+!AF U+0E0F topatakthai
+!B0 U+0E10 thothanthai
+!B1 U+0E11 thonangmonthothai
+!B2 U+0E12 thophuthaothai
+!B3 U+0E13 nonenthai
+!B4 U+0E14 dodekthai
+!B5 U+0E15 totaothai
+!B6 U+0E16 thothungthai
+!B7 U+0E17 thothahanthai
+!B8 U+0E18 thothongthai
+!B9 U+0E19 nonuthai
+!BA U+0E1A bobaimaithai
+!BB U+0E1B poplathai
+!BC U+0E1C phophungthai
+!BD U+0E1D fofathai
+!BE U+0E1E phophanthai
+!BF U+0E1F fofanthai
+!C0 U+0E20 phosamphaothai
+!C1 U+0E21 momathai
+!C2 U+0E22 yoyakthai
+!C3 U+0E23 roruathai
+!C4 U+0E24 ruthai
+!C5 U+0E25 lolingthai
+!C6 U+0E26 luthai
+!C7 U+0E27 wowaenthai
+!C8 U+0E28 sosalathai
+!C9 U+0E29 sorusithai
+!CA U+0E2A sosuathai
+!CB U+0E2B hohipthai
+!CC U+0E2C lochulathai
+!CD U+0E2D oangthai
+!CE U+0E2E honokhukthai
+!CF U+0E2F paiyannoithai
+!D0 U+0E30 saraathai
+!D1 U+0E31 maihanakatthai
+!D2 U+0E32 saraaathai
+!D3 U+0E33 saraamthai
+!D4 U+0E34 saraithai
+!D5 U+0E35 saraiithai
+!D6 U+0E36 sarauethai
+!D7 U+0E37 saraueethai
+!D8 U+0E38 sarauthai
+!D9 U+0E39 sarauuthai
+!DA U+0E3A phinthuthai
+!DF U+0E3F bahtthai
+!E0 U+0E40 saraethai
+!E1 U+0E41 saraaethai
+!E2 U+0E42 saraothai
+!E3 U+0E43 saraaimaimuanthai
+!E4 U+0E44 saraaimaimalaithai
+!E5 U+0E45 lakkhangyaothai
+!E6 U+0E46 maiyamokthai
+!E7 U+0E47 maitaikhuthai
+!E8 U+0E48 maiekthai
+!E9 U+0E49 maithothai
+!EA U+0E4A maitrithai
+!EB U+0E4B maichattawathai
+!EC U+0E4C thanthakhatthai
+!ED U+0E4D nikhahitthai
+!EE U+0E4E yamakkanthai
+!EF U+0E4F fongmanthai
+!F0 U+0E50 zerothai
+!F1 U+0E51 onethai
+!F2 U+0E52 twothai
+!F3 U+0E53 threethai
+!F4 U+0E54 fourthai
+!F5 U+0E55 fivethai
+!F6 U+0E56 sixthai
+!F7 U+0E57 seventhai
+!F8 U+0E58 eightthai
+!F9 U+0E59 ninethai
+!FA U+0E5A angkhankhuthai
+!FB U+0E5B khomutthai
diff --git a/includes/fpdf/font/makefont/iso-8859-1.map b/includes/fpdf/font/makefont/iso-8859-1.map
new file mode 100755
index 00000000..61740a38
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-1.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+00AA ordfeminine
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00B8 cedilla
+!B9 U+00B9 onesuperior
+!BA U+00BA ordmasculine
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00BF questiondown
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+00C3 Atilde
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+00CC Igrave
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+00D0 Eth
+!D1 U+00D1 Ntilde
+!D2 U+00D2 Ograve
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+00DD Yacute
+!DE U+00DE Thorn
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+00E3 atilde
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+00EC igrave
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+00F0 eth
+!F1 U+00F1 ntilde
+!F2 U+00F2 ograve
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+00FD yacute
+!FE U+00FE thorn
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/iso-8859-11.map b/includes/fpdf/font/makefont/iso-8859-11.map
new file mode 100755
index 00000000..91688120
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-11.map
@@ -0,0 +1,248 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+0E01 kokaithai
+!A2 U+0E02 khokhaithai
+!A3 U+0E03 khokhuatthai
+!A4 U+0E04 khokhwaithai
+!A5 U+0E05 khokhonthai
+!A6 U+0E06 khorakhangthai
+!A7 U+0E07 ngonguthai
+!A8 U+0E08 chochanthai
+!A9 U+0E09 chochingthai
+!AA U+0E0A chochangthai
+!AB U+0E0B sosothai
+!AC U+0E0C chochoethai
+!AD U+0E0D yoyingthai
+!AE U+0E0E dochadathai
+!AF U+0E0F topatakthai
+!B0 U+0E10 thothanthai
+!B1 U+0E11 thonangmonthothai
+!B2 U+0E12 thophuthaothai
+!B3 U+0E13 nonenthai
+!B4 U+0E14 dodekthai
+!B5 U+0E15 totaothai
+!B6 U+0E16 thothungthai
+!B7 U+0E17 thothahanthai
+!B8 U+0E18 thothongthai
+!B9 U+0E19 nonuthai
+!BA U+0E1A bobaimaithai
+!BB U+0E1B poplathai
+!BC U+0E1C phophungthai
+!BD U+0E1D fofathai
+!BE U+0E1E phophanthai
+!BF U+0E1F fofanthai
+!C0 U+0E20 phosamphaothai
+!C1 U+0E21 momathai
+!C2 U+0E22 yoyakthai
+!C3 U+0E23 roruathai
+!C4 U+0E24 ruthai
+!C5 U+0E25 lolingthai
+!C6 U+0E26 luthai
+!C7 U+0E27 wowaenthai
+!C8 U+0E28 sosalathai
+!C9 U+0E29 sorusithai
+!CA U+0E2A sosuathai
+!CB U+0E2B hohipthai
+!CC U+0E2C lochulathai
+!CD U+0E2D oangthai
+!CE U+0E2E honokhukthai
+!CF U+0E2F paiyannoithai
+!D0 U+0E30 saraathai
+!D1 U+0E31 maihanakatthai
+!D2 U+0E32 saraaathai
+!D3 U+0E33 saraamthai
+!D4 U+0E34 saraithai
+!D5 U+0E35 saraiithai
+!D6 U+0E36 sarauethai
+!D7 U+0E37 saraueethai
+!D8 U+0E38 sarauthai
+!D9 U+0E39 sarauuthai
+!DA U+0E3A phinthuthai
+!DF U+0E3F bahtthai
+!E0 U+0E40 saraethai
+!E1 U+0E41 saraaethai
+!E2 U+0E42 saraothai
+!E3 U+0E43 saraaimaimuanthai
+!E4 U+0E44 saraaimaimalaithai
+!E5 U+0E45 lakkhangyaothai
+!E6 U+0E46 maiyamokthai
+!E7 U+0E47 maitaikhuthai
+!E8 U+0E48 maiekthai
+!E9 U+0E49 maithothai
+!EA U+0E4A maitrithai
+!EB U+0E4B maichattawathai
+!EC U+0E4C thanthakhatthai
+!ED U+0E4D nikhahitthai
+!EE U+0E4E yamakkanthai
+!EF U+0E4F fongmanthai
+!F0 U+0E50 zerothai
+!F1 U+0E51 onethai
+!F2 U+0E52 twothai
+!F3 U+0E53 threethai
+!F4 U+0E54 fourthai
+!F5 U+0E55 fivethai
+!F6 U+0E56 sixthai
+!F7 U+0E57 seventhai
+!F8 U+0E58 eightthai
+!F9 U+0E59 ninethai
+!FA U+0E5A angkhankhuthai
+!FB U+0E5B khomutthai
diff --git a/includes/fpdf/font/makefont/iso-8859-15.map b/includes/fpdf/font/makefont/iso-8859-15.map
new file mode 100755
index 00000000..6c2b5712
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-15.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+20AC Euro
+!A5 U+00A5 yen
+!A6 U+0160 Scaron
+!A7 U+00A7 section
+!A8 U+0161 scaron
+!A9 U+00A9 copyright
+!AA U+00AA ordfeminine
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+017D Zcaron
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+017E zcaron
+!B9 U+00B9 onesuperior
+!BA U+00BA ordmasculine
+!BB U+00BB guillemotright
+!BC U+0152 OE
+!BD U+0153 oe
+!BE U+0178 Ydieresis
+!BF U+00BF questiondown
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+00C3 Atilde
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+00CC Igrave
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+00D0 Eth
+!D1 U+00D1 Ntilde
+!D2 U+00D2 Ograve
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+00DD Yacute
+!DE U+00DE Thorn
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+00E3 atilde
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+00EC igrave
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+00F0 eth
+!F1 U+00F1 ntilde
+!F2 U+00F2 ograve
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+00FD yacute
+!FE U+00FE thorn
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/iso-8859-16.map b/includes/fpdf/font/makefont/iso-8859-16.map
new file mode 100755
index 00000000..202c8fe5
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-16.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+0104 Aogonek
+!A2 U+0105 aogonek
+!A3 U+0141 Lslash
+!A4 U+20AC Euro
+!A5 U+201E quotedblbase
+!A6 U+0160 Scaron
+!A7 U+00A7 section
+!A8 U+0161 scaron
+!A9 U+00A9 copyright
+!AA U+0218 Scommaaccent
+!AB U+00AB guillemotleft
+!AC U+0179 Zacute
+!AD U+00AD hyphen
+!AE U+017A zacute
+!AF U+017B Zdotaccent
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+010C Ccaron
+!B3 U+0142 lslash
+!B4 U+017D Zcaron
+!B5 U+201D quotedblright
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+017E zcaron
+!B9 U+010D ccaron
+!BA U+0219 scommaaccent
+!BB U+00BB guillemotright
+!BC U+0152 OE
+!BD U+0153 oe
+!BE U+0178 Ydieresis
+!BF U+017C zdotaccent
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+0102 Abreve
+!C4 U+00C4 Adieresis
+!C5 U+0106 Cacute
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+00CC Igrave
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+0110 Dcroat
+!D1 U+0143 Nacute
+!D2 U+00D2 Ograve
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+0150 Ohungarumlaut
+!D6 U+00D6 Odieresis
+!D7 U+015A Sacute
+!D8 U+0170 Uhungarumlaut
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+0118 Eogonek
+!DE U+021A Tcommaaccent
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+0103 abreve
+!E4 U+00E4 adieresis
+!E5 U+0107 cacute
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+00EC igrave
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+0111 dcroat
+!F1 U+0144 nacute
+!F2 U+00F2 ograve
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+0151 ohungarumlaut
+!F6 U+00F6 odieresis
+!F7 U+015B sacute
+!F8 U+0171 uhungarumlaut
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+0119 eogonek
+!FE U+021B tcommaaccent
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/iso-8859-2.map b/includes/fpdf/font/makefont/iso-8859-2.map
new file mode 100755
index 00000000..65ae09f9
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-2.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+0104 Aogonek
+!A2 U+02D8 breve
+!A3 U+0141 Lslash
+!A4 U+00A4 currency
+!A5 U+013D Lcaron
+!A6 U+015A Sacute
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+0160 Scaron
+!AA U+015E Scedilla
+!AB U+0164 Tcaron
+!AC U+0179 Zacute
+!AD U+00AD hyphen
+!AE U+017D Zcaron
+!AF U+017B Zdotaccent
+!B0 U+00B0 degree
+!B1 U+0105 aogonek
+!B2 U+02DB ogonek
+!B3 U+0142 lslash
+!B4 U+00B4 acute
+!B5 U+013E lcaron
+!B6 U+015B sacute
+!B7 U+02C7 caron
+!B8 U+00B8 cedilla
+!B9 U+0161 scaron
+!BA U+015F scedilla
+!BB U+0165 tcaron
+!BC U+017A zacute
+!BD U+02DD hungarumlaut
+!BE U+017E zcaron
+!BF U+017C zdotaccent
+!C0 U+0154 Racute
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+0102 Abreve
+!C4 U+00C4 Adieresis
+!C5 U+0139 Lacute
+!C6 U+0106 Cacute
+!C7 U+00C7 Ccedilla
+!C8 U+010C Ccaron
+!C9 U+00C9 Eacute
+!CA U+0118 Eogonek
+!CB U+00CB Edieresis
+!CC U+011A Ecaron
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+010E Dcaron
+!D0 U+0110 Dcroat
+!D1 U+0143 Nacute
+!D2 U+0147 Ncaron
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+0150 Ohungarumlaut
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+0158 Rcaron
+!D9 U+016E Uring
+!DA U+00DA Uacute
+!DB U+0170 Uhungarumlaut
+!DC U+00DC Udieresis
+!DD U+00DD Yacute
+!DE U+0162 Tcommaaccent
+!DF U+00DF germandbls
+!E0 U+0155 racute
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+0103 abreve
+!E4 U+00E4 adieresis
+!E5 U+013A lacute
+!E6 U+0107 cacute
+!E7 U+00E7 ccedilla
+!E8 U+010D ccaron
+!E9 U+00E9 eacute
+!EA U+0119 eogonek
+!EB U+00EB edieresis
+!EC U+011B ecaron
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+010F dcaron
+!F0 U+0111 dcroat
+!F1 U+0144 nacute
+!F2 U+0148 ncaron
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+0151 ohungarumlaut
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+0159 rcaron
+!F9 U+016F uring
+!FA U+00FA uacute
+!FB U+0171 uhungarumlaut
+!FC U+00FC udieresis
+!FD U+00FD yacute
+!FE U+0163 tcommaaccent
+!FF U+02D9 dotaccent
diff --git a/includes/fpdf/font/makefont/iso-8859-4.map b/includes/fpdf/font/makefont/iso-8859-4.map
new file mode 100755
index 00000000..a7d87bf3
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-4.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+0104 Aogonek
+!A2 U+0138 kgreenlandic
+!A3 U+0156 Rcommaaccent
+!A4 U+00A4 currency
+!A5 U+0128 Itilde
+!A6 U+013B Lcommaaccent
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+0160 Scaron
+!AA U+0112 Emacron
+!AB U+0122 Gcommaaccent
+!AC U+0166 Tbar
+!AD U+00AD hyphen
+!AE U+017D Zcaron
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+0105 aogonek
+!B2 U+02DB ogonek
+!B3 U+0157 rcommaaccent
+!B4 U+00B4 acute
+!B5 U+0129 itilde
+!B6 U+013C lcommaaccent
+!B7 U+02C7 caron
+!B8 U+00B8 cedilla
+!B9 U+0161 scaron
+!BA U+0113 emacron
+!BB U+0123 gcommaaccent
+!BC U+0167 tbar
+!BD U+014A Eng
+!BE U+017E zcaron
+!BF U+014B eng
+!C0 U+0100 Amacron
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+00C3 Atilde
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+012E Iogonek
+!C8 U+010C Ccaron
+!C9 U+00C9 Eacute
+!CA U+0118 Eogonek
+!CB U+00CB Edieresis
+!CC U+0116 Edotaccent
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+012A Imacron
+!D0 U+0110 Dcroat
+!D1 U+0145 Ncommaaccent
+!D2 U+014C Omacron
+!D3 U+0136 Kcommaaccent
+!D4 U+00D4 Ocircumflex
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+0172 Uogonek
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+0168 Utilde
+!DE U+016A Umacron
+!DF U+00DF germandbls
+!E0 U+0101 amacron
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+00E3 atilde
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+012F iogonek
+!E8 U+010D ccaron
+!E9 U+00E9 eacute
+!EA U+0119 eogonek
+!EB U+00EB edieresis
+!EC U+0117 edotaccent
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+012B imacron
+!F0 U+0111 dcroat
+!F1 U+0146 ncommaaccent
+!F2 U+014D omacron
+!F3 U+0137 kcommaaccent
+!F4 U+00F4 ocircumflex
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+0173 uogonek
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+0169 utilde
+!FE U+016B umacron
+!FF U+02D9 dotaccent
diff --git a/includes/fpdf/font/makefont/iso-8859-5.map b/includes/fpdf/font/makefont/iso-8859-5.map
new file mode 100755
index 00000000..f9cd4edc
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-5.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+0401 afii10023
+!A2 U+0402 afii10051
+!A3 U+0403 afii10052
+!A4 U+0404 afii10053
+!A5 U+0405 afii10054
+!A6 U+0406 afii10055
+!A7 U+0407 afii10056
+!A8 U+0408 afii10057
+!A9 U+0409 afii10058
+!AA U+040A afii10059
+!AB U+040B afii10060
+!AC U+040C afii10061
+!AD U+00AD hyphen
+!AE U+040E afii10062
+!AF U+040F afii10145
+!B0 U+0410 afii10017
+!B1 U+0411 afii10018
+!B2 U+0412 afii10019
+!B3 U+0413 afii10020
+!B4 U+0414 afii10021
+!B5 U+0415 afii10022
+!B6 U+0416 afii10024
+!B7 U+0417 afii10025
+!B8 U+0418 afii10026
+!B9 U+0419 afii10027
+!BA U+041A afii10028
+!BB U+041B afii10029
+!BC U+041C afii10030
+!BD U+041D afii10031
+!BE U+041E afii10032
+!BF U+041F afii10033
+!C0 U+0420 afii10034
+!C1 U+0421 afii10035
+!C2 U+0422 afii10036
+!C3 U+0423 afii10037
+!C4 U+0424 afii10038
+!C5 U+0425 afii10039
+!C6 U+0426 afii10040
+!C7 U+0427 afii10041
+!C8 U+0428 afii10042
+!C9 U+0429 afii10043
+!CA U+042A afii10044
+!CB U+042B afii10045
+!CC U+042C afii10046
+!CD U+042D afii10047
+!CE U+042E afii10048
+!CF U+042F afii10049
+!D0 U+0430 afii10065
+!D1 U+0431 afii10066
+!D2 U+0432 afii10067
+!D3 U+0433 afii10068
+!D4 U+0434 afii10069
+!D5 U+0435 afii10070
+!D6 U+0436 afii10072
+!D7 U+0437 afii10073
+!D8 U+0438 afii10074
+!D9 U+0439 afii10075
+!DA U+043A afii10076
+!DB U+043B afii10077
+!DC U+043C afii10078
+!DD U+043D afii10079
+!DE U+043E afii10080
+!DF U+043F afii10081
+!E0 U+0440 afii10082
+!E1 U+0441 afii10083
+!E2 U+0442 afii10084
+!E3 U+0443 afii10085
+!E4 U+0444 afii10086
+!E5 U+0445 afii10087
+!E6 U+0446 afii10088
+!E7 U+0447 afii10089
+!E8 U+0448 afii10090
+!E9 U+0449 afii10091
+!EA U+044A afii10092
+!EB U+044B afii10093
+!EC U+044C afii10094
+!ED U+044D afii10095
+!EE U+044E afii10096
+!EF U+044F afii10097
+!F0 U+2116 afii61352
+!F1 U+0451 afii10071
+!F2 U+0452 afii10099
+!F3 U+0453 afii10100
+!F4 U+0454 afii10101
+!F5 U+0455 afii10102
+!F6 U+0456 afii10103
+!F7 U+0457 afii10104
+!F8 U+0458 afii10105
+!F9 U+0459 afii10106
+!FA U+045A afii10107
+!FB U+045B afii10108
+!FC U+045C afii10109
+!FD U+00A7 section
+!FE U+045E afii10110
+!FF U+045F afii10193
diff --git a/includes/fpdf/font/makefont/iso-8859-7.map b/includes/fpdf/font/makefont/iso-8859-7.map
new file mode 100755
index 00000000..e163796b
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-7.map
@@ -0,0 +1,250 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+2018 quoteleft
+!A2 U+2019 quoteright
+!A3 U+00A3 sterling
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AF U+2015 afii00208
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+0384 tonos
+!B5 U+0385 dieresistonos
+!B6 U+0386 Alphatonos
+!B7 U+00B7 periodcentered
+!B8 U+0388 Epsilontonos
+!B9 U+0389 Etatonos
+!BA U+038A Iotatonos
+!BB U+00BB guillemotright
+!BC U+038C Omicrontonos
+!BD U+00BD onehalf
+!BE U+038E Upsilontonos
+!BF U+038F Omegatonos
+!C0 U+0390 iotadieresistonos
+!C1 U+0391 Alpha
+!C2 U+0392 Beta
+!C3 U+0393 Gamma
+!C4 U+0394 Delta
+!C5 U+0395 Epsilon
+!C6 U+0396 Zeta
+!C7 U+0397 Eta
+!C8 U+0398 Theta
+!C9 U+0399 Iota
+!CA U+039A Kappa
+!CB U+039B Lambda
+!CC U+039C Mu
+!CD U+039D Nu
+!CE U+039E Xi
+!CF U+039F Omicron
+!D0 U+03A0 Pi
+!D1 U+03A1 Rho
+!D3 U+03A3 Sigma
+!D4 U+03A4 Tau
+!D5 U+03A5 Upsilon
+!D6 U+03A6 Phi
+!D7 U+03A7 Chi
+!D8 U+03A8 Psi
+!D9 U+03A9 Omega
+!DA U+03AA Iotadieresis
+!DB U+03AB Upsilondieresis
+!DC U+03AC alphatonos
+!DD U+03AD epsilontonos
+!DE U+03AE etatonos
+!DF U+03AF iotatonos
+!E0 U+03B0 upsilondieresistonos
+!E1 U+03B1 alpha
+!E2 U+03B2 beta
+!E3 U+03B3 gamma
+!E4 U+03B4 delta
+!E5 U+03B5 epsilon
+!E6 U+03B6 zeta
+!E7 U+03B7 eta
+!E8 U+03B8 theta
+!E9 U+03B9 iota
+!EA U+03BA kappa
+!EB U+03BB lambda
+!EC U+03BC mu
+!ED U+03BD nu
+!EE U+03BE xi
+!EF U+03BF omicron
+!F0 U+03C0 pi
+!F1 U+03C1 rho
+!F2 U+03C2 sigma1
+!F3 U+03C3 sigma
+!F4 U+03C4 tau
+!F5 U+03C5 upsilon
+!F6 U+03C6 phi
+!F7 U+03C7 chi
+!F8 U+03C8 psi
+!F9 U+03C9 omega
+!FA U+03CA iotadieresis
+!FB U+03CB upsilondieresis
+!FC U+03CC omicrontonos
+!FD U+03CD upsilontonos
+!FE U+03CE omegatonos
diff --git a/includes/fpdf/font/makefont/iso-8859-9.map b/includes/fpdf/font/makefont/iso-8859-9.map
new file mode 100755
index 00000000..48c123ae
--- /dev/null
+++ b/includes/fpdf/font/makefont/iso-8859-9.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+0080 .notdef
+!81 U+0081 .notdef
+!82 U+0082 .notdef
+!83 U+0083 .notdef
+!84 U+0084 .notdef
+!85 U+0085 .notdef
+!86 U+0086 .notdef
+!87 U+0087 .notdef
+!88 U+0088 .notdef
+!89 U+0089 .notdef
+!8A U+008A .notdef
+!8B U+008B .notdef
+!8C U+008C .notdef
+!8D U+008D .notdef
+!8E U+008E .notdef
+!8F U+008F .notdef
+!90 U+0090 .notdef
+!91 U+0091 .notdef
+!92 U+0092 .notdef
+!93 U+0093 .notdef
+!94 U+0094 .notdef
+!95 U+0095 .notdef
+!96 U+0096 .notdef
+!97 U+0097 .notdef
+!98 U+0098 .notdef
+!99 U+0099 .notdef
+!9A U+009A .notdef
+!9B U+009B .notdef
+!9C U+009C .notdef
+!9D U+009D .notdef
+!9E U+009E .notdef
+!9F U+009F .notdef
+!A0 U+00A0 space
+!A1 U+00A1 exclamdown
+!A2 U+00A2 cent
+!A3 U+00A3 sterling
+!A4 U+00A4 currency
+!A5 U+00A5 yen
+!A6 U+00A6 brokenbar
+!A7 U+00A7 section
+!A8 U+00A8 dieresis
+!A9 U+00A9 copyright
+!AA U+00AA ordfeminine
+!AB U+00AB guillemotleft
+!AC U+00AC logicalnot
+!AD U+00AD hyphen
+!AE U+00AE registered
+!AF U+00AF macron
+!B0 U+00B0 degree
+!B1 U+00B1 plusminus
+!B2 U+00B2 twosuperior
+!B3 U+00B3 threesuperior
+!B4 U+00B4 acute
+!B5 U+00B5 mu
+!B6 U+00B6 paragraph
+!B7 U+00B7 periodcentered
+!B8 U+00B8 cedilla
+!B9 U+00B9 onesuperior
+!BA U+00BA ordmasculine
+!BB U+00BB guillemotright
+!BC U+00BC onequarter
+!BD U+00BD onehalf
+!BE U+00BE threequarters
+!BF U+00BF questiondown
+!C0 U+00C0 Agrave
+!C1 U+00C1 Aacute
+!C2 U+00C2 Acircumflex
+!C3 U+00C3 Atilde
+!C4 U+00C4 Adieresis
+!C5 U+00C5 Aring
+!C6 U+00C6 AE
+!C7 U+00C7 Ccedilla
+!C8 U+00C8 Egrave
+!C9 U+00C9 Eacute
+!CA U+00CA Ecircumflex
+!CB U+00CB Edieresis
+!CC U+00CC Igrave
+!CD U+00CD Iacute
+!CE U+00CE Icircumflex
+!CF U+00CF Idieresis
+!D0 U+011E Gbreve
+!D1 U+00D1 Ntilde
+!D2 U+00D2 Ograve
+!D3 U+00D3 Oacute
+!D4 U+00D4 Ocircumflex
+!D5 U+00D5 Otilde
+!D6 U+00D6 Odieresis
+!D7 U+00D7 multiply
+!D8 U+00D8 Oslash
+!D9 U+00D9 Ugrave
+!DA U+00DA Uacute
+!DB U+00DB Ucircumflex
+!DC U+00DC Udieresis
+!DD U+0130 Idotaccent
+!DE U+015E Scedilla
+!DF U+00DF germandbls
+!E0 U+00E0 agrave
+!E1 U+00E1 aacute
+!E2 U+00E2 acircumflex
+!E3 U+00E3 atilde
+!E4 U+00E4 adieresis
+!E5 U+00E5 aring
+!E6 U+00E6 ae
+!E7 U+00E7 ccedilla
+!E8 U+00E8 egrave
+!E9 U+00E9 eacute
+!EA U+00EA ecircumflex
+!EB U+00EB edieresis
+!EC U+00EC igrave
+!ED U+00ED iacute
+!EE U+00EE icircumflex
+!EF U+00EF idieresis
+!F0 U+011F gbreve
+!F1 U+00F1 ntilde
+!F2 U+00F2 ograve
+!F3 U+00F3 oacute
+!F4 U+00F4 ocircumflex
+!F5 U+00F5 otilde
+!F6 U+00F6 odieresis
+!F7 U+00F7 divide
+!F8 U+00F8 oslash
+!F9 U+00F9 ugrave
+!FA U+00FA uacute
+!FB U+00FB ucircumflex
+!FC U+00FC udieresis
+!FD U+0131 dotlessi
+!FE U+015F scedilla
+!FF U+00FF ydieresis
diff --git a/includes/fpdf/font/makefont/koi8-r.map b/includes/fpdf/font/makefont/koi8-r.map
new file mode 100755
index 00000000..6ad5d05d
--- /dev/null
+++ b/includes/fpdf/font/makefont/koi8-r.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+2500 SF100000
+!81 U+2502 SF110000
+!82 U+250C SF010000
+!83 U+2510 SF030000
+!84 U+2514 SF020000
+!85 U+2518 SF040000
+!86 U+251C SF080000
+!87 U+2524 SF090000
+!88 U+252C SF060000
+!89 U+2534 SF070000
+!8A U+253C SF050000
+!8B U+2580 upblock
+!8C U+2584 dnblock
+!8D U+2588 block
+!8E U+258C lfblock
+!8F U+2590 rtblock
+!90 U+2591 ltshade
+!91 U+2592 shade
+!92 U+2593 dkshade
+!93 U+2320 integraltp
+!94 U+25A0 filledbox
+!95 U+2219 periodcentered
+!96 U+221A radical
+!97 U+2248 approxequal
+!98 U+2264 lessequal
+!99 U+2265 greaterequal
+!9A U+00A0 space
+!9B U+2321 integralbt
+!9C U+00B0 degree
+!9D U+00B2 twosuperior
+!9E U+00B7 periodcentered
+!9F U+00F7 divide
+!A0 U+2550 SF430000
+!A1 U+2551 SF240000
+!A2 U+2552 SF510000
+!A3 U+0451 afii10071
+!A4 U+2553 SF520000
+!A5 U+2554 SF390000
+!A6 U+2555 SF220000
+!A7 U+2556 SF210000
+!A8 U+2557 SF250000
+!A9 U+2558 SF500000
+!AA U+2559 SF490000
+!AB U+255A SF380000
+!AC U+255B SF280000
+!AD U+255C SF270000
+!AE U+255D SF260000
+!AF U+255E SF360000
+!B0 U+255F SF370000
+!B1 U+2560 SF420000
+!B2 U+2561 SF190000
+!B3 U+0401 afii10023
+!B4 U+2562 SF200000
+!B5 U+2563 SF230000
+!B6 U+2564 SF470000
+!B7 U+2565 SF480000
+!B8 U+2566 SF410000
+!B9 U+2567 SF450000
+!BA U+2568 SF460000
+!BB U+2569 SF400000
+!BC U+256A SF540000
+!BD U+256B SF530000
+!BE U+256C SF440000
+!BF U+00A9 copyright
+!C0 U+044E afii10096
+!C1 U+0430 afii10065
+!C2 U+0431 afii10066
+!C3 U+0446 afii10088
+!C4 U+0434 afii10069
+!C5 U+0435 afii10070
+!C6 U+0444 afii10086
+!C7 U+0433 afii10068
+!C8 U+0445 afii10087
+!C9 U+0438 afii10074
+!CA U+0439 afii10075
+!CB U+043A afii10076
+!CC U+043B afii10077
+!CD U+043C afii10078
+!CE U+043D afii10079
+!CF U+043E afii10080
+!D0 U+043F afii10081
+!D1 U+044F afii10097
+!D2 U+0440 afii10082
+!D3 U+0441 afii10083
+!D4 U+0442 afii10084
+!D5 U+0443 afii10085
+!D6 U+0436 afii10072
+!D7 U+0432 afii10067
+!D8 U+044C afii10094
+!D9 U+044B afii10093
+!DA U+0437 afii10073
+!DB U+0448 afii10090
+!DC U+044D afii10095
+!DD U+0449 afii10091
+!DE U+0447 afii10089
+!DF U+044A afii10092
+!E0 U+042E afii10048
+!E1 U+0410 afii10017
+!E2 U+0411 afii10018
+!E3 U+0426 afii10040
+!E4 U+0414 afii10021
+!E5 U+0415 afii10022
+!E6 U+0424 afii10038
+!E7 U+0413 afii10020
+!E8 U+0425 afii10039
+!E9 U+0418 afii10026
+!EA U+0419 afii10027
+!EB U+041A afii10028
+!EC U+041B afii10029
+!ED U+041C afii10030
+!EE U+041D afii10031
+!EF U+041E afii10032
+!F0 U+041F afii10033
+!F1 U+042F afii10049
+!F2 U+0420 afii10034
+!F3 U+0421 afii10035
+!F4 U+0422 afii10036
+!F5 U+0423 afii10037
+!F6 U+0416 afii10024
+!F7 U+0412 afii10019
+!F8 U+042C afii10046
+!F9 U+042B afii10045
+!FA U+0417 afii10025
+!FB U+0428 afii10042
+!FC U+042D afii10047
+!FD U+0429 afii10043
+!FE U+0427 afii10041
+!FF U+042A afii10044
diff --git a/includes/fpdf/font/makefont/koi8-u.map b/includes/fpdf/font/makefont/koi8-u.map
new file mode 100755
index 00000000..40a7e4fd
--- /dev/null
+++ b/includes/fpdf/font/makefont/koi8-u.map
@@ -0,0 +1,256 @@
+!00 U+0000 .notdef
+!01 U+0001 .notdef
+!02 U+0002 .notdef
+!03 U+0003 .notdef
+!04 U+0004 .notdef
+!05 U+0005 .notdef
+!06 U+0006 .notdef
+!07 U+0007 .notdef
+!08 U+0008 .notdef
+!09 U+0009 .notdef
+!0A U+000A .notdef
+!0B U+000B .notdef
+!0C U+000C .notdef
+!0D U+000D .notdef
+!0E U+000E .notdef
+!0F U+000F .notdef
+!10 U+0010 .notdef
+!11 U+0011 .notdef
+!12 U+0012 .notdef
+!13 U+0013 .notdef
+!14 U+0014 .notdef
+!15 U+0015 .notdef
+!16 U+0016 .notdef
+!17 U+0017 .notdef
+!18 U+0018 .notdef
+!19 U+0019 .notdef
+!1A U+001A .notdef
+!1B U+001B .notdef
+!1C U+001C .notdef
+!1D U+001D .notdef
+!1E U+001E .notdef
+!1F U+001F .notdef
+!20 U+0020 space
+!21 U+0021 exclam
+!22 U+0022 quotedbl
+!23 U+0023 numbersign
+!24 U+0024 dollar
+!25 U+0025 percent
+!26 U+0026 ampersand
+!27 U+0027 quotesingle
+!28 U+0028 parenleft
+!29 U+0029 parenright
+!2A U+002A asterisk
+!2B U+002B plus
+!2C U+002C comma
+!2D U+002D hyphen
+!2E U+002E period
+!2F U+002F slash
+!30 U+0030 zero
+!31 U+0031 one
+!32 U+0032 two
+!33 U+0033 three
+!34 U+0034 four
+!35 U+0035 five
+!36 U+0036 six
+!37 U+0037 seven
+!38 U+0038 eight
+!39 U+0039 nine
+!3A U+003A colon
+!3B U+003B semicolon
+!3C U+003C less
+!3D U+003D equal
+!3E U+003E greater
+!3F U+003F question
+!40 U+0040 at
+!41 U+0041 A
+!42 U+0042 B
+!43 U+0043 C
+!44 U+0044 D
+!45 U+0045 E
+!46 U+0046 F
+!47 U+0047 G
+!48 U+0048 H
+!49 U+0049 I
+!4A U+004A J
+!4B U+004B K
+!4C U+004C L
+!4D U+004D M
+!4E U+004E N
+!4F U+004F O
+!50 U+0050 P
+!51 U+0051 Q
+!52 U+0052 R
+!53 U+0053 S
+!54 U+0054 T
+!55 U+0055 U
+!56 U+0056 V
+!57 U+0057 W
+!58 U+0058 X
+!59 U+0059 Y
+!5A U+005A Z
+!5B U+005B bracketleft
+!5C U+005C backslash
+!5D U+005D bracketright
+!5E U+005E asciicircum
+!5F U+005F underscore
+!60 U+0060 grave
+!61 U+0061 a
+!62 U+0062 b
+!63 U+0063 c
+!64 U+0064 d
+!65 U+0065 e
+!66 U+0066 f
+!67 U+0067 g
+!68 U+0068 h
+!69 U+0069 i
+!6A U+006A j
+!6B U+006B k
+!6C U+006C l
+!6D U+006D m
+!6E U+006E n
+!6F U+006F o
+!70 U+0070 p
+!71 U+0071 q
+!72 U+0072 r
+!73 U+0073 s
+!74 U+0074 t
+!75 U+0075 u
+!76 U+0076 v
+!77 U+0077 w
+!78 U+0078 x
+!79 U+0079 y
+!7A U+007A z
+!7B U+007B braceleft
+!7C U+007C bar
+!7D U+007D braceright
+!7E U+007E asciitilde
+!7F U+007F .notdef
+!80 U+2500 SF100000
+!81 U+2502 SF110000
+!82 U+250C SF010000
+!83 U+2510 SF030000
+!84 U+2514 SF020000
+!85 U+2518 SF040000
+!86 U+251C SF080000
+!87 U+2524 SF090000
+!88 U+252C SF060000
+!89 U+2534 SF070000
+!8A U+253C SF050000
+!8B U+2580 upblock
+!8C U+2584 dnblock
+!8D U+2588 block
+!8E U+258C lfblock
+!8F U+2590 rtblock
+!90 U+2591 ltshade
+!91 U+2592 shade
+!92 U+2593 dkshade
+!93 U+2320 integraltp
+!94 U+25A0 filledbox
+!95 U+2022 bullet
+!96 U+221A radical
+!97 U+2248 approxequal
+!98 U+2264 lessequal
+!99 U+2265 greaterequal
+!9A U+00A0 space
+!9B U+2321 integralbt
+!9C U+00B0 degree
+!9D U+00B2 twosuperior
+!9E U+00B7 periodcentered
+!9F U+00F7 divide
+!A0 U+2550 SF430000
+!A1 U+2551 SF240000
+!A2 U+2552 SF510000
+!A3 U+0451 afii10071
+!A4 U+0454 afii10101
+!A5 U+2554 SF390000
+!A6 U+0456 afii10103
+!A7 U+0457 afii10104
+!A8 U+2557 SF250000
+!A9 U+2558 SF500000
+!AA U+2559 SF490000
+!AB U+255A SF380000
+!AC U+255B SF280000
+!AD U+0491 afii10098
+!AE U+255D SF260000
+!AF U+255E SF360000
+!B0 U+255F SF370000
+!B1 U+2560 SF420000
+!B2 U+2561 SF190000
+!B3 U+0401 afii10023
+!B4 U+0404 afii10053
+!B5 U+2563 SF230000
+!B6 U+0406 afii10055
+!B7 U+0407 afii10056
+!B8 U+2566 SF410000
+!B9 U+2567 SF450000
+!BA U+2568 SF460000
+!BB U+2569 SF400000
+!BC U+256A SF540000
+!BD U+0490 afii10050
+!BE U+256C SF440000
+!BF U+00A9 copyright
+!C0 U+044E afii10096
+!C1 U+0430 afii10065
+!C2 U+0431 afii10066
+!C3 U+0446 afii10088
+!C4 U+0434 afii10069
+!C5 U+0435 afii10070
+!C6 U+0444 afii10086
+!C7 U+0433 afii10068
+!C8 U+0445 afii10087
+!C9 U+0438 afii10074
+!CA U+0439 afii10075
+!CB U+043A afii10076
+!CC U+043B afii10077
+!CD U+043C afii10078
+!CE U+043D afii10079
+!CF U+043E afii10080
+!D0 U+043F afii10081
+!D1 U+044F afii10097
+!D2 U+0440 afii10082
+!D3 U+0441 afii10083
+!D4 U+0442 afii10084
+!D5 U+0443 afii10085
+!D6 U+0436 afii10072
+!D7 U+0432 afii10067
+!D8 U+044C afii10094
+!D9 U+044B afii10093
+!DA U+0437 afii10073
+!DB U+0448 afii10090
+!DC U+044D afii10095
+!DD U+0449 afii10091
+!DE U+0447 afii10089
+!DF U+044A afii10092
+!E0 U+042E afii10048
+!E1 U+0410 afii10017
+!E2 U+0411 afii10018
+!E3 U+0426 afii10040
+!E4 U+0414 afii10021
+!E5 U+0415 afii10022
+!E6 U+0424 afii10038
+!E7 U+0413 afii10020
+!E8 U+0425 afii10039
+!E9 U+0418 afii10026
+!EA U+0419 afii10027
+!EB U+041A afii10028
+!EC U+041B afii10029
+!ED U+041C afii10030
+!EE U+041D afii10031
+!EF U+041E afii10032
+!F0 U+041F afii10033
+!F1 U+042F afii10049
+!F2 U+0420 afii10034
+!F3 U+0421 afii10035
+!F4 U+0422 afii10036
+!F5 U+0423 afii10037
+!F6 U+0416 afii10024
+!F7 U+0412 afii10019
+!F8 U+042C afii10046
+!F9 U+042B afii10045
+!FA U+0417 afii10025
+!FB U+0428 afii10042
+!FC U+042D afii10047
+!FD U+0429 afii10043
+!FE U+0427 afii10041
+!FF U+042A afii10044
diff --git a/includes/fpdf/font/makefont/makefont.php b/includes/fpdf/font/makefont/makefont.php
new file mode 100755
index 00000000..7e7ed564
--- /dev/null
+++ b/includes/fpdf/font/makefont/makefont.php
@@ -0,0 +1,419 @@
+Error: encoding not found: '.$enc);
+ $cc2gn=array();
+ foreach($a as $l)
+ {
+ if($l[0]=='!')
+ {
+ $e=preg_split('/[ \\t]+/',rtrim($l));
+ $cc=hexdec(substr($e[0],1));
+ $gn=$e[2];
+ $cc2gn[$cc]=$gn;
+ }
+ }
+ for($i=0;$i<=255;$i++)
+ {
+ if(!isset($cc2gn[$i]))
+ $cc2gn[$i]='.notdef';
+ }
+ return $cc2gn;
+}
+
+function ReadAFM($file, &$map)
+{
+ //Read a font metric file
+ $a=file($file);
+ if(empty($a))
+ die('File not found');
+ $widths=array();
+ $fm=array();
+ $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
+ 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
+ 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
+ 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
+ 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
+ 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
+ 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
+ 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
+ foreach($a as $l)
+ {
+ $e=explode(' ',rtrim($l));
+ if(count($e)<2)
+ continue;
+ $code=$e[0];
+ $param=$e[1];
+ if($code=='C')
+ {
+ //Character metrics
+ $cc=(int)$e[1];
+ $w=$e[4];
+ $gn=$e[7];
+ if(substr($gn,-4)=='20AC')
+ $gn='Euro';
+ if(isset($fix[$gn]))
+ {
+ //Fix incorrect glyph name
+ foreach($map as $c=>$n)
+ {
+ if($n==$fix[$gn])
+ $map[$c]=$gn;
+ }
+ }
+ if(empty($map))
+ {
+ //Symbolic font: use built-in encoding
+ $widths[$cc]=$w;
+ }
+ else
+ {
+ $widths[$gn]=$w;
+ if($gn=='X')
+ $fm['CapXHeight']=$e[13];
+ }
+ if($gn=='.notdef')
+ $fm['MissingWidth']=$w;
+ }
+ elseif($code=='FontName')
+ $fm['FontName']=$param;
+ elseif($code=='Weight')
+ $fm['Weight']=$param;
+ elseif($code=='ItalicAngle')
+ $fm['ItalicAngle']=(double)$param;
+ elseif($code=='Ascender')
+ $fm['Ascender']=(int)$param;
+ elseif($code=='Descender')
+ $fm['Descender']=(int)$param;
+ elseif($code=='UnderlineThickness')
+ $fm['UnderlineThickness']=(int)$param;
+ elseif($code=='UnderlinePosition')
+ $fm['UnderlinePosition']=(int)$param;
+ elseif($code=='IsFixedPitch')
+ $fm['IsFixedPitch']=($param=='true');
+ elseif($code=='FontBBox')
+ $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
+ elseif($code=='CapHeight')
+ $fm['CapHeight']=(int)$param;
+ elseif($code=='StdVW')
+ $fm['StdVW']=(int)$param;
+ }
+ if(!isset($fm['FontName']))
+ die('FontName not found');
+ if(!empty($map))
+ {
+ if(!isset($widths['.notdef']))
+ $widths['.notdef']=600;
+ if(!isset($widths['Delta']) && isset($widths['increment']))
+ $widths['Delta']=$widths['increment'];
+ //Order widths according to map
+ for($i=0;$i<=255;$i++)
+ {
+ if(!isset($widths[$map[$i]]))
+ {
+ echo 'Warning: character '.$map[$i].' is missing ';
+ $widths[$i]=$widths['.notdef'];
+ }
+ else
+ $widths[$i]=$widths[$map[$i]];
+ }
+ }
+ $fm['Widths']=$widths;
+ return $fm;
+}
+
+function MakeFontDescriptor($fm, $symbolic)
+{
+ //Ascent
+ $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
+ $fd="array('Ascent'=>".$asc;
+ //Descent
+ $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
+ $fd.=",'Descent'=>".$desc;
+ //CapHeight
+ if(isset($fm['CapHeight']))
+ $ch=$fm['CapHeight'];
+ elseif(isset($fm['CapXHeight']))
+ $ch=$fm['CapXHeight'];
+ else
+ $ch=$asc;
+ $fd.=",'CapHeight'=>".$ch;
+ //Flags
+ $flags=0;
+ if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch'])
+ $flags+=1<<0;
+ if($symbolic)
+ $flags+=1<<2;
+ if(!$symbolic)
+ $flags+=1<<5;
+ if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0)
+ $flags+=1<<6;
+ $fd.=",'Flags'=>".$flags;
+ //FontBBox
+ if(isset($fm['FontBBox']))
+ $fbb=$fm['FontBBox'];
+ else
+ $fbb=array(0,$desc-100,1000,$asc+100);
+ $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
+ //ItalicAngle
+ $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
+ $fd.=",'ItalicAngle'=>".$ia;
+ //StemV
+ if(isset($fm['StdVW']))
+ $stemv=$fm['StdVW'];
+ elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight']))
+ $stemv=120;
+ else
+ $stemv=70;
+ $fd.=",'StemV'=>".$stemv;
+ //MissingWidth
+ if(isset($fm['MissingWidth']))
+ $fd.=",'MissingWidth'=>".$fm['MissingWidth'];
+ $fd.=')';
+ return $fd;
+}
+
+function MakeWidthArray($fm)
+{
+ //Make character width array
+ $s="array(\n\t";
+ $cw=$fm['Widths'];
+ for($i=0;$i<=255;$i++)
+ {
+ if(chr($i)=="'")
+ $s.="'\\''";
+ elseif(chr($i)=="\\")
+ $s.="'\\\\'";
+ elseif($i>=32 && $i<=126)
+ $s.="'".chr($i)."'";
+ else
+ $s.="chr($i)";
+ $s.='=>'.$fm['Widths'][$i];
+ if($i<255)
+ $s.=',';
+ if(($i+1)%22==0)
+ $s.="\n\t";
+ }
+ $s.=')';
+ return $s;
+}
+
+function MakeFontEncoding($map)
+{
+ //Build differences from reference encoding
+ $ref=ReadMap('cp1252');
+ $s='';
+ $last=0;
+ for($i=32;$i<=255;$i++)
+ {
+ if($map[$i]!=$ref[$i])
+ {
+ if($i!=$last+1)
+ $s.=$i.' ';
+ $last=$i;
+ $s.='/'.$map[$i].' ';
+ }
+ }
+ return rtrim($s);
+}
+
+function SaveToFile($file, $s, $mode)
+{
+ $f=fopen($file,'w'.$mode);
+ if(!$f)
+ die('Can\'t write to file '.$file);
+ fwrite($f,$s,strlen($s));
+ fclose($f);
+}
+
+function ReadShort($f)
+{
+ $a=unpack('n1n',fread($f,2));
+ return $a['n'];
+}
+
+function ReadLong($f)
+{
+ $a=unpack('N1N',fread($f,4));
+ return $a['N'];
+}
+
+function CheckTTF($file)
+{
+ //Check if font license allows embedding
+ $f=fopen($file,'rb');
+ if(!$f)
+ die('Error: Can\'t open '.$file);
+ //Extract number of tables
+ fseek($f,4,SEEK_CUR);
+ $nb=ReadShort($f);
+ fseek($f,6,SEEK_CUR);
+ //Seek OS/2 table
+ $found=false;
+ for($i=0;$i<$nb;$i++)
+ {
+ if(fread($f,4)=='OS/2')
+ {
+ $found=true;
+ break;
+ }
+ fseek($f,12,SEEK_CUR);
+ }
+ if(!$found)
+ {
+ fclose($f);
+ return;
+ }
+ fseek($f,4,SEEK_CUR);
+ $offset=ReadLong($f);
+ fseek($f,$offset,SEEK_SET);
+ //Extract fsType flags
+ fseek($f,8,SEEK_CUR);
+ $fsType=ReadShort($f);
+ $rl=($fsType & 0x02)!=0;
+ $pp=($fsType & 0x04)!=0;
+ $e=($fsType & 0x08)!=0;
+ fclose($f);
+ if($rl && !$pp && !$e)
+ echo 'Warning: font license does not allow embedding';
+}
+
+/*******************************************************************************
+* fontfile: path to TTF file (or empty string if not to be embedded) *
+* afmfile: path to AFM file *
+* enc: font encoding (or empty string for symbolic fonts) *
+* patch: optional patch for encoding *
+* type: font type if fontfile is empty *
+*******************************************************************************/
+function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType')
+{
+ //Generate a font definition file
+ if(get_magic_quotes_runtime())
+ @set_magic_quotes_runtime(0);
+ ini_set('auto_detect_line_endings','1');
+ if($enc)
+ {
+ $map=ReadMap($enc);
+ foreach($patch as $cc=>$gn)
+ $map[$cc]=$gn;
+ }
+ else
+ $map=array();
+ if(!file_exists($afmfile))
+ die('Error: AFM file not found: '.$afmfile);
+ $fm=ReadAFM($afmfile,$map);
+ if($enc)
+ $diff=MakeFontEncoding($map);
+ else
+ $diff='';
+ $fd=MakeFontDescriptor($fm,empty($map));
+ //Find font type
+ if($fontfile)
+ {
+ $ext=strtolower(substr($fontfile,-3));
+ if($ext=='ttf')
+ $type='TrueType';
+ elseif($ext=='pfb')
+ $type='Type1';
+ else
+ die('Error: unrecognized font file extension: '.$ext);
+ }
+ else
+ {
+ if($type!='TrueType' && $type!='Type1')
+ die('Error: incorrect font type: '.$type);
+ }
+ //Start generation
+ $s='Error: font file not found: '.$fontfile);
+ if($type=='TrueType')
+ CheckTTF($fontfile);
+ $f=fopen($fontfile,'rb');
+ if(!$f)
+ die('Error: Can\'t open '.$fontfile);
+ $file=fread($f,filesize($fontfile));
+ fclose($f);
+ if($type=='Type1')
+ {
+ //Find first two sections and discard third one
+ $header=(ord($file[0])==128);
+ if($header)
+ {
+ //Strip first binary header
+ $file=substr($file,6);
+ }
+ $pos=strpos($file,'eexec');
+ if(!$pos)
+ die('Error: font file does not seem to be valid Type1');
+ $size1=$pos+6;
+ if($header && ord($file[$size1])==128)
+ {
+ //Strip second binary header
+ $file=substr($file,0,$size1).substr($file,$size1+6);
+ }
+ $pos=strpos($file,'00000000');
+ if(!$pos)
+ die('Error: font file does not seem to be valid Type1');
+ $size2=$pos-$size1;
+ $file=substr($file,0,$size1+$size2);
+ }
+ if(function_exists('gzcompress'))
+ {
+ $cmp=$basename.'.z';
+ SaveToFile($cmp,gzcompress($file),'b');
+ $s.='$file=\''.$cmp."';\n";
+ echo 'Font file compressed ('.$cmp.') ';
+ }
+ else
+ {
+ $s.='$file=\''.basename($fontfile)."';\n";
+ echo 'Notice: font file could not be compressed (zlib extension not available) ';
+ }
+ if($type=='Type1')
+ {
+ $s.='$size1='.$size1.";\n";
+ $s.='$size2='.$size2.";\n";
+ }
+ else
+ $s.='$originalsize='.filesize($fontfile).";\n";
+ }
+ else
+ {
+ //Not embedded font
+ $s.='$file='."'';\n";
+ }
+ $s.="?>\n";
+ SaveToFile($basename.'.php',$s,'t');
+ echo 'Font definition file generated ('.$basename.'.php'.') ';
+}
+?>
diff --git a/includes/fpdf/font/symbol.php b/includes/fpdf/font/symbol.php
new file mode 100755
index 00000000..43b50e45
--- /dev/null
+++ b/includes/fpdf/font/symbol.php
@@ -0,0 +1,15 @@
+250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
+ chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
+ ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
+ 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
+ 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
+ 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
+ chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
+ chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
+ chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
+ chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
+ chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
+ chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
+?>
diff --git a/includes/fpdf/font/times.php b/includes/fpdf/font/times.php
new file mode 100755
index 00000000..837c706e
--- /dev/null
+++ b/includes/fpdf/font/times.php
@@ -0,0 +1,15 @@
+250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
+ chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
+ ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
+ 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
+ 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
+ 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
+ chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
+ chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
+ chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
+ chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
+ chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
+?>
diff --git a/includes/fpdf/font/timesb.php b/includes/fpdf/font/timesb.php
new file mode 100755
index 00000000..09cff86a
--- /dev/null
+++ b/includes/fpdf/font/timesb.php
@@ -0,0 +1,15 @@
+250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
+ chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
+ ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
+ 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
+ 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
+ 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
+ chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
+ chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
+ chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
+ chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
+?>
diff --git a/includes/fpdf/font/timesbi.php b/includes/fpdf/font/timesbi.php
new file mode 100755
index 00000000..b4e38d76
--- /dev/null
+++ b/includes/fpdf/font/timesbi.php
@@ -0,0 +1,15 @@
+250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
+ chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
+ ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
+ 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
+ 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
+ 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
+ chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
+ chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
+ chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
+ chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
+ chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
+?>
diff --git a/includes/fpdf/font/timesi.php b/includes/fpdf/font/timesi.php
new file mode 100755
index 00000000..0ba2b777
--- /dev/null
+++ b/includes/fpdf/font/timesi.php
@@ -0,0 +1,15 @@
+250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
+ chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
+ ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
+ 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
+ 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
+ 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
+ chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
+ chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
+ chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
+ chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
+ chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
+ chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
+?>
diff --git a/includes/fpdf/font/zapfdingbats.php b/includes/fpdf/font/zapfdingbats.php
new file mode 100755
index 00000000..1f926a8c
--- /dev/null
+++ b/includes/fpdf/font/zapfdingbats.php
@@ -0,0 +1,15 @@
+0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
+ chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
+ ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
+ 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
+ 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
+ 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
+ chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
+ chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
+ chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
+ chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
+ chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
+ chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
+?>
diff --git a/includes/fpdf/fpdf.php b/includes/fpdf/fpdf.php
new file mode 100755
index 00000000..b27ca6df
--- /dev/null
+++ b/includes/fpdf/fpdf.php
@@ -0,0 +1,1732 @@
+_dochecks();
+ //Initialization of properties
+ $this->page=0;
+ $this->n=2;
+ $this->buffer='';
+ $this->pages=array();
+ $this->PageSizes=array();
+ $this->state=0;
+ $this->fonts=array();
+ $this->FontFiles=array();
+ $this->diffs=array();
+ $this->images=array();
+ $this->links=array();
+ $this->InHeader=false;
+ $this->InFooter=false;
+ $this->lasth=0;
+ $this->FontFamily='';
+ $this->FontStyle='';
+ $this->FontSizePt=12;
+ $this->underline=false;
+ $this->DrawColor='0 G';
+ $this->FillColor='0 g';
+ $this->TextColor='0 g';
+ $this->ColorFlag=false;
+ $this->ws=0;
+ //Standard fonts
+ $this->CoreFonts=array('courier'=>'Courier', 'courierB'=>'Courier-Bold', 'courierI'=>'Courier-Oblique', 'courierBI'=>'Courier-BoldOblique',
+ 'helvetica'=>'Helvetica', 'helveticaB'=>'Helvetica-Bold', 'helveticaI'=>'Helvetica-Oblique', 'helveticaBI'=>'Helvetica-BoldOblique',
+ 'times'=>'Times-Roman', 'timesB'=>'Times-Bold', 'timesI'=>'Times-Italic', 'timesBI'=>'Times-BoldItalic',
+ 'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats');
+ //Scale factor
+ if($unit=='pt')
+ $this->k=1;
+ elseif($unit=='mm')
+ $this->k=72/25.4;
+ elseif($unit=='cm')
+ $this->k=72/2.54;
+ elseif($unit=='in')
+ $this->k=72;
+ else
+ $this->Error('Incorrect unit: '.$unit);
+ //Page format
+ $this->PageFormats=array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28),
+ 'letter'=>array(612,792), 'legal'=>array(612,1008));
+ if(is_string($format))
+ $format=$this->_getpageformat($format);
+ $this->DefPageFormat=$format;
+ $this->CurPageFormat=$format;
+ //Page orientation
+ $orientation=strtolower($orientation);
+ if($orientation=='p' || $orientation=='portrait')
+ {
+ $this->DefOrientation='P';
+ $this->w=$this->DefPageFormat[0];
+ $this->h=$this->DefPageFormat[1];
+ }
+ elseif($orientation=='l' || $orientation=='landscape')
+ {
+ $this->DefOrientation='L';
+ $this->w=$this->DefPageFormat[1];
+ $this->h=$this->DefPageFormat[0];
+ }
+ else
+ $this->Error('Incorrect orientation: '.$orientation);
+ $this->CurOrientation=$this->DefOrientation;
+ $this->wPt=$this->w*$this->k;
+ $this->hPt=$this->h*$this->k;
+ //Page margins (1 cm)
+ $margin=28.35/$this->k;
+ $this->SetMargins($margin,$margin);
+ //Interior cell margin (1 mm)
+ $this->cMargin=$margin/10;
+ //Line width (0.2 mm)
+ $this->LineWidth=.567/$this->k;
+ //Automatic page break
+ $this->SetAutoPageBreak(true,2*$margin);
+ //Full width display mode
+ $this->SetDisplayMode('fullwidth');
+ //Enable compression
+ $this->SetCompression(true);
+ //Set default PDF version number
+ $this->PDFVersion='1.3';
+}
+
+function SetMargins($left, $top, $right=null)
+{
+ //Set left, top and right margins
+ $this->lMargin=$left;
+ $this->tMargin=$top;
+ if($right===null)
+ $right=$left;
+ $this->rMargin=$right;
+}
+
+function SetLeftMargin($margin)
+{
+ //Set left margin
+ $this->lMargin=$margin;
+ if($this->page>0 && $this->x<$margin)
+ $this->x=$margin;
+}
+
+function SetTopMargin($margin)
+{
+ //Set top margin
+ $this->tMargin=$margin;
+}
+
+function SetRightMargin($margin)
+{
+ //Set right margin
+ $this->rMargin=$margin;
+}
+
+function SetAutoPageBreak($auto, $margin=0)
+{
+ //Set auto page break mode and triggering margin
+ $this->AutoPageBreak=$auto;
+ $this->bMargin=$margin;
+ $this->PageBreakTrigger=$this->h-$margin;
+}
+
+function SetDisplayMode($zoom, $layout='continuous')
+{
+ //Set display mode in viewer
+ if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom))
+ $this->ZoomMode=$zoom;
+ else
+ $this->Error('Incorrect zoom display mode: '.$zoom);
+ if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default')
+ $this->LayoutMode=$layout;
+ else
+ $this->Error('Incorrect layout display mode: '.$layout);
+}
+
+function SetCompression($compress)
+{
+ //Set page compression
+ if(function_exists('gzcompress'))
+ $this->compress=$compress;
+ else
+ $this->compress=false;
+}
+
+function SetTitle($title, $isUTF8=false)
+{
+ //Title of document
+ if($isUTF8)
+ $title=$this->_UTF8toUTF16($title);
+ $this->title=$title;
+}
+
+function SetSubject($subject, $isUTF8=false)
+{
+ //Subject of document
+ if($isUTF8)
+ $subject=$this->_UTF8toUTF16($subject);
+ $this->subject=$subject;
+}
+
+function SetAuthor($author, $isUTF8=false)
+{
+ //Author of document
+ if($isUTF8)
+ $author=$this->_UTF8toUTF16($author);
+ $this->author=$author;
+}
+
+function SetKeywords($keywords, $isUTF8=false)
+{
+ //Keywords of document
+ if($isUTF8)
+ $keywords=$this->_UTF8toUTF16($keywords);
+ $this->keywords=$keywords;
+}
+
+function SetCreator($creator, $isUTF8=false)
+{
+ //Creator of document
+ if($isUTF8)
+ $creator=$this->_UTF8toUTF16($creator);
+ $this->creator=$creator;
+}
+
+function AliasNbPages($alias='{nb}')
+{
+ //Define an alias for total number of pages
+ $this->AliasNbPages=$alias;
+}
+
+function Error($msg)
+{
+ //Fatal error
+ die('FPDF error: '.$msg);
+}
+
+function Open()
+{
+ //Begin document
+ $this->state=1;
+}
+
+function Close()
+{
+ //Terminate document
+ if($this->state==3)
+ return;
+ if($this->page==0)
+ $this->AddPage();
+ //Page footer
+ $this->InFooter=true;
+ $this->Footer();
+ $this->InFooter=false;
+ //Close page
+ $this->_endpage();
+ //Close document
+ $this->_enddoc();
+}
+
+function AddPage($orientation='', $format='')
+{
+ //Start a new page
+ if($this->state==0)
+ $this->Open();
+ $family=$this->FontFamily;
+ $style=$this->FontStyle.($this->underline ? 'U' : '');
+ $size=$this->FontSizePt;
+ $lw=$this->LineWidth;
+ $dc=$this->DrawColor;
+ $fc=$this->FillColor;
+ $tc=$this->TextColor;
+ $cf=$this->ColorFlag;
+ if($this->page>0)
+ {
+ //Page footer
+ $this->InFooter=true;
+ $this->Footer();
+ $this->InFooter=false;
+ //Close page
+ $this->_endpage();
+ }
+ //Start new page
+ $this->_beginpage($orientation,$format);
+ //Set line cap style to square
+ $this->_out('2 J');
+ //Set line width
+ $this->LineWidth=$lw;
+ $this->_out(sprintf('%.2F w',$lw*$this->k));
+ //Set font
+ if($family)
+ $this->SetFont($family,$style,$size);
+ //Set colors
+ $this->DrawColor=$dc;
+ if($dc!='0 G')
+ $this->_out($dc);
+ $this->FillColor=$fc;
+ if($fc!='0 g')
+ $this->_out($fc);
+ $this->TextColor=$tc;
+ $this->ColorFlag=$cf;
+ //Page header
+ $this->InHeader=true;
+ $this->Header();
+ $this->InHeader=false;
+ //Restore line width
+ if($this->LineWidth!=$lw)
+ {
+ $this->LineWidth=$lw;
+ $this->_out(sprintf('%.2F w',$lw*$this->k));
+ }
+ //Restore font
+ if($family)
+ $this->SetFont($family,$style,$size);
+ //Restore colors
+ if($this->DrawColor!=$dc)
+ {
+ $this->DrawColor=$dc;
+ $this->_out($dc);
+ }
+ if($this->FillColor!=$fc)
+ {
+ $this->FillColor=$fc;
+ $this->_out($fc);
+ }
+ $this->TextColor=$tc;
+ $this->ColorFlag=$cf;
+}
+
+function Header()
+{
+ //To be implemented in your own inherited class
+}
+
+function Footer()
+{
+ //To be implemented in your own inherited class
+}
+
+function PageNo()
+{
+ //Get current page number
+ return $this->page;
+}
+
+function SetDrawColor($r, $g=null, $b=null)
+{
+ //Set color for all stroking operations
+ if(($r==0 && $g==0 && $b==0) || $g===null)
+ $this->DrawColor=sprintf('%.3F G',$r/255);
+ else
+ $this->DrawColor=sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255);
+ if($this->page>0)
+ $this->_out($this->DrawColor);
+}
+
+function SetFillColor($r, $g=null, $b=null)
+{
+ //Set color for all filling operations
+ if(($r==0 && $g==0 && $b==0) || $g===null)
+ $this->FillColor=sprintf('%.3F g',$r/255);
+ else
+ $this->FillColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
+ $this->ColorFlag=($this->FillColor!=$this->TextColor);
+ if($this->page>0)
+ $this->_out($this->FillColor);
+}
+
+function SetTextColor($r, $g=null, $b=null)
+{
+ //Set color for text
+ if(($r==0 && $g==0 && $b==0) || $g===null)
+ $this->TextColor=sprintf('%.3F g',$r/255);
+ else
+ $this->TextColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
+ $this->ColorFlag=($this->FillColor!=$this->TextColor);
+}
+
+function GetStringWidth($s)
+{
+ //Get width of a string in the current font
+ $s=(string)$s;
+ $cw=&$this->CurrentFont['cw'];
+ $w=0;
+ $l=strlen($s);
+ for($i=0;$i<$l;$i++)
+ $w+=$cw[$s[$i]];
+ return $w*$this->FontSize/1000;
+}
+
+function SetLineWidth($width)
+{
+ //Set line width
+ $this->LineWidth=$width;
+ if($this->page>0)
+ $this->_out(sprintf('%.2F w',$width*$this->k));
+}
+
+function Line($x1, $y1, $x2, $y2)
+{
+ //Draw a line
+ $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
+}
+
+function Rect($x, $y, $w, $h, $style='')
+{
+ //Draw a rectangle
+ if($style=='F')
+ $op='f';
+ elseif($style=='FD' || $style=='DF')
+ $op='B';
+ else
+ $op='S';
+ $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op));
+}
+
+function AddFont($family, $style='', $file='')
+{
+ //Add a TrueType or Type1 font
+ $family=strtolower($family);
+ if($file=='')
+ $file=str_replace(' ','',$family).strtolower($style).'.php';
+ if($family=='arial')
+ $family='helvetica';
+ $style=strtoupper($style);
+ if($style=='IB')
+ $style='BI';
+ $fontkey=$family.$style;
+ if(isset($this->fonts[$fontkey]))
+ return;
+ include($this->_getfontpath().$file);
+ if(!isset($name))
+ $this->Error('Could not include font definition file');
+ $i=count($this->fonts)+1;
+ $this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file);
+ if($diff)
+ {
+ //Search existing encodings
+ $d=0;
+ $nb=count($this->diffs);
+ for($i=1;$i<=$nb;$i++)
+ {
+ if($this->diffs[$i]==$diff)
+ {
+ $d=$i;
+ break;
+ }
+ }
+ if($d==0)
+ {
+ $d=$nb+1;
+ $this->diffs[$d]=$diff;
+ }
+ $this->fonts[$fontkey]['diff']=$d;
+ }
+ if($file)
+ {
+ if($type=='TrueType')
+ $this->FontFiles[$file]=array('length1'=>$originalsize);
+ else
+ $this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2);
+ }
+}
+
+function SetFont($family, $style='', $size=0)
+{
+ //Select a font; size given in points
+ global $fpdf_charwidths;
+
+ $family=strtolower($family);
+ if($family=='')
+ $family=$this->FontFamily;
+ if($family=='arial')
+ $family='helvetica';
+ elseif($family=='symbol' || $family=='zapfdingbats')
+ $style='';
+ $style=strtoupper($style);
+ if(strpos($style,'U')!==false)
+ {
+ $this->underline=true;
+ $style=str_replace('U','',$style);
+ }
+ else
+ $this->underline=false;
+ if($style=='IB')
+ $style='BI';
+ if($size==0)
+ $size=$this->FontSizePt;
+ //Test if font is already selected
+ if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size)
+ return;
+ //Test if used for the first time
+ $fontkey=$family.$style;
+ if(!isset($this->fonts[$fontkey]))
+ {
+ //Check if one of the standard fonts
+ if(isset($this->CoreFonts[$fontkey]))
+ {
+ if(!isset($fpdf_charwidths[$fontkey]))
+ {
+ //Load metric file
+ $file=$family;
+ if($family=='times' || $family=='helvetica')
+ $file.=strtolower($style);
+ include($this->_getfontpath().$file.'.php');
+ if(!isset($fpdf_charwidths[$fontkey]))
+ $this->Error('Could not include font metric file');
+ }
+ $i=count($this->fonts)+1;
+ $name=$this->CoreFonts[$fontkey];
+ $cw=$fpdf_charwidths[$fontkey];
+ $this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw);
+ }
+ else
+ $this->Error('Undefined font: '.$family.' '.$style);
+ }
+ //Select it
+ $this->FontFamily=$family;
+ $this->FontStyle=$style;
+ $this->FontSizePt=$size;
+ $this->FontSize=$size/$this->k;
+ $this->CurrentFont=&$this->fonts[$fontkey];
+ if($this->page>0)
+ $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
+}
+
+function SetFontSize($size)
+{
+ //Set font size in points
+ if($this->FontSizePt==$size)
+ return;
+ $this->FontSizePt=$size;
+ $this->FontSize=$size/$this->k;
+ if($this->page>0)
+ $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
+}
+
+function AddLink()
+{
+ //Create a new internal link
+ $n=count($this->links)+1;
+ $this->links[$n]=array(0, 0);
+ return $n;
+}
+
+function SetLink($link, $y=0, $page=-1)
+{
+ //Set destination of internal link
+ if($y==-1)
+ $y=$this->y;
+ if($page==-1)
+ $page=$this->page;
+ $this->links[$link]=array($page, $y);
+}
+
+function Link($x, $y, $w, $h, $link)
+{
+ //Put a link on the page
+ $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link);
+}
+
+function Text($x, $y, $txt)
+{
+ //Output a string
+ $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
+ if($this->underline && $txt!='')
+ $s.=' '.$this->_dounderline($x,$y,$txt);
+ if($this->ColorFlag)
+ $s='q '.$this->TextColor.' '.$s.' Q';
+ $this->_out($s);
+}
+
+function AcceptPageBreak()
+{
+ //Accept automatic page break or not
+ return $this->AutoPageBreak;
+}
+
+function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
+{
+ //Output a cell
+ $k=$this->k;
+ if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
+ {
+ //Automatic page break
+ $x=$this->x;
+ $ws=$this->ws;
+ if($ws>0)
+ {
+ $this->ws=0;
+ $this->_out('0 Tw');
+ }
+ $this->AddPage($this->CurOrientation,$this->CurPageFormat);
+ $this->x=$x;
+ if($ws>0)
+ {
+ $this->ws=$ws;
+ $this->_out(sprintf('%.3F Tw',$ws*$k));
+ }
+ }
+ if($w==0)
+ $w=$this->w-$this->rMargin-$this->x;
+ $s='';
+ if($fill || $border==1)
+ {
+ if($fill)
+ $op=($border==1) ? 'B' : 'f';
+ else
+ $op='S';
+ $s=sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op);
+ }
+ if(is_string($border))
+ {
+ $x=$this->x;
+ $y=$this->y;
+ if(strpos($border,'L')!==false)
+ $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k);
+ if(strpos($border,'T')!==false)
+ $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k);
+ if(strpos($border,'R')!==false)
+ $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
+ if(strpos($border,'B')!==false)
+ $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
+ }
+ if($txt!=='')
+ {
+ if($align=='R')
+ $dx=$w-$this->cMargin-$this->GetStringWidth($txt);
+ elseif($align=='C')
+ $dx=($w-$this->GetStringWidth($txt))/2;
+ else
+ $dx=$this->cMargin;
+ if($this->ColorFlag)
+ $s.='q '.$this->TextColor.' ';
+ $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
+ $s.=sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2);
+ if($this->underline)
+ $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
+ if($this->ColorFlag)
+ $s.=' Q';
+ if($link)
+ $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link);
+ }
+ if($s)
+ $this->_out($s);
+ $this->lasth=$h;
+ if($ln>0)
+ {
+ //Go to next line
+ $this->y+=$h;
+ if($ln==1)
+ $this->x=$this->lMargin;
+ }
+ else
+ $this->x+=$w;
+}
+
+function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false)
+{
+ //Output text with automatic or explicit line breaks
+ $cw=&$this->CurrentFont['cw'];
+ if($w==0)
+ $w=$this->w-$this->rMargin-$this->x;
+ $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
+ $s=str_replace("\r",'',$txt);
+ $nb=strlen($s);
+ if($nb>0 && $s[$nb-1]=="\n")
+ $nb--;
+ $b=0;
+ if($border)
+ {
+ if($border==1)
+ {
+ $border='LTRB';
+ $b='LRT';
+ $b2='LR';
+ }
+ else
+ {
+ $b2='';
+ if(strpos($border,'L')!==false)
+ $b2.='L';
+ if(strpos($border,'R')!==false)
+ $b2.='R';
+ $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2;
+ }
+ }
+ $sep=-1;
+ $i=0;
+ $j=0;
+ $l=0;
+ $ns=0;
+ $nl=1;
+ while($i<$nb)
+ {
+ //Get next character
+ $c=$s[$i];
+ if($c=="\n")
+ {
+ //Explicit line break
+ if($this->ws>0)
+ {
+ $this->ws=0;
+ $this->_out('0 Tw');
+ }
+ $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
+ $i++;
+ $sep=-1;
+ $j=$i;
+ $l=0;
+ $ns=0;
+ $nl++;
+ if($border && $nl==2)
+ $b=$b2;
+ continue;
+ }
+ if($c==' ')
+ {
+ $sep=$i;
+ $ls=$l;
+ $ns++;
+ }
+ $l+=$cw[$c];
+ if($l>$wmax)
+ {
+ //Automatic line break
+ if($sep==-1)
+ {
+ if($i==$j)
+ $i++;
+ if($this->ws>0)
+ {
+ $this->ws=0;
+ $this->_out('0 Tw');
+ }
+ $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
+ }
+ else
+ {
+ if($align=='J')
+ {
+ $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
+ $this->_out(sprintf('%.3F Tw',$this->ws*$this->k));
+ }
+ $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
+ $i=$sep+1;
+ }
+ $sep=-1;
+ $j=$i;
+ $l=0;
+ $ns=0;
+ $nl++;
+ if($border && $nl==2)
+ $b=$b2;
+ }
+ else
+ $i++;
+ }
+ //Last chunk
+ if($this->ws>0)
+ {
+ $this->ws=0;
+ $this->_out('0 Tw');
+ }
+ if($border && strpos($border,'B')!==false)
+ $b.='B';
+ $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
+ $this->x=$this->lMargin;
+}
+
+function Write($h, $txt, $link='')
+{
+ //Output text in flowing mode
+ $cw=&$this->CurrentFont['cw'];
+ $w=$this->w-$this->rMargin-$this->x;
+ $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
+ $s=str_replace("\r",'',$txt);
+ $nb=strlen($s);
+ $sep=-1;
+ $i=0;
+ $j=0;
+ $l=0;
+ $nl=1;
+ while($i<$nb)
+ {
+ //Get next character
+ $c=$s[$i];
+ if($c=="\n")
+ {
+ //Explicit line break
+ $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
+ $i++;
+ $sep=-1;
+ $j=$i;
+ $l=0;
+ if($nl==1)
+ {
+ $this->x=$this->lMargin;
+ $w=$this->w-$this->rMargin-$this->x;
+ $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
+ }
+ $nl++;
+ continue;
+ }
+ if($c==' ')
+ $sep=$i;
+ $l+=$cw[$c];
+ if($l>$wmax)
+ {
+ //Automatic line break
+ if($sep==-1)
+ {
+ if($this->x>$this->lMargin)
+ {
+ //Move to next line
+ $this->x=$this->lMargin;
+ $this->y+=$h;
+ $w=$this->w-$this->rMargin-$this->x;
+ $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
+ $i++;
+ $nl++;
+ continue;
+ }
+ if($i==$j)
+ $i++;
+ $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
+ }
+ else
+ {
+ $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
+ $i=$sep+1;
+ }
+ $sep=-1;
+ $j=$i;
+ $l=0;
+ if($nl==1)
+ {
+ $this->x=$this->lMargin;
+ $w=$this->w-$this->rMargin-$this->x;
+ $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
+ }
+ $nl++;
+ }
+ else
+ $i++;
+ }
+ //Last chunk
+ if($i!=$j)
+ $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
+}
+
+function Ln($h=null)
+{
+ //Line feed; default value is last cell height
+ $this->x=$this->lMargin;
+ if($h===null)
+ $this->y+=$this->lasth;
+ else
+ $this->y+=$h;
+}
+
+function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='')
+{
+ //Put an image on the page
+ if(!isset($this->images[$file]))
+ {
+ //First use of this image, get info
+ if($type=='')
+ {
+ $pos=strrpos($file,'.');
+ if(!$pos)
+ $this->Error('Image file has no extension and no type was specified: '.$file);
+ $type=substr($file,$pos+1);
+ }
+ $type=strtolower($type);
+ if($type=='jpeg')
+ $type='jpg';
+ $mtd='_parse'.$type;
+ if(!method_exists($this,$mtd))
+ $this->Error('Unsupported image type: '.$type);
+ $info=$this->$mtd($file);
+ $info['i']=count($this->images)+1;
+ $this->images[$file]=$info;
+ }
+ else
+ $info=$this->images[$file];
+ //Automatic width and height calculation if needed
+ if($w==0 && $h==0)
+ {
+ //Put image at 72 dpi
+ $w=$info['w']/$this->k;
+ $h=$info['h']/$this->k;
+ }
+ elseif($w==0)
+ $w=$h*$info['w']/$info['h'];
+ elseif($h==0)
+ $h=$w*$info['h']/$info['w'];
+ //Flowing mode
+ if($y===null)
+ {
+ if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
+ {
+ //Automatic page break
+ $x2=$this->x;
+ $this->AddPage($this->CurOrientation,$this->CurPageFormat);
+ $this->x=$x2;
+ }
+ $y=$this->y;
+ $this->y+=$h;
+ }
+ if($x===null)
+ $x=$this->x;
+ $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
+ if($link)
+ $this->Link($x,$y,$w,$h,$link);
+}
+
+function GetX()
+{
+ //Get x position
+ return $this->x;
+}
+
+function SetX($x)
+{
+ //Set x position
+ if($x>=0)
+ $this->x=$x;
+ else
+ $this->x=$this->w+$x;
+}
+
+function GetY()
+{
+ //Get y position
+ return $this->y;
+}
+
+function SetY($y)
+{
+ //Set y position and reset x
+ $this->x=$this->lMargin;
+ if($y>=0)
+ $this->y=$y;
+ else
+ $this->y=$this->h+$y;
+}
+
+function SetXY($x, $y)
+{
+ //Set x and y positions
+ $this->SetY($y);
+ $this->SetX($x);
+}
+
+function Output($name='', $dest='')
+{
+ //Output PDF to some destination
+ if($this->state<3)
+ $this->Close();
+ $dest=strtoupper($dest);
+ if($dest=='')
+ {
+ if($name=='')
+ {
+ $name='doc.pdf';
+ $dest='I';
+ }
+ else
+ $dest='F';
+ }
+ switch($dest)
+ {
+ case 'I':
+ //Send to standard output
+ if(ob_get_length())
+ $this->Error('Some data has already been output, can\'t send PDF file');
+ if(php_sapi_name()!='cli')
+ {
+ //We send to a browser
+ header('Content-Type: application/pdf');
+ if(headers_sent())
+ $this->Error('Some data has already been output, can\'t send PDF file');
+ header('Content-Length: '.strlen($this->buffer));
+ header('Content-Disposition: inline; filename="'.$name.'"');
+ header('Cache-Control: private, max-age=0, must-revalidate');
+ header('Pragma: public');
+ ini_set('zlib.output_compression','0');
+ }
+ echo $this->buffer;
+ break;
+ case 'D':
+ //Download file
+ if(ob_get_length())
+ $this->Error('Some data has already been output, can\'t send PDF file');
+ header('Content-Type: application/x-download');
+ if(headers_sent())
+ $this->Error('Some data has already been output, can\'t send PDF file');
+ header('Content-Length: '.strlen($this->buffer));
+ header('Content-Disposition: attachment; filename="'.$name.'"');
+ header('Cache-Control: private, max-age=0, must-revalidate');
+ header('Pragma: public');
+ ini_set('zlib.output_compression','0');
+ echo $this->buffer;
+ break;
+ case 'F':
+ //Save to local file
+ $f=fopen($name,'wb');
+ if(!$f)
+ $this->Error('Unable to create output file: '.$name);
+ fwrite($f,$this->buffer,strlen($this->buffer));
+ fclose($f);
+ break;
+ case 'S':
+ //Return as a string
+ return $this->buffer;
+ default:
+ $this->Error('Incorrect output destination: '.$dest);
+ }
+ return '';
+}
+
+/*******************************************************************************
+* *
+* Protected methods *
+* *
+*******************************************************************************/
+function _dochecks()
+{
+ //Check availability of %F
+ if(sprintf('%.1F',1.0)!='1.0')
+ $this->Error('This version of PHP is not supported');
+ //Check mbstring overloading
+ if(ini_get('mbstring.func_overload') & 2)
+ $this->Error('mbstring overloading must be disabled');
+ //Disable runtime magic quotes
+ if(get_magic_quotes_runtime())
+ @set_magic_quotes_runtime(0);
+}
+
+function _getpageformat($format)
+{
+ $format=strtolower($format);
+ if(!isset($this->PageFormats[$format]))
+ $this->Error('Unknown page format: '.$format);
+ $a=$this->PageFormats[$format];
+ return array($a[0]/$this->k, $a[1]/$this->k);
+}
+
+function _getfontpath()
+{
+ if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font'))
+ define('FPDF_FONTPATH',dirname(__FILE__).'/font/');
+ return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : '';
+}
+
+function _beginpage($orientation, $format)
+{
+ $this->page++;
+ $this->pages[$this->page]='';
+ $this->state=2;
+ $this->x=$this->lMargin;
+ $this->y=$this->tMargin;
+ $this->FontFamily='';
+ //Check page size
+ if($orientation=='')
+ $orientation=$this->DefOrientation;
+ else
+ $orientation=strtoupper($orientation[0]);
+ if($format=='')
+ $format=$this->DefPageFormat;
+ else
+ {
+ if(is_string($format))
+ $format=$this->_getpageformat($format);
+ }
+ if($orientation!=$this->CurOrientation || $format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1])
+ {
+ //New size
+ if($orientation=='P')
+ {
+ $this->w=$format[0];
+ $this->h=$format[1];
+ }
+ else
+ {
+ $this->w=$format[1];
+ $this->h=$format[0];
+ }
+ $this->wPt=$this->w*$this->k;
+ $this->hPt=$this->h*$this->k;
+ $this->PageBreakTrigger=$this->h-$this->bMargin;
+ $this->CurOrientation=$orientation;
+ $this->CurPageFormat=$format;
+ }
+ if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1])
+ $this->PageSizes[$this->page]=array($this->wPt, $this->hPt);
+}
+
+function _endpage()
+{
+ $this->state=1;
+}
+
+function _escape($s)
+{
+ //Escape special characters in strings
+ $s=str_replace('\\','\\\\',$s);
+ $s=str_replace('(','\\(',$s);
+ $s=str_replace(')','\\)',$s);
+ $s=str_replace("\r",'\\r',$s);
+ return $s;
+}
+
+function _textstring($s)
+{
+ //Format a text string
+ return '('.$this->_escape($s).')';
+}
+
+function _UTF8toUTF16($s)
+{
+ //Convert UTF-8 to UTF-16BE with BOM
+ $res="\xFE\xFF";
+ $nb=strlen($s);
+ $i=0;
+ while($i<$nb)
+ {
+ $c1=ord($s[$i++]);
+ if($c1>=224)
+ {
+ //3-byte character
+ $c2=ord($s[$i++]);
+ $c3=ord($s[$i++]);
+ $res.=chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2));
+ $res.=chr((($c2 & 0x03)<<6) + ($c3 & 0x3F));
+ }
+ elseif($c1>=192)
+ {
+ //2-byte character
+ $c2=ord($s[$i++]);
+ $res.=chr(($c1 & 0x1C)>>2);
+ $res.=chr((($c1 & 0x03)<<6) + ($c2 & 0x3F));
+ }
+ else
+ {
+ //Single-byte character
+ $res.="\0".chr($c1);
+ }
+ }
+ return $res;
+}
+
+function _dounderline($x, $y, $txt)
+{
+ //Underline text
+ $up=$this->CurrentFont['up'];
+ $ut=$this->CurrentFont['ut'];
+ $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' ');
+ return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt);
+}
+
+function _parsejpg($file)
+{
+ //Extract info from a JPEG file
+ $a=GetImageSize($file);
+ if(!$a)
+ $this->Error('Missing or incorrect image file: '.$file);
+ if($a[2]!=2)
+ $this->Error('Not a JPEG file: '.$file);
+ if(!isset($a['channels']) || $a['channels']==3)
+ $colspace='DeviceRGB';
+ elseif($a['channels']==4)
+ $colspace='DeviceCMYK';
+ else
+ $colspace='DeviceGray';
+ $bpc=isset($a['bits']) ? $a['bits'] : 8;
+ //Read whole file
+ $f=fopen($file,'rb');
+ $data='';
+ while(!feof($f))
+ $data.=fread($f,8192);
+ fclose($f);
+ return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data);
+}
+
+function _parsepng($file)
+{
+ //Extract info from a PNG file
+ $f=fopen($file,'rb');
+ if(!$f)
+ $this->Error('Can\'t open image file: '.$file);
+ //Check signature
+ if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
+ $this->Error('Not a PNG file: '.$file);
+ //Read header chunk
+ $this->_readstream($f,4);
+ if($this->_readstream($f,4)!='IHDR')
+ $this->Error('Incorrect PNG file: '.$file);
+ $w=$this->_readint($f);
+ $h=$this->_readint($f);
+ $bpc=ord($this->_readstream($f,1));
+ if($bpc>8)
+ $this->Error('16-bit depth not supported: '.$file);
+ $ct=ord($this->_readstream($f,1));
+ if($ct==0)
+ $colspace='DeviceGray';
+ elseif($ct==2)
+ $colspace='DeviceRGB';
+ elseif($ct==3)
+ $colspace='Indexed';
+ else
+ $this->Error('Alpha channel not supported: '.$file);
+ if(ord($this->_readstream($f,1))!=0)
+ $this->Error('Unknown compression method: '.$file);
+ if(ord($this->_readstream($f,1))!=0)
+ $this->Error('Unknown filter method: '.$file);
+ if(ord($this->_readstream($f,1))!=0)
+ $this->Error('Interlacing not supported: '.$file);
+ $this->_readstream($f,4);
+ $parms='/DecodeParms <>';
+ //Scan chunks looking for palette, transparency and image data
+ $pal='';
+ $trns='';
+ $data='';
+ do
+ {
+ $n=$this->_readint($f);
+ $type=$this->_readstream($f,4);
+ if($type=='PLTE')
+ {
+ //Read palette
+ $pal=$this->_readstream($f,$n);
+ $this->_readstream($f,4);
+ }
+ elseif($type=='tRNS')
+ {
+ //Read transparency info
+ $t=$this->_readstream($f,$n);
+ if($ct==0)
+ $trns=array(ord(substr($t,1,1)));
+ elseif($ct==2)
+ $trns=array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1)));
+ else
+ {
+ $pos=strpos($t,chr(0));
+ if($pos!==false)
+ $trns=array($pos);
+ }
+ $this->_readstream($f,4);
+ }
+ elseif($type=='IDAT')
+ {
+ //Read image data block
+ $data.=$this->_readstream($f,$n);
+ $this->_readstream($f,4);
+ }
+ elseif($type=='IEND')
+ break;
+ else
+ $this->_readstream($f,$n+4);
+ }
+ while($n);
+ if($colspace=='Indexed' && empty($pal))
+ $this->Error('Missing palette in '.$file);
+ fclose($f);
+ return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data);
+}
+
+function _readstream($f, $n)
+{
+ //Read n bytes from stream
+ $res='';
+ while($n>0 && !feof($f))
+ {
+ $s=fread($f,$n);
+ if($s===false)
+ $this->Error('Error while reading stream');
+ $n-=strlen($s);
+ $res.=$s;
+ }
+ if($n>0)
+ $this->Error('Unexpected end of stream');
+ return $res;
+}
+
+function _readint($f)
+{
+ //Read a 4-byte integer from stream
+ $a=unpack('Ni',$this->_readstream($f,4));
+ return $a['i'];
+}
+
+function _parsegif($file)
+{
+ //Extract info from a GIF file (via PNG conversion)
+ if(!function_exists('imagepng'))
+ $this->Error('GD extension is required for GIF support');
+ if(!function_exists('imagecreatefromgif'))
+ $this->Error('GD has no GIF read support');
+ $im=imagecreatefromgif($file);
+ if(!$im)
+ $this->Error('Missing or incorrect image file: '.$file);
+ imageinterlace($im,0);
+ $tmp=tempnam('.','gif');
+ if(!$tmp)
+ $this->Error('Unable to create a temporary file');
+ if(!imagepng($im,$tmp))
+ $this->Error('Error while saving to temporary file');
+ imagedestroy($im);
+ $info=$this->_parsepng($tmp);
+ unlink($tmp);
+ return $info;
+}
+
+function _newobj()
+{
+ //Begin a new object
+ $this->n++;
+ $this->offsets[$this->n]=strlen($this->buffer);
+ $this->_out($this->n.' 0 obj');
+}
+
+function _putstream($s)
+{
+ $this->_out('stream');
+ $this->_out($s);
+ $this->_out('endstream');
+}
+
+function _out($s)
+{
+ //Add a line to the document
+ if($this->state==2)
+ $this->pages[$this->page].=$s."\n";
+ else
+ $this->buffer.=$s."\n";
+}
+
+function _putpages()
+{
+ $nb=$this->page;
+ if(!empty($this->AliasNbPages))
+ {
+ //Replace number of pages
+ for($n=1;$n<=$nb;$n++)
+ $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
+ }
+ if($this->DefOrientation=='P')
+ {
+ $wPt=$this->DefPageFormat[0]*$this->k;
+ $hPt=$this->DefPageFormat[1]*$this->k;
+ }
+ else
+ {
+ $wPt=$this->DefPageFormat[1]*$this->k;
+ $hPt=$this->DefPageFormat[0]*$this->k;
+ }
+ $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
+ for($n=1;$n<=$nb;$n++)
+ {
+ //Page
+ $this->_newobj();
+ $this->_out('<_out('/Parent 1 0 R');
+ if(isset($this->PageSizes[$n]))
+ $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1]));
+ $this->_out('/Resources 2 0 R');
+ if(isset($this->PageLinks[$n]))
+ {
+ //Links
+ $annots='/Annots [';
+ foreach($this->PageLinks[$n] as $pl)
+ {
+ $rect=sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]);
+ $annots.='<_textstring($pl[4]).'>>>>';
+ else
+ {
+ $l=$this->links[$pl[4]];
+ $h=isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt;
+ $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k);
+ }
+ }
+ $this->_out($annots.']');
+ }
+ $this->_out('/Contents '.($this->n+1).' 0 R>>');
+ $this->_out('endobj');
+ //Page content
+ $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n];
+ $this->_newobj();
+ $this->_out('<<'.$filter.'/Length '.strlen($p).'>>');
+ $this->_putstream($p);
+ $this->_out('endobj');
+ }
+ //Pages root
+ $this->offsets[1]=strlen($this->buffer);
+ $this->_out('1 0 obj');
+ $this->_out('<_out($kids.']');
+ $this->_out('/Count '.$nb);
+ $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt));
+ $this->_out('>>');
+ $this->_out('endobj');
+}
+
+function _putfonts()
+{
+ $nf=$this->n;
+ foreach($this->diffs as $diff)
+ {
+ //Encodings
+ $this->_newobj();
+ $this->_out('<>');
+ $this->_out('endobj');
+ }
+ foreach($this->FontFiles as $file=>$info)
+ {
+ //Font file embedding
+ $this->_newobj();
+ $this->FontFiles[$file]['n']=$this->n;
+ $font='';
+ $f=fopen($this->_getfontpath().$file,'rb',1);
+ if(!$f)
+ $this->Error('Font file not found');
+ while(!feof($f))
+ $font.=fread($f,8192);
+ fclose($f);
+ $compressed=(substr($file,-2)=='.z');
+ if(!$compressed && isset($info['length2']))
+ {
+ $header=(ord($font[0])==128);
+ if($header)
+ {
+ //Strip first binary header
+ $font=substr($font,6);
+ }
+ if($header && ord($font[$info['length1']])==128)
+ {
+ //Strip second binary header
+ $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6);
+ }
+ }
+ $this->_out('<_out('/Filter /FlateDecode');
+ $this->_out('/Length1 '.$info['length1']);
+ if(isset($info['length2']))
+ $this->_out('/Length2 '.$info['length2'].' /Length3 0');
+ $this->_out('>>');
+ $this->_putstream($font);
+ $this->_out('endobj');
+ }
+ foreach($this->fonts as $k=>$font)
+ {
+ //Font objects
+ $this->fonts[$k]['n']=$this->n+1;
+ $type=$font['type'];
+ $name=$font['name'];
+ if($type=='core')
+ {
+ //Standard font
+ $this->_newobj();
+ $this->_out('<_out('/BaseFont /'.$name);
+ $this->_out('/Subtype /Type1');
+ if($name!='Symbol' && $name!='ZapfDingbats')
+ $this->_out('/Encoding /WinAnsiEncoding');
+ $this->_out('>>');
+ $this->_out('endobj');
+ }
+ elseif($type=='Type1' || $type=='TrueType')
+ {
+ //Additional Type1 or TrueType font
+ $this->_newobj();
+ $this->_out('<_out('/BaseFont /'.$name);
+ $this->_out('/Subtype /'.$type);
+ $this->_out('/FirstChar 32 /LastChar 255');
+ $this->_out('/Widths '.($this->n+1).' 0 R');
+ $this->_out('/FontDescriptor '.($this->n+2).' 0 R');
+ if($font['enc'])
+ {
+ if(isset($font['diff']))
+ $this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
+ else
+ $this->_out('/Encoding /WinAnsiEncoding');
+ }
+ $this->_out('>>');
+ $this->_out('endobj');
+ //Widths
+ $this->_newobj();
+ $cw=&$font['cw'];
+ $s='[';
+ for($i=32;$i<=255;$i++)
+ $s.=$cw[chr($i)].' ';
+ $this->_out($s.']');
+ $this->_out('endobj');
+ //Descriptor
+ $this->_newobj();
+ $s='<$v)
+ $s.=' /'.$k.' '.$v;
+ $file=$font['file'];
+ if($file)
+ $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
+ $this->_out($s.'>>');
+ $this->_out('endobj');
+ }
+ else
+ {
+ //Allow for additional types
+ $mtd='_put'.strtolower($type);
+ if(!method_exists($this,$mtd))
+ $this->Error('Unsupported font type: '.$type);
+ $this->$mtd($font);
+ }
+ }
+}
+
+function _putimages()
+{
+ $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
+ reset($this->images);
+ while(list($file,$info)=each($this->images))
+ {
+ $this->_newobj();
+ $this->images[$file]['n']=$this->n;
+ $this->_out('<_out('/Subtype /Image');
+ $this->_out('/Width '.$info['w']);
+ $this->_out('/Height '.$info['h']);
+ if($info['cs']=='Indexed')
+ $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]');
+ else
+ {
+ $this->_out('/ColorSpace /'.$info['cs']);
+ if($info['cs']=='DeviceCMYK')
+ $this->_out('/Decode [1 0 1 0 1 0 1 0]');
+ }
+ $this->_out('/BitsPerComponent '.$info['bpc']);
+ if(isset($info['f']))
+ $this->_out('/Filter /'.$info['f']);
+ if(isset($info['parms']))
+ $this->_out($info['parms']);
+ if(isset($info['trns']) && is_array($info['trns']))
+ {
+ $trns='';
+ for($i=0;$i_out('/Mask ['.$trns.']');
+ }
+ $this->_out('/Length '.strlen($info['data']).'>>');
+ $this->_putstream($info['data']);
+ unset($this->images[$file]['data']);
+ $this->_out('endobj');
+ //Palette
+ if($info['cs']=='Indexed')
+ {
+ $this->_newobj();
+ $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal'];
+ $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');
+ $this->_putstream($pal);
+ $this->_out('endobj');
+ }
+ }
+}
+
+function _putxobjectdict()
+{
+ foreach($this->images as $image)
+ $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
+}
+
+function _putresourcedict()
+{
+ $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
+ $this->_out('/Font <<');
+ foreach($this->fonts as $font)
+ $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
+ $this->_out('>>');
+ $this->_out('/XObject <<');
+ $this->_putxobjectdict();
+ $this->_out('>>');
+}
+
+function _putresources()
+{
+ $this->_putfonts();
+ $this->_putimages();
+ //Resource dictionary
+ $this->offsets[2]=strlen($this->buffer);
+ $this->_out('2 0 obj');
+ $this->_out('<<');
+ $this->_putresourcedict();
+ $this->_out('>>');
+ $this->_out('endobj');
+}
+
+function _putinfo()
+{
+ $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION));
+ if(!empty($this->title))
+ $this->_out('/Title '.$this->_textstring($this->title));
+ if(!empty($this->subject))
+ $this->_out('/Subject '.$this->_textstring($this->subject));
+ if(!empty($this->author))
+ $this->_out('/Author '.$this->_textstring($this->author));
+ if(!empty($this->keywords))
+ $this->_out('/Keywords '.$this->_textstring($this->keywords));
+ if(!empty($this->creator))
+ $this->_out('/Creator '.$this->_textstring($this->creator));
+ $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis')));
+}
+
+function _putcatalog()
+{
+ $this->_out('/Type /Catalog');
+ $this->_out('/Pages 1 0 R');
+ if($this->ZoomMode=='fullpage')
+ $this->_out('/OpenAction [3 0 R /Fit]');
+ elseif($this->ZoomMode=='fullwidth')
+ $this->_out('/OpenAction [3 0 R /FitH null]');
+ elseif($this->ZoomMode=='real')
+ $this->_out('/OpenAction [3 0 R /XYZ null null 1]');
+ elseif(!is_string($this->ZoomMode))
+ $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']');
+ if($this->LayoutMode=='single')
+ $this->_out('/PageLayout /SinglePage');
+ elseif($this->LayoutMode=='continuous')
+ $this->_out('/PageLayout /OneColumn');
+ elseif($this->LayoutMode=='two')
+ $this->_out('/PageLayout /TwoColumnLeft');
+}
+
+function _putheader()
+{
+ $this->_out('%PDF-'.$this->PDFVersion);
+}
+
+function _puttrailer()
+{
+ $this->_out('/Size '.($this->n+1));
+ $this->_out('/Root '.$this->n.' 0 R');
+ $this->_out('/Info '.($this->n-1).' 0 R');
+}
+
+function _enddoc()
+{
+ $this->_putheader();
+ $this->_putpages();
+ $this->_putresources();
+ //Info
+ $this->_newobj();
+ $this->_out('<<');
+ $this->_putinfo();
+ $this->_out('>>');
+ $this->_out('endobj');
+ //Catalog
+ $this->_newobj();
+ $this->_out('<<');
+ $this->_putcatalog();
+ $this->_out('>>');
+ $this->_out('endobj');
+ //Cross-ref
+ $o=strlen($this->buffer);
+ $this->_out('xref');
+ $this->_out('0 '.($this->n+1));
+ $this->_out('0000000000 65535 f ');
+ for($i=1;$i<=$this->n;$i++)
+ $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
+ //Trailer
+ $this->_out('trailer');
+ $this->_out('<<');
+ $this->_puttrailer();
+ $this->_out('>>');
+ $this->_out('startxref');
+ $this->_out($o);
+ $this->_out('%%EOF');
+ $this->state=3;
+}
+//End of class
+}
+
+//Handle special IE contype request
+if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype')
+{
+ header('Content-Type: application/pdf');
+ exit;
+}
+
+?>
diff --git a/includes/fpdf/license.txt b/includes/fpdf/license.txt
new file mode 100755
index 00000000..fd811c6f
--- /dev/null
+++ b/includes/fpdf/license.txt
@@ -0,0 +1,6 @@
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software to use, copy, modify, distribute, sublicense, and/or sell
+copies of the software, and to permit persons to whom the software is furnished
+to do so.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
\ No newline at end of file
diff --git a/includes/javascript/controls.js b/includes/javascript/controls.js
index 664b62a0..bf24ddc3 100644
--- a/includes/javascript/controls.js
+++ b/includes/javascript/controls.js
@@ -42,7 +42,7 @@ Ajax.Autocompleter = Class.create();
Ajax.Autocompleter.prototype = (new Ajax.Base()).extend({
initialize: function(element, update, url, options) {
this.element = $(element);
- this.hidden = element+'_hidden'; //agileco add
+ this.hidden = element+'_hidden'; //agileco add
this.update = $(update);
this.has_focus = false;
this.changed = false;
@@ -262,4 +262,4 @@ Ajax.Autocompleter.prototype = (new Ajax.Base()).extend({
id = Element.collectTextNodesIgnoreClass(this.get_current_entry(), 'name', 'informal' ).unescapeHTML(); // agileco add
document.getElementById(this.hidden).value = id; // agileco add
}
-});
\ No newline at end of file
+});
diff --git a/includes/pdf/invoice_base.inc.php b/includes/pdf/invoice_base.inc.php
deleted file mode 100644
index 88b9720e..00000000
--- a/includes/pdf/invoice_base.inc.php
+++ /dev/null
@@ -1,254 +0,0 @@
-Execute(sqlSelect($db,"setup_invoice","*",""));
- }
- $this->billToCompany = $rs->fields['bill_to_company'];
- $this->invoiceCurrency = $rs->fields['invoice_currency'];
- $this->invoiceDecimals = $rs->fields['invoice_decimals'];
- $this->itemsSummaryMax = $rs->fields['items_summary_max'];
- $this->news = $rs->fields['news'];
- $this->pageType = $rs->fields['page_type'];
- $this->show_itemized = $rs->fields['invoice_show_itemized'];
- $this->show_service_range = $rs->fields['invoice_show_service_dates'];
- $this->contact_us_url = $rs->fields['contact_us_url'];
- $this->contact_us_phone = $rs->fields['contact_us_phone'];
- #$this->currency;
- $this->currency = $rs->fields['invoice_currency'];
- }
-
- function drawCustom() {
- }
-
- function getTemplate() {
- return PATH_INCLUDES."pdf/invoice.pdf";
- }
-
- function drawCompanyLogo() {
- }
-
- function drawCompanyAddress() {
- }
-
- function drawAccountMailing() {
- }
-
- function drawAccountId() {
- }
-
- function drawAccountName() {
- }
-
- function drawAccountUsername() {
- }
-
- function drawAccountAddress() {
- }
-
- function drawInvoiceNo() {
- }
-
- function drawInvoiceCreatedDate() {
- }
-
- function drawInvoiceRange() {
- }
-
- function drawInvoiceDueDate() {
- }
-
- function drawInvoiceTotalAmt() {
- }
-
- function drawInvoicePaidAmt() {
- }
-
- function drawInvoiceDueAmt() {
- }
-
- function drawInvoiceDiscountAmt() {
- }
-
- function drawInvoiceDueNotice() {
- }
-
- function drawInvoicePaidNotice() {
- }
-
- function drawInvoiceTaxAmt() {
- }
-
- function drawInvoiceShippingAmt() {
- }
-
- /**
- * Actual second plus pages of details. This is the constructor.
- */
- function drawLineItems_pre($iteration) {
- }
-
- /**
- * This is called for each line item on the second plus pages of details.
- */
- function drawLineItems(&$db, &$line) {
- }
-
- /**
- * Draws the summary on the first page
- */
- function drawSummaryLineItems($items) {
- }
-
- /**
- * Assigns the invoice fields to this object.
- */
- function setInvoiceFields($flds) {
- $this->invoice = $flds;
- }
-
- /**
- * Assigns the account fields to this object.
- */
- function setAccountFields($flds) {
- $this->account = $flds;
- }
-
- /**
- * Assigns the item summary fields to this object.
- */
- function setItemsSummary($items) {
- $this->itemsSummary = $items;
- }
-
- function setItemsFull($items) {
- $this->itemsFull = $items;
- }
-
- function setDateRange($periodStart, $periodEnd) {
- $this->dateRange = date(UNIX_DATE_FORMAT, $periodStart) . ' - ' . date(UNIX_DATE_FORMAT, $periodEnd);
- }
-
- function setCurrency($currency) {
- $this->invoiceCurrency = $currency;
- }
-
- function setDecimals($decimals) {
- $this->invoiceDecimals = $decimals;
- }
-
- function setLateFeeNotice() {
- }
-
- function setDueAmt($amt) {
- $this->invoiceDueAmt=$amt;
- }
-
- function setNetTerms($terms) {
- $this->netTerms=$terms;
- }
-
- function _currency($num) {
- global $C_list;
- if($this->invoiceDecimals>3)
- return $this->invoiceCurrency . number_format($num, $this->invoiceDecimals);
- else
- return $C_list->format_currency_num($num, $this->invoice['actual_billed_currency_id']);
- }
-
-
- function _putpages() {
- $nb=$this->page;
- if(!empty($this->AliasNbPages))
- {
- //Replace number of pages
- for($n=1;$n<=$nb;$n++)
- $this->pages[$n]=($this->compress) ? gzcompress(str_replace($this->AliasNbPages,$nb,gzuncompress($this->pages[$n]))) : str_replace($this->AliasNbPages,$nb,$this->pages[$n]) ;
- }
- if($this->DefOrientation=='P')
- {
- $wPt=$this->fwPt;
- $hPt=$this->fhPt;
- }
- else
- {
- $wPt=$this->fhPt;
- $hPt=$this->fwPt;
- }
- $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
- for($n=1;$n<=$nb;$n++)
- {
- //Page
- $this->_newobj();
- $this->_out('<_out('/Parent 1 0 R');
- if(isset($this->OrientationChanges[$n]))
- $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$hPt,$wPt));
- $this->_out('/Resources 2 0 R');
- if(isset($this->PageLinks[$n]))
- {
- //Links
- $annots='/Annots [';
- foreach($this->PageLinks[$n] as $pl)
- {
- $rect=sprintf('%.2f %.2f %.2f %.2f',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]);
- $annots.='<_textstring($pl[4]).'>>>>';
- else
- {
- $l=$this->links[$pl[4]];
- $h=isset($this->OrientationChanges[$l[0]]) ? $wPt : $hPt;
- $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]>>',1+2*$l[0],$h-$l[1]*$this->k);
- }
- }
- $this->_out($annots.']');
- }
- $this->_out('/Contents '.($this->n+1).' 0 R>>');
- $this->_out('endobj');
- //Page content
- $this->_newobj();
- $this->_out('<<'.$filter.'/Length '.strlen($this->pages[$n]).'>>');
- $this->_putstream($this->pages[$n]);
- $this->_out('endobj');
- }
- //Pages root
- $this->offsets[1]=strlen($this->buffer);
- $this->_out('1 0 obj');
- $this->_out('<_out($kids.']');
- $this->_out('/Count '.$nb);
- $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$wPt,$hPt));
- $this->_out('>>');
- $this->_out('endobj');
- }
-
- function _endpage() {
- //End of page contents
- $this->pages[$this->page] = ($this->compress) ? gzcompress($this->pages[$this->page]) : $this->pages[$this->page];
- $this->state=1;
- }
-
-}
-
-?>
\ No newline at end of file
diff --git a/includes/pdf/pdf_invoice_overview.inc.php b/includes/pdf/pdf_invoice_overview.inc.php
deleted file mode 100644
index 9982d801..00000000
--- a/includes/pdf/pdf_invoice_overview.inc.php
+++ /dev/null
@@ -1,278 +0,0 @@
-Image(PATH_THEMES.'default/images/invoice_logo.jpg',$x,$y,$width);
- }
-
- // draw the company address
- function drawCompanyAddress() {
- // add the company address on the payment stub (1)
- $this->SetFont('times','B', 10);
- $this->SetXY(18,202); $this->Cell(50,10, $this->companyName);
- $this->SetXY(18,206); $this->Cell(50,10, $this->companyAddress);
- $this->SetXY(18,210); $this->Cell(50,10, $this->companyCity. ", ". $this->companyState . " " . $this->companyZip);
- }
-
- function drawAccountMailing() {
- // add the company address on the payment stub (2)
- $this->SetFont('times','B', 10);
-
- if($this->billToCompany && !empty($this->account['company']))
- $name = $this->account['company'];
- else
- $name = $this->account['first_name'].' '.$this->account['last_name'];
-
- $this->SetXY(120,240); $this->Cell(10,10, html_entity_decode($name,ENT_NOQUOTES));
- $this->SetXY(120,244); $this->Cell(50,10, $this->account['address1'] .' '. $this->account['address2']);
- $this->SetXY(120,248); $this->Cell(50,10, $this->account['city'] . ", ". $this->account['state'] . " " . $this->account['zip']);
- }
-
- function drawAccountId() {
- $this->SetFont('times','B',11);
- $this->SetXY(28, 39.5);
- $this->Cell(10,10, $this->account['id']); // add to top of invoice
-
- }
-
- function drawAccountName() {
- $this->SetFont('times','B',11);
- $this->SetXY(36, 44);
- if($this->billToCompany && !empty($this->account['company']))
- $this->Cell(10,10, html_entity_decode($this->account['company'],ENT_NOQUOTES));
- else
- $this->Cell(10,10, html_entity_decode($this->account['first_name'].' '.$this->account['last_name'],ENT_NOQUOTES));
- }
-
- function drawAccountUsername() {
- $this->SetFont('times','B',11);
- $this->SetXY(161, 44);
- $this->Cell(10,10, $this->account['username']);
- }
-
- function drawAccountAddress() {
- $this->SetFont('times','B',11);
- }
-
- function drawInvoiceNo() {
- $this->SetFont('times','',11);
- $this->SetXY(180, 222);
- $this->Cell(10,10, $this->invoice["id"]); // draw at the bottom of invoice
- }
-
- function drawInvoiceRange() {
- if($this->show_service_range) {
- global $C_translate;
- $this->SetFont('times','B',11);
- $this->SetXY(8,85.5);
- $this->Cell(50,10, $C_translate->translate('pdf_service_range_month','setup_invoice') . " {$this->dateRange}");
- }
- }
-
- function drawInvoiceDueDate() {
- $this->SetFont('times','B',11);
- $this->SetXY(161, 39.5);
- $this->Cell(10,10, date(UNIX_DATE_FORMAT, $this->invoice['due_date'])); // draw at top of invoice
-
- $this->SetFont('times','',11);
- $this->SetXY(151, 222);
- $this->Cell(10,10, date(UNIX_DATE_FORMAT, $this->invoice['due_date']),0,0,'C'); // draw at the bottom of invoice
- }
-
- function drawInvoiceTotalAmt() {
- $this->SetXY(147.5,72);
- $this->Cell(10,10, $this->_currency($this->invoice['total_amt']),0,0,'C'); // draw at the top
- }
-
- function drawInvoicePaidAmt() {
- $this->SetFont('times','',11);
- $this->SetXY(47,72);
- $this->Cell(10,10, $this->_currency($this->invoice['billed_amt']), 0,0,'C');
- }
-
- function drawInvoiceDueAmt() {
- $this->SetFont('times','',11);
-
- $this->SetXY(114,72);
- $this->Cell(10,10, $this->_currency($this->invoiceDueAmt),0,0,'C'); // draw at the top
-
- $this->SetXY(181,72);
- $this->Cell(10,10, $this->_currency($this->invoiceDueAmt),0,0,'C'); // draw at the top
-
- $this->SetXY(123, 222);
- $this->Cell(10,10, $this->_currency($this->invoiceDueAmt),0,0,'C'); // draw at the bottom
- }
-
- function drawInvoiceDiscountAmt() {
- $this->SetXY(80.5, 72);
- $this->Cell(10,10, $this->_currency($this->invoice['discount_amt']), 0,0,'C');
- }
-
- function drawInvoiceTaxAmt() {
- $this->SetFont('times','',11);
- $this->SetXY(16,72);
- $this->Cell(10,10, $this->_currency($this->invoice['tax_amt']),0,0,'C'); // draw at the top
- }
-
- /**
- * Called before begining to loop the invoice_item table. Used to set initial values.
- */
- function drawLineItems_pre($iteration) {
- $this->iteration = $iteration;
- if($iteration>0)
- return false;
- $this->i = 0;
- $this->y = 0;
- return true;
- }
-
- /**
- * Called once per line item to add to the PDF invoice.
- */
- function drawSubLineItems(&$db, $line) {
- global $C_translate;
- if ($this->i == 0 || $this->i%51 == 0) {
- $this->AddPage();
-
- $this->SetFont('times','B',12);
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_itemized_charges','setup_invoice'));
- $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R');
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$this->invoice['id'],0,0,'C');
-
- # Draw table headers
- $this->SetFont('times','B',8);
- $this->SetXY(9,20);
- $this->Cell(0,0,$C_translate->translate('pdf_item_description','setup_invoice'));
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_quantity','setup_invoice'));
- $this->SetX(170);
- $this->Cell(10,0,$C_translate->translate('pdf_item_cost','setup_invoice'),0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R');
- $this->Line(9,21,200,21);
- $this->y = 24;
- $this->SetY($this->y);
- }
-
- $this->SetFont('times','',8);
- $this->SetX(18);
- $this->Cell(0,0, $line);
-
- $this->y += 5;
- $this->SetY($this->y);
- $this->i++;
- }
-
- /**
- * Called once per line item to add to the PDF invoice.
- */
- function drawLineItems(&$db, &$line) {
- global $C_translate;
- if ($this->i == 0 || $this->i%51 == 0) {
- $this->AddPage();
-
- $this->SetFont('times','B',12);
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_itemized_charges','setup_invoice'));
- $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R');
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$this->invoice['id'],0,0,'C');
-
- # Draw table headers
- $this->SetFont('times','B',8);
- $this->SetXY(9,20);
- $this->Cell(0,0,$C_translate->translate('pdf_item_description','setup_invoice'));
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_quantity','setup_invoice'));
- $this->SetX(170);
- $this->Cell(10,0,$C_translate->translate('pdf_item_cost','setup_invoice'),0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R');
- $this->Line(9,21,200,21);
- $this->y = 24;
- $this->SetY($this->y);
- }
-
- $this->SetFont('times','',8);
- $this->SetX(9);
- $this->Cell(0,0, $line['name']);
- $this->SetX(170);
- $this->Cell(10,0, $this->_currency($line['amount']/$line['qty']),0,0,'R');
- $this->SetX(145);
- $this->Cell(10,0, $line['qty'],0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R');
- $this->y += 5;
- $this->SetY($this->y);
- $this->i++;
-
- # Draw attributes if they are present
- if (strlen($line['attr'])) {
- $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
- foreach ($atrs as $a) {
- $parts = preg_split("/==/", $a);
- switch ($parts[0]) {
- default:
- if(strlen($parts[0]))
- $this->drawSubLineItems($db, $parts[0].": ".$parts[1]);
- break;
- }
- }
- }
- }
-
- function drawSummaryLineItems($items) {
- global $C_translate;
- if (!$this->show_itemized) return;
-
- $y = 105;
- $this->SetY($y);
- $this->SetFont('times','',11);
-
- $i=0;
- if(is_array($items)) {
- foreach($items as $line) {
- $val = $line['name'];
- $this->SetX(9);
- $this->Cell(0,0, $val);
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R');
- $y += 5;
- $this->SetY($y);
- $i++;
- if($i > $this->itemsSummaryMax) {
- $this->SetFont('times','B',11);
- $this->SetX(9);
- $this->Cell(0,0,$C_translate->translate('pdf_summary','setup_invoice'));
- break;
- }
- }
- }
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/pdf/pdf_invoice_voip-detailed.inc.php b/includes/pdf/pdf_invoice_voip-detailed.inc.php
deleted file mode 100644
index ce3c7ac4..00000000
--- a/includes/pdf/pdf_invoice_voip-detailed.inc.php
+++ /dev/null
@@ -1,406 +0,0 @@
-pageType == 2)
- return PATH_INCLUDES."pdf/invoice2.pdf";
- return PATH_INCLUDES."pdf/invoice1.pdf";
- }
-
- // draw the logo
- function drawCompanyLogo() {
- $x = 9;
- $y = 7;
- $width = 50;
- if(is_file(PATH_THEMES.DEFAULT_THEME.'/images/invoice_logo.png'))
- $this->Image(PATH_THEMES.DEFAULT_THEME.'/images/invoice_logo.png',$x,$y,$width);
- }
-
- // draw the company address
- function drawCompanyAddress() {
- global $C_translate;
-
- // add the company address on the payment stub (1)
- $this->SetFont('arial','B', 13);
- $this->SetXY(18,202); $this->Cell(0,0,$C_translate->translate('pdf_payment_coupon','setup_invoice'));
- $this->SetFont('arial','', 8);
- $this->SetXY(18,206); $this->Cell(0,0,$C_translate->translate('pdf_return1','setup_invoice'));
- $this->SetXY(18,209); $this->Cell(0,0,$C_translate->translate('pdf_return2','setup_invoice').$this->companyName);
-
- $this->SetFont('arial','', 10);
- $x = 18; $y = 216;
- if ($this->pageType == 2) {
- $y = 230;
- }
- $this->SetXY(18,$y); $this->Cell(0,0, $this->companyName); $y += 4;
- $this->SetXY(18,$y); $this->Cell(0,0, $this->companyAddress); $y += 4;
- $this->SetXY(18,$y); $this->Cell(0,0, $this->companyCity. ", ". $this->companyState . " " . $this->companyZip); $y += 4;
- }
-
- function drawAccountMailing() {
- // add the company address on the payment stub (2)
- $this->SetFont('arial','B', 10);
-
- if($this->billToCompany && !empty($this->account['company']))
- $name = $this->account['company'];
- else
- $name = $this->account['first_name'].' '.$this->account['last_name'];
-
- $x = 110; $y = 248;
- if ($this->pageType == 2) {
- $x = 18; $y = 268;
- }
- $this->SetXY($x,$y); $this->Cell(0,0, html_entity_decode($name,ENT_NOQUOTES)); $y += 4;
- $this->SetXY($x,$y); $this->Cell(0,0, $this->account['address1'] .' '. $this->account['address2']); $y += 4;
- $this->SetXY($x,$y); $this->Cell(0,0, $this->account['city'] . ", ". $this->account['state'] . " " . $this->account['zip']); $y += 4;
- }
-
- function drawAccountId() {
- global $C_translate;
- $this->SetFont('arial','',11);
- $this->SetXY(110, 205); $this->Cell(0,0,$C_translate->translate('pdf_account_number','setup_invoice'));
- $this->SetXY(150, 205);
- $this->Cell(0,0, $this->account['id']); // add to bottom of invoice
-
- }
-
- function drawAccountUsername() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95, 18); $this->Cell(0,0,$C_translate->translate('pdf_account_username','setup_invoice'));
- $this->SetXY(201,18); $this->Cell(0,0,$this->account['username'],0,0,'R');
-
- $this->SetFont('arial','',11);
- $this->SetXY(95,30);
- $contact = $C_translate->translate('pdf_contact','setup_invoice')."\n";
- $contact .= $C_translate->translate('pdf_contact_online','setup_invoice').$this->contact_us_url."\n";
- $contact .= $C_translate->translate('pdf_contact_phone','setup_invoice').$this->contact_us_phone;
- $this->MultiCell(0,4,$contact);
-
- $this->SetXY(9,170);
- $this->MultiCell(0, 4, str_replace('\n',"\n",$this->news));
- }
-
- function drawAccountAddress() {
- $this->SetFont('times','B',11);
- }
-
- function drawInvoiceNo() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95, 14); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number','setup_invoice'));
- $this->SetXY(201, 14); $this->Cell(0,0, $this->invoice['id'],0,0,'R'); // add to bottom of invoice
-
- $this->SetFont('arial','',11);
- $this->SetXY(110, 210); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number','setup_invoice'));
- $this->SetXY(150, 210); $this->Cell(0,0, $this->invoice['id']); // add to bottom of invoice
- }
-
- function drawInvoiceDueDate() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95,10); $this->Cell(0,0,$C_translate->translate('pdf_billing_date','setup_invoice'));
- $this->SetXY(201,10); $this->Cell(0,0, date(UNIX_DATE_FORMAT, $this->invoice['due_date']),0,0,'R'); // draw at top of invoice
-
- $this->SetFont('arial','',11);
- $this->SetXY(110, 200); $this->Cell(0,0,$C_translate->translate('pdf_bill_date','setup_invoice'));
- $this->SetXY(150, 200);
- $this->Cell(0,0, date(UNIX_DATE_FORMAT, $this->invoice['due_date'])); // draw at the bottom of invoice
- }
-
- function drawInvoiceTotalAmt() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95, 22); $this->Cell(0,0,$C_translate->translate('pdf_current_charges','setup_invoice'));
- $this->SetXY(201, 22); $this->Cell(0,0, $this->_currency($this->invoice['total_amt']),0,0,'R'); // draw at the top
-
- $this->SetFont('arial','',9);
- $this->SetXY(110, 222); $this->Cell(0,0,$C_translate->translate('pdf_current_charges','setup_invoice'));
- $this->SetXY(201, 222); $this->Cell(0,0, $this->_currency($this->invoice['total_amt']),0,0,'R'); // draw at the top
- }
-
- function drawInvoiceDueAmt() {
- global $C_translate;
- $this->SetFont('times','',11);
-
- $this->SetFont('arial','',9);
- $this->SetXY(110, 226); $this->Cell(0,0,$C_translate->translate('pdf_amount_due_by','setup_invoice').date(UNIX_DATE_FORMAT, $this->invoice['due_date']));
- $this->SetXY(201, 226); $this->Cell(0,0, $this->_currency($this->invoiceDueAmt),0,0,'R');
-
- $this->SetXY(110, 230); $this->Cell(0,0,$C_translate->translate('pdf_make_check','setup_invoice'));
- $this->SetXY(110, 234); $this->Cell(0,0,$this->companyName);
- }
-
- /**
- * Called before begining to loop the invoice_item table. Used to set initial values.
- */
- function drawLineItems_pre($iteration) {
- $this->iteration = $iteration;
- if($iteration>1)
- return false;
-
- # Include the voip class
- include_once(PATH_MODULES.'voip/voip.inc.php');
- $this->v = new voip;
- $this->i = 0;
- $this->y = 0;
- return true;
- }
-
- /**
- * Called once per line item to add to the PDF invoice. This function serves to
- * direct each iteration to a different function which handles a specific piece
- * of the PDF building puzzle.
- */
- function drawLineItems(&$db, &$line) {
- switch($this->iteration) {
- case 0:
- $this->drawLineItems_0($db, $line);
- break;
- case 1:
- $this->drawLineItems_1($db, $line);
- break;
- default:
- echo 'Unknown PDF iteration encountered. Halting.';
- exit;
- }
- }
-
- /**
- * Draws the non-VoIP related items for iteration 0.
- */
- function drawLineItems_0(&$db, &$line) {
- global $C_translate;
- if ($line['price_type'] == 0 && $line['item_type']==5)
- return;
-
- if ($this->i == 0 || $this->i%51 == 0) {
- $this->AddPage();
-
- $this->SetFont('arial','B',12);
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_itemized_charges','setup_invoice'));
- $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R');
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$this->invoice['id'],0,0,'C');
-
- # Draw table headers
- $this->SetFont('arial','B',8);
- $this->SetXY(9,20);
- $this->Cell(0,0,$C_translate->translate('pdf_item_description','setup_invoice'));
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_quantity','setup_invoice'));
- $this->SetX(170);
- $this->Cell(10,0,$C_translate->translate('pdf_item_cost','setup_invoice'),0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R');
- $this->Line(9,21,200,21);
- $this->y = 24;
- $this->SetY($this->y);
- }
-
- $this->SetFont('arial','',8);
- $this->SetX(9);
- $this->Cell(0,0, $line['name']);
- $this->SetX(170);
- $this->Cell(10,0, $this->_currency($line['price_base']),0,0,'R');
- $this->SetX(145);
- $this->Cell(10,0, $line['qty'],0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['total_amt']), 0,0,'R');
- $this->y += 5;
- $this->SetY($this->y);
- $this->i++;
- }
-
- /**
- * Draws the VoIP Calling Detail for Iteration 1.
- */
- function drawLineItems_1(&$db, &$line) {
- global $C_translate;
- if($this->show_itemized != 1) return;
- if($line['price_type'] != 0 || $line['item_type'] != 5)
- return;
-
- if ($this->i == 0 || $this->i%51 == 0) {
- $this->AddPage();
-
- $this->SetFont('arial','B',12);
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_itemized_calls','setup_invoice'));
- $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R');
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$this->invoice['id'],0,0,'C');
-
- # Draw table headers
- $this->SetFont('arial','B',8);
- $this->SetXY(9,20);
- $this->Cell(0,0,$C_translate->translate('pdf_item_from','setup_invoice'));
- $this->SetX(69);
- $this->Cell(0,0,$C_translate->translate('pdf_item_to','setup_invoice'));
- $this->SetX(119);
- $this->Cell(0,0,'Date & Time');
- $this->SetX(160);
- $this->Cell(10,0,'Seconds' /*$C_translate->translate('pdf_item_min','setup_invoice')*/,0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R');
- $this->Line(9,21,200,21);
- $this->y = 24;
- $this->SetY($this->y);
- }
-
- if ($line['price_type'] != 0) {
- $this->SetFont('arial','I',6);
- } else {
- $this->SetFont('arial','',6);
- }
-
- $val = $line['name'];
- if (strlen($line['attr'])) {
- $val = "";
- $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
- foreach ($atrs as $a) {
- $parts = preg_split("/==/", $a);
- switch ($parts[0]) {
- case "Destination":
- $this->SetX(69);
- $this->Cell(0,0,$parts[1]);
- $cc = ""; $npa = ""; $nxx = ""; $e164 = "";
- if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) {
- $this->SetX(89);
- $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20));
- }
- break;
- case "Source":
- $this->SetX(9);
- $this->Cell(0,0,$parts[1]);
- $cc = ""; $npa = ""; $nxx = ""; $e164 = "";
- if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) {
- $this->SetX(29);
- $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20));
- }
- break;
- case "parent_service_id":
- $sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::");
- $rstmp = $db->Execute($sql);
- $atrs2 = split("\r\n", $rstmp->fields['prod_attr']);
- foreach ($atrs2 as $a2) {
- $parts2 = split("==", $a2);
- switch ($parts2[0]) {
- case "station":
- case "ported":
- $val = $line['name']." for ".$parts2[1];
- break;
- default:
- break;
- }
- }
- break;
- case "station":
- case "ported":
- $val = $line['name']." for ".$parts[1];
- break;
- case "date_orig":
- $this->SetX(119);
- $this->Cell(0,0,date(UNIX_DATE_FORMAT." H:i:s",$parts[1]));
- break;
- case "voip_cdr_id":
- $sql = "SELECT billsec, amount FROM ".AGILE_DB_PREFIX."voip_cdr WHERE site_id=".DEFAULT_SITE." AND id=".$parts[1];
- $row = $db->GetRow($sql);
- $this->SetX(160);
- $this->Cell(10,0,$row[0],0,0,'R');
- $this->SetX(160);
- $this->Cell(0,0,$this->_currency($row[1]),0,0,'R');
- $val = "";
- default:
- break;
- }
- }
- }
-
- $this->SetX(9);
- $this->Cell(0,0, $val);
- if ($line['price_type'] == 0) {
- $this->SetX(160);
- //$this->Cell(10,0, $line['qty']." M",0,0,'R');
- } else {
- $q = $line['qty'];
- if(empty($q)) $q = 1;
- $this->SetX(160);
- $this->Cell(10,0, $line['qty'],0,0,'R');
- // }
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R');
- }
- $this->y += 5;
- $this->SetY($this->y);
- $this->i++;
- }
-
- function drawSummaryLineItems($items) {
- global $C_translate;
- #if (!$this->show_itemized) return;
-
- # Include the voip class
- include_once(PATH_MODULES.'voip/voip.inc.php');
- $v = new voip;
- $db = &DB();
-
- $this->SetFont('arial','B',11);
- $y = 70;
- $this->SetY($y);
-
- $this->SetX(9); $this->Cell(0,0,$C_translate->translate('pdf_cur_charge_summary','setup_invoice').$this->dateRange);
- $y += 5;
- $this->SetY($y);
-
- $this->SetFont('arial','',9);
-
- $i=0;
- if(is_array($items)) {
- foreach($items as $line) {
- $val = $line['name'];
- $this->SetX(9);
- if (@$line['item_type'] == 5) {
- $val = $line['quantity'].$C_translate->translate('pdf_combine_minutes','setup_invoice');
- }
- $q = $line['quantity'];
- if(empty($q)) $q = 1;
- $this->Cell(0,0, $q);
- $this->SetX(18);
- $this->Cell(0,0, $val);
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R');
- $y += 5;
- $this->SetY($y);
- $i++;
- if($i > $this->itemsSummaryMax) {
- $this->SetFont('arial','B',11);
- $this->SetX(9);
- $this->Cell(0,0,$C_translate->translate('pdf_summary','setup_invoice'));
- break;
- }
- }
- }
- }
-}
-
-?>
\ No newline at end of file
diff --git a/includes/pdf/pdf_invoice_voip.inc.php b/includes/pdf/pdf_invoice_voip.inc.php
deleted file mode 100644
index be1b90a7..00000000
--- a/includes/pdf/pdf_invoice_voip.inc.php
+++ /dev/null
@@ -1,321 +0,0 @@
-pageType == 2)
- return PATH_INCLUDES."pdf/invoice2.pdf";
- return PATH_INCLUDES."pdf/invoice1.pdf";
- }
-
- // draw the logo
- function drawCompanyLogo() {
- $x = 9;
- $y = 7;
- $width = 50;
- if(is_file(PATH_THEMES.DEFAULT_THEME.'/images/invoice_logo.png'))
- $this->Image(PATH_THEMES.DEFAULT_THEME.'/images/invoice_logo.png',$x,$y,$width);
- }
-
- // draw the company address
- function drawCompanyAddress() {
- global $C_translate;
- // add the company address on the payment stub (1)
- $this->SetFont('arial','B', 13);
- $this->SetXY(18,202); $this->Cell(0,0,$C_translate->translate('pdf_payment_coupon','setup_invoice'));
- $this->SetFont('arial','', 8);
- $this->SetXY(18,206); $this->Cell(0,0,$C_translate->translate('pdf_return1','setup_invoice'));
- $this->SetXY(18,209); $this->Cell(0,0,$C_translate->translate('pdf_return2','setup_invoice').$this->companyName);
-
- $this->SetFont('arial','', 10);
- $x = 18; $y = 216;
- if ($this->pageType == 2) {
- $y = 230;
- }
- $this->SetXY(18,$y); $this->Cell(0,0, $this->companyName); $y += 4;
- $this->SetXY(18,$y); $this->Cell(0,0, $this->companyAddress); $y += 4;
- $this->SetXY(18,$y); $this->Cell(0,0, $this->companyCity. ", ". $this->companyState . " " . $this->companyZip); $y += 4;
- }
-
- function drawAccountMailing() {
- // add the company address on the payment stub (2)
- $this->SetFont('arial','B', 10);
-
- if($this->billToCompany && !empty($this->account['company']))
- $name = $this->account['company'];
- else
- $name = $this->account['first_name'].' '.$this->account['last_name'];
-
- $x = 110; $y = 248;
- if ($this->pageType == 2) {
- $x = 18; $y = 268;
- }
- $this->SetXY($x,$y); $this->Cell(0,0, html_entity_decode($name,ENT_NOQUOTES)); $y += 4;
- $this->SetXY($x,$y); $this->Cell(0,0, $this->account['address1'] .' '. $this->account['address2']); $y += 4;
- $this->SetXY($x,$y); $this->Cell(0,0, $this->account['city'] . ", ". $this->account['state'] . " " . $this->account['zip']); $y += 4;
- }
-
- function drawAccountId() {
- global $C_translate;
- $this->SetFont('arial','',11);
- $this->SetXY(110, 205); $this->Cell(0,0,$C_translate->translate('pdf_account_number','setup_invoice'));
- $this->SetXY(150, 205);
- $this->Cell(0,0, $this->account['id']); // add to bottom of invoice
-
- }
-
- function drawAccountUsername() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95, 18); $this->Cell(0,0,$C_translate->translate('pdf_account_username','setup_invoice'));
- $this->SetXY(201,18); $this->Cell(0,0,$this->account['username'],0,0,'R');
-
- $this->SetFont('arial','',11);
- $this->SetXY(95,30);
- $contact = $C_translate->translate('pdf_contact','setup_invoice')."\n";
- $contact .= $C_translate->translate('pdf_contact_online','setup_invoice').$this->contact_us_url."\n";
- $contact .= $C_translate->translate('pdf_contact_phone','setup_invoice').$this->contact_us_phone;
- $this->MultiCell(0,4,$contact);
-
- $this->SetXY(9,170);
- $this->MultiCell(0, 4, str_replace('\n',"\n",$this->news));
- }
-
- function drawAccountAddress() {
- $this->SetFont('times','B',11);
- }
-
- function drawInvoiceNo() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95, 14); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number','setup_invoice'));
- $this->SetXY(201, 14); $this->Cell(0,0, $this->invoice['id'],0,0,'R'); // add to bottom of invoice
-
- $this->SetFont('arial','',11);
- $this->SetXY(110, 210); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number','setup_invoice'));
- $this->SetXY(150, 210); $this->Cell(0,0, $this->invoice['id']); // add to bottom of invoice
- }
-
- function drawInvoiceDueDate() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95,10); $this->Cell(0,0,$C_translate->translate('pdf_billing_date','setup_invoice'));
- $this->SetXY(201,10); $this->Cell(0,0, date(UNIX_DATE_FORMAT, $this->invoice['due_date']),0,0,'R'); // draw at top of invoice
-
- $this->SetFont('arial','',11);
- $this->SetXY(110, 200); $this->Cell(0,0,$C_translate->translate('pdf_bill_date','setup_invoice'));
- $this->SetXY(150, 200);
- $this->Cell(0,0, date(UNIX_DATE_FORMAT, $this->invoice['due_date'])); // draw at the bottom of invoice
- }
-
- function drawInvoiceTotalAmt() {
- global $C_translate;
- $this->SetFont('arial','B',11);
- $this->SetXY(95, 22); $this->Cell(0,0,$C_translate->translate('pdf_current_charges','setup_invoice'));
- $this->SetXY(201, 22); $this->Cell(0,0, $this->_currency($this->invoice['total_amt']),0,0,'R'); // draw at the top
-
- $this->SetFont('arial','',9);
- $this->SetXY(110, 222); $this->Cell(0,0,$C_translate->translate('pdf_current_charges','setup_invoice'));
- $this->SetXY(201, 222); $this->Cell(0,0, $this->_currency($this->invoice['total_amt']),0,0,'R'); // draw at the top
- }
-
- function drawInvoiceDueAmt() {
- global $C_translate;
- $this->SetFont('times','',11);
-
- $this->SetFont('arial','',9);
- $this->SetXY(110, 226); $this->Cell(0,0,$C_translate->translate('pdf_amount_due_by','setup_invoice').date(UNIX_DATE_FORMAT, $this->invoice['due_date']));
- $this->SetXY(201, 226); $this->Cell(0,0, $this->_currency($this->invoiceDueAmt),0,0,'R');
-
- $this->SetXY(110, 230); $this->Cell(0,0,$C_translate->translate('pdf_make_check','setup_invoice'));
- $this->SetXY(110, 234); $this->Cell(0,0,$this->companyName);
- }
-
- /**
- * Called before begining to loop the invoice_item table. Used to set initial values.
- */
- function drawLineItems_pre($iteration) {
- $this->iteration = $iteration;
- if($iteration>0)
- return false;
- # Include the voip class
- include_once(PATH_MODULES.'voip/voip.inc.php');
- $this->v = new voip;
- $this->i = 0;
- $this->y = 0;
- return true;
- }
-
- /**
- * Called once per line item to add to the PDF invoice.
- */
- function drawLineItems(&$db, &$line) {
- global $C_translate;
- if ($this->i == 0 || $this->i%51 == 0) {
- $this->AddPage();
-
- $this->SetFont('arial','B',12);
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_itemized_calls','setup_invoice'));
- $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R');
- $this->SetXY(3,10); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$this->invoice['id'],0,0,'C');
-
- # Draw table headers
- $this->SetFont('arial','B',8);
- $this->SetXY(9,20);
- $this->Cell(0,0,$C_translate->translate('pdf_item_from','setup_invoice'));
- $this->SetX(75);
- $this->Cell(0,0,$C_translate->translate('pdf_item_to','setup_invoice'));
- $this->SetX(160);
- $this->Cell(10,0,$C_translate->translate('pdf_item_min','setup_invoice'),0,0,'R');
- $this->SetX(145);
- $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R');
- $this->Line(9,21,200,21);
- $this->y = 24;
- $this->SetY($this->y);
- }
-
- if ($line['price_type'] != 0) {
- $this->SetFont('arial','I',8);
- } else {
- $this->SetFont('arial','',8);
- }
-
- $val = $line['name'];
- if (strlen($line['attr'])) {
- $val = "";
- $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr']));
- foreach ($atrs as $a) {
- $parts = preg_split("/==/", $a);
- switch ($parts[0]) {
- case "Destination":
- $this->SetX(75);
- $this->Cell(0,0,$parts[1]);
- $cc = ""; $npa = ""; $nxx = ""; $e164 = "";
- if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) {
- $this->SetX(115);
- $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20));
- }
- break;
- case "Source":
- $this->SetX(9);
- $this->Cell(0,0,$parts[1]);
- $cc = ""; $npa = ""; $nxx = ""; $e164 = "";
- if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) {
- $this->SetX(39);
- $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20));
- }
- break;
- case "parent_service_id":
- $sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::");
- $rstmp = $db->Execute($sql);
- $atrs2 = preg_split("/\r\n/", $rstmp->fields['prod_attr']);
- foreach ($atrs2 as $a2) {
- $parts2 = preg_split("/==/", $a2);
- switch ($parts2[0]) {
- case "station":
- case "ported":
- $val = $line['name']." for ".$parts2[1];
- break;
- default:
- break;
- }
- }
- break;
- case "station":
- case "ported":
- $val = $line['name']." for ".$parts[1];
- break;
- default:
- break;
- }
- }
- }
-
- $this->SetX(9);
- $this->Cell(0,0, $val);
- if ($line['price_type'] == 0) {
- $this->SetX(160);
- $this->Cell(10,0, $line['qty']." M",0,0,'R');
- } else {
- $q = $line['qty'];
- if(empty($q)) $q = 1;
- $this->SetX(160);
- $this->Cell(10,0, $line['qty'],0,0,'R');
- }
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['total_amt']), 0,0,'R');
- $this->y += 5;
- $this->SetY($this->y);
- $this->i++;
- }
-
- function drawSummaryLineItems($items) {
- global $C_translate;
- if (!$this->show_itemized) return;
-
- # Include the voip class
- include_once(PATH_MODULES.'voip/voip.inc.php');
- $v = new voip;
- $db = &DB();
-
- $this->SetFont('arial','B',11);
- $y = 70;
- $this->SetY($y);
-
- $this->SetX(9); $this->Cell(0,0,$C_translate->translate('pdf_cur_charge_summary','setup_invoice').$this->dateRange);
- $y += 5;
- $this->SetY($y);
-
- $this->SetFont('arial','',9);
-
- $i=0;
- if(is_array($items)) {
- foreach($items as $line) {
- $val = $line['name'];
- $this->SetX(9);
- if (@$line['item_type'] == 5) {
- $val = $line['quantity'].$C_translate->translate('pdf_combine_minutes','setup_invoice');
- }
- $q = $line['quantity'];
- if(empty($q)) $q = 1;
- $this->Cell(0,0, $q);
- $this->SetX(18);
- $this->Cell(0,0, $val);
- $this->SetX(145);
- $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R');
- $y += 5;
- $this->SetY($y);
- $i++;
- if($i > $this->itemsSummaryMax) {
- $this->SetFont('arial','B',11);
- $this->SetX(9);
- $this->Cell(0,0,$C_translate->translate('pdf_summary','setup_invoice'));
- break;
- }
- }
- }
- }
-}
-
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.account.php b/includes/smarty/plugins/block.account.php
deleted file mode 100644
index 6d98de30..00000000
--- a/includes/smarty/plugins/block.account.php
+++ /dev/null
@@ -1,20 +0,0 @@
-account($resource);
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.group.php b/includes/smarty/plugins/block.group.php
deleted file mode 100644
index dd91e05f..00000000
--- a/includes/smarty/plugins/block.group.php
+++ /dev/null
@@ -1,38 +0,0 @@
-qstr(DEFAULT_SITE) . ' AND
- status = ' . $db->qstr('1') . ' AND
- id = ' . $db->qstr($id);
- @$result = $db->Execute($sql);
- $do = false;
- if(@$result->RecordCount() > 0) {
- global $C_auth;
- @$arr = unserialize($result->fields['group_avail']);
- for($i=0; $iauth_group_by_id($arr[$i]))
- $do = true;
- }
-
- if($do) {
- echo $resource;
- } else {
- echo @$params["msg"];
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.htmlarea.php b/includes/smarty/plugins/block.htmlarea.php
deleted file mode 100644
index 4375931e..00000000
--- a/includes/smarty/plugins/block.htmlarea.php
+++ /dev/null
@@ -1,55 +0,0 @@
-'.$resource.'
- ';
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.is_auth.php b/includes/smarty/plugins/block.is_auth.php
deleted file mode 100644
index 6a315d89..00000000
--- a/includes/smarty/plugins/block.is_auth.php
+++ /dev/null
@@ -1,23 +0,0 @@
-auth_method_by_name($params["module"], $params["method"]))
- echo $resource;
- else
- echo $params["alt"];
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.is_auth_method.php b/includes/smarty/plugins/block.is_auth_method.php
deleted file mode 100644
index 3d975959..00000000
--- a/includes/smarty/plugins/block.is_auth_method.php
+++ /dev/null
@@ -1,25 +0,0 @@
-auth_method_by_name($params["module"], $params["method"]))
- echo $resource;
- else if(!empty($params["alt"]))
- echo $params["alt"];
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.panel.php b/includes/smarty/plugins/block.panel.php
deleted file mode 100644
index 2c8d7f6a..00000000
--- a/includes/smarty/plugins/block.panel.php
+++ /dev/null
@@ -1,39 +0,0 @@
- $_val)
- if(empty($_ignore["$_key"]))
- $vals .= " $_key=\"$_val\"";
- else
- $$_key = $_val;
-
- $pre = "<{$type}";
- if(!$show)
- $pre .= " style=\"display:none\"";
- $pre .= $vals;
- $pre .= ">\r\n";
-
- $pre .= $resource;
-
- $pre .= "\r\n$type>";
-
- return $pre;
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/block.translate.php b/includes/smarty/plugins/block.translate.php
deleted file mode 100644
index 15a100b9..00000000
--- a/includes/smarty/plugins/block.translate.php
+++ /dev/null
@@ -1,38 +0,0 @@
-value["$module"]["$key"] = $val;
- }
-
-
-
- $resource = trim($resource);
- if ($resource != '') {
- # strip whitespaces from the resouce identifier
- echo $C_translate->translate($resource,$module,'');
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.ab_version.php b/includes/smarty/plugins/function.ab_version.php
deleted file mode 100644
index 4bee78f2..00000000
--- a/includes/smarty/plugins/function.ab_version.php
+++ /dev/null
@@ -1,19 +0,0 @@
-smarty();
-
-}
-
-?>
diff --git a/includes/smarty/plugins/function.assign.php b/includes/smarty/plugins/function.assign.php
deleted file mode 100644
index 0eb29602..00000000
--- a/includes/smarty/plugins/function.assign.php
+++ /dev/null
@@ -1,30 +0,0 @@
-trigger_error("assign: missing 'var' parameter");
- return;
- }
-
- if (!in_array('value', array_keys($params))) {
- $smarty->trigger_error("assign: missing 'value' parameter");
- return;
- }
-
- $smarty->assign($var, $value);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/includes/smarty/plugins/function.block.php b/includes/smarty/plugins/function.block.php
deleted file mode 100644
index 54aadcc8..00000000
--- a/includes/smarty/plugins/function.block.php
+++ /dev/null
@@ -1,29 +0,0 @@
-display('file:' . PATH_THEMES . '' . THEME_NAME . '/' . $smarty->template_dir . '' . $block . '.tpl');
- } else {
- if(is_file(PATH_THEMES . '' . THEME_NAME . '/blocks/' . $module . '/' . $block . '.tpl'))
- $this->display('file:'. PATH_THEMES . '' . THEME_NAME . '/blocks/' . $module . '/' . $block . '.tpl' );
- elseif (is_file(PATH_THEMES . '' . DEF_THEME_N . '/blocks/' . $module . '/' . $block . '.tpl'))
- $this->display('file:' . PATH_THEMES . '' . DEF_THEME_N . '/blocks/' . $module . '/' . $block . '.tpl');
- elseif (is_file(PATH_THEMES . 'default/blocks/' . $module . '/' . $block . '.tpl'))
- $this->display('file:' . PATH_THEMES . 'default/blocks/' . $module . '/' . $block . '.tpl');
- else
- $this->display('file:'. PATH_THEMES . '' . DEF_THEME_N . '/blocks/core/invalid_page.tpl');
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.date.php b/includes/smarty/plugins/function.date.php
deleted file mode 100644
index 8279b1da..00000000
--- a/includes/smarty/plugins/function.date.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.date_time.php b/includes/smarty/plugins/function.date_time.php
deleted file mode 100644
index 3332f754..00000000
--- a/includes/smarty/plugins/function.date_time.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.db_lookup.php b/includes/smarty/plugins/function.db_lookup.php
deleted file mode 100644
index c5803b54..00000000
--- a/includes/smarty/plugins/function.db_lookup.php
+++ /dev/null
@@ -1,33 +0,0 @@
-trigger_error("db_lookup: attribute 'id' required");
- return false;
- }
- if (empty($table)) {
- $smarty->trigger_error("db_lookup: attribute 'table' required");
- return false;
- }
- if (empty($field)) {
- $smarty->trigger_error("db_lookup: attribute 'field' required");
- return false;
- }
-
- $db =& DB();
- $rs = $db->Execute(sqlSelect($db, $table, $field, "id=::".$id."::"));
- return $rs->fields[0];
-}
-
-?>
diff --git a/includes/smarty/plugins/function.exe.php b/includes/smarty/plugins/function.exe.php
deleted file mode 100644
index 94111fd2..00000000
--- a/includes/smarty/plugins/function.exe.php
+++ /dev/null
@@ -1,22 +0,0 @@
-exe_noauth($module,$method);
- else
- echo $m->exe($module,$method);
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.graph.php b/includes/smarty/plugins/function.graph.php
deleted file mode 100644
index f9e0e8eb..00000000
--- a/includes/smarty/plugins/function.graph.php
+++ /dev/null
@@ -1,41 +0,0 @@
-translate($title,$module);
- if(!empty($trans)) $title = $trans;
- }
-
- if($show === false) $display = 'style="display:none"';
-
- global $VAR;
- $vars = '';
- foreach($VAR as $a => $b) $vars .= "&{$a}={$b}";
-
-
- echo "";
- echo "
$title ";
- echo InsertChart ( "includes/charts/charts.swf", "includes/charts/charts_library", URL."ajax.php?do[]={$module}:{$method}{$vars}", $width, $height, $color, $transparency);
- echo "
";
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.grid_bool.php b/includes/smarty/plugins/function.grid_bool.php
deleted file mode 100644
index c60d880f..00000000
--- a/includes/smarty/plugins/function.grid_bool.php
+++ /dev/null
@@ -1,20 +0,0 @@
-
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.grid_column_heading.php b/includes/smarty/plugins/function.grid_column_heading.php
deleted file mode 100644
index 84c4b047..00000000
--- a/includes/smarty/plugins/function.grid_column_heading.php
+++ /dev/null
@@ -1,31 +0,0 @@
-';
- return;
- }
-
- echo ' ';
- echo ' ';
-
- global $C_translate;
-
- if($column == 'id')
- echo ''.$C_translate->translate("id").' ';
- else
- echo ''.$C_translate->translate("field_".$column,$module).' ';
-}
-
-?>
diff --git a/includes/smarty/plugins/function.grid_column_refine.php b/includes/smarty/plugins/function.grid_column_refine.php
deleted file mode 100644
index 37913e7f..00000000
--- a/includes/smarty/plugins/function.grid_column_refine.php
+++ /dev/null
@@ -1,26 +0,0 @@
-';
- echo ' ';
-
- if($column == 'id')
- echo ' ';
- else
- echo ' ';
-}
-
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_bool.php b/includes/smarty/plugins/function.html_bool.php
deleted file mode 100644
index c8ce124d..00000000
--- a/includes/smarty/plugins/function.html_bool.php
+++ /dev/null
@@ -1,28 +0,0 @@
-';
-
- return $ret;
-
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_button.php b/includes/smarty/plugins/function.html_button.php
deleted file mode 100644
index 083b3a98..00000000
--- a/includes/smarty/plugins/function.html_button.php
+++ /dev/null
@@ -1,58 +0,0 @@
- $_val) $$_key = $_val;
-
- # translate name
- global $C_translate;
- $trans = $C_translate->translate($name, $module);
- if(!empty($trans)) $name = $trans;
-
- # allow multiple clicks?
- if(!$allowdclick) $action = "this.disabled=true; this.value='". $C_translate->translate('processing') ."';" . $action;
-
- # change state(s)
- $t = 0;
- if($hide) {
- $e = 'Fade';
- if(ereg(',', $hide)) $hides = explode(',', $hide); else $hides = Array($hide);
- foreach($hides as $element) {
- if(ereg('\|', $element)) {
- $el = explode('|', $element);
- $action .= " new Effect.{$el[2]}('{$el[0]}', {duration: {$el[1]}}); ";
- } else {
- $action .= " $('{$element}').style.display='none'; ";
- }
- }
- }
- if($show) {
- $e = 'Appear';
- if(ereg(',', $show)) $shows = explode(',', $show); else $shows = Array($show);
- foreach($shows as $element) {
- if(ereg('\|', $element)) {
- $el = explode('|', $element);
- $action .= " new Effect.{$el[2]}('{$el[0]}', {duration: {$el[1]}}); ";
- } else {
- $action .= " $('{$element}').style.display='block'; ";
- }
- }
- }
-
- $html = " ";
-
- return $html;
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_date.php b/includes/smarty/plugins/function.html_date.php
deleted file mode 100644
index 0b1475a1..00000000
--- a/includes/smarty/plugins/function.html_date.php
+++ /dev/null
@@ -1,28 +0,0 @@
-';
-
- # set the date to current date if 'now' is set as default
- if($default == 'now') $default = date(UNIX_DATE_FORMAT);
-
- if(empty($id)) $id = $field;
- if(empty($trigger)) $trigger = $id;
-
- $ret = ' ';
- $ret .= ' ';
- return $ret;
-
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_link.php b/includes/smarty/plugins/function.html_link.php
deleted file mode 100644
index d3bb2065..00000000
--- a/includes/smarty/plugins/function.html_link.php
+++ /dev/null
@@ -1,77 +0,0 @@
- $_val)
- if(empty($_ignore["$_key"]))
- $vals .= " $_key=\"$_val\"";
- else
- $$_key = $_val;
-
- foreach($params as $_key => $_val) $$_key = $_val;
-
-
- # change state(s) (hide)
- $t = 0;
- if($hide) {
- $e = 'Fade';
- if(ereg(',', $hide)) $hides = explode(',', $hide); else $hides = Array($hide);
- foreach($hides as $element) {
- if(ereg('\|', $element)) {
- $el = explode('|', $element);
- $action .= " new Effect.{$el[2]}('{$el[0]}', {duration: {$el[1]}}); ";
- } else {
- $action .= " $('{$element}').style.display='none'; ";
- }
- }
- }
-
- # change state(s) (show)
- if($show) {
- $e = 'Appear';
- if(ereg(',', $show)) $shows = explode(',', $show); else $shows = Array($show);
- foreach($shows as $element) {
- if(ereg('\|', $element)) {
- $el = explode('|', $element);
- $action .= " new Effect.{$el[2]}('{$el[0]}', {duration: {$el[1]}}); ";
- } else {
- $action .= " $('{$element}').style.display='block'; ";
- }
- }
- }
-
- # translate name
- global $C_translate;
- $trans = $C_translate->translate($name, $module);
- if(!empty($trans)) $name = $trans;
-
- if(empty($link)) $link = "#";
-
- $html = "";
- $html .= $name;
- $html .= " ";
-
- return $html;
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu.php b/includes/smarty/plugins/function.html_menu.php
deleted file mode 100644
index 2dc5bc1f..00000000
--- a/includes/smarty/plugins/function.html_menu.php
+++ /dev/null
@@ -1,41 +0,0 @@
-Execute( $sql = sqlSelect($db, $assoc_table, "id,".$assoc_field, $conditions, $assoc_field));
-
- #echo $sql;
-
- $return = '';
- if($default == "all" || $blank) $return .= ' ';
- if($rs && $rs->RecordCount() > 0)
- {
- while(!$rs->EOF)
- {
- $return .= 'fields['id']) $return .= "selected";
- $return .= '>' . $rs->fields["$assoc_field"] . ' ';
- $rs->MoveNext();
- }
- } else {
- if( $default != "all") $return .= ' ';
- }
-
- $return .= ' ';
- echo $return;
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu_files.php b/includes/smarty/plugins/function.html_menu_files.php
deleted file mode 100644
index eaf4ffc8..00000000
--- a/includes/smarty/plugins/function.html_menu_files.php
+++ /dev/null
@@ -1,80 +0,0 @@
-';
- if($default == "all")
- $return .= ' ';
- $i = 0;
- for($i=0; $i<$count; $i++)
- {
- $return .= '';
- }
- if($count==0 && $default != 'all') $return .= ' ';
- $return .= '';
-
- echo $return;
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu_multi.php b/includes/smarty/plugins/function.html_menu_multi.php
deleted file mode 100644
index 50842f13..00000000
--- a/includes/smarty/plugins/function.html_menu_multi.php
+++ /dev/null
@@ -1,51 +0,0 @@
-Execute( $sql = sqlSelect($db, $assoc_table, "id,".$assoc_field, $conditions, $assoc_field));
-
- if(empty($default)) $default = Array('');
- elseif (is_array($default)) $default = $default;
- elseif (is_numeric($default)) $default[] = $default;
- elseif (is_string($default)) $default = unserialize($default);
- else $default = Array('');
-
-
- if($default == "all") $return .= ' ';
- $i=0;
- if($rs && $rs->RecordCount() > 0) {
- while(!$rs->EOF) {
- $return .= 'fields["id"]) $return .= " selected"; break; }
- $return .= '>' . $rs->fields["$assoc_field"] . ' ';
- $i++;
- $rs->MoveNext();
- }
- } else {
- if( $default != "all") $return .= ' ';
- }
-
- $return .= '';
-
- if($i < $size) $size = $i++;
- echo '' . $return;
-
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu_product_host.php b/includes/smarty/plugins/function.html_menu_product_host.php
deleted file mode 100644
index 81dc9064..00000000
--- a/includes/smarty/plugins/function.html_menu_product_host.php
+++ /dev/null
@@ -1,41 +0,0 @@
-Execute($q);
- if($result && $result->RecordCount() > 0)
- {
- echo "";
- while(!$result->EOF) {
- $sel='';
- foreach($default as $cur) if ($cur == $result->fields['id']) $sel = "selected";
- echo "fields['id']}\"$sel>{$result->fields['sku']} ";
- $result->MoveNext();
- }
- echo " ";
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu_product_subscription.php b/includes/smarty/plugins/function.html_menu_product_subscription.php
deleted file mode 100644
index 35c04245..00000000
--- a/includes/smarty/plugins/function.html_menu_product_subscription.php
+++ /dev/null
@@ -1,42 +0,0 @@
-Execute($q);
- if($result && $result->RecordCount() > 0)
- {
- echo "";
- while(!$result->EOF) {
- $sel='';
- foreach($default as $cur) if ($cur == $result->fields['id']) $sel = "selected";
- echo "fields['id']}\"$sel>{$result->fields['sku']} ";
- $result->MoveNext();
- }
- echo " ";
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu_search_expr.php b/includes/smarty/plugins/function.html_menu_search_expr.php
deleted file mode 100644
index a0989013..00000000
--- a/includes/smarty/plugins/function.html_menu_search_expr.php
+++ /dev/null
@@ -1,63 +0,0 @@
-';
- foreach($options as $opt) echo ''.$optionsTxt["$opt"].' ';
- echo ' ';
-
- echo ' ';
- }
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_menu_sub.php b/includes/smarty/plugins/function.html_menu_sub.php
deleted file mode 100644
index 63862642..00000000
--- a/includes/smarty/plugins/function.html_menu_sub.php
+++ /dev/null
@@ -1,96 +0,0 @@
-Execute( sqlSelect($db,$assoc_table,"id,$parent_id,".$assoc_field, $conditions, "$parent_id,$assoc_field"));
-
- # Get current id
- if(!empty($VAR['id'])) $cid = ereg_replace(",","", $VAR['id']); else $current = '';
-
- # Loop and put in array
- while(!$result->EOF) {
- if($result->fields["$parent_id"] == "" || $result->fields["$parent_id"] == 0 || $result->fields["$parent_id"] == $result->fields['id']) {
- $arr[0][] = $result->fields;
- } else {
- $arr["{$result->fields["$parent_id"]}"][] = $result->fields;
- }
-
- # get current parent_id
- if($cid > 0 && $result->fields['id'] == $cid)
- $current = $result->fields["$parent_id"];
- $result->MoveNext();
- }
-
- $option = '';
- $dirpre = ' \\ ';
-
- for($i=0; $i'.$dir.'';
-
- # get the sub-records # (LEVEL 2)
- if(isset($arr[$id])) {
- for($ii=0; $ii'.$dir.'';
- }
-
- # get the sub-records # (LEVEL 3)
- if(isset($arr[$idx])) {
- for($iii=0; $iii'.$dir.'';
- }
-
- # get the sub-records # (LEVEL 4)
- if(isset($arr[$idx2])) {
- for($iiii=0; $iiii'.$dir.'';
- }
-
- # get the sub-records # (LEVEL 5)
- if(isset($arr[$idx3])) {
- for($iiiii=0; $iiiii'.$dir.'';
- }
- }
- }
- }
- }
- }
-
- echo "";
- echo "\\ ";
- echo $option;
- echo ' ';
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_select_account.php b/includes/smarty/plugins/function.html_select_account.php
deleted file mode 100644
index d5ca3fe4..00000000
--- a/includes/smarty/plugins/function.html_select_account.php
+++ /dev/null
@@ -1,49 +0,0 @@
-Execute($q);
- if($result->RecordCount() > 0)
- $val = $result->fields['first_name'].' '.$result->fields['last_name'];
-
- if(!empty($val)) {
- # Get
-
- }
- } else {
- $val = '';
- }
-
- if(empty($val)) {
- echo '
-
-
-
-
- ';
- } else {
- echo "{$val} ";
- echo " ";
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.html_select_affiliate.php b/includes/smarty/plugins/function.html_select_affiliate.php
deleted file mode 100644
index 451a40bb..00000000
--- a/includes/smarty/plugins/function.html_select_affiliate.php
+++ /dev/null
@@ -1,56 +0,0 @@
-Execute($q);
- if($result != false && $result->RecordCount() > 0) $val = $result->fields['first_name'].' '.$result->fields['last_name'];
- } else {
- $val = '';
- }
-
- echo '
-
-
-
-
- ';
-
- if(!empty($val)) {
- // display unselect option
- echo ' - ';
- }
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.input_text.php b/includes/smarty/plugins/function.input_text.php
deleted file mode 100644
index 3c79c7c6..00000000
--- a/includes/smarty/plugins/function.input_text.php
+++ /dev/null
@@ -1,21 +0,0 @@
-";
-}
-?>
diff --git a/includes/smarty/plugins/function.osb.php b/includes/smarty/plugins/function.osb.php
new file mode 100644
index 00000000..7789a30d
--- /dev/null
+++ b/includes/smarty/plugins/function.osb.php
@@ -0,0 +1,445 @@
+',$id,$default);
+ printf(' ',$name,'account',$val);
+ printf('
',$id);
+ printf('',$name,$id,$module);
+
+ } else {
+ printf('',$module,$default,$val);
+ printf(' ',$id,$name,$default);
+ }
+}
+
+/**
+ * HTML Account Selector
+ *
+ * If passed a default ID (and it exists), that will be rendered, otherwise a javascript selection box is rendered.
+ */
+function osb_html_select_account($params,&$smarty) {
+ if (! $params['name']) {
+ printf('MISSING name:%s',__METHOD__);
+ return;
+ }
+
+ $module = isset($params['module']) ? $params['module'] : 'account';
+ $default = isset($params['default']) ? $params['default'] : '';
+ $id = isset($params['id']) ? $params['id'] : sprintf('%s_id',$params['name']);
+ $val = '';
+
+ if ($default) {
+ $db = &DB();
+ $result = $db->Execute(sqlSelect($db,'account','first_name,last_name',array('id'=>$default)));
+
+ if ($result->RecordCount() > 0)
+ $val = sprintf('%s %s',$result->fields['first_name'],$result->fields['last_name']);
+ }
+
+ return osb_html_select($val,$id,$params['name'],$default,$module);
+}
+
+/**
+ * HTML Affiliate Selector
+ *
+ * If passed a default ID (and it exists), that will be rendered, otherwise a javascript selection box is rendered.
+ * @todo need to create autoselect();
+ */
+function osb_html_select_affiliate($params,&$smarty) {
+ if (! $params['name']) {
+ printf('MISSING name:%s',__METHOD__);
+ return;
+ }
+
+ $module = isset($params['module']) ? $params['module'] : 'affiliate';
+ $default = isset($params['default']) ? $params['default'] : '';
+ $id = isset($params['id']) ? $params['id'] : sprintf('%s_id',$params['name']);
+ $val = '';
+
+ if ($default) {
+ $db = &DB();
+ $sql = sprintf('SELECT DISTINCT {p}affiliate.id,{p}account.first_name,{p}account.last_name,{p}account.username
+ FROM {p}account LEFT JOIN {p}affiliate ON {p}account.id={p}affiliate.account_id
+ WHERE {p}affiliate.id=%s AND {p}affiliate.site_id=%s AND {p}account.site_id=%s',$db->qstr($default),DEFAULT_SITE,DEFAULT_SITE);
+
+ $result = $db->Execute(str_replace('{p}',AGILE_DB_PREFIX,$sql));
+
+ if ($result->RecordCount() > 0)
+ $val = sprintf('%s %s',$result->fields['first_name'],$result->fields['last_name']);
+ }
+
+ return osb_html_select($val,$id,$params['name'],$default,$module);
+}
+
+function osb_html_select_name($params,&$smarty) {
+ if (! $params['name']) {
+ printf('MISSING name:%s',__METHOD__);
+ return;
+ }
+
+ $module = isset($params['module']) ? $params['module'] : '';
+ $table = isset($params['table']) ? $params['table'] : '';
+ $default = isset($params['default']) ? $params['default'] : '';
+ $id = isset($params['id']) ? $params['id'] : sprintf('%s_id',$params['name']);
+ $val = '';
+
+ if ($default) {
+ $db = &DB();
+ $result = $db->Execute($q=sqlSelect($db,$table,'name',array('id'=>$default)));
+
+ if ($result && $result->RecordCount() > 0)
+ $val = $result->fields['name'];
+ }
+
+ return osb_html_select($val,$id,$params['name'],$default,$module);
+}
+
+function osb_autoselect($params,&$smarty) {
+ $module = isset($params['module']) ? $params['module'] : (isset($smarty->_tpl_vars['meth'][0]) ? $smarty->_tpl_vars['meth'][0] : '');
+ $field = isset($params['field']) ? $params['field'] : '';
+ $return = isset($params['return']) ? $params['return'] : '';
+ $default = isset($params['default']) ? $params['default'] : '';
+ $val = '';
+
+ if (! $module || ! $field || ! $return) {
+ printf('MISSING module (%s),field (%s) OR return (%s):%s',$module,$field,$return,__METHOD__);
+ return;
+ }
+
+ if ($default) {
+ $db = &DB();
+ $result = $db->Execute($q=sqlSelect($db,$module,$return.',first_name,last_name',array($return=>$default)));
+
+ if ($result && $result->RecordCount() == 1)
+ $val = sprintf('%s %s',$result->fields['first_name'],$result->fields['last_name']);
+ }
+
+ printf(' ',$field,$field,$default);
+ printf(' ',$field,$field,$val);
+ printf('
',$field);
+ echo ''."\n";
+}
+
+/**
+ * Get list of files from the filesystem, and present in a select list
+ */
+function osb_html_menu_files($params,&$smarty) {
+ if (! $params['name'] || ! $params['path']) {
+ printf('MISSING name OR path:%s',__METHOD__);
+ return;
+ }
+
+ $id = isset($params['id']) ? $params['id'] : $params['name'];
+ $ext = '';
+
+ switch ($params['path']) {
+ case 'affiliate_plugin': $path = sprintf('%s/affiliate/',PATH_PLUGINS); break;
+ case 'checkout_plugin': $path = sprintf('%s/checkout/',PATH_PLUGINS); break;
+ case 'invoice_pdf': $path = sprintf('%s/invoice/PDF/',PATH_MODULES); $ext = '.inc.php'; $pre = 'pdf_invoice_'; break;
+ case 'invoice_pagetype': $path = sprintf('%s%s/invoice/',PATH_THEMES,DEF_THEME_N); $ext = '.pdf'; $pre = 'invoice-'; break;
+ case 'language': $path = sprintf('%s/core/',PATH_LANGUAGE); $ext = '_core.xml'; $cap=1; break;
+ case 'product' : $path = sprintf('%s/product',PATH_PLUGINS); break;
+ case 'product_cat' : $path = sprintf('%s%s/blocks/product_cat',PATH_THEMES,DEF_THEME_N); break;
+ case 'provision_plugin': $path = sprintf('%s/provision/',PATH_PLUGINS); break;
+ case 'static_template': $path = sprintf('%s/default/blocks/static_page/',PATH_THEMES); $ext = '_template.tpl'; $cap=1; break;
+ case 'theme' : $path = PATH_THEMES; break;
+ case 'whois_plugin': $path = sprintf('%s/whois/',PATH_PLUGINS); break;
+
+ default:
+ printf('Unkonwn path: %s',$params['path']);
+ return;
+ }
+
+ $count = 0;
+ $arr = array();
+ $dir = opendir($path);
+ while ($file_name = readdir($dir)) {
+ $display = true;
+
+ if (! in_array($file_name,array('.','..'))) {
+ if ($ext) {
+ $cute = preg_replace("/{$ext}$/",'',$file_name);
+
+ if (! preg_match("/{$ext}$/",$file_name))
+ $display = false;
+ }
+
+ if ($pre) {
+ $cute = preg_replace("/^{$pre}/",'',$cute);
+
+ if (! preg_match("/^{$pre}/",$file_name))
+ $display = false;
+
+ }
+
+ if ($display) {
+ $value = str_replace('_',' ',str_replace('-',' ',$cute));
+
+ if ($cap==1)
+ $value = ucfirst(strtolower($value));
+ elseif ($cap==2)
+ $value = ucwords(strtolower($value));
+ elseif($cap)
+ $value = strtoupper($value);
+
+ $arr[$cute] = $value;
+ }
+ }
+ }
+
+ $return = sprintf('',$id,$params['name']);
+
+ if ($params['default'] == 'all')
+ $return .= ' ';
+
+ if (count($arr))
+ foreach ($arr as $index => $value)
+ $return .= sprintf('%s ',$index,($params['default'] == $index) ? ' selected' : '',$value);
+
+ $return .= ' ';
+
+ echo $return;
+}
+
+function osb_html_link($params,&$smarty) {
+ $name = 'submit';
+ $module = 'CORE';
+
+ $_ignore['show'] = true;
+ $_ignore['hide'] = true;
+ $_ignore['name'] = true;
+
+ # Get the values passed...
+ $vals = '';
+ foreach ($params as $_key => $_val)
+ if (empty($_ignore[$_key]))
+ $vals .= sprintf(' %s="%s"',$_key,$_val);
+ else
+ $$_key = $_val;
+
+ foreach ($params as $_key => $_val)
+ $$_key = $_val;
+
+ # Change state(s) (hide)
+ $t = 0;
+ if ($hide) {
+ if (preg_match('/,/',$hide))
+ $hides = explode(',',$hide);
+ else
+ $hides = array($hide);
+
+ foreach ($hides as $element)
+ if (preg_match('/\|/',$element)) {
+ $el = explode('|',$element);
+ $action .= sprintf("new Effect.%s('%s',{duration: %s});",$el[2],$el[0],$el[1]);
+ } else {
+ $action .= sprintf("$('%s').style.display='none';",$element);
+ }
+ }
+
+ # Change state(s) (show)
+ if ($show) {
+ if (preg_match('/,/',$show))
+ $shows = explode(',',$show);
+ else
+ $shows = array($show);
+
+ foreach ($shows as $element) {
+ if (preg_match('/\|/',$element)) {
+ $el = explode('|',$element);
+ $action .= sprintf("new Effect.%s('%s',{duration: %s});",$el[2],$el[0],$el[1]);
+ } else {
+ $action .= sprintf("$('%s').style.display='block';",$element);
+ }
+ }
+ }
+
+ # translate name
+ global $C_translate;
+ $trans = $C_translate->translate($name,$module);
+ if (! empty($trans))
+ $name = $trans;
+
+ if (empty($link))
+ $link = '#';
+
+ return sprintf('%s ',$link,$vals,$action ? sprintf(' onclick="%s"',$action) : '',$name);
+}
+
+/**
+ * Hides a div/span element without disabling the view
+ */
+function osb_style_hide($params,&$smarty) {
+ echo 'style="display:none;"';
+}
+
+/**
+ * Displays & Populates an Plug In template
+ * @todo change this to be dynmaic, ie: defined by the instalation of a module and calling a method.
+ */
+function osb_plugin($params,&$smarty) {
+ # Some Validation
+ if ((! isset($params['type']) || ! trim($params['type'])) || (! isset($params['name']) || ! trim($params['name'])))
+ return;
+
+ if (! isset($params['name_prefix']))
+ $params['name_prefix'] = '';
+
+ if (! isset($params['data']) && $params['data'])
+ $smarty->assign('plugin',unserialize($params['data']));
+
+ # Pass any other vars to smarty
+ foreach ($params as $var=>$val)
+ $smarty->assign($var,$val);
+
+ # Get full template file-path:
+ switch ($params['type']) {
+ case 'affiliate':
+ $meth = 'affiliate:plugin';
+ break;
+
+ case 'checkout':
+ $meth = 'checkout_plugin:plugin';
+ break;
+
+ case 'import':
+ $meth = ''; // @todo
+ break;
+
+ case 'product':
+ $meth = 'product_plugin:plugin';
+ break;
+
+ case 'provision':
+ $meth = 'host_provision_plugin:plugin';
+ break;
+
+ case 'registrar':
+ $meth = 'host_registrar_plugin:plugin';
+ break;
+
+ case 'whois':
+ $meth = 'host_whois_plugin:plugin';
+ break;
+
+ case 'voip_did':
+ $meth = 'voip_did_plugin:config';
+ break;
+ }
+
+ $_tpl = sprintf('%s_%s%s',$meth,$params['name_prefix'],$params['name']);
+
+ # Check if file exists:
+ $_template_full = sprintf('%s%s/blocks/%s.tpl',PATH_THEMES,DEF_THEME_N,str_replace(':','/',$_tpl));
+
+ if (! is_file($_template_full)) {
+ $_template_full = sprintf('%s%s/blocks/%s.tpl',PATH_THEMES,'default',str_replace(':','/',$_tpl));
+
+ if (! is_file($_template_full)) {
+ if ($debug)
+ printf('Error loading plugin template: %s',$_template_full);
+
+ return;
+ }
+ }
+
+ // Load file
+ $smarty->display(sprintf('file:%s',$_template_full));
+}
+
+/**
+ * Translate a table title
+ */
+function osb_tt($params,&$smarty) {
+ require_once(PATH_CORE.'translate.inc.php');
+ $C_translate = new CORE_translate;
+
+ echo $C_translate->tt($params,$smarty);
+}
+
+/**
+ * Translate a table field
+ */
+function osb_tf($params,&$smarty) {
+ require_once(PATH_CORE.'translate.inc.php');
+ $C_translate = new CORE_translate;
+
+ echo $C_translate->tf($params,$smarty);
+}
+
+function osb_html_menu_product_host($params,&$smarty) {
+ $id = $params['id'];
+ $default = unserialize($params['default']);
+ if (empty($id))
+ $id = $params['name'];
+
+ $db = &DB();
+ $result = $db->Execute(sqlSelect($db,'product','id,sku',sprintf('host=1 AND active=1 AND price_type=1 AND id!%s',$params['exclude'])));
+ if ($result && $result->RecordCount()) {
+ printf('',$id,$params['name'],$params['size']);
+ while(!$result->EOF) {
+ $sel = '';
+ foreach ($default as $cur)
+ if ($cur == $result->fields['id'])
+ $sel = ' selected="selected"';
+
+ printf('%s ',$result->fields['id'],$sel,$result->fields['sku']);
+ $result->MoveNext();
+ }
+ echo ' ';
+ }
+}
+
+function osb_html_menu_product_subscription($params,&$smarty) {
+ $id = $params['id'];
+ $default = unserialize($params['default']);
+ if (empty($id))
+ $id = $params['name'];
+
+ $db = &DB();
+ $result = $db->Execute(sqlSelect($db,'product','id,sku',sprintf('(host=0 OR host IS NULL) AND active=1 AND price_type=1 AND id!=%s',$params['exclude']),'sku'));
+ if ($result && $result->RecordCount()) {
+ printf('',$id,$params['name'],$params['size']);
+ while (! $result->EOF) {
+ $sel = '';
+ foreach ($default as $cur)
+ if ($cur == $result->fields['id'])
+ $sel = ' selected="selected"';
+
+ printf('%s ',$result->fields['id'],$sel,$result->fields['sku']);
+ $result->MoveNext();
+ }
+ echo ' ';
+ }
+}
+?>
diff --git a/includes/smarty/plugins/function.plugin.php b/includes/smarty/plugins/function.plugin.php
deleted file mode 100644
index 95eda5f4..00000000
--- a/includes/smarty/plugins/function.plugin.php
+++ /dev/null
@@ -1,70 +0,0 @@
-assign('plugin', unserialize($data));
-
- // pass any other vars to smarty
- foreach($params as $var=>$val) $smarty->assign($var,$val);
-
- // get full template file-path:
- switch($type) {
- case 'affiliate':
- $_tpl = "affiliate:plugin_{$name_prefix}{$name}";
- break;
- case 'checkout':
- $_tpl = "checkout_plugin:plugin_{$name_prefix}{$name}";
- break;
- case 'db_mapping':
- $_tpl = "db_mapping:group_map_{$name_prefix}{$name}";
- break;
- case 'import':
- $_tpl = ""; // todo
- break;
- case 'product':
- $_tpl = "product_plugin:plugin_{$name_prefix}{$name}";
- break;
- case 'provision':
- $_tpl = "host_provision_plugin:plugin_{$name_prefix}{$name}";
- break;
- case 'registrar':
- $_tpl = "host_registrar_plugin:plugin_{$name_prefix}{$name}";
- break;
- case 'whois':
- $_tpl = "host_whois_plugin:plugin_{$name_prefix}{$name}";
- break;
- case 'voip_did':
- $_tpl = "voip_did_plugin:config_{$name_prefix}{$name}";
- break;
- }
-
- // check if file exists:
- $_template_full = PATH_THEMES.DEF_THEME_N."/blocks/". ereg_replace(":", "/", $_tpl).".tpl";
-
- if(!is_file($_template_full)) {
- $_template_full = PATH_THEMES."default/blocks/". ereg_replace(":", "/", $_tpl).".tpl";
- if(!is_file($_template_full)) {
- if($debug) echo "Error loading plugin template: $_template_full";
- return;
- }
- }
-
- // load file
- $smarty->display("file:$_template_full");
-
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/function.style_hide.php b/includes/smarty/plugins/function.style_hide.php
deleted file mode 100644
index 66558633..00000000
--- a/includes/smarty/plugins/function.style_hide.php
+++ /dev/null
@@ -1,17 +0,0 @@
-
\ No newline at end of file
diff --git a/includes/smarty/plugins/modifier.date.php b/includes/smarty/plugins/modifier.date.php
deleted file mode 100644
index dbcd80cb..00000000
--- a/includes/smarty/plugins/modifier.date.php
+++ /dev/null
@@ -1,7 +0,0 @@
-
diff --git a/includes/smarty/plugins/modifier.linkalize.php b/includes/smarty/plugins/modifier.linkalize.php
deleted file mode 100644
index 9487c7f0..00000000
--- a/includes/smarty/plugins/modifier.linkalize.php
+++ /dev/null
@@ -1,28 +0,0 @@
-$1", $text); //make all URLs links
- $text = preg_replace("/[\w-\.]+@(\w+[\w-]+\.){0,3}\w+[\w-]+\.[a-zA-Z]{2,4}\b/i","$0",$text);
- return $text;
-}
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/modifier.markdown.php b/includes/smarty/plugins/modifier.markdown.php
deleted file mode 100644
index 8ba21183..00000000
--- a/includes/smarty/plugins/modifier.markdown.php
+++ /dev/null
@@ -1,1989 +0,0 @@
-
-#
-# Based on Markdown
-# Copyright (c) 2004-2005 John Gruber
-#
-#
-
-
-global $MarkdownPHPVersion, $MarkdownSyntaxVersion,
- $md_empty_element_suffix, $md_tab_width,
- $md_nested_brackets_depth, $md_nested_brackets,
- $md_escape_table, $md_backslash_escape_table,
- $md_list_level;
-
-$MarkdownPHPVersion = 'Extra 1.0'; # Mon 5 Sep 2005
-$MarkdownSyntaxVersion = '1.0.1'; # Sun 12 Dec 2004
-
-
-#
-# Global default settings:
-#
-$md_empty_element_suffix = " />"; # Change to ">" for HTML output
-$md_tab_width = 4;
-
-#
-# WordPress settings:
-#
-$md_wp_posts = true; # Set to false to remove Markdown from posts.
-$md_wp_comments = true; # Set to false to remove Markdown from comments.
-
-
-# -- WordPress Plugin Interface -----------------------------------------------
-/*
-Plugin Name: PHP Markdown Extra
-Plugin URI: http://www.michelf.com/projects/php-markdown/
-Description: Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber . More...
-Version: Extra 1.0
-Author: Michel Fortin
-Author URI: http://www.michelf.com/
-*/
-if (isset($wp_version)) {
- # More details about how it works here:
- #
-
- # Post content and excerpts
- if ($md_wp_posts) {
- remove_filter('the_content', 'wpautop');
- remove_filter('the_excerpt', 'wpautop');
- add_filter('the_content', 'Markdown', 6);
- add_filter('get_the_excerpt', 'Markdown', 6);
- add_filter('get_the_excerpt', 'trim', 7);
- add_filter('the_excerpt', 'md_add_p');
- add_filter('the_excerpt_rss', 'md_strip_p');
-
- remove_filter('content_save_pre', 'balanceTags', 50);
- remove_filter('excerpt_save_pre', 'balanceTags', 50);
- add_filter('the_content', 'balanceTags', 50);
- add_filter('get_the_excerpt', 'balanceTags', 9);
-
- function md_add_p($text) {
- if (strlen($text) == 0) return;
- if (strcasecmp(substr($text, -3), '') == 0) return $text;
- return '
'.$text.'
';
- }
- function md_strip_p($t) { return preg_replace('{?[pP]>}', '', $t); }
- }
-
- # Comments
- if ($md_wp_comments) {
- remove_filter('comment_text', 'wpautop');
- remove_filter('comment_text', 'make_clickable');
- add_filter('pre_comment_content', 'Markdown', 6);
- add_filter('pre_comment_content', 'md_hide_tags', 8);
- add_filter('pre_comment_content', 'md_show_tags', 12);
- add_filter('get_comment_text', 'Markdown', 6);
- add_filter('get_comment_excerpt', 'Markdown', 6);
- add_filter('get_comment_excerpt', 'md_strip_p', 7);
-
- global $md_hidden_tags;
- $md_hidden_tags = array(
- '' => md5('
'), '
' => md5(' '),
- '' => md5(''), ' '=> md5(' '),
- '' => md5(''), ' ' => md5(' '),
- ''),
- '' => md5(' '), ' ' => md5(''),
- );
-
- function md_hide_tags($text) {
- global $md_hidden_tags;
- return str_replace(array_keys($md_hidden_tags),
- array_values($md_hidden_tags), $text);
- }
- function md_show_tags($text) {
- global $md_hidden_tags;
- return str_replace(array_values($md_hidden_tags),
- array_keys($md_hidden_tags), $text);
- }
- }
-}
-
-
-# -- bBlog Plugin Info --------------------------------------------------------
-function identify_modifier_markdown() {
- global $MarkdownPHPVersion;
- return array(
- 'name' => 'markdown',
- 'type' => 'modifier',
- 'nicename' => 'PHP Markdown Extra',
- 'description' => 'A text-to-HTML conversion tool for web writers',
- 'authors' => 'Michel Fortin and John Gruber',
- 'licence' => 'GPL',
- 'version' => $MarkdownPHPVersion,
- 'help' => 'Markdown syntax allows you to write using an easy-to-read, easy-to-write plain text format. Based on the original Perl version by John Gruber . More... '
- );
-}
-
-# -- Smarty Modifier Interface ------------------------------------------------
-function smarty_modifier_markdown($text) {
- return Markdown($text);
-}
-
-# -- Textile Compatibility Mode -----------------------------------------------
-# Rename this file to "classTextile.php" and it can replace Textile anywhere.
-if (strcasecmp(substr(__FILE__, -16), "classTextile.php") == 0) {
- # Try to include PHP SmartyPants. Should be in the same directory.
- @include_once 'smartypants.php';
- # Fake Textile class. It calls Markdown instead.
- class Textile {
- function TextileThis($text, $lite='', $encode='', $noimage='', $strict='') {
- if ($lite == '' && $encode == '') $text = Markdown($text);
- if (function_exists('SmartyPants')) $text = SmartyPants($text);
- return $text;
- }
- }
-}
-
-
-
-#
-# Globals:
-#
-
-# Regex to match balanced [brackets].
-# Needed to insert a maximum bracked depth while converting to PHP.
-$md_nested_brackets_depth = 6;
-$md_nested_brackets =
- str_repeat('(?>[^\[\]]+|\[', $md_nested_brackets_depth).
- str_repeat('\])*', $md_nested_brackets_depth);
-
-# Table of hash values for escaped characters:
-$md_escape_table = array(
- "\\" => md5("\\"),
- "`" => md5("`"),
- "*" => md5("*"),
- "_" => md5("_"),
- "{" => md5("{"),
- "}" => md5("}"),
- "[" => md5("["),
- "]" => md5("]"),
- "(" => md5("("),
- ")" => md5(")"),
- ">" => md5(">"),
- "#" => md5("#"),
- "+" => md5("+"),
- "-" => md5("-"),
- "." => md5("."),
- "!" => md5("!"),
- ":" => md5(":"),
- "|" => md5("|"),
-);
-# Create an identical table but for escaped characters.
-$md_backslash_escape_table;
-foreach ($md_escape_table as $key => $char)
- $md_backslash_escape_table["\\$key"] = $char;
-
-
-
-function Markdown($text) {
-#
-# Main function. The order in which other subs are called here is
-# essential. Link and image substitutions need to happen before
-# _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the
-# and tags get encoded.
-#
- # Clear the global hashes. If we don't clear these, you get conflicts
- # from other articles when generating a page which contains more than
- # one article (e.g. an index page that shows the N most recent
- # articles):
- global $md_urls, $md_titles, $md_html_blocks, $md_html_hashes;
- $md_urls = array();
- $md_titles = array();
- $md_html_blocks = array();
- $md_html_hashes = array();
-
- # Standardize line endings:
- # DOS to Unix and Mac to Unix
- $text = str_replace(array("\r\n", "\r"), "\n", $text);
-
- # Make sure $text ends with a couple of newlines:
- $text .= "\n\n";
-
- # Convert all tabs to spaces.
- $text = _Detab($text);
-
- # Turn block-level HTML blocks into hash entries
- $text = _HashHTMLBlocks($text);
-
- # Strip any lines consisting only of spaces and tabs.
- # This makes subsequent regexen easier to write, because we can
- # match consecutive blank lines with /\n+/ instead of something
- # contorted like /[ \t]*\n+/ .
- $text = preg_replace('/^[ \t]+$/m', '', $text);
-
- # Strip link definitions, store in hashes.
- $text = _StripLinkDefinitions($text);
-
- $text = _RunBlockGamut($text, FALSE);
-
- $text = _UnescapeSpecialChars($text);
-
- return $text . "\n";
-}
-
-
-function _StripLinkDefinitions($text) {
-#
-# Strips link definitions from text, stores the URLs and titles in
-# hash references.
-#
- global $md_tab_width;
- $less_than_tab = $md_tab_width - 1;
-
- # Link defs are in the form: ^[id]: url "optional title"
- $text = preg_replace_callback('{
- ^[ ]{0,'.$less_than_tab.'}\[(.+)\]: # id = $1
- [ \t]*
- \n? # maybe *one* newline
- [ \t]*
- (\S+?)>? # url = $2
- [ \t]*
- \n? # maybe one newline
- [ \t]*
- (?:
- (?<=\s) # lookbehind for whitespace
- ["(]
- (.+?) # title = $3
- [")]
- [ \t]*
- )? # title is optional
- (?:\n+|\Z)
- }xm',
- '_StripLinkDefinitions_callback',
- $text);
- return $text;
-}
-function _StripLinkDefinitions_callback($matches) {
- global $md_urls, $md_titles;
- $link_id = strtolower($matches[1]);
- $md_urls[$link_id] = _EncodeAmpsAndAngles($matches[2]);
- if (isset($matches[3]))
- $md_titles[$link_id] = str_replace('"', '"', $matches[3]);
- return ''; # String that will replace the block
-}
-
-
-function _HashHTMLBlocks($text) {
-#
-# Hashify HTML Blocks and "clean tags".
-#
-# We only want to do this for block-level HTML tags, such as headers,
-# lists, and tables. That's because we still want to wrap s around
-# "paragraphs" that are wrapped in non-block-level tags, such as anchors,
-# phrase emphasis, and spans. The list of tags we're looking for is
-# hard-coded.
-#
-# This works by calling _HashHTMLBlocks_InMarkdown, which then calls
-# _HashHTMLBlocks_InHTML when it encounter block tags. When the markdown="1"
-# attribute is found whitin a tag, _HashHTMLBlocks_InHTML calls back
-# _HashHTMLBlocks_InMarkdown to handle the Markdown syntax within the tag.
-# These two functions are calling each other. It's recursive!
-#
- global $block_tags, $context_block_tags, $contain_span_tags,
- $clean_tags, $auto_close_tags;
-
- # Tags that are always treated as block tags:
- $block_tags = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|'.
- 'form|fieldset|iframe|hr|legend';
-
- # Tags treated as block tags only if the opening tag is alone on it's line:
- $context_block_tags = 'script|noscript|math|ins|del';
-
- # Tags where markdown="1" default to span mode:
- $contain_span_tags = 'p|h[1-6]|li|dd|dt|td|th|legend';
-
- # Tags which must not have their contents modified, no matter where
- # they appear:
- $clean_tags = 'script|math';
-
- # Tags that do not need to be closed.
- $auto_close_tags = 'hr|img';
-
- # Regex to match any tag.
- global $tag_match;
- $tag_match =
- '{
- ( # $2: Capture hole tag.
- ? # Any opening or closing tag.
- [\w:$]+ # Tag name.
- \s* # Whitespace.
- (?:
- ".*?" | # Double quotes (can contain `>`)
- \'.*?\' | # Single quotes (can contain `>`)
- .+? # Anything but quotes and `>`.
- )*?
- > # End of tag.
- |
- # HTML Comment
- |
- <\? .*? \?> # Processing instruction
- |
- # CData Block
- )
- }xs';
-
- #
- # Call the HTML-in-Markdown hasher.
- #
- list($text, ) = _HashHTMLBlocks_InMarkdown($text);
-
- return $text;
-}
-function _HashHTMLBlocks_InMarkdown($text, $indent = 0,
- $enclosing_tag = '', $md_span = false)
-{
-#
-# Parse markdown text, calling _HashHTMLBlocks_InHTML for block tags.
-#
-# * $indent is the number of space to be ignored when checking for code
-# blocks. This is important because if we don't take the indent into
-# account, something like this (which looks right) won't work as expected:
-#
-#
-#
-# Hello World. <-- Is this a Markdown code block or text?
-#
<-- Is this a Markdown code block or a real tag?
-#
-#
-# If you don't like this, just don't indent the tag on which
-# you apply the markdown="1" attribute.
-#
-# * If $enclosing_tag is not empty, stops at the first unmatched closing
-# tag with that name. Nested tags supported.
-#
-# * If $md_span is true, text inside must treated as span. So any double
-# newline will be replaced by a single newline so that it does not create
-# paragraphs.
-#
-# Returns an array of that form: ( processed text , remaining text )
-#
- global $block_tags, $context_block_tags, $clean_tags, $auto_close_tags,
- $tag_match;
-
- if ($text === '') return array('', '');
-
- # Regex to check for the presense of newlines around a block tag.
- $newline_match_before = "/(?:^\n?|\n\n) *$/";
- $newline_match_after =
- '{
- ^ # Start of text following the tag.
- (?:[ ]*)? # Optional comment.
- [ ]*\n # Must be followed by newline.
- }xs';
-
- # Regex to match any tag.
- $block_tag_match =
- '{
- ( # $2: Capture hole tag.
- ? # Any opening or closing tag.
- (?: # Tag name.
- '.$block_tags.' |
- '.$context_block_tags.' |
- '.$clean_tags.' |
- (?!\s)'.$enclosing_tag.'
- )
- \s* # Whitespace.
- (?:
- ".*?" | # Double quotes (can contain `>`)
- \'.*?\' | # Single quotes (can contain `>`)
- .+? # Anything but quotes and `>`.
- )*?
- > # End of tag.
- |
- # HTML Comment
- |
- <\? .*? \?> # Processing instruction
- |
- # CData Block
- )
- }xs';
-
-
- $depth = 0; # Current depth inside the tag tree.
- $parsed = ""; # Parsed text that will be returned.
-
- #
- # Loop through every tag until we find the closing tag of the parent
- # or loop until reaching the end of text if no parent tag specified.
- #
- do {
- #
- # Split the text using the first $tag_match pattern found.
- # Text before pattern will be first in the array, text after
- # pattern will be at the end, and between will be any catches made
- # by the pattern.
- #
- $parts = preg_split($block_tag_match, $text, 2,
- PREG_SPLIT_DELIM_CAPTURE);
-
- # If in Markdown span mode, replace any multiple newlines that would
- # trigger a new paragraph.
- if ($md_span) {
- $parts[0] = preg_replace('/\n\n/', "\n", $parts[0]);
- }
-
- $parsed .= $parts[0]; # Text before current tag.
-
- # If end of $text has been reached. Stop loop.
- if (count($parts) < 3) {
- $text = "";
- break;
- }
-
- $tag = $parts[1]; # Tag to handle.
- $text = $parts[2]; # Remaining text after current tag.
-
- #
- # Check for: Tag inside code block or span
- #
- if (# Find current paragraph
- preg_match('/(?>^\n?|\n\n)((?>.\n?)+?)$/', $parsed, $matches) &&
- (
- # Then match in it either a code block...
- preg_match('/^ {'.($indent+4).'}.*(?>\n {'.($indent+4).'}.*)*'.
- '(?!\n)$/', $matches[1], $x) ||
- # ...or unbalenced code span markers. (the regex matches balenced)
- !preg_match('/^(?>[^`]+|(`+)(?>[^`]+|(?!\1[^`])`)*?\1(?!`))*$/s',
- $matches[1])
- ))
- {
- # Tag is in code block or span and may not be a tag at all. So we
- # simply skip the first char (should be a `<`).
- $parsed .= $tag{0};
- $text = substr($tag, 1) . $text; # Put back $tag minus first char.
- }
- #
- # Check for: Opening Block level tag or
- # Opening Content Block tag (like ins and del)
- # used as a block tag (tag is alone on it's line).
- #
- else if (preg_match("{^<(?:$block_tags)\b}", $tag) ||
- ( preg_match("{^<(?:$context_block_tags)\b}", $tag) &&
- preg_match($newline_match_before, $parsed) &&
- preg_match($newline_match_after, $text) )
- )
- {
- # Need to parse tag and following text using the HTML parser.
- list($block_text, $text) =
- _HashHTMLBlocks_InHTML($tag . $text,
- "_HashHTMLBlocks_HashBlock", TRUE);
-
- # Make sure it stays outside of any paragraph by adding newlines.
- $parsed .= "\n\n$block_text\n\n";
- }
- #
- # Check for: Clean tag (like script, math)
- # HTML Comments, processing instructions.
- #
- else if (preg_match("{^<(?:$clean_tags)\b}", $tag) ||
- $tag{1} == '!' || $tag{1} == '?')
- {
- # Need to parse tag and following text using the HTML parser.
- # (don't check for markdown attribute)
- list($block_text, $text) =
- _HashHTMLBlocks_InHTML($tag . $text,
- "_HashHTMLBlocks_HashClean", FALSE);
-
- $parsed .= $block_text;
- }
- #
- # Check for: Tag with same name as enclosing tag.
- #
- else if ($enclosing_tag !== '' &&
- # Same name as enclosing tag.
- preg_match("{^?(?:$enclosing_tag)\b}", $tag))
- {
- #
- # Increase/decrease nested tag count.
- #
- if ($tag{1} == '/') $depth--;
- else if ($tag{strlen($tag)-2} != '/') $depth++;
-
- if ($depth < 0) {
- #
- # Going out of parent element. Clean up and break so we
- # return to the calling function.
- #
- $text = $tag . $text;
- break;
- }
-
- $parsed .= $tag;
- }
- else {
- $parsed .= $tag;
- }
- } while ($depth >= 0);
-
- return array($parsed, $text);
-}
-function _HashHTMLBlocks_InHTML($text, $hash_function, $md_attr) {
-#
-# Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags.
-#
-# * Calls $hash_function to convert any blocks.
-# * Stops when the first opening tag closes.
-# * $md_attr indicate if the use of the `markdown="1"` attribute is allowed.
-# (it is not inside clean tags)
-#
-# Returns an array of that form: ( processed text , remaining text )
-#
- global $auto_close_tags, $contain_span_tags, $tag_match;
-
- if ($text === '') return array('', '');
-
- # Regex to match `markdown` attribute inside of a tag.
- $markdown_attr_match = '
- {
- \s* # Eat whitespace before the `markdown` attribute
- markdown
- \s*=\s*
- (["\']) # $1: quote delimiter
- (.*?) # $2: attribute value
- \1 # matching delimiter
- }xs';
-
- $original_text = $text; # Save original text in case of faliure.
-
- $depth = 0; # Current depth inside the tag tree.
- $block_text = ""; # Temporary text holder for current text.
- $parsed = ""; # Parsed text that will be returned.
-
- #
- # Get the name of the starting tag.
- #
- if (preg_match("/^<([\w:$]*)\b/", $text, $matches))
- $base_tag_name = $matches[1];
-
- #
- # Loop through every tag until we find the corresponding closing tag.
- #
- do {
- #
- # Split the text using the first $tag_match pattern found.
- # Text before pattern will be first in the array, text after
- # pattern will be at the end, and between will be any catches made
- # by the pattern.
- #
- $parts = preg_split($tag_match, $text, 2, PREG_SPLIT_DELIM_CAPTURE);
-
- if (count($parts) < 3) {
- #
- # End of $text reached with unbalenced tag(s).
- # In that case, we return original text unchanged and pass the
- # first character as filtered to prevent an infinite loop in the
- # parent function.
- #
- return array($original_text{0}, substr($original_text, 1));
- }
-
- $block_text .= $parts[0]; # Text before current tag.
- $tag = $parts[1]; # Tag to handle.
- $text = $parts[2]; # Remaining text after current tag.
-
- #
- # Check for: Auto-close tag (like
)
- # Comments and Processing Instructions.
- #
- if (preg_match("{^?(?:$auto_close_tags)\b}", $tag) ||
- $tag{1} == '!' || $tag{1} == '?')
- {
- # Just add the tag to the block as if it was text.
- $block_text .= $tag;
- }
- else {
- #
- # Increase/decrease nested tag count. Only do so if
- # the tag's name match base tag's.
- #
- if (preg_match("{^?$base_tag_name\b}", $tag)) {
- if ($tag{1} == '/') $depth--;
- else if ($tag{strlen($tag)-2} != '/') $depth++;
- }
-
- #
- # Check for `markdown="1"` attribute and handle it.
- #
- if ($md_attr &&
- preg_match($markdown_attr_match, $tag, $attr_matches) &&
- preg_match('/^(?:1|block|span)$/', $attr_matches[2]))
- {
- # Remove `markdown` attribute from opening tag.
- $tag = preg_replace($markdown_attr_match, '', $tag);
-
- # Check if text inside this tag must be parsed in span mode.
- $md_mode = $attr_matches[2];
- $span_mode = $md_mode == 'span' || $md_mode != 'block' &&
- preg_match("{^<(?:$contain_span_tags)\b}", $tag);
-
- # Calculate indent before tag.
- preg_match('/(?:^|\n)( *?)(?! ).*?$/', $block_text, $matches);
- $indent = strlen($matches[1]);
-
- # End preceding block with this tag.
- $block_text .= $tag;
- $parsed .= $hash_function($block_text, $span_mode);
-
- # Get enclosing tag name for the ParseMarkdown function.
- preg_match('/^<([\w:$]*)\b/', $tag, $matches);
- $tag_name = $matches[1];
-
- # Parse the content using the HTML-in-Markdown parser.
- list ($block_text, $text)
- = _HashHTMLBlocks_InMarkdown($text, $indent,
- $tag_name, $span_mode);
-
- # Outdent markdown text.
- if ($indent > 0) {
- $block_text = preg_replace("/^[ ]{1,$indent}/m", "",
- $block_text);
- }
-
- # Append tag content to parsed text.
- if (!$span_mode) $parsed .= "\n\n$block_text\n\n";
- else $parsed .= "$block_text";
-
- # Start over a new block.
- $block_text = "";
- }
- else $block_text .= $tag;
- }
-
- } while ($depth > 0);
-
- #
- # Hash last block text that wasn't processed inside the loop.
- #
- $parsed .= $hash_function($block_text);
-
- return array($parsed, $text);
-}
-function _HashHTMLBlocks_HashBlock($text) {
- global $md_html_hashes, $md_html_blocks;
- $key = md5($text);
- $md_html_hashes[$key] = $text;
- $md_html_blocks[$key] = $text;
- return $key; # String that will replace the tag.
-}
-function _HashHTMLBlocks_HashClean($text) {
- global $md_html_hashes;
- $key = md5($text);
- $md_html_hashes[$key] = $text;
- return $key; # String that will replace the clean tag.
-}
-
-
-function _HashBlock($text) {
-#
-# Called whenever a tag must be hashed. When a function insert a block-level
-# tag in $text, it pass through this function and is automaticaly escaped,
-# which remove the need to call _HashHTMLBlocks at every step.
-#
- # Swap back any tag hash found in $text so we do not have to _UnhashTags
- # multiple times at the end. Must do this because of
- $text = _UnhashTags($text);
-
- # Then hash the block as normal.
- return _HashHTMLBlocks_HashBlock($text);
-}
-
-
-function _RunBlockGamut($text, $hash_html_blocks = TRUE) {
-#
-# These are all the transformations that form block-level
-# tags like paragraphs, headers, and list items.
-#
- if ($hash_html_blocks) {
- # We need to escape raw HTML in Markdown source before doing anything
- # else. This need to be done for each block, and not only at the
- # begining in the Markdown function since hashed blocks can be part of
- # a list item and could have been indented. Indented blocks would have
- # been seen as a code block in previous pass of _HashHTMLBlocks.
- $text = _HashHTMLBlocks($text);
- }
-
- $text = _DoHeaders($text);
- $text = _DoTables($text);
-
- # Do Horizontal Rules:
- global $md_empty_element_suffix;
- $text = preg_replace(
- array('{^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$}emx',
- '{^[ ]{0,2}([ ]? -[ ]?){3,}[ \t]*$}emx',
- '{^[ ]{0,2}([ ]? _[ ]?){3,}[ \t]*$}emx'),
- "_HashBlock('\n
`
- # Must come after _DoAnchors(), because you can use < and >
- # delimiters in inline links like [this](
).
- $text = _DoAutoLinks($text);
- $text = _EncodeAmpsAndAngles($text);
- $text = _DoItalicsAndBold($text);
-
- # Do hard breaks:
- $text = preg_replace('/ {2,}\n/', " or tags.
-# $tags_to_skip = "!<(/?)(?:pre|code|kbd|script|math)[\s>]!";
-
- foreach ($tokens as $cur_token) {
- if ($cur_token[0] == 'tag') {
- # Within tags, encode * and _ so they don't conflict
- # with their use in Markdown for italics and strong.
- # We're replacing each such character with its
- # corresponding MD5 checksum value; this is likely
- # overkill, but it should prevent us from colliding
- # with the escape values by accident.
- $cur_token[1] = str_replace(array('*', '_'),
- array($md_escape_table['*'], $md_escape_table['_']),
- $cur_token[1]);
- $text .= $cur_token[1];
- } else {
- $t = $cur_token[1];
- $t = _EncodeBackslashEscapes($t);
- $text .= $t;
- }
- }
- return $text;
-}
-
-
-function _DoAnchors($text) {
-#
-# Turn Markdown link shortcuts into XHTML tags.
-#
- global $md_nested_brackets;
- #
- # First, handle reference-style links: [link text] [id]
- #
- $text = preg_replace_callback("{
- ( # wrap whole match in $1
- \\[
- ($md_nested_brackets) # link text = $2
- \\]
-
- [ ]? # one optional space
- (?:\\n[ ]*)? # one optional newline followed by spaces
-
- \\[
- (.*?) # id = $3
- \\]
- )
- }xs",
- '_DoAnchors_reference_callback', $text);
-
- #
- # Next, inline-style links: [link text](url "optional title")
- #
- $text = preg_replace_callback("{
- ( # wrap whole match in $1
- \\[
- ($md_nested_brackets) # link text = $2
- \\]
- \\( # literal paren
- [ \\t]*
- (.*?)>? # href = $3
- [ \\t]*
- ( # $4
- (['\"]) # quote char = $5
- (.*?) # Title = $6
- \\5 # matching quote
- )? # title is optional
- \\)
- )
- }xs",
- '_DoAnchors_inline_callback', $text);
-
- return $text;
-}
-function _DoAnchors_reference_callback($matches) {
- global $md_urls, $md_titles, $md_escape_table;
- $whole_match = $matches[1];
- $link_text = $matches[2];
- $link_id = strtolower($matches[3]);
-
- if ($link_id == "") {
- $link_id = strtolower($link_text); # for shortcut links like [this][].
- }
-
- if (isset($md_urls[$link_id])) {
- $url = $md_urls[$link_id];
- # We've got to encode these to avoid conflicting with italics/bold.
- $url = str_replace(array('*', '_'),
- array($md_escape_table['*'], $md_escape_table['_']),
- $url);
- $result = " tags.
-#
- global $md_nested_brackets;
-
- #
- # First, handle reference-style labeled images: ![alt text][id]
- #
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- !\[
- ('.$md_nested_brackets.') # alt text = $2
- \]
-
- [ ]? # one optional space
- (?:\n[ ]*)? # one optional newline followed by spaces
-
- \[
- (.*?) # id = $3
- \]
-
- )
- }xs',
- '_DoImages_reference_callback', $text);
-
- #
- # Next, handle inline images: ![alt text](url "optional title")
- # Don't forget: encode * and _
-
- $text = preg_replace_callback('{
- ( # wrap whole match in $1
- !\[
- ('.$md_nested_brackets.') # alt text = $2
- \]
- \( # literal paren
- [ \t]*
- (\S+?)>? # src url = $3
- [ \t]*
- ( # $4
- ([\'"]) # quote char = $5
- (.*?) # title = $6
- \5 # matching quote
- [ \t]*
- )? # title is optional
- \)
- )
- }xs',
- '_DoImages_inline_callback', $text);
-
- return $text;
-}
-function _DoImages_reference_callback($matches) {
- global $md_urls, $md_titles, $md_empty_element_suffix, $md_escape_table;
- $whole_match = $matches[1];
- $alt_text = $matches[2];
- $link_id = strtolower($matches[3]);
-
- if ($link_id == "") {
- $link_id = strtolower($alt_text); # for shortcut links like ![this][].
- }
-
- $alt_text = str_replace('"', '"', $alt_text);
- if (isset($md_urls[$link_id])) {
- $url = $md_urls[$link_id];
- # We've got to encode these to avoid conflicting with italics/bold.
- $url = str_replace(array('*', '_'),
- array($md_escape_table['*'], $md_escape_table['_']),
- $url);
- $result = " '._RunSpanGamut(_UnslashQuotes('\\1')).''
- ) . '\n\n'",
- "_HashBlock(''._RunSpanGamut(_UnslashQuotes('\\1')).' '
- ) . '\n\n'"),
- $text);
-
- # atx-style headers:
- # # Header 1
- # ## Header 2
- # ## Header 2 with closing hashes ##
- # ...
- # ###### Header 6
- #
- $text = preg_replace('{
- ^(\#{1,6}) # $1 = string of #\'s
- [ \t]*
- (.+?) # $2 = Header text
- [ \t]*
- \#* # optional closing #\'s (not counted)
- (?:[ ]+\{\#([-_:a-zA-Z0-9]+)\}[ ]*)? # id attribute
- \n+
- }xme',
- "_HashBlock(
- ''.
- _RunSpanGamut(_UnslashQuotes('\\2')).
- ' '
- ) . '\n\n'",
- $text);
-
- return $text;
-}
-
-
-function _DoTables($text) {
-#
-# Form HTML tables.
-#
- global $md_tab_width;
- $less_than_tab = $md_tab_width - 1;
- #
- # Find tables with leading pipe.
- #
- # | Header 1 | Header 2
- # | -------- | --------
- # | Cell 1 | Cell 2
- # | Cell 3 | Cell 4
- #
- $text = preg_replace_callback('
- {
- ^ # Start of a line
- [ ]{0,'.$less_than_tab.'} # Allowed whitespace.
- [|] # Optional leading pipe (present)
- (.+) \n # $1: Header row (at least one pipe)
-
- [ ]{0,'.$less_than_tab.'} # Allowed whitespace.
- [|] ([ ]*[-:]+[-| :]*) \n # $2: Header underline
-
- ( # $3: Cells
- (?:
- [ ]* # Allowed whitespace.
- [|] .* \n # Row content.
- )*
- )
- (?=\n|\Z) # Stop at final double newline.
- }xm',
- '_DoTable_LeadingPipe_callback', $text);
-
- #
- # Find tables without leading pipe.
- #
- # Header 1 | Header 2
- # -------- | --------
- # Cell 1 | Cell 2
- # Cell 3 | Cell 4
- #
- $text = preg_replace_callback('
- {
- ^ # Start of a line
- [ ]{0,'.$less_than_tab.'} # Allowed whitespace.
- (\S.*[|].*) \n # $1: Header row (at least one pipe)
-
- [ ]{0,'.$less_than_tab.'} # Allowed whitespace.
- ([-:]+[ ]*[|][-| :]*) \n # $2: Header underline
-
- ( # $3: Cells
- (?:
- .* [|] .* \n # Row content
- )*
- )
- (?=\n|\Z) # Stop at final double newline.
- }xm',
- '_DoTable_callback', $text);
-
- return $text;
-}
-function _DoTable_LeadingPipe_callback($matches) {
- $head = $matches[1];
- $underline = $matches[2];
- $content = $matches[3];
-
- # Remove leading pipe for each row.
- $content = preg_replace('/^ *[|]/m', '', $content);
-
- return _DoTable_callback(array($matches[0], $head, $underline, $content));
-}
-function _DoTable_callback($matches) {
- $head = $matches[1];
- $underline = $matches[2];
- $content = $matches[3];
-
- # Remove any tailing pipes for each line.
- $head = preg_replace('/[|] *$/m', '', $head);
- $underline = preg_replace('/[|] *$/m', '', $underline);
- $content = preg_replace('/[|] *$/m', '', $content);
-
- # Reading alignement from header underline.
- $separators = preg_split('/ *[|] */', $underline);
- foreach ($separators as $n => $s) {
- if (preg_match('/^ *-+: *$/', $s)) $attr[$n] = ' align="right"';
- else if (preg_match('/^ *:-+: *$/', $s))$attr[$n] = ' align="center"';
- else if (preg_match('/^ *:-+ *$/', $s)) $attr[$n] = ' align="left"';
- else $attr[$n] = '';
- }
-
- # Creating code spans before splitting the row is an easy way to
- # handle a code span containg pipes.
- $head = _DoCodeSpans($head);
- $headers = preg_split('/ *[|] */', $head);
- $col_count = count($headers);
-
- # Write column headers.
- $text = " \n";
- $text .= "\n";
- $text .= "\n";
- foreach ($headers as $n => $header)
- $text .= " "._RunSpanGamut(trim($header))." \n";
- $text .= " \n";
- $text .= " \n";
-
- # Split content by row.
- $rows = explode("\n", trim($content, "\n"));
-
- $text .= "\n";
- foreach ($rows as $row) {
- # Creating code spans before splitting the row is an easy way to
- # handle a code span containg pipes.
- $row = _DoCodeSpans($row);
-
- # Split row by cell.
- $row_cells = preg_split('/ *[|] */', $row, $col_count);
- $row_cells = array_pad($row_cells, $col_count, '');
-
- $text .= "\n";
- foreach ($row_cells as $n => $cell)
- $text .= " "._RunSpanGamut(trim($cell))." \n";
- $text .= " \n";
- }
- $text .= " \n";
- $text .= "
";
-
- return _HashBlock($text) . "\n";
-}
-
-
-function _DoLists($text) {
-#
-# Form HTML ordered (numbered) and unordered (bulleted) lists.
-#
- global $md_tab_width, $md_list_level;
- $less_than_tab = $md_tab_width - 1;
-
- # Re-usable patterns to match list item bullets and number markers:
- $marker_ul = '[*+-]';
- $marker_ol = '\d+[.]';
- $marker_any = "(?:$marker_ul|$marker_ol)";
-
- $markers = array($marker_ul, $marker_ol);
-
- foreach ($markers as $marker) {
- # Re-usable pattern to match any entirel ul or ol list:
- $whole_list = '
- ( # $1 = whole list
- ( # $2
- [ ]{0,'.$less_than_tab.'}
- ('.$marker.') # $3 = first list item marker
- [ \t]+
- )
- (?s:.+?)
- ( # $4
- \z
- |
- \n{2,}
- (?=\S)
- (?! # Negative lookahead for another list item marker
- [ \t]*
- '.$marker.'[ \t]+
- )
- )
- )
- '; // mx
-
- # We use a different prefix before nested lists than top-level lists.
- # See extended comment in _ProcessListItems().
-
- if ($md_list_level) {
- $text = preg_replace_callback('{
- ^
- '.$whole_list.'
- }mx',
- '_DoLists_callback', $text);
- }
- else {
- $text = preg_replace_callback('{
- (?:(?<=\n\n)|\A\n?)
- '.$whole_list.'
- }mx',
- '_DoLists_callback', $text);
- }
- }
-
- return $text;
-}
-function _DoLists_callback($matches) {
- # Re-usable patterns to match list item bullets and number markers:
- $marker_ul = '[*+-]';
- $marker_ol = '\d+[.]';
- $marker_any = "(?:$marker_ul|$marker_ol)";
-
- $list = $matches[1];
- $list_type = preg_match("/$marker_ul/", $matches[3]) ? "ul" : "ol";
-
- $marker_any = ( $list_type == "ul" ? $marker_ul : $marker_ol );
-
- # Turn double returns into triple returns, so that we can make a
- # paragraph for the last item in a list, if necessary:
- $list = preg_replace("/\n{2,}/", "\n\n\n", $list);
- $result = _ProcessListItems($list, $marker_any);
- $result = "<$list_type>\n" . $result . "$list_type>";
- return "\n" . _HashBlock($result) . "\n\n";
-}
-
-
-function _ProcessListItems($list_str, $marker_any) {
-#
-# Process the contents of a single ordered or unordered list, splitting it
-# into individual list items.
-#
- global $md_list_level;
-
- # The $md_list_level global keeps track of when we're inside a list.
- # Each time we enter a list, we increment it; when we leave a list,
- # we decrement. If it's zero, we're not in a list anymore.
- #
- # We do this because when we're not inside a list, we want to treat
- # something like this:
- #
- # I recommend upgrading to version
- # 8. Oops, now this line is treated
- # as a sub-list.
- #
- # As a single paragraph, despite the fact that the second line starts
- # with a digit-period-space sequence.
- #
- # Whereas when we're inside a list (or sub-list), that line will be
- # treated as the start of a sub-list. What a kludge, huh? This is
- # an aspect of Markdown's syntax that's hard to parse perfectly
- # without resorting to mind-reading. Perhaps the solution is to
- # change the syntax rules such that sub-lists must start with a
- # starting cardinal number; e.g. "1." or "a.".
-
- $md_list_level++;
-
- # trim trailing blank lines:
- $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str);
-
- $list_str = preg_replace_callback('{
- (\n)? # leading line = $1
- (^[ \t]*) # leading whitespace = $2
- ('.$marker_any.') [ \t]+ # list marker = $3
- ((?s:.+?) # list item text = $4
- (\n{1,2}))
- (?= \n* (\z | \2 ('.$marker_any.') [ \t]+))
- }xm',
- '_ProcessListItems_callback', $list_str);
-
- $md_list_level--;
- return $list_str;
-}
-function _ProcessListItems_callback($matches) {
- $item = $matches[4];
- $leading_line =& $matches[1];
- $leading_space =& $matches[2];
-
- if ($leading_line || preg_match('/\n{2,}/', $item)) {
- $item = _RunBlockGamut(_Outdent($item));
- }
- else {
- # Recursion for sub-lists:
- $item = _DoLists(_Outdent($item));
- $item = preg_replace('/\n+$/', '', $item);
- $item = _RunSpanGamut($item);
- }
-
- return "" . $item . " \n";
-}
-
-
-function _DoDefLists($text) {
-#
-# Form HTML definition lists.
-#
- global $md_tab_width;
- $less_than_tab = $md_tab_width - 1;
-
- # Re-usable patterns to match list item bullets and number markers:
-
- # Re-usable pattern to match any entire dl list:
- $whole_list = '
- ( # $1 = whole list
- ( # $2
- [ ]{0,'.$less_than_tab.'}
- ((?>.*\S.*\n)+) # $3 = defined term
- \n?
- [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition
- )
- (?s:.+?)
- ( # $4
- \z
- |
- \n{2,}
- (?=\S)
- (?! # Negative lookahead for another term
- [ ]{0,'.$less_than_tab.'}
- (?: \S.*\n )+? # defined term
- \n?
- [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition
- )
- (?! # Negative lookahead for another definition
- [ ]{0,'.$less_than_tab.'}:[ ]+ # colon starting definition
- )
- )
- )
- '; // mx
-
- $text = preg_replace_callback('{
- (?:(?<=\n\n)|\A\n?)
- '.$whole_list.'
- }mx',
- '_DoDefLists_callback', $text);
-
- return $text;
-}
-function _DoDefLists_callback($matches) {
- # Re-usable patterns to match list item bullets and number markers:
- $list = $matches[1];
-
- # Turn double returns into triple returns, so that we can make a
- # paragraph for the last item in a list, if necessary:
- $result = trim(_ProcessDefListItems($list));
- $result = "\n" . $result . "\n ";
- return _HashBlock($result) . "\n\n";
-}
-
-
-function _ProcessDefListItems($list_str) {
-#
-# Process the contents of a single ordered or unordered list, splitting it
-# into individual list items.
-#
- global $md_tab_width;
- $less_than_tab = $md_tab_width - 1;
-
- # trim trailing blank lines:
- $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str);
-
- # Process definition terms.
- $list_str = preg_replace_callback('{
- (?:\n\n+|\A\n?) # leading line
- ( # definition terms = $1
- [ ]{0,'.$less_than_tab.'} # leading whitespace
- (?![:][ ]|[ ]) # negative lookahead for a definition
- # mark (colon) or more whitespace.
- (?: \S.* \n)+? # actual term (not whitespace).
- )
- (?=\n?[ ]{0,3}:[ ]) # lookahead for following line feed
- # with a definition mark.
- }xm',
- '_ProcessDefListItems_callback_dt', $list_str);
-
- # Process actual definitions.
- $list_str = preg_replace_callback('{
- \n(\n+)? # leading line = $1
- [ ]{0,'.$less_than_tab.'} # whitespace before colon
- [:][ ]+ # definition mark (colon)
- ((?s:.+?)) # definition text = $2
- (?= \n+ # stop at next definition mark,
- (?: # next term or end of text
- [ ]{0,'.$less_than_tab.'} [:][ ] |
- | \z
- )
- )
- }xm',
- '_ProcessDefListItems_callback_dd', $list_str);
-
- return $list_str;
-}
-function _ProcessDefListItems_callback_dt($matches) {
- $terms = explode("\n", trim($matches[1]));
- $text = '';
- foreach ($terms as $term) {
- $term = _RunSpanGamut(trim($term));
- $text .= "\n" . $term . " ";
- }
- return $text . "\n";
-}
-function _ProcessDefListItems_callback_dd($matches) {
- $leading_line = $matches[1];
- $def = $matches[2];
-
- if ($leading_line || preg_match('/\n{2,}/', $def)) {
- $def = _RunBlockGamut(_Outdent($def . "\n\n"));
- $def = "\n". $def ."\n";
- }
- else {
- $def = rtrim($def);
- $def = _RunSpanGamut(_Outdent($def));
- }
-
- return "\n " . $def . " \n";
-}
-
-
-function _DoCodeBlocks($text) {
-#
-# Process Markdown `` blocks.
-#
- global $md_tab_width;
- $text = preg_replace_callback("{
- (?:\\n\\n|\\A)
- ( # $1 = the code block -- one or more lines, starting with a space/tab
- (?:
- (?:[ ]\{$md_tab_width} | \\t) # Lines must start with a tab or a tab-width of spaces
- .*\\n+
- )+
- )
- ((?=^[ ]{0,$md_tab_width}\\S)|\\Z) # Lookahead for non-space at line-start, or end of doc
- }xm",
- '_DoCodeBlocks_callback', $text);
-
- return $text;
-}
-function _DoCodeBlocks_callback($matches) {
- $codeblock = $matches[1];
-
- $codeblock = _EncodeCode(_Outdent($codeblock));
-// $codeblock = _Detab($codeblock);
- # trim leading newlines and trailing whitespace
- $codeblock = preg_replace(array('/\A\n+/', '/\s+\z/'), '', $codeblock);
-
- $result = "" . $codeblock . "\n
";
-
- return "\n\n" . _HashBlock($result) . "\n\n";
-}
-
-
-function _DoCodeSpans($text) {
-#
-# * Backtick quotes are used for
spans.
-#
-# * You can use multiple backticks as the delimiters if you want to
-# include literal backticks in the code span. So, this input:
-#
-# Just type ``foo `bar` baz`` at the prompt.
-#
-# Will translate to:
-#
-# Just type foo `bar` baz
at the prompt.
-#
-# There's no arbitrary limit to the number of backticks you
-# can use as delimters. If you need three consecutive backticks
-# in your code, use four for delimiters, etc.
-#
-# * You can use spaces to get literal backticks at the edges:
-#
-# ... type `` `bar` `` ...
-#
-# Turns to:
-#
-# ... type `bar`
...
-#
- $text = preg_replace_callback('@
- (?$c
";
-}
-
-
-function _EncodeCode($_) {
-#
-# Encode/escape certain characters inside Markdown code runs.
-# The point is that in code, these characters are literals,
-# and lose their special Markdown meanings.
-#
- global $md_escape_table;
-
- # Encode all ampersands; HTML entities are not
- # entities within a Markdown code span.
- $_ = str_replace('&', '&', $_);
-
- # Do the angle bracket song and dance:
- $_ = str_replace(array('<', '>'),
- array('<', '>'), $_);
-
- # Now, escape characters that are magic in Markdown:
- $_ = str_replace(array_keys($md_escape_table),
- array_values($md_escape_table), $_);
-
- return $_;
-}
-
-
-function _DoItalicsAndBold($text) {
- # must go first:
- $text = preg_replace(array(
- '{
- ( (?
- [^_]+? # Anthing not em markers.
- |
- # Balence any regular _ emphasis inside.
- (?
- [^*]+? # Anthing not em markers.
- |
- # Balence any regular * emphasis inside.
- \* (?=\S) (?! \*) (.+?) (?<=\S) \*
- )+?
- )
- (?<=\S) \*\* # End mark not preceded by whitespace.
- }sx',
- ),
- '\2 ', $text);
- # Then :
- $text = preg_replace(array(
- '{ ( (?\2 ', $text);
-
- return $text;
-}
-
-
-function _DoBlockQuotes($text) {
- $text = preg_replace_callback('/
- ( # Wrap whole match in $1
- (
- ^[ \t]*>[ \t]? # ">" at the start of a line
- .+\n # rest of the first line
- (.+\n)* # subsequent consecutive lines
- \n* # blanks
- )+
- )
- /xm',
- '_DoBlockQuotes_callback', $text);
-
- return $text;
-}
-function _DoBlockQuotes_callback($matches) {
- $bq = $matches[1];
- # trim one level of quoting - trim whitespace-only lines
- $bq = preg_replace(array('/^[ \t]*>[ \t]?/m', '/^[ \t]+$/m'), '', $bq);
- $bq = _RunBlockGamut($bq); # recurse
-
- $bq = preg_replace('/^/m', " ", $bq);
- # These leading spaces screw with content, so we need to fix that:
- $bq = preg_replace_callback('{(\s*.+? )}sx',
- '_DoBlockQuotes_callback2', $bq);
-
- return _HashBlock("\n$bq\n ") . "\n\n";
-}
-function _DoBlockQuotes_callback2($matches) {
- $pre = $matches[1];
- $pre = preg_replace('/^ /m', '', $pre);
- return $pre;
-}
-
-
-function _FormParagraphs($text) {
-#
-# Params:
-# $text - string to process with html tags
-#
- global $md_html_blocks, $md_html_hashes;
-
- # Strip leading and trailing lines:
- $text = preg_replace(array('/\A\n+/', '/\n+\z/'), '', $text);
-
- $grafs = preg_split('/\n{2,}/', $text, -1, PREG_SPLIT_NO_EMPTY);
-
- #
- # Wrap
tags and unhashify HTML blocks
- #
- foreach ($grafs as $key => $value) {
- $value = trim(_RunSpanGamut($value));
-
- # Check if this should be enclosed in a paragraph.
- # Text equaling to a clean tag hash are not enclosed.
- # Text starting with a block tag hash are not either.
- $clean_key = $value;
- $block_key = substr($value, 0, 32);
-
- $is_p = (!isset($md_html_blocks[$block_key]) &&
- !isset($md_html_hashes[$clean_key]));
-
- if ($is_p) {
- $value = "
$value
";
- }
- $grafs[$key] = $value;
- }
-
- # Join grafs in one text, then unhash HTML tags.
- $text = implode("\n\n", $grafs);
-
- # Finish by removing any tag hashes still present in $text.
- $text = _UnhashTags($text);
-
- return $text;
-}
-
-
-function _EncodeAmpsAndAngles($text) {
-# Smart processing for ampersands and angle brackets that need to be encoded.
-
- # Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
- # http://bumppo.net/projects/amputator/
- $text = preg_replace('/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/',
- '&', $text);;
-
- # Encode naked <'s
- $text = preg_replace('{<(?![a-z/?\$!])}i', '<', $text);
-
- return $text;
-}
-
-
-function _EncodeBackslashEscapes($text) {
-#
-# Parameter: String.
-# Returns: The string, with after processing the following backslash
-# escape sequences.
-#
- global $md_escape_table, $md_backslash_escape_table;
- # Must process escaped backslashes first.
- return str_replace(array_keys($md_backslash_escape_table),
- array_values($md_backslash_escape_table), $text);
-}
-
-
-function _DoAutoLinks($text) {
- $text = preg_replace("!<((https?|ftp):[^'\">\\s]+)>!",
- '\1 ', $text);
-
- # Email addresses:
- $text = preg_replace('{
- <
- (?:mailto:)?
- (
- [-.\w]+
- \@
- [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
- )
- >
- }exi',
- "_EncodeEmailAddress(_UnescapeSpecialChars(_UnslashQuotes('\\1')))",
- $text);
-
- return $text;
-}
-
-
-function _EncodeEmailAddress($addr) {
-#
-# Input: an email address, e.g. "foo@example.com"
-#
-# Output: the email address as a mailto link, with each character
-# of the address encoded as either a decimal or hex entity, in
-# the hopes of foiling most address harvesting spam bots. E.g.:
-#
-# foo
-# @example.com
-#
-# Based by a filter by Matthew Wickline, posted to the BBEdit-Talk
-# mailing list:
-#
- $addr = "mailto:" . $addr;
- $length = strlen($addr);
-
- # leave ':' alone (to spot mailto: later)
- $addr = preg_replace_callback('/([^\:])/',
- '_EncodeEmailAddress_callback', $addr);
-
- $addr = "$addr ";
- # strip the mailto: from the visible part
- $addr = preg_replace('/">.+?:/', '">', $addr);
-
- return $addr;
-}
-function _EncodeEmailAddress_callback($matches) {
- $char = $matches[1];
- $r = rand(0, 100);
- # roughly 10% raw, 45% hex, 45% dec
- # '@' *must* be encoded. I insist.
- if ($r > 90 && $char != '@') return $char;
- if ($r < 45) return ''.dechex(ord($char)).';';
- return ''.ord($char).';';
-}
-
-
-function _UnescapeSpecialChars($text) {
-#
-# Swap back in all the special characters we've hidden.
-#
- global $md_escape_table;
- return str_replace(array_values($md_escape_table),
- array_keys($md_escape_table), $text);
-}
-
-
-function _UnhashTags($text) {
-#
-# Swap back in all the tags hashed by _HashHTMLBlocks.
-#
- global $md_html_hashes;
- return str_replace(array_keys($md_html_hashes),
- array_values($md_html_hashes), $text);
-}
-
-
-# _TokenizeHTML is shared between PHP Markdown and PHP SmartyPants.
-# We only define it if it is not already defined.
-if (!function_exists('_TokenizeHTML')) :
-function _TokenizeHTML($str) {
-#
-# Parameter: String containing HTML markup.
-# Returns: An array of the tokens comprising the input
-# string. Each token is either a tag (possibly with nested,
-# tags contained therein, such as , or a
-# run of text between tags. Each element of the array is a
-# two-element array; the first is either 'tag' or 'text';
-# the second is the actual value.
-#
-#
-# Regular expression derived from the _tokenize() subroutine in
-# Brad Choate's MTRegex plugin.
-#
-#
- $index = 0;
- $tokens = array();
-
- $match = '(?s:)|'. # comment
- '(?s:<\?.*?\?>)|'. # processing instruction
- # regular tags
- '(?:<[/!$]?[-a-zA-Z0-9:]+\b(?>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)';
-
- $parts = preg_split("{($match)}", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
-
- foreach ($parts as $part) {
- if (++$index % 2 && $part != '')
- $tokens[] = array('text', $part);
- else
- $tokens[] = array('tag', $part);
- }
-
- return $tokens;
-}
-endif;
-
-
-function _Outdent($text) {
-#
-# Remove one level of line-leading tabs or spaces
-#
- global $md_tab_width;
- return preg_replace("/^(\\t|[ ]{1,$md_tab_width})/m", "", $text);
-}
-
-
-function _Detab($text) {
-#
-# Replace tabs with the appropriate amount of space.
-#
- global $md_tab_width;
-
- # For each line we separate the line in blocks delemited by
- # tab characters. Then we reconstruct every line by adding the
- # appropriate number of space between each blocks.
-
- $lines = explode("\n", $text);
- $text = "";
-
- foreach ($lines as $line) {
- # Split in blocks.
- $blocks = explode("\t", $line);
- # Add each blocks to the line.
- $line = $blocks[0];
- unset($blocks[0]); # Do not add first block twice.
- foreach ($blocks as $block) {
- # Calculate amount of space, insert spaces, insert block.
- $amount = $md_tab_width - strlen($line) % $md_tab_width;
- $line .= str_repeat(" ", $amount) . $block;
- }
- $text .= "$line\n";
- }
- return $text;
-}
-
-
-function _UnslashQuotes($text) {
-#
-# This function is useful to remove automaticaly slashed double quotes
-# when using preg_replace and evaluating an expression.
-# Parameter: String.
-# Returns: The string with any slash-double-quote (\") sequence replaced
-# by a single double quote.
-#
- return str_replace('\"', '"', $text);
-}
-
-
-/*
-
-PHP Markdown Extra
-==================
-
-Description
------------
-
-This is a PHP translation of the original Markdown formatter written in
-Perl by John Gruber. This special version of PHP Markdown also include
-syntax additions by myself.
-
-Markdown is a text-to-HTML filter; it translates an easy-to-read /
-easy-to-write structured text format into HTML. Markdown's text format
-is most similar to that of plain text email, and supports features such
-as headers, *emphasis*, code blocks, blockquotes, and links.
-
-Markdown's syntax is designed not as a generic markup language, but
-specifically to serve as a front-end to (X)HTML. You can use span-level
-HTML tags anywhere in a Markdown document, and you can use block level
-HTML tags (like and
as well).
-
-For more information about Markdown's syntax, see:
-
-
-
-
-Bugs
-----
-
-To file bug reports please send email to:
-
-
-
-Please include with your report: (1) the example input; (2) the output you
-expected; (3) the output Markdown actually produced.
-
-
-Version History
----------------
-
-See Readme file for details.
-
-Extra 1.0 - 5 September 2005
-
-Extra 1.0b4 - 1 August 2005
-
-Extra 1.0b3 - 29 July 2005
-
-Extra 1.0b2 - 26 July 2005
-
-Extra 1.0b1 - 25 July 2005
-
-
-Author & Contributors
----------------------
-
-Original Markdown in Perl by John Gruber
-
-
-PHP port and extras by Michel Fortin
-
-
-
-Copyright and License
----------------------
-
-Copyright (c) 2004-2005 Michel Fortin
-
-All rights reserved.
-
-Based on Markdown
-Copyright (c) 2003-2004 John Gruber
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
-* Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-* Neither the name "Markdown" nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-This software is provided by the copyright holders and contributors "as
-is" and any express or implied warranties, including, but not limited
-to, the implied warranties of merchantability and fitness for a
-particular purpose are disclaimed. In no event shall the copyright owner
-or contributors be liable for any direct, indirect, incidental, special,
-exemplary, or consequential damages (including, but not limited to,
-procurement of substitute goods or services; loss of use, data, or
-profits; or business interruption) however caused and on any theory of
-liability, whether in contract, strict liability, or tort (including
-negligence or otherwise) arising in any way out of the use of this
-software, even if advised of the possibility of such damage.
-
-*/
-?>
\ No newline at end of file
diff --git a/includes/smarty/plugins/modifier.smartypants.php b/includes/smarty/plugins/modifier.smartypants.php
deleted file mode 100644
index 38c29f5f..00000000
--- a/includes/smarty/plugins/modifier.smartypants.php
+++ /dev/null
@@ -1,854 +0,0 @@
-
-#
-# PHP port by Michel Fortin
-#
-#
-# Copyright (c) 2003-2004 John Gruber
-# Copyright (c) 2004-2005 Michel Fortin
-#
-
-
-global $SmartyPantsPHPVersion, $SmartyPantsSyntaxVersion,
- $smartypants_attr, $sp_tags_to_skip;
-
-$SmartyPantsPHPVersion = '1.5.1d'; # Mon 6 Jun 2005
-$SmartyPantsSyntaxVersion = '1.5.1'; # Fri 12 Mar 2004
-
-
-# Configurable variables:
-$smartypants_attr = "1"; # Change this to configure.
- # 1 => "--" for em-dashes; no en-dash support
- # 2 => "---" for em-dashes; "--" for en-dashes
- # 3 => "--" for em-dashes; "---" for en-dashes
- # See docs for more configuration options.
-
-# Globals:
-$sp_tags_to_skip = '<(/?)(?:pre|code|kbd|script|math)[\s>]';
-
-
-# -- WordPress plugin interface -----------------------------------------------
-/*
-Plugin Name: SmartyPants
-Plugin URI: http://www.michelf.com/projects/php-smartypants/
-Description: SmartyPants is a web publishing utility that translates plain ASCII punctuation characters into “smart” typographic punctuation HTML entities. This plugin replace the default WordPress Texturize algorithm for the content and the title of your posts, the comments body and author name, and everywhere else Texturize normally apply. Based on the original Perl version by John Gruber .
-Version: 1.5.1c
-Author: Michel Fortin
-Author URI: http://www.michelf.com/
-*/
-if (isset($wp_version)) {
- # Remove default Texturize filter that would conflict with SmartyPants.
- remove_filter('category_description', 'wptexturize');
- remove_filter('list_cats', 'wptexturize');
- remove_filter('comment_author', 'wptexturize');
- remove_filter('comment_text', 'wptexturize');
- remove_filter('single_post_title', 'wptexturize');
- remove_filter('the_title', 'wptexturize');
- remove_filter('the_content', 'wptexturize');
- remove_filter('the_excerpt', 'wptexturize');
- # Add SmartyPants filter with priority 10 (same as Texturize).
- add_filter('category_description', 'SmartyPants', 10);
- add_filter('list_cats', 'SmartyPants', 10);
- add_filter('comment_author', 'SmartyPants', 10);
- add_filter('comment_text', 'SmartyPants', 10);
- add_filter('single_post_title', 'SmartyPants', 10);
- add_filter('the_title', 'SmartyPants', 10);
- add_filter('the_content', 'SmartyPants', 10);
- add_filter('the_excerpt', 'SmartyPants', 10);
-}
-
-# -- Smarty Modifier Interface ------------------------------------------------
-function smarty_modifier_smartypants($text, $attr = NULL) {
- return SmartyPants($text, $attr);
-}
-
-
-
-function SmartyPants($text, $attr = NULL, $ctx = NULL) {
- global $smartypants_attr, $sp_tags_to_skip;
- # Paramaters:
- $text; # text to be parsed
- $attr; # value of the smart_quotes="" attribute
- $ctx; # MT context object (unused)
- if ($attr == NULL) $attr = $smartypants_attr;
-
- # Options to specify which transformations to make:
- $do_stupefy = FALSE;
- $convert_quot = 0; # should we translate " entities into normal quotes?
-
- # Parse attributes:
- # 0 : do nothing
- # 1 : set all
- # 2 : set all, using old school en- and em- dash shortcuts
- # 3 : set all, using inverted old school en and em- dash shortcuts
- #
- # q : quotes
- # b : backtick quotes (``double'' only)
- # B : backtick quotes (``double'' and `single')
- # d : dashes
- # D : old school dashes
- # i : inverted old school dashes
- # e : ellipses
- # w : convert " entities to " for Dreamweaver users
-
- if ($attr == "0") {
- # Do nothing.
- return $text;
- }
- else if ($attr == "1") {
- # Do everything, turn all options on.
- $do_quotes = 1;
- $do_backticks = 1;
- $do_dashes = 1;
- $do_ellipses = 1;
- }
- else if ($attr == "2") {
- # Do everything, turn all options on, use old school dash shorthand.
- $do_quotes = 1;
- $do_backticks = 1;
- $do_dashes = 2;
- $do_ellipses = 1;
- }
- else if ($attr == "3") {
- # Do everything, turn all options on, use inverted old school dash shorthand.
- $do_quotes = 1;
- $do_backticks = 1;
- $do_dashes = 3;
- $do_ellipses = 1;
- }
- else if ($attr == "-1") {
- # Special "stupefy" mode.
- $do_stupefy = 1;
- }
- else {
- $chars = preg_split('//', $attr);
- foreach ($chars as $c){
- if ($c == "q") { $do_quotes = 1; }
- else if ($c == "b") { $do_backticks = 1; }
- else if ($c == "B") { $do_backticks = 2; }
- else if ($c == "d") { $do_dashes = 1; }
- else if ($c == "D") { $do_dashes = 2; }
- else if ($c == "i") { $do_dashes = 3; }
- else if ($c == "e") { $do_ellipses = 1; }
- else if ($c == "w") { $convert_quot = 1; }
- else {
- # Unknown attribute option, ignore.
- }
- }
- }
-
- $tokens = _TokenizeHTML($text);
- $result = '';
- $in_pre = 0; # Keep track of when we're inside or tags.
-
- $prev_token_last_char = ""; # This is a cheat, used to get some context
- # for one-character tokens that consist of
- # just a quote char. What we do is remember
- # the last character of the previous text
- # token, to use as context to curl single-
- # character quote tokens correctly.
-
- foreach ($tokens as $cur_token) {
- if ($cur_token[0] == "tag") {
- # Don't mess with quotes inside tags.
- $result .= $cur_token[1];
- if (preg_match("@$sp_tags_to_skip@", $cur_token[1], $matches)) {
- $in_pre = isset($matches[1]) && $matches[1] == '/' ? 0 : 1;
- }
- } else {
- $t = $cur_token[1];
- $last_char = substr($t, -1); # Remember last char of this token before processing.
- if (! $in_pre) {
- $t = ProcessEscapes($t);
-
- if ($convert_quot) {
- $t = preg_replace('/"/', '"', $t);
- }
-
- if ($do_dashes) {
- if ($do_dashes == 1) $t = EducateDashes($t);
- if ($do_dashes == 2) $t = EducateDashesOldSchool($t);
- if ($do_dashes == 3) $t = EducateDashesOldSchoolInverted($t);
- }
-
- if ($do_ellipses) $t = EducateEllipses($t);
-
- # Note: backticks need to be processed before quotes.
- if ($do_backticks) {
- $t = EducateBackticks($t);
- if ($do_backticks == 2) $t = EducateSingleBackticks($t);
- }
-
- if ($do_quotes) {
- if ($t == "'") {
- # Special case: single-character ' token
- if (preg_match('/\S/', $prev_token_last_char)) {
- $t = "’";
- }
- else {
- $t = "‘";
- }
- }
- else if ($t == '"') {
- # Special case: single-character " token
- if (preg_match('/\S/', $prev_token_last_char)) {
- $t = "”";
- }
- else {
- $t = "“";
- }
- }
- else {
- # Normal case:
- $t = EducateQuotes($t);
- }
- }
-
- if ($do_stupefy) $t = StupefyEntities($t);
- }
- $prev_token_last_char = $last_char;
- $result .= $t;
- }
- }
-
- return $result;
-}
-
-
-function SmartQuotes($text, $attr = NULL, $ctx = NULL) {
- global $smartypants_attr, $sp_tags_to_skip;
- # Paramaters:
- $text; # text to be parsed
- $attr; # value of the smart_quotes="" attribute
- $ctx; # MT context object (unused)
- if ($attr == NULL) $attr = $smartypants_attr;
-
- $do_backticks; # should we educate ``backticks'' -style quotes?
-
- if ($attr == 0) {
- # do nothing;
- return $text;
- }
- else if ($attr == 2) {
- # smarten ``backticks'' -style quotes
- $do_backticks = 1;
- }
- else {
- $do_backticks = 0;
- }
-
- # Special case to handle quotes at the very end of $text when preceded by
- # an HTML tag. Add a space to give the quote education algorithm a bit of
- # context, so that it can guess correctly that it's a closing quote:
- $add_extra_space = 0;
- if (preg_match("/>['\"]\\z/", $text)) {
- $add_extra_space = 1; # Remember, so we can trim the extra space later.
- $text .= " ";
- }
-
- $tokens = _TokenizeHTML($text);
- $result = '';
- $in_pre = 0; # Keep track of when we're inside or tags
-
- $prev_token_last_char = ""; # This is a cheat, used to get some context
- # for one-character tokens that consist of
- # just a quote char. What we do is remember
- # the last character of the previous text
- # token, to use as context to curl single-
- # character quote tokens correctly.
-
- foreach ($tokens as $cur_token) {
- if ($cur_token[0] == "tag") {
- # Don't mess with quotes inside tags
- $result .= $cur_token[1];
- if (preg_match("@$sp_tags_to_skip@", $cur_token[1], $matches)) {
- $in_pre = isset($matches[1]) && $matches[1] == '/' ? 0 : 1;
- }
- } else {
- $t = $cur_token[1];
- $last_char = substr($t, -1); # Remember last char of this token before processing.
- if (! $in_pre) {
- $t = ProcessEscapes($t);
- if ($do_backticks) {
- $t = EducateBackticks($t);
- }
-
- if ($t == "'") {
- # Special case: single-character ' token
- if (preg_match('/\S/', $prev_token_last_char)) {
- $t = "’";
- }
- else {
- $t = "‘";
- }
- }
- else if ($t == '"') {
- # Special case: single-character " token
- if (preg_match('/\S/', $prev_token_last_char)) {
- $t = "”";
- }
- else {
- $t = "“";
- }
- }
- else {
- # Normal case:
- $t = EducateQuotes($t);
- }
-
- }
- $prev_token_last_char = $last_char;
- $result .= $t;
- }
- }
-
- if ($add_extra_space) {
- preg_replace('/ \z/', '', $result); # Trim trailing space if we added one earlier.
- }
- return $result;
-}
-
-
-function SmartDashes($text, $attr = NULL, $ctx = NULL) {
- global $smartypants_attr, $sp_tags_to_skip;
- # Paramaters:
- $text; # text to be parsed
- $attr; # value of the smart_dashes="" attribute
- $ctx; # MT context object (unused)
- if ($attr == NULL) $attr = $smartypants_attr;
-
- # reference to the subroutine to use for dash education, default to EducateDashes:
- $dash_sub_ref = 'EducateDashes';
-
- if ($attr == 0) {
- # do nothing;
- return $text;
- }
- else if ($attr == 2) {
- # use old smart dash shortcuts, "--" for en, "---" for em
- $dash_sub_ref = 'EducateDashesOldSchool';
- }
- else if ($attr == 3) {
- # inverse of 2, "--" for em, "---" for en
- $dash_sub_ref = 'EducateDashesOldSchoolInverted';
- }
-
- $tokens;
- $tokens = _TokenizeHTML($text);
-
- $result = '';
- $in_pre = 0; # Keep track of when we're inside or tags
- foreach ($tokens as $cur_token) {
- if ($cur_token[0] == "tag") {
- # Don't mess with quotes inside tags
- $result .= $cur_token[1];
- if (preg_match("@$sp_tags_to_skip@", $cur_token[1], $matches)) {
- $in_pre = isset($matches[1]) && $matches[1] == '/' ? 0 : 1;
- }
- } else {
- $t = $cur_token[1];
- if (! $in_pre) {
- $t = ProcessEscapes($t);
- $t = $dash_sub_ref($t);
- }
- $result .= $t;
- }
- }
- return $result;
-}
-
-
-function SmartEllipses($text, $attr = NULL, $ctx = NULL) {
- # Paramaters:
- $text; # text to be parsed
- $attr; # value of the smart_ellipses="" attribute
- $ctx; # MT context object (unused)
- if ($attr == NULL) $attr = $smartypants_attr;
-
- if ($attr == 0) {
- # do nothing;
- return $text;
- }
-
- $tokens;
- $tokens = _TokenizeHTML($text);
-
- $result = '';
- $in_pre = 0; # Keep track of when we're inside or tags
- foreach ($tokens as $cur_token) {
- if ($cur_token[0] == "tag") {
- # Don't mess with quotes inside tags
- $result .= $cur_token[1];
- if (preg_match("@$sp_tags_to_skip@", $cur_token[1], $matches)) {
- $in_pre = isset($matches[1]) && $matches[1] == '/' ? 0 : 1;
- }
- } else {
- $t = $cur_token[1];
- if (! $in_pre) {
- $t = ProcessEscapes($t);
- $t = EducateEllipses($t);
- }
- $result .= $t;
- }
- }
- return $result;
-}
-
-
-function EducateQuotes($_) {
-#
-# Parameter: String.
-#
-# Returns: The string, with "educated" curly quote HTML entities.
-#
-# Example input: "Isn't this fun?"
-# Example output: “Isn’t this fun?”
-#
- # Make our own "punctuation" character class, because the POSIX-style
- # [:PUNCT:] is only available in Perl 5.6 or later:
- $punct_class = "[!\"#\\$\\%'()*+,-.\\/:;<=>?\\@\\[\\\\\]\\^_`{|}~]";
-
- # Special case if the very first character is a quote
- # followed by punctuation at a non-word-break. Close the quotes by brute force:
- $_ = preg_replace(
- array("/^'(?=$punct_class\\B)/", "/^\"(?=$punct_class\\B)/"),
- array('’', '”'), $_);
-
-
- # Special case for double sets of quotes, e.g.:
- # He said, "'Quoted' words in a larger quote."
- $_ = preg_replace(
- array("/\"'(?=\w)/", "/'\"(?=\w)/"),
- array('“‘', '‘“'), $_);
-
- # Special case for decade abbreviations (the '80s):
- $_ = preg_replace("/'(?=\\d{2}s)/", '’', $_);
-
- $close_class = '[^\ \t\r\n\[\{\(\-]';
- $dec_dashes = '&\#8211;|&\#8212;';
-
- # Get most opening single quotes:
- $_ = preg_replace("{
- (
- \\s | # a whitespace char, or
- | # a non-breaking space entity, or
- -- | # dashes, or
- &[mn]dash; | # named dash entities
- $dec_dashes | # or decimal entities
- &\\#x201[34]; # or hex
- )
- ' # the quote
- (?=\\w) # followed by a word character
- }x", '\1‘', $_);
- # Single closing quotes:
- $_ = preg_replace("{
- ($close_class)?
- '
- (?(1)| # If $1 captured, then do nothing;
- (?=\\s | s\\b) # otherwise, positive lookahead for a whitespace
- ) # char or an 's' at a word ending position. This
- # is a special case to handle something like:
- # \"Custer 's Last Stand.\"
- }xi", '\1’', $_);
-
- # Any remaining single quotes should be opening ones:
- $_ = str_replace("'", '‘', $_);
-
-
- # Get most opening double quotes:
- $_ = preg_replace("{
- (
- \\s | # a whitespace char, or
- | # a non-breaking space entity, or
- -- | # dashes, or
- &[mn]dash; | # named dash entities
- $dec_dashes | # or decimal entities
- &\\#x201[34]; # or hex
- )
- \" # the quote
- (?=\\w) # followed by a word character
- }x", '\1“', $_);
-
- # Double closing quotes:
- $_ = preg_replace("{
- ($close_class)?
- \"
- (?(1)|(?=\\s)) # If $1 captured, then do nothing;
- # if not, then make sure the next char is whitespace.
- }x", '\1”', $_);
-
- # Any remaining quotes should be opening ones.
- $_ = str_replace('"', '“', $_);
-
- return $_;
-}
-
-
-function EducateBackticks($_) {
-#
-# Parameter: String.
-# Returns: The string, with ``backticks'' -style double quotes
-# translated into HTML curly quote entities.
-#
-# Example input: ``Isn't this fun?''
-# Example output: “Isn't this fun?”
-#
-
- $_ = str_replace(array("``", "''",),
- array('“', '”'), $_);
- return $_;
-}
-
-
-function EducateSingleBackticks($_) {
-#
-# Parameter: String.
-# Returns: The string, with `backticks' -style single quotes
-# translated into HTML curly quote entities.
-#
-# Example input: `Isn't this fun?'
-# Example output: ‘Isn’t this fun?’
-#
-
- $_ = str_replace(array("`", "'",),
- array('‘', '’'), $_);
- return $_;
-}
-
-
-function EducateDashes($_) {
-#
-# Parameter: String.
-#
-# Returns: The string, with each instance of "--" translated to
-# an em-dash HTML entity.
-#
-
- $_ = str_replace('--', '—', $_);
- return $_;
-}
-
-
-function EducateDashesOldSchool($_) {
-#
-# Parameter: String.
-#
-# Returns: The string, with each instance of "--" translated to
-# an en-dash HTML entity, and each "---" translated to
-# an em-dash HTML entity.
-#
-
- # em en
- $_ = str_replace(array("---", "--",),
- array('—', '–'), $_);
- return $_;
-}
-
-
-function EducateDashesOldSchoolInverted($_) {
-#
-# Parameter: String.
-#
-# Returns: The string, with each instance of "--" translated to
-# an em-dash HTML entity, and each "---" translated to
-# an en-dash HTML entity. Two reasons why: First, unlike the
-# en- and em-dash syntax supported by
-# EducateDashesOldSchool(), it's compatible with existing
-# entries written before SmartyPants 1.1, back when "--" was
-# only used for em-dashes. Second, em-dashes are more
-# common than en-dashes, and so it sort of makes sense that
-# the shortcut should be shorter to type. (Thanks to Aaron
-# Swartz for the idea.)
-#
-
- # en em
- $_ = str_replace(array("---", "--",),
- array('–', '—'), $_);
- return $_;
-}
-
-
-function EducateEllipses($_) {
-#
-# Parameter: String.
-# Returns: The string, with each instance of "..." translated to
-# an ellipsis HTML entity. Also converts the case where
-# there are spaces between the dots.
-#
-# Example input: Huh...?
-# Example output: Huh…?
-#
-
- $_ = str_replace(array("...", ". . .",), '…', $_);
- return $_;
-}
-
-
-function StupefyEntities($_) {
-#
-# Parameter: String.
-# Returns: The string, with each SmartyPants HTML entity translated to
-# its ASCII counterpart.
-#
-# Example input: “Hello — world.”
-# Example output: "Hello -- world."
-#
-
- # en-dash em-dash
- $_ = str_replace(array('–', '—'),
- array('-', '--'), $_);
-
- # single quote open close
- $_ = str_replace(array('‘', '’'), "'", $_);
-
- # double quote open close
- $_ = str_replace(array('“', '”'), '"', $_);
-
- $_ = str_replace('…', '...', $_); # ellipsis
-
- return $_;
-}
-
-
-function ProcessEscapes($_) {
-#
-# Parameter: String.
-# Returns: The string, with after processing the following backslash
-# escape sequences. This is useful if you want to force a "dumb"
-# quote or other character to appear.
-#
-# Escape Value
-# ------ -----
-# \\ \
-# \" "
-# \' '
-# \. .
-# \- -
-# \` `
-#
- $_ = str_replace(
- array('\\', '\"', "\'", '\.', '\-', '\`'),
- array('\', '"', ''', '.', '-', '`'), $_);
-
- return $_;
-}
-
-
-# _TokenizeHTML is shared between PHP SmartyPants and PHP Markdown.
-# We only define it if it is not already defined.
-if (!function_exists('_TokenizeHTML')) :
-function _TokenizeHTML($str) {
-#
-# Parameter: String containing HTML markup.
-# Returns: An array of the tokens comprising the input
-# string. Each token is either a tag (possibly with nested,
-# tags contained therein, such as , or a
-# run of text between tags. Each element of the array is a
-# two-element array; the first is either 'tag' or 'text';
-# the second is the actual value.
-#
-#
-# Regular expression derived from the _tokenize() subroutine in
-# Brad Choate's MTRegex plugin.
-#
-#
- $index = 0;
- $tokens = array();
-
- $match = '(?s:)|'. # comment
- '(?s:<\?.*?\?>)|'. # processing instruction
- # regular tags
- '(?:<[/!$]?[-a-zA-Z0-9:]+\b(?>[^"\'>]+|"[^"]*"|\'[^\']*\')*>)';
-
- $parts = preg_split("{($match)}", $str, -1, PREG_SPLIT_DELIM_CAPTURE);
-
- foreach ($parts as $part) {
- if (++$index % 2 && $part != '')
- $tokens[] = array('text', $part);
- else
- $tokens[] = array('tag', $part);
- }
- return $tokens;
-}
-endif;
-
-
-/*
-
-PHP SmartyPants
-===============
-
-Description
------------
-
-This is a PHP translation of the original SmartyPants quote educator written in
-Perl by John Gruber.
-
-SmartyPants is a web publishing utility that translates plain ASCII
-punctuation characters into "smart" typographic punctuation HTML
-entities. SmartyPants can perform the following transformations:
-
-* Straight quotes (`"` and `'`) into "curly" quote HTML entities
-* Backticks-style quotes (` ``like this'' `) into "curly" quote HTML
- entities
-* Dashes (`--` and `---`) into en- and em-dash entities
-* Three consecutive dots (`...`) into an ellipsis entity
-
-SmartyPants does not modify characters within ``, ``, ``,
-`