From 24984268671d0e644667cd05c4963685563959e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Dec 2010 23:27:17 +0000 Subject: [PATCH] Fix: Restore stable version for 3.0 --- htdocs/admin/modules.php | 3 +- htdocs/boutique/osc_master.inc.php | 82 +- .../jscalendar/bugtest-hidden-selects.html | 216 +- .../include/jscalendar/lang/calendar-bg.js | 248 +- .../include/jscalendar/lang/calendar-el.js | 178 +- .../jscalendar/lang/calendar-hr-utf8.js | 96 +- .../include/jscalendar/lang/calendar-si.js | 186 +- .../include/jscalendar/lang/calendar-tr.js | 116 +- .../include/jscalendar/lang/cn_utf8.js | 246 +- htdocs/comm/fiche.php | 2 +- .../propal/class/actions_proposal.class.php | 14 +- htdocs/commande/class/commande.class.php | 10 +- htdocs/compta/facture.php | 221 +- .../facture/class/facture-rec.class.php | 6 +- htdocs/compta/facture/class/facture.class.php | 30 +- htdocs/compta/facture/fiche-rec.php | 34 +- .../class/bon-prelevement.class.php | 12 +- htdocs/contrat/class/contrat.class.php | 216 +- htdocs/contrat/fiche.php | 24 +- htdocs/contrat/tpl/linkedobjectblock.tpl.php | 2 +- .../core/class/actions_commonobject.class.php | 176 -- htdocs/core/class/translate.class.php | 6 +- htdocs/core/tpl/login.tpl.php | 2 +- htdocs/expedition/class/expedition.class.php | 32 +- htdocs/expedition/fiche.php | 66 +- htdocs/fichinter/class/fichinter.class.php | 22 +- .../class/fournisseur.commande.class.php | 22 +- htdocs/fourn/commande/fiche.php | 4 +- htdocs/fourn/facture/fiche.php | 34 +- htdocs/includes/adodbtime/adodb-time.inc.php | 2576 ++++++++--------- htdocs/includes/artichow/php5/Graph.class.php | 788 ++--- htdocs/includes/boxes/box_contracts.php | 2 +- htdocs/includes/fckeditor/.cvsignore | 4 +- htdocs/includes/fckeditor/editor/.cvsignore | 2 +- .../server-scripts/spellchecker.cfm | 296 +- .../server-scripts/spellchecker.pl | 362 +-- .../spellerpages/spellChecker.js | 922 +++--- .../spellerpages/spellerStyle.css | 98 +- .../fckeditor/editor/dtd/fck_dtd_test.html | 82 +- .../filemanager/connectors/php/config.php | 340 +-- .../filemanager/connectors/php/phpcompat.php | 34 +- .../filemanager/connectors/py/htaccess.txt | 46 +- htdocs/includes/fpdf/fpdf/FAQ.htm | 682 ++--- htdocs/includes/fpdf/fpdf/font/courier.php | 14 +- htdocs/includes/fpdf/fpdf/font/desktop.ini | 8 +- htdocs/includes/fpdf/fpdf/font/helvetica.php | 30 +- htdocs/includes/fpdf/fpdf/font/helveticab.php | 30 +- .../includes/fpdf/fpdf/font/helveticabi.php | 30 +- htdocs/includes/fpdf/fpdf/font/helveticai.php | 30 +- .../fpdf/fpdf/font/makefont/makefont.php | 838 +++--- htdocs/includes/fpdf/fpdf/font/symbol.php | 30 +- htdocs/includes/fpdf/fpdf/font/times.php | 30 +- htdocs/includes/fpdf/fpdf/font/timesb.php | 30 +- htdocs/includes/fpdf/fpdf/font/timesbi.php | 30 +- htdocs/includes/fpdf/fpdf/font/timesi.php | 30 +- .../includes/fpdf/fpdf/font/zapfdingbats.php | 30 +- htdocs/includes/fpdf/fpdf/fpdf.css | 42 +- htdocs/includes/fpdf/fpdf/histo.htm | 256 +- htdocs/includes/fpdf/fpdf/install.txt | 52 +- htdocs/includes/fpdf/fpdf/license.txt | 10 +- htdocs/includes/fpdf/fpdfi/README.txt | 10 +- htdocs/includes/geoip/geoipcity.inc | 416 +-- htdocs/includes/login/README.txt | 52 +- htdocs/includes/magpierss/rss_parse.inc | 1210 ++++---- .../modules/cheque/pdf/pdf_blochet.class.php | 28 +- .../modules/commande/pdf_edison.modules.php | 2 +- .../modules/commande/pdf_einstein.modules.php | 2 +- .../pdf/pdf_expedition_merou.modules.php | 3 +- .../pdf/pdf_expedition_rouget.modules.php | 2 + .../livraison/pdf/pdf_sirocco.modules.php | 18 +- .../livraison/pdf/pdf_typhon.modules.php | 26 +- htdocs/includes/modules/mailings/.cvsignore | 4 +- htdocs/includes/modules/modDocument.class.php | 262 +- htdocs/includes/modules/modDomain.class.php | 300 +- .../includes/modules/modFicheinter.class.php | 360 +-- htdocs/includes/modules/modLabel.class.php | 248 +- htdocs/includes/modules/modMailing.class.php | 264 +- htdocs/includes/modules/modTax.class.php | 338 +-- .../modules/rapport/pdf_paiement.class.php | 8 +- .../pdf/pdf_canelle.modules.php | 4 +- .../pdf/pdf_muscadet.modules.php | 4 +- .../smarty/libs/plugins/function.fetch.php | 442 +-- htdocs/install/mysql/tables/llx_user.sql | 8 +- htdocs/lib/.cvsignore | 2 +- htdocs/lib/pdf.lib.php | 44 +- htdocs/lib/viewfiles.lib.php | 6 +- htdocs/livraison/class/livraison.class.php | 74 +- htdocs/livraison/fiche.php | 54 +- htdocs/main.inc.php | 8 +- htdocs/master.inc.php | 9 +- htdocs/paybox/lib/paybox.lib.php | 22 +- htdocs/paypal/lib/paypal.lib.php | 22 +- htdocs/public/demo/index.php | 4 +- htdocs/public/error-401.php | 2 +- htdocs/societe/class/societe.class.php | 70 +- htdocs/societe/document.php | 2 +- htdocs/theme/auguria/.cvsignore | 2 +- htdocs/theme/auguria/fckeditor/fck_dialog.css | 804 ++--- .../theme/auguria/fckeditor/fck_dialog_ie6.js | 220 +- htdocs/theme/auguria/fckeditor/fck_editor.css | 928 +++--- htdocs/theme/common/.cvsignore | 2 +- htdocs/theme/common/mime/.cvsignore | 2 +- htdocs/theme/common/treemenu/.cvsignore | 4 +- htdocs/theme/eldy/fckeditor/fck_dialog.css | 804 ++--- htdocs/theme/eldy/fckeditor/fck_dialog_ie6.js | 220 +- htdocs/theme/eldy/fckeditor/fck_editor.css | 928 +++--- htdocs/theme/eldy/fckeditor/images/.cvsignore | 4 +- htdocs/theme/eldy/img/.cvsignore | 2 +- htdocs/theme/freelug/fckeditor/fck_dialog.css | 804 ++--- .../theme/freelug/fckeditor/fck_dialog_ie6.js | 220 +- htdocs/theme/freelug/fckeditor/fck_editor.css | 928 +++--- .../phones/smartphone/tpl/header.tpl.php | 2 +- htdocs/theme/yellow/fckeditor/fck_dialog.css | 804 ++--- .../theme/yellow/fckeditor/fck_dialog_ie6.js | 220 +- htdocs/theme/yellow/fckeditor/fck_editor.css | 928 +++--- htdocs/user/class/user.class.php | 16 +- htdocs/webservices/README | 28 +- 117 files changed, 11079 insertions(+), 11181 deletions(-) delete mode 100644 htdocs/core/class/actions_commonobject.class.php diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index fc50cef2015..0425f1fd762 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -84,8 +84,7 @@ $i = 0; // is a sequencer of modules found $j = 0; // j is module number. Automatically affeted if module number not defined. foreach ($conf->file->dol_document_root as $dirroot) { - if (preg_match('/custom$/i',$dirroot)) $dir = $dirroot . "/modules/"; - else $dir = $dirroot . "/includes/modules/"; + $dir = $dirroot . "/includes/modules/"; // Load modules attributes in arrays (name, numero, orders) from dir directory //print $dir."\n
"; diff --git a/htdocs/boutique/osc_master.inc.php b/htdocs/boutique/osc_master.inc.php index f866e0c104c..0c3684a56a5 100644 --- a/htdocs/boutique/osc_master.inc.php +++ b/htdocs/boutique/osc_master.inc.php @@ -1,41 +1,41 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - \file htdocs/boutique/osc_master.inc.php - \brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce - \version $Id$ -*/ - -require_once(DOL_DOCUMENT_ROOT ."/lib/databases/".$conf->db->type.".lib.php"); - -/* - * Creation objet $dbosc - */ -$dbosc = new DoliDb($conf->db->type,$conf->global->OSC_DB_HOST,$conf->global->OSC_DB_USER,$conf->global->OSC_DB_PASS,$conf->global->OSC_DB_NAME,$conf->global->OSC_DB_PORT); -if (! $dbosc->connected) -{ - dol_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); - - llxHeader("",$langs->trans("OSCommerceShop"),""); - print '
Failed to connect to oscommerce database. Check your module setup
'; - llxFooter(); - exit; -} - -?> + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + \file htdocs/boutique/osc_master.inc.php + \brief Fichier de preparation de l'environnement Dolibarr pour OSCommerce + \version $Id$ +*/ + +require_once(DOL_DOCUMENT_ROOT ."/lib/databases/".$conf->db->type.".lib.php"); + +/* + * Creation objet $dbosc + */ +$dbosc = new DoliDb($conf->db->type,$conf->global->OSC_DB_HOST,$conf->global->OSC_DB_USER,$conf->global->OSC_DB_PASS,$conf->global->OSC_DB_NAME,$conf->global->OSC_DB_PORT); +if (! $dbosc->connected) +{ + dol_syslog($dbosc,"host=".$conf->global->OSC_DB_HOST.", user=".$conf->global->OSC_DB_USER.", databasename=".$conf->global->OSC_DB_NAME.", ".$db->error,LOG_ERR); + + llxHeader("",$langs->trans("OSCommerceShop"),""); + print '
Failed to connect to oscommerce database. Check your module setup
'; + llxFooter(); + exit; +} + +?> diff --git a/htdocs/cashdesk/include/jscalendar/bugtest-hidden-selects.html b/htdocs/cashdesk/include/jscalendar/bugtest-hidden-selects.html index 900bc17e8ba..df353371601 100644 --- a/htdocs/cashdesk/include/jscalendar/bugtest-hidden-selects.html +++ b/htdocs/cashdesk/include/jscalendar/bugtest-hidden-selects.html @@ -1,108 +1,108 @@ - - - -Bug - - - - - - - - - - - - - -
-Date: -
- - -

-
-
Visible <select>, hides and unhides as expected -
- - -

-
Hidden <select>, it should stay hidden (but doesn't) -
- - -

-
Hidden textbox below, it stays hidden as expected -
- -

- + + + +Bug + + + + + + + + + + + + + +
+Date: +
+ + +

+
+
Visible <select>, hides and unhides as expected +
+ + +

+
Hidden <select>, it should stay hidden (but doesn't) +
+ + +

+
Hidden textbox below, it stays hidden as expected +
+ +

+ diff --git a/htdocs/cashdesk/include/jscalendar/lang/calendar-bg.js b/htdocs/cashdesk/include/jscalendar/lang/calendar-bg.js index 4f4fd863e51..5eb73ec6c11 100644 --- a/htdocs/cashdesk/include/jscalendar/lang/calendar-bg.js +++ b/htdocs/cashdesk/include/jscalendar/lang/calendar-bg.js @@ -1,124 +1,124 @@ -// ** I18N - -// Calendar BG language -// Author: Mihai Bazon, -// Translator: Valentin Sheiretsky, -// Encoding: Windows-1251 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("", - "", - "", - "", - "", - "", - "", - ""); - -// full month names -Calendar._MN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// short month names -Calendar._SMN = new Array -("", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - ""); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = " "; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Date selection:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + -"- Hold mouse button on any of the above buttons for faster selection."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- Click on any of the time parts to increase it\n" + -"- or Shift-click to decrease it\n" + -"- or click and drag for faster selection."; - -Calendar._TT["PREV_YEAR"] = " ( )"; -Calendar._TT["PREV_MONTH"] = " ( )"; -Calendar._TT["GO_TODAY"] = " "; -Calendar._TT["NEXT_MONTH"] = " ( )"; -Calendar._TT["NEXT_YEAR"] = " ( )"; -Calendar._TT["SEL_DATE"] = " "; -Calendar._TT["DRAG_TO_MOVE"] = ""; -Calendar._TT["PART_TODAY"] = " ()"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s "; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = ""; -Calendar._TT["TODAY"] = ""; -Calendar._TT["TIME_PART"] = "(Shift-)Click drag "; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y"; - -Calendar._TT["WK"] = ""; -Calendar._TT["TIME"] = ":"; +// ** I18N + +// Calendar BG language +// Author: Mihai Bazon, +// Translator: Valentin Sheiretsky, +// Encoding: Windows-1251 +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("", + "", + "", + "", + "", + "", + "", + ""); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("", + "", + "", + "", + "", + "", + "", + ""); + +// full month names +Calendar._MN = new Array +("", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""); + +// short month names +Calendar._SMN = new Array +("", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ""); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = " "; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = " ( )"; +Calendar._TT["PREV_MONTH"] = " ( )"; +Calendar._TT["GO_TODAY"] = " "; +Calendar._TT["NEXT_MONTH"] = " ( )"; +Calendar._TT["NEXT_YEAR"] = " ( )"; +Calendar._TT["SEL_DATE"] = " "; +Calendar._TT["DRAG_TO_MOVE"] = ""; +Calendar._TT["PART_TODAY"] = " ()"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "%s "; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = ""; +Calendar._TT["TODAY"] = ""; +Calendar._TT["TIME_PART"] = "(Shift-)Click drag "; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y"; + +Calendar._TT["WK"] = ""; +Calendar._TT["TIME"] = ":"; diff --git a/htdocs/cashdesk/include/jscalendar/lang/calendar-el.js b/htdocs/cashdesk/include/jscalendar/lang/calendar-el.js index fee5575eabd..43a9b2ceafe 100644 --- a/htdocs/cashdesk/include/jscalendar/lang/calendar-el.js +++ b/htdocs/cashdesk/include/jscalendar/lang/calendar-el.js @@ -1,89 +1,89 @@ -// ** I18N -Calendar._DN = new Array -("Κυριακή", - "Δευτέρα", - "Τρίτη", - "Τετάρτη", - "Πέμπτη", - "Παρασκευή", - "Σάββατο", - "Κυριακή"); - -Calendar._SDN = new Array -("Κυ", - "Δε", - "Tρ", - "Τε", - "Πε", - "Πα", - "Σα", - "Κυ"); - -Calendar._MN = new Array -("Ιανουάριος", - "Φεβρουάριος", - "Μάρτιος", - "Απρίλιος", - "Μάϊος", - "Ιούνιος", - "Ιούλιος", - "Αύγουστος", - "Σεπτέμβριος", - "Οκτώβριος", - "Νοέμβριος", - "Δεκέμβριος"); - -Calendar._SMN = new Array -("Ιαν", - "Φεβ", - "Μαρ", - "Απρ", - "Μαι", - "Ιουν", - "Ιουλ", - "Αυγ", - "Σεπ", - "Οκτ", - "Νοε", - "Δεκ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Για το ημερολόγιο"; - -Calendar._TT["ABOUT"] = -"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Επιλογή ημερομηνίας:\n" + -"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" + -"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" + -"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Επιλογή ώρας:\n" + -"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" + -"- ή Shift-κλικ για μείωση\n" + -"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή."; -Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας"; -Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)"; -Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)"; -Calendar._TT["GO_TODAY"] = "Σήμερα"; -Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)"; -Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)"; -Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία"; -Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε"; -Calendar._TT["PART_TODAY"] = " (σήμερα)"; -Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα"; -Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα"; -Calendar._TT["CLOSE"] = "Κλείσιμο"; -Calendar._TT["TODAY"] = "Σήμερα"; -Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; - -Calendar._TT["WK"] = "εβδ"; - +// ** I18N +Calendar._DN = new Array +("Κυριακή", + "Δευτέρα", + "Τρίτη", + "Τετάρτη", + "Πέμπτη", + "Παρασκευή", + "Σάββατο", + "Κυριακή"); + +Calendar._SDN = new Array +("Κυ", + "Δε", + "Tρ", + "Τε", + "Πε", + "Πα", + "Σα", + "Κυ"); + +Calendar._MN = new Array +("Ιανουάριος", + "Φεβρουάριος", + "Μάρτιος", + "Απρίλιος", + "Μάϊος", + "Ιούνιος", + "Ιούλιος", + "Αύγουστος", + "Σεπτέμβριος", + "Οκτώβριος", + "Νοέμβριος", + "Δεκέμβριος"); + +Calendar._SMN = new Array +("Ιαν", + "Φεβ", + "Μαρ", + "Απρ", + "Μαι", + "Ιουν", + "Ιουλ", + "Αυγ", + "Σεπ", + "Οκτ", + "Νοε", + "Δεκ"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "Για το ημερολόγιο"; + +Calendar._TT["ABOUT"] = +"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Επιλογή ημερομηνίας:\n" + +"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" + +"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" + +"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Επιλογή ώρας:\n" + +"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" + +"- ή Shift-κλικ για μείωση\n" + +"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή."; +Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας"; +Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)"; +Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)"; +Calendar._TT["GO_TODAY"] = "Σήμερα"; +Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)"; +Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)"; +Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία"; +Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε"; +Calendar._TT["PART_TODAY"] = " (σήμερα)"; +Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα"; +Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα"; +Calendar._TT["CLOSE"] = "Κλείσιμο"; +Calendar._TT["TODAY"] = "Σήμερα"; +Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; + +Calendar._TT["WK"] = "εβδ"; + diff --git a/htdocs/cashdesk/include/jscalendar/lang/calendar-hr-utf8.js b/htdocs/cashdesk/include/jscalendar/lang/calendar-hr-utf8.js index baf01b179cc..d569cfd9242 100644 --- a/htdocs/cashdesk/include/jscalendar/lang/calendar-hr-utf8.js +++ b/htdocs/cashdesk/include/jscalendar/lang/calendar-hr-utf8.js @@ -1,49 +1,49 @@ -/* Croatian language file for the DHTML Calendar version 0.9.2 -* Author Krunoslav Zubrinic , June 2003. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ -Calendar._DN = new Array -("Nedjelja", - "Ponedjeljak", - "Utorak", - "Srijeda", - "Četvrtak", - "Petak", - "Subota", - "Nedjelja"); -Calendar._MN = new Array -("Siječanj", - "Veljača", - "Ožujak", - "Travanj", - "Svibanj", - "Lipanj", - "Srpanj", - "Kolovoz", - "Rujan", - "Listopad", - "Studeni", - "Prosinac"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan"; -Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; -Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; -Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; -Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; -Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; -Calendar._TT["SEL_DATE"] = "Izaberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; -Calendar._TT["PART_TODAY"] = " (today)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; -Calendar._TT["CLOSE"] = "Zatvori"; -Calendar._TT["TODAY"] = "Danas"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y"; - +/* Croatian language file for the DHTML Calendar version 0.9.2 +* Author Krunoslav Zubrinic , June 2003. +* Feel free to use this script under the terms of the GNU Lesser General +* Public License, as long as you do not remove or alter this notice. +*/ +Calendar._DN = new Array +("Nedjelja", + "Ponedjeljak", + "Utorak", + "Srijeda", + "Četvrtak", + "Petak", + "Subota", + "Nedjelja"); +Calendar._MN = new Array +("Siječanj", + "Veljača", + "Ožujak", + "Travanj", + "Svibanj", + "Lipanj", + "Srpanj", + "Kolovoz", + "Rujan", + "Listopad", + "Studeni", + "Prosinac"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan"; +Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; +Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; +Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; +Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; +Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; +Calendar._TT["SEL_DATE"] = "Izaberite datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; +Calendar._TT["PART_TODAY"] = " (today)"; +Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; +Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; +Calendar._TT["CLOSE"] = "Zatvori"; +Calendar._TT["TODAY"] = "Danas"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y"; + Calendar._TT["WK"] = "Tje"; \ No newline at end of file diff --git a/htdocs/cashdesk/include/jscalendar/lang/calendar-si.js b/htdocs/cashdesk/include/jscalendar/lang/calendar-si.js index 100c522e4d6..cb3dfb9fdf4 100644 --- a/htdocs/cashdesk/include/jscalendar/lang/calendar-si.js +++ b/htdocs/cashdesk/include/jscalendar/lang/calendar-si.js @@ -1,94 +1,94 @@ -/* Slovenian language file for the DHTML Calendar version 0.9.2 -* Author David Milost , January 2004. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ - // full day names -Calendar._DN = new Array -("Nedelja", - "Ponedeljek", - "Torek", - "Sreda", - "Četrtek", - "Petek", - "Sobota", - "Nedelja"); - // short day names - Calendar._SDN = new Array -("Ned", - "Pon", - "Tor", - "Sre", - "Čet", - "Pet", - "Sob", - "Ned"); -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Maj", - "Jun", - "Jul", - "Avg", - "Sep", - "Okt", - "Nov", - "Dec"); - // full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Marec", - "April", - "Maj", - "Junij", - "Julij", - "Avgust", - "September", - "Oktober", - "November", - "December"); - -// tooltips -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O koledarju"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" + -"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." + -"\n\n" + -"Izbor datuma:\n" + -"- Uporabite \xab, \xbb gumbe za izbor leta\n" + -"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" + -"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Izbor ćasa:\n" + -"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" + -"- ali Shift-click za zmanj. le-tega\n" + -"- ali kliknite in povlecite za hiter izbor."; - -Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden"; -Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)"; -Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)"; -Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan"; -Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)"; -Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)"; -Calendar._TT["SEL_DATE"] = "Izberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije"; -Calendar._TT["PART_TODAY"] = " (danes)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan"; -Calendar._TT["CLOSE"] = "Zapri"; -Calendar._TT["TODAY"] = "Danes"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - +/* Slovenian language file for the DHTML Calendar version 0.9.2 +* Author David Milost , January 2004. +* Feel free to use this script under the terms of the GNU Lesser General +* Public License, as long as you do not remove or alter this notice. +*/ + // full day names +Calendar._DN = new Array +("Nedelja", + "Ponedeljek", + "Torek", + "Sreda", + "Četrtek", + "Petek", + "Sobota", + "Nedelja"); + // short day names + Calendar._SDN = new Array +("Ned", + "Pon", + "Tor", + "Sre", + "Čet", + "Pet", + "Sob", + "Ned"); +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "Maj", + "Jun", + "Jul", + "Avg", + "Sep", + "Okt", + "Nov", + "Dec"); + // full month names +Calendar._MN = new Array +("Januar", + "Februar", + "Marec", + "April", + "Maj", + "Junij", + "Julij", + "Avgust", + "September", + "Oktober", + "November", + "December"); + +// tooltips +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "O koledarju"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" + +"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." + +"\n\n" + +"Izbor datuma:\n" + +"- Uporabite \xab, \xbb gumbe za izbor leta\n" + +"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" + +"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Izbor ćasa:\n" + +"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" + +"- ali Shift-click za zmanj. le-tega\n" + +"- ali kliknite in povlecite za hiter izbor."; + +Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden"; +Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)"; +Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)"; +Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan"; +Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)"; +Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)"; +Calendar._TT["SEL_DATE"] = "Izberite datum"; +Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije"; +Calendar._TT["PART_TODAY"] = " (danes)"; +Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan"; +Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan"; +Calendar._TT["CLOSE"] = "Zapri"; +Calendar._TT["TODAY"] = "Danes"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + Calendar._TT["WK"] = "Ted"; \ No newline at end of file diff --git a/htdocs/cashdesk/include/jscalendar/lang/calendar-tr.js b/htdocs/cashdesk/include/jscalendar/lang/calendar-tr.js index f2c906c46c4..2164687fbb0 100644 --- a/htdocs/cashdesk/include/jscalendar/lang/calendar-tr.js +++ b/htdocs/cashdesk/include/jscalendar/lang/calendar-tr.js @@ -1,58 +1,58 @@ -////////////////////////////////////////////////////////////////////////////////////////////// -// Turkish Translation by Nuri AKMAN -// Location: Ankara/TURKEY -// e-mail : nuriakman@hotmail.com -// Date : April, 9 2003 -// -// Note: if Turkish Characters does not shown on you screen -// please include falowing line your html code: -// -// -// -////////////////////////////////////////////////////////////////////////////////////////////// - -// ** I18N -Calendar._DN = new Array -("Pazar", - "Pazartesi", - "Sal", - "aramba", - "Perembe", - "Cuma", - "Cumartesi", - "Pazar"); -Calendar._MN = new Array -("Ocak", - "ubat", - "Mart", - "Nisan", - "Mays", - "Haziran", - "Temmuz", - "Austos", - "Eyll", - "Ekim", - "Kasm", - "Aralk"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Haftann ilk gnn kaydr"; -Calendar._TT["PREV_YEAR"] = "nceki Yl (Men iin basl tutunuz)"; -Calendar._TT["PREV_MONTH"] = "nceki Ay (Men iin basl tutunuz)"; -Calendar._TT["GO_TODAY"] = "Bugn'e git"; -Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Men iin basl tutunuz)"; -Calendar._TT["NEXT_YEAR"] = "Sonraki Yl (Men iin basl tutunuz)"; -Calendar._TT["SEL_DATE"] = "Tarih seiniz"; -Calendar._TT["DRAG_TO_MOVE"] = "Tamak iin srkleyiniz"; -Calendar._TT["PART_TODAY"] = " (bugn)"; -Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gnnden balasn"; -Calendar._TT["SUN_FIRST"] = "Takvim Pazar gnnden balasn"; -Calendar._TT["CLOSE"] = "Kapat"; -Calendar._TT["TODAY"] = "Bugn"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD"; - -Calendar._TT["WK"] = "Hafta"; +////////////////////////////////////////////////////////////////////////////////////////////// +// Turkish Translation by Nuri AKMAN +// Location: Ankara/TURKEY +// e-mail : nuriakman@hotmail.com +// Date : April, 9 2003 +// +// Note: if Turkish Characters does not shown on you screen +// please include falowing line your html code: +// +// +// +////////////////////////////////////////////////////////////////////////////////////////////// + +// ** I18N +Calendar._DN = new Array +("Pazar", + "Pazartesi", + "Sal", + "aramba", + "Perembe", + "Cuma", + "Cumartesi", + "Pazar"); +Calendar._MN = new Array +("Ocak", + "ubat", + "Mart", + "Nisan", + "Mays", + "Haziran", + "Temmuz", + "Austos", + "Eyll", + "Ekim", + "Kasm", + "Aralk"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["TOGGLE"] = "Haftann ilk gnn kaydr"; +Calendar._TT["PREV_YEAR"] = "nceki Yl (Men iin basl tutunuz)"; +Calendar._TT["PREV_MONTH"] = "nceki Ay (Men iin basl tutunuz)"; +Calendar._TT["GO_TODAY"] = "Bugn'e git"; +Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Men iin basl tutunuz)"; +Calendar._TT["NEXT_YEAR"] = "Sonraki Yl (Men iin basl tutunuz)"; +Calendar._TT["SEL_DATE"] = "Tarih seiniz"; +Calendar._TT["DRAG_TO_MOVE"] = "Tamak iin srkleyiniz"; +Calendar._TT["PART_TODAY"] = " (bugn)"; +Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gnnden balasn"; +Calendar._TT["SUN_FIRST"] = "Takvim Pazar gnnden balasn"; +Calendar._TT["CLOSE"] = "Kapat"; +Calendar._TT["TODAY"] = "Bugn"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; +Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD"; + +Calendar._TT["WK"] = "Hafta"; diff --git a/htdocs/cashdesk/include/jscalendar/lang/cn_utf8.js b/htdocs/cashdesk/include/jscalendar/lang/cn_utf8.js index de61b4618de..a0ef7c6b3a8 100644 --- a/htdocs/cashdesk/include/jscalendar/lang/cn_utf8.js +++ b/htdocs/cashdesk/include/jscalendar/lang/cn_utf8.js @@ -1,123 +1,123 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Translator : Niko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("\u5468\u65e5",//\u5468\u65e5 - "\u5468\u4e00",//\u5468\u4e00 - "\u5468\u4e8c",//\u5468\u4e8c - "\u5468\u4e09",//\u5468\u4e09 - "\u5468\u56db",//\u5468\u56db - "\u5468\u4e94",//\u5468\u4e94 - "\u5468\u516d",//\u5468\u516d - "\u5468\u65e5");//\u5468\u65e5 - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("\u5468\u65e5", - "\u5468\u4e00", - "\u5468\u4e8c", - "\u5468\u4e09", - "\u5468\u56db", - "\u5468\u4e94", - "\u5468\u516d", - "\u5468\u65e5"); - -// full month names -Calendar._MN = new Array -("\u4e00\u6708", - "\u4e8c\u6708", - "\u4e09\u6708", - "\u56db\u6708", - "\u4e94\u6708", - "\u516d\u6708", - "\u4e03\u6708", - "\u516b\u6708", - "\u4e5d\u6708", - "\u5341\u6708", - "\u5341\u4e00\u6708", - "\u5341\u4e8c\u6708"); - -// short month names -Calendar._SMN = new Array -("\u4e00\u6708", - "\u4e8c\u6708", - "\u4e09\u6708", - "\u56db\u6708", - "\u4e94\u6708", - "\u516d\u6708", - "\u4e03\u6708", - "\u516b\u6708", - "\u4e5d\u6708", - "\u5341\u6708", - "\u5341\u4e00\u6708", - "\u5341\u4e8c\u6708"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "\u5173\u4e8e"; - -Calendar._TT["ABOUT"] = -" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" + -"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"\u65e5\u671f\u9009\u62e9:\n" + -"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" + -"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" + -"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"\u65f6\u95f4\u9009\u62e9:\n" + -"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" + -"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)."; - -Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74"; -Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708"; -Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929"; -Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708"; -Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74"; -Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f"; -Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8"; -Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "\u5173\u95ed"; -Calendar._TT["TODAY"] = "\u4eca\u5929"; -Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5"; - -Calendar._TT["WK"] = "\u5468"; -Calendar._TT["TIME"] = "\u65f6\u95f4:"; +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Encoding: any +// Translator : Niko +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("\u5468\u65e5",//\u5468\u65e5 + "\u5468\u4e00",//\u5468\u4e00 + "\u5468\u4e8c",//\u5468\u4e8c + "\u5468\u4e09",//\u5468\u4e09 + "\u5468\u56db",//\u5468\u56db + "\u5468\u4e94",//\u5468\u4e94 + "\u5468\u516d",//\u5468\u516d + "\u5468\u65e5");//\u5468\u65e5 + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d", + "\u5468\u65e5"); + +// full month names +Calendar._MN = new Array +("\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708"); + +// short month names +Calendar._SMN = new Array +("\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "\u5173\u4e8e"; + +Calendar._TT["ABOUT"] = +" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" + +"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" + +"\n\n" + +"\u65e5\u671f\u9009\u62e9:\n" + +"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" + +"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" + +"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"\u65f6\u95f4\u9009\u62e9:\n" + +"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" + +"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)."; + +Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74"; +Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708"; +Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929"; +Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708"; +Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74"; +Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f"; +Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8"; +Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "\u5173\u95ed"; +Calendar._TT["TODAY"] = "\u4eca\u5929"; +Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5"; + +Calendar._TT["WK"] = "\u5468"; +Calendar._TT["TIME"] = "\u65f6\u95f4:"; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index dae9f90b230..0a12de52313 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -569,7 +569,7 @@ if ($socid > 0) print ''.dol_print_date($db->jdate($objp->dc),'day')."\n"; print ' '; print ''; - $contrat->fetch_lines(); + $contrat->fetch_lignes(); print $contrat->getLibStatut(4); print "\n"; print ''; diff --git a/htdocs/comm/propal/class/actions_proposal.class.php b/htdocs/comm/propal/class/actions_proposal.class.php index ed7ac2fff55..061b14c6a38 100644 --- a/htdocs/comm/propal/class/actions_proposal.class.php +++ b/htdocs/comm/propal/class/actions_proposal.class.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/comm/propal/class/actions_proposal.class.php + * \file htdocs/comm/propal/actions_proposal.class.php * \ingroup proposal * \brief Fichier de la classe des actions des propales * \version $Id$ @@ -43,18 +43,6 @@ class ActionsProposal extends ActionsCommonObject { $this->db = $DB; } - - /** - * \brief Load a proposal from database and its ligne array - * \param rowid id of object to load - * \param ref Ref of proposal - * \return int >0 if OK, <0 if KO - */ - function fetch($rowid,$ref='') - { - $this->object = new Propal($this->db); - return $this->object->fetch($rowid,$ref); - } } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 38cdc711b68..75f94a76e60 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1066,8 +1066,7 @@ class Commande extends CommonObject $this->date_livraison = $this->db->jdate($obj->date_livraison); $this->fk_delivery_address = $obj->fk_adresse_livraison; $this->propale_id = $obj->fk_source; - - $this->lines = array(); + $this->lignes = array(); if ($this->statut == 0) $this->brouillon = 1; @@ -1197,6 +1196,7 @@ class Commande extends CommonObject */ function fetch_lines($only_product=0) { + $this->lignes=array(); // deprecated $this->lines=array(); $sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.fk_commande, l.description, l.price, l.qty, l.tva_tx,'; @@ -1257,8 +1257,8 @@ class Commande extends CommonObject $line->date_start = $this->db->jdate($objp->date_start); $line->date_end = $this->db->jdate($objp->date_end); + $this->lignes[$i] = $line; // For backward compatibility $this->lines[$i] = $line; - $i++; } $this->db->free($result); @@ -1281,9 +1281,9 @@ class Commande extends CommonObject function getNbOfProductsLines() { $nb=0; - foreach($this->lines as $line) + foreach($this->lines as $ligne) { - if ($line->fk_product_type == 0) $nb++; + if ($ligne->fk_product_type == 0) $nb++; } return $nb; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 6bdba55e562..0156f2e56a4 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -695,7 +695,10 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) $result=$srcobject->fetch($object->origin_id); if ($result > 0) { - $lines = $srcobject->lines; + // TODO mutualiser + $lines = $srcobject->lignes; + if (sizeof($srcobject->lines)) $lines = $srcobject->lines; + if (empty($lines) && method_exists($srcobject,'fetch_lignes')) $lines = $srcobject->fetch_lignes(); if (empty($lines) && method_exists($srcobject,'fetch_lines')) $lines = $srcobject->fetch_lines(); for ($i = 0 ; $i < sizeof($lines) ; $i++) @@ -729,11 +732,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer) $lines[$i]->fk_remise_except, 'HT', 0, - $product_type, - $lines[$i]->rang, - $lines[$i]->special_code, - $object->origin, - $lines[$i]->rowid + $product_type ); if ($result < 0) @@ -1385,28 +1384,27 @@ if ($_GET['action'] == 'create') { $projectid=GETPOST('originid'); } - else + else if (in_array($element,array('order','commande','propal','contrat','contract'))) { // For compatibility - if ($element == 'commande') { $subelement = 'customerorder'; } - if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'proposal'; } - if ($element == 'contrat') { $subelement = 'contract'; } + if ($element == 'order') { $element = $subelement = 'commande'; } + if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } + if ($element == 'contract') { $element = $subelement = 'contrat'; } - require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/actions_'.$subelement.'.class.php'); - $classname = 'Actions'.ucfirst($subelement); + require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'); + $classname = ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch(GETPOST('originid')); - if (empty($objectsrc->object->lines) && method_exists($objectsrc->object,'fetch_lines')) $objectsrc->object->fetch_lines(); - $objectsrc->object->fetch_thirdparty(); - - $projectid = (!empty($objectsrc->object->fk_project)?$object->fk_project:''); - $ref_client = (!empty($objectsrc->object->ref_client)?$object->ref_client:''); + $objectsrc->fetch_thirdparty(); - $soc = $objectsrc->object->client; - $cond_reglement_id = (!empty($objectsrc->object->cond_reglement_id)?$objectsrc->object->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); - $mode_reglement_id = (!empty($objectsrc->object->mode_reglement_id)?$objectsrc->object->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); - $remise_percent = (!empty($objectsrc->object->remise_percent)?$objectsrc->object->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); - $remise_absolue = (!empty($objectsrc->object->remise_absolue)?$objectsrc->object->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); + $projectid = (!empty($objectsrc->fk_project)?$object->fk_project:''); + $ref_client = (!empty($objectsrc->ref_client)?$object->ref_client:''); + + $soc = $objectsrc->client; + $cond_reglement_id = (!empty($objectsrc->cond_reglement_id)?$objectsrc->cond_reglement_id:(!empty($soc->cond_reglement_id)?$soc->cond_reglement_id:1)); + $mode_reglement_id = (!empty($objectsrc->mode_reglement_id)?$objectsrc->mode_reglement_id:(!empty($soc->mode_reglement_id)?$soc->mode_reglement_id:0)); + $remise_percent = (!empty($objectsrc->remise_percent)?$objectsrc->remise_percent:(!empty($soc->remise_percent)?$soc->remise_percent:0)); + $remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0)); $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0; } } @@ -1658,7 +1656,7 @@ if ($_GET['action'] == 'create') print ''; @@ -1671,7 +1669,7 @@ if ($_GET['action'] == 'create') print ''; } @@ -1682,35 +1680,35 @@ if ($_GET['action'] == 'create') if ($_GET['origin'] == 'contrat') { // Calcul contrat->price (HT), contrat->total (TTC), contrat->tva - $objectsrc->object->remise_absolue=$remise_absolue; - $objectsrc->object->remise_percent=$remise_percent; - $objectsrc->object->update_price(); + $objectsrc->remise_absolue=$remise_absolue; + $objectsrc->remise_percent=$remise_percent; + $objectsrc->update_price(); } print "\n"; print "\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''; - print ''; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''; + print ''; - print ''.$langs->trans($classname).''.$objectsrc->object->getNomUrl(1).''; - print ''.$langs->trans('TotalHT').''.price($objectsrc->object->total_ht).''; - print ''.$langs->trans('TotalVAT').''.price($objectsrc->object->total_tva).""; + print ''.$langs->trans($classname).''.$objectsrc->getNomUrl(1).''; + print ''.$langs->trans('TotalHT').''.price($objectsrc->total_ht).''; + print ''.$langs->trans('TotalVAT').''.price($objectsrc->total_tva).""; if ($mysoc->pays_code=='ES') { if ($mysoc->localtax1_assuj=="1") //Localtax1 RE { - print ''.$langs->transcountry("AmountLT1",$mysoc->pays_code).''.price($objectsrc->object->total_localtax1).""; + print ''.$langs->transcountry("AmountLT1",$mysoc->pays_code).''.price($objectsrc->total_localtax1).""; } if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF { - print ''.$langs->transcountry("AmountLT2",$mysoc->pays_code).''.price($objectsrc->object->total_localtax2).""; + print ''.$langs->transcountry("AmountLT2",$mysoc->pays_code).''.price($objectsrc->total_localtax2).""; } } - print ''.$langs->trans('TotalTTC').''.price($objectsrc->object->total_ttc).""; + print ''.$langs->trans('TotalTTC').''.price($objectsrc->total_ttc).""; } else { @@ -1776,18 +1774,155 @@ if ($_GET['action'] == 'create') print "\n"; + // Try to read line from origin + $sql=''; - // View origin lines - if (is_object($objectsrc)) + // TODO deplacer dans la classe + if ($_GET['origin'] == 'propal') { + //$objectsrc->printOriginLinesList(); + $title=$langs->trans('ProductsAndServices'); + + $sql = 'SELECT pt.rowid, pt.description, pt.fk_remise_except,'; + $sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.product_type, pt.info_bits,'; + $sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as pt'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid'; + $sql.= ' WHERE pt.fk_propal = '.$objectsrc->id; + $sql.= ' ORDER BY pt.rang ASC, pt.rowid'; + } + // TODO deplacer dans la classe + if ($_GET['origin'] == 'commande') + { + $title=$langs->trans('Products'); + + $sql = 'SELECT pt.rowid, pt.description, pt.fk_remise_except,'; + $sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.product_type, pt.info_bits,'; + $sql.= ' pt.date_start as date_debut_prevue, pt.date_end as date_fin_prevue,'; + $sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'commandedet as pt'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid'; + $sql.= ' WHERE pt.fk_commande = '.$objectsrc->id; + $sql.= ' ORDER BY pt.rowid ASC'; + } + // TODO deplacer dans la classe + if ($_GET['origin'] == 'contrat') + { + $title=$langs->trans('Services'); + + $sql = 'SELECT pt.rowid, pt.description,'; + $sql.= ' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,'; + $sql.= ' pt.date_ouverture_prevue as date_debut_prevue, pt.date_ouverture as date_debut_reel,'; + $sql.= ' pt.date_fin_validite as date_fin_prevue, pt.date_cloture as date_fin_reel,'; + $sql.= ' p.label as product, p.ref, p.fk_product_type, p.rowid as prodid'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'contratdet as pt'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON pt.fk_product = p.rowid'; + $sql.= ' WHERE pt.fk_contrat = '.$objectsrc->id; + $sql.= ' ORDER BY pt.rowid ASC'; + } + + if ($sql) + { print '
'; print_titre($title); print ''; - - $objectsrc->printOriginTitleList(); - $objectsrc->printOriginLinesList($object); + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + // Lignes + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + $var=True; + while ($i < $num) + { + $objp = $db->fetch_object($resql); + $var=!$var; + + $date_start=$objp->date_debut_prevue; + if ($objp->date_debut_reel) $date_start=$objp->date_debut_reel; + $date_end=$objp->date_fin_prevue; + if ($objp->date_fin_reel) $date_end=$objp->date_fin_reel; + + print '\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + } + else + { + dol_print_error($db); + } print '
'.$langs->trans('Ref').''.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('ReductionShort').'
'; + if (($objp->info_bits & 2) == 2) + { + print ''; + print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount"); + print ''; + } + else if ($objp->prodid) + { + print ''; + print ($objp->fk_product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product')); + print ' '.$objp->ref.''; + print $objp->product?' - '.$objp->product:''; + // Dates + if ($date_start || $date_end) + { + print_date_range($date_start,$date_end); + } + } + else + { + print ($objp->product_type == -1 ? ' ' : ($objp->product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product'))); + // Dates + if ($date_start || $date_end) + { + print_date_range($date_start,$date_end); + } + } + print "'; + if ($objp->description) + { + if ($objp->description == '(CREDIT_NOTE)') + { + $discount=new DiscountAbsolute($db); + $discount->fetch($objp->fk_remise_except); + print $langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0)); + } + elseif ($obj->description == '(DEPOSIT)') + { + $discount=new DiscountAbsolute($db); + $discount->fetch($objp->fk_remise_except); + print $langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0)); + } + else + { + print dol_trunc($objp->description,60); + } + } + else + { + print ' '; + } + print ''.vatrate($objp->tva_tx).'%'.price($objp->subprice).''; + print (($objp->info_bits & 2) != 2) ? $objp->qty : ' '; + print ''; + print (($objp->info_bits & 2) != 2) ? $objp->remise_percent.'%' : ' '; + print '
'; } diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 81e18aa708b..b72518ad19b 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -66,6 +66,7 @@ class FactureRec extends Facture var $rang; var $special_code; + var $lignes=array(); // TODO deprecated var $lines=array(); @@ -141,7 +142,7 @@ class FactureRec extends Facture /* * Lines */ - for ($i = 0 ; $i < sizeof($facsrc->lines) ; $i++) + for ($i = 0 ; $i < sizeof($facsrc->lignes) ; $i++) { $result_insert = $this->addline($this->id, $facsrc->lines[$i]->desc, @@ -303,7 +304,7 @@ class FactureRec extends Facture /** - * \brief Recupere les lignes de factures predefinies dans this->lines + * \brief Recupere les lignes de factures predefinies dans this->lignes * \return int 1 if OK, < 0 if KO */ function fetch_lines() @@ -358,6 +359,7 @@ class FactureRec extends Facture $line->price = $objp->price; $line->remise = $objp->remise; + $this->lignes[$i] = $line; // TODO deprecated $this->lines[$i] = $line; $i++; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 3b2678c8c87..1b668193a7c 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -98,6 +98,7 @@ class Facture extends CommonObject var $mode_reglement_code; // Code in llx_c_paiement var $modelpdf; var $products=array(); // TODO deprecated + var $lignes=array(); // TODO deprecated var $lines=array(); var $line; //! Pour board @@ -707,6 +708,7 @@ class Facture extends CommonObject * Lines */ + $this->lignes = array(); // deprecated $this->lines = array(); $result=$this->fetch_lines(); @@ -735,7 +737,7 @@ class Facture extends CommonObject /** - * \brief Recupere les lignes de factures dans this->lines + * \brief Recupere les lignes de factures dans this->lignes * \return int 1 if OK, < 0 if KO */ function fetch_lines() @@ -796,6 +798,7 @@ class Facture extends CommonObject $line->price = $objp->price; $line->remise = $objp->remise; + $this->lignes[$i] = $line; // TODO deprecated $this->lines[$i] = $line; $i++; @@ -1499,14 +1502,14 @@ class Facture extends CommonObject require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"); // Loop on each line - for ($i = 0 ; $i < sizeof($this->lines) ; $i++) + for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) { - if ($this->lines[$i]->fk_product > 0 && $this->lines[$i]->product_type == 0) + if ($this->lignes[$i]->fk_product > 0 && $this->lignes[$i]->product_type == 0) { $mouvP = new MouvementStock($this->db); // We decrease stock for product $entrepot_id = "1"; // TODO ajouter possibilite de choisir l'entrepot - $result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $entrepot_id, $this->lines[$i]->qty, $this->lines[$i]->subprice); + $result=$mouvP->livraison($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice); if ($result < 0) { $error++; } } } @@ -1607,14 +1610,14 @@ class Facture extends CommonObject { require_once(DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"); - for ($i = 0 ; $i < sizeof($this->lines) ; $i++) + for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) { - if ($this->lines[$i]->fk_product && $this->lines[$i]->product_type == 0) + if ($this->lignes[$i]->fk_product && $this->lignes[$i]->product_type == 0) { $mouvP = new MouvementStock($this->db); // We decrease stock for product $entrepot_id = "1"; // TODO ajouter possibilite de choisir l'entrepot - $result=$mouvP->reception($user, $this->lines[$i]->fk_product, $entrepot_id, $this->lines[$i]->qty, $this->lines[$i]->subprice); + $result=$mouvP->reception($user, $this->lignes[$i]->fk_product, $entrepot_id, $this->lignes[$i]->qty, $this->lignes[$i]->subprice); } } } @@ -1665,7 +1668,7 @@ class Facture extends CommonObject * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,produit) * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue) */ - function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0, $origin='', $origin_id=0) + function addline($facid, $desc, $pu_ht, $qty, $txtva, $txlocaltax1=0, $txlocaltax2=0, $fk_product=0, $remise_percent=0, $date_start='', $date_end='', $ventil=0, $info_bits=0, $fk_remise_except='', $price_base_type='HT', $pu_ttc=0, $type=0, $rang=-1, $special_code=0) { dol_syslog("Facture::Addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva, txlocaltax1=$txlocaltax1, txlocaltax2=$txlocaltax2, fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type", LOG_DEBUG); include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php'); @@ -1763,8 +1766,6 @@ class Facture extends CommonObject $this->line->total_localtax2=($this->type==2?-1:1)*$total_localtax2; $this->line->total_ttc=($this->type==2?-1:1)*$total_ttc; $this->line->special_code=$special_code; - $this->line->origin=$origin; - $this->line->origin_id=$origin_id; // \TODO Ne plus utiliser $this->line->price=($this->type==2?-1:1)*$price; @@ -1791,7 +1792,7 @@ class Facture extends CommonObject } else { - $this->error=$this->line->error; + $this->error=$ligne->error; $this->db->rollback(); return -2; } @@ -2535,9 +2536,9 @@ class Facture extends CommonObject { // On verifie si les lignes de factures ont ete exportees en compta et/ou ventilees $ventilExportCompta = 0 ; - for ($i = 0 ; $i < sizeof($this->lines) ; $i++) + for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) { - if ($this->lines[$i]->export_compta <> 0 && $this->lines[$i]->code_ventilation <> 0) + if ($this->lignes[$i]->export_compta <> 0 && $this->lignes[$i]->code_ventilation <> 0) { $ventilExportCompta++; } @@ -3060,9 +3061,6 @@ class FactureLigne // 1: frais de port // 2: ecotaxe // 3: ?? - - var $origin; - var $origin_id; //! Total HT de la ligne toute quantite et incluant la remise ligne var $total_ht; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 85f4de1e73f..c6b6e8acc47 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -411,7 +411,7 @@ else print ''.$langs->trans("ReductionShort").''; print ''.$langs->trans("Qty").''; - $num = sizeof($fac->lines); + $num = sizeof($fac->lignes); $i = 0; $var=True; while ($i < $num) @@ -421,7 +421,7 @@ else $product_static=new Product($db); // Show product and description - $type=$fac->lines[$i]->product_type?$fac->lines[$i]->product_type:$fac->lines[$i]->fk_product_type; + $type=$fac->lignes[$i]->product_type?$fac->lignes[$i]->product_type:$fac->lignes[$i]->fk_product_type; // Try to enhance type detection using date_start and date_end for free lines when type // was not saved. if (! empty($objp->date_start)) $type=1; @@ -429,26 +429,26 @@ else // Show line print ""; - if ($fac->lines[$i]->fk_product > 0) + if ($fac->lignes[$i]->fk_product > 0) { print ''; - print ''; // ancre pour retourner sur la ligne + print ''; // ancre pour retourner sur la ligne // Show product and description - $product_static->type=$fac->lines[$i]->fk_product_type; - $product_static->id=$fac->lines[$i]->fk_product; - $product_static->ref=$fac->lines[$i]->product_ref; - $product_static->libelle=$fac->lines[$i]->libelle; + $product_static->type=$fac->lignes[$i]->fk_product_type; + $product_static->id=$fac->lignes[$i]->fk_product; + $product_static->ref=$fac->lignes[$i]->product_ref; + $product_static->libelle=$fac->lignes[$i]->libelle; $text=$product_static->getNomUrl(1); - $text.= ' - '.$fac->lines[$i]->libelle; - $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lines[$i]->desc)); + $text.= ' - '.$fac->lignes[$i]->libelle; + $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($fac->lignes[$i]->desc)); print $html->textwithtooltip($text,$description,3,'','',$i); // Show range - print_date_range($fac->lines[$i]->date_start,$fac->lines[$i]->date_end); + print_date_range($fac->lignes[$i]->date_start,$fac->lignes[$i]->date_end); // Add description in form - if ($conf->global->PRODUIT_DESC_IN_FORM) print ($fac->lines[$i]->desc && $fac->lines[$i]->desc!=$fac->lines[$i]->libelle)?'
'.dol_htmlentitiesbr($fac->lines[$i]->desc):''; + if ($conf->global->PRODUIT_DESC_IN_FORM) print ($fac->lignes[$i]->desc && $fac->lignes[$i]->desc!=$fac->lignes[$i]->libelle)?'
'.dol_htmlentitiesbr($fac->lignes[$i]->desc):''; print ''; } @@ -458,16 +458,16 @@ else if ($type==1) $text = img_object($langs->trans('Service'),'service'); else $text = img_object($langs->trans('Product'),'product'); - print $text.' '.nl2br($fac->lines[$i]->desc); + print $text.' '.nl2br($fac->lignes[$i]->desc); // Show range - print_date_range($fac->lines[$i]->date_start,$fac->lines[$i]->date_end); + print_date_range($fac->lignes[$i]->date_start,$fac->lignes[$i]->date_end); print ''; } - print "".price($fac->lines[$i]->price).""; - print ''.$fac->lines[$i]->remise_percent.' %'; - print "".$fac->lines[$i]->qty."\n"; + print "".price($fac->lignes[$i]->price).""; + print ''.$fac->lignes[$i]->remise_percent.' %'; + print "".$fac->lignes[$i]->qty."\n"; $i++; } print ''; diff --git a/htdocs/compta/prelevement/class/bon-prelevement.class.php b/htdocs/compta/prelevement/class/bon-prelevement.class.php index 185d9f25b05..02adf6ee79c 100644 --- a/htdocs/compta/prelevement/class/bon-prelevement.class.php +++ b/htdocs/compta/prelevement/class/bon-prelevement.class.php @@ -96,20 +96,20 @@ class BonPrelevement extends CommonObject function AddFacture($facture_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number) { $result = 0; - $line_id = 0; + $ligne_id = 0; - $result = $this->AddLigne($line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number); + $result = $this->AddLigne($ligne_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number); if ($result == 0) { - if ($line_id > 0) + if ($ligne_id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."prelevement_facture ("; $sql.= "fk_facture"; $sql.= ",fk_prelevement_lignes"; $sql.= ") VALUES ("; $sql.= $facture_id; - $sql.= ", ".$line_id; + $sql.= ", ".$ligne_id; $sql.= ")"; if ($this->db->query($sql)) @@ -149,7 +149,7 @@ class BonPrelevement extends CommonObject * @param number bank account number * @return int >0 if OK, <0 if KO */ - function AddLigne(&$line_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number) + function AddLigne(&$ligne_id, $client_id, $client_nom, $amount, $code_banque, $code_guichet, $number) { $result = -1; $concat = 0; @@ -202,7 +202,7 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { - $line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes"); + $ligne_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes"); $result = 0; } else diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 4f3782870ac..05f4a7d5918 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -70,7 +70,7 @@ class Contrat extends CommonObject var $fk_projet; - var $lines=array(); + var $lignes=array(); /** @@ -192,10 +192,10 @@ class Contrat extends CommonObject $this->db->begin(); // Load lines - $this->fetch_lines(); + $this->fetch_lignes(); $ok=true; - foreach($this->lines as $contratline) + foreach($this->lignes as $contratline) { // Close line not already closed if ($contratline->statut != 5) @@ -335,10 +335,10 @@ class Contrat extends CommonObject } /** - * Load lignes array into this->lines + * Load lignes array into this->lignes * @return Array Return array of contract lines */ - function fetch_lines() + function fetch_lignes() { $this->nbofserviceswait=0; $this->nbofservicesopened=0; @@ -369,7 +369,7 @@ class Contrat extends CommonObject $sql.= " WHERE d.fk_contrat = ".$this->id ." AND d.fk_product = p.rowid"; $sql.= " ORDER by d.rowid ASC"; - dol_syslog("Contrat::fetch_lines sql=".$sql); + dol_syslog("Contrat::fetch_lignes sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -378,60 +378,58 @@ class Contrat extends CommonObject while ($i < $num) { - $objp = $this->db->fetch_object($result); + $objp = $this->db->fetch_object($result); - $line = new ContratLigne($this->db); - $line->id = $objp->rowid; - $line->ref = $objp->rowid; - $line->fk_contrat = $objp->fk_contrat; - $line->desc = $objp->description; // Description ligne - $line->qty = $objp->qty; - $line->tva_tx = $objp->tva_tx; - $line->localtax1_tx = $objp->localtax1_tx; - $line->localtax2_tx = $objp->localtax2_tx; - $line->subprice = $objp->subprice; - $line->statut = $objp->statut; - $line->remise_percent = $objp->remise_percent; - $line->price_ht = $objp->price_ht; - $line->price = $objp->price; // For backward compatibility - $line->total_ht = $objp->total_ht; - $line->total_tva = $objp->total_tva; - $line->total_localtax1 = $objp->total_localtax1; - $line->total_localtax2 = $objp->total_localtax2; - $line->total_ttc = $objp->total_ttc; - $line->fk_product = $objp->fk_product; - $line->info_bits = $objp->info_bits; + $ligne = new ContratLigne($this->db); + $ligne->id = $objp->rowid; + $ligne->ref = $objp->rowid; + $ligne->fk_contrat = $objp->fk_contrat; + $ligne->desc = $objp->description; // Description ligne + $ligne->qty = $objp->qty; + $ligne->tva_tx = $objp->tva_tx; + $ligne->localtax1_tx = $objp->localtax1_tx; + $ligne->localtax2_tx = $objp->localtax2_tx; + $ligne->subprice = $objp->subprice; + $ligne->statut = $objp->statut; + $ligne->remise_percent = $objp->remise_percent; + $ligne->price_ht = $objp->price_ht; + $ligne->price = $objp->price; // For backward compatibility + $ligne->total_ht = $objp->total_ht; + $ligne->total_tva = $objp->total_tva; + $ligne->total_localtax1= $objp->total_localtax1; + $ligne->total_localtax2= $objp->total_localtax2; + $ligne->total_ttc = $objp->total_ttc; + $ligne->fk_product = $objp->fk_product; + $ligne->info_bits = $objp->info_bits; - $line->fk_user_author = $objp->fk_user_author; - $line->fk_user_ouverture= $objp->fk_user_ouverture; - $line->fk_user_cloture = $objp->fk_user_cloture; + $ligne->fk_user_author = $objp->fk_user_author; + $ligne->fk_user_ouverture= $objp->fk_user_ouverture; + $ligne->fk_user_cloture = $objp->fk_user_cloture; - $line->ref = $objp->ref; - $line->libelle = $objp->label; // Label produit - $line->label = $objp->label; // For backward compatibility - $line->product_desc = $objp->product_desc; // Description produit + $ligne->ref = $objp->ref; + $ligne->libelle = $objp->label; // Label produit + $ligne->label = $objp->label; // For backward compatibility + $ligne->product_desc = $objp->product_desc; // Description produit - $line->description = $objp->description; + $ligne->description = $objp->description; - $line->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue); - $line->date_ouverture = $this->db->jdate($objp->date_ouverture); - $line->date_fin_validite = $this->db->jdate($objp->date_fin_validite); - $line->date_cloture = $this->db->jdate($objp->date_cloture); + $ligne->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue); + $ligne->date_ouverture = $this->db->jdate($objp->date_ouverture); + $ligne->date_fin_validite = $this->db->jdate($objp->date_fin_validite); + $ligne->date_cloture = $this->db->jdate($objp->date_cloture); // For backward compatibility - $line->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue); - $line->date_debut_reel = $this->db->jdate($objp->date_ouverture); - $line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite); - $line->date_fin_reel = $this->db->jdate($objp->date_cloture); - - $this->lines[] = $line; - - //dol_syslog("1 ".$line->desc); - //dol_syslog("2 ".$line->product_desc); + $ligne->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue); + $ligne->date_debut_reel = $this->db->jdate($objp->date_ouverture); + $ligne->date_fin_prevue = $this->db->jdate($objp->date_fin_validite); + $ligne->date_fin_reel = $this->db->jdate($objp->date_cloture); + $this->lignes[] = $ligne; + //dol_syslog("1 ".$ligne->desc); + //dol_syslog("2 ".$ligne->product_desc); - if ($line->statut == 0) $this->nbofserviceswait++; - if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++; - if ($line->statut == 4 && $line->date_fin_prevue < $now) $this->nbofservicesexpired++; - if ($line->statut == 5) $this->nbofservicesclosed++; + if ($ligne->statut == 0) $this->nbofserviceswait++; + if ($ligne->statut == 4 && (empty($ligne->date_fin_prevue) || $ligne->date_fin_prevue >= $now)) $this->nbofservicesopened++; + if ($ligne->statut == 4 && $ligne->date_fin_prevue < $now) $this->nbofservicesexpired++; + if ($ligne->statut == 5) $this->nbofservicesclosed++; $total_ttc+=$objp->total_ttc; // TODO Not saved into database $total_vat+=$objp->total_tva; @@ -474,51 +472,51 @@ class Contrat extends CommonObject { $objp = $this->db->fetch_object($result); - $line = new ContratLigne($this->db); - $line->id = $objp->rowid; - $line->fk_contrat = $objp->fk_contrat; - $line->libelle = $objp->description; - $line->desc = $objp->description; - $line->qty = $objp->qty; - $line->statut = $objp->statut; - $line->ref = $objp->ref; - $line->tva_tx = $objp->tva_tx; - $line->localtax1_tx = $objp->localtax1_tx; - $line->localtax2_tx = $objp->localtax2_tx; - $line->subprice = $objp->subprice; - $line->remise_percent = $objp->remise_percent; - $line->price_ht = $objp->price_ht; - $line->price = $objp->price; // For backward compatibility - $line->total_ht = $objp->total_ht; - $line->total_tva = $objp->total_tva; - $line->total_localtax1= $objp->total_localtax1; - $line->total_localtax2= $objp->total_localtax2; - $line->total_ttc = $objp->total_ttc; - $line->fk_product = 0; - $line->info_bits = $objp->info_bits; + $ligne = new ContratLigne($this->db); + $ligne->id = $objp->rowid; + $ligne->fk_contrat = $objp->fk_contrat; + $ligne->libelle = $objp->description; + $ligne->desc = $objp->description; + $ligne->qty = $objp->qty; + $ligne->statut = $objp->statut; + $ligne->ref = $objp->ref; + $ligne->tva_tx = $objp->tva_tx; + $ligne->localtax1_tx = $objp->localtax1_tx; + $ligne->localtax2_tx = $objp->localtax2_tx; + $ligne->subprice = $objp->subprice; + $ligne->remise_percent = $objp->remise_percent; + $ligne->price_ht = $objp->price_ht; + $ligne->price = $objp->price; // For backward compatibility + $ligne->total_ht = $objp->total_ht; + $ligne->total_tva = $objp->total_tva; + $ligne->total_localtax1= $objp->total_localtax1; + $ligne->total_localtax2= $objp->total_localtax2; + $ligne->total_ttc = $objp->total_ttc; + $ligne->fk_product = 0; + $ligne->info_bits = $objp->info_bits; - $line->fk_user_author = $objp->fk_user_author; - $line->fk_user_ouverture= $objp->fk_user_ouverture; - $line->fk_user_cloture = $objp->fk_user_cloture; + $ligne->fk_user_author = $objp->fk_user_author; + $ligne->fk_user_ouverture= $objp->fk_user_ouverture; + $ligne->fk_user_cloture = $objp->fk_user_cloture; - $line->description = $objp->description; + $ligne->description = $objp->description; - $line->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue); - $line->date_ouverture = $this->db->jdate($objp->date_ouverture); - $line->date_fin_validite = $this->db->jdate($objp->date_fin_validite); - $line->date_cloture = $this->db->jdate($objp->date_cloture); + $ligne->date_ouverture_prevue = $this->db->jdate($objp->date_ouverture_prevue); + $ligne->date_ouverture = $this->db->jdate($objp->date_ouverture); + $ligne->date_fin_validite = $this->db->jdate($objp->date_fin_validite); + $ligne->date_cloture = $this->db->jdate($objp->date_cloture); // For backward compatibility - $line->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue); - $line->date_debut_reel = $this->db->jdate($objp->date_ouverture); - $line->date_fin_prevue = $this->db->jdate($objp->date_fin_validite); - $line->date_fin_reel = $this->db->jdate($objp->date_cloture); + $ligne->date_debut_prevue = $this->db->jdate($objp->date_ouverture_prevue); + $ligne->date_debut_reel = $this->db->jdate($objp->date_ouverture); + $ligne->date_fin_prevue = $this->db->jdate($objp->date_fin_validite); + $ligne->date_fin_reel = $this->db->jdate($objp->date_cloture); - if ($line->statut == 0) $this->nbofserviceswait++; - if ($line->statut == 4 && (empty($line->date_fin_prevue) || $line->date_fin_prevue >= $now)) $this->nbofservicesopened++; - if ($line->statut == 4 && $line->date_fin_prevue < $now) $this->nbofservicesexpired++; - if ($line->statut == 5) $this->nbofservicesclosed++; + if ($ligne->statut == 0) $this->nbofserviceswait++; + if ($ligne->statut == 4 && (empty($ligne->date_fin_prevue) || $ligne->date_fin_prevue >= $now)) $this->nbofservicesopened++; + if ($ligne->statut == 4 && $ligne->date_fin_prevue < $now) $this->nbofservicesexpired++; + if ($ligne->statut == 5) $this->nbofservicesclosed++; - $this->lines[] = $line; + $this->lignes[] = $ligne; $total_ttc+=$objp->total_ttc; $total_vat+=$objp->total_tva; @@ -536,12 +534,12 @@ class Contrat extends CommonObject return -2; } - $this->nbofservices=sizeof($this->lines); + $this->nbofservices=sizeof($this->lignes); $this->total_ttc = price2num($total_ttc); // TODO For the moment value is false as value is not stored in database for line linked to products $this->total_vat = price2num($total_vat); // TODO For the moment value is false as value is not stored in database for line linked to products $this->total_ht = price2num($total_ht); // TODO For the moment value is false as value is not stored in database for line linked to products - return $this->lines; + return $this->lignes; } /** @@ -1026,11 +1024,11 @@ class Contrat extends CommonObject // If draft, we keep it (should not happen) if ($this->statut == 0) return 1; - // Load $this->lines array - // $this->fetch_lines(); + // Load $this->lignes array + // $this->fetch_lignes(); $newstatut=1; - foreach($this->lines as $key => $contractline) + foreach($this->lignes as $key => $contractline) { // if ($contractline) // Loop on each service } @@ -1420,19 +1418,19 @@ class Contrat extends CommonObject $xnbp = 0; while ($xnbp < $nbp) { - $line=new ContratLigne($this->db); - $line->desc=$langs->trans("Description")." ".$xnbp; - $line->qty=1; - $line->subprice=100; - $line->price=100; - $line->tva_tx=19.6; - $line->remise_percent=10; - $line->total_ht=90; - $line->total_ttc=107.64; // 90 * 1.196 - $line->total_tva=17.64; + $ligne=new ContratLigne($this->db); + $ligne->desc=$langs->trans("Description")." ".$xnbp; + $ligne->qty=1; + $ligne->subprice=100; + $ligne->price=100; + $ligne->tva_tx=19.6; + $ligne->remise_percent=10; + $ligne->total_ht=90; + $ligne->total_ttc=107.64; // 90 * 1.196 + $ligne->total_tva=17.64; $prodid = rand(1, $num_prods); - $line->fk_product=$prodids[$prodid]; - $this->lines[$xnbp]=$line; + $ligne->fk_product=$prodids[$prodid]; + $this->lignes[$xnbp]=$ligne; $xnbp++; } diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 21d92ad47f5..2ac226043ee 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -645,7 +645,7 @@ else if ($result > 0) { $id = $contrat->id; // if $_GET['ref'] - $result=$contrat->fetch_lines(); + $result=$contrat->fetch_lignes(); } if ($result < 0) { @@ -655,7 +655,7 @@ else if ($mesg) print $mesg; - $nbofservices=sizeof($contrat->lines); + $nbofservices=sizeof($contrat->lignes); $author = new User($db); $author->fetch($contrat->user_author_id); @@ -805,7 +805,7 @@ else $sql.= " p.ref, p.label"; $sql.= " FROM ".MAIN_DB_PREFIX."contratdet as cd"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON cd.fk_product = p.rowid"; - $sql.= " WHERE cd.rowid = ".$contrat->lines[$cursorline-1]->id; + $sql.= " WHERE cd.rowid = ".$contrat->lignes[$cursorline-1]->id; $result = $db->query($sql); if ($result) @@ -982,7 +982,7 @@ else /* * Confirmation to delete service line of contract */ - if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lines[$cursorline-1]->id == $_GET["rowid"]) + if ($_REQUEST["action"] == 'deleteline' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lignes[$cursorline-1]->id == $_GET["rowid"]) { $ret=$html->form_confirm($_SERVER["PHP_SELF"]."?id=".$contrat->id."&lineid=".$_GET["rowid"],$langs->trans("DeleteContractLine"),$langs->trans("ConfirmDeleteContractLine"),"confirm_deleteline",'',0,1); if ($ret == 'html') print '
'; @@ -991,7 +991,7 @@ else /* * Confirmation to move service toward another contract */ - if ($_REQUEST["action"] == 'move' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lines[$cursorline-1]->id == $_GET["rowid"]) + if ($_REQUEST["action"] == 'move' && ! $_REQUEST["cancel"] && $user->rights->contrat->creer && $contrat->lignes[$cursorline-1]->id == $_GET["rowid"]) { $arraycontractid=array(); foreach($arrayothercontracts as $contractcursor) @@ -1011,7 +1011,7 @@ else /* * Confirmation de la validation activation */ - if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lines[$cursorline-1]->id == $_GET["ligne"]) + if ($_REQUEST["action"] == 'active' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"]) { $dateactstart = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $dateactend = dol_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); @@ -1023,7 +1023,7 @@ else /* * Confirmation de la validation fermeture */ - if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lines[$cursorline-1]->id == $_GET["ligne"]) + if ($_REQUEST["action"] == 'closeline' && ! $_REQUEST["cancel"] && $user->rights->contrat->activer && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"]) { $dateactstart = dol_mktime(12, 0 , 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $dateactend = dol_mktime(12, 0 , 0, $_POST["endmonth"], $_POST["endday"], $_POST["endyear"]); @@ -1039,7 +1039,7 @@ else print ''; print ''; - print ''; + print ''; print '
'.$langs->trans("ServiceStatus").': '.$contrat->lines[$cursorline-1]->getLibStatut(4).''.$langs->trans("ServiceStatus").': '.$contrat->lignes[$cursorline-1]->getLibStatut(4).''; if ($user->societe_id == 0) { @@ -1047,7 +1047,7 @@ else { $action='activateline'; if ($objp->statut == 4) $action='unactivateline'; - print ''; + print ''; print img_edit(); print ''; } @@ -1086,7 +1086,7 @@ else print '
'; } - if ($user->rights->contrat->activer && $_REQUEST["action"] == 'activateline' && $contrat->lines[$cursorline-1]->id == $_GET["ligne"]) + if ($user->rights->contrat->activer && $_REQUEST["action"] == 'activateline' && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"]) { /** * Activer la ligne de contrat @@ -1136,12 +1136,12 @@ else print ''; } - if ($user->rights->contrat->activer && $_REQUEST["action"] == 'unactivateline' && $contrat->lines[$cursorline-1]->id == $_GET["ligne"]) + if ($user->rights->contrat->activer && $_REQUEST["action"] == 'unactivateline' && $contrat->lignes[$cursorline-1]->id == $_GET["ligne"]) { /** * Desactiver la ligne de contrat */ - print '
'; + print ''; print ''; print ''; diff --git a/htdocs/contrat/tpl/linkedobjectblock.tpl.php b/htdocs/contrat/tpl/linkedobjectblock.tpl.php index aefe745f0d4..af99cb1533f 100644 --- a/htdocs/contrat/tpl/linkedobjectblock.tpl.php +++ b/htdocs/contrat/tpl/linkedobjectblock.tpl.php @@ -38,7 +38,7 @@ $var=true; for ($i = 0 ; $i < $num ; $i++) { $linkedObjectBlock->fetch($objectid[$i]); - $linkedObjectBlock->fetch_lines(); + $linkedObjectBlock->fetch_lignes(); $var=!$var; ?> >'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - - /** - * Return HTML with list of origin lines - */ - function printOriginLinesList($object) - { - $num = count($this->object->lines); - $var = true; - $i = 0; - - foreach ($this->object->lines as $line) - { - $var=!$var; - - if ($line->product_type == 9 && ! empty($line->special_code)) - { - $object->hooks[$line->special_code]->printOriginObjectLine($line,$i); - } - else - { - $this->printOriginLine($line,$var); - } - - $i++; - } - } - - /** - * Return HTML with origin line - * @param element Element type - * @param id Element id - */ - function printOriginLine($line,$var) - { - global $langs,$bc; - - //var_dump($line); - - $var=!$var; - - $date_start=$line->date_debut_prevue; - if ($line->date_debut_reel) $date_start=$line->date_debut_reel; - $date_end=$line->date_fin_prevue; - if ($line->date_fin_reel) $date_end=$line->date_fin_reel; - - print '\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - -} - -?> diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 9009e708f09..0f1e12348ba 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -229,11 +229,11 @@ class Translate { { if ($usecachekey) $tabtranslatedomain=array(); // To save lang content in cache - while ($line = fgets($fp,4096)) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents + while ($ligne = fgets($fp,4096)) // Ex: Need 225ms for all fgets on all lang file for Third party page. Same speed than file_get_contents { - if ($line[0] != "\n" && $line[0] != " " && $line[0] != "#") + if ($ligne[0] != "\n" && $ligne[0] != " " && $ligne[0] != "#") { - $tab=explode('=',$line,2); + $tab=explode('=',$ligne,2); $key=trim($tab[0]); //print "Domain=$domain, found a string for $tab[0] with value $tab[1]
"; if (empty($this->tab_translate[$key]) && isset($tab[1])) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 73fd72f0942..c49ca8cb684 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -31,7 +31,7 @@ header("Content-type: text/html; charset=".$conf->file->character_set_client); <?php echo $langs->trans('Login'); ?> - + - - -

FAQ

- - -
    -
  • -

    1. What's exactly the license of FPDF? Are there any usage restrictions?

    -FPDF is released under a permissive license: there is no usage restriction. You may embed it -freely in your application (commercial or not), with or without modifications. -
  • - -
  • -

    2. When I try to create a PDF, a lot of weird characters show on the screen. Why?

    -These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of -IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly -without launching Acrobat. This happens frequently during the development stage: on the least -script error, an HTML page is sent, and after correction, the PDF arrives. -
    -To solve the problem, simply quit and restart IE. You can also go to another URL and come -back. -
    -To avoid this kind of inconvenience during the development, you can generate the PDF directly -to a file and open it through the explorer. -
  • - -
  • -

    3. I try to generate a PDF and IE displays a blank page. What happens?

    -First of all, check that you send nothing to the browser after the PDF (not even a space or a -carriage return). You can put an exit statement just after the call to the Output() method to -be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE -used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems -in a reliable manner, two main techniques exist: -
    -
    -- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go -to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next -time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck -the option "Always ask before opening this type of file" and choose Open. From now on, PDF files -will open automatically in an external Acrobat window. -
    -The drawback of the method is that you need to alter the client configuration, which you can do -in an intranet environment but not for the Internet. -
    -
    -- Use a redirection technique. It consists in generating the PDF in a temporary file on the server -and redirect the client to it. For example, at the end of the script, you can put the following: -
    -
    //Determine a temporary file name in the current directory
    -$file = basename(tempnam('.', 'tmp'));
    -rename($file, $file.'.pdf');
    -$file .= '.pdf';
    -//Save PDF to file
    -$pdf->Output($file, 'F');
    -//Redirect
    -header('Location: '.$file);
    -
    -This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do -some cleaning in order to delete the temporary files. For example: -
    -
    function CleanFiles($dir)
    -{
    -    //Delete temporary files
    -    $t = time();
    -    $h = opendir($dir);
    -    while($file=readdir($h))
    -    {
    -        if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
    -        {
    -            $path = $dir.'/'.$file;
    -            if($t-filemtime($path)>3600)
    -                @unlink($path);
    -        }
    -    }
    -    closedir($h);
    -}
    -
    -This function deletes all files of the form tmp*.pdf older than an hour in the specified -directory. You may call it where you want, for example in the script which generates the PDF. -
  • - -
  • -

    4. I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.

    -You have to enclose your string with double quotes, not single ones. -
  • - -
  • -

    5. I try to display a variable in the Header method but nothing prints.

    -You have to use the global keyword to access global variables, for example: -
    -
    function Header()
    -{
    -    global $title;
    -
    -    $this->SetFont('Arial', 'B', 15);
    -    $this->Cell(0, 10, $title, 1, 1, 'C');
    -}
    -
    -$title = 'My title';
    -
    -Alternatively, you can use an object property: -
    -
    function Header()
    -{
    -    $this->SetFont('Arial', 'B', 15);
    -    $this->Cell(0, 10, $this->title, 1, 1, 'C');
    -}
    -
    -$pdf->title = 'My title';
    -
    -
  • - -
  • -

    6. I defined the Header and Footer methods in my PDF class but nothing appears.

    -You have to create an object from the PDF class, not FPDF: -
    -
    $pdf = new PDF();
    -
    -
  • - -
  • -

    7. Accented characters are replaced by some strange characters like é.

    -Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252. -It is possible to perform a conversion to ISO-8859-1 with utf8_decode(): -
    -
    $str = utf8_decode($str);
    -
    -But some characters such as Euro won't be translated correctly. If the iconv extension is available, the -right way to do it is the following: -
    -
    $str = iconv('UTF-8', 'windows-1252', $str);
    -
    -
  • - -
  • -

    8. I try to display the Euro symbol but it doesn't work.

    -The standard fonts have the Euro character at position 128. You can define a constant like this -for convenience: -
    -
    define('EURO', chr(128));
    -
    -
  • - -
  • -

    9. I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file

    -You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common -case is having extra blank at the end of an included script file.
    -If you can't figure out where the problem comes from, this other message appearing just before can help you:
    -
    -Warning: Cannot modify header information - headers already sent by (output started at script.php:X)
    -
    -It means that script.php outputs something at line X. Go to this line and fix it. -In case the message doesn't show, first check that you didn't disable warnings, then add this at the very -beginning of your script: -
    -
    ob_end_clean();
    -
    -If you still don't see it, disable zlib.output_compression in your php.ini and it should appear. -
  • - -
  • -

    10. I draw a frame with very precise dimensions, but when printed I notice some differences.

    -To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box. -
  • - -
  • -

    11. I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?

    -Printers have physical margins (different depending on the models); it is therefore impossible to remove -them and print on the whole surface of the paper. -
  • - -
  • -

    12. How can I put a background in my PDF?

    -For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect(). -
  • - -
  • -

    13. How can I set a specific header or footer on the first page?

    -Simply test the page number: -
    -
    function Header()
    -{
    -    if($this->PageNo()==1)
    -    {
    -        //First page
    -        ...
    -    }
    -    else
    -    {
    -        //Other pages
    -        ...
    -    }
    -}
    -
    -
  • - -
  • -

    14. I'd like to use extensions provided by different scripts. How can I combine them?

    -Use an inheritance chain. If you have two classes, say A in a.php: -
    -
    require('fpdf.php');
    -
    -class A extends FPDF
    -{
    -...
    -}
    -
    -and B in b.php: -
    -
    require('fpdf.php');
    -
    -class B extends FPDF
    -{
    -...
    -}
    -
    -then make B extend A: -
    -
    require('a.php');
    -
    -class B extends A
    -{
    -...
    -}
    -
    -and make your own class extend B: -
    -
    require('b.php');
    -
    -class PDF extends B
    -{
    -...
    -}
    -
    -$pdf = new PDF();
    -
    -
  • - -
  • -

    15. How can I send the PDF by email?

    -As any other file, but an easy way is to use PHPMailer and -its in-memory attachment: -
    -
    $mail = new PHPMailer();
    -...
    -$doc = $pdf->Output('', 'S');
    -$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
    -$mail->Send();
    -
    -
  • - -
  • -

    16. What's the limit of the file sizes I can generate with FPDF?

    -There is no particular limit. There are some constraints, however: -
    -
    -- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents, -especially with images, this limit may be reached (the file being built into memory). The -parameter is configured in the php.ini file. -
    -
    -- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily -reached. It is configured in php.ini and may be altered dynamically with set_time_limit(). -
    -
    -- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and -reach the limit, it will be lost. It is therefore advised for very big documents to -generate them in a file, and to send some data to the browser from time to time (with a call -to flush() to force the output). When the document is finished, you can send a redirection to -it or create a link. -
    -Remark: even if the browser times out, the script may continue to run on the server. -
  • - -
  • -

    17. Can I modify a PDF with FPDF?

    -It is possible to import pages from an existing PDF document thanks to the FPDI extension:
    -
    -http://www.setasign.de/products/pdf-php-solutions/fpdi/
    -
    -You can then add some content to them. -
  • - -
  • -

    18. I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?

    -No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from -a PDF. It is provided with the Xpdf package:
    -
    -http://www.foolabs.com/xpdf/ -
  • - -
  • -

    19. Can I convert an HTML page to PDF with FPDF?

    -Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:
    -
    -http://www.htmldoc.org -
  • - -
  • -

    20. Can I concatenate PDF files with FPDF?

    -Not directly, but it is possible to use FPDI -to perform this task. Some free command-line tools also exist:
    -
    -mbtPdfAsm
    -pdftk -
  • -
- - + + + + +FAQ + + + + +

FAQ

+ + +
    +
  • +

    1. What's exactly the license of FPDF? Are there any usage restrictions?

    +FPDF is released under a permissive license: there is no usage restriction. You may embed it +freely in your application (commercial or not), with or without modifications. +
  • + +
  • +

    2. When I try to create a PDF, a lot of weird characters show on the screen. Why?

    +These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of +IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly +without launching Acrobat. This happens frequently during the development stage: on the least +script error, an HTML page is sent, and after correction, the PDF arrives. +
    +To solve the problem, simply quit and restart IE. You can also go to another URL and come +back. +
    +To avoid this kind of inconvenience during the development, you can generate the PDF directly +to a file and open it through the explorer. +
  • + +
  • +

    3. I try to generate a PDF and IE displays a blank page. What happens?

    +First of all, check that you send nothing to the browser after the PDF (not even a space or a +carriage return). You can put an exit statement just after the call to the Output() method to +be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE +used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems +in a reliable manner, two main techniques exist: +
    +
    +- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go +to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next +time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck +the option "Always ask before opening this type of file" and choose Open. From now on, PDF files +will open automatically in an external Acrobat window. +
    +The drawback of the method is that you need to alter the client configuration, which you can do +in an intranet environment but not for the Internet. +
    +
    +- Use a redirection technique. It consists in generating the PDF in a temporary file on the server +and redirect the client to it. For example, at the end of the script, you can put the following: +
    +
    //Determine a temporary file name in the current directory
    +$file = basename(tempnam('.', 'tmp'));
    +rename($file, $file.'.pdf');
    +$file .= '.pdf';
    +//Save PDF to file
    +$pdf->Output($file, 'F');
    +//Redirect
    +header('Location: '.$file);
    +
    +This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do +some cleaning in order to delete the temporary files. For example: +
    +
    function CleanFiles($dir)
    +{
    +    //Delete temporary files
    +    $t = time();
    +    $h = opendir($dir);
    +    while($file=readdir($h))
    +    {
    +        if(substr($file,0,3)=='tmp' && substr($file,-4)=='.pdf')
    +        {
    +            $path = $dir.'/'.$file;
    +            if($t-filemtime($path)>3600)
    +                @unlink($path);
    +        }
    +    }
    +    closedir($h);
    +}
    +
    +This function deletes all files of the form tmp*.pdf older than an hour in the specified +directory. You may call it where you want, for example in the script which generates the PDF. +
  • + +
  • +

    4. I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.

    +You have to enclose your string with double quotes, not single ones. +
  • + +
  • +

    5. I try to display a variable in the Header method but nothing prints.

    +You have to use the global keyword to access global variables, for example: +
    +
    function Header()
    +{
    +    global $title;
    +
    +    $this->SetFont('Arial', 'B', 15);
    +    $this->Cell(0, 10, $title, 1, 1, 'C');
    +}
    +
    +$title = 'My title';
    +
    +Alternatively, you can use an object property: +
    +
    function Header()
    +{
    +    $this->SetFont('Arial', 'B', 15);
    +    $this->Cell(0, 10, $this->title, 1, 1, 'C');
    +}
    +
    +$pdf->title = 'My title';
    +
    +
  • + +
  • +

    6. I defined the Header and Footer methods in my PDF class but nothing appears.

    +You have to create an object from the PDF class, not FPDF: +
    +
    $pdf = new PDF();
    +
    +
  • + +
  • +

    7. Accented characters are replaced by some strange characters like é.

    +Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252. +It is possible to perform a conversion to ISO-8859-1 with utf8_decode(): +
    +
    $str = utf8_decode($str);
    +
    +But some characters such as Euro won't be translated correctly. If the iconv extension is available, the +right way to do it is the following: +
    +
    $str = iconv('UTF-8', 'windows-1252', $str);
    +
    +
  • + +
  • +

    8. I try to display the Euro symbol but it doesn't work.

    +The standard fonts have the Euro character at position 128. You can define a constant like this +for convenience: +
    +
    define('EURO', chr(128));
    +
    +
  • + +
  • +

    9. I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file

    +You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common +case is having extra blank at the end of an included script file.
    +If you can't figure out where the problem comes from, this other message appearing just before can help you:
    +
    +Warning: Cannot modify header information - headers already sent by (output started at script.php:X)
    +
    +It means that script.php outputs something at line X. Go to this line and fix it. +In case the message doesn't show, first check that you didn't disable warnings, then add this at the very +beginning of your script: +
    +
    ob_end_clean();
    +
    +If you still don't see it, disable zlib.output_compression in your php.ini and it should appear. +
  • + +
  • +

    10. I draw a frame with very precise dimensions, but when printed I notice some differences.

    +To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box. +
  • + +
  • +

    11. I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?

    +Printers have physical margins (different depending on the models); it is therefore impossible to remove +them and print on the whole surface of the paper. +
  • + +
  • +

    12. How can I put a background in my PDF?

    +For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect(). +
  • + +
  • +

    13. How can I set a specific header or footer on the first page?

    +Simply test the page number: +
    +
    function Header()
    +{
    +    if($this->PageNo()==1)
    +    {
    +        //First page
    +        ...
    +    }
    +    else
    +    {
    +        //Other pages
    +        ...
    +    }
    +}
    +
    +
  • + +
  • +

    14. I'd like to use extensions provided by different scripts. How can I combine them?

    +Use an inheritance chain. If you have two classes, say A in a.php: +
    +
    require('fpdf.php');
    +
    +class A extends FPDF
    +{
    +...
    +}
    +
    +and B in b.php: +
    +
    require('fpdf.php');
    +
    +class B extends FPDF
    +{
    +...
    +}
    +
    +then make B extend A: +
    +
    require('a.php');
    +
    +class B extends A
    +{
    +...
    +}
    +
    +and make your own class extend B: +
    +
    require('b.php');
    +
    +class PDF extends B
    +{
    +...
    +}
    +
    +$pdf = new PDF();
    +
    +
  • + +
  • +

    15. How can I send the PDF by email?

    +As any other file, but an easy way is to use PHPMailer and +its in-memory attachment: +
    +
    $mail = new PHPMailer();
    +...
    +$doc = $pdf->Output('', 'S');
    +$mail->AddStringAttachment($doc, 'doc.pdf', 'base64', 'application/pdf');
    +$mail->Send();
    +
    +
  • + +
  • +

    16. What's the limit of the file sizes I can generate with FPDF?

    +There is no particular limit. There are some constraints, however: +
    +
    +- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents, +especially with images, this limit may be reached (the file being built into memory). The +parameter is configured in the php.ini file. +
    +
    +- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily +reached. It is configured in php.ini and may be altered dynamically with set_time_limit(). +
    +
    +- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and +reach the limit, it will be lost. It is therefore advised for very big documents to +generate them in a file, and to send some data to the browser from time to time (with a call +to flush() to force the output). When the document is finished, you can send a redirection to +it or create a link. +
    +Remark: even if the browser times out, the script may continue to run on the server. +
  • + +
  • +

    17. Can I modify a PDF with FPDF?

    +It is possible to import pages from an existing PDF document thanks to the FPDI extension:
    +
    +http://www.setasign.de/products/pdf-php-solutions/fpdi/
    +
    +You can then add some content to them. +
  • + +
  • +

    18. I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?

    +No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from +a PDF. It is provided with the Xpdf package:
    +
    +http://www.foolabs.com/xpdf/ +
  • + +
  • +

    19. Can I convert an HTML page to PDF with FPDF?

    +Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:
    +
    +http://www.htmldoc.org +
  • + +
  • +

    20. Can I concatenate PDF files with FPDF?

    +Not directly, but it is possible to use FPDI +to perform this task. Some free command-line tools also exist:
    +
    +mbtPdfAsm
    +pdftk +
  • +
+ + diff --git a/htdocs/includes/fpdf/fpdf/font/courier.php b/htdocs/includes/fpdf/fpdf/font/courier.php index 4c009f39b47..913f9a4533e 100644 --- a/htdocs/includes/fpdf/fpdf/font/courier.php +++ b/htdocs/includes/fpdf/fpdf/font/courier.php @@ -1,7 +1,7 @@ - + diff --git a/htdocs/includes/fpdf/fpdf/font/desktop.ini b/htdocs/includes/fpdf/fpdf/font/desktop.ini index c5547ea50b4..8a96fbb70f2 100644 --- a/htdocs/includes/fpdf/fpdf/font/desktop.ini +++ b/htdocs/includes/fpdf/fpdf/font/desktop.ini @@ -1,4 +1,4 @@ -[ViewState] -Mode= -Vid= -FolderType=NotSpecified +[ViewState] +Mode= +Vid= +FolderType=NotSpecified diff --git a/htdocs/includes/fpdf/fpdf/font/helvetica.php b/htdocs/includes/fpdf/fpdf/font/helvetica.php index 8fa7683e7c2..ca94cdf21ab 100644 --- a/htdocs/includes/fpdf/fpdf/font/helvetica.php +++ b/htdocs/includes/fpdf/fpdf/font/helvetica.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/helveticab.php b/htdocs/includes/fpdf/fpdf/font/helveticab.php index a8473c94d72..276cfa8cb8c 100644 --- a/htdocs/includes/fpdf/fpdf/font/helveticab.php +++ b/htdocs/includes/fpdf/fpdf/font/helveticab.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/helveticabi.php b/htdocs/includes/fpdf/fpdf/font/helveticabi.php index 41379537dc7..8d217743254 100644 --- a/htdocs/includes/fpdf/fpdf/font/helveticabi.php +++ b/htdocs/includes/fpdf/fpdf/font/helveticabi.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/helveticai.php b/htdocs/includes/fpdf/fpdf/font/helveticai.php index d5bb6e094e4..88bf4371bd4 100644 --- a/htdocs/includes/fpdf/fpdf/font/helveticai.php +++ b/htdocs/includes/fpdf/fpdf/font/helveticai.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/makefont/makefont.php b/htdocs/includes/fpdf/fpdf/font/makefont/makefont.php index 7fe558f27c6..7e7ed5647e0 100644 --- a/htdocs/includes/fpdf/fpdf/font/makefont/makefont.php +++ b/htdocs/includes/fpdf/fpdf/font/makefont/makefont.php @@ -1,419 +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'.')
'; -} -?> +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/htdocs/includes/fpdf/fpdf/font/symbol.php b/htdocs/includes/fpdf/fpdf/font/symbol.php index b556ed84cfe..43b50e4511f 100644 --- a/htdocs/includes/fpdf/fpdf/font/symbol.php +++ b/htdocs/includes/fpdf/fpdf/font/symbol.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/times.php b/htdocs/includes/fpdf/fpdf/font/times.php index b9be1b21d6b..837c706e08d 100644 --- a/htdocs/includes/fpdf/fpdf/font/times.php +++ b/htdocs/includes/fpdf/fpdf/font/times.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/timesb.php b/htdocs/includes/fpdf/fpdf/font/timesb.php index c3eb9fa75bb..09cff86ac4a 100644 --- a/htdocs/includes/fpdf/fpdf/font/timesb.php +++ b/htdocs/includes/fpdf/fpdf/font/timesb.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/timesbi.php b/htdocs/includes/fpdf/fpdf/font/timesbi.php index 161f6302c8f..b4e38d763b5 100644 --- a/htdocs/includes/fpdf/fpdf/font/timesbi.php +++ b/htdocs/includes/fpdf/fpdf/font/timesbi.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/timesi.php b/htdocs/includes/fpdf/fpdf/font/timesi.php index de171fd19e4..0ba2b7773d8 100644 --- a/htdocs/includes/fpdf/fpdf/font/timesi.php +++ b/htdocs/includes/fpdf/fpdf/font/timesi.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/font/zapfdingbats.php b/htdocs/includes/fpdf/fpdf/font/zapfdingbats.php index f2bdfd5c940..1f926a8c3f0 100644 --- a/htdocs/includes/fpdf/fpdf/font/zapfdingbats.php +++ b/htdocs/includes/fpdf/fpdf/font/zapfdingbats.php @@ -1,15 +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); -?> +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/htdocs/includes/fpdf/fpdf/fpdf.css b/htdocs/includes/fpdf/fpdf/fpdf.css index 8cfa33d73a6..dd2c540029a 100644 --- a/htdocs/includes/fpdf/fpdf/fpdf.css +++ b/htdocs/includes/fpdf/fpdf/fpdf.css @@ -1,21 +1,21 @@ -body {font-family:"Times New Roman",serif} -h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em} -h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em} -dl.param dt {text-decoration:underline} -dl.param dd {margin-top:1em; margin-bottom:1em} -dl.param ul {margin-top:1em; margin-bottom:1em} -tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%} -div.source {margin-top:1.4em; margin-bottom:1.3em} -div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%} -div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000} -div.doc-source {margin-top:1.4em; margin-bottom:1.3em} -div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%} -div.doc-source code {display:block; background-color:#E0E0E0; padding:4px} -.kw {color:#000080; font-weight:bold} -.str {color:#CC0000} -.cmt {color:#008000} -p.demo {text-align:center; margin-top:-0.9em} -a.demo {text-decoration:none; font-weight:bold; color:#0000CC} -a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC} -a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF} -a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF} +body {font-family:"Times New Roman",serif} +h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em} +h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em} +dl.param dt {text-decoration:underline} +dl.param dd {margin-top:1em; margin-bottom:1em} +dl.param ul {margin-top:1em; margin-bottom:1em} +tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%} +div.source {margin-top:1.4em; margin-bottom:1.3em} +div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000} +div.doc-source {margin-top:1.4em; margin-bottom:1.3em} +div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.doc-source code {display:block; background-color:#E0E0E0; padding:4px} +.kw {color:#000080; font-weight:bold} +.str {color:#CC0000} +.cmt {color:#008000} +p.demo {text-align:center; margin-top:-0.9em} +a.demo {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF} +a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF} diff --git a/htdocs/includes/fpdf/fpdf/histo.htm b/htdocs/includes/fpdf/fpdf/histo.htm index be15851bf1b..7097fd89034 100644 --- a/htdocs/includes/fpdf/fpdf/histo.htm +++ b/htdocs/includes/fpdf/fpdf/histo.htm @@ -1,128 +1,128 @@ - - - - -History - - - - -

History

-
-
v1.6 (2008-08-03)
-
-- GIF image support.
-- Images can now trigger page breaks.
-- Possibility to have different page formats in a single document.
-- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.
-- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.
-- An automatic page break in Header() doesn't cause an infinite loop any more.
-- Removed some warning messages appearing with recent PHP versions.
-- Added HTTP headers to reduce problems with IE.
-
-
v1.53 (2004-12-31)
-
-- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.
-- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.
-- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.
-- The file name sent to the browser could not contain a space character.
-- The Cell() method could not print the number 0 (you had to pass the string '0').
-
-
v1.52 (2003-12-30)
-
-- Image() now displays the image at 72 dpi if no dimension is given.
-- Output() takes a string as second parameter to indicate destination.
-- Open() is now called automatically by AddPage().
-- Inserting remote JPEG images doesn't generate an error any longer.
-- Decimal separator is forced to dot in the constructor.
-- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).
-- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.
-- No more error message about already sent headers when outputting the PDF to the standard output from the command line.
-- The underlining was going too far for text containing characters \, ( or ).
-- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.
-
-
v1.51 (2002-08-03)
-
-- Type1 font support.
-- Added Baltic encoding.
-- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :
  * The line thickness was too large when printed under Windows 98 SE and ME.
  * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.
-- It is no longer necessary to set the decimal separator as dot to produce valid documents.
-- The clickable area in a cell was always on the left independently from the text alignment.
-- JPEG images in CMYK mode appeared in inverted colors.
-- Transparent PNG images in grayscale or true color mode were incorrectly handled.
-- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.
-
-
v1.5 (2002-05-28)
-
-- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).
-- Added Write() method.
-- Added underlined style.
-- Internal and external link support (AddLink(), SetLink(), Link()).
-- Added right margin management and methods SetRightMargin(), SetTopMargin().
-- Modification of SetDisplayMode() to select page layout.
-- The border parameter of MultiCell() now lets choose borders to draw as Cell().
-- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.
-
-
v1.41 (2002-03-13)
-
-- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).
-
-
v1.4 (2002-03-02)
-
-- PHP3 is no longer supported.
-- Page compression (SetCompression()).
-- Choice of page format and possibility to change orientation inside document.
-- Added AcceptPageBreak() method.
-- Ability to print the total number of pages (AliasNbPages()).
-- Choice of cell borders to draw.
-- New mode for Cell(): the current position can now move under the cell.
-- Ability to include an image by specifying height only (width is calculated automatically).
-- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.
-
-
v1.31 (2002-01-12)
-
-- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.
-- Removed Expires HTTP header (gives trouble in some situations).
-- Added Content-disposition HTTP header (seems to help in some situations).
-
-
v1.3 (2001-12-03)
-
-- Line break and text justification support (MultiCell()).
-- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.
-- A cell whose width is declared null extends up to the right margin of the page.
-- Line width is now retained from page to page and defaults to 0.2 mm.
-- Added SetXY() method.
-- Fixed a passing by reference done in a deprecated manner for PHP4.
-
-
v1.2 (2001-11-11)
-
-- Added font metric files and GetStringWidth() method.
-- Centering and right-aligning text in cells.
-- Display mode control (SetDisplayMode()).
-- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).
-- Possibility to force PDF download by browser.
-- Added SetX() and GetX() methods.
-- During automatic page break, current abscissa is now retained.
-
-
v1.11 (2001-10-20)
-
-- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.
-- Image insertion now works correctly even with magic_quotes_runtime option set to on.
-
-
v1.1 (2001-10-07)
-
-- JPEG and PNG image support.
-
-
v1.01 (2001-10-03)
-
-- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.
-
-
v1.0 (2001-09-17)
-
-- First version.
-
-
- - + + + + +History + + + + +

