Restore work lost by savannah backup

This commit is contained in:
Laurent Destailleur 2010-12-01 22:14:15 +00:00
parent 2e055c84c6
commit 29cc8b2fdc
17 changed files with 26877 additions and 24916 deletions

View File

@ -48,8 +48,9 @@ $langs->load('companies');
$langs->load('products'); $langs->load('products');
$langs->load('main'); $langs->load('main');
if (GETPOST('mesg','int',1) && isset($_SESSION['message'])) $mesg=$_SESSION['message'];
$sall=isset($_GET['sall'])?trim($_GET['sall']):trim($_POST['sall']); $sall=isset($_GET['sall'])?trim($_GET['sall']):trim($_POST['sall']);
$mesg=isset($_GET['mesg'])?$_GET['mesg']:'';
$projectid=isset($_GET['projectid'])?$_GET['projectid']:0; $projectid=isset($_GET['projectid'])?$_GET['projectid']:0;
// Security check // Security check
@ -607,7 +608,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
} }
} }
// Standard invoice or Deposit invoice created from a predefined invoice // Standard invoice or Deposit invoice created from a Predefined invoice
if (($_POST['type'] == 0 || $_POST['type'] == 3) && $_POST['fac_rec'] > 0) if (($_POST['type'] == 0 || $_POST['type'] == 3) && $_POST['fac_rec'] > 0)
{ {
$datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); $datefacture = dol_mktime(12, 0 , 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']);
@ -683,6 +684,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
$object->origin_id = $_POST['originid']; $object->origin_id = $_POST['originid'];
$facid = $object->create($user); $facid = $object->create($user);
if ($facid > 0) if ($facid > 0)
{ {
require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'); require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php');
@ -749,7 +751,6 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
$error++; $error++;
} }
} }
// If some invoice's lines already known // If some invoice's lines already known
else else
{ {
@ -1246,7 +1247,8 @@ if (($_POST['action'] == 'send' || $_POST['action'] == 'relance') && ! $_POST['a
{ {
// Redirect here // Redirect here
// This avoid sending mail twice if going out and then back to page // This avoid sending mail twice if going out and then back to page
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&mesg='.urlencode($mesg)); $_SESSION['message'] = $mesg;
Header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&mesg=1');
exit; exit;
} }
} }
@ -1356,11 +1358,11 @@ if ($_GET['action'] == 'create')
$soc = new Societe($db); $soc = new Societe($db);
if ($socid) $res=$soc->fetch($socid); if ($socid) $res=$soc->fetch($socid);
if ($_GET['origin'] && $_GET['originid']) if (GETPOST('origin') && GETPOST('originid'))
{ {
// Parse element/subelement (ex: project_task) // Parse element/subelement (ex: project_task)
$element = $subelement = $_GET['origin']; $element = $subelement = GETPOST('origin');
if (preg_match('/^([^_]+)_([^_]+)/i',$_GET['origin'],$regs)) if (preg_match('/^([^_]+)_([^_]+)/i',GETPOST('origin'),$regs))
{ {
$element = $regs[1]; $element = $regs[1];
$subelement = $regs[2]; $subelement = $regs[2];
@ -1368,7 +1370,7 @@ if ($_GET['action'] == 'create')
if ($element == 'project') if ($element == 'project')
{ {
$projectid=$_GET['originid']; $projectid=GETPOST('originid');
} }
else if (in_array($element,array('order','commande','propal','contrat','contract'))) else if (in_array($element,array('order','commande','propal','contrat','contract')))
{ {
@ -1380,7 +1382,7 @@ if ($_GET['action'] == 'create')
require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php'); require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/'.$subelement.'.class.php');
$classname = ucfirst($subelement); $classname = ucfirst($subelement);
$objectsrc = new $classname($db); $objectsrc = new $classname($db);
$objectsrc->fetch($_GET['originid']); $objectsrc->fetch(GETPOST('originid'));
$objectsrc->fetch_thirdparty(); $objectsrc->fetch_thirdparty();
$projectid = (!empty($objectsrc->fk_project)?$object->fk_project:''); $projectid = (!empty($objectsrc->fk_project)?$object->fk_project:'');
@ -1409,6 +1411,8 @@ if ($_GET['action'] == 'create')
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="socid" value="'.$soc->id.'">' ."\n"; print '<input type="hidden" name="socid" value="'.$soc->id.'">' ."\n";
print '<input name="facnumber" type="hidden" value="provisoire">'; print '<input name="facnumber" type="hidden" value="provisoire">';
print '<input type="hidden" name="origin" value="'.GETPOST('origin').'">';
print '<input type="hidden" name="originid" value="'.GETPOST('originid').'">';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -1752,9 +1756,10 @@ if ($_GET['action'] == 'create')
} }
// Bouton "Create Draft" // Bouton "Create Draft"
print '<tr><td colspan="3" align="center"><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></td></tr>';
print "</table>\n"; print "</table>\n";
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></center>';
print "</form>\n"; print "</form>\n";
// Try to read line from origin // Try to read line from origin
@ -2867,9 +2872,13 @@ else
} }
// Delete // Delete
if ($object->is_erasable() && $user->rights->facture->supprimer) if ($user->rights->facture->supprimer)
{ {
if ($objectidnext) if (! $object->is_erasable())
{
print '<a class="butActionRefused" href="#" title="'.$langs->trans("DisabledBecauseNotErasable").'">'.$langs->trans('Delete').'</a>';
}
else if ($objectidnext)
{ {
print '<a class="butActionRefused" href="#" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('Delete').'</a>'; print '<a class="butActionRefused" href="#" title="'.$langs->trans("DisabledBecauseReplacedInvoice").'">'.$langs->trans('Delete').'</a>';
} }
@ -2882,6 +2891,10 @@ else
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>'; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&amp;action=delete">'.$langs->trans('Delete').'</a>';
} }
} }
else
{
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans('Delete').'</a>';
}
print '</div>'; print '</div>';
} }

