Merge remote-tracking branch 'origin/3.3' into develop
Conflicts: htdocs/core/tpl/freeproductline_create.tpl.php htdocs/core/tpl/predefinedproductline_create.tpl.php
This commit is contained in:
commit
29e6d01e51
@ -60,7 +60,7 @@ For users:
|
|||||||
- New: [ task #210 ] Can choose cash account during POS login.
|
- New: [ task #210 ] Can choose cash account during POS login.
|
||||||
- New: [ task #104 ] Can create an invoice from several orders.
|
- New: [ task #104 ] Can create an invoice from several orders.
|
||||||
- New: Update libs/tools/logo for DoliWamp (now use PHP 5.3).
|
- New: Update libs/tools/logo for DoliWamp (now use PHP 5.3).
|
||||||
- New: Added ODT Template tag {object_total_discount}
|
- New: Added ODT Template tag {object_total_discount_ht}
|
||||||
- New: Add new import options: Third parties bank details, warehouses and stocks, categories and suppliers prices
|
- New: Add new import options: Third parties bank details, warehouses and stocks, categories and suppliers prices
|
||||||
- New: English bank account need a bank code (called sort code) to identify an account.
|
- New: English bank account need a bank code (called sort code) to identify an account.
|
||||||
- New: Can choose menu entry to show with external site module.
|
- New: Can choose menu entry to show with external site module.
|
||||||
|
|||||||
@ -28,7 +28,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -423,7 +423,7 @@ class Adherent extends CommonObject
|
|||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||||
$sql.= " civilite = ".($this->civilite_id?"'".$this->civilite_id."'":"null");
|
$sql.= " civilite = ".(!is_null($this->civilite_id)?"'".$this->civilite_id."'":"null");
|
||||||
$sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
|
$sql.= ", prenom = ".($this->firstname?"'".$this->db->escape($this->firstname)."'":"null");
|
||||||
$sql.= ", nom=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
|
$sql.= ", nom=" .($this->lastname?"'".$this->db->escape($this->lastname)."'":"null");
|
||||||
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
|
$sql.= ", login=" .($this->login?"'".$this->db->escape($this->login)."'":"null");
|
||||||
|
|||||||
@ -85,9 +85,9 @@ if ($id || $ref)
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user,$objecttype,$objectid,$dbtablename,'','',$fieldid);
|
$result = restrictedArea($user,$objecttype,$objectid,$dbtablename,'','',$fieldid);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
$hookmanager->initHooks(array('categorycard'));
|
$hookmanager->initHooks(array('categorycard'));
|
||||||
|
|
||||||
|
|
||||||
@ -95,9 +95,9 @@ $hookmanager->initHooks(array('categorycard'));
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$parameters=array('id'=>$socid);
|
$parameters=array('id'=>$socid);
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -555,7 +555,13 @@ if ($action == 'create')
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print $form->select_company('','socid','',1,1);
|
//For external user force the company to user company
|
||||||
|
if (!empty($user->societe_id)) {
|
||||||
|
print $form->select_company($user->societe_id,'socid','',1,1);
|
||||||
|
} else {
|
||||||
|
print $form->select_company('','socid','',1,1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
|||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
$langs->load('withdrawals');
|
||||||
|
|
||||||
// Securite acces client
|
// Securite acces client
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
|
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
$langs->load('withdrawals');
|
||||||
|
|
||||||
// Securite acces client
|
// Securite acces client
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@ -130,7 +130,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
|
|||||||
$bon = new BonPrelevement($db,"");
|
$bon = new BonPrelevement($db,"");
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
llxHeader('',$langs->trans("WithdrawalReceipts"));
|
llxHeader('',$langs->trans("WithdrawalReceipt"));
|
||||||
|
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
@ -138,7 +138,7 @@ if ($id > 0)
|
|||||||
$bon->fetch($id);
|
$bon->fetch($id);
|
||||||
|
|
||||||
$head = prelevement_prepare_head($bon);
|
$head = prelevement_prepare_head($bon);
|
||||||
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipts"), '', 'payment');
|
dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment');
|
||||||
|
|
||||||
if (GETPOST('error','alpha')!='')
|
if (GETPOST('error','alpha')!='')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
|||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
$langs->load('withdrawals');
|
||||||
|
|
||||||
// Get supervariables
|
// Get supervariables
|
||||||
$prev_id = GETPOST('id','int');
|
$prev_id = GETPOST('id','int');
|
||||||
|
|||||||
@ -2253,24 +2253,43 @@ abstract class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function that returns the total amount of discounts applied.
|
* Function that returns the total amount HT of discounts applied for all lines.
|
||||||
*
|
*
|
||||||
* @return false|float False is returned if the discount couldn't be retrieved
|
* @return float
|
||||||
*/
|
*/
|
||||||
function getTotalDiscount()
|
function getTotalDiscount()
|
||||||
{
|
{
|
||||||
$sql = 'SELECT (SUM(`subprice`) - SUM(`total_ht`)) as `discount` FROM '.MAIN_DB_PREFIX.$this->table_element.'det WHERE `'.$this->fk_element.'` = '.$this->id;
|
$total_discount=0.00;
|
||||||
|
|
||||||
$query = $this->db->query($sql);
|
$sql = "SELECT subprice as pu_ht, qty, remise_percent, total_ht";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element."det";
|
||||||
|
$sql.= " WHERE ".$this->fk_element." = ".$this->id;
|
||||||
|
|
||||||
if ($query)
|
dol_syslog(get_class($this).'::getTotalDiscount sql='.$sql);
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
{
|
{
|
||||||
$result = $this->db->fetch_object($query);
|
$num=$this->db->num_rows($resql);
|
||||||
|
$i=0;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($query);
|
||||||
|
|
||||||
return price2num($result->discount);
|
$pu_ht = $obj->pu_ht;
|
||||||
|
$qty= $obj->qty;
|
||||||
|
$discount_percent_line = $obj->remise_percent;
|
||||||
|
$total_ht = $obj->total_ht;
|
||||||
|
|
||||||
|
$total_discount_line = price2num(($pu_ht * $qty) - $total_ht, 'MT');
|
||||||
|
$total_discount += $total_discount_line;
|
||||||
|
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else dol_syslog(get_class($this).'::getTotalDiscount '.$this->db->lasterror(), LOG_ERR);
|
||||||
return false;
|
|
||||||
|
//print $total_discount; exit;
|
||||||
|
return price2num($total_discount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2313,7 +2332,7 @@ abstract class CommonObject
|
|||||||
function isInEEC()
|
function isInEEC()
|
||||||
{
|
{
|
||||||
// List of all country codes that are in europe for european vat rules
|
// List of all country codes that are in europe for european vat rules
|
||||||
// List found on http://ec.europa.eu/taxation_customs/vies/lang.do?fromWhichPage=vieshome
|
// List found on http://ec.europa.eu/taxation_customs/common/faq/faq_1179_en.htm#9
|
||||||
$country_code_in_EEC=array(
|
$country_code_in_EEC=array(
|
||||||
'AT', // Austria
|
'AT', // Austria
|
||||||
'BE', // Belgium
|
'BE', // Belgium
|
||||||
@ -2326,16 +2345,17 @@ abstract class CommonObject
|
|||||||
'ES', // Spain
|
'ES', // Spain
|
||||||
'FI', // Finland
|
'FI', // Finland
|
||||||
'FR', // France
|
'FR', // France
|
||||||
'GB', // Royaume-uni
|
'GB', // United Kingdom
|
||||||
'GR', // Greece
|
'GR', // Greece
|
||||||
'NL', // Holland
|
'NL', // Holland
|
||||||
'HU', // Hungary
|
'HU', // Hungary
|
||||||
'IE', // Ireland
|
'IE', // Ireland
|
||||||
|
'IM', // Isle of Man - Included in UK
|
||||||
'IT', // Italy
|
'IT', // Italy
|
||||||
'LT', // Lithuania
|
'LT', // Lithuania
|
||||||
'LU', // Luxembourg
|
'LU', // Luxembourg
|
||||||
'LV', // Latvia
|
'LV', // Latvia
|
||||||
'MC', // Monaco Seems to use same IntraVAT than France (http://www.gouv.mc/devwww/wwwnew.nsf/c3241c4782f528bdc1256d52004f970b/9e370807042516a5c1256f81003f5bb3!OpenDocument)
|
'MC', // Monaco - Included in France
|
||||||
'MT', // Malta
|
'MT', // Malta
|
||||||
//'NO', // Norway
|
//'NO', // Norway
|
||||||
'PL', // Poland
|
'PL', // Poland
|
||||||
|
|||||||
@ -3181,19 +3181,19 @@ class Form
|
|||||||
//print "name=$name, selectedrate=$selectedrate, seller=".$societe_vendeuse->country_code." buyer=".$societe_acheteuse->country_code." buyer is company=".$societe_acheteuse->isACompany()." idprod=$idprod, info_bits=$info_bits type=$type";
|
//print "name=$name, selectedrate=$selectedrate, seller=".$societe_vendeuse->country_code." buyer=".$societe_acheteuse->country_code." buyer is company=".$societe_acheteuse->isACompany()." idprod=$idprod, info_bits=$info_bits type=$type";
|
||||||
//exit;
|
//exit;
|
||||||
|
|
||||||
// Get list of all VAT rates to show
|
// Define list of countries to use to search VAT rates to show
|
||||||
// First we defined code_pays to use to find list
|
// First we defined code_pays to use to find list
|
||||||
if (is_object($societe_vendeuse))
|
if (is_object($societe_vendeuse))
|
||||||
{
|
{
|
||||||
$code_pays="'".$societe_vendeuse->country_code."'";
|
$code_pays="'".$societe_vendeuse->country_code."'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$code_pays="'".$mysoc->country_code."'"; // Pour compatibilite ascendente
|
$code_pays="'".$mysoc->country_code."'"; // Pour compatibilite ascendente
|
||||||
}
|
}
|
||||||
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on
|
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on
|
||||||
{
|
{
|
||||||
if (! $societe_vendeuse->isInEEC() && $societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())
|
if (! $societe_vendeuse->isInEEC() && (! is_object($societe_acheteuse) || ($societe_acheteuse->isInEEC() && ! $societe_acheteuse->isACompany())))
|
||||||
{
|
{
|
||||||
// We also add the buyer
|
// We also add the buyer
|
||||||
if (is_numeric($type))
|
if (is_numeric($type))
|
||||||
|
|||||||
@ -120,6 +120,7 @@ class FormFile
|
|||||||
{
|
{
|
||||||
if ($perm)
|
if ($perm)
|
||||||
{
|
{
|
||||||
|
$langs->load('other');
|
||||||
print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
|
print ' ('.$langs->trans("MaxSize").': '.$max.' '.$langs->trans("Kb");
|
||||||
print ' '.info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
|
print ' '.info_admin($langs->trans("ThisLimitIsDefinedInSetup",$max,$maxphp),1);
|
||||||
print ')';
|
print ')';
|
||||||
|
|||||||
@ -2921,6 +2921,18 @@ function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr
|
|||||||
|
|
||||||
dol_syslog("get_default_tva: seller use vat=".$thirdparty_seller->tva_assuj.", seller country=".$thirdparty_seller->country_code.", seller in cee=".$thirdparty_seller->isInEEC().", buyer country=".$thirdparty_buyer->country_code.", buyer in cee=".$thirdparty_buyer->isInEEC().", idprod=".$idprod.", idprodfournprice=".$idprodfournprice.", SERVICE_ARE_ECOMMERCE_200238EC=".(! empty($conf->global->SERVICES_ARE_ECOMMERCE_200238EC)?$conf->global->SERVICES_ARE_ECOMMERCE_200238EC:''));
|
dol_syslog("get_default_tva: seller use vat=".$thirdparty_seller->tva_assuj.", seller country=".$thirdparty_seller->country_code.", seller in cee=".$thirdparty_seller->isInEEC().", buyer country=".$thirdparty_buyer->country_code.", buyer in cee=".$thirdparty_buyer->isInEEC().", idprod=".$idprod.", idprodfournprice=".$idprodfournprice.", SERVICE_ARE_ECOMMERCE_200238EC=".(! empty($conf->global->SERVICES_ARE_ECOMMERCE_200238EC)?$conf->global->SERVICES_ARE_ECOMMERCE_200238EC:''));
|
||||||
|
|
||||||
|
// If services are eServices according to EU Council Directive 2002/38/EC (http://ec.europa.eu/taxation_customs/taxation/vat/traders/e-commerce/article_1610_en.htm)
|
||||||
|
// we use the buyer VAT.
|
||||||
|
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC))
|
||||||
|
{
|
||||||
|
//print "eee".$thirdparty_buyer->isACompany();exit;
|
||||||
|
if (! $thirdparty_seller->isInEEC() && $thirdparty_buyer->isInEEC() && ! $thirdparty_buyer->isACompany())
|
||||||
|
{
|
||||||
|
//print 'VATRULE 6';
|
||||||
|
return get_product_vat_for_country($idprod,$thirdparty_buyer,$idprodfournprice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Si vendeur non assujeti a TVA (tva_assuj vaut 0/1 ou franchise/reel)
|
// Si vendeur non assujeti a TVA (tva_assuj vaut 0/1 ou franchise/reel)
|
||||||
if (is_numeric($thirdparty_seller->tva_assuj) && ! $thirdparty_seller->tva_assuj)
|
if (is_numeric($thirdparty_seller->tva_assuj) && ! $thirdparty_seller->tva_assuj)
|
||||||
{
|
{
|
||||||
@ -2964,18 +2976,6 @@ function get_default_tva($thirdparty_seller, $thirdparty_buyer, $idprod=0, $idpr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If services are eServices according to EU Council Directive 2002/38/EC (ec.europa.eu/taxation_customs/taxation/v.../article_1610_en.htm)
|
|
||||||
// we use the buyer VAT.
|
|
||||||
if (! empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC))
|
|
||||||
{
|
|
||||||
//print "eee".$thirdparty_buyer->isACompany();exit;
|
|
||||||
if (! $thirdparty_seller->isInEEC() && $thirdparty_buyer->isInEEC() && ! $thirdparty_buyer->isACompany())
|
|
||||||
{
|
|
||||||
//print 'VATRULE 6';
|
|
||||||
return get_product_vat_for_country($idprod,$thirdparty_buyer,$idprodfournprice);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sinon la TVA proposee par defaut=0. Fin de regle.
|
// Sinon la TVA proposee par defaut=0. Fin de regle.
|
||||||
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
|
// Rem: Cela signifie qu'au moins un des 2 est hors Communaute europeenne et que le pays differe
|
||||||
//print 'VATRULE 7';
|
//print 'VATRULE 7';
|
||||||
|
|||||||
@ -115,7 +115,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
||||||
'object_total_vat'=>price($object->total_tva,0,$outputlangs),
|
'object_total_vat'=>price($object->total_tva,0,$outputlangs),
|
||||||
'object_total_ttc'=>price($object->total_ttc,0,$outputlangs),
|
'object_total_ttc'=>price($object->total_ttc,0,$outputlangs),
|
||||||
'object_total_discount' => price($object->getTotalDiscount(), 0, $outputlangs),
|
'object_total_discount_ht' => price($object->getTotalDiscount(), 0, $outputlangs),
|
||||||
'object_vatrate'=>vatrate($object->tva),
|
'object_vatrate'=>vatrate($object->tva),
|
||||||
'object_note_private'=>$object->note,
|
'object_note_private'=>$object->note,
|
||||||
'object_note'=>$object->note_public,
|
'object_note'=>$object->note_public,
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
||||||
'object_total_vat'=>price($object->total_tva,0,$outputlangs),
|
'object_total_vat'=>price($object->total_tva,0,$outputlangs),
|
||||||
'object_total_ttc'=>price($object->total_ttc,0,$outputlangs),
|
'object_total_ttc'=>price($object->total_ttc,0,$outputlangs),
|
||||||
'object_total_discount' => price($object->getTotalDiscount(), 0, $outputlangs),
|
'object_total_discount_ht' => price($object->getTotalDiscount(), 0, $outputlangs),
|
||||||
'object_vatrate'=>(isset($object->tva)?vatrate($object->tva):''),
|
'object_vatrate'=>(isset($object->tva)?vatrate($object->tva):''),
|
||||||
'object_note_private'=>$object->note,
|
'object_note_private'=>$object->note,
|
||||||
'object_note'=>$object->note_public,
|
'object_note'=>$object->note_public,
|
||||||
|
|||||||
@ -114,7 +114,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
'object_total_ht'=>price($object->total_ht,0,$outputlangs),
|
||||||
'object_total_vat'=>price($object->total_tva,0,$outputlangs),
|
'object_total_vat'=>price($object->total_tva,0,$outputlangs),
|
||||||
'object_total_ttc'=>price($object->total_ttc,0,$outputlangs),
|
'object_total_ttc'=>price($object->total_ttc,0,$outputlangs),
|
||||||
'object_total_discount' => price($object->getTotalDiscount(), 0, $outputlangs),
|
'object_total_discount_ht' => price($object->getTotalDiscount(), 0, $outputlangs),
|
||||||
'object_vatrate'=>vatrate($object->tva),
|
'object_vatrate'=>vatrate($object->tva),
|
||||||
'object_note_private'=>$object->note,
|
'object_note_private'=>$object->note,
|
||||||
'object_note'=>$object->note_public,
|
'object_note'=>$object->note_public,
|
||||||
|
|||||||
@ -152,4 +152,4 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob
|
|||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<!-- END PHP TEMPLATE freeproductline_create.tpl.php -->
|
<!-- END PHP TEMPLATE freeproductline_create.tpl.php -->
|
||||||
@ -204,4 +204,4 @@ if (! empty($usemargins))
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<!-- END PHP TEMPLATE predefinedproductline_create.tpl.php -->
|
<!-- END PHP TEMPLATE predefinedproductline_create.tpl.php -->
|
||||||
@ -1,29 +1,29 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
|
||||||
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \mainpage CKEditor - PHP server side intergation
|
/*! \mainpage CKEditor - PHP server side intergation
|
||||||
* \section intro_sec CKEditor
|
* \section intro_sec CKEditor
|
||||||
* Visit <a href="http://ckeditor.com">CKEditor web site</a> to find more information about the editor.
|
* Visit <a href="http://ckeditor.com">CKEditor web site</a> to find more information about the editor.
|
||||||
* \section install_sec Installation
|
* \section install_sec Installation
|
||||||
* \subsection step1 Include ckeditor.php in your PHP web site.
|
* \subsection step1 Include ckeditor.php in your PHP web site.
|
||||||
* @code
|
* @code
|
||||||
* <?php
|
* <?php
|
||||||
* include("ckeditor/ckeditor.php");
|
* include("ckeditor/ckeditor.php");
|
||||||
* ?>
|
* ?>
|
||||||
* @endcode
|
* @endcode
|
||||||
* \subsection step2 Create CKEditor class instance and use one of available methods to insert CKEditor.
|
* \subsection step2 Create CKEditor class instance and use one of available methods to insert CKEditor.
|
||||||
* @code
|
* @code
|
||||||
* <?php
|
* <?php
|
||||||
* $CKEditor = new CKEditor();
|
* $CKEditor = new CKEditor();
|
||||||
* $CKEditor->editor("editor1", "<p>Initial value.</p>");
|
* $CKEditor->editor("editor1", "<p>Initial value.</p>");
|
||||||
* ?>
|
* ?>
|
||||||
* @endcode
|
* @endcode
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
|
if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
|
||||||
include_once( 'ckeditor_php4.php' ) ;
|
include_once( 'ckeditor_php4.php' ) ;
|
||||||
else
|
else
|
||||||
include_once( 'ckeditor_php5.php' ) ;
|
include_once( 'ckeditor_php5.php' ) ;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,33 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
//
|
//
|
||||||
// FPDI - Version 1.4.2
|
// FPDI - Version 1.4.2
|
||||||
//
|
//
|
||||||
// Copyright 2004-2011 Setasign - Jan Slabon
|
// Copyright 2004-2011 Setasign - Jan Slabon
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
require_once('FilterASCII85.php');
|
require_once('FilterASCII85.php');
|
||||||
|
|
||||||
class FilterASCII85_FPDI extends FilterASCII85 {
|
class FilterASCII85_FPDI extends FilterASCII85 {
|
||||||
|
|
||||||
var $fpdi;
|
var $fpdi;
|
||||||
|
|
||||||
function FilterASCII85_FPDI(&$fpdi) {
|
function FilterASCII85_FPDI(&$fpdi) {
|
||||||
$this->fpdi =& $fpdi;
|
$this->fpdi =& $fpdi;
|
||||||
}
|
}
|
||||||
|
|
||||||
function error($msg) {
|
function error($msg) {
|
||||||
$this->fpdi->error($msg);
|
$this->fpdi->error($msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,33 +1,33 @@
|
|||||||
<?php
|
<?php
|
||||||
//
|
//
|
||||||
// FPDI - Version 1.4.2
|
// FPDI - Version 1.4.2
|
||||||
//
|
//
|
||||||
// Copyright 2004-2011 Setasign - Jan Slabon
|
// Copyright 2004-2011 Setasign - Jan Slabon
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
require_once('FilterLZW.php');
|
require_once('FilterLZW.php');
|
||||||
|
|
||||||
class FilterLZW_FPDI extends FilterLZW {
|
class FilterLZW_FPDI extends FilterLZW {
|
||||||
|
|
||||||
var $fpdi;
|
var $fpdi;
|
||||||
|
|
||||||
function FilterLZW_FPDI(&$fpdi) {
|
function FilterLZW_FPDI(&$fpdi) {
|
||||||
$this->fpdi =& $fpdi;
|
$this->fpdi =& $fpdi;
|
||||||
}
|
}
|
||||||
|
|
||||||
function error($msg) {
|
function error($msg) {
|
||||||
$this->fpdi->error($msg);
|
$this->fpdi->error($msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,449 +1,449 @@
|
|||||||
<?php
|
<?php
|
||||||
//
|
//
|
||||||
// FPDF_TPL - Version 1.2
|
// FPDF_TPL - Version 1.2
|
||||||
//
|
//
|
||||||
// Copyright 2004-2010 Setasign - Jan Slabon
|
// Copyright 2004-2010 Setasign - Jan Slabon
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
class FPDF_TPL extends FPDF {
|
class FPDF_TPL extends FPDF {
|
||||||
/**
|
/**
|
||||||
* Array of Tpl-Data
|
* Array of Tpl-Data
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $tpls = array();
|
var $tpls = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current Template-ID
|
* Current Template-ID
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
var $tpl = 0;
|
var $tpl = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "In Template"-Flag
|
* "In Template"-Flag
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*/
|
*/
|
||||||
var $_intpl = false;
|
var $_intpl = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nameprefix of Templates used in Resources-Dictonary
|
* Nameprefix of Templates used in Resources-Dictonary
|
||||||
* @var string A String defining the Prefix used as Template-Object-Names. Have to beginn with an /
|
* @var string A String defining the Prefix used as Template-Object-Names. Have to beginn with an /
|
||||||
*/
|
*/
|
||||||
var $tplprefix = "/TPL";
|
var $tplprefix = "/TPL";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resources used By Templates and Pages
|
* Resources used By Templates and Pages
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $_res = array();
|
var $_res = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Last used Template data
|
* Last used Template data
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $lastUsedTemplateData = array();
|
var $lastUsedTemplateData = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start a Template
|
* Start a Template
|
||||||
*
|
*
|
||||||
* This method starts a template. You can give own coordinates to build an own sized
|
* This method starts a template. You can give own coordinates to build an own sized
|
||||||
* Template. Pay attention, that the margins are adapted to the new templatesize.
|
* Template. Pay attention, that the margins are adapted to the new templatesize.
|
||||||
* If you want to write outside the template, for example to build a clipped Template,
|
* If you want to write outside the template, for example to build a clipped Template,
|
||||||
* you have to set the Margins and "Cursor"-Position manual after beginTemplate-Call.
|
* you have to set the Margins and "Cursor"-Position manual after beginTemplate-Call.
|
||||||
*
|
*
|
||||||
* If no parameter is given, the template uses the current page-size.
|
* If no parameter is given, the template uses the current page-size.
|
||||||
* The Method returns an ID of the current Template. This ID is used later for using this template.
|
* The Method returns an ID of the current Template. This ID is used later for using this template.
|
||||||
* Warning: A created Template is used in PDF at all events. Still if you don't use it after creation!
|
* Warning: A created Template is used in PDF at all events. Still if you don't use it after creation!
|
||||||
*
|
*
|
||||||
* @param int $x The x-coordinate given in user-unit
|
* @param int $x The x-coordinate given in user-unit
|
||||||
* @param int $y The y-coordinate given in user-unit
|
* @param int $y The y-coordinate given in user-unit
|
||||||
* @param int $w The width given in user-unit
|
* @param int $w The width given in user-unit
|
||||||
* @param int $h The height given in user-unit
|
* @param int $h The height given in user-unit
|
||||||
* @return int The ID of new created Template
|
* @return int The ID of new created Template
|
||||||
*/
|
*/
|
||||||
function beginTemplate($x = null, $y = null, $w = null, $h = null) {
|
function beginTemplate($x = null, $y = null, $w = null, $h = null) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$this->Error('This method is only usable with FPDF. Use TCPDF methods startTemplate() instead.');
|
$this->Error('This method is only usable with FPDF. Use TCPDF methods startTemplate() instead.');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->page <= 0)
|
if ($this->page <= 0)
|
||||||
$this->error("You have to add a page to fpdf first!");
|
$this->error("You have to add a page to fpdf first!");
|
||||||
|
|
||||||
if ($x == null)
|
if ($x == null)
|
||||||
$x = 0;
|
$x = 0;
|
||||||
if ($y == null)
|
if ($y == null)
|
||||||
$y = 0;
|
$y = 0;
|
||||||
if ($w == null)
|
if ($w == null)
|
||||||
$w = $this->w;
|
$w = $this->w;
|
||||||
if ($h == null)
|
if ($h == null)
|
||||||
$h = $this->h;
|
$h = $this->h;
|
||||||
|
|
||||||
// Save settings
|
// Save settings
|
||||||
$this->tpl++;
|
$this->tpl++;
|
||||||
$tpl =& $this->tpls[$this->tpl];
|
$tpl =& $this->tpls[$this->tpl];
|
||||||
$tpl = array(
|
$tpl = array(
|
||||||
'o_x' => $this->x,
|
'o_x' => $this->x,
|
||||||
'o_y' => $this->y,
|
'o_y' => $this->y,
|
||||||
'o_AutoPageBreak' => $this->AutoPageBreak,
|
'o_AutoPageBreak' => $this->AutoPageBreak,
|
||||||
'o_bMargin' => $this->bMargin,
|
'o_bMargin' => $this->bMargin,
|
||||||
'o_tMargin' => $this->tMargin,
|
'o_tMargin' => $this->tMargin,
|
||||||
'o_lMargin' => $this->lMargin,
|
'o_lMargin' => $this->lMargin,
|
||||||
'o_rMargin' => $this->rMargin,
|
'o_rMargin' => $this->rMargin,
|
||||||
'o_h' => $this->h,
|
'o_h' => $this->h,
|
||||||
'o_w' => $this->w,
|
'o_w' => $this->w,
|
||||||
'buffer' => '',
|
'buffer' => '',
|
||||||
'x' => $x,
|
'x' => $x,
|
||||||
'y' => $y,
|
'y' => $y,
|
||||||
'w' => $w,
|
'w' => $w,
|
||||||
'h' => $h
|
'h' => $h
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->SetAutoPageBreak(false);
|
$this->SetAutoPageBreak(false);
|
||||||
|
|
||||||
// Define own high and width to calculate possitions correct
|
// Define own high and width to calculate possitions correct
|
||||||
$this->h = $h;
|
$this->h = $h;
|
||||||
$this->w = $w;
|
$this->w = $w;
|
||||||
|
|
||||||
$this->_intpl = true;
|
$this->_intpl = true;
|
||||||
$this->SetXY($x + $this->lMargin, $y + $this->tMargin);
|
$this->SetXY($x + $this->lMargin, $y + $this->tMargin);
|
||||||
$this->SetRightMargin($this->w - $w + $this->rMargin);
|
$this->SetRightMargin($this->w - $w + $this->rMargin);
|
||||||
|
|
||||||
return $this->tpl;
|
return $this->tpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* End Template
|
* End Template
|
||||||
*
|
*
|
||||||
* This method ends a template and reset initiated variables on beginTemplate.
|
* This method ends a template and reset initiated variables on beginTemplate.
|
||||||
*
|
*
|
||||||
* @return mixed If a template is opened, the ID is returned. If not a false is returned.
|
* @return mixed If a template is opened, the ID is returned. If not a false is returned.
|
||||||
*/
|
*/
|
||||||
function endTemplate() {
|
function endTemplate() {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args);
|
return call_user_func_array(array($this, 'TCPDF::endTemplate'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_intpl = false;
|
$this->_intpl = false;
|
||||||
$tpl =& $this->tpls[$this->tpl];
|
$tpl =& $this->tpls[$this->tpl];
|
||||||
$this->SetXY($tpl['o_x'], $tpl['o_y']);
|
$this->SetXY($tpl['o_x'], $tpl['o_y']);
|
||||||
$this->tMargin = $tpl['o_tMargin'];
|
$this->tMargin = $tpl['o_tMargin'];
|
||||||
$this->lMargin = $tpl['o_lMargin'];
|
$this->lMargin = $tpl['o_lMargin'];
|
||||||
$this->rMargin = $tpl['o_rMargin'];
|
$this->rMargin = $tpl['o_rMargin'];
|
||||||
$this->h = $tpl['o_h'];
|
$this->h = $tpl['o_h'];
|
||||||
$this->w = $tpl['o_w'];
|
$this->w = $tpl['o_w'];
|
||||||
$this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']);
|
$this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']);
|
||||||
|
|
||||||
return $this->tpl;
|
return $this->tpl;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use a Template in current Page or other Template
|
* Use a Template in current Page or other Template
|
||||||
*
|
*
|
||||||
* You can use a template in a page or in another template.
|
* You can use a template in a page or in another template.
|
||||||
* You can give the used template a new size like you use the Image()-method.
|
* You can give the used template a new size like you use the Image()-method.
|
||||||
* All parameters are optional. The width or height is calculated automaticaly
|
* All parameters are optional. The width or height is calculated automaticaly
|
||||||
* if one is given. If no parameter is given the origin size as defined in
|
* if one is given. If no parameter is given the origin size as defined in
|
||||||
* beginTemplate() is used.
|
* beginTemplate() is used.
|
||||||
* The calculated or used width and height are returned as an array.
|
* The calculated or used width and height are returned as an array.
|
||||||
*
|
*
|
||||||
* @param int $tplidx A valid template-Id
|
* @param int $tplidx A valid template-Id
|
||||||
* @param int $_x The x-position
|
* @param int $_x The x-position
|
||||||
* @param int $_y The y-position
|
* @param int $_y The y-position
|
||||||
* @param int $_w The new width of the template
|
* @param int $_w The new width of the template
|
||||||
* @param int $_h The new height of the template
|
* @param int $_h The new height of the template
|
||||||
* @retrun array The height and width of the template
|
* @retrun array The height and width of the template
|
||||||
*/
|
*/
|
||||||
function useTemplate($tplidx, $_x = null, $_y = null, $_w = 0, $_h = 0) {
|
function useTemplate($tplidx, $_x = null, $_y = null, $_w = 0, $_h = 0) {
|
||||||
if ($this->page <= 0)
|
if ($this->page <= 0)
|
||||||
$this->error('You have to add a page first!');
|
$this->error('You have to add a page first!');
|
||||||
|
|
||||||
if (!isset($this->tpls[$tplidx]))
|
if (!isset($this->tpls[$tplidx]))
|
||||||
$this->error('Template does not exist!');
|
$this->error('Template does not exist!');
|
||||||
|
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx];
|
$this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx];
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl =& $this->tpls[$tplidx];
|
$tpl =& $this->tpls[$tplidx];
|
||||||
$w = $tpl['w'];
|
$w = $tpl['w'];
|
||||||
$h = $tpl['h'];
|
$h = $tpl['h'];
|
||||||
|
|
||||||
if ($_x == null)
|
if ($_x == null)
|
||||||
$_x = 0;
|
$_x = 0;
|
||||||
if ($_y == null)
|
if ($_y == null)
|
||||||
$_y = 0;
|
$_y = 0;
|
||||||
|
|
||||||
$_x += $tpl['x'];
|
$_x += $tpl['x'];
|
||||||
$_y += $tpl['y'];
|
$_y += $tpl['y'];
|
||||||
|
|
||||||
$wh = $this->getTemplateSize($tplidx, $_w, $_h);
|
$wh = $this->getTemplateSize($tplidx, $_w, $_h);
|
||||||
$_w = $wh['w'];
|
$_w = $wh['w'];
|
||||||
$_h = $wh['h'];
|
$_h = $wh['h'];
|
||||||
|
|
||||||
$tData = array(
|
$tData = array(
|
||||||
'x' => $this->x,
|
'x' => $this->x,
|
||||||
'y' => $this->y,
|
'y' => $this->y,
|
||||||
'w' => $_w,
|
'w' => $_w,
|
||||||
'h' => $_h,
|
'h' => $_h,
|
||||||
'scaleX' => ($_w / $w),
|
'scaleX' => ($_w / $w),
|
||||||
'scaleY' => ($_h / $h),
|
'scaleY' => ($_h / $h),
|
||||||
'tx' => $_x,
|
'tx' => $_x,
|
||||||
'ty' => ($this->h - $_y - $_h),
|
'ty' => ($this->h - $_y - $_h),
|
||||||
'lty' => ($this->h - $_y - $_h) - ($this->h - $h) * ($_h / $h)
|
'lty' => ($this->h - $_y - $_h) - ($this->h - $h) * ($_h / $h)
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_out(sprintf('q %.4F 0 0 %.4F %.4F %.4F cm', $tData['scaleX'], $tData['scaleY'], $tData['tx'] * $this->k, $tData['ty'] * $this->k)); // Translate
|
$this->_out(sprintf('q %.4F 0 0 %.4F %.4F %.4F cm', $tData['scaleX'], $tData['scaleY'], $tData['tx'] * $this->k, $tData['ty'] * $this->k)); // Translate
|
||||||
$this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx));
|
$this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx));
|
||||||
|
|
||||||
// reset font in the outer graphic state
|
// reset font in the outer graphic state
|
||||||
if ($this->FontFamily) {
|
if ($this->FontFamily) {
|
||||||
$family = $this->FontFamily;
|
$family = $this->FontFamily;
|
||||||
$this->FontFamily = '';
|
$this->FontFamily = '';
|
||||||
$this->SetFont($family);
|
$this->SetFont($family);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->lastUsedTemplateData = $tData;
|
$this->lastUsedTemplateData = $tData;
|
||||||
|
|
||||||
return array('w' => $_w, 'h' => $_h);
|
return array('w' => $_w, 'h' => $_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get The calculated Size of a Template
|
* Get The calculated Size of a Template
|
||||||
*
|
*
|
||||||
* If one size is given, this method calculates the other one.
|
* If one size is given, this method calculates the other one.
|
||||||
*
|
*
|
||||||
* @param int $tplidx A valid template-Id
|
* @param int $tplidx A valid template-Id
|
||||||
* @param int $_w The width of the template
|
* @param int $_w The width of the template
|
||||||
* @param int $_h The height of the template
|
* @param int $_h The height of the template
|
||||||
* @return array The height and width of the template
|
* @return array The height and width of the template
|
||||||
*/
|
*/
|
||||||
function getTemplateSize($tplidx, $_w = 0, $_h = 0) {
|
function getTemplateSize($tplidx, $_w = 0, $_h = 0) {
|
||||||
if (!$this->tpls[$tplidx])
|
if (!$this->tpls[$tplidx])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
$tpl =& $this->tpls[$tplidx];
|
$tpl =& $this->tpls[$tplidx];
|
||||||
$w = $tpl['w'];
|
$w = $tpl['w'];
|
||||||
$h = $tpl['h'];
|
$h = $tpl['h'];
|
||||||
|
|
||||||
if ($_w == 0 and $_h == 0) {
|
if ($_w == 0 and $_h == 0) {
|
||||||
$_w = $w;
|
$_w = $w;
|
||||||
$_h = $h;
|
$_h = $h;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_w == 0)
|
if($_w == 0)
|
||||||
$_w = $_h * $w / $h;
|
$_w = $_h * $w / $h;
|
||||||
if($_h == 0)
|
if($_h == 0)
|
||||||
$_h = $_w * $h / $w;
|
$_h = $_w * $h / $w;
|
||||||
|
|
||||||
return array("w" => $_w, "h" => $_h);
|
return array("w" => $_w, "h" => $_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See FPDF/TCPDF-Documentation ;-)
|
* See FPDF/TCPDF-Documentation ;-)
|
||||||
*/
|
*/
|
||||||
public function SetFont($family, $style = '', $size = 0) {
|
public function SetFont($family, $style = '', $size = 0) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
|
return call_user_func_array(array($this, 'TCPDF::SetFont'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* force the resetting of font changes in a template
|
* force the resetting of font changes in a template
|
||||||
*/
|
*/
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->FontFamily = '';
|
$this->FontFamily = '';
|
||||||
|
|
||||||
parent::SetFont($family, $style, $size);
|
parent::SetFont($family, $style, $size);
|
||||||
|
|
||||||
$fontkey = $this->FontFamily . $this->FontStyle;
|
$fontkey = $this->FontFamily . $this->FontStyle;
|
||||||
|
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
$this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
||||||
} else {
|
} else {
|
||||||
$this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
$this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See FPDF/TCPDF-Documentation ;-)
|
* See FPDF/TCPDF-Documentation ;-)
|
||||||
*/
|
*/
|
||||||
function Image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '') {
|
function Image($file, $x = null, $y = null, $w = 0, $h = 0, $type = '', $link = '') {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::Image'), $args);
|
return call_user_func_array(array($this, 'TCPDF::Image'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = parent::Image($file, $x, $y, $w, $h, $type, $link);
|
$ret = parent::Image($file, $x, $y, $w, $h, $type, $link);
|
||||||
if ($this->_intpl) {
|
if ($this->_intpl) {
|
||||||
$this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file];
|
$this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file];
|
||||||
} else {
|
} else {
|
||||||
$this->_res['page'][$this->page]['images'][$file] =& $this->images[$file];
|
$this->_res['page'][$this->page]['images'][$file] =& $this->images[$file];
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* See FPDF-Documentation ;-)
|
* See FPDF-Documentation ;-)
|
||||||
*
|
*
|
||||||
* AddPage is not available when you're "in" a template.
|
* AddPage is not available when you're "in" a template.
|
||||||
*/
|
*/
|
||||||
function AddPage($orientation = '', $format = '') {
|
function AddPage($orientation = '', $format = '') {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
|
return call_user_func_array(array($this, 'TCPDF::AddPage'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Adding pages in templates isn\'t possible!');
|
$this->Error('Adding pages in templates isn\'t possible!');
|
||||||
|
|
||||||
parent::AddPage($orientation, $format);
|
parent::AddPage($orientation, $format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preserve adding Links in Templates ...won't work
|
* Preserve adding Links in Templates ...won't work
|
||||||
*/
|
*/
|
||||||
function Link($x, $y, $w, $h, $link) {
|
function Link($x, $y, $w, $h, $link) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::Link'), $args);
|
return call_user_func_array(array($this, 'TCPDF::Link'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Using links in templates aren\'t possible!');
|
$this->Error('Using links in templates aren\'t possible!');
|
||||||
|
|
||||||
parent::Link($x, $y, $w, $h, $link);
|
parent::Link($x, $y, $w, $h, $link);
|
||||||
}
|
}
|
||||||
|
|
||||||
function AddLink() {
|
function AddLink() {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::AddLink'), $args);
|
return call_user_func_array(array($this, 'TCPDF::AddLink'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Adding links in templates aren\'t possible!');
|
$this->Error('Adding links in templates aren\'t possible!');
|
||||||
return parent::AddLink();
|
return parent::AddLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
function SetLink($link, $y = 0, $page = -1) {
|
function SetLink($link, $y = 0, $page = -1) {
|
||||||
if (is_subclass_of($this, 'TCPDF')) {
|
if (is_subclass_of($this, 'TCPDF')) {
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array($this, 'TCPDF::SetLink'), $args);
|
return call_user_func_array(array($this, 'TCPDF::SetLink'), $args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->_intpl)
|
if ($this->_intpl)
|
||||||
$this->Error('Setting links in templates aren\'t possible!');
|
$this->Error('Setting links in templates aren\'t possible!');
|
||||||
parent::SetLink($link, $y, $page);
|
parent::SetLink($link, $y, $page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private Method that writes the form xobjects
|
* Private Method that writes the form xobjects
|
||||||
*/
|
*/
|
||||||
function _putformxobjects() {
|
function _putformxobjects() {
|
||||||
$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
|
$filter=($this->compress) ? '/Filter /FlateDecode ' : '';
|
||||||
reset($this->tpls);
|
reset($this->tpls);
|
||||||
foreach($this->tpls AS $tplidx => $tpl) {
|
foreach($this->tpls AS $tplidx => $tpl) {
|
||||||
|
|
||||||
$p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer'];
|
$p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer'];
|
||||||
$this->_newobj();
|
$this->_newobj();
|
||||||
$this->tpls[$tplidx]['n'] = $this->n;
|
$this->tpls[$tplidx]['n'] = $this->n;
|
||||||
$this->_out('<<'.$filter.'/Type /XObject');
|
$this->_out('<<'.$filter.'/Type /XObject');
|
||||||
$this->_out('/Subtype /Form');
|
$this->_out('/Subtype /Form');
|
||||||
$this->_out('/FormType 1');
|
$this->_out('/FormType 1');
|
||||||
$this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]',
|
$this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]',
|
||||||
// llx
|
// llx
|
||||||
$tpl['x'] * $this->k,
|
$tpl['x'] * $this->k,
|
||||||
// lly
|
// lly
|
||||||
-$tpl['y'] * $this->k,
|
-$tpl['y'] * $this->k,
|
||||||
// urx
|
// urx
|
||||||
($tpl['w'] + $tpl['x']) * $this->k,
|
($tpl['w'] + $tpl['x']) * $this->k,
|
||||||
// ury
|
// ury
|
||||||
($tpl['h'] - $tpl['y']) * $this->k
|
($tpl['h'] - $tpl['y']) * $this->k
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($tpl['x'] != 0 || $tpl['y'] != 0) {
|
if ($tpl['x'] != 0 || $tpl['y'] != 0) {
|
||||||
$this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]',
|
$this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]',
|
||||||
-$tpl['x'] * $this->k * 2, $tpl['y'] * $this->k * 2
|
-$tpl['x'] * $this->k * 2, $tpl['y'] * $this->k * 2
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_out('/Resources ');
|
$this->_out('/Resources ');
|
||||||
|
|
||||||
$this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
|
$this->_out('<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
|
||||||
if (isset($this->_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) {
|
if (isset($this->_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) {
|
||||||
$this->_out('/Font <<');
|
$this->_out('/Font <<');
|
||||||
foreach($this->_res['tpl'][$tplidx]['fonts'] as $font)
|
foreach($this->_res['tpl'][$tplidx]['fonts'] as $font)
|
||||||
$this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
|
$this->_out('/F' . $font['i'] . ' ' . $font['n'] . ' 0 R');
|
||||||
$this->_out('>>');
|
$this->_out('>>');
|
||||||
}
|
}
|
||||||
if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) ||
|
if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) ||
|
||||||
isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
|
isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls']))
|
||||||
{
|
{
|
||||||
$this->_out('/XObject <<');
|
$this->_out('/XObject <<');
|
||||||
if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
|
if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) {
|
||||||
foreach($this->_res['tpl'][$tplidx]['images'] as $image)
|
foreach($this->_res['tpl'][$tplidx]['images'] as $image)
|
||||||
$this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
|
$this->_out('/I' . $image['i'] . ' ' . $image['n'] . ' 0 R');
|
||||||
}
|
}
|
||||||
if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
|
if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) {
|
||||||
foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
|
foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl)
|
||||||
$this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R');
|
$this->_out($this->tplprefix . $i . ' ' . $tpl['n'] . ' 0 R');
|
||||||
}
|
}
|
||||||
$this->_out('>>');
|
$this->_out('>>');
|
||||||
}
|
}
|
||||||
$this->_out('>>');
|
$this->_out('>>');
|
||||||
|
|
||||||
$this->_out('/Length ' . strlen($p) . ' >>');
|
$this->_out('/Length ' . strlen($p) . ' >>');
|
||||||
$this->_putstream($p);
|
$this->_putstream($p);
|
||||||
$this->_out('endobj');
|
$this->_out('endobj');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overwritten to add _putformxobjects() after _putimages()
|
* Overwritten to add _putformxobjects() after _putimages()
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
function _putimages() {
|
function _putimages() {
|
||||||
parent::_putimages();
|
parent::_putimages();
|
||||||
$this->_putformxobjects();
|
$this->_putformxobjects();
|
||||||
}
|
}
|
||||||
|
|
||||||
function _putxobjectdict() {
|
function _putxobjectdict() {
|
||||||
parent::_putxobjectdict();
|
parent::_putxobjectdict();
|
||||||
|
|
||||||
if (count($this->tpls)) {
|
if (count($this->tpls)) {
|
||||||
foreach($this->tpls as $tplidx => $tpl) {
|
foreach($this->tpls as $tplidx => $tpl) {
|
||||||
$this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n']));
|
$this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private Method
|
* Private Method
|
||||||
*/
|
*/
|
||||||
function _out($s) {
|
function _out($s) {
|
||||||
if ($this->state == 2 && $this->_intpl) {
|
if ($this->state == 2 && $this->_intpl) {
|
||||||
$this->tpls[$this->tpl]['buffer'] .= $s . "\n";
|
$this->tpls[$this->tpl]['buffer'] .= $s . "\n";
|
||||||
} else {
|
} else {
|
||||||
parent::_out($s);
|
parent::_out($s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,408 +1,408 @@
|
|||||||
<?php
|
<?php
|
||||||
//
|
//
|
||||||
// FPDI - Version 1.4.2
|
// FPDI - Version 1.4.2
|
||||||
//
|
//
|
||||||
// Copyright 2004-2011 Setasign - Jan Slabon
|
// Copyright 2004-2011 Setasign - Jan Slabon
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
require_once('pdf_parser.php');
|
require_once('pdf_parser.php');
|
||||||
|
|
||||||
class fpdi_pdf_parser extends pdf_parser {
|
class fpdi_pdf_parser extends pdf_parser {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pages
|
* Pages
|
||||||
* Index beginns at 0
|
* Index beginns at 0
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $pages;
|
var $pages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page count
|
* Page count
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
var $page_count;
|
var $page_count;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* actual page number
|
* actual page number
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
var $pageno;
|
var $pageno;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PDF Version of imported Document
|
* PDF Version of imported Document
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
var $pdfVersion;
|
var $pdfVersion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FPDI Reference
|
* FPDI Reference
|
||||||
* @var object
|
* @var object
|
||||||
*/
|
*/
|
||||||
var $fpdi;
|
var $fpdi;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Available BoxTypes
|
* Available BoxTypes
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
var $availableBoxes = array('/MediaBox', '/CropBox', '/BleedBox', '/TrimBox', '/ArtBox');
|
var $availableBoxes = array('/MediaBox', '/CropBox', '/BleedBox', '/TrimBox', '/ArtBox');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param string $filename Source-Filename
|
* @param string $filename Source-Filename
|
||||||
* @param object $fpdi Object of type fpdi
|
* @param object $fpdi Object of type fpdi
|
||||||
*/
|
*/
|
||||||
function fpdi_pdf_parser($filename, &$fpdi) {
|
function fpdi_pdf_parser($filename, &$fpdi) {
|
||||||
$this->fpdi =& $fpdi;
|
$this->fpdi =& $fpdi;
|
||||||
|
|
||||||
parent::pdf_parser($filename);
|
parent::pdf_parser($filename);
|
||||||
|
|
||||||
// resolve Pages-Dictonary
|
// resolve Pages-Dictonary
|
||||||
$pages = $this->pdf_resolve_object($this->c, $this->root[1][1]['/Pages']);
|
$pages = $this->pdf_resolve_object($this->c, $this->root[1][1]['/Pages']);
|
||||||
|
|
||||||
// Read pages
|
// Read pages
|
||||||
$this->read_pages($this->c, $pages, $this->pages);
|
$this->read_pages($this->c, $pages, $this->pages);
|
||||||
|
|
||||||
// count pages;
|
// count pages;
|
||||||
$this->page_count = count($this->pages);
|
$this->page_count = count($this->pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overwrite parent::error()
|
* Overwrite parent::error()
|
||||||
*
|
*
|
||||||
* @param string $msg Error-Message
|
* @param string $msg Error-Message
|
||||||
*/
|
*/
|
||||||
function error($msg) {
|
function error($msg) {
|
||||||
$this->fpdi->error($msg);
|
$this->fpdi->error($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get pagecount from sourcefile
|
* Get pagecount from sourcefile
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function getPageCount() {
|
function getPageCount() {
|
||||||
return $this->page_count;
|
return $this->page_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set pageno
|
* Set pageno
|
||||||
*
|
*
|
||||||
* @param int $pageno Pagenumber to use
|
* @param int $pageno Pagenumber to use
|
||||||
*/
|
*/
|
||||||
function setPageno($pageno) {
|
function setPageno($pageno) {
|
||||||
$pageno = ((int) $pageno) - 1;
|
$pageno = ((int) $pageno) - 1;
|
||||||
|
|
||||||
if ($pageno < 0 || $pageno >= $this->getPageCount()) {
|
if ($pageno < 0 || $pageno >= $this->getPageCount()) {
|
||||||
$this->fpdi->error('Pagenumber is wrong!');
|
$this->fpdi->error('Pagenumber is wrong!');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->pageno = $pageno;
|
$this->pageno = $pageno;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get page-resources from current page
|
* Get page-resources from current page
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getPageResources() {
|
function getPageResources() {
|
||||||
return $this->_getPageResources($this->pages[$this->pageno]);
|
return $this->_getPageResources($this->pages[$this->pageno]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get page-resources from /Page
|
* Get page-resources from /Page
|
||||||
*
|
*
|
||||||
* @param array $obj Array of pdf-data
|
* @param array $obj Array of pdf-data
|
||||||
*/
|
*/
|
||||||
function _getPageResources ($obj) { // $obj = /Page
|
function _getPageResources ($obj) { // $obj = /Page
|
||||||
$obj = $this->pdf_resolve_object($this->c, $obj);
|
$obj = $this->pdf_resolve_object($this->c, $obj);
|
||||||
|
|
||||||
// If the current object has a resources
|
// If the current object has a resources
|
||||||
// dictionary associated with it, we use
|
// dictionary associated with it, we use
|
||||||
// it. Otherwise, we move back to its
|
// it. Otherwise, we move back to its
|
||||||
// parent object.
|
// parent object.
|
||||||
if (isset ($obj[1][1]['/Resources'])) {
|
if (isset ($obj[1][1]['/Resources'])) {
|
||||||
$res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Resources']);
|
$res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Resources']);
|
||||||
if ($res[0] == PDF_TYPE_OBJECT)
|
if ($res[0] == PDF_TYPE_OBJECT)
|
||||||
return $res[1];
|
return $res[1];
|
||||||
return $res;
|
return $res;
|
||||||
} else {
|
} else {
|
||||||
if (!isset ($obj[1][1]['/Parent'])) {
|
if (!isset ($obj[1][1]['/Parent'])) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$res = $this->_getPageResources($obj[1][1]['/Parent']);
|
$res = $this->_getPageResources($obj[1][1]['/Parent']);
|
||||||
if ($res[0] == PDF_TYPE_OBJECT)
|
if ($res[0] == PDF_TYPE_OBJECT)
|
||||||
return $res[1];
|
return $res[1];
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get content of current page
|
* Get content of current page
|
||||||
*
|
*
|
||||||
* If more /Contents is an array, the streams are concated
|
* If more /Contents is an array, the streams are concated
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getContent() {
|
function getContent() {
|
||||||
$buffer = '';
|
$buffer = '';
|
||||||
|
|
||||||
if (isset($this->pages[$this->pageno][1][1]['/Contents'])) {
|
if (isset($this->pages[$this->pageno][1][1]['/Contents'])) {
|
||||||
$contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']);
|
$contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']);
|
||||||
foreach($contents AS $tmp_content) {
|
foreach($contents AS $tmp_content) {
|
||||||
$buffer .= $this->_rebuildContentStream($tmp_content) . ' ';
|
$buffer .= $this->_rebuildContentStream($tmp_content) . ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $buffer;
|
return $buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolve all content-objects
|
* Resolve all content-objects
|
||||||
*
|
*
|
||||||
* @param array $content_ref
|
* @param array $content_ref
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function _getPageContent($content_ref) {
|
function _getPageContent($content_ref) {
|
||||||
$contents = array();
|
$contents = array();
|
||||||
|
|
||||||
if ($content_ref[0] == PDF_TYPE_OBJREF) {
|
if ($content_ref[0] == PDF_TYPE_OBJREF) {
|
||||||
$content = $this->pdf_resolve_object($this->c, $content_ref);
|
$content = $this->pdf_resolve_object($this->c, $content_ref);
|
||||||
if ($content[1][0] == PDF_TYPE_ARRAY) {
|
if ($content[1][0] == PDF_TYPE_ARRAY) {
|
||||||
$contents = $this->_getPageContent($content[1]);
|
$contents = $this->_getPageContent($content[1]);
|
||||||
} else {
|
} else {
|
||||||
$contents[] = $content;
|
$contents[] = $content;
|
||||||
}
|
}
|
||||||
} else if ($content_ref[0] == PDF_TYPE_ARRAY) {
|
} else if ($content_ref[0] == PDF_TYPE_ARRAY) {
|
||||||
foreach ($content_ref[1] AS $tmp_content_ref) {
|
foreach ($content_ref[1] AS $tmp_content_ref) {
|
||||||
$contents = array_merge($contents,$this->_getPageContent($tmp_content_ref));
|
$contents = array_merge($contents,$this->_getPageContent($tmp_content_ref));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $contents;
|
return $contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rebuild content-streams
|
* Rebuild content-streams
|
||||||
*
|
*
|
||||||
* @param array $obj
|
* @param array $obj
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function _rebuildContentStream($obj) {
|
function _rebuildContentStream($obj) {
|
||||||
$filters = array();
|
$filters = array();
|
||||||
|
|
||||||
if (isset($obj[1][1]['/Filter'])) {
|
if (isset($obj[1][1]['/Filter'])) {
|
||||||
$_filter = $obj[1][1]['/Filter'];
|
$_filter = $obj[1][1]['/Filter'];
|
||||||
|
|
||||||
if ($_filter[0] == PDF_TYPE_OBJREF) {
|
if ($_filter[0] == PDF_TYPE_OBJREF) {
|
||||||
$tmpFilter = $this->pdf_resolve_object($this->c, $_filter);
|
$tmpFilter = $this->pdf_resolve_object($this->c, $_filter);
|
||||||
$_filter = $tmpFilter[1];
|
$_filter = $tmpFilter[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_filter[0] == PDF_TYPE_TOKEN) {
|
if ($_filter[0] == PDF_TYPE_TOKEN) {
|
||||||
$filters[] = $_filter;
|
$filters[] = $_filter;
|
||||||
} else if ($_filter[0] == PDF_TYPE_ARRAY) {
|
} else if ($_filter[0] == PDF_TYPE_ARRAY) {
|
||||||
$filters = $_filter[1];
|
$filters = $_filter[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$stream = $obj[2][1];
|
$stream = $obj[2][1];
|
||||||
|
|
||||||
foreach ($filters AS $_filter) {
|
foreach ($filters AS $_filter) {
|
||||||
switch ($_filter[1]) {
|
switch ($_filter[1]) {
|
||||||
case '/FlateDecode':
|
case '/FlateDecode':
|
||||||
case '/Fl':
|
case '/Fl':
|
||||||
// $stream .= "\x0F\x0D"; // in an errorious stream this suffix could work
|
// $stream .= "\x0F\x0D"; // in an errorious stream this suffix could work
|
||||||
// $stream .= "\x0A";
|
// $stream .= "\x0A";
|
||||||
// $stream .= "\x0D";
|
// $stream .= "\x0D";
|
||||||
if (function_exists('gzuncompress')) {
|
if (function_exists('gzuncompress')) {
|
||||||
$stream = (strlen($stream) > 0) ? @gzuncompress($stream) : '';
|
$stream = (strlen($stream) > 0) ? @gzuncompress($stream) : '';
|
||||||
} else {
|
} else {
|
||||||
$this->error(sprintf('To handle %s filter, please compile php with zlib support.',$_filter[1]));
|
$this->error(sprintf('To handle %s filter, please compile php with zlib support.',$_filter[1]));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($stream === false) {
|
if ($stream === false) {
|
||||||
$this->error('Error while decompressing stream.');
|
$this->error('Error while decompressing stream.');
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '/LZWDecode':
|
case '/LZWDecode':
|
||||||
include_once('filters/FilterLZW_FPDI.php');
|
include_once('filters/FilterLZW_FPDI.php');
|
||||||
$decoder = new FilterLZW_FPDI($this->fpdi);
|
$decoder = new FilterLZW_FPDI($this->fpdi);
|
||||||
$stream = $decoder->decode($stream);
|
$stream = $decoder->decode($stream);
|
||||||
break;
|
break;
|
||||||
case '/ASCII85Decode':
|
case '/ASCII85Decode':
|
||||||
include_once('filters/FilterASCII85_FPDI.php');
|
include_once('filters/FilterASCII85_FPDI.php');
|
||||||
$decoder = new FilterASCII85_FPDI($this->fpdi);
|
$decoder = new FilterASCII85_FPDI($this->fpdi);
|
||||||
$stream = $decoder->decode($stream);
|
$stream = $decoder->decode($stream);
|
||||||
break;
|
break;
|
||||||
case null:
|
case null:
|
||||||
$stream = $stream;
|
$stream = $stream;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$this->error(sprintf('Unsupported Filter: %s',$_filter[1]));
|
$this->error(sprintf('Unsupported Filter: %s',$_filter[1]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $stream;
|
return $stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Box from a page
|
* Get a Box from a page
|
||||||
* Arrayformat is same as used by fpdf_tpl
|
* Arrayformat is same as used by fpdf_tpl
|
||||||
*
|
*
|
||||||
* @param array $page a /Page
|
* @param array $page a /Page
|
||||||
* @param string $box_index Type of Box @see $availableBoxes
|
* @param string $box_index Type of Box @see $availableBoxes
|
||||||
* @param float Scale factor from user space units to points
|
* @param float Scale factor from user space units to points
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getPageBox($page, $box_index, $k) {
|
function getPageBox($page, $box_index, $k) {
|
||||||
$page = $this->pdf_resolve_object($this->c, $page);
|
$page = $this->pdf_resolve_object($this->c, $page);
|
||||||
$box = null;
|
$box = null;
|
||||||
if (isset($page[1][1][$box_index]))
|
if (isset($page[1][1][$box_index]))
|
||||||
$box =& $page[1][1][$box_index];
|
$box =& $page[1][1][$box_index];
|
||||||
|
|
||||||
if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) {
|
if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) {
|
||||||
$tmp_box = $this->pdf_resolve_object($this->c, $box);
|
$tmp_box = $this->pdf_resolve_object($this->c, $box);
|
||||||
$box = $tmp_box[1];
|
$box = $tmp_box[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) {
|
if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) {
|
||||||
$b =& $box[1];
|
$b =& $box[1];
|
||||||
return array('x' => $b[0][1] / $k,
|
return array('x' => $b[0][1] / $k,
|
||||||
'y' => $b[1][1] / $k,
|
'y' => $b[1][1] / $k,
|
||||||
'w' => abs($b[0][1] - $b[2][1]) / $k,
|
'w' => abs($b[0][1] - $b[2][1]) / $k,
|
||||||
'h' => abs($b[1][1] - $b[3][1]) / $k,
|
'h' => abs($b[1][1] - $b[3][1]) / $k,
|
||||||
'llx' => min($b[0][1], $b[2][1]) / $k,
|
'llx' => min($b[0][1], $b[2][1]) / $k,
|
||||||
'lly' => min($b[1][1], $b[3][1]) / $k,
|
'lly' => min($b[1][1], $b[3][1]) / $k,
|
||||||
'urx' => max($b[0][1], $b[2][1]) / $k,
|
'urx' => max($b[0][1], $b[2][1]) / $k,
|
||||||
'ury' => max($b[1][1], $b[3][1]) / $k,
|
'ury' => max($b[1][1], $b[3][1]) / $k,
|
||||||
);
|
);
|
||||||
} else if (!isset ($page[1][1]['/Parent'])) {
|
} else if (!isset ($page[1][1]['/Parent'])) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return $this->getPageBox($this->pdf_resolve_object($this->c, $page[1][1]['/Parent']), $box_index, $k);
|
return $this->getPageBox($this->pdf_resolve_object($this->c, $page[1][1]['/Parent']), $box_index, $k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all page boxes by page no
|
* Get all page boxes by page no
|
||||||
*
|
*
|
||||||
* @param int The page number
|
* @param int The page number
|
||||||
* @param float Scale factor from user space units to points
|
* @param float Scale factor from user space units to points
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getPageBoxes($pageno, $k) {
|
function getPageBoxes($pageno, $k) {
|
||||||
return $this->_getPageBoxes($this->pages[$pageno - 1], $k);
|
return $this->_getPageBoxes($this->pages[$pageno - 1], $k);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all boxes from /Page
|
* Get all boxes from /Page
|
||||||
*
|
*
|
||||||
* @param array a /Page
|
* @param array a /Page
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function _getPageBoxes($page, $k) {
|
function _getPageBoxes($page, $k) {
|
||||||
$boxes = array();
|
$boxes = array();
|
||||||
|
|
||||||
foreach($this->availableBoxes AS $box) {
|
foreach($this->availableBoxes AS $box) {
|
||||||
if ($_box = $this->getPageBox($page, $box, $k)) {
|
if ($_box = $this->getPageBox($page, $box, $k)) {
|
||||||
$boxes[$box] = $_box;
|
$boxes[$box] = $_box;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $boxes;
|
return $boxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the page rotation by pageno
|
* Get the page rotation by pageno
|
||||||
*
|
*
|
||||||
* @param integer $pageno
|
* @param integer $pageno
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
function getPageRotation($pageno) {
|
function getPageRotation($pageno) {
|
||||||
return $this->_getPageRotation($this->pages[$pageno - 1]);
|
return $this->_getPageRotation($this->pages[$pageno - 1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _getPageRotation($obj) { // $obj = /Page
|
function _getPageRotation($obj) { // $obj = /Page
|
||||||
$obj = $this->pdf_resolve_object($this->c, $obj);
|
$obj = $this->pdf_resolve_object($this->c, $obj);
|
||||||
if (isset ($obj[1][1]['/Rotate'])) {
|
if (isset ($obj[1][1]['/Rotate'])) {
|
||||||
$res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Rotate']);
|
$res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Rotate']);
|
||||||
if ($res[0] == PDF_TYPE_OBJECT)
|
if ($res[0] == PDF_TYPE_OBJECT)
|
||||||
return $res[1];
|
return $res[1];
|
||||||
return $res;
|
return $res;
|
||||||
} else {
|
} else {
|
||||||
if (!isset ($obj[1][1]['/Parent'])) {
|
if (!isset ($obj[1][1]['/Parent'])) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$res = $this->_getPageRotation($obj[1][1]['/Parent']);
|
$res = $this->_getPageRotation($obj[1][1]['/Parent']);
|
||||||
if ($res[0] == PDF_TYPE_OBJECT)
|
if ($res[0] == PDF_TYPE_OBJECT)
|
||||||
return $res[1];
|
return $res[1];
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read all /Page(es)
|
* Read all /Page(es)
|
||||||
*
|
*
|
||||||
* @param object pdf_context
|
* @param object pdf_context
|
||||||
* @param array /Pages
|
* @param array /Pages
|
||||||
* @param array the result-array
|
* @param array the result-array
|
||||||
*/
|
*/
|
||||||
function read_pages(&$c, &$pages, &$result) {
|
function read_pages(&$c, &$pages, &$result) {
|
||||||
// Get the kids dictionary
|
// Get the kids dictionary
|
||||||
$_kids = $this->pdf_resolve_object ($c, $pages[1][1]['/Kids']);
|
$_kids = $this->pdf_resolve_object ($c, $pages[1][1]['/Kids']);
|
||||||
|
|
||||||
if (!is_array($_kids))
|
if (!is_array($_kids))
|
||||||
$this->error('Cannot find /Kids in current /Page-Dictionary');
|
$this->error('Cannot find /Kids in current /Page-Dictionary');
|
||||||
|
|
||||||
if ($_kids[1][0] == PDF_TYPE_ARRAY) {
|
if ($_kids[1][0] == PDF_TYPE_ARRAY) {
|
||||||
$kids = $_kids[1][1];
|
$kids = $_kids[1][1];
|
||||||
} else {
|
} else {
|
||||||
$kids = $_kids[1];
|
$kids = $_kids[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($kids as $v) {
|
foreach ($kids as $v) {
|
||||||
$pg = $this->pdf_resolve_object ($c, $v);
|
$pg = $this->pdf_resolve_object ($c, $v);
|
||||||
if ($pg[1][1]['/Type'][1] === '/Pages') {
|
if ($pg[1][1]['/Type'][1] === '/Pages') {
|
||||||
// If one of the kids is an embedded
|
// If one of the kids is an embedded
|
||||||
// /Pages array, resolve it as well.
|
// /Pages array, resolve it as well.
|
||||||
$this->read_pages($c, $pg, $result);
|
$this->read_pages($c, $pg, $result);
|
||||||
} else {
|
} else {
|
||||||
$result[] = $pg;
|
$result[] = $pg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get PDF-Version
|
* Get PDF-Version
|
||||||
*
|
*
|
||||||
* And reset the PDF Version used in FPDI if needed
|
* And reset the PDF Version used in FPDI if needed
|
||||||
*/
|
*/
|
||||||
function getPDFVersion() {
|
function getPDFVersion() {
|
||||||
parent::getPDFVersion();
|
parent::getPDFVersion();
|
||||||
$this->fpdi->setPDFVersion(max($this->fpdi->getPDFVersion(), $this->pdfVersion));
|
$this->fpdi->setPDFVersion(max($this->fpdi->getPDFVersion(), $this->pdfVersion));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,104 +1,104 @@
|
|||||||
<?php
|
<?php
|
||||||
//
|
//
|
||||||
// FPDI - Version 1.4.2
|
// FPDI - Version 1.4.2
|
||||||
//
|
//
|
||||||
// Copyright 2004-2011 Setasign - Jan Slabon
|
// Copyright 2004-2011 Setasign - Jan Slabon
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
// You may obtain a copy of the License at
|
// You may obtain a copy of the License at
|
||||||
//
|
//
|
||||||
// http://www.apache.org/licenses/LICENSE-2.0
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
//
|
//
|
||||||
// Unless required by applicable law or agreed to in writing, software
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
if (!class_exists('pdf_context', false)) {
|
if (!class_exists('pdf_context', false)) {
|
||||||
|
|
||||||
class pdf_context {
|
class pdf_context {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modi
|
* Modi
|
||||||
*
|
*
|
||||||
* @var integer 0 = file | 1 = string
|
* @var integer 0 = file | 1 = string
|
||||||
*/
|
*/
|
||||||
var $_mode = 0;
|
var $_mode = 0;
|
||||||
|
|
||||||
var $file;
|
var $file;
|
||||||
var $buffer;
|
var $buffer;
|
||||||
var $offset;
|
var $offset;
|
||||||
var $length;
|
var $length;
|
||||||
|
|
||||||
var $stack;
|
var $stack;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
|
||||||
function pdf_context(&$f) {
|
function pdf_context(&$f) {
|
||||||
$this->file =& $f;
|
$this->file =& $f;
|
||||||
if (is_string($this->file))
|
if (is_string($this->file))
|
||||||
$this->_mode = 1;
|
$this->_mode = 1;
|
||||||
$this->reset();
|
$this->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optionally move the file
|
// Optionally move the file
|
||||||
// pointer to a new location
|
// pointer to a new location
|
||||||
// and reset the buffered data
|
// and reset the buffered data
|
||||||
|
|
||||||
function reset($pos = null, $l = 100) {
|
function reset($pos = null, $l = 100) {
|
||||||
if ($this->_mode == 0) {
|
if ($this->_mode == 0) {
|
||||||
if (!is_null ($pos)) {
|
if (!is_null ($pos)) {
|
||||||
fseek ($this->file, $pos);
|
fseek ($this->file, $pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->buffer = $l > 0 ? fread($this->file, $l) : '';
|
$this->buffer = $l > 0 ? fread($this->file, $l) : '';
|
||||||
$this->length = strlen($this->buffer);
|
$this->length = strlen($this->buffer);
|
||||||
if ($this->length < $l)
|
if ($this->length < $l)
|
||||||
$this->increase_length($l - $this->length);
|
$this->increase_length($l - $this->length);
|
||||||
} else {
|
} else {
|
||||||
$this->buffer = $this->file;
|
$this->buffer = $this->file;
|
||||||
$this->length = strlen($this->buffer);
|
$this->length = strlen($this->buffer);
|
||||||
}
|
}
|
||||||
$this->offset = 0;
|
$this->offset = 0;
|
||||||
$this->stack = array();
|
$this->stack = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure that there is at least one
|
// Make sure that there is at least one
|
||||||
// character beyond the current offset in
|
// character beyond the current offset in
|
||||||
// the buffer to prevent the tokenizer
|
// the buffer to prevent the tokenizer
|
||||||
// from attempting to access data that does
|
// from attempting to access data that does
|
||||||
// not exist
|
// not exist
|
||||||
|
|
||||||
function ensure_content() {
|
function ensure_content() {
|
||||||
if ($this->offset >= $this->length - 1) {
|
if ($this->offset >= $this->length - 1) {
|
||||||
return $this->increase_length();
|
return $this->increase_length();
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forcefully read more data into the buffer
|
// Forcefully read more data into the buffer
|
||||||
|
|
||||||
function increase_length($l = 100) {
|
function increase_length($l = 100) {
|
||||||
if ($this->_mode == 0 && feof($this->file)) {
|
if ($this->_mode == 0 && feof($this->file)) {
|
||||||
return false;
|
return false;
|
||||||
} else if ($this->_mode == 0) {
|
} else if ($this->_mode == 0) {
|
||||||
$totalLength = $this->length + $l;
|
$totalLength = $this->length + $l;
|
||||||
do {
|
do {
|
||||||
$toRead = $totalLength - $this->length;
|
$toRead = $totalLength - $this->length;
|
||||||
if ($toRead < 1)
|
if ($toRead < 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
$this->buffer .= fread($this->file, $toRead);
|
$this->buffer .= fread($this->file, $toRead);
|
||||||
} while ((($this->length = strlen($this->buffer)) != $totalLength) && !feof($this->file));
|
} while ((($this->length = strlen($this->buffer)) != $totalLength) && !feof($this->file));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,47 +1,47 @@
|
|||||||
<?php
|
<?php
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// File name : bul.php
|
// File name : bul.php
|
||||||
// Begin : 2004-03-03
|
// Begin : 2004-03-03
|
||||||
// Last Update : 2010-03-22
|
// Last Update : 2010-03-22
|
||||||
//
|
//
|
||||||
// Description : Language module for TCPDF
|
// Description : Language module for TCPDF
|
||||||
// (contains translated texts)
|
// (contains translated texts)
|
||||||
// Arabic
|
// Arabic
|
||||||
//
|
//
|
||||||
// Author: Nicola Asuni
|
// Author: Nicola Asuni
|
||||||
//
|
//
|
||||||
// (c) Copyright:
|
// (c) Copyright:
|
||||||
// Nicola Asuni
|
// Nicola Asuni
|
||||||
// Tecnick.com LTD
|
// Tecnick.com LTD
|
||||||
// Manor Coach House, Church Hill
|
// Manor Coach House, Church Hill
|
||||||
// Aldershot, Hants, GU12 4RQ
|
// Aldershot, Hants, GU12 4RQ
|
||||||
// UK
|
// UK
|
||||||
// www.tecnick.com
|
// www.tecnick.com
|
||||||
// info@tecnick.com
|
// info@tecnick.com
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TCPDF language file (contains translated texts).
|
* TCPDF language file (contains translated texts).
|
||||||
* @package com.tecnick.tcpdf
|
* @package com.tecnick.tcpdf
|
||||||
* @brief TCPDF language file: Bulgarian
|
* @brief TCPDF language file: Bulgarian
|
||||||
* @author Nicola Asuni
|
* @author Nicola Asuni
|
||||||
* @since 2012-03-22
|
* @since 2012-03-22
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Bulgarian
|
// Bulgarian
|
||||||
|
|
||||||
global $l;
|
global $l;
|
||||||
$l = Array();
|
$l = Array();
|
||||||
|
|
||||||
// PAGE META DESCRIPTORS --------------------------------------
|
// PAGE META DESCRIPTORS --------------------------------------
|
||||||
|
|
||||||
$l['a_meta_charset'] = 'UTF-8';
|
$l['a_meta_charset'] = 'UTF-8';
|
||||||
$l['a_meta_dir'] = 'ltr';
|
$l['a_meta_dir'] = 'ltr';
|
||||||
$l['a_meta_language'] = 'bg';
|
$l['a_meta_language'] = 'bg';
|
||||||
|
|
||||||
// TRANSLATIONS --------------------------------------
|
// TRANSLATIONS --------------------------------------
|
||||||
$l['w_page'] = 'страница';
|
$l['w_page'] = 'страница';
|
||||||
|
|
||||||
//============================================================+
|
//============================================================+
|
||||||
// END OF FILE
|
// END OF FILE
|
||||||
//============================================================+
|
//============================================================+
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@ -1,26 +1,26 @@
|
|||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
-- Copyright (C) 2011 Philippe GRAND <philippe.grand@atoo-net.com>
|
-- Copyright (C) 2011 Philippe GRAND <philippe.grand@atoo-net.com>
|
||||||
--
|
--
|
||||||
-- This program is free software; you can redistribute it and/or modify
|
-- 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
|
-- it under the terms of the GNU General Public License as published by
|
||||||
-- the Free Software Foundation; either version 2 of the License, or
|
-- the Free Software Foundation; either version 2 of the License, or
|
||||||
-- (at your option) any later version.
|
-- (at your option) any later version.
|
||||||
--
|
--
|
||||||
-- This program is distributed in the hope that it will be useful,
|
-- This program is distributed in the hope that it will be useful,
|
||||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
-- GNU General Public License for more details.
|
-- GNU General Public License for more details.
|
||||||
--
|
--
|
||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
--
|
--
|
||||||
-- ========================================================================
|
-- ========================================================================
|
||||||
|
|
||||||
create table llx_c_availability
|
create table llx_c_availability
|
||||||
(
|
(
|
||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
code varchar(30) NOT NULL,
|
code varchar(30) NOT NULL,
|
||||||
label varchar(60) NOT NULL,
|
label varchar(60) NOT NULL,
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL
|
||||||
|
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@ -65,7 +65,7 @@ DatabaseSuperUserAccess=Database server - Superuser access
|
|||||||
CheckToCreateDatabase=Check box if database does not exist and must be created.<br>In this case, you must fill the login/password for superuser account at the bottom of this page.
|
CheckToCreateDatabase=Check box if database does not exist and must be created.<br>In this case, you must fill the login/password for superuser account at the bottom of this page.
|
||||||
CheckToCreateUser=Check box if database owner does not exist and must be created.<br>In this case, you must choose its login and password and also fill the login/password for the superuser account at the bottom of this page. If this box is unchecked, owner database and its passwords must exists.
|
CheckToCreateUser=Check box if database owner does not exist and must be created.<br>In this case, you must choose its login and password and also fill the login/password for the superuser account at the bottom of this page. If this box is unchecked, owner database and its passwords must exists.
|
||||||
Experimental=(experimental)
|
Experimental=(experimental)
|
||||||
DatabaseRootLoginDescription=Login of the user allowed to create new databases or new users, useless if your database and your database login already exists (like when you're hosted by a web hosting provider).
|
DatabaseRootLoginDescription=Login of the user allowed to create new databases or new users, mandatory if your database or its owner does not already exists.
|
||||||
KeepEmptyIfNoPassword=Leave empty if user has no password (avoid this)
|
KeepEmptyIfNoPassword=Leave empty if user has no password (avoid this)
|
||||||
SaveConfigurationFile=Save values
|
SaveConfigurationFile=Save values
|
||||||
ConfigurationSaving=Saving configuration file
|
ConfigurationSaving=Saving configuration file
|
||||||
|
|||||||
@ -12,7 +12,7 @@ ShowSupplier=Mostrar proveedor
|
|||||||
OrderDate=Fecha de pedido
|
OrderDate=Fecha de pedido
|
||||||
BuyingPrice=Precio de compra
|
BuyingPrice=Precio de compra
|
||||||
BuyingPriceMin=Precio mínimo de compra
|
BuyingPriceMin=Precio mínimo de compra
|
||||||
BuyingPriceMinShort=Precio mín compra
|
BuyingPriceMinShort=Precio mín. compra
|
||||||
AddSupplierPrice=Añadir precio de proveedor
|
AddSupplierPrice=Añadir precio de proveedor
|
||||||
ChangeSupplierPrice=Modificar precio de proveedor
|
ChangeSupplierPrice=Modificar precio de proveedor
|
||||||
ErrorSupplierCountryIsNotDefined=El país de este proveedor no está definido, corrígalo en su ficha
|
ErrorSupplierCountryIsNotDefined=El país de este proveedor no está definido, corrígalo en su ficha
|
||||||
|
|||||||
@ -77,7 +77,7 @@ WithBankUsingRIB=Para las cuentas bancarias que utilizan CCC
|
|||||||
WithBankUsingBANBIC=Para las cuentas bancarias que utilizan el código BAN/BIC/SWIFT
|
WithBankUsingBANBIC=Para las cuentas bancarias que utilizan el código BAN/BIC/SWIFT
|
||||||
BankToReceiveWithdraw=Cuenta bancaria receptora de las domiciliaciones
|
BankToReceiveWithdraw=Cuenta bancaria receptora de las domiciliaciones
|
||||||
CreditDate=Abonada el
|
CreditDate=Abonada el
|
||||||
WithdrawalFileNotCapable=No es posible generar fichero bancario de domiciliacion para su pais
|
WithdrawalFileNotCapable=No es posible generar el fichero bancario de domiciliación para su país.
|
||||||
ShowWithdraw=Ver domiciliación
|
ShowWithdraw=Ver domiciliación
|
||||||
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene pendiente algún pago por domiciliación, no será cerrada para permitir la gestión de la domiciliación.
|
IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene pendiente algún pago por domiciliación, no será cerrada para permitir la gestión de la domiciliación.
|
||||||
DoStandingOrdersBeforePayments=Esta pestaña le permite realizar una petición de domiciliación. Una vez terminada, puede ingresar el pago en la factura para proceder a su cierre.
|
DoStandingOrdersBeforePayments=Esta pestaña le permite realizar una petición de domiciliación. Una vez terminada, puede ingresar el pago en la factura para proceder a su cierre.
|
||||||
|
|||||||
@ -65,7 +65,7 @@ DatabaseSuperUserAccess=Serveur de base de données - Accès super utilisateur
|
|||||||
CheckToCreateDatabase=Cochez cette option si la base de données n'existe pas et doit être créée.<br>Dans ce cas, il faut renseigner le login/mot de passe du super-utilisateur au bas de cette page.
|
CheckToCreateDatabase=Cochez cette option si la base de données n'existe pas et doit être créée.<br>Dans ce cas, il faut renseigner le login/mot de passe du super-utilisateur au bas de cette page.
|
||||||
CheckToCreateUser=Cochez cette option si l'utilisateur propriétaire n'existe pas et doit être créé.<br>Dans ce cas, il faut renseigner le nom et mot de passe du propriétaire à créer ainsi que le login/mot de passe du superutilisateur au bas de cette page. Si la case n'est pas cochée, le nom et mot de passe du propriétaire doivent exister.
|
CheckToCreateUser=Cochez cette option si l'utilisateur propriétaire n'existe pas et doit être créé.<br>Dans ce cas, il faut renseigner le nom et mot de passe du propriétaire à créer ainsi que le login/mot de passe du superutilisateur au bas de cette page. Si la case n'est pas cochée, le nom et mot de passe du propriétaire doivent exister.
|
||||||
Experimental=(expérimental)
|
Experimental=(expérimental)
|
||||||
DatabaseRootLoginDescription=Login de l'utilisateur de la base ayant les droits de création de bases de données ou de comptes pour la base, inutile si la base et son compte d'accès existent déjà (comme lorsque vous êtes chez un hébergeur).
|
DatabaseRootLoginDescription=Login de l'utilisateur de la base ayant les droits de création de bases de données ou de comptes pour la base, requis si la base ou son propriétaire n'existe pas déjà et doivent être créés.
|
||||||
KeepEmptyIfNoPassword=Laissez vide si l'administrateur n'a pas de mot de passe
|
KeepEmptyIfNoPassword=Laissez vide si l'administrateur n'a pas de mot de passe
|
||||||
SaveConfigurationFile=Enregistrement du fichier de configuration
|
SaveConfigurationFile=Enregistrement du fichier de configuration
|
||||||
ConfigurationSaving=Enregistrement du fichier de configuration
|
ConfigurationSaving=Enregistrement du fichier de configuration
|
||||||
|
|||||||
@ -32,7 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||||||
|
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
$ref=GETPOST('ref','alpha');
|
$ref=GETPOST('ref','alpha');
|
||||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
|
||||||
|
$mode = GETPOST('mode', 'alpha');
|
||||||
|
$mine = ($mode == 'mine' ? 1 : 0);
|
||||||
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
|
||||||
|
|
||||||
$object = new Project($db);
|
$object = new Project($db);
|
||||||
@ -99,7 +101,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$head=project_prepare_head($object);
|
$head=project_prepare_head($object);
|
||||||
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
dol_fiche_head($head, $tab, $langs->trans("Project"),0,($object->public?'projectpub':'project'));
|
||||||
|
|
||||||
$param=($_REQUEST["mode"]=='mine'?'&mode=mine':'');
|
$param=($mode=='mine'?'&mode=mine':'');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
@ -110,8 +112,11 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print $langs->trans("Ref");
|
print $langs->trans("Ref");
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
// Define a complementary filter for search of next/prev ref.
|
// Define a complementary filter for search of next/prev ref.
|
||||||
$objectsListId = $object->getProjectsAuthorizedForUser($user,$mine,1);
|
if (! $user->rights->projet->all->lire)
|
||||||
$object->next_prev_filter=" rowid in (".$objectsListId.")";
|
{
|
||||||
|
$projectsListId = $object->getProjectsAuthorizedForUser($user,$mine,0);
|
||||||
|
$object->next_prev_filter=" rowid in (".(count($projectsListId)?join(',',array_keys($projectsListId)):'0').")";
|
||||||
|
}
|
||||||
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
|
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', '', $param);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
|||||||
@ -37,19 +37,19 @@ $socid = GETPOST('socid','int');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
$hookmanager->initHooks(array('agendathirdparty'));
|
$hookmanager->initHooks(array('agendathirdparty'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$parameters=array('id'=>$socid);
|
$parameters=array('id'=>$socid);
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,21 +37,21 @@ $socid = GETPOST('socid','int');
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
$result = restrictedArea($user, 'societe', $socid, '&societe');
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
$hookmanager->initHooks(array('infothirdparty'));
|
$hookmanager->initHooks(array('infothirdparty'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$parameters=array('id'=>$socid);
|
$parameters=array('id'=>$socid);
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -77,9 +77,15 @@ $img_button=dol_buildpath($path.'/theme/amarok/img/button_bg.png',1);
|
|||||||
*, html {
|
*, html {
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
font-size:100%;
|
font-size:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*.fiche ul {
|
||||||
|
margin:0.5em;
|
||||||
|
padding:0.5em;
|
||||||
|
padding-left: 2em;
|
||||||
|
}*/
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color:#f5f5f5;
|
background-color:#f5f5f5;
|
||||||
<?php if ($_SESSION['dol_login'] != '') {?>
|
<?php if ($_SESSION['dol_login'] != '') {?>
|
||||||
@ -517,38 +523,195 @@ div.vmenu {
|
|||||||
/* Panes for ECM or Filemanager */
|
/* Panes for ECM or Filemanager */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
|
||||||
#containerlayout .layout-with-no-border {
|
#containerlayout .layout-with-no-border {
|
||||||
border:0 !important;
|
border: 0 !important;
|
||||||
border-width:0 !important;
|
border-width: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerlayout .layout-padding {
|
#containerlayout .layout-padding {
|
||||||
padding:2px !important;
|
padding: 2px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerlayout .ui-layout-pane {/* all 'panes' */
|
/*
|
||||||
background:#ffffff;
|
* PANES and CONTENT-DIVs
|
||||||
border:1px solid #bbbbbb;
|
*/
|
||||||
padding:0px;
|
#containerlayout .ui-layout-pane { /* all 'panes' */
|
||||||
overflow:auto;
|
background: #FFF;
|
||||||
|
border: 1px solid #BBB;
|
||||||
|
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
|
||||||
|
otherwise you may get double-scrollbars - on the pane AND on the content-div
|
||||||
|
*/
|
||||||
|
padding: 0px;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
|
||||||
#containerlayout .ui-layout-content {
|
#containerlayout .ui-layout-content {
|
||||||
padding:10px;
|
padding: 10px;
|
||||||
position:relative; /* contain floated or positioned elements */
|
position: relative; /* contain floated or positioned elements */
|
||||||
overflow:auto; /* add scrolling to content-div */
|
overflow: auto; /* add scrolling to content-div */
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerlayout .pane-in.ecm-in-layout-center.ui-layout-pane.ui-layout-pane-center {
|
/*
|
||||||
border:0px solid #bbbbbb;
|
* RESIZER-BARS
|
||||||
border-bottom:1px solid #bbbbbb;
|
*/
|
||||||
|
.ui-layout-resizer { /* all 'resizer-bars' */
|
||||||
|
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px !important;
|
||||||
|
}
|
||||||
|
.ui-layout-resizer-hover { /* affects both open and closed states */
|
||||||
|
}
|
||||||
|
/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
|
||||||
|
otherwise color shifts while dragging when bar can't keep up with mouse */
|
||||||
|
/*.ui-layout-resizer-open-hover ,*/ /* hover-color to 'resize' */
|
||||||
|
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
|
||||||
|
background: #DDD;
|
||||||
|
width: <?php echo (empty($conf->browser->phone)?'8':'24'); ?>px;
|
||||||
|
}
|
||||||
|
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
|
||||||
|
border-left: 1px solid #BBB;
|
||||||
|
border-right: 1px solid #BBB;
|
||||||
|
}
|
||||||
|
/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
|
||||||
|
.ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
|
||||||
|
background: #E1A4A4; /* red */
|
||||||
|
}
|
||||||
|
.ui-layout-resizer-closed {
|
||||||
|
background-color: #DDDDDD;
|
||||||
|
}
|
||||||
|
.ui-layout-resizer-closed:hover {
|
||||||
|
background-color: #EEDDDD;
|
||||||
|
}
|
||||||
|
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
|
||||||
|
opacity: .10; /* show only a slight shadow */
|
||||||
|
filter: alpha(opacity=10);
|
||||||
|
}
|
||||||
|
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
|
||||||
|
opacity: 1.00; /* on-hover, show the resizer-bar normally */
|
||||||
|
filter: alpha(opacity=100);
|
||||||
|
}
|
||||||
|
/* sliding resizer - add 'outside-border' to resizer on-hover */
|
||||||
|
/* this sample illustrates how to target specific panes and states */
|
||||||
|
/*.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
|
||||||
|
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
|
||||||
|
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
|
||||||
|
.ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TOGGLER-BUTTONS
|
||||||
|
*/
|
||||||
|
.ui-layout-toggler {
|
||||||
|
<?php if (empty($conf->browser->phone)) { ?>
|
||||||
|
border-top: 1px solid #AAA; /* match pane-border */
|
||||||
|
border-right: 1px solid #AAA; /* match pane-border */
|
||||||
|
border-bottom: 1px solid #AAA; /* match pane-border */
|
||||||
|
background-color: #DDD;
|
||||||
|
top: 5px !important;
|
||||||
|
<?php } else { ?>
|
||||||
|
diplay: none;
|
||||||
|
<?php } ?>
|
||||||
|
}
|
||||||
|
.ui-layout-toggler-open {
|
||||||
|
height: 54px !important;
|
||||||
|
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important;
|
||||||
|
-moz-border-radius:0px 10px 10px 0px;
|
||||||
|
-webkit-border-radius:0px 10px 10px 0px;
|
||||||
|
border-radius:0px 10px 10px 0px;
|
||||||
|
}
|
||||||
|
.ui-layout-toggler-closed {
|
||||||
|
height: <?php echo (empty($conf->browser->phone)?'54':'2'); ?>px !important;
|
||||||
|
width: <?php echo (empty($conf->browser->phone)?'7':'22'); ?>px !important;
|
||||||
|
-moz-border-radius:0px 10px 10px 0px;
|
||||||
|
-webkit-border-radius:0px 10px 10px 0px;
|
||||||
|
border-radius:0px 10px 10px 0px;
|
||||||
|
}
|
||||||
|
.ui-layout-toggler .content { /* style the text we put INSIDE the togglers */
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
|
||||||
}
|
}
|
||||||
|
|
||||||
#containerlayout .pane-in.ecm-in-layout-south.layout-padding.ui-layout-pane.ui-layout-pane-south {
|
/* hide the toggler-button when the pane is 'slid open' */
|
||||||
border:0px solid #bbbbbb;
|
.ui-layout-resizer-sliding ui-layout-toggler {
|
||||||
border-top:1px solid #bbbbbb;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ui-layout-north {
|
||||||
|
height: <?php print (empty($conf->browser->phone)?'54':'21'); ?>px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ECM */
|
||||||
|
|
||||||
|
#containerlayout .ecm-layout-pane { /* all 'panes' */
|
||||||
|
background: #FFF;
|
||||||
|
border: 1px solid #BBB;
|
||||||
|
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
|
||||||
|
otherwise you may get double-scrollbars - on the pane AND on the content-div
|
||||||
|
*/
|
||||||
|
padding: 0px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
|
||||||
|
#containerlayout .ecm-layout-content {
|
||||||
|
padding: 10px;
|
||||||
|
position: relative; /* contain floated or positioned elements */
|
||||||
|
overflow: auto; /* add scrolling to content-div */
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecm-layout-toggler {
|
||||||
|
border-top: 1px solid #AAA; /* match pane-border */
|
||||||
|
border-right: 1px solid #AAA; /* match pane-border */
|
||||||
|
border-bottom: 1px solid #AAA; /* match pane-border */
|
||||||
|
background-color: #CCC;
|
||||||
|
}
|
||||||
|
.ecm-layout-toggler-open {
|
||||||
|
height: 48px !important;
|
||||||
|
width: 6px !important;
|
||||||
|
-moz-border-radius:0px 10px 10px 0px;
|
||||||
|
-webkit-border-radius:0px 10px 10px 0px;
|
||||||
|
border-radius:0px 10px 10px 0px;
|
||||||
|
}
|
||||||
|
.ecm-layout-toggler-closed {
|
||||||
|
height: 48px !important;
|
||||||
|
width: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecm-layout-toggler .content { /* style the text we put INSIDE the togglers */
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
|
||||||
|
}
|
||||||
|
#ecm-layout-west-resizer {
|
||||||
|
width: 6px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecm-layout-resizer { /* all 'resizer-bars' */
|
||||||
|
border: 1px solid #BBB;
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
.ecm-layout-resizer-closed {
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecm-in-layout-center {
|
||||||
|
border-left: 1px !important;
|
||||||
|
border-right: 0px !important;
|
||||||
|
border-top: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ecm-in-layout-south {
|
||||||
|
border-left: 0px !important;
|
||||||
|
border-right: 0px !important;
|
||||||
|
border-bottom: 0px !important;
|
||||||
|
padding: 4px 0 4px 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Onglets */
|
/* Onglets */
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
@ -1003,6 +1166,9 @@ div.error {
|
|||||||
* Other
|
* Other
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
.product_line_stock_ok { color: #002200; }
|
||||||
|
.product_line_stock_too_low { color: #664400; }
|
||||||
|
|
||||||
.fieldrequired {
|
.fieldrequired {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
color:#333333;
|
color:#333333;
|
||||||
@ -1024,6 +1190,40 @@ div.titre {
|
|||||||
padding-bottom:2px;
|
padding-bottom:2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#dolpaymenttable { width: 600px; font-size: 13px; }
|
||||||
|
#tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; }
|
||||||
|
#tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; }
|
||||||
|
#tablepublicpayment tr.liste_total { border-bottom: 1px solid #CCCCCC !important; }
|
||||||
|
#tablepublicpayment tr.liste_total td { border-top: none; }
|
||||||
|
|
||||||
|
#divsubscribe { width: 700px; }
|
||||||
|
#tablesubscribe { width: 100%; }
|
||||||
|
|
||||||
|
div.table-border {
|
||||||
|
display:table;
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border: 1px solid #DDD;
|
||||||
|
}
|
||||||
|
div.table-border-row {
|
||||||
|
display:table-row;
|
||||||
|
}
|
||||||
|
div.table-key-border-col {
|
||||||
|
display:table-cell;
|
||||||
|
width: 25%;
|
||||||
|
vertical-align:top;
|
||||||
|
padding: 1px 2px 1px 1px;
|
||||||
|
border: 1px solid #DDD;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
div.table-val-border-col {
|
||||||
|
display:table-cell;
|
||||||
|
width:auto;
|
||||||
|
padding: 1px 2px 1px 1px;
|
||||||
|
border: 1px solid #DDD;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
/* Formulaire confirmation (When Ajax JQuery is used) */
|
/* Formulaire confirmation (When Ajax JQuery is used) */
|
||||||
@ -1636,3 +1836,133 @@ span.cke_skin_kama {padding:0px !important;}
|
|||||||
/* ============================================================================== */
|
/* ============================================================================== */
|
||||||
|
|
||||||
.template-upload {height:72px !important;}
|
.template-upload {height:72px !important;}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* JSGantt */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
div.scroll2 {
|
||||||
|
width: <?php print isset($_SESSION['dol_screenwidth'])?max($_SESSION['dol_screenwidth']-830,450):'450'; ?>px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* jFileTree */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
.ecmfiletree {
|
||||||
|
width: 99%;
|
||||||
|
height: 99%;
|
||||||
|
background: #FFF;
|
||||||
|
padding-left: 2px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fileview {
|
||||||
|
width: 99%;
|
||||||
|
height: 99%;
|
||||||
|
background: #FFF;
|
||||||
|
padding-left: 2px;
|
||||||
|
padding-top: 4px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.filedirelem {
|
||||||
|
position: relative;
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.filedirelem {
|
||||||
|
padding: 2px;
|
||||||
|
margin: 0 5px 5px 5px;
|
||||||
|
}
|
||||||
|
ul.filedirelem li {
|
||||||
|
list-style: none;
|
||||||
|
padding: 2px;
|
||||||
|
margin: 0 10px 20px 10px;
|
||||||
|
width: 160px;
|
||||||
|
height: 120px;
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
float: <?php print $left; ?>;
|
||||||
|
border: solid 1px #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
ui-layout-north {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.ecmjqft {
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.ecmjqft li {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0px;
|
||||||
|
padding-left: 20px;
|
||||||
|
margin: 0px;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.ecmjqft a {
|
||||||
|
line-height: 16px;
|
||||||
|
vertical-align: middle;
|
||||||
|
color: #333;
|
||||||
|
padding: 0px 0px;
|
||||||
|
font-weight:normal;
|
||||||
|
display: inline-block !important;
|
||||||
|
/* float: left;*/
|
||||||
|
}
|
||||||
|
ul.ecmjqft a:active {
|
||||||
|
font-weight: bold !important;
|
||||||
|
}
|
||||||
|
ul.ecmjqft a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
div.ecmjqft {
|
||||||
|
vertical-align: middle;
|
||||||
|
display: inline-block !important;
|
||||||
|
text-align: right;
|
||||||
|
position:absolute;
|
||||||
|
right:4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Core Styles */
|
||||||
|
.ecmjqft LI.directory { font-weight:normal; background: url(<?php echo dol_buildpath($path.'/theme/common/treemenu/folder2.png',1); ?>) left top no-repeat; }
|
||||||
|
.ecmjqft LI.expanded { font-weight:normal; background: url(<?php echo dol_buildpath($path.'/theme/common/treemenu/folder2-expanded.png',1); ?>) left top no-repeat; }
|
||||||
|
.ecmjqft LI.wait { font-weight:normal; background: url(<?php echo dol_buildpath('/theme/eldy/img/working.gif',1); ?>) left top no-repeat; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ============================================================================== */
|
||||||
|
/* jNotify */
|
||||||
|
/* ============================================================================== */
|
||||||
|
|
||||||
|
.jnotify-container {
|
||||||
|
position: fixed !important;
|
||||||
|
<?php if (! empty($conf->global->MAIN_JQUERY_JNOTIFY_BOTTOM)) { ?>
|
||||||
|
top: auto !important;
|
||||||
|
bottom: 4px !important;
|
||||||
|
<?php } ?>
|
||||||
|
text-align: center;
|
||||||
|
min-width: 500px;
|
||||||
|
width: auto;
|
||||||
|
padding-left: 10px !important;
|
||||||
|
padding-right: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* use or not ? */
|
||||||
|
div.jnotify-background {
|
||||||
|
opacity : 0.95 !important;
|
||||||
|
-moz-box-shadow: 4px 4px 4px #AAA !important;
|
||||||
|
-webkit-box-shadow: 4px 4px 4px #AAA !important;
|
||||||
|
box-shadow: 4px 4px 4px #AAA !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -307,9 +307,27 @@ if ($action == 'update' && ! $_POST["cancel"])
|
|||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->begin();
|
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|
||||||
|
// Test if new login
|
||||||
|
if (GETPOST("login") && GETPOST("login") != $object->login)
|
||||||
|
{
|
||||||
|
dol_syslog("New login ".$object->login." is requested. We test it does not exists.");
|
||||||
|
$tmpuser=new User($db);
|
||||||
|
$result=$tmpuser->fetch(0, GETPOST("login"));
|
||||||
|
if ($result > 0)
|
||||||
|
{
|
||||||
|
$message='<div class="error">'.$langs->trans("ErrorLoginAlreadyExists").'</div>';
|
||||||
|
$action="edit"; // Go back to create page
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$object->oldcopy=dol_clone($object);
|
$object->oldcopy=dol_clone($object);
|
||||||
|
|
||||||
$object->lastname = GETPOST("nom");
|
$object->lastname = GETPOST("nom");
|
||||||
@ -454,6 +472,12 @@ if ($action == 'update' && ! $_POST["cancel"])
|
|||||||
{
|
{
|
||||||
$message.='<div class="ok">'.$langs->trans("UserModified").'</div>';
|
$message.='<div class="ok">'.$langs->trans("UserModified").'</div>';
|
||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
|
$login=$_SESSION["dol_login"];
|
||||||
|
if ($login && $login == $object->oldcopy->login && $object->oldcopy->login != $object->login) // Current user has changed its login
|
||||||
|
{
|
||||||
|
$_SESSION["dol_login"]=$object->login; // Set new login to avoid disconnect at next page
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -769,7 +793,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// We do not use a field password but a field text to show new password to use.
|
// We do not use a field password but a field text to show new password to use.
|
||||||
print '<input size="30" maxsize="32" type="text" name="password" value="'.$password.'">';
|
print '<input size="30" maxsize="32" type="text" name="password" value="'.$password.'" autocomplete="off">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1648,7 +1672,7 @@ else
|
|||||||
}
|
}
|
||||||
else if ($caneditpassword)
|
else if ($caneditpassword)
|
||||||
{
|
{
|
||||||
$text='<input size="12" maxlength="32" type="password" class="flat" name="password" value="'.$object->pass.'">';
|
$text='<input size="12" maxlength="32" type="password" class="flat" name="password" value="'.$object->pass.'" autocomplete="off">';
|
||||||
if ($dolibarr_main_authentication && $dolibarr_main_authentication == 'http')
|
if ($dolibarr_main_authentication && $dolibarr_main_authentication == 'http')
|
||||||
{
|
{
|
||||||
$text=$form->textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning');
|
$text=$form->textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning');
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $path=dirname(__FILE__).'/';
|
|||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You ar usingr PH for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user