History

+
+
v1.6 (2008-08-03)
+
+- GIF image support.
+- Images can now trigger page breaks.
+- Possibility to have different page formats in a single document.
+- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.
+- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.
+- An automatic page break in Header() doesn't cause an infinite loop any more.
+- Removed some warning messages appearing with recent PHP versions.
+- Added HTTP headers to reduce problems with IE.
+
+
v1.53 (2004-12-31)
+
+- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.
+- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.
+- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.
+- The file name sent to the browser could not contain a space character.
+- The Cell() method could not print the number 0 (you had to pass the string '0').
+
+
v1.52 (2003-12-30)
+
+- Image() now displays the image at 72 dpi if no dimension is given.
+- Output() takes a string as second parameter to indicate destination.
+- Open() is now called automatically by AddPage().
+- Inserting remote JPEG images doesn't generate an error any longer.
+- Decimal separator is forced to dot in the constructor.
+- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).
+- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.
+- No more error message about already sent headers when outputting the PDF to the standard output from the command line.
+- The underlining was going too far for text containing characters \, ( or ).
+- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.
+
+
v1.51 (2002-08-03)
+
+- Type1 font support.
+- Added Baltic encoding.
+- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :
  * The line thickness was too large when printed under Windows 98 SE and ME.
  * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.