View File

@ -1,3 +1,140 @@
5.9.023 (2010-11-25)
- A potential bug on SVG transcoder was fixed.
5.9.022 (2010-11-21)
- Method ImageEPS includes support for EPS/AI Spot colors.
- Method ImageEPS includes a new parameter $fixoutvals to remove values outside the bounding box.
5.9.021 (2010-11-20)
- Support for custom bullet points images was added (check the example n.6)
- Examples n. 6 and 61 were update (check the comments inside).
5.9.020 (2010-11-19)
- A problem related to additional page when using multicolumn mode was fixed.
5.9.019 (2010-11-19)
- An SVG bug was fixed.
- ImageSVG() and ImageEPS() methods now accepts image data streams (put the string on the $file parameter preceded by '@' character).
- Option 'E' was added to the $dest parameter of Output() method to return the document as base64 mime multi-part email attachment (RFC 2045).
5.9.018 (2010-11-19)
- An SVG bug was fixed.
5.9.017 (2010-11-16)
- Tagline color was set to transparent.
- The method fixHTMLCode() was added to automatically clean up HTML code (requires HTML Tidy).
5.9.016 (2010-11-16)
- Bug item #3109705 "list item page break hanging bullet" was fixed.
5.9.015 (2010-11-16)
- Bug item affecting QRCode was fixed.
- Some bugs affecting HTML lists were fixed.
- ImageSVG() and fitBlock() methods were improved to handle some SVG problems.
- Some problems with PHP4 compatibility were fixed.
5.9.014 (2010-11-15)
- Bug item #3109464 "QRCode error" was fixed.
5.9.013 (2010-11-15)
- Bug item #3109257 "Problem with interlaced GIFs and PNGs" was fixed.
- Image function now accepts image data streams (check example n. 9).
5.9.012 (2010-11-12)
- Method getTCPDFVersion() was added.
- PDF_PRODUCER constant was removed.
- Method convertHTMLColorToDec() was improved.
- HTML colors now support spot color names defined on the new spotcolors.php file.
- The default method Header() was improved to support SVG and EPS/AI images.
- A bug on SVG importer was fixed.
5.9.011 (2010-11-02)
- Bug item #3101486 "Bug Fix for image loading" was fixed.
5.9.010 (2010-10-27)
- Support for CSS properties 'border-spacing' and 'padding' for tables were added.
- Several language files were added.
5.9.009 (2010-10-21)
- HTML text alignment was improved to include the case of RTL text on LTR direction and LTR text on RTL direction.
5.9.008 (2010-10-21)
- Bug item #3091502 "Bookmark oddity" was fixed.
- HTML internal links now accepts page number and Y position.
- The method write1DBarcode() was improved to accept separate horizontal and vertical padding (see example n. 27).
5.9.007 (2010-10-20)
- Method adjustCellPadding() was fixed to handle bad input.
5.9.006 (2010-10-19)
- Support for AES 256 bit encryption was added (see example n. 16).
- Method getNumLines() was fixed for the empty string case.
5.9.005 (2010-10-18)
- Method addPageRegion() was changed to accept regions starting exactly from the top of the page.
5.9.004 (2010-10-18)
- A bug related to annotations was fixed.
- The file unicode_data.php was canged to encapsulate all data in a class.
- The file htmlcolors.php was changed to remove the global variable.
5.9.003 (2010-10-15)
- Support for no-write page regions was added. Check the example n. 64 and new methods setPageRegions(), addPageRegion(), getPageRegions(), removePageRegion().
- A bug on Right-To-Left alignment was fixed.
5.9.002 (2010-10-08)
- Cell method was improved to preserve the font stretching and spacing values when using the $stretch parameter (see example n. 4).
5.9.001 (2010-10-07)
- The problem of blank page for nobr table higher than a single page was fixed.
5.9.000 (2010-10-06)
- Support for text stretching and spacing (kerning) was added, see example n. 63 and methods setFontStretching(), getFontStretching(), setFontSpacing(), getFontSpacing().
- Support for CSS properties 'font-stretch' and 'letter-spacing' was added (see example n. 63).
- The cMargin state was replaced by cell_padding array that can be set/get using setCellPadding() and getCellPadding() methods.
- Methods getCellPaddings() and setCellPaddings() were added to fine tune cell paddings (see example n. 5).
- Methods getCellMargins() and setCellMargins() were added to fine tune cell margins (see example n. 5).
- Method write1DBarcode() was improved to permit custom labels (see example n. 27).
- Method ImagePngAlpha() now includes support for ImageMagick to improve performances.
- XObject Template support was extended to support Multicell(), writeHTML() and writeHTMLCell() methods.
- The signature of getNumLines() and getStringHeight() methods is changed.
- Example n. 57 was updated.
// -------------------------------------------------------------------
5.8.034 (2010-09-27)
- A bug related to SetFont on XObject templates was fixed.
5.8.033 (2010-09-25)
- A problem with Footer() and multiple columns was fixed.
5.8.032 (2010-09-22)
- Bug #3073165 "Issues with changes to addHTMLVertSpace()" was fixed.
5.8.031 (2010-09-20)
- Bug #3071961 "Spaces in HTML" was fixed.
5.8.030 (2010-09-17)
- SVG support was improved and some bugs were fixed.
5.8.029 (2010-09-16)
- A problem with HTML borders was fixed.
5.8.028 (2010-09-13)
- Bug #3065224 "mcrypt_create_iv error on TCPDF 5.8.027 on PHP 5.3.2" was fixed.
5.8.027 (2010-09-13)
- Bug #3065118 "mcrypt_decrypt error on TCPDF 5.8.026 on PHP 5.3.2" was fixed.
5.8.026 (2010-09-13)
- A bug on addHTMLTOC() method was fixed. Note: be sure that the #TOC_PAGE_NUMBER# template has enough width to be printed correctly.
5.8.025 (2010-09-09)
- Bug #3062692 "Textarea inside a table" was fixed.
5.8.024 (2010-09-08)
- Bug #3062005 "Undefined variable: ann_obj_id" was fixed.
5.8.023 (2010-08-31) 5.8.023 (2010-08-31)
- Forms bug added on version 5.8.019 was fixed. - Forms bug added on version 5.8.019 was fixed.
@ -117,7 +254,7 @@
- CSS borders are now supported for HTML tables and other block tags (see example n. 61); - CSS borders are now supported for HTML tables and other block tags (see example n. 61);
- Cell borders were improved (see example n. 57); - Cell borders were improved (see example n. 57);
- Minor bugs were fixed. - Minor bugs were fixed.
encry
------------------------------------------------------------ ------------------------------------------------------------
5.6.000 (2010-07-31) 5.6.000 (2010-07-31)