+- It is no longer necessary to set the decimal separator as dot to produce valid documents.
+- The clickable area in a cell was always on the left independently from the text alignment.
+- JPEG images in CMYK mode appeared in inverted colors.
+- Transparent PNG images in grayscale or true color mode were incorrectly handled.
+- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.
+
+
v1.5 (2002-05-28)
+
+- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).
+- Added Write() method.
+- Added underlined style.
+- Internal and external link support (AddLink(), SetLink(), Link()).
+- Added right margin management and methods SetRightMargin(), SetTopMargin().
+- Modification of SetDisplayMode() to select page layout.
+- The border parameter of MultiCell() now lets choose borders to draw as Cell().
+- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.
+
+
v1.41 (2002-03-13)
+
+- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).
+
+
v1.4 (2002-03-02)
+
+- PHP3 is no longer supported.
+- Page compression (SetCompression()).
+- Choice of page format and possibility to change orientation inside document.
+- Added AcceptPageBreak() method.
+- Ability to print the total number of pages (AliasNbPages()).
+- Choice of cell borders to draw.
+- New mode for Cell(): the current position can now move under the cell.
+- Ability to include an image by specifying height only (width is calculated automatically).
+- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.
+
+
v1.31 (2002-01-12)
+
+- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.
+- Removed Expires HTTP header (gives trouble in some situations).
+- Added Content-disposition HTTP header (seems to help in some situations).
+
+
v1.3 (2001-12-03)
+
+- Line break and text justification support (MultiCell()).
+- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.
+- A cell whose width is declared null extends up to the right margin of the page.
+- Line width is now retained from page to page and defaults to 0.2 mm.
+- Added SetXY() method.
+- Fixed a passing by reference done in a deprecated manner for PHP4.
+
+
v1.2 (2001-11-11)
+
+- Added font metric files and GetStringWidth() method.
+- Centering and right-aligning text in cells.
+- Display mode control (SetDisplayMode()).
+- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).
+- Possibility to force PDF download by browser.
+- Added SetX() and GetX() methods.
+- During automatic page break, current abscissa is now retained.
+
+
v1.11 (2001-10-20)
+
+- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.
+- Image insertion now works correctly even with magic_quotes_runtime option set to on.
+
+
v1.1 (2001-10-07)
+
+- JPEG and PNG image support.
+
+
v1.01 (2001-10-03)
+
+- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.
+
+
v1.0 (2001-09-17)
+
+- First version.
+
+
+ + diff --git a/htdocs/includes/fpdf/fpdf/install.txt b/htdocs/includes/fpdf/fpdf/install.txt index a14099543b2..8ee326b05c1 100644 --- a/htdocs/includes/fpdf/fpdf/install.txt +++ b/htdocs/includes/fpdf/fpdf/install.txt @@ -1,26 +1,26 @@ -The FPDF library is made up of the following elements: - -- the main file, fpdf.php, which contains the class -- the font metric files (located in the font directory of this archive) - -The metric files are necessary as soon as you want to output some text in a document. -They can be accessed from three different locations: - -- the directory defined by the FPDF_FONTPATH constant (if this constant is defined) -- the font directory located in the directory containing fpdf.php (as it is the case in this archive) -- the directories accessible through include() - -Here is an example defining FPDF_FONTPATH (note the mandatory final slash): - -define('FPDF_FONTPATH','/home/www/font/'); -require('fpdf.php'); - -If the files are not accessible, the SetFont() method will produce the following error: - -FPDF error: Could not include font metric file - - -Remarks: - -- Only the files corresponding to the fonts actually used are necessary -- The tutorials provided in this package are ready to be executed +The FPDF library is made up of the following elements: + +- the main file, fpdf.php, which contains the class +- the font metric files (located in the font directory of this archive) + +The metric files are necessary as soon as you want to output some text in a document. +They can be accessed from three different locations: + +- the directory defined by the FPDF_FONTPATH constant (if this constant is defined) +- the font directory located in the directory containing fpdf.php (as it is the case in this archive) +- the directories accessible through include() + +Here is an example defining FPDF_FONTPATH (note the mandatory final slash): + +define('FPDF_FONTPATH','/home/www/font/'); +require('fpdf.php'); + +If the files are not accessible, the SetFont() method will produce the following error: + +FPDF error: Could not include font metric file + + +Remarks: + +- Only the files corresponding to the fonts actually used are necessary +- The tutorials provided in this package are ready to be executed diff --git a/htdocs/includes/fpdf/fpdf/license.txt b/htdocs/includes/fpdf/fpdf/license.txt index 6107ee47775..fd811c6f56d 100644 --- a/htdocs/includes/fpdf/fpdf/license.txt +++ b/htdocs/includes/fpdf/fpdf/license.txt @@ -1,6 +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. - +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/htdocs/includes/fpdf/fpdfi/README.txt b/htdocs/includes/fpdf/fpdfi/README.txt index 070304494ee..b1c69409786 100644 --- a/htdocs/includes/fpdf/fpdfi/README.txt +++ b/htdocs/includes/fpdf/fpdfi/README.txt @@ -1,5 +1,5 @@ -This directory contains all FPDFI librairies: -- FPDI -- FPDI_TPL -- FPDI_Protection -Found on http://www.setasign.de/products/pdf-php-solutions/fpdi/ +This directory contains all FPDFI librairies: +- FPDI +- FPDI_TPL +- FPDI_Protection +Found on http://www.setasign.de/products/pdf-php-solutions/fpdi/ diff --git a/htdocs/includes/geoip/geoipcity.inc b/htdocs/includes/geoip/geoipcity.inc index 160757187c3..0e7f40e72e0 100644 --- a/htdocs/includes/geoip/geoipcity.inc +++ b/htdocs/includes/geoip/geoipcity.inc @@ -1,208 +1,208 @@ -country_code = $value; - } - if ($key == "ci"){ - $record->city = $value; - } - if ($key == "re"){ - $record->region = $value; - } - if ($key == "ac"){ - $record->areacode = $value; - } - if ($key == "dm" || $key == "me" ){ - $record->dmacode = $value; - $record->metrocode = $value; - } - if ($key == "is"){ - $record->isp = $value; - } - if ($key == "or"){ - $record->org = $value; - } - if ($key == "zi"){ - $record->postal_code = $value; - } - if ($key == "la"){ - $record->latitude = $value; - } - if ($key == "lo"){ - $record->longitude = $value; - } - } - $number = $GLOBALS['GEOIP_COUNTRY_CODE_TO_NUMBER'][$record->country_code]; - $record->country_code3 = $GLOBALS['GEOIP_COUNTRY_CODES3'][$number]; - $record->country_name = $GLOBALS['GEOIP_COUNTRY_NAMES'][$number]; - if ($record->region != "") { - if (($record->country_code == "US") || ($record->country_code == "CA")){ - $record->regionname = $GLOBALS['ISO'][$record->country_code][$record->region]; - } else { - $record->regionname = $GLOBALS['FIPS'][$record->country_code][$record->region]; - } - } - return $record; -} - -function _get_record($gi,$ipnum){ - $seek_country = _geoip_seek_country($gi,$ipnum); - if ($seek_country == $gi->databaseSegments) { - return NULL; - } - $record_pointer = $seek_country + (2 * $gi->record_length - 1) * $gi->databaseSegments; - - if ($gi->flags & GEOIP_MEMORY_CACHE) { - $record_buf = substr($gi->memory_buffer,$record_pointer,FULL_RECORD_LENGTH); - } elseif ($gi->flags & GEOIP_SHARED_MEMORY){ - $record_buf = @shmop_read($gi->shmid,$record_pointer,FULL_RECORD_LENGTH); - } else { - fseek($gi->filehandle, $record_pointer, SEEK_SET); - $record_buf = fread($gi->filehandle,FULL_RECORD_LENGTH); - } - $record = new geoiprecord; - $record_buf_pos = 0; - $char = ord(substr($record_buf,$record_buf_pos,1)); - $record->country_code = $gi->GEOIP_COUNTRY_CODES[$char]; - $record->country_code3 = $gi->GEOIP_COUNTRY_CODES3[$char]; - $record->country_name = $gi->GEOIP_COUNTRY_NAMES[$char]; - $record_buf_pos++; - $str_length = 0; - // Get region - $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); - while ($char != 0){ - $str_length++; - $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); - } - if ($str_length > 0){ - $record->region = substr($record_buf,$record_buf_pos,$str_length); - } - $record_buf_pos += $str_length + 1; - $str_length = 0; - // Get city - $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); - while ($char != 0){ - $str_length++; - $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); - } - if ($str_length > 0){ - $record->city = substr($record_buf,$record_buf_pos,$str_length); - } - $record_buf_pos += $str_length + 1; - $str_length = 0; - // Get postal code - $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); - while ($char != 0){ - $str_length++; - $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); - } - if ($str_length > 0){ - $record->postal_code = substr($record_buf,$record_buf_pos,$str_length); - } - $record_buf_pos += $str_length + 1; - $str_length = 0; - // Get latitude and longitude - $latitude = 0; - $longitude = 0; - for ($j = 0;$j < 3; ++$j){ - $char = ord(substr($record_buf,$record_buf_pos++,1)); - $latitude += ($char << ($j * 8)); - } - $record->latitude = ($latitude/10000) - 180; - for ($j = 0;$j < 3; ++$j){ - $char = ord(substr($record_buf,$record_buf_pos++,1)); - $longitude += ($char << ($j * 8)); - } - $record->longitude = ($longitude/10000) - 180; - if (GEOIP_CITY_EDITION_REV1 == $gi->databaseType){ - $metroarea_combo = 0; - if ($record->country_code == "US"){ - for ($j = 0;$j < 3;++$j){ - $char = ord(substr($record_buf,$record_buf_pos++,1)); - $metroarea_combo += ($char << ($j * 8)); - } - $record->metro_code = $record->dma_code = floor($metroarea_combo/1000); - $record->area_code = $metroarea_combo%1000; - } - } - return $record; -} - -function GeoIP_record_by_addr ($gi,$addr){ - if ($addr == NULL){ - return 0; - } - $ipnum = ip2long($addr); - return _get_record($gi, $ipnum); -} - -?> +country_code = $value; + } + if ($key == "ci"){ + $record->city = $value; + } + if ($key == "re"){ + $record->region = $value; + } + if ($key == "ac"){ + $record->areacode = $value; + } + if ($key == "dm" || $key == "me" ){ + $record->dmacode = $value; + $record->metrocode = $value; + } + if ($key == "is"){ + $record->isp = $value; + } + if ($key == "or"){ + $record->org = $value; + } + if ($key == "zi"){ + $record->postal_code = $value; + } + if ($key == "la"){ + $record->latitude = $value; + } + if ($key == "lo"){ + $record->longitude = $value; + } + } + $number = $GLOBALS['GEOIP_COUNTRY_CODE_TO_NUMBER'][$record->country_code]; + $record->country_code3 = $GLOBALS['GEOIP_COUNTRY_CODES3'][$number]; + $record->country_name = $GLOBALS['GEOIP_COUNTRY_NAMES'][$number]; + if ($record->region != "") { + if (($record->country_code == "US") || ($record->country_code == "CA")){ + $record->regionname = $GLOBALS['ISO'][$record->country_code][$record->region]; + } else { + $record->regionname = $GLOBALS['FIPS'][$record->country_code][$record->region]; + } + } + return $record; +} + +function _get_record($gi,$ipnum){ + $seek_country = _geoip_seek_country($gi,$ipnum); + if ($seek_country == $gi->databaseSegments) { + return NULL; + } + $record_pointer = $seek_country + (2 * $gi->record_length - 1) * $gi->databaseSegments; + + if ($gi->flags & GEOIP_MEMORY_CACHE) { + $record_buf = substr($gi->memory_buffer,$record_pointer,FULL_RECORD_LENGTH); + } elseif ($gi->flags & GEOIP_SHARED_MEMORY){ + $record_buf = @shmop_read($gi->shmid,$record_pointer,FULL_RECORD_LENGTH); + } else { + fseek($gi->filehandle, $record_pointer, SEEK_SET); + $record_buf = fread($gi->filehandle,FULL_RECORD_LENGTH); + } + $record = new geoiprecord; + $record_buf_pos = 0; + $char = ord(substr($record_buf,$record_buf_pos,1)); + $record->country_code = $gi->GEOIP_COUNTRY_CODES[$char]; + $record->country_code3 = $gi->GEOIP_COUNTRY_CODES3[$char]; + $record->country_name = $gi->GEOIP_COUNTRY_NAMES[$char]; + $record_buf_pos++; + $str_length = 0; + // Get region + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + while ($char != 0){ + $str_length++; + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + } + if ($str_length > 0){ + $record->region = substr($record_buf,$record_buf_pos,$str_length); + } + $record_buf_pos += $str_length + 1; + $str_length = 0; + // Get city + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + while ($char != 0){ + $str_length++; + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + } + if ($str_length > 0){ + $record->city = substr($record_buf,$record_buf_pos,$str_length); + } + $record_buf_pos += $str_length + 1; + $str_length = 0; + // Get postal code + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + while ($char != 0){ + $str_length++; + $char = ord(substr($record_buf,$record_buf_pos+$str_length,1)); + } + if ($str_length > 0){ + $record->postal_code = substr($record_buf,$record_buf_pos,$str_length); + } + $record_buf_pos += $str_length + 1; + $str_length = 0; + // Get latitude and longitude + $latitude = 0; + $longitude = 0; + for ($j = 0;$j < 3; ++$j){ + $char = ord(substr($record_buf,$record_buf_pos++,1)); + $latitude += ($char << ($j * 8)); + } + $record->latitude = ($latitude/10000) - 180; + for ($j = 0;$j < 3; ++$j){ + $char = ord(substr($record_buf,$record_buf_pos++,1)); + $longitude += ($char << ($j * 8)); + } + $record->longitude = ($longitude/10000) - 180; + if (GEOIP_CITY_EDITION_REV1 == $gi->databaseType){ + $metroarea_combo = 0; + if ($record->country_code == "US"){ + for ($j = 0;$j < 3;++$j){ + $char = ord(substr($record_buf,$record_buf_pos++,1)); + $metroarea_combo += ($char << ($j * 8)); + } + $record->metro_code = $record->dma_code = floor($metroarea_combo/1000); + $record->area_code = $metroarea_combo%1000; + } + } + return $record; +} + +function GeoIP_record_by_addr ($gi,$addr){ + if ($addr == NULL){ + return 0; + } + $ipnum = ip2long($addr); + return _get_record($gi, $ipnum); +} + +?> diff --git a/htdocs/includes/login/README.txt b/htdocs/includes/login/README.txt index 8ea3d79077c..beb66115858 100644 --- a/htdocs/includes/login/README.txt +++ b/htdocs/includes/login/README.txt @@ -1,26 +1,26 @@ -README (english) ---------------------------------------------- -Decription of htdocs/includes/login directory ---------------------------------------------- - -This directory contains files that handle way to validate passwords. - -If you want to add a new password checker function, just add a file in -this directory that follow example of already existing files. -This file must be called for example : -functions_mypasschecker.php - -Edit function name to call it: -check_user_mypasschecker - -Change code of this function to return true if couple -$usertotest / $passwordtotest is ok for you. - -Then, you must edit you conf.php file to change the value of -$dolibarr_main_authentication -parameter to set it to : -mypasschecker - -Once this is done, when you log in to Dolibarr, the function -check_user_mypasschecker in this file is called. -If the function return true and login exists, login is accepted. +README (english) +--------------------------------------------- +Decription of htdocs/includes/login directory +--------------------------------------------- + +This directory contains files that handle way to validate passwords. + +If you want to add a new password checker function, just add a file in +this directory that follow example of already existing files. +This file must be called for example : +functions_mypasschecker.php + +Edit function name to call it: +check_user_mypasschecker + +Change code of this function to return true if couple +$usertotest / $passwordtotest is ok for you. + +Then, you must edit you conf.php file to change the value of +$dolibarr_main_authentication +parameter to set it to : +mypasschecker + +Once this is done, when you log in to Dolibarr, the function +check_user_mypasschecker in this file is called. +If the function return true and login exists, login is accepted. diff --git a/htdocs/includes/magpierss/rss_parse.inc b/htdocs/includes/magpierss/rss_parse.inc index 7a19b572f1f..e39d3971d2c 100644 --- a/htdocs/includes/magpierss/rss_parse.inc +++ b/htdocs/includes/magpierss/rss_parse.inc @@ -1,605 +1,605 @@ - -* @version 0.7a -* @license GPL -* -*/ - -define('RSS', 'RSS'); -define('ATOM', 'Atom'); - -require_once (MAGPIE_DIR . 'rss_utils.inc'); - -/** -* Hybrid parser, and object, takes RSS as a string and returns a simple object. -* -* see: rss_fetch.inc for a simpler interface with integrated caching support -* -*/ -class MagpieRSS { - var $parser; - - var $current_item = array(); // item currently being parsed - var $items = array(); // collection of parsed items - var $channel = array(); // hash of channel fields - var $textinput = array(); - var $image = array(); - var $feed_type; - var $feed_version; - var $encoding = ''; // output encoding of parsed rss - - var $_source_encoding = ''; // only set if we have to parse xml prolog - - var $ERROR = ""; - var $WARNING = ""; - - // define some constants - - var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); - var $_KNOWN_ENCODINGS = array('UTF-8', 'US-ASCII', 'ISO-8859-1'); - - // parser variables, useless if you're not a parser, treat as private - var $stack = array(); // parser stack - var $inchannel = false; - var $initem = false; - var $incontent = false; // if in Atom field - var $intextinput = false; - var $inimage = false; - var $current_namespace = false; - - - /** - * Set up XML parser, parse source, and return populated RSS object.. - * - * @param string $source string containing the RSS to be parsed - * - * NOTE: Probably a good idea to leave the encoding options alone unless - * you know what you're doing as PHP's character set support is - * a little weird. - * - * NOTE: A lot of this is unnecessary but harmless with PHP5 - * - * - * @param string $output_encoding output the parsed RSS in this character - * set defaults to ISO-8859-1 as this is PHP's - * default. - * - * NOTE: might be changed to UTF-8 in future - * versions. - * - * @param string $input_encoding the character set of the incoming RSS source. - * Leave blank and Magpie will try to figure it - * out. - * - * - * @param bool $detect_encoding if false Magpie won't attempt to detect - * source encoding. (caveat emptor) - * - */ - function MagpieRSS ($source, $output_encoding='ISO-8859-1', - $input_encoding=null, $detect_encoding=true) - { - # if PHP xml isn't compiled in, die - # - if (!function_exists('xml_parser_create')) { - $this->error( "Failed to load PHP's XML Extension. " . - "http://www.php.net/manual/en/ref.xml.php", - E_USER_ERROR ); - } - - list($parser, $source) = $this->create_parser($source, - $output_encoding, $input_encoding, $detect_encoding); - - - if (!is_resource($parser)) { - $this->error( "Failed to create an instance of PHP's XML parser. " . - "http://www.php.net/manual/en/ref.xml.php", - E_USER_ERROR ); - } - - - $this->parser = $parser; - - # pass in parser, and a reference to this object - # setup handlers - # - xml_set_object( $this->parser, $this ); - xml_set_element_handler($this->parser, - 'feed_start_element', 'feed_end_element' ); - - xml_set_character_data_handler( $this->parser, 'feed_cdata' ); - - $status = xml_parse( $this->parser, $source ); - - if (! $status ) { - $errorcode = xml_get_error_code( $this->parser ); - if ( $errorcode != XML_ERROR_NONE ) { - $xml_error = xml_error_string( $errorcode ); - $error_line = xml_get_current_line_number($this->parser); - $error_col = xml_get_current_column_number($this->parser); - $errormsg = "$xml_error at line $error_line, column $error_col"; - - $this->error( $errormsg ); - } - } - - xml_parser_free( $this->parser ); - - $this->normalize(); - } - - function feed_start_element($p, $element, &$attrs) { - $el = $element = strtolower($element); - $attrs = array_change_key_case($attrs, CASE_LOWER); - - // check for a namespace, and split if found - $ns = false; - if ( strpos( $element, ':' ) ) { - list($ns, $el) = explode( ':', $element, 2); - } - if ( $ns and $ns != 'rdf' ) { - $this->current_namespace = $ns; - } - - # if feed type isn't set, then this is first element of feed - # identify feed from root element - # - if (!isset($this->feed_type) ) { - if ( $el == 'rdf' ) { - $this->feed_type = RSS; - $this->feed_version = '1.0'; - } - elseif ( $el == 'rss' ) { - $this->feed_type = RSS; - $this->feed_version = $attrs['version']; - } - elseif ( $el == 'feed' ) { - $this->feed_type = ATOM; - $this->feed_version = $attrs['version']; - $this->inchannel = true; - } - return; - } - - if ( $el == 'channel' ) - { - $this->inchannel = true; - } - elseif ($el == 'item' or $el == 'entry' ) - { - $this->initem = true; - if ( isset($attrs['rdf:about']) ) { - $this->current_item['about'] = $attrs['rdf:about']; - } - } - - // if we're in the default namespace of an RSS feed, - // record textinput or image fields - elseif ( - $this->feed_type == RSS and - $this->current_namespace == '' and - $el == 'textinput' ) - { - $this->intextinput = true; - } - - elseif ( - $this->feed_type == RSS and - $this->current_namespace == '' and - $el == 'image' ) - { - $this->inimage = true; - } - - # handle atom content constructs - elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) - { - // avoid clashing w/ RSS mod_content - if ($el == 'content' ) { - $el = 'atom_content'; - } - - $this->incontent = $el; - - - } - - // if inside an Atom content construct (e.g. content or summary) field treat tags as text - elseif ($this->feed_type == ATOM and $this->incontent ) - { - // if tags are inlined, then flatten - $attrs_str = join(' ', - array_map('map_attrs', - array_keys($attrs), - array_values($attrs) ) ); - - $this->append_content( "<$element $attrs_str>" ); - - array_unshift( $this->stack, $el ); - } - - // Atom support many links per containging element. - // Magpie treats link elements of type rel='alternate' - // as being equivalent to RSS's simple link element. - // - elseif ($this->feed_type == ATOM and $el == 'link' ) - { - if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) - { - $link_el = 'link'; - } - else { - $link_el = 'link_' . $attrs['rel']; - } - - $this->append($link_el, $attrs['href']); - } - // set stack[0] to current element - else { - array_unshift($this->stack, $el); - } - } - - - - function feed_cdata ($p, $text) { - if ($this->feed_type == ATOM and $this->incontent) - { - $this->append_content( $text ); - } - else { - $current_el = join('_', array_reverse($this->stack)); - $this->append($current_el, $text); - } - } - - function feed_end_element ($p, $el) { - $el = strtolower($el); - - if ( $el == 'item' or $el == 'entry' ) - { - $this->items[] = $this->current_item; - $this->current_item = array(); - $this->initem = false; - } - elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) - { - $this->intextinput = false; - } - elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) - { - $this->inimage = false; - } - elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) - { - $this->incontent = false; - } - elseif ($el == 'channel' or $el == 'feed' ) - { - $this->inchannel = false; - } - elseif ($this->feed_type == ATOM and $this->incontent ) { - // balance tags properly - // note: i don't think this is actually neccessary - if ( $this->stack[0] == $el ) - { - $this->append_content(""); - } - else { - $this->append_content("<$el />"); - } - - array_shift( $this->stack ); - } - else { - array_shift( $this->stack ); - } - - $this->current_namespace = false; - } - - function concat (&$str1, $str2="") { - if (!isset($str1) ) { - $str1=""; - } - $str1 .= $str2; - } - - - - function append_content($text) { - if ( $this->initem ) { - $this->concat( $this->current_item[ $this->incontent ], $text ); - } - elseif ( $this->inchannel ) { - $this->concat( $this->channel[ $this->incontent ], $text ); - } - } - - // smart append - field and namespace aware - function append($el, $text) { - if (!$el) { - return; - } - if ( $this->current_namespace ) - { - if ( $this->initem ) { - $this->concat( - $this->current_item[ $this->current_namespace ][ $el ], $text); - } - elseif ($this->inchannel) { - $this->concat( - $this->channel[ $this->current_namespace][ $el ], $text ); - } - elseif ($this->intextinput) { - $this->concat( - $this->textinput[ $this->current_namespace][ $el ], $text ); - } - elseif ($this->inimage) { - $this->concat( - $this->image[ $this->current_namespace ][ $el ], $text ); - } - } - else { - if ( $this->initem ) { - $this->concat( - $this->current_item[ $el ], $text); - } - elseif ($this->intextinput) { - $this->concat( - $this->textinput[ $el ], $text ); - } - elseif ($this->inimage) { - $this->concat( - $this->image[ $el ], $text ); - } - elseif ($this->inchannel) { - $this->concat( - $this->channel[ $el ], $text ); - } - - } - } - - function normalize () { - // if atom populate rss fields - if ( $this->is_atom() ) { - $this->channel['description'] = $this->channel['tagline']; - for ( $i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ( isset($item['summary']) ) - $item['description'] = $item['summary']; - if ( isset($item['atom_content'])) - $item['content']['encoded'] = $item['atom_content']; - - $atom_date = (isset($item['issued']) ) ? $item['issued'] : $item['modified']; - if ( $atom_date ) { - $epoch = @parse_w3cdtf($atom_date); - if ($epoch and $epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - - $this->items[$i] = $item; - } - } - elseif ( $this->is_rss() ) { - $this->channel['tagline'] = $this->channel['description']; - for ( $i = 0; $i < count($this->items); $i++) { - $item = $this->items[$i]; - if ( isset($item['description'])) - $item['summary'] = $item['description']; - if ( isset($item['content']['encoded'] ) ) - $item['atom_content'] = $item['content']['encoded']; - - if ( $this->is_rss() == '1.0' and isset($item['dc']['date']) ) { - $epoch = @parse_w3cdtf($item['dc']['date']); - if ($epoch and $epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - elseif ( isset($item['pubdate']) ) { - $epoch = @strtotime($item['pubdate']); - if ($epoch > 0) { - $item['date_timestamp'] = $epoch; - } - } - - $this->items[$i] = $item; - } - } - } - - - function is_rss () { - if ( $this->feed_type == RSS ) { - return $this->feed_version; - } - else { - return false; - } - } - - function is_atom() { - if ( $this->feed_type == ATOM ) { - return $this->feed_version; - } - else { - return false; - } - } - - /** - * return XML parser, and possibly re-encoded source - * - */ - function create_parser($source, $out_enc, $in_enc, $detect) { - if ( substr(phpversion(),0,1) == 5) { - $parser = $this->php5_create_parser($in_enc, $detect); - } - else { - list($parser, $source) = $this->php4_create_parser($source, $in_enc, $detect); - } - if ($out_enc) { - $this->encoding = $out_enc; - xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $out_enc); - } - - return array($parser, $source); - } - - /** - * Instantiate an XML parser under PHP5 - * - * PHP5 will do a fine job of detecting input encoding - * if passed an empty string as the encoding. - * - * All hail libxml2! - * - */ - function php5_create_parser($in_enc, $detect) { - // by default php5 does a fine job of detecting input encodings - if(!$detect && $in_enc) { - return xml_parser_create($in_enc); - } - else { - return xml_parser_create(''); - } - } - - /** - * Instaniate an XML parser under PHP4 - * - * Unfortunately PHP4's support for character encodings - * and especially XML and character encodings sucks. As - * long as the documents you parse only contain characters - * from the ISO-8859-1 character set (a superset of ASCII, - * and a subset of UTF-8) you're fine. However once you - * step out of that comfy little world things get mad, bad, - * and dangerous to know. - * - * The following code is based on SJM's work with FoF - * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss - * - */ - function php4_create_parser($source, $in_enc, $detect) { - if ( !$detect ) { - return array(xml_parser_create($in_enc), $source); - } - - if (!$in_enc) { - if (preg_match('//m', $source, $m)) { - $in_enc = strtoupper($m[1]); - $this->source_encoding = $in_enc; - } - else { - $in_enc = 'UTF-8'; - } - } - - if ($this->known_encoding($in_enc)) { - return array(xml_parser_create($in_enc), $source); - } - - // the dectected encoding is not one of the simple encodings PHP knows - - // attempt to use the iconv extension to - // cast the XML to a known encoding - // @see http://php.net/iconv - - if (function_exists('iconv')) { - $encoded_source = iconv($in_enc,'UTF-8', $source); - if ($encoded_source) { - return array(xml_parser_create('UTF-8'), $encoded_source); - } - } - - // iconv didn't work, try mb_convert_encoding - // @see http://php.net/mbstring - if(function_exists('mb_convert_encoding')) { - $encoded_source = mb_convert_encoding($source, 'UTF-8', $in_enc ); - if ($encoded_source) { - return array(xml_parser_create('UTF-8'), $encoded_source); - } - } - - // else - $this->error("Feed is in an unsupported character encoding. ($in_enc) " . - "You may see strange artifacts, and mangled characters.", - E_USER_NOTICE); - - return array(xml_parser_create(), $source); - } - - function known_encoding($enc) { - $enc = strtoupper($enc); - if ( in_array($enc, $this->_KNOWN_ENCODINGS) ) { - return $enc; - } - else { - return false; - } - } - - function error ($errormsg, $lvl=E_USER_WARNING) { - // append PHP's error message if track_errors enabled - if ( isset($php_errormsg) ) { - $errormsg .= " ($php_errormsg)"; - } - if ( MAGPIE_DEBUG ) { - trigger_error( $errormsg, $lvl); - } - else { - error_log( $errormsg, 0); - } - - $notices = E_USER_NOTICE|E_NOTICE; - if ( $lvl&$notices ) { - $this->WARNING = $errormsg; - } else { - $this->ERROR = $errormsg; - } - } - - -} // end class RSS - -function map_attrs($k, $v) { - return "$k=\"$v\""; -} - -// patch to support medieval versions of PHP4.1.x, -// courtesy, Ryan Currie, ryan@digibliss.com - -if (!function_exists('array_change_key_case')) { - define("CASE_UPPER",1); - define("CASE_LOWER",0); - - - function array_change_key_case($array,$case=CASE_LOWER) { - if ($case=CASE_LOWER) $cmd=strtolower; - elseif ($case=CASE_UPPER) $cmd=strtoupper; - foreach($array as $key=>$value) { - $output[$cmd($key)]=$value; - } - return $output; - } - -} - -?> + +* @version 0.7a +* @license GPL +* +*/ + +define('RSS', 'RSS'); +define('ATOM', 'Atom'); + +require_once (MAGPIE_DIR . 'rss_utils.inc'); + +/** +* Hybrid parser, and object, takes RSS as a string and returns a simple object. +* +* see: rss_fetch.inc for a simpler interface with integrated caching support +* +*/ +class MagpieRSS { + var $parser; + + var $current_item = array(); // item currently being parsed + var $items = array(); // collection of parsed items + var $channel = array(); // hash of channel fields + var $textinput = array(); + var $image = array(); + var $feed_type; + var $feed_version; + var $encoding = ''; // output encoding of parsed rss + + var $_source_encoding = ''; // only set if we have to parse xml prolog + + var $ERROR = ""; + var $WARNING = ""; + + // define some constants + + var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); + var $_KNOWN_ENCODINGS = array('UTF-8', 'US-ASCII', 'ISO-8859-1'); + + // parser variables, useless if you're not a parser, treat as private + var $stack = array(); // parser stack + var $inchannel = false; + var $initem = false; + var $incontent = false; // if in Atom field + var $intextinput = false; + var $inimage = false; + var $current_namespace = false; + + + /** + * Set up XML parser, parse source, and return populated RSS object.. + * + * @param string $source string containing the RSS to be parsed + * + * NOTE: Probably a good idea to leave the encoding options alone unless + * you know what you're doing as PHP's character set support is + * a little weird. + * + * NOTE: A lot of this is unnecessary but harmless with PHP5 + * + * + * @param string $output_encoding output the parsed RSS in this character + * set defaults to ISO-8859-1 as this is PHP's + * default. + * + * NOTE: might be changed to UTF-8 in future + * versions. + * + * @param string $input_encoding the character set of the incoming RSS source. + * Leave blank and Magpie will try to figure it + * out. + * + * + * @param bool $detect_encoding if false Magpie won't attempt to detect + * source encoding. (caveat emptor) + * + */ + function MagpieRSS ($source, $output_encoding='ISO-8859-1', + $input_encoding=null, $detect_encoding=true) + { + # if PHP xml isn't compiled in, die + # + if (!function_exists('xml_parser_create')) { + $this->error( "Failed to load PHP's XML Extension. " . + "http://www.php.net/manual/en/ref.xml.php", + E_USER_ERROR ); + } + + list($parser, $source) = $this->create_parser($source, + $output_encoding, $input_encoding, $detect_encoding); + + + if (!is_resource($parser)) { + $this->error( "Failed to create an instance of PHP's XML parser. " . + "http://www.php.net/manual/en/ref.xml.php", + E_USER_ERROR ); + } + + + $this->parser = $parser; + + # pass in parser, and a reference to this object + # setup handlers + # + xml_set_object( $this->parser, $this ); + xml_set_element_handler($this->parser, + 'feed_start_element', 'feed_end_element' ); + + xml_set_character_data_handler( $this->parser, 'feed_cdata' ); + + $status = xml_parse( $this->parser, $source ); + + if (! $status ) { + $errorcode = xml_get_error_code( $this->parser ); + if ( $errorcode != XML_ERROR_NONE ) { + $xml_error = xml_error_string( $errorcode ); + $error_line = xml_get_current_line_number($this->parser); + $error_col = xml_get_current_column_number($this->parser); + $errormsg = "$xml_error at line $error_line, column $error_col"; + + $this->error( $errormsg ); + } + } + + xml_parser_free( $this->parser ); + + $this->normalize(); + } + + function feed_start_element($p, $element, &$attrs) { + $el = $element = strtolower($element); + $attrs = array_change_key_case($attrs, CASE_LOWER); + + // check for a namespace, and split if found + $ns = false; + if ( strpos( $element, ':' ) ) { + list($ns, $el) = explode( ':', $element, 2); + } + if ( $ns and $ns != 'rdf' ) { + $this->current_namespace = $ns; + } + + # if feed type isn't set, then this is first element of feed + # identify feed from root element + # + if (!isset($this->feed_type) ) { + if ( $el == 'rdf' ) { + $this->feed_type = RSS; + $this->feed_version = '1.0'; + } + elseif ( $el == 'rss' ) { + $this->feed_type = RSS; + $this->feed_version = $attrs['version']; + } + elseif ( $el == 'feed' ) { + $this->feed_type = ATOM; + $this->feed_version = $attrs['version']; + $this->inchannel = true; + } + return; + } + + if ( $el == 'channel' ) + { + $this->inchannel = true; + } + elseif ($el == 'item' or $el == 'entry' ) + { + $this->initem = true; + if ( isset($attrs['rdf:about']) ) { + $this->current_item['about'] = $attrs['rdf:about']; + } + } + + // if we're in the default namespace of an RSS feed, + // record textinput or image fields + elseif ( + $this->feed_type == RSS and + $this->current_namespace == '' and + $el == 'textinput' ) + { + $this->intextinput = true; + } + + elseif ( + $this->feed_type == RSS and + $this->current_namespace == '' and + $el == 'image' ) + { + $this->inimage = true; + } + + # handle atom content constructs + elseif ( $this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) + { + // avoid clashing w/ RSS mod_content + if ($el == 'content' ) { + $el = 'atom_content'; + } + + $this->incontent = $el; + + + } + + // if inside an Atom content construct (e.g. content or summary) field treat tags as text + elseif ($this->feed_type == ATOM and $this->incontent ) + { + // if tags are inlined, then flatten + $attrs_str = join(' ', + array_map('map_attrs', + array_keys($attrs), + array_values($attrs) ) ); + + $this->append_content( "<$element $attrs_str>" ); + + array_unshift( $this->stack, $el ); + } + + // Atom support many links per containging element. + // Magpie treats link elements of type rel='alternate' + // as being equivalent to RSS's simple link element. + // + elseif ($this->feed_type == ATOM and $el == 'link' ) + { + if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' ) + { + $link_el = 'link'; + } + else { + $link_el = 'link_' . $attrs['rel']; + } + + $this->append($link_el, $attrs['href']); + } + // set stack[0] to current element + else { + array_unshift($this->stack, $el); + } + } + + + + function feed_cdata ($p, $text) { + if ($this->feed_type == ATOM and $this->incontent) + { + $this->append_content( $text ); + } + else { + $current_el = join('_', array_reverse($this->stack)); + $this->append($current_el, $text); + } + } + + function feed_end_element ($p, $el) { + $el = strtolower($el); + + if ( $el == 'item' or $el == 'entry' ) + { + $this->items[] = $this->current_item; + $this->current_item = array(); + $this->initem = false; + } + elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'textinput' ) + { + $this->intextinput = false; + } + elseif ($this->feed_type == RSS and $this->current_namespace == '' and $el == 'image' ) + { + $this->inimage = false; + } + elseif ($this->feed_type == ATOM and in_array($el, $this->_CONTENT_CONSTRUCTS) ) + { + $this->incontent = false; + } + elseif ($el == 'channel' or $el == 'feed' ) + { + $this->inchannel = false; + } + elseif ($this->feed_type == ATOM and $this->incontent ) { + // balance tags properly + // note: i don't think this is actually neccessary + if ( $this->stack[0] == $el ) + { + $this->append_content(""); + } + else { + $this->append_content("<$el />"); + } + + array_shift( $this->stack ); + } + else { + array_shift( $this->stack ); + } + + $this->current_namespace = false; + } + + function concat (&$str1, $str2="") { + if (!isset($str1) ) { + $str1=""; + } + $str1 .= $str2; + } + + + + function append_content($text) { + if ( $this->initem ) { + $this->concat( $this->current_item[ $this->incontent ], $text ); + } + elseif ( $this->inchannel ) { + $this->concat( $this->channel[ $this->incontent ], $text ); + } + } + + // smart append - field and namespace aware + function append($el, $text) { + if (!$el) { + return; + } + if ( $this->current_namespace ) + { + if ( $this->initem ) { + $this->concat( + $this->current_item[ $this->current_namespace ][ $el ], $text); + } + elseif ($this->inchannel) { + $this->concat( + $this->channel[ $this->current_namespace][ $el ], $text ); + } + elseif ($this->intextinput) { + $this->concat( + $this->textinput[ $this->current_namespace][ $el ], $text ); + } + elseif ($this->inimage) { + $this->concat( + $this->image[ $this->current_namespace ][ $el ], $text ); + } + } + else { + if ( $this->initem ) { + $this->concat( + $this->current_item[ $el ], $text); + } + elseif ($this->intextinput) { + $this->concat( + $this->textinput[ $el ], $text ); + } + elseif ($this->inimage) { + $this->concat( + $this->image[ $el ], $text ); + } + elseif ($this->inchannel) { + $this->concat( + $this->channel[ $el ], $text ); + } + + } + } + + function normalize () { + // if atom populate rss fields + if ( $this->is_atom() ) { + $this->channel['description'] = $this->channel['tagline']; + for ( $i = 0; $i < count($this->items); $i++) { + $item = $this->items[$i]; + if ( isset($item['summary']) ) + $item['description'] = $item['summary']; + if ( isset($item['atom_content'])) + $item['content']['encoded'] = $item['atom_content']; + + $atom_date = (isset($item['issued']) ) ? $item['issued'] : $item['modified']; + if ( $atom_date ) { + $epoch = @parse_w3cdtf($atom_date); + if ($epoch and $epoch > 0) { + $item['date_timestamp'] = $epoch; + } + } + + $this->items[$i] = $item; + } + } + elseif ( $this->is_rss() ) { + $this->channel['tagline'] = $this->channel['description']; + for ( $i = 0; $i < count($this->items); $i++) { + $item = $this->items[$i]; + if ( isset($item['description'])) + $item['summary'] = $item['description']; + if ( isset($item['content']['encoded'] ) ) + $item['atom_content'] = $item['content']['encoded']; + + if ( $this->is_rss() == '1.0' and isset($item['dc']['date']) ) { + $epoch = @parse_w3cdtf($item['dc']['date']); + if ($epoch and $epoch > 0) { + $item['date_timestamp'] = $epoch; + } + } + elseif ( isset($item['pubdate']) ) { + $epoch = @strtotime($item['pubdate']); + if ($epoch > 0) { + $item['date_timestamp'] = $epoch; + } + } + + $this->items[$i] = $item; + } + } + } + + + function is_rss () { + if ( $this->feed_type == RSS ) { + return $this->feed_version; + } + else { + return false; + } + } + + function is_atom() { + if ( $this->feed_type == ATOM ) { + return $this->feed_version; + } + else { + return false; + } + } + + /** + * return XML parser, and possibly re-encoded source + * + */ + function create_parser($source, $out_enc, $in_enc, $detect) { + if ( substr(phpversion(),0,1) == 5) { + $parser = $this->php5_create_parser($in_enc, $detect); + } + else { + list($parser, $source) = $this->php4_create_parser($source, $in_enc, $detect); + } + if ($out_enc) { + $this->encoding = $out_enc; + xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $out_enc); + } + + return array($parser, $source); + } + + /** + * Instantiate an XML parser under PHP5 + * + * PHP5 will do a fine job of detecting input encoding + * if passed an empty string as the encoding. + * + * All hail libxml2! + * + */ + function php5_create_parser($in_enc, $detect) { + // by default php5 does a fine job of detecting input encodings + if(!$detect && $in_enc) { + return xml_parser_create($in_enc); + } + else { + return xml_parser_create(''); + } + } + + /** + * Instaniate an XML parser under PHP4 + * + * Unfortunately PHP4's support for character encodings + * and especially XML and character encodings sucks. As + * long as the documents you parse only contain characters + * from the ISO-8859-1 character set (a superset of ASCII, + * and a subset of UTF-8) you're fine. However once you + * step out of that comfy little world things get mad, bad, + * and dangerous to know. + * + * The following code is based on SJM's work with FoF + * @see http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss + * + */ + function php4_create_parser($source, $in_enc, $detect) { + if ( !$detect ) { + return array(xml_parser_create($in_enc), $source); + } + + if (!$in_enc) { + if (preg_match('//m', $source, $m)) { + $in_enc = strtoupper($m[1]); + $this->source_encoding = $in_enc; + } + else { + $in_enc = 'UTF-8'; + } + } + + if ($this->known_encoding($in_enc)) { + return array(xml_parser_create($in_enc), $source); + } + + // the dectected encoding is not one of the simple encodings PHP knows + + // attempt to use the iconv extension to + // cast the XML to a known encoding + // @see http://php.net/iconv + + if (function_exists('iconv')) { + $encoded_source = iconv($in_enc,'UTF-8', $source); + if ($encoded_source) { + return array(xml_parser_create('UTF-8'), $encoded_source); + } + } + + // iconv didn't work, try mb_convert_encoding + // @see http://php.net/mbstring + if(function_exists('mb_convert_encoding')) { + $encoded_source = mb_convert_encoding($source, 'UTF-8', $in_enc ); + if ($encoded_source) { + return array(xml_parser_create('UTF-8'), $encoded_source); + } + } + + // else + $this->error("Feed is in an unsupported character encoding. ($in_enc) " . + "You may see strange artifacts, and mangled characters.", + E_USER_NOTICE); + + return array(xml_parser_create(), $source); + } + + function known_encoding($enc) { + $enc = strtoupper($enc); + if ( in_array($enc, $this->_KNOWN_ENCODINGS) ) { + return $enc; + } + else { + return false; + } + } + + function error ($errormsg, $lvl=E_USER_WARNING) { + // append PHP's error message if track_errors enabled + if ( isset($php_errormsg) ) { + $errormsg .= " ($php_errormsg)"; + } + if ( MAGPIE_DEBUG ) { + trigger_error( $errormsg, $lvl); + } + else { + error_log( $errormsg, 0); + } + + $notices = E_USER_NOTICE|E_NOTICE; + if ( $lvl&$notices ) { + $this->WARNING = $errormsg; + } else { + $this->ERROR = $errormsg; + } + } + + +} // end class RSS + +function map_attrs($k, $v) { + return "$k=\"$v\""; +} + +// patch to support medieval versions of PHP4.1.x, +// courtesy, Ryan Currie, ryan@digibliss.com + +if (!function_exists('array_change_key_case')) { + define("CASE_UPPER",1); + define("CASE_LOWER",0); + + + function array_change_key_case($array,$case=CASE_LOWER) { + if ($case=CASE_LOWER) $cmd=strtolower; + elseif ($case=CASE_UPPER) $cmd=strtoupper; + foreach($array as $key=>$value) { + $output[$cmd($key)]=$value; + } + return $output; + } + +} + +?> diff --git a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php index 8ebc63b6bb3..f88a1593807 100644 --- a/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php +++ b/htdocs/includes/modules/cheque/pdf/pdf_blochet.class.php @@ -149,11 +149,11 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right $pdf->SetAutoPageBreak(1,0); - $lines=$this->line_per_page; // There is no line in such PDF. + $lignes=$this->line_per_page; // There is no line in such PDF. - $pages = intval($lines / $this->line_per_page); + $pages = intval($lignes / $this->line_per_page); - if (($lines % $this->line_per_page)>0) + if (($lignes % $this->line_per_page)>0) { $pages++; } @@ -333,38 +333,38 @@ class BordereauChequeBlochet extends ModeleChequeReceipts $page_hauteur=$this->page_hauteur; // Line of free text - $line=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):""; + $ligne=(! empty($conf->global->$paramfreetext))?$outputlangs->convToOutputCharset($conf->global->$paramfreetext):""; $pdf->SetFont('','',7); $pdf->SetDrawColor(224,224,224); // On positionne le debut du bas de page selon nbre de lignes de ce bas de page - $nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output); - //print 'e'.$line.'t'.dol_nboflines($line);exit; - $posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0); + $nbofligne=dol_nboflines_bis($ligne,0,$outputlangs->charset_output); + //print 'e'.$ligne.'t'.dol_nboflines($ligne);exit; + $posy=$marge_basse + ($nbofligne*3) + ($ligne1?3:0) + ($ligne2?3:0); - if ($line) // Free text + if ($ligne) // Free text { $pdf->SetXY($marge_gauche,-$posy); - $pdf->MultiCell(20000, 3, $line, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text. - $posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell + $pdf->MultiCell(20000, 3, $ligne, 0, 'L', 0); // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text. + $posy-=($nbofligne*3); // 6 of ligne + 3 of MultiCell } $pdf->SetY(-$posy); $pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy); $posy--; - if ($line1) + if ($ligne1) { $pdf->SetXY($marge_gauche,-$posy); - $pdf->MultiCell(200, 2, $line1, 0, 'C', 0); + $pdf->MultiCell(200, 2, $ligne1, 0, 'C', 0); } - if ($line2) + if ($ligne2) { $posy-=3; $pdf->SetXY($marge_gauche,-$posy); - $pdf->MultiCell(200, 2, $line2, 0, 'C', 0); + $pdf->MultiCell(200, 2, $ligne2, 0, 'C', 0); } $pdf->SetXY(-20,-$posy); diff --git a/htdocs/includes/modules/commande/pdf_edison.modules.php b/htdocs/includes/modules/commande/pdf_edison.modules.php index a7efe73e97c..33b02f2c25e 100644 --- a/htdocs/includes/modules/commande/pdf_edison.modules.php +++ b/htdocs/includes/modules/commande/pdf_edison.modules.php @@ -219,7 +219,7 @@ class pdf_edison extends ModelePDFCommandes $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs); $pdf->SetXY (156, $curY); - $pdf->MultiCell(20, 3, $up_excl_tax, 0, 'R', 0); + $pdf->MultiCell(18, 3, $up_excl_tax, 0, 'R', 0); $total_excl_tax = pdf_getlinetotalexcltax($object, $i, $outputlangs); $pdf->SetXY (174, $curY); diff --git a/htdocs/includes/modules/commande/pdf_einstein.modules.php b/htdocs/includes/modules/commande/pdf_einstein.modules.php index b83760cdeb6..6e112c3d325 100644 --- a/htdocs/includes/modules/commande/pdf_einstein.modules.php +++ b/htdocs/includes/modules/commande/pdf_einstein.modules.php @@ -783,7 +783,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxup-1, $tab_top+2); - $pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C'); + $pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C'); $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxqty-1, $tab_top+2); diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php index b92d9c0067e..6900dd8c7cf 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_merou.modules.php @@ -78,6 +78,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition global $user,$conf,$langs,$mysoc; $object->fetch_thirdparty(); + if (empty($object->lines)) $object->lines=$object->lignes; if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO @@ -352,7 +353,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition $tab4_top = 60; $tab4_hl = 6; $tab4_sl = 4; - $line = 2; + $ligne = 2; //*********************LOGO**************************** $pdf->SetXY(11,7); diff --git a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php index 26db46c7531..6e86520ff31 100644 --- a/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php +++ b/htdocs/includes/modules/expedition/pdf/pdf_expedition_rouget.modules.php @@ -220,6 +220,8 @@ Class pdf_expedition_rouget extends ModelePdfExpedition $object->fetch_thirdparty(); + if (empty($object->lines)) $object->lines=$object->lignes; + if (! is_object($outputlangs)) $outputlangs=$langs; // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (!class_exists('TCPDF')) $outputlangs->charset_output='ISO-8859-1'; diff --git a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php index b45fd6aa971..7937431c42c 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_sirocco.modules.php @@ -98,7 +98,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder { $object->fetch_thirdparty(); - $nblines = sizeof($object->lines); + $nblignes = sizeof($object->lignes); $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->expedition->dir_output."/receipt"; @@ -180,7 +180,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $curY = $tab_top + 7; $nexY = $tab_top + 7; - for ($i = 0 ; $i < $nblines ; $i++) + for ($i = 0 ; $i < $nblignes ; $i++) { $curY = $nexY; @@ -196,22 +196,22 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $pdf->SetXY (10, $curY ); - $pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C'); + $pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lignes[$i]->ref), 0, 'C'); // \TODO Field not yet saved in database //$pdf->SetXY (133, $curY ); - //$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C'); + //$pdf->MultiCell(10, 5, $object->lignes[$i]->tva_tx, 0, 'C'); $pdf->SetXY (145, $curY ); - $pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C'); + $pdf->MultiCell(10, 3, $object->lignes[$i]->qty_shipped, 0, 'C'); // \TODO Field not yet saved in database //$pdf->SetXY (156, $curY ); - //$pdf->MultiCell(20, 3, price($object->lines[$i]->price), 0, 'R', 0); + //$pdf->MultiCell(20, 3, price($object->lignes[$i]->price), 0, 'R', 0); // \TODO Field not yet saved in database //$pdf->SetXY (174, $curY ); - //$total = price($object->lines[$i]->price * $object->lines[$i]->qty_shipped); + //$total = price($object->lignes[$i]->price * $object->lignes[$i]->qty_shipped); //$pdf->MultiCell(26, 3, $total, 0, 'R', 0); $pdf->line(10, $curY-1, 200, $curY-1); @@ -220,10 +220,10 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $nexY+=2; // Passe espace entre les lignes // Cherche nombre de lignes a venir pour savoir si place suffisante - if ($i < ($nblines - 1)) // If it's not last line + if ($i < ($nblignes - 1)) // If it's not last line { //on recupere la description du produit suivant - $follow_descproduitservice = $object->lines[$i+1]->desc; + $follow_descproduitservice = $object->lignes[$i+1]->desc; //on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres) $nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4); } diff --git a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php index 468080774b8..3c214a210e2 100644 --- a/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/includes/modules/livraison/pdf/pdf_typhon.modules.php @@ -121,7 +121,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder { $object->fetch_thirdparty(); - $nblines = sizeof($object->lines); + $nblignes = sizeof($object->lignes); $objectref = dol_sanitizeFileName($object->ref); $dir = $conf->expedition->dir_output."/receipt"; @@ -190,7 +190,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Positionne $this->atleastonediscount si on a au moins une remise for ($i = 0 ; $i < $nblignes ; $i++) { - if ($object->lines[$i]->remise_percent) + if ($object->lignes[$i]->remise_percent) { $this->atleastonediscount++; } @@ -238,7 +238,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder $nexY = $tab_top + 7; // Boucle sur les lignes - for ($i = 0 ; $i < $nblines ; $i++) + for ($i = 0 ; $i < $nblignes ; $i++) { $curY = $nexY; @@ -255,41 +255,41 @@ class pdf_typhon extends ModelePDFDeliveryOrder /* // TVA $pdf->SetXY ($this->posxtva, $curY); - $pdf->MultiCell(10, 4, ($object->lines[$i]->tva_tx < 0 ? '*':'').abs($object->lines[$i]->tva_tx), 0, 'R'); + $pdf->MultiCell(10, 4, ($object->lignes[$i]->tva_tx < 0 ? '*':'').abs($object->lignes[$i]->tva_tx), 0, 'R'); // Prix unitaire HT avant remise $pdf->SetXY ($this->posxup, $curY); - $pdf->MultiCell(20, 4, price($object->lines[$i]->subprice), 0, 'R', 0); + $pdf->MultiCell(20, 4, price($object->lignes[$i]->subprice), 0, 'R', 0); */ // Quantity $pdf->SetXY ($this->posxqty, $curY); - $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped, 0, 'R'); + $pdf->MultiCell(30, 3, $object->lignes[$i]->qty_shipped, 0, 'R'); /* // Remise sur ligne $pdf->SetXY ($this->posxdiscount, $curY); - if ($object->lines[$i]->remise_percent) + if ($object->lignes[$i]->remise_percent) { - $pdf->MultiCell(14, 3, $object->lines[$i]->remise_percent."%", 0, 'R'); + $pdf->MultiCell(14, 3, $object->lignes[$i]->remise_percent."%", 0, 'R'); } // Total HT ligne $pdf->SetXY ($this->postotalht, $curY); - $total = price($object->lines[$i]->price * $object->lines[$i]->qty); + $total = price($object->lignes[$i]->price * $object->lignes[$i]->qty); $pdf->MultiCell(23, 3, $total, 0, 'R', 0); // Collecte des totaux par valeur de tva // dans le tableau tva["taux"]=total_tva - $tvaligne=$object->lines[$i]->price * $object->lines[$i]->qty; + $tvaligne=$object->lignes[$i]->price * $object->lignes[$i]->qty; if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100; - $this->tva[ (string)$object->lines[$i]->tva_tx ] += $tvaligne; + $this->tva[ (string)$object->lignes[$i]->tva_tx ] += $tvaligne; */ $nexY+=2; // Passe espace entre les lignes // Cherche nombre de lignes a venir pour savoir si place suffisante - if ($i < ($nblines - 1)) // If it's not last line + if ($i < ($nblignes - 1)) // If it's not last line { //on recupere la description du produit suivant - $follow_descproduitservice = $object->lines[$i+1]->desc; + $follow_descproduitservice = $object->lignes[$i+1]->desc; //on compte le nombre de ligne afin de verifier la place disponible (largeur de ligne 52 caracteres) $nblineFollowDesc = (dol_nboflines_bis($follow_descproduitservice,52,$outputlangs->charset_output)*4); } diff --git a/htdocs/includes/modules/mailings/.cvsignore b/htdocs/includes/modules/mailings/.cvsignore index 139ebd58046..91cc9955acd 100644 --- a/htdocs/includes/modules/mailings/.cvsignore +++ b/htdocs/includes/modules/mailings/.cvsignore @@ -1,2 +1,2 @@ -mailinglist_chatsderace.modules.php -mailinglist_chiensderace.modules.php +mailinglist_chatsderace.modules.php +mailinglist_chiensderace.modules.php diff --git a/htdocs/includes/modules/modDocument.class.php b/htdocs/includes/modules/modDocument.class.php index 11824130c10..acefba0899c 100644 --- a/htdocs/includes/modules/modDocument.class.php +++ b/htdocs/includes/modules/modDocument.class.php @@ -1,131 +1,131 @@ - - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup document Module mass mailings - * \brief Module pour gerer des generations de documents - * \version $Id$ - */ - -/** - * \file htdocs/includes/modules/modDocument.class.php - * \ingroup document - * \brief Fichier de description et activation du module Generation document - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modDocument - * \brief Classe de description et activation du module Document - */ - -class modDocument extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modDocument($DB) - { - $this->db = $DB ; - $this->numero = 51 ; - - $this->family = "technic"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Generation de courriers/publipostages papiers"; - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = 'development'; - - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto='email'; - - // Data directories to create when module is enabled - $this->dirs = array("/document/temp"); - - // Config pages - //$this->config_page_url = array("document.php"); - - // Dependencies - $this->depends = array(); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array("orders","bills","companies"); - - // Constantes - - $this->const = array(); - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'document'; - - $r=0; - - $this->rights[$r][0] = 510; - $this->rights[$r][1] = 'Lire les documents'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; - - $r++; - $this->rights[$r][0] = 511; - $this->rights[$r][1] = 'Supprimer les documents clients'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array(); - - return $this->_init($sql); - } - - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup document Module mass mailings + * \brief Module pour gerer des generations de documents + * \version $Id$ + */ + +/** + * \file htdocs/includes/modules/modDocument.class.php + * \ingroup document + * \brief Fichier de description et activation du module Generation document + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modDocument + * \brief Classe de description et activation du module Document + */ + +class modDocument extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modDocument($DB) + { + $this->db = $DB ; + $this->numero = 51 ; + + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Generation de courriers/publipostages papiers"; + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = 'development'; + + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto='email'; + + // Data directories to create when module is enabled + $this->dirs = array("/document/temp"); + + // Config pages + //$this->config_page_url = array("document.php"); + + // Dependencies + $this->depends = array(); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->langfiles = array("orders","bills","companies"); + + // Constantes + + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'document'; + + $r=0; + + $this->rights[$r][0] = 510; + $this->rights[$r][1] = 'Lire les documents'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 511; + $this->rights[$r][1] = 'Supprimer les documents clients'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array(); + + return $this->_init($sql); + } + + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modDomain.class.php b/htdocs/includes/modules/modDomain.class.php index 1ce44d39fdb..7f51a3a2e12 100644 --- a/htdocs/includes/modules/modDomain.class.php +++ b/htdocs/includes/modules/modDomain.class.php @@ -1,150 +1,150 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup domain Module domain - * \brief Module to manage a list of DNS names - * \version $Id$ - */ - -/** - * \file htdocs/includes/modules/modDomain.class.php - * \ingroup domain - * \brief Fichier de description et activation du module domain - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modDomain - * \brief Classe de description et activation du module Domain - */ -class modDomain extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modDomain($DB) - { - $this->db = $DB; - $this->numero = 1300 ; - - $this->family = "other"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion d'une base de noms de domaines"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific) - $this->special = 3; - $this->picto='generic'; - - // Dir - //---- - $this->dirs = array(); - - // Config pages - //------------- - $this->config_page_url = array(); - - // Dependancies - //------------- - $this->depends = array(); - $this->requiredby = array(); - $this->langfiles = array("domains"); - - // Constantes - //----------- - $this->const = array(); - - // Boites - //------- - $this->boxes = array(); - - // Permissions - //------------ - $this->rights = array(); - $this->rights_class = 'domain'; - $r=0; - - $r++; - $this->rights[$r][0] = 1301; - $this->rights[$r][1] = 'Read domain names'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'read'; - - $r++; - $this->rights[$r][0] = 1302; - $this->rights[$r][1] = 'Create/modify domain names'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'create'; - - $r++; - $this->rights[$r][0] = 1303; - $this->rights[$r][1] = 'Delete domain names'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'delete'; - - // Exports - //-------- - $r=0; - - // $this->export_code[$r] Code unique identifiant l'export (tous modules confondus) - // $this->export_label[$r] Libelle par defaut si traduction de cle "ExportXXX" non trouvee (XXX = Code) - // $this->export_permission[$r] Liste des codes permissions requis pour faire l'export - // $this->export_fields_sql[$r] Liste des champs exportables en codif sql - // $this->export_fields_name[$r] Liste des champs exportables en codif traduction - // $this->export_sql[$r] Requete sql qui offre les donnees a l'export - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } - -} -?> + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup domain Module domain + * \brief Module to manage a list of DNS names + * \version $Id$ + */ + +/** + * \file htdocs/includes/modules/modDomain.class.php + * \ingroup domain + * \brief Fichier de description et activation du module domain + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modDomain + * \brief Classe de description et activation du module Domain + */ +class modDomain extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modDomain($DB) + { + $this->db = $DB; + $this->numero = 1300 ; + + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion d'une base de noms de domaines"; + $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + // Where to store the module in setup page (0=common,1=interface,2=others,3=very specific) + $this->special = 3; + $this->picto='generic'; + + // Dir + //---- + $this->dirs = array(); + + // Config pages + //------------- + $this->config_page_url = array(); + + // Dependancies + //------------- + $this->depends = array(); + $this->requiredby = array(); + $this->langfiles = array("domains"); + + // Constantes + //----------- + $this->const = array(); + + // Boites + //------- + $this->boxes = array(); + + // Permissions + //------------ + $this->rights = array(); + $this->rights_class = 'domain'; + $r=0; + + $r++; + $this->rights[$r][0] = 1301; + $this->rights[$r][1] = 'Read domain names'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'read'; + + $r++; + $this->rights[$r][0] = 1302; + $this->rights[$r][1] = 'Create/modify domain names'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'create'; + + $r++; + $this->rights[$r][0] = 1303; + $this->rights[$r][1] = 'Delete domain names'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'delete'; + + // Exports + //-------- + $r=0; + + // $this->export_code[$r] Code unique identifiant l'export (tous modules confondus) + // $this->export_label[$r] Libelle par defaut si traduction de cle "ExportXXX" non trouvee (XXX = Code) + // $this->export_permission[$r] Liste des codes permissions requis pour faire l'export + // $this->export_fields_sql[$r] Liste des champs exportables en codif sql + // $this->export_fields_name[$r] Liste des champs exportables en codif traduction + // $this->export_sql[$r] Requete sql qui offre les donnees a l'export + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } + +} +?> diff --git a/htdocs/includes/modules/modFicheinter.class.php b/htdocs/includes/modules/modFicheinter.class.php index 060f35bf492..eca7c485296 100644 --- a/htdocs/includes/modules/modFicheinter.class.php +++ b/htdocs/includes/modules/modFicheinter.class.php @@ -1,180 +1,180 @@ - - * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup ficheinter Module intervention cards - * \brief Module to manage intervention cards - * \version $Id$ - */ - -/** - * \file htdocs/includes/modules/modFicheinter.class.php - * \ingroup ficheinter - * \brief Fichier de description et activation du module Ficheinter - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modFicheinter - * \brief Classe de description et activation du module Ficheinter - */ -class modFicheinter extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB Database access handler - */ - function modFicheinter($DB) - { - global $conf; - - $this->db = $DB ; - $this->numero = 70 ; - - $this->family = "crm"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des fiches d'intervention"; - - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = 'dolibarr'; - - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto = "intervention"; - - // Data directories to create when module is enabled - $this->dirs = array("/ficheinter/temp"); - - // Dependencies - $this->depends = array("modSociete"); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array("bills","companies","interventions"); - - // Config pages - $this->config_page_url = array("fichinter.php"); - - // Constantes - $this->const = array(); - $r=0; - - $this->const[$r][0] = "FICHEINTER_ADDON_PDF"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "soleil"; - $r++; - - $this->const[$r][0] = "FICHEINTER_ADDON"; - $this->const[$r][1] = "chaine"; - $this->const[$r][2] = "pacific"; - $r++; - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'ficheinter'; - $r=0; - - $r++; - $this->rights[$r][0] = 61; - $this->rights[$r][1] = 'Lire les fiches d\'intervention'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'lire'; - - $r++; - $this->rights[$r][0] = 62; - $this->rights[$r][1] = 'Creer/modifier les fiches d\'intervention'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'creer'; - - $r++; - $this->rights[$r][0] = 64; - $this->rights[$r][1] = 'Supprimer les fiches d\'intervention'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'supprimer'; - - $r++; - $this->rights[$r][0] = 67; - $this->rights[$r][1] = 'Exporter les fiches interventions'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'export'; - - //Exports - //-------- - $r=1; - - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) - $this->export_permission[$r]=array(array("ficheinter","export")); - $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); - $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); - $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"interid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.duree'=>"duration",'f.fk_statut'=>'status','f.description'=>"note",'fd.rowid'=>'lineid','fd.date'=>"linedate",'fd.duree'=>'lineduration','fd.description'=>"linedescription"); - - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'fichinter as f, '.MAIN_DB_PREFIX.'fichinterdet as fd, '.MAIN_DB_PREFIX.'societe as s)'; - $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_fichinter'; - $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; - $r++; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Permissions - $this->remove(); - - $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, - "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','ficheinter',".$conf->entity.")", - ); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup ficheinter Module intervention cards + * \brief Module to manage intervention cards + * \version $Id$ + */ + +/** + * \file htdocs/includes/modules/modFicheinter.class.php + * \ingroup ficheinter + * \brief Fichier de description et activation du module Ficheinter + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modFicheinter + * \brief Classe de description et activation du module Ficheinter + */ +class modFicheinter extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB Database access handler + */ + function modFicheinter($DB) + { + global $conf; + + $this->db = $DB ; + $this->numero = 70 ; + + $this->family = "crm"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des fiches d'intervention"; + + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = 'dolibarr'; + + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto = "intervention"; + + // Data directories to create when module is enabled + $this->dirs = array("/ficheinter/temp"); + + // Dependencies + $this->depends = array("modSociete"); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->langfiles = array("bills","companies","interventions"); + + // Config pages + $this->config_page_url = array("fichinter.php"); + + // Constantes + $this->const = array(); + $r=0; + + $this->const[$r][0] = "FICHEINTER_ADDON_PDF"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "soleil"; + $r++; + + $this->const[$r][0] = "FICHEINTER_ADDON"; + $this->const[$r][1] = "chaine"; + $this->const[$r][2] = "pacific"; + $r++; + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'ficheinter'; + $r=0; + + $r++; + $this->rights[$r][0] = 61; + $this->rights[$r][1] = 'Lire les fiches d\'intervention'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'lire'; + + $r++; + $this->rights[$r][0] = 62; + $this->rights[$r][1] = 'Creer/modifier les fiches d\'intervention'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'creer'; + + $r++; + $this->rights[$r][0] = 64; + $this->rights[$r][1] = 'Supprimer les fiches d\'intervention'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'supprimer'; + + $r++; + $this->rights[$r][0] = 67; + $this->rights[$r][1] = 'Exporter les fiches interventions'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'export'; + + //Exports + //-------- + $r=1; + + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='InterventionCardsAndInterventionLines'; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_permission[$r]=array(array("ficheinter","export")); + $this->export_fields_array[$r]=array('s.rowid'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','s.code_compta'=>'CustomerAccountancyCode','s.code_compta_fournisseur'=>'SupplierAccountancyCode','f.rowid'=>"InterId",'f.ref'=>"InterRef",'f.datec'=>"InterDateCreation",'f.duree'=>"InterDuration",'f.fk_statut'=>'InterStatus','f.description'=>"InterNote",'fd.rowid'=>'InterLineId','fd.date'=>"InterLineDate",'fd.duree'=>"InterLineDuration",'fd.description'=>"InterLineDesc"); + $this->export_entities_array[$r]=array('s.rowid'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.siret'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.code_compta'=>'company','s.code_compta_fournisseur'=>'company','f.rowid'=>"intervention",'f.ref'=>"intervention",'f.datec'=>"intervention",'f.duree'=>"intervention",'f.fk_statut'=>"intervention",'f.description'=>"intervention",'fd.rowid'=>"inter_line",'fd.date'=>"inter_line",'fd.duree'=>'inter_line','fd.description'=>'inter_line'); + $this->export_alias_array[$r]=array('s.rowid'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','s.code_compta'=>'soc_customer_accountancy','s.code_compta_fournisseur'=>'soc_supplier_accountancy','f.rowid'=>"interid",'f.ref'=>"ref",'f.datec'=>"datecreation",'f.duree'=>"duration",'f.fk_statut'=>'status','f.description'=>"note",'fd.rowid'=>'lineid','fd.date'=>"linedate",'fd.duree'=>'lineduration','fd.description'=>"linedescription"); + + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM ('.MAIN_DB_PREFIX.'fichinter as f, '.MAIN_DB_PREFIX.'fichinterdet as fd, '.MAIN_DB_PREFIX.'societe as s)'; + $this->export_sql_end[$r] .=' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_fichinter'; + $this->export_sql_end[$r] .=' AND f.entity = '.$conf->entity; + $r++; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Permissions + $this->remove(); + + $sql = array( + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->const[0][2]."' AND entity = ".$conf->entity, + "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->const[0][2]."','ficheinter',".$conf->entity.")", + ); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modLabel.class.php b/htdocs/includes/modules/modLabel.class.php index df0b374c026..45e81b5f7ec 100644 --- a/htdocs/includes/modules/modLabel.class.php +++ b/htdocs/includes/modules/modLabel.class.php @@ -1,124 +1,124 @@ - - * Copyright (C) 2008 Laurent Destailleur - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup label Module labels - * \version $Id$ - * \brief Module pour gerer les formats d'impression des etiquettes - */ - -/** - * \file htdocs/includes/modules/modLabel.class.php - * \ingroup other - * \brief Fichier de description et activation du module Label - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - \class modLabel - \brief Classe de description et activation du module Label - */ - -class modLabel extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modLabel($DB) - { - $this->db = $DB ; - $this->numero = 60 ; - - $this->family = "other"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des etiquettes"; - $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 2; - $this->picto='label'; - - // Data directories to create when module is enabled - $this->dirs = array("/label/temp"); - - // Dependancies - $this->depends = array(); - $this->requiredby = array(); - - // Config pages - $this->config_page_url = array("label.php"); - - // Constants - $this->const = array(); - - // Boxes - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'label'; - - $this->rights[1][0] = 601; // id de la permission - $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; - - $this->rights[2][0] = 602; // id de la permission - $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission - $this->rights[2][3] = 0; // La permission est-elle une permission par defaut - $this->rights[2][4] = 'creer'; - - $this->rights[4][0] = 609; // id de la permission - $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission - $this->rights[4][3] = 0; // La permission est-elle une permission par defaut - $this->rights[4][4] = 'supprimer'; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - // Permissions - $this->remove(); - - $sql = array(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2008 Laurent Destailleur + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup label Module labels + * \version $Id$ + * \brief Module pour gerer les formats d'impression des etiquettes + */ + +/** + * \file htdocs/includes/modules/modLabel.class.php + * \ingroup other + * \brief Fichier de description et activation du module Label + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + \class modLabel + \brief Classe de description et activation du module Label + */ + +class modLabel extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modLabel($DB) + { + $this->db = $DB ; + $this->numero = 60 ; + + $this->family = "other"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des etiquettes"; + $this->version = 'development'; // 'development' or 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 2; + $this->picto='label'; + + // Data directories to create when module is enabled + $this->dirs = array("/label/temp"); + + // Dependancies + $this->depends = array(); + $this->requiredby = array(); + + // Config pages + $this->config_page_url = array("label.php"); + + // Constants + $this->const = array(); + + // Boxes + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'label'; + + $this->rights[1][0] = 601; // id de la permission + $this->rights[1][1] = 'Lire les etiquettes'; // libelle de la permission + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 602; // id de la permission + $this->rights[2][1] = 'Creer/modifier les etiquettes'; // libelle de la permission + $this->rights[2][3] = 0; // La permission est-elle une permission par defaut + $this->rights[2][4] = 'creer'; + + $this->rights[4][0] = 609; // id de la permission + $this->rights[4][1] = 'Supprimer les etiquettes'; // libelle de la permission + $this->rights[4][3] = 0; // La permission est-elle une permission par defaut + $this->rights[4][4] = 'supprimer'; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + $sql = array(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modMailing.class.php b/htdocs/includes/modules/modMailing.class.php index 80690dd41ad..5b4bba60e78 100644 --- a/htdocs/includes/modules/modMailing.class.php +++ b/htdocs/includes/modules/modMailing.class.php @@ -1,132 +1,132 @@ - - * Copyright (C) 2005-2008 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \defgroup mailing Module emailing - * \brief Module to manage EMailings - * \version $Id$ - */ - -/** - * \file htdocs/includes/modules/modMailing.class.php - * \ingroup mailing - * \brief Fichier de description et activation du module Mailing - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - * \class modMailing - * \brief Classe de description et activation du module Mailing - */ -class modMailing extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modMailing($DB) - { - $this->db = $DB ; - $this->numero = 22 ; - - $this->family = "technic"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - $this->description = "Gestion des EMailings"; - $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto='email'; - - // Data directories to create when module is enabled - $this->dirs = array("/mailing/temp"); - - // Dependances - $this->depends = array(); - $this->requiredby = array(); - $this->langfiles = array("mails"); - - // Config pages - $this->config_page_url = array("mailing.php"); - - // Constantes - $this->const = array(); - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'mailing'; - - $this->rights[1][0] = 221; // id de la permission - $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission - $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) - $this->rights[1][3] = 1; // La permission est-elle une permission par defaut - $this->rights[1][4] = 'lire'; - - $this->rights[2][0] = 222; - $this->rights[2][1] = 'Creer/modifier les mailings (sujet, destinataires...)'; - $this->rights[2][2] = 'w'; - $this->rights[2][3] = 0; - $this->rights[2][4] = 'creer'; - - $this->rights[3][0] = 223; - $this->rights[3][1] = 'Valider les mailings (permet leur envoi)'; - $this->rights[3][2] = 'w'; - $this->rights[3][3] = 0; - $this->rights[3][4] = 'valider'; - - $this->rights[4][0] = 229; - $this->rights[4][1] = 'Supprimer les mailings)'; - $this->rights[4][2] = 'd'; - $this->rights[4][3] = 0; - $this->rights[4][4] = 'supprimer'; - - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - // Permissions - $this->remove(); - - return $this->_init($sql); - } - - /** - \brief Fonction appelee lors de la desactivation d'un module. - Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2005-2008 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** + * \defgroup mailing Module emailing + * \brief Module to manage EMailings + * \version $Id$ + */ + +/** + * \file htdocs/includes/modules/modMailing.class.php + * \ingroup mailing + * \brief Fichier de description et activation du module Mailing + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + * \class modMailing + * \brief Classe de description et activation du module Mailing + */ +class modMailing extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modMailing($DB) + { + $this->db = $DB ; + $this->numero = 22 ; + + $this->family = "technic"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + $this->description = "Gestion des EMailings"; + $this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto='email'; + + // Data directories to create when module is enabled + $this->dirs = array("/mailing/temp"); + + // Dependances + $this->depends = array(); + $this->requiredby = array(); + $this->langfiles = array("mails"); + + // Config pages + $this->config_page_url = array("mailing.php"); + + // Constantes + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'mailing'; + + $this->rights[1][0] = 221; // id de la permission + $this->rights[1][1] = 'Consulter les mailings'; // libelle de la permission + $this->rights[1][2] = 'r'; // type de la permission (deprecie a ce jour) + $this->rights[1][3] = 1; // La permission est-elle une permission par defaut + $this->rights[1][4] = 'lire'; + + $this->rights[2][0] = 222; + $this->rights[2][1] = 'Creer/modifier les mailings (sujet, destinataires...)'; + $this->rights[2][2] = 'w'; + $this->rights[2][3] = 0; + $this->rights[2][4] = 'creer'; + + $this->rights[3][0] = 223; + $this->rights[3][1] = 'Valider les mailings (permet leur envoi)'; + $this->rights[3][2] = 'w'; + $this->rights[3][3] = 0; + $this->rights[3][4] = 'valider'; + + $this->rights[4][0] = 229; + $this->rights[4][1] = 'Supprimer les mailings)'; + $this->rights[4][2] = 'd'; + $this->rights[4][3] = 0; + $this->rights[4][4] = 'supprimer'; + + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + // Permissions + $this->remove(); + + return $this->_init($sql); + } + + /** + \brief Fonction appelee lors de la desactivation d'un module. + Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/modTax.class.php b/htdocs/includes/modules/modTax.class.php index 5662e9071cd..335d2edc33e 100644 --- a/htdocs/includes/modules/modTax.class.php +++ b/htdocs/includes/modules/modTax.class.php @@ -1,169 +1,169 @@ - - * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2009 Regis Houssin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** \defgroup tax Module taxes - \brief Module pour inclure des fonctions de saisies des taxes (tva) et charges sociales - */ - -/** - * \file htdocs/includes/modules/modTax.class.php - * \ingroup tax - * \brief Fichier de description et activation du module Taxe - * \version $Id$ - */ - -include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); - - -/** - \class modTax - \brief Classe de description et activation du module Tax - */ -class modTax extends DolibarrModules -{ - - /** - * \brief Constructeur. Definit les noms, constantes et boites - * \param DB handler d'acces base - */ - function modTax($DB) - { - global $conf; - - $this->db = $DB ; - $this->numero = 500 ; - - $this->family = "financial"; - // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) - $this->name = preg_replace('/^mod/i','',get_class($this)); - // Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) - $this->description = "Gestion des taxes, charges sociales et dividendes"; - - // Possible values for version are: 'development', 'experimental', 'dolibarr' or version - $this->version = 'dolibarr'; - - $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); - $this->special = 0; - $this->picto='bill'; - - // Data directories to create when module is enabled - $this->dirs = array("/tax/temp"); - - // Config pages - $this->config_page_url = array("taxes.php"); - - // Dependances - $this->depends = array(); - $this->requiredby = array(); - $this->conflictwith = array(); - $this->langfiles = array("compta","bills"); - - // Constantes - $this->const = array(); - - // Boites - $this->boxes = array(); - - // Permissions - $this->rights = array(); - $this->rights_class = 'tax'; - $r=0; - - $r++; - $this->rights[$r][0] = 91; - $this->rights[$r][1] = 'Lire les charges'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'charges'; - $this->rights[$r][5] = 'lire'; - - $r++; - $this->rights[$r][0] = 92; - $this->rights[$r][1] = 'Creer/modifier les charges'; - $this->rights[$r][2] = 'w'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'charges'; - $this->rights[$r][5] = 'creer'; - - $r++; - $this->rights[$r][0] = 93; - $this->rights[$r][1] = 'Supprimer les charges'; - $this->rights[$r][2] = 'd'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'charges'; - $this->rights[$r][5] = 'supprimer'; - - $r++; - $this->rights[$r][0] = 94; - $this->rights[$r][1] = 'Exporter les charges'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'charges'; - $this->rights[$r][5] = 'export'; - - - // Exports - //-------- - $r=0; - - $r++; - $this->export_code[$r]=$this->rights_class.'_'.$r; - $this->export_label[$r]='Taxes et charges sociales, et leurs reglements'; - $this->export_permission[$r]=array(array("tax","charges","export")); - $this->export_fields_array[$r]=array('cc.libelle'=>"Type",'c.rowid'=>"IdSocialContribution",'c.libelle'=>"Label",'c.date_ech'=>'DateDue','c.periode'=>'Period','c.amount'=>"AmountExpected","c.paye"=>"Status",'p.rowid'=>'PaymentId','p.datep'=>'DatePayment','p.amount'=>'AmountPayment','p.num_paiement'=>'Numero'); - $this->export_entities_array[$r]=array('cc.libelle'=>"tax_type",'c.rowid'=>"tax",'c.libelle'=>'tax','c.date_ech'=>'tax','c.periode'=>'tax','c.amount'=>"tax","c.paye"=>"tax",'p.rowid'=>'payment','p.datep'=>'payment','p.amount'=>'payment','p.num_paiement'=>'payment'); - $this->export_alias_array[$r]=array('cc.libelle'=>"type",'c.rowid'=>"idsocialcontrib",'c.libelle'=>'label','c.date_ech'=>'datedue','c.periode'=>'period','c.amount'=>"amount_clamed","c.paye"=>"status",'p.rowid'=>'paymentid','p.datep'=>'date_payment','p.amount'=>'amount_payment','p.num_paiement'=>'num_payment'); - - $this->export_sql_start[$r]='SELECT DISTINCT '; - $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_chargesociales as cc, '.MAIN_DB_PREFIX.'chargesociales as c'; - $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementcharge as p ON p.fk_charge = c.rowid'; - $this->export_sql_end[$r] .=' WHERE c.fk_type = cc.id'; - $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; - } - - - /** - * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. - * Definit egalement les repertoires de donnees a creer pour ce module. - */ - function init() - { - global $conf; - - // Nettoyage avant activation - $this->remove(); - - return $this->_init($sql); - } - - /** - * \brief Fonction appelee lors de la desactivation d'un module. - * Supprime de la base les constantes, boites et permissions du module. - */ - function remove() - { - $sql = array(); - - return $this->_remove($sql); - } -} -?> + + * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2005-2009 Regis Houssin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/** \defgroup tax Module taxes + \brief Module pour inclure des fonctions de saisies des taxes (tva) et charges sociales + */ + +/** + * \file htdocs/includes/modules/modTax.class.php + * \ingroup tax + * \brief Fichier de description et activation du module Taxe + * \version $Id$ + */ + +include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php"); + + +/** + \class modTax + \brief Classe de description et activation du module Tax + */ +class modTax extends DolibarrModules +{ + + /** + * \brief Constructeur. Definit les noms, constantes et boites + * \param DB handler d'acces base + */ + function modTax($DB) + { + global $conf; + + $this->db = $DB ; + $this->numero = 500 ; + + $this->family = "financial"; + // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) + $this->name = preg_replace('/^mod/i','',get_class($this)); + // Module description used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) + $this->description = "Gestion des taxes, charges sociales et dividendes"; + + // Possible values for version are: 'development', 'experimental', 'dolibarr' or version + $this->version = 'dolibarr'; + + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); + $this->special = 0; + $this->picto='bill'; + + // Data directories to create when module is enabled + $this->dirs = array("/tax/temp"); + + // Config pages + $this->config_page_url = array("taxes.php"); + + // Dependances + $this->depends = array(); + $this->requiredby = array(); + $this->conflictwith = array(); + $this->langfiles = array("compta","bills"); + + // Constantes + $this->const = array(); + + // Boites + $this->boxes = array(); + + // Permissions + $this->rights = array(); + $this->rights_class = 'tax'; + $r=0; + + $r++; + $this->rights[$r][0] = 91; + $this->rights[$r][1] = 'Lire les charges'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 1; + $this->rights[$r][4] = 'charges'; + $this->rights[$r][5] = 'lire'; + + $r++; + $this->rights[$r][0] = 92; + $this->rights[$r][1] = 'Creer/modifier les charges'; + $this->rights[$r][2] = 'w'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'charges'; + $this->rights[$r][5] = 'creer'; + + $r++; + $this->rights[$r][0] = 93; + $this->rights[$r][1] = 'Supprimer les charges'; + $this->rights[$r][2] = 'd'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'charges'; + $this->rights[$r][5] = 'supprimer'; + + $r++; + $this->rights[$r][0] = 94; + $this->rights[$r][1] = 'Exporter les charges'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'charges'; + $this->rights[$r][5] = 'export'; + + + // Exports + //-------- + $r=0; + + $r++; + $this->export_code[$r]=$this->rights_class.'_'.$r; + $this->export_label[$r]='Taxes et charges sociales, et leurs reglements'; + $this->export_permission[$r]=array(array("tax","charges","export")); + $this->export_fields_array[$r]=array('cc.libelle'=>"Type",'c.rowid'=>"IdSocialContribution",'c.libelle'=>"Label",'c.date_ech'=>'DateDue','c.periode'=>'Period','c.amount'=>"AmountExpected","c.paye"=>"Status",'p.rowid'=>'PaymentId','p.datep'=>'DatePayment','p.amount'=>'AmountPayment','p.num_paiement'=>'Numero'); + $this->export_entities_array[$r]=array('cc.libelle'=>"tax_type",'c.rowid'=>"tax",'c.libelle'=>'tax','c.date_ech'=>'tax','c.periode'=>'tax','c.amount'=>"tax","c.paye"=>"tax",'p.rowid'=>'payment','p.datep'=>'payment','p.amount'=>'payment','p.num_paiement'=>'payment'); + $this->export_alias_array[$r]=array('cc.libelle'=>"type",'c.rowid'=>"idsocialcontrib",'c.libelle'=>'label','c.date_ech'=>'datedue','c.periode'=>'period','c.amount'=>"amount_clamed","c.paye"=>"status",'p.rowid'=>'paymentid','p.datep'=>'date_payment','p.amount'=>'amount_payment','p.num_paiement'=>'num_payment'); + + $this->export_sql_start[$r]='SELECT DISTINCT '; + $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'c_chargesociales as cc, '.MAIN_DB_PREFIX.'chargesociales as c'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'paiementcharge as p ON p.fk_charge = c.rowid'; + $this->export_sql_end[$r] .=' WHERE c.fk_type = cc.id'; + $this->export_sql_end[$r] .=' AND c.entity = '.$conf->entity; + } + + + /** + * \brief Fonction appelee lors de l'activation du module. Insere en base les constantes, boites, permissions du module. + * Definit egalement les repertoires de donnees a creer pour ce module. + */ + function init() + { + global $conf; + + // Nettoyage avant activation + $this->remove(); + + return $this->_init($sql); + } + + /** + * \brief Fonction appelee lors de la desactivation d'un module. + * Supprime de la base les constantes, boites et permissions du module. + */ + function remove() + { + $sql = array(); + + return $this->_remove($sql); + } +} +?> diff --git a/htdocs/includes/modules/rapport/pdf_paiement.class.php b/htdocs/includes/modules/rapport/pdf_paiement.class.php index 2875a974e90..1b3e1da2f49 100644 --- a/htdocs/includes/modules/rapport/pdf_paiement.class.php +++ b/htdocs/includes/modules/rapport/pdf_paiement.class.php @@ -141,11 +141,11 @@ class pdf_paiement $result = $this->db->query($sql); if ($result) { - $lines = $this->db->num_rows($result); + $lignes = $this->db->num_rows($result); $i = 0; $var=True; - while ($i < $lines) + while ($i < $lignes) { $objp = $this->db->fetch_object($result); $var=!$var; @@ -167,9 +167,9 @@ class pdf_paiement dol_print_error($this->db); } - $pages = intval($lines / $this->line_per_page); + $pages = intval($lignes / $this->line_per_page); - if (($lines % $this->line_per_page)>0) + if (($lignes % $this->line_per_page)>0) { $pages++; } diff --git a/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 67c654398db..45e71b25524 100755 --- a/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/includes/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -239,7 +239,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Unit price before discount $pdf->SetXY ($this->posxup, $curY); - $pdf->MultiCell(20, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0); + $pdf->MultiCell(18, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0); // Quantity $pdf->SetXY ($this->posxqty, $curY); @@ -529,7 +529,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxup-1, $tab_top+2); - $pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C'); + $pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C'); $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxqty-1, $tab_top+2); diff --git a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php index 91a9bc4f52c..7dfd7e5ccd8 100644 --- a/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/includes/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -249,7 +249,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Unit price before discount $pdf->SetXY ($this->posxup, $curY); - $pdf->MultiCell(20, 3, price($object->lines[$i]->subprice), 0, 'R', 0); + $pdf->MultiCell(18, 3, price($object->lines[$i]->subprice), 0, 'R', 0); // Quantity $pdf->SetXY ($this->posxqty, $curY); @@ -540,7 +540,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxup-1, $tab_top+2); - $pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C'); + $pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C'); $pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height); $pdf->SetXY ($this->posxqty-1, $tab_top+2); diff --git a/htdocs/includes/smarty/libs/plugins/function.fetch.php b/htdocs/includes/smarty/libs/plugins/function.fetch.php index c66ef3b01b7..374cd0a05a6 100644 --- a/htdocs/includes/smarty/libs/plugins/function.fetch.php +++ b/htdocs/includes/smarty/libs/plugins/function.fetch.php @@ -1,221 +1,221 @@ - - * Name: fetch
- * Purpose: fetch file, web or ftp data and display results - * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch} - * (Smarty online manual) - * @author Monte Ohrt - * @param array - * @param Smarty - * @return string|null if the assign parameter is passed, Smarty assigns the - * result to a template variable - */ -function smarty_function_fetch($params, &$smarty) -{ - if (empty($params['file'])) { - $smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty"); - return; - } - - $content = ''; - if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) { - $_params = array('resource_type' => 'file', 'resource_name' => $params['file']); - require_once(SMARTY_CORE_DIR . 'core.is_secure.php'); - if(!smarty_core_is_secure($_params, $smarty)) { - $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed'); - return; - } - - // fetch the file - if($fp = @fopen($params['file'],'r')) { - while(!feof($fp)) { - $content .= fgets ($fp,4096); - } - fclose($fp); - } else { - $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\''); - return; - } - } else { - // not a local file - if(preg_match('!^http://!i',$params['file'])) { - // http fetch - if($uri_parts = parse_url($params['file'])) { - // set defaults - $host = $server_name = $uri_parts['host']; - $timeout = 30; - $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; - $agent = "Smarty Template Engine ".$smarty->_version; - $referer = ""; - $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; - $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; - $_is_proxy = false; - if(empty($uri_parts['port'])) { - $port = 80; - } else { - $port = $uri_parts['port']; - } - if(!empty($uri_parts['user'])) { - $user = $uri_parts['user']; - } - if(!empty($uri_parts['pass'])) { - $pass = $uri_parts['pass']; - } - // loop through parameters, setup headers - foreach($params as $param_key => $param_value) { - switch($param_key) { - case "file": - case "assign": - case "assign_headers": - break; - case "user": - if(!empty($param_value)) { - $user = $param_value; - } - break; - case "pass": - if(!empty($param_value)) { - $pass = $param_value; - } - break; - case "accept": - if(!empty($param_value)) { - $accept = $param_value; - } - break; - case "header": - if(!empty($param_value)) { - if(!preg_match('![\w\d-]+: .+!',$param_value)) { - $smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'"); - return; - } else { - $extra_headers[] = $param_value; - } - } - break; - case "proxy_host": - if(!empty($param_value)) { - $proxy_host = $param_value; - } - break; - case "proxy_port": - if(!preg_match('!\D!', $param_value)) { - $proxy_port = (int) $param_value; - } else { - $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'"); - return; - } - break; - case "agent": - if(!empty($param_value)) { - $agent = $param_value; - } - break; - case "referer": - if(!empty($param_value)) { - $referer = $param_value; - } - break; - case "timeout": - if(!preg_match('!\D!', $param_value)) { - $timeout = (int) $param_value; - } else { - $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'"); - return; - } - break; - default: - $smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'"); - return; - } - } - if(!empty($proxy_host) && !empty($proxy_port)) { - $_is_proxy = true; - $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); - } else { - $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout); - } - - if(!$fp) { - $smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)"); - return; - } else { - if($_is_proxy) { - fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); - } else { - fputs($fp, "GET $uri HTTP/1.0\r\n"); - } - if(!empty($host)) { - fputs($fp, "Host: $host\r\n"); - } - if(!empty($accept)) { - fputs($fp, "Accept: $accept\r\n"); - } - if(!empty($agent)) { - fputs($fp, "User-Agent: $agent\r\n"); - } - if(!empty($referer)) { - fputs($fp, "Referer: $referer\r\n"); - } - if(isset($extra_headers) && is_array($extra_headers)) { - foreach($extra_headers as $curr_header) { - fputs($fp, $curr_header."\r\n"); - } - } - if(!empty($user) && !empty($pass)) { - fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); - } - - fputs($fp, "\r\n"); - while(!feof($fp)) { - $content .= fgets($fp,4096); - } - fclose($fp); - $csplit = explode("\r\n\r\n",$content,2); - - $content = $csplit[1]; - - if(!empty($params['assign_headers'])) { - $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0])); - } - } - } else { - $smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax"); - return; - } - } else { - // ftp fetch - if($fp = @fopen($params['file'],'r')) { - while(!feof($fp)) { - $content .= fgets ($fp,4096); - } - fclose($fp); - } else { - $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\''); - return; - } - } - - } - - - if (!empty($params['assign'])) { - $smarty->assign($params['assign'],$content); - } else { - return $content; - } -} - -/* vim: set expandtab: */ - -?> + + * Name: fetch
+ * Purpose: fetch file, web or ftp data and display results + * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch} + * (Smarty online manual) + * @author Monte Ohrt + * @param array + * @param Smarty + * @return string|null if the assign parameter is passed, Smarty assigns the + * result to a template variable + */ +function smarty_function_fetch($params, &$smarty) +{ + if (empty($params['file'])) { + $smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty"); + return; + } + + $content = ''; + if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) { + $_params = array('resource_type' => 'file', 'resource_name' => $params['file']); + require_once(SMARTY_CORE_DIR . 'core.is_secure.php'); + if(!smarty_core_is_secure($_params, $smarty)) { + $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed'); + return; + } + + // fetch the file + if($fp = @fopen($params['file'],'r')) { + while(!feof($fp)) { + $content .= fgets ($fp,4096); + } + fclose($fp); + } else { + $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\''); + return; + } + } else { + // not a local file + if(preg_match('!^http://!i',$params['file'])) { + // http fetch + if($uri_parts = parse_url($params['file'])) { + // set defaults + $host = $server_name = $uri_parts['host']; + $timeout = 30; + $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*"; + $agent = "Smarty Template Engine ".$smarty->_version; + $referer = ""; + $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/'; + $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : ''; + $_is_proxy = false; + if(empty($uri_parts['port'])) { + $port = 80; + } else { + $port = $uri_parts['port']; + } + if(!empty($uri_parts['user'])) { + $user = $uri_parts['user']; + } + if(!empty($uri_parts['pass'])) { + $pass = $uri_parts['pass']; + } + // loop through parameters, setup headers + foreach($params as $param_key => $param_value) { + switch($param_key) { + case "file": + case "assign": + case "assign_headers": + break; + case "user": + if(!empty($param_value)) { + $user = $param_value; + } + break; + case "pass": + if(!empty($param_value)) { + $pass = $param_value; + } + break; + case "accept": + if(!empty($param_value)) { + $accept = $param_value; + } + break; + case "header": + if(!empty($param_value)) { + if(!preg_match('![\w\d-]+: .+!',$param_value)) { + $smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'"); + return; + } else { + $extra_headers[] = $param_value; + } + } + break; + case "proxy_host": + if(!empty($param_value)) { + $proxy_host = $param_value; + } + break; + case "proxy_port": + if(!preg_match('!\D!', $param_value)) { + $proxy_port = (int) $param_value; + } else { + $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'"); + return; + } + break; + case "agent": + if(!empty($param_value)) { + $agent = $param_value; + } + break; + case "referer": + if(!empty($param_value)) { + $referer = $param_value; + } + break; + case "timeout": + if(!preg_match('!\D!', $param_value)) { + $timeout = (int) $param_value; + } else { + $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'"); + return; + } + break; + default: + $smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'"); + return; + } + } + if(!empty($proxy_host) && !empty($proxy_port)) { + $_is_proxy = true; + $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout); + } else { + $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout); + } + + if(!$fp) { + $smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)"); + return; + } else { + if($_is_proxy) { + fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n"); + } else { + fputs($fp, "GET $uri HTTP/1.0\r\n"); + } + if(!empty($host)) { + fputs($fp, "Host: $host\r\n"); + } + if(!empty($accept)) { + fputs($fp, "Accept: $accept\r\n"); + } + if(!empty($agent)) { + fputs($fp, "User-Agent: $agent\r\n"); + } + if(!empty($referer)) { + fputs($fp, "Referer: $referer\r\n"); + } + if(isset($extra_headers) && is_array($extra_headers)) { + foreach($extra_headers as $curr_header) { + fputs($fp, $curr_header."\r\n"); + } + } + if(!empty($user) && !empty($pass)) { + fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n"); + } + + fputs($fp, "\r\n"); + while(!feof($fp)) { + $content .= fgets($fp,4096); + } + fclose($fp); + $csplit = explode("\r\n\r\n",$content,2); + + $content = $csplit[1]; + + if(!empty($params['assign_headers'])) { + $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0])); + } + } + } else { + $smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax"); + return; + } + } else { + // ftp fetch + if($fp = @fopen($params['file'],'r')) { + while(!feof($fp)) { + $content .= fgets ($fp,4096); + } + fclose($fp); + } else { + $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\''); + return; + } + } + + } + + + if (!empty($params['assign'])) { + $smarty->assign($params['assign'],$content); + } else { + return $content; + } +} + +/* vim: set expandtab: */ + +?> diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index b48ef199c76..9372d1555df 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -25,12 +25,8 @@ create table llx_user rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, tms timestamp, - - login varchar(30) NOT NULL, -- user reference number - entity integer DEFAULT 1 NOT NULL, -- multi company id - - ref_ext varchar(30), -- reference into an external system (not used by dolibarr) - + login varchar(24) NOT NULL, + entity integer DEFAULT 1 NOT NULL, -- multi company id pass varchar(32), pass_crypted varchar(128), pass_temp varchar(32), -- temporary password when asked for forget password diff --git a/htdocs/lib/.cvsignore b/htdocs/lib/.cvsignore index 60dbf5fcb1a..6c8214fdbe2 100644 --- a/htdocs/lib/.cvsignore +++ b/htdocs/lib/.cvsignore @@ -1 +1 @@ -htmlMimeMail +htmlMimeMail diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index f9240f50a5f..a1c1b1aa864 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -372,7 +372,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass global $conf,$user; $outputlangs->load("dict"); - $line=''; + $ligne=''; // Line of free text if (! empty($conf->global->$paramfreetext)) @@ -387,92 +387,92 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass ); $newfreetext=make_substitutions($conf->global->$paramfreetext,$substitutionarray,$outputlangs,$object); - $line.=$outputlangs->convToOutputCharset($newfreetext); + $ligne.=$outputlangs->convToOutputCharset($newfreetext); } // First line of company infos // Juridical status - $line1=""; + $ligne1=""; if ($fromcompany->forme_juridique_code) { - $line1.=($line1?" - ":"").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); + $ligne1.=($ligne1?" - ":"").$outputlangs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); } // Capital if ($fromcompany->capital) { - $line1.=($line1?" - ":"").$outputlangs->transnoentities("CapitalOf",$fromcompany->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie); + $ligne1.=($ligne1?" - ":"").$outputlangs->transnoentities("CapitalOf",$fromcompany->capital)." ".$outputlangs->transnoentities("Currency".$conf->monnaie); } // Prof Id 1 if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2)) { $field=$outputlangs->transcountrynoentities("ProfId1",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line1.=($line1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1); + $ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof1); } // Prof Id 2 if ($fromcompany->idprof2) { $field=$outputlangs->transcountrynoentities("ProfId2",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line1.=($line1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2); + $ligne1.=($ligne1?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof2); } // Second line of company infos - $line2=""; + $ligne2=""; // Prof Id 3 if ($fromcompany->idprof3) { $field=$outputlangs->transcountrynoentities("ProfId3",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line2.=($line2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3); + $ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof3); } // Prof Id 4 if ($fromcompany->idprof4) { $field=$outputlangs->transcountrynoentities("ProfId4",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line2.=($line2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4); + $ligne2.=($ligne2?" - ":"").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof4); } // IntraCommunautary VAT if ($fromcompany->tva_intra != '') { - $line2.=($line2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra); + $ligne2.=($ligne2?" - ":"").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra); } $pdf->SetFont('','',7); $pdf->SetDrawColor(224,224,224); // On positionne le debut du bas de page selon nbre de lignes de ce bas de page - $nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output); - //print 'nbofline='.$nbofline; exit; - //print 'e'.$line.'t'.dol_nboflines($line);exit; - $posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0); + $nbofligne=dol_nboflines_bis($ligne,0,$outputlangs->charset_output); + //print 'nbofligne='.$nbofligne; exit; + //print 'e'.$ligne.'t'.dol_nboflines($ligne);exit; + $posy=$marge_basse + ($nbofligne*3) + ($ligne1?3:0) + ($ligne2?3:0); - if ($line) // Free text + if ($ligne) // Free text { $pdf->SetXY($marge_gauche,-$posy); $width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text. if ($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT) { $width=200; $align='C'; } - $pdf->MultiCell($width, 3, $line, 0, $align, 0); - $posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell + $pdf->MultiCell($width, 3, $ligne, 0, $align, 0); + $posy-=($nbofligne*3); // 6 of ligne + 3 of MultiCell } $pdf->SetY(-$posy); $pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy); $posy--; - if ($line1) + if ($ligne1) { $pdf->SetXY($marge_gauche,-$posy); - $pdf->MultiCell(200, 2, $line1, 0, 'C', 0); + $pdf->MultiCell(200, 2, $ligne1, 0, 'C', 0); } - if ($line2) + if ($ligne2) { $posy-=3; $pdf->SetXY($marge_gauche,-$posy); - $pdf->MultiCell(200, 2, $line2, 0, 'C', 0); + $pdf->MultiCell(200, 2, $ligne2, 0, 'C', 0); } // Show page nb only on iso languages diff --git a/htdocs/lib/viewfiles.lib.php b/htdocs/lib/viewfiles.lib.php index f444b9d0a96..a192a0ce1f5 100644 --- a/htdocs/lib/viewfiles.lib.php +++ b/htdocs/lib/viewfiles.lib.php @@ -53,13 +53,13 @@ function viewCsvFileContent($file_to_include='',$max_rows=0) $count = 0; print '
diff --git a/htdocs/core/class/actions_commonobject.class.php b/htdocs/core/class/actions_commonobject.class.php deleted file mode 100644 index d509cd7afd4..00000000000 --- a/htdocs/core/class/actions_commonobject.class.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - */ - -/** - * \file htdocs/core/class/actions_commonobject.class.php - * \ingroup core - * \brief Fichier de la classe mere des classes metiers (facture, contrat, propal, commande, etc...) - * \version $Id$ - */ - - -/** - * \class ActionsCommonObject - * \brief Classe mere pour heritage des classes metiers - */ - -class ActionsCommonObject -{ - var $db; - - // Instantiate hook classe of thirdparty module - var $hooks=array(); - - /** - * Constructeur de la classe - * @param DB Handler acces base de donnees - */ - function AnctionsCommonObject($DB) - { - $this->db = $DB; - } - - /** - * Return HTML table with origin title list - */ - function printOriginTitleList() - { - global $langs; - - print '
'.$langs->trans('Ref').''.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUHT').''.$langs->trans('Qty').''.$langs->trans('ReductionShort').'
'; - if (($line->info_bits & 2) == 2) - { - print ''; - print img_object($langs->trans("ShowReduc"),'reduc').' '.$langs->trans("Discount"); - print ''; - } - else if ($line->fk_product) - { - print ''; - print ($line->fk_product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product')); - print ' '.$line->ref.''; - print $line->label?' - '.$line->label:''; - // Dates - if ($date_start || $date_end) - { - print_date_range($date_start,$date_end); - } - } - else - { - print ($line->product_type == -1 ? ' ' : ($line->product_type == 1 ? img_object($langs->trans(''),'service') : img_object($langs->trans(''),'product'))); - print ($line->label ? ' '.$line->label : ''); - // Dates - if ($date_start || $date_end) - { - print_date_range($date_start,$date_end); - } - } - print "'; - if ($line->desc) - { - if ($line->desc == '(CREDIT_NOTE)') - { - $discount=new DiscountAbsolute($db); - $discount->fetch($line->fk_remise_except); - print $langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0)); - } - elseif ($line->desc == '(DEPOSIT)') - { - $discount=new DiscountAbsolute($db); - $discount->fetch($line->fk_remise_except); - print $langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0)); - } - else - { - print dol_trunc($line->desc,60); - } - } - else - { - print ' '; - } - print ''.vatrate($line->tva_tx).'%'.price($line->subprice).''; - print (($line->info_bits & 2) != 2) ? $line->qty : ' '; - print ''; - print (($line->info_bits & 2) != 2) ? $line->remise_percent.'%' : ' '; - print '
'; - for ($line = fgetcsv($fic, 1024); (!feof($fic) && (($max_rows > 0)?($count<=$max_rows):1==1)); $line = fgetcsv($fic, 1024)) + for ($ligne = fgetcsv($fic, 1024); (!feof($fic) && (($max_rows > 0)?($count<=$max_rows):1==1)); $ligne = fgetcsv($fic, 1024)) { print ''; - $j = sizeof($line); + $j = sizeof($ligne); for ($i = 0; $i < $j; $i++) { - print ''; + print ''; } print ''; $count++; diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 509642857aa..6d113735ab9 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -65,6 +65,7 @@ class Livraison extends CommonObject function Livraison($DB) { $this->db = $DB; + $this->lignes = array(); // TODO deprecated $this->lines = array(); $this->products = array(); @@ -136,19 +137,19 @@ class Livraison extends CommonObject { $commande = new Commande($this->db); $commande->id = $this->commande_id; - $this->lines = $commande->fetch_lines(); + $this->lignes = $commande->fetch_lines(); } /* * Insertion des produits dans la base */ - for ($i = 0 ; $i < sizeof($this->lines) ; $i++) + for ($i = 0 ; $i < sizeof($this->lignes) ; $i++) { - $origin_id=$this->lines[$i]->origin_line_id; - if (! $origin_id) $origin_id=$this->lines[$i]->commande_ligne_id; // For backward compatibility + $origin_id=$this->lignes[$i]->origin_line_id; + if (! $origin_id) $origin_id=$this->lignes[$i]->commande_ligne_id; // For backward compatibility - if (! $this->create_line(0, $origin_id, $this->lines[$i]->qty, $this->lines[$i]->fk_product, $this->lines[$i]->description)) + if (! $this->create_line(0, $origin_id, $this->lignes[$i]->qty, $this->lignes[$i]->fk_product, $this->lignes[$i]->description)) { $error++; } @@ -285,7 +286,7 @@ class Livraison extends CommonObject /* * Lignes */ - $result=$this->fetch_lines(); + $result=$this->fetch_lignes(); if ($result < 0) { return -3; @@ -490,19 +491,18 @@ class Livraison extends CommonObject $expedition = new Expedition($this->db); $result=$expedition->fetch($sending_id); - $this->lines = array(); + $this->lignes = array(); - for ($i = 0 ; $i < sizeof($expedition->lines) ; $i++) + for ($i = 0 ; $i < sizeof($expedition->lignes) ; $i++) { - $line = new LivraisonLigne($this->db); - $line->origin_line_id = $expedition->lines[$i]->origin_line_id; - $line->libelle = $expedition->lines[$i]->libelle; - $line->description = $expedition->lines[$i]->description; - $line->qty = $expedition->lines[$i]->qty_shipped; - $line->fk_product = $expedition->lines[$i]->fk_product; - $line->ref = $expedition->lines[$i]->ref; - - $this->lines[$i] = $line; + $LivraisonLigne = new LivraisonLigne($this->db); + $LivraisonLigne->origin_line_id = $expedition->lignes[$i]->origin_line_id; + $LivraisonLigne->libelle = $expedition->lignes[$i]->libelle; + $LivraisonLigne->description = $expedition->lignes[$i]->description; + $LivraisonLigne->qty = $expedition->lignes[$i]->qty_shipped; + $LivraisonLigne->fk_product = $expedition->lignes[$i]->fk_product; + $LivraisonLigne->ref = $expedition->lignes[$i]->ref; + $this->lignes[$i] = $LivraisonLigne; } $this->origin = $expedition->element; @@ -524,13 +524,13 @@ class Livraison extends CommonObject */ function addline( $id, $qty ) { - $num = sizeof($this->lines); - $line = new LivraisonLigne($this->db); + $num = sizeof($this->lignes); + $ligne = new LivraisonLigne($this->db); - $line->commande_ligne_id = $id; - $line->qty = $qty; + $ligne->commande_ligne_id = $id; + $ligne->qty = $qty; - $this->lines[$num] = $line; + $this->lignes[$num] = $ligne; } /** @@ -657,9 +657,9 @@ class Livraison extends CommonObject * * */ - function fetch_lines() + function fetch_lignes() { - $this->lines = array(); + $this->lignes = array(); $sql = "SELECT ld.rowid, ld.fk_product, ld.description, ld.subprice, ld.total_ht, ld.qty as qty_shipped,"; $sql.= " cd.qty as qty_asked,"; @@ -669,7 +669,7 @@ class Livraison extends CommonObject $sql.= " WHERE ld.fk_origin_line = cd.rowid"; $sql.= " AND ld.fk_livraison = ".$this->id; - dol_syslog("Livraison::fetch_lines sql=".$sql); + dol_syslog("Livraison::fetch_lignes sql=".$sql); $resql = $this->db->query($sql); if ($resql) { @@ -695,6 +695,7 @@ class Livraison extends CommonObject $line->price = $obj->price; $line->total_ht = $obj->total_ht; + $this->lignes[$i] = $line; // TODO deprecated $this->lines[$i] = $line; $i++; @@ -702,7 +703,7 @@ class Livraison extends CommonObject $this->db->free($resql); } - return $this->lines; + return $this->lignes; } @@ -781,17 +782,16 @@ class Livraison extends CommonObject $this->note_public='SPECIMEN'; $i=0; - $line=new LivraisonLigne($this->db); - $line->fk_product = $prodids[0]; - $line->qty_asked = 10; - $line->qty_shipped = 9; - $line->ref = 'REFPROD'; - $line->label = 'Specimen'; - $line->description = 'Description'; - $line->price = 100; - $line->total_ht = 100; - - $this->lines[$i] = $line; + $ligne=new LivraisonLigne($this->db); + $ligne->fk_product = $prodids[0]; + $ligne->qty_asked = 10; + $ligne->qty_shipped = 9; + $ligne->ref = 'REFPROD'; + $ligne->label = 'Specimen'; + $ligne->description = 'Description'; + $ligne->price = 100; + $ligne->total_ht = 100; + $this->lignes[$i] = $ligne; } /** diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php index c1a70a5a85d..2f46dedb3e9 100644 --- a/htdocs/livraison/fiche.php +++ b/htdocs/livraison/fiche.php @@ -268,12 +268,12 @@ if ($_GET["action"] == 'create') */ print '
'.$line[$i].''.$ligne[$i].'
'; - $lines = $commande->fetch_lines(1); + $lignes = $commande->fetch_lines(1); // Lecture des livraisons deja effectuees $commande->livraison_array(); - $num = sizeof($commande->lines); + $num = sizeof($commande->lignes); $i = 0; if ($num) @@ -294,34 +294,34 @@ if ($_GET["action"] == 'create') { $product = new Product($db); - $line = $commande->lines[$i]; + $ligne = $commande->lignes[$i]; $var=!$var; print "\n"; - if ($line->fk_product > 0) + if ($ligne->fk_product > 0) { - $product->fetch($line->fk_product); + $product->fetch($ligne->fk_product); $product->load_stock(); print ''; } else { - print "\n"; + print "\n"; } - print ''; + print ''; /* * */ print ''; - $quantite_commandee = $line->qty; + $quantite_commandee = $ligne->qty; $quantite_a_livrer = $quantite_commandee - $quantite_livree; if ($conf->stock->enabled) @@ -331,7 +331,7 @@ if ($_GET["action"] == 'create') // Quantite a livrer print ''; @@ -349,7 +349,7 @@ if ($_GET["action"] == 'create') { // Quantite a livrer print ''; } @@ -498,7 +498,7 @@ else * Lignes produits */ - $num_prod = sizeof($delivery->lines); + $num_prod = sizeof($delivery->lignes); $i = 0; $total = 0; print '
'; - print ''.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.' - '.$product->libelle; - if ($line->description) print nl2br($line->description); + print ''.img_object($langs->trans("ShowProduct"),"product").' '.$product->ref.' - '.$product->libelle; + if ($ligne->description) print nl2br($ligne->description); print '".nl2br($line->description)."".nl2br($ligne->description)."'.$line->qty.''.$ligne->qty.''; - $quantite_livree = $commande->livraisons[$line->id]; + $quantite_livree = $commande->livraisons[$ligne->id]; print $quantite_livree;; print ''; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; print '
'; @@ -519,40 +519,40 @@ else $var=!$var; print ""; - if ($delivery->lines[$i]->fk_product > 0) + if ($delivery->lignes[$i]->fk_product > 0) { $product = new Product($db); - $product->fetch($delivery->lines[$i]->fk_product); + $product->fetch($delivery->lignes[$i]->fk_product); print '\n"; } - print ''; - print ''; + print ''; + print ''; print ""; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 836706d652e..2a2c180feba 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -116,16 +116,16 @@ function analyse_sql_and_script(&$var,$get) analyse_sql_and_script($_GET,1); analyse_sql_and_script($_POST,0); -// This is to make Dolibarr working with Plesk. Does not work with IIS. -set_include_path((isset($_SERVER["DOCUMENT_ROOT"])?$_SERVER["DOCUMENT_ROOT"]:'.').'/htdocs'); +// This is to make Dolibarr working with Plesk +set_include_path($_SERVER['DOCUMENT_ROOT'].'/htdocs'); // Add real path in session name $realpath=''; if ( preg_match('/^([^.]+)\/htdocs\//i', realpath($_SERVER["SCRIPT_FILENAME"]), $regs)) $realpath = isset($regs[1])?$regs[1]:''; // Init session. Name of session is specific to Dolibarr instance. -$sessionname='DOLSESSID_'.md5($_SERVER["SERVER_NAME"].(isset($_SERVER["DOCUMENT_ROOT"])?$_SERVER["DOCUMENT_ROOT"]:'').$realpath); -$sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].(isset($_SERVER["DOCUMENT_ROOT"])?$_SERVER["DOCUMENT_ROOT"]:'').$realpath); +$sessionname='DOLSESSID_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath); +$sessiontimeout='DOLSESSTIMEOUT_'.md5($_SERVER["SERVER_NAME"].$_SERVER["DOCUMENT_ROOT"].$realpath); if (! empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime',$_COOKIE[$sessiontimeout]); session_name($sessionname); session_start(); diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 0c726232467..d3de81c67ee 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -101,10 +101,9 @@ if (empty($dolibarr_main_data_root)) } // Define some constants -define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem core php (htdocs) -define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem data (documents) -define('DOL_CLASS_PATH', 'class/'); // Filesystem path to class dir -define('DOL_CUSTOM_PATH', $dolibarr_main_document_root.'/custom'); // Filesystem path to custom dir +define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); // Filesystem pages php (htdocs) +define('DOL_DATA_ROOT', $dolibarr_main_data_root); // Filesystem donnes (documents) +define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir // If dolibarr_main_url_root = auto (Hidden feature for developers only), we try to forge it. if ($dolibarr_main_url_root == 'auto' && ! empty($_SERVER["SCRIPT_URL"]) && ! empty($_SERVER["SCRIPT_URI"])) { @@ -188,7 +187,7 @@ $conf->file->character_set_client=strtoupper($force_charset_do_notuse); $conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey; // Define array of document root directories -$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT, DOL_CUSTOM_PATH); +$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT); if (! empty($dolibarr_main_document_root_alt)) { // dolibarr_main_document_root_alt contains several directories diff --git a/htdocs/paybox/lib/paybox.lib.php b/htdocs/paybox/lib/paybox.lib.php index 66161f1a4a4..2a90ed791a9 100755 --- a/htdocs/paybox/lib/paybox.lib.php +++ b/htdocs/paybox/lib/paybox.lib.php @@ -242,58 +242,58 @@ function html_print_paybox_footer($fromcompany,$langs) global $conf; // Juridical status - $line1=""; + $ligne1=""; if ($fromcompany->forme_juridique_code) { - $line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); + $ligne1.=($ligne1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); } // Capital if ($fromcompany->capital) { - $line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie); + $ligne1.=($ligne1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie); } // Prof Id 1 if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2)) { $field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1); + $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1); } // Prof Id 2 if ($fromcompany->idprof2) { $field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2); + $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2); } // Second line of company infos - $line2=""; + $ligne2=""; // Prof Id 3 if ($fromcompany->idprof3) { $field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3); + $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3); } // Prof Id 4 if ($fromcompany->idprof4) { $field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4); + $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4); } // IntraCommunautary VAT if ($fromcompany->tva_intra != '') { - $line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra); + $ligne2.=($ligne2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra); } print '


'."\n"; print '
'."\n"; print $fromcompany->nom.'
'; - print $line1.'
'; - print $line2; + print $ligne1.'
'; + print $ligne2; print '
'."\n"; } diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 3a321b8f644..4bed91f60ca 100755 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -72,58 +72,58 @@ function html_print_paypal_footer($fromcompany,$langs) global $conf; // Juridical status - $line1=""; + $ligne1=""; if ($fromcompany->forme_juridique_code) { - $line1.=($line1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); + $ligne1.=($ligne1?" - ":"").$langs->convToOutputCharset(getFormeJuridiqueLabel($fromcompany->forme_juridique_code)); } // Capital if ($fromcompany->capital) { - $line1.=($line1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie); + $ligne1.=($ligne1?" - ":"").$langs->transnoentities("CapitalOf",$fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->monnaie); } // Prof Id 1 if ($fromcompany->idprof1 && ($fromcompany->pays_code != 'FR' || ! $fromcompany->idprof2)) { $field=$langs->transcountrynoentities("ProfId1",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1); + $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof1); } // Prof Id 2 if ($fromcompany->idprof2) { $field=$langs->transcountrynoentities("ProfId2",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line1.=($line1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2); + $ligne1.=($ligne1?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof2); } // Second line of company infos - $line2=""; + $ligne2=""; // Prof Id 3 if ($fromcompany->idprof3) { $field=$langs->transcountrynoentities("ProfId3",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3); + $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof3); } // Prof Id 4 if ($fromcompany->idprof4) { $field=$langs->transcountrynoentities("ProfId4",$fromcompany->pays_code); if (preg_match('/\((.*)\)/i',$field,$reg)) $field=$reg[1]; - $line2.=($line2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4); + $ligne2.=($ligne2?" - ":"").$field.": ".$langs->convToOutputCharset($fromcompany->idprof4); } // IntraCommunautary VAT if ($fromcompany->tva_intra != '') { - $line2.=($line2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra); + $ligne2.=($ligne2?" - ":"").$langs->transnoentities("VATIntraShort").": ".$langs->convToOutputCharset($fromcompany->tva_intra); } print '