View File

@ -5,7 +5,9 @@
TCPDF is free software: you can redistribute it and/or modify it TCPDF is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version. License, or (at your option) any later version. Additionally,
YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE
GENERATED PDF DOCUMENTS.
********************************************************************** **********************************************************************
********************************************************************** **********************************************************************

View File

@ -3,13 +3,13 @@ TCPDF - README
I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT. I WISH TO IMPROVE AND EXPAND TCPDF BUT I NEED YOUR SUPPORT.
PLEASE MAKE A DONATION: PLEASE MAKE A DONATION:
http: sourceforge.net/donate/index.php?group_id=128076 http://sourceforge.net/donate/index.php?group_id=128076
------------------------------------------------------------ ------------------------------------------------------------
Name: TCPDF Name: TCPDF
Version: 5.8.023 Version: 5.9.023
Release date: 2010-08-31 Release date: 2010-11-25
Author: Nicola Asuni Author: Nicola Asuni
Copyright (c) 2002-2010: Copyright (c) 2002-2010:
@ -39,20 +39,21 @@ Main Features:
* 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code, PDF417; * 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, QR-Code, PDF417;
* Grayscale, RGB, CMYK, Spot Colors and Transparencies; * Grayscale, RGB, CMYK, Spot Colors and Transparencies;
* automatic page header and footer management; * automatic page header and footer management;
* document encryption and digital signature certifications; * document encryption up to 256 bit and digital signature certifications;
* transactions to UNDO commands; * transactions to UNDO commands;
* PDF annotations, including links, text and file attachments; * PDF annotations, including links, text and file attachments;
* text rendering modes (fill, stroke and clipping); * text rendering modes (fill, stroke and clipping);
* multiple columns mode; * multiple columns mode;
* no-write page regions;
* bookmarks and table of content; * bookmarks and table of content;
* text hyphenation; * text hyphenation;
* text stretching and spacing (tracking/kerning);
* automatic page break, line break and text alignments including justification; * automatic page break, line break and text alignments including justification;
* automatic page numbering and page groups; * automatic page numbering and page groups;
* move and delete pages; * move and delete pages;
* page compression (requires php-zlib extension); * page compression (requires php-zlib extension);
* XOBject Templates; * XOBject Templates;
Installation (full instructions on http: www.tcpdf.org): Installation (full instructions on http: www.tcpdf.org):
1. copy the folder on your Web server 1. copy the folder on your Web server
2. set your installation path and other parameters on the config/tcpdf_config.php 2. set your installation path and other parameters on the config/tcpdf_config.php
@ -70,15 +71,18 @@ License
TCPDF is free software: you can redistribute it and/or modify it TCPDF is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version. License, or (at your option) any later version. Additionally,
YOU CAN'T REMOVE ANY TCPDF COPYRIGHT NOTICE OR LINK FROM THE
GENERATED PDF DOCUMENTS.
TCPDF is distributed in the hope that it will be useful, but TCPDF is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the License
along with TCPDF. If not, see <http://www.gnu.org/licenses/>. along with TCPDF. If not, see
<http://www.tecnick.com/pagefiles/tcpdf/LICENSE.TXT>.
See LICENSE.TXT file for more information. See LICENSE.TXT file for more information.

View File

@ -2,10 +2,11 @@
//============================================================+ //============================================================+
// File name : eng.php // File name : eng.php
// Begin : 2004-03-03 // Begin : 2004-03-03
// Last Update : 2010-08-08 // Last Update : 2010-10-26
// //
// Description : Language module for TCPDF // Description : Language module for TCPDF
// (contains translated texts) // (contains translated texts)
// Brazilian
// //
// Author: Nicola Asuni // Author: Nicola Asuni
// //
@ -22,15 +23,15 @@
/** /**
* TCPDF language file (contains translated texts). * TCPDF language file (contains translated texts).
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @abstract TCPDF language file. * @abstract TCPDF language file: Brazilian
* @author Nicola Asuni * @author Nicola Asuni
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2004-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @link http://tcpdf.sourceforge.net * @link http://tcpdf.sourceforge.net
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
* @since 2004-03-03 * @since 2004-03-03
*/ */
// ENGLISH // Brazilian
global $l; global $l;
$l = Array(); $l = Array();

View File

@ -2,10 +2,11 @@
//============================================================+ //============================================================+
// File name : eng.php // File name : eng.php
// Begin : 2004-03-03 // Begin : 2004-03-03
// Last Update : 2010-08-08 // Last Update : 2010-10-26
// //
// Description : Language module for TCPDF // Description : Language module for TCPDF
// (contains translated texts) // (contains translated texts)
// English
// //
// Author: Nicola Asuni // Author: Nicola Asuni
// //
@ -22,15 +23,15 @@
/** /**
* TCPDF language file (contains translated texts). * TCPDF language file (contains translated texts).
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @abstract TCPDF language file. * @abstract TCPDF language file: English
* @author Nicola Asuni * @author Nicola Asuni
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2004-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @link http://tcpdf.sourceforge.net * @link http://tcpdf.sourceforge.net
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
* @since 2004-03-03 * @since 2004-03-03
*/ */
// ENGLISH // English
global $l; global $l;
$l = Array(); $l = Array();

View File