'."\n"; print '
'."\n"; print $fromcompany->nom.'
'; - print $line1.'
'; - print $line2; + print $ligne1.'
'; + print $ligne2; print '
'."\n"; } diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 52af2e26ee8..2f530b8eac2 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -344,8 +344,8 @@ function llxHeaderVierge($title, $head = "") print "".$title."\n"; print ''."\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; print ''."\n"; if ($head) print $head."\n"; print '
'; // Affiche ligne produit - $text = ''; - if ($delivery->lines[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service'); + $text = ''; + if ($delivery->lignes[$i]->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service'); else $text.= img_object($langs->trans('ShowProduct'),'product'); - $text.= ' '.$delivery->lines[$i]->ref.''; - $text.= ' - '.$delivery->lines[$i]->label; - $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lines[$i]->description)); + $text.= ' '.$delivery->lignes[$i]->ref.''; + $text.= ' - '.$delivery->lignes[$i]->label; + $description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($delivery->lignes[$i]->description)); //print $description; print $html->textwithtooltip($text,$description,3,'','',$i); - print_date_range($delivery->lines[$i]->date_start,$delivery->lines[$i]->date_end); + print_date_range($delivery->lignes[$i]->date_start,$delivery->lignes[$i]->date_end); if ($conf->global->PRODUIT_DESC_IN_FORM) { - print ($delivery->lines[$i]->description && $delivery->lines[$i]->description!=$delivery->lines[$i]->label)?'
'.dol_htmlentitiesbr($delivery->lines[$i]->description):''; + print ($delivery->lignes[$i]->description && $delivery->lignes[$i]->description!=$delivery->lignes[$i]->label)?'
'.dol_htmlentitiesbr($delivery->lignes[$i]->description):''; } } else { print "
"; - if ($delivery->lines[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service'); + if ($delivery->lignes[$i]->fk_product_type==1) $text = img_object($langs->trans('Service'),'service'); else $text = img_object($langs->trans('Product'),'product'); - print $text.' '.nl2br($delivery->lines[$i]->description); + print $text.' '.nl2br($delivery->lignes[$i]->description); print_date_range($objp->date_start,$objp->date_end); print "'.$delivery->lines[$i]->qty_asked.''.$delivery->lines[$i]->qty_shipped.''.$delivery->lignes[$i]->qty_asked.''.$delivery->lignes[$i]->qty_shipped.'