@ -1,11 +1,12 @@
<?php <?php
//============================================================+ //============================================================+
// File name : eng.php // File name : ger.php
// Begin : 2004-03-03 // Begin : 2004-03-03
// Last Update : 2010-08-08 // Last Update : 2010-11-16
// //
// Description : Language module for TCPDF // Description : Language module for TCPDF
// (contains translated texts) // (contains translated texts)
// German
// //
// Author: Nicola Asuni // Author: Nicola Asuni
// //
@ -22,15 +23,15 @@
/** /**
* TCPDF language file (contains translated texts). * TCPDF language file (contains translated texts).
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @abstract TCPDF language file. * @abstract TCPDF language file: German
* @author Nicola Asuni * @author Nicola Asuni
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2004-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @link http://tcpdf.sourceforge.net * @link http://tcpdf.sourceforge.net
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
* @since 2004-03-03 * @since 2004-03-03
*/ */
// ENGLISH // German
global $l; global $l;
$l = Array(); $l = Array();
@ -42,7 +43,7 @@ $l['a_meta_dir'] = 'ltr';
$l['a_meta_language'] = 'de'; $l['a_meta_language'] = 'de';
// TRANSLATIONS -------------------------------------- // TRANSLATIONS --------------------------------------
$l['w_page'] = 'seite'; $l['w_page'] = 'Seite';
//============================================================+ //============================================================+
// END OF FILE // END OF FILE

View File

@ -2,10 +2,11 @@
//============================================================+ //============================================================+
// File name : ita.php // File name : ita.php
// Begin : 2004-03-03 // Begin : 2004-03-03
// Last Update : 2010-08-08 // Last Update : 2010-10-26
// //
// Description : Language module for TCPDF // Description : Language module for TCPDF
// (contains translated texts) // (contains translated texts)
// Italian
// //
// Author: Nicola Asuni // Author: Nicola Asuni
// //
@ -22,15 +23,15 @@
/** /**
* TCPDF language file (contains translated texts). * TCPDF language file (contains translated texts).
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
* @abstract TCPDF language file. * @abstract TCPDF language file: Italian
* @author Nicola Asuni * @author Nicola Asuni
* @copyright 2004-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2004-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @link http://tcpdf.sourceforge.net * @link http://tcpdf.sourceforge.net
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
* @since 2004-03-03 * @since 2004-03-03
*/ */
// ENGLISH // Italian
global $l; global $l;
$l = Array(); $l = Array();

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : htmlcolors.php // File name : htmlcolors.php
// Version : 1.0.006 // Version : 1.0.008
// Begin : 2002-04-09 // Begin : 2002-04-09
// Last Update : 2010-08-08 // Last Update : 2010-11-11
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -32,7 +32,7 @@
//============================================================+ //============================================================+
/** /**
* Array of WEB safe colors. * Array of WEB safe colors
* @author Nicola Asuni * @author Nicola Asuni
* @copyright 2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2002-2009 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
@ -44,7 +44,6 @@
/** /**
* Array of WEB safe colors * Array of WEB safe colors
*/ */
global $webcolor;
$webcolor = array ( $webcolor = array (
'aliceblue' => 'f0f8ff', 'aliceblue' => 'f0f8ff',
'antiquewhite' => 'faebd7', 'antiquewhite' => 'faebd7',

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : qrcode.php // File name : qrcode.php
// Version : 1.0.006 // Version : 1.0.008
// Begin : 2010-03-22 // Begin : 2010-03-22
// Last Update : 2010-08-30 // Last Update : 2010-11-15
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -79,7 +79,7 @@
* @copyright 2010-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2010-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @link http://www.tcpdf.org * @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL * @license http://www.gnu.org/copyleft/lesser.html LGPL
* @version 1.0.006 * @version 1.0.008
*/ */
// definitions // definitions
@ -1104,7 +1104,7 @@ if (!class_exists('QRcode', false)) {
for ($y=0; $y<$width; ++$y) { for ($y=0; $y<$width; ++$y) {
for ($x=0; $x<$width; ++$x) { for ($x=0; $x<$width; ++$x) {
if ($bitMask[$y][$x] == 1) { if ($bitMask[$y][$x] == 1) {
$d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); $d[$y][$x] = chr(ord($s[$y][$x]) ^ ((int)($bitMask[$y][$x])));
} }
$b += (int)(ord($d[$y][$x]) & 1); $b += (int)(ord($d[$y][$x]) & 1);
} }
@ -1352,7 +1352,7 @@ if (!class_exists('QRcode', false)) {
protected function eatAn() { protected function eatAn() {
$la = $this->lengthIndicator(QR_MODE_AN, $this->version); $la = $this->lengthIndicator(QR_MODE_AN, $this->version);
$ln = $this->lengthIndicator(QR_MODE_NM, $this->version); $ln = $this->lengthIndicator(QR_MODE_NM, $this->version);
$p = 0; $p =1 ;
while($this->isalnumat($this->dataStr, $p)) { while($this->isalnumat($this->dataStr, $p)) {
if ($this->isdigitat($this->dataStr, $p)) { if ($this->isdigitat($this->dataStr, $p)) {
$q = $p; $q = $p;
@ -1576,8 +1576,8 @@ if (!class_exists('QRcode', false)) {
$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02); $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 4, 0x02);
$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']); $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], $this->lengthIndicator(QR_MODE_AN, $version), $inputitem['size']);
for ($i=0; $i < $words; ++$i) { for ($i=0; $i < $words; ++$i) {
$val = (int)$this->lookAnTable(ord($inputitem['data'][$i*2 ])) * 45; $val = (int)($this->lookAnTable(ord($inputitem['data'][$i*2])) * 45);
$val += (int)$this->lookAnTable(ord($inputitem['data'][$i*2+1])); $val += (int)($this->lookAnTable(ord($inputitem['data'][($i*2)+1])));
$inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val); $inputitem['bstream'] = $this->appendNum($inputitem['bstream'], 11, $val);
} }
if ($inputitem['size'] & 1) { if ($inputitem['size'] & 1) {
@ -1703,7 +1703,10 @@ if (!class_exists('QRcode', false)) {
* *
*/ */
protected function appendNewInputItem($items, $mode, $size, $data) { protected function appendNewInputItem($items, $mode, $size, $data) {
$items[] = $this->newInputItem($mode, $size, $data); $newitem = $this->newInputItem($mode, $size, $data);
if (!empty($newitem)) {
$items[] = $newitem;
}
return $items; return $items;
} }
@ -1760,30 +1763,6 @@ if (!class_exists('QRcode', false)) {
return true; return true;
} }
/**
* estimateBitsModeNum
* @param int $size
* @return int number of bits
*/
protected function estimateBitsModeNum($size) {
$w = (int)$size / 3;
$bits = $w * 10;
switch($size - $w * 3) {
case 1: {
$bits += 4;
break;
}
case 2: {
$bits += 7;
break;
}
default: {
break;
}
}
return $bits;
}
/** /**
* Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19). * Look up the alphabet-numeric convesion table (see JIS X0510:2004, pp.19).
* @param int $c character value * @param int $c character value
@ -1808,14 +1787,34 @@ if (!class_exists('QRcode', false)) {
return true; return true;
} }
/**
* estimateBitsModeNum
* @param int $size
* @return int number of bits
*/
protected function estimateBitsModeNum($size) {
$w = (int)($size / 3);
$bits = ($w * 10);
switch($size - ($w * 3)) {
case 1: {
$bits += 4;
break;
}
case 2: {
$bits += 7;
break;
}
}
return $bits;
}
/** /**
* estimateBitsModeAn * estimateBitsModeAn
* @param int $size * @param int $size
* @return int number of bits * @return int number of bits
*/ */
protected function estimateBitsModeAn($size) { protected function estimateBitsModeAn($size) {
$w = (int)($size / 2); $bits = (int)($size * 5.5); // (size / 2 ) * 11
$bits = $w * 11;
if ($size & 1) { if ($size & 1) {
$bits += 6; $bits += 6;
} }
@ -1828,7 +1827,7 @@ if (!class_exists('QRcode', false)) {
* @return int number of bits * @return int number of bits
*/ */
protected function estimateBitsMode8($size) { protected function estimateBitsMode8($size) {
return $size * 8; return (int)($size * 8);
} }
/** /**
@ -1837,7 +1836,7 @@ if (!class_exists('QRcode', false)) {
* @return int number of bits * @return int number of bits
*/ */
protected function estimateBitsModeKanji($size) { protected function estimateBitsModeKanji($size) {
return (int)(($size / 2) * 13); return (int)($size * 6.5); // (size / 2 ) * 13
} }
/** /**
@ -2070,7 +2069,7 @@ if (!class_exists('QRcode', false)) {
$maxwords = $this->getDataLength($this->version, $this->level); $maxwords = $this->getDataLength($this->version, $this->level);
$maxbits = $maxwords * 8; $maxbits = $maxwords * 8;
if ($maxbits == $bits) { if ($maxbits == $bits) {
return 0; return $bstream;
} }
if ($maxbits - $bits < 5) { if ($maxbits - $bits < 5) {
return $this->appendNum($bstream, $maxbits - $bits, 0); return $this->appendNum($bstream, $maxbits - $bits, 0);

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,9 @@
<?php <?php
//============================================================+ //============================================================+
// File name : unicode_data.php // File name : unicode_data.php
// Version : 1.0.005 // Version : 1.0.006
// Begin : 2008-01-01 // Begin : 2008-01-01
// Last Update : 2010-08-08 // Last Update : 2010-10-18
// Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com // Author : Nicola Asuni - Tecnick.com S.r.l - Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) // License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html)
// ------------------------------------------------------------------- // -------------------------------------------------------------------
@ -35,7 +35,7 @@
// Saleh AlMatrafe // Saleh AlMatrafe
/** /**
* Unicode data for TCPDF library. * Unicode data class for TCPDF library.
* @author Nicola Asuni * @author Nicola Asuni
* @copyright 2008-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com * @copyright 2008-2010 Nicola Asuni - Tecnick.com S.r.l (www.tecnick.com) Via Della Pace, 11 - 09044 - Quartucciu (CA) - ITALY - www.tecnick.com - info@tecnick.com
* @package com.tecnick.tcpdf * @package com.tecnick.tcpdf
@ -45,38 +45,63 @@
*/ */
/** /**
* Left-to-Right Mark * This is a PHP class containing Unicde data for TCPDF library
* @name TCPDF_UNICODE_DATA
* @package com.tecnick.tcpdf
* @version 1.0.006
* @author Nicola Asuni - info@tecnick.com
* @link http://www.tcpdf.org
* @license http://www.gnu.org/copyleft/lesser.html LGPL
*/ */
define('K_LRM', 8206); class TCPDF_UNICODE_DATA {
/** /**
* Right-to-Left Mark * @var Unicode code for Left-to-Right Mark
*/ * @access public
define('K_RLM', 8207); */
public $uni_LRM = 8206;
/** /**
* Left-to-Right Embedding * @var Unicode code for Right-to-Left Mark
*/ * @access public
define('K_LRE', 8234); */
public $uni_RLM = 8207;
/** /**
* Right-to-Left Embedding * @var Unicode code for Left-to-Right Embedding
*/ * @access public
define('K_RLE', 8235); */
public $uni_LRE = 8234;
/** /**
* Pop Directional Format * @var Unicode code for Right-to-Left Embedding
*/ * @access public
define('K_PDF', 8236); */
public $uni_RLE = 8235;
/** /**
* Left-to-Right Override * @var Unicode code for Pop Directional Format
*/ * @access public
define('K_LRO', 8237); */
public $uni_PDF = 8236;
/** /**
* Right-to-Left Override * @var Unicode code for Left-to-Right Override
*/ * @access public
define('K_RLO', 8238); */
public $uni_LRO = 8237;
/**
* @var Unicode code for Right-to-Left Override
* @access public
*/
public $uni_RLO = 8238;
/* /*
* Pattern to test RTL (Righ-To-Left) strings using regular expressions. * @var Pattern to test RTL (Righ-To-Left) strings using regular expressions.
* @access public
*/ */
define('K_RE_PATTERN_RTL', "/( public $uni_RE_PATTERN_RTL = "/(
\xD6\xBE # R \xD6\xBE # R
| \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4] # R | \xD7[\x80\x83\x86\x90-\xAA\xB0-\xB4] # R
| \xDF[\x80-\xAA\xB4\xB5\xBA] # R | \xDF[\x80-\xAA\xB4\xB5\xBA] # R
@ -88,13 +113,14 @@ define('K_RE_PATTERN_RTL', "/(
| \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3] # R | \xF0\x90\xA8[\x80\x90-\x93\x95-\x97\x99-\xB3] # R
| \xF0\x90\xA9[\x80-\x87\x90-\x98] # R | \xF0\x90\xA9[\x80-\x87\x90-\x98] # R
| \xE2\x80[\xAB\xAE] # RLE & RLO | \xE2\x80[\xAB\xAE] # RLE & RLO
)/x"); )/x";
/* /*
* Pattern to test Arabic strings using regular expressions. * @var Pattern to test Arabic strings using regular expressions.
* source: http://www.w3.org/International/questions/qa-forms-utf-8 * Source: http://www.w3.org/International/questions/qa-forms-utf-8
* @access public
*/ */
define("K_RE_PATTERN_ARABIC", "/( public $uni_RE_PATTERN_ARABIC = "/(
\xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA] # AL \xD8[\x80-\x83\x8B\x8D\x9B\x9E\x9F\xA1-\xBA] # AL
| \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF] # AL | \xD9[\x80-\x8A\xAD-\xAF\xB1-\xBF] # AL
| \xDA[\x80-\xBF] # AL | \xDA[\x80-\xBF] # AL
@ -114,13 +140,13 @@ define("K_RE_PATTERN_ARABIC", "/(
| \xEF\xBA[\x80-\xBF] # AL | \xEF\xBA[\x80-\xBF] # AL
| \xEF\xBB[\x80-\xBC] # AL | \xEF\xBB[\x80-\xBC] # AL
| \xD9[\xA0-\xA9\xAB\xAC] # AN | \xD9[\xA0-\xA9\xAB\xAC] # AN
)/x"); )/x";
/** /**
* Array of unicode types * @var Array of Unicode types
* @access public
*/ */
global $unicode; public $uni_type = array(
$unicode = array(
0=>'BN', 0=>'BN',
1=>'BN', 1=>'BN',
2=>'BN', 2=>'BN',
@ -17844,12 +17870,12 @@ $unicode = array(
); );
/** /**
* Mirror unicode characters. * @var Mirror unicode characters.
* For information on bidi mirroring, see UAX #9: Bidirectional Algorithm, * For information on bidi mirroring, see UAX #9: Bidirectional Algorithm,
* at http://www.unicode.org/unicode/reports/tr9/ * at http://www.unicode.org/unicode/reports/tr9/
* @access public
*/ */
global $unicode_mirror; public $uni_mirror = array (
$unicode_mirror = array (
0x0028=>0x0029, 0x0028=>0x0029,
0x0029=>0x0028, 0x0029=>0x0028,
0x003C=>0x003E, 0x003C=>0x003E,
@ -18204,11 +18230,10 @@ $unicode_mirror = array (
0xFF63=>0xFF62); 0xFF63=>0xFF62);
/** /**
* Arabic shape subtitutions * @var Arabic shape substitutions: char code => (isolated, final, initial, medial)
* char code=>isolated, final, initial, medial * @access public
*/ */
global $unicode_arlet; public $uni_arabicsubst = array(
$unicode_arlet = array(
1569=>array(65152), 1569=>array(65152),
1570=>array(65153, 65154, 65153, 65154), 1570=>array(65153, 65154, 65153, 65154),
1571=>array(65155, 65156, 65155, 65156), 1571=>array(65155, 65156, 65155, 65156),
@ -18288,11 +18313,10 @@ $unicode_arlet = array(
); );
/** /**
* Arabic laa letter * @var Arabic laa letter: char code => isolated, final, initial, medial
* char code=>isolated, final, initial, medial * @access public
*/ */
global $laa_array; public $uni_laa_array = array (
$laa_array = array (
1570 =>array(65269, 65270, 65269, 65270), 1570 =>array(65269, 65270, 65269, 65270),
1571 =>array(65271, 65272, 65271, 65272), 1571 =>array(65271, 65272, 65271, 65272),
1573 =>array(65273, 65274, 65273, 65274), 1573 =>array(65273, 65274, 65273, 65274),
@ -18300,12 +18324,12 @@ $laa_array = array (
); );
/** /**
* Array of character substitutions for sequences of two diacritics symbols. * @var Array of character substitutions for sequences of two diacritics symbols.
* Putting the combining mark and character in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner. * Putting the combining mark and character in the same glyph allows us to avoid the two marks overlapping each other in an illegible manner.
* second NSM char code=>substitution char * second NSM char code => substitution char
* @access public
*/ */
global $diacritics; public $uni_diacritics = array (
$diacritics = array (
1612=>64606, # Shadda + Dammatan 1612=>64606, # Shadda + Dammatan
1613=>64607, # Shadda + Kasratan 1613=>64607, # Shadda + Kasratan
1614=>64608, # Shadda + Fatha 1614=>64608, # Shadda + Fatha
@ -18314,10 +18338,10 @@ $diacritics = array (
); );
/** /**
* Array of character substitutions from UTF-8 unicode to latin1 * @var Array of character substitutions from UTF-8 Unicode to Latin1
* @access public
*/ */
global $utf8tolatin; public $uni_utf8tolatin = array (
$utf8tolatin = array (
8364=>128, # Euro1 8364=>128, # Euro1
338=>140, # OE 338=>140, # OE
352=>138, # Scaron 352=>138, # Scaron
@ -18347,6 +18371,8 @@ $utf8tolatin = array (
382=>158 # zcaron2 382=>158 # zcaron2
); );
} // --- END OF CLASS ---
//============================================================+ //============================================================+
// END OF FILE // END OF FILE
//============================================================+ //============================================================+