Add php files
This commit is contained in:
8
modules/EcmProductB2Bs/AjaxSearch/AjaxSearch.php
Executable file
8
modules/EcmProductB2Bs/AjaxSearch/AjaxSearch.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
126
modules/EcmProductB2Bs/AjaxSearchQuery.php
Executable file
126
modules/EcmProductB2Bs/AjaxSearchQuery.php
Executable file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
if(isset($_REQUEST['as_inputSearch']) && $_REQUEST['as_inputSearch'] != '') {
|
||||
$AS_INPUTSEARCH = strtoupper($_REQUEST['as_inputSearch']);
|
||||
|
||||
$language_translate = array(
|
||||
'en_us' => 'en',
|
||||
'ge_ge' => 'de',
|
||||
'pl_pl' => 'pl'
|
||||
);
|
||||
|
||||
if(isset($_REQUEST['ecmlanguage']) && $_REQUEST['ecmlanguage'] != '') {
|
||||
if(isset($language_translate[$_REQUEST['ecmlanguage']]) && $language_translate[$_REQUEST['ecmlanguage']] != '') {
|
||||
$use_language = $language_translate[$_REQUEST['ecmlanguage']];
|
||||
}
|
||||
}
|
||||
|
||||
$query = "SELECT DISTINCT";
|
||||
$query .= " `pr`.`id`";
|
||||
$query .= ", `pr`.`code`";
|
||||
$query .= ", `pr`.`name`";
|
||||
$query .= ", `pr`.`selling_price`";
|
||||
$query .= ", `pr`.`purchase_price`";
|
||||
$query .= ", `pr`.`vat_id`";
|
||||
$query .= ", `pr`.`vat_name`";
|
||||
$query .= ", `pr`.`vat_value`";
|
||||
$query .= ", `pr`.`exchange_rate_id` as `currency_id`";
|
||||
$query .= ", `pr`.`product_category_id` as `category_id`";
|
||||
$query .= ", `pr`.`usage_unit_id` as `unit_id`";
|
||||
|
||||
if(isset($use_language)) {
|
||||
$query .= ", `pr_lang`.`short_description`";
|
||||
$query .= ", `pr_lang`.`long_description`";
|
||||
}
|
||||
|
||||
$query .= " FROM";
|
||||
$query .= " `ecmproducts` as `pr`";
|
||||
if(isset($use_language))
|
||||
$query .= " LEFT JOIN `ecmproduct_language_".$use_language."_view` as `pr_lang` ON `pr`.`id` = `pr_lang`.`ecmproduct_id`";
|
||||
|
||||
$query .= " WHERE";
|
||||
$query .= " (";
|
||||
$query .= "UPPER(`pr`.`code`) LIKE '%$AS_INPUTSEARCH'";
|
||||
$query .= " || UPPER(`pr`.`code`) LIKE '$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr`.`code`) LIKE '%$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr`.`name`) LIKE '%$AS_INPUTSEARCH'";
|
||||
$query .= " || UPPER(`pr`.`name`) LIKE '$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr`.`name`) LIKE '%$AS_INPUTSEARCH%'";
|
||||
|
||||
if(isset($use_language)) {
|
||||
$query .= " || UPPER(`pr_lang`.`long_description`) LIKE '%$AS_INPUTSEARCH'";
|
||||
$query .= " || UPPER(`pr_lang`.`long_description`) LIKE '%$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr_lang`.`long_description`) LIKE '$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr_lang`.`short_description`) LIKE '%$AS_INPUTSEARCH'";
|
||||
$query .= " || UPPER(`pr_lang`.`short_description`) LIKE '%$AS_INPUTSEARCH%'";
|
||||
$query .= " || UPPER(`pr_lang`.`short_description`) LIKE '$AS_INPUTSEARCH%'";
|
||||
}
|
||||
|
||||
$query .= ")";
|
||||
$query .= " AND `pr`.`deleted`='0'";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
//print $query;
|
||||
|
||||
global $sugar_config;
|
||||
$defaultCurrency = $sugar_config['default_currency_symbol'];
|
||||
$currencies = array ( -99 => $defaultCurrency );
|
||||
|
||||
$arr = array();
|
||||
if($result)
|
||||
while($row = $GLOBALS['db']->fetchByAssoc($result)) {
|
||||
|
||||
$row['price'] = $row['selling_price'];
|
||||
|
||||
$row['purchase_price'] = format_number($row['purchase_price']);
|
||||
|
||||
$row['selling_price'] = format_number($row['selling_price']);
|
||||
|
||||
|
||||
if(array_key_exists($row['currency_id'],$currencies))
|
||||
$row['currency_symbol'] = $currencies[$row['currency_id']];
|
||||
else {
|
||||
|
||||
$query = "SELECT symbol FROM currencies WHERE id='".$row['currency_id']."' AND deleted=0;";
|
||||
$result2 = $GLOBALS['db']->query($query);
|
||||
if($result2) {
|
||||
$row2 = $GLOBALS['db']->fetchByAssoc($result2);
|
||||
if($row2) {
|
||||
$currencies[$id] = $row2['symbol'];
|
||||
$row['currency_symbol'] = $row2['symbol'];
|
||||
} else $row['currency_symbol'] = '';
|
||||
} else $row['currency_symbol'] = '';
|
||||
|
||||
}
|
||||
|
||||
if(isset($use_language)) {
|
||||
if(strpos(strtoupper($row['long_description']), $AS_INPUTSEARCH) !== false)
|
||||
$row['name'] = $row['long_description'];
|
||||
else
|
||||
if(strpos(strtoupper($row['short_description']), $AS_INPUTSEARCH) !== false)
|
||||
$row['name'] = $row['short_description'];
|
||||
else
|
||||
if(strpos(strtoupper($row['name']), $AS_INPUTSEARCH) === false || strpos(strtoupper($row['code']), $AS_INPUTSEARCH) !== false) {
|
||||
if(isset($row['long_description']) && $row['long_description'] != '')
|
||||
$row['name'] = $row['long_description'];
|
||||
else
|
||||
if(isset($row['short_description']) && $row['short_description'] != '')
|
||||
$row['name'] = $row['short_description'];
|
||||
}
|
||||
unset($row['long_description'], $row['short_description']);
|
||||
}
|
||||
|
||||
$arr[] = $row;
|
||||
|
||||
}
|
||||
|
||||
if(count($arr) > 0) {
|
||||
$json = getJSONobj();
|
||||
echo str_replace(""", '\"', $json->encode($arr));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
287
modules/EcmProductB2Bs/CreateXLS.back.php
Executable file
287
modules/EcmProductB2Bs/CreateXLS.back.php
Executable file
@@ -0,0 +1,287 @@
|
||||
<?php
|
||||
set_time_limit(999999);
|
||||
$mn=explode(",",$_REQUEST['uid']);
|
||||
//$mn=$_REQUEST['mass'];
|
||||
if(!$_REQUEST['uid'])$mn=$_REQUEST['mass'];
|
||||
set_include_path('include/PHPExcel/');
|
||||
|
||||
include 'PHPExcel.php';
|
||||
include 'PHPExcel/Writer/Excel2007.php';
|
||||
include 'PHPExcel/IOFactory.php';
|
||||
|
||||
$objPHPExcel = new PHPExcel();
|
||||
$objPHPExcel->getProperties()->setCreator("E5 CRM");
|
||||
$objPHPExcel->getProperties()->setLastModifiedBy("E5 CRM");
|
||||
$objPHPExcel->getProperties()->setTitle("Office 2007 PRICEBOOK");
|
||||
$objPHPExcel->getProperties()->setSubject("Office 2007 PRICEBOOK");
|
||||
$objPHPExcel->getProperties()->setDescription("PRICEBOOK");
|
||||
|
||||
$objPHPExcel->getActiveSheet()->duplicateStyleArray(
|
||||
array(
|
||||
'fill' => array(
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'color' => array('argb' => 'FFCCFFCC')
|
||||
),
|
||||
'borders' => array(
|
||||
'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
|
||||
'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
|
||||
)
|
||||
),
|
||||
"A1:AG1"
|
||||
);
|
||||
|
||||
$alf="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('R')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('S')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('T')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('U')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('V')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('W')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('X')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('Y')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('Z')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AA')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AB')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AC')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AD')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AE')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AF')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('AG')->setWidth(20);
|
||||
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('A1','Product');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B1','Code');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('C1','Category');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D1','Inventory');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('E1','Ordered');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('F1','EMS price');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('G1','Unit price');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('H1','Inv value');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('I1','Ppc');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('J1','CBM stock');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('K1','CBM ordered');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('L1','Qty 3 m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('M1','Avg price 3 m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('N1','Qty this m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O1','Avg price this m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('P1','Stock m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Q1','Pricebook');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('R1','MOQ');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('S1','Pieces per carton');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('T1','Carton dimensions (m)');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('U1','Carton netto weight');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('V1','Carton brutto weight');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('W1','Product netto weight');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('X1','Product brutto weight');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Y1','Packing dimensions');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Z1','Carton volume');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AA1','EAN');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AB1','Short description');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AC1','Long description');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AD1','FOB price');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AE1','SRP price');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AF1','Custom duty rate');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AG1','Commission rate');
|
||||
|
||||
/*
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O1','Pieces per carton');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('P1','Carton dimensions');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Q1','Packing dimensions');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('R1','Carton volume');*/
|
||||
$j=0;
|
||||
|
||||
if(count($mn)>0){
|
||||
foreach($mn as $mm){
|
||||
$mmm[]="id='".$mm."'";
|
||||
}
|
||||
}
|
||||
if(count($mmm)<=0){
|
||||
if($_SESSION['EcmProductB2BsForXLSwhere']=="")$_SESSION['EcmProductB2BsForXLSwhere']="1=1";
|
||||
$where="where (".$_SESSION['EcmProductB2BsForXLSwhere'].") and deleted='0'";
|
||||
//$_SESSION['EcmProductB2BsForXLSwhere']="";
|
||||
}
|
||||
else $where="where (".implode(" or ",$mmm).") and deleted='0'";
|
||||
|
||||
|
||||
|
||||
$ww=$GLOBALS['db']->query("select * from ecmproducts ".$where);
|
||||
while($rr=$GLOBALS['db']->fetchByAssoc($ww)){
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('A'.($j+2),$rr['name']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B'.($j+2),$rr['code']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('C'.($j+2),$rr['product_category_name']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D'.($j+2),$rr['ems_qty_in_stock']);
|
||||
$ems_qty_in_stock_sum+=$rr['ems_qty_in_stock'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('E'.($j+2),$rr['ordered']);
|
||||
$ordered_sum+=$rr['ordered'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('F'.($j+2),$rr['ems_price']);
|
||||
$ems_price_sum+=$rr['ems_price'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('G'.($j+2),$rr['purchase_price']);
|
||||
$purchase_price_sum+=$rr['purchase_price'];
|
||||
|
||||
$SALE_AVG_PRICE90=0;
|
||||
$sale0=0;
|
||||
$sale30=0;
|
||||
$sale90=0;
|
||||
$sale180=0;
|
||||
$qty0=0;
|
||||
$qty30=0;
|
||||
$qty90=0;
|
||||
$qty180=0;
|
||||
|
||||
$ddate=date("Y-m-d",mktime()-200*24*3600);
|
||||
|
||||
$w=$GLOBALS['db']->query("select ecminvoiceoutitems.price as price,ecminvoiceoutitems.quantity as quantity,ecminvoiceouts.register_date as date from ecminvoiceoutitems inner join ecminvoiceouts on ecminvoiceoutitems.ecminvoiceout_id=ecminvoiceouts.id where ecminvoiceoutitems.ecmproduct_id='".$rr['id']."' and ecminvoiceouts.type!='correct' and ecminvoiceouts.register_date>'".$ddate."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$sale+=$r['price']*$r['quantity'];
|
||||
$qty+=$r['quantity'];
|
||||
$aq[$r['no']]+=$r['quantity'];
|
||||
$date=date("Y-m");
|
||||
$m=(int)date("m");
|
||||
$date1=date("Y-m",mktime(0,0,0,($m-1),1,date("Y")));
|
||||
$date2=date("Y-m",mktime(0,0,0,($m-2),1,date("Y")));
|
||||
$date3=date("Y-m",mktime(0,0,0,($m-3),1,date("Y")));
|
||||
$date4=date("Y-m",mktime(0,0,0,($m-4),1,date("Y")));
|
||||
$date5=date("Y-m",mktime(0,0,0,($m-5),1,date("Y")));
|
||||
$date6=date("Y-m",mktime(0,0,0,($m-6),1,date("Y")));
|
||||
|
||||
$d=explode("-",$r['date']);
|
||||
|
||||
$dd=$d[0]."-".$d[1];
|
||||
|
||||
if($dd==$date){
|
||||
$sale0+=$r['price']*$r['quantity'];
|
||||
$qty0+=$r['quantity'];
|
||||
$aq0[$r['no']]+=$r['quantity'];
|
||||
}
|
||||
if($dd==$date1){
|
||||
$sale30+=$r['price']*$r['quantity'];
|
||||
$qty30+=$r['quantity'];
|
||||
$aq30[$r['no']]+=$r['quantity'];
|
||||
}
|
||||
if($dd==$date1 || $dd==$date2 || $dd==$date3){
|
||||
$sale90+=$r['price']*$r['quantity'];
|
||||
$qty90+=$r['quantity'];
|
||||
$aq90[$r['no']]+=$r['quantity'];
|
||||
}
|
||||
if($dd==$date1 || $dd==$date2 || $dd==$date3 || $dd==$date4 || $dd==$date5 || $dd==$date6){
|
||||
$sale180+=$r['price']*$r['quantity'];
|
||||
$qty180+=$r['quantity'];
|
||||
$aq180[$r['no']]+=$r['quantity'];
|
||||
}
|
||||
}
|
||||
$SALE_QTY=$qty;
|
||||
$SALE_QTY0=$qty0;
|
||||
$SALE_QTY30=$qty30;
|
||||
$SALE_QTY90=($qty90/3);
|
||||
$SALE_QTY180=$qty180;
|
||||
|
||||
$SALE_SALE=$sale;
|
||||
$SALE_SALE0=$sale0;
|
||||
$SALE_SALE30=$sale30;
|
||||
$SALE_SALE90=$sale90;
|
||||
$SALE_SALE80=$sale180;
|
||||
|
||||
if($qty>0)$SALE_AVG_PRICE=round($sale/$qty,2);
|
||||
if($qty0>0)$SALE_AVG_PRICE0=round($sale0/$qty0,2);
|
||||
if($qty30>0)$SALE_AVG_PRICE30=round($sale30/$qty30,2);
|
||||
if($qty90>0)$SALE_AVG_PRICE90=round($sale90/$qty90,2);
|
||||
if($qty180>0)$SALE_AVG_PRICE180=round($sale180/$qty180,2);
|
||||
|
||||
|
||||
if($rr['pieces_per_carton'])$cbm=(($rr['ems_qty_in_stock']*$rr['carton_volume_meter'])/$rr['pieces_per_carton']);
|
||||
if($rr['pieces_per_carton'])$cbm_ordered=(($rr['ordered']*$rr['carton_volume_meter'])/$rr['pieces_per_carton']);
|
||||
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('H'.($j+2),($rr['ems_price']*$rr['ems_qty_in_stock']));
|
||||
$stock_value_sum+=($rr['ems_price']*$rr['ems_qty_in_stock']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('I'.($j+2),$rr['pieces_per_carton']);
|
||||
$pieces_per_carton_sum+=$rr['pieces_per_carton'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('J'.($j+2),$cbm);
|
||||
$cbm_sum+=$cbm;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('K'.($j+2),$cbm_ordered);
|
||||
$cbm_ordered_sum+=$cbm_ordered;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('L'.($j+2),$SALE_QTY90);
|
||||
$sale_qty90_sum+=$SALE_QTY90;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('M'.($j+2),$SALE_AVG_PRICE90);
|
||||
$sale_avg_price90_sum+=$SALE_AVG_PRICE90;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('N'.($j+2),$SALE_QTY0);
|
||||
$sale_qty0_sum+=$SALE_QTY0;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O'.($j+2),$SALE_AVG_PRICE0);
|
||||
$sale_avg_price0_sum+=$SALE_AVG_PRICE0;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('P'.($j+2),($rr['ems_qty_in_stock']/($SALE_QTY90)));
|
||||
//pricebook
|
||||
$accounts=array("Auchan","Carrefour","Euro","Real");
|
||||
$dig=array();
|
||||
foreach($accounts as $account){
|
||||
$www=$GLOBALS['db']->query("select p.id from ecmpricebooks_ecmproducts as p inner join ecmpricebooks as e on e.id=p.ecmpricebook_id where p.ecmproduct_id='".$rr['id']."' and e.name='".$account."' and e.deleted='0' and p.deleted='0'");
|
||||
if(mysql_num_rows($www)>0)$dig[]=$account[0];
|
||||
}
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Q'.($j+2),implode(",",$dig));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('R'.($j+2),$rr['moq']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('S'.($j+2),$rr['pieces_per_carton']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('T'.($j+2),$rr['carton_dimensions_1']." x ".$rr['carton_dimensions_2']." x ".$rr['carton_dimensions_3']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('U'.($j+2),$rr['carton_netto_weight']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('V'.($j+2),$rr['carton_brutto_weight']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('W'.($j+2),$rr['product_netto_weight']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('X'.($j+2),$rr['product_brutto_weight']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Y'.($j+2),$rr['packing_dimensions_1']." x ".$rr['packing_dimensions_2']." x ".$rr['packing_dimensions_3']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('Z'.($j+2),$rr['carton_volume_meter']);
|
||||
$rl=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecmproduct_language where ecmproduct_id='".$rr['id']."' and language='pl'"));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AA'.($j+2),$rl['ean']);
|
||||
if($rl['short_description'])$sd="yes";
|
||||
else $sd="no";
|
||||
if($rl['long_description'])$ld="yes";
|
||||
else $ld="no";
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AB'.($j+2),$sd);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AC'.($j+2),$ld);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AD'.($j+2),$rr['fob_price']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AE'.($j+2),$rr['srp_price']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AF'.($j+2),$rr['custom_duty_rate']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('AG'.($j+2),$rr['commission_rate']);
|
||||
$j++;
|
||||
}
|
||||
$objPHPExcel->getActiveSheet()->duplicateStyleArray(
|
||||
array(
|
||||
'fill' => array(
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'color' => array('argb' => 'FFCCFFCC')
|
||||
),
|
||||
'borders' => array(
|
||||
'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
|
||||
'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
|
||||
)
|
||||
),
|
||||
"A".($j+2).":AG".($j+2)
|
||||
);
|
||||
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D'.($j+2),$ems_qty_in_stock_sum);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('E'.($j+2),$ordered_sum);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('F'.($j+2),($ems_price_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('G'.($j+2),($purchase_price_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('H'.($j+2),($stock_value_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('I'.($j+2),($pieces_per_carton_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('J'.($j+2),$cbm_sum);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('K'.($j+2),$cbm_ordered_sum);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('L'.($j+2),($sale_qty90_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('M'.($j+2),($sale_avg_price90_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('N'.($j+2),($sale_qty0_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O'.($j+2),($sale_avg_price0_sum/$j));
|
||||
|
||||
$objPHPExcel->getActiveSheet()->setTitle('Simple');
|
||||
$objPHPExcel->setActiveSheetIndex(0);
|
||||
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
|
||||
chmod("cache/upload",0777);
|
||||
$microtime=str_replace(".","",str_replace(" ","",microtime()));
|
||||
$name="cache/upload/Products".$microtime.".xlsx";
|
||||
$objWriter->save($name);
|
||||
chmod($name,0777);
|
||||
|
||||
header("Location: ".$name);
|
||||
?>
|
||||
175
modules/EcmProductB2Bs/CreateXLS.php
Executable file
175
modules/EcmProductB2Bs/CreateXLS.php
Executable file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
set_time_limit(999999);
|
||||
$mn=explode(",",$_REQUEST['uid']);
|
||||
//$mn=$_REQUEST['mass'];
|
||||
if(!$_REQUEST['uid'])$mn=$_REQUEST['mass'];
|
||||
|
||||
include_once("modules/EcmProductB2Bs/EcmProductB2B.php");
|
||||
|
||||
set_include_path('include/PHPExcel/');
|
||||
|
||||
include 'PHPExcel.php';
|
||||
include 'PHPExcel/Writer/Excel2007.php';
|
||||
include 'PHPExcel/IOFactory.php';
|
||||
|
||||
$objPHPExcel = new PHPExcel();
|
||||
$objPHPExcel->getProperties()->setCreator("E5 CRM");
|
||||
$objPHPExcel->getProperties()->setLastModifiedBy("E5 CRM");
|
||||
$objPHPExcel->getProperties()->setTitle("Office 2007 PRICEBOOK");
|
||||
$objPHPExcel->getProperties()->setSubject("Office 2007 PRICEBOOK");
|
||||
$objPHPExcel->getProperties()->setDescription("PRICEBOOK");
|
||||
|
||||
$objPHPExcel->getActiveSheet()->duplicateStyleArray(
|
||||
array(
|
||||
'fill' => array(
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'color' => array('argb' => 'FFCCFFCC')
|
||||
),
|
||||
'borders' => array(
|
||||
'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
|
||||
'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
|
||||
)
|
||||
),
|
||||
"A1:AG1"
|
||||
);
|
||||
|
||||
$alf="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(30);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('F')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('G')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('H')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('I')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('J')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('K')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('L')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('M')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('N')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('O')->setWidth(20);
|
||||
$objPHPExcel->getActiveSheet()->getColumnDimension('P')->setWidth(20);
|
||||
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('A1','Code');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B1','Product');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('C1','Category');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D1','Inv');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('E1','Ord');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('F1','EMS price');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('G1','Inv value');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('H1','Ppc');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('I1','Qty this m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('J1','Sale this m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('K1','Margin this m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('L1','Qty 3 m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('M1','Sale 3 m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('N1','Margin 3 m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O1','Inv+ord m');
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('P1','Pricebook');
|
||||
|
||||
$j=0;
|
||||
|
||||
if(count($mn)>0){
|
||||
foreach($mn as $mm){
|
||||
$mmm[]="id='".$mm."'";
|
||||
}
|
||||
}
|
||||
if(count($mmm)<=0){
|
||||
if($_SESSION['EcmProductB2BsForXLSwhere']=="")$_SESSION['EcmProductB2BsForXLSwhere']="1=1";
|
||||
$where="where (".$_SESSION['EcmProductB2BsForXLSwhere'].") and deleted='0'";
|
||||
//$_SESSION['EcmProductB2BsForXLSwhere']="";
|
||||
}
|
||||
else $where="where (".implode(" or ",$mmm).") and deleted='0'";
|
||||
//echo $where;die();
|
||||
|
||||
|
||||
$ww=$GLOBALS['db']->query("select * from ecmproducts ".$where);
|
||||
|
||||
while($rr=$GLOBALS['db']->fetchByAssoc($ww)){
|
||||
|
||||
/*$s0=$ecmp->getSale(array(date("Y-m")));
|
||||
$s3=$ecmp->getSale(array(date("Y-m",mktime()-1*30*24*3600),date("Y-m",mktime()-2*30*24*3600),date("Y-m",mktime()-3*30*24*3600)));
|
||||
|
||||
$GLOBALS['db']->query("update ecmproducts set q0='".$s0['quantity']."',p0='".($s0['sale']-$s0['purchase'])."',s0='".$s0['sale']."',q3='".($s3['quantity']/3)."',p3='".(($s3['sale']-$s3['purchase'])/3)."',s3='".($s3['sale']/3)."',stock_month='".$stock_month."',stock_value='".$stock_value."' where id='".$rr['id']."'");
|
||||
*/
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('A'.($j+2),$rr['code']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('B'.($j+2),$rr['name']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('C'.($j+2),$rr['product_category_name']);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D'.($j+2),$rr['ems_qty_in_stock']);
|
||||
$ems_qty_in_stock_sum+=$rr['ems_qty_in_stock'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('E'.($j+2),$rr['ordered']);
|
||||
$ordered_sum+=$rr['ordered'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('F'.($j+2),$rr['ems_price']);
|
||||
$ems_price_sum+=$rr['ems_price'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('G'.($j+2),$rr['ems_price']*$rr['ems_qty_in_stock']);
|
||||
$stock_value_sum+=$rr['ems_price']*$rr['ems_qty_in_stock'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('H'.($j+2),$rr['pieces_per_carton']);
|
||||
$pieces_per_carton_sum+=$rr['pieces_per_carton'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('I'.($j+2),$rr['q0']);
|
||||
$q0_sum+=$rr['q0'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('J'.($j+2),$rr['s0']);
|
||||
$s0_sum+=$rr['s0'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('K'.($j+2),$rr['p0']);
|
||||
$p0_sum+=$rr['p0'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('L'.($j+2),$rr['q3']);
|
||||
$q3_sum+=$rr['q3'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('M'.($j+2),$rr['s3']);
|
||||
$s3_sum+=$rr['s3'];
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('N'.($j+2),$rr['p3']);
|
||||
$p3_sum+=$rr['p3'];
|
||||
if(round(($rr['s3']))!=0)$stock_month=(($rr['ems_qty_in_stock']+$rr['ordered'])/round(($rr['s3'])));
|
||||
else $stock_month=0;
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O'.($j+2),$stock_month);
|
||||
$stock_month_sum+=$rr['stock_month'];
|
||||
//pricebook
|
||||
$accounts=array("Auchan","Carrefour","Euro","Real");
|
||||
$dig=array();
|
||||
foreach($accounts as $account){
|
||||
$www=$GLOBALS['db']->query("select p.id from ecmpricebooks_ecmproducts as p inner join ecmpricebooks as e on e.id=p.ecmpricebook_id where p.ecmproduct_id='".$rr['id']."' and e.name='".$account."' and e.deleted='0' and p.deleted='0'");
|
||||
if(mysql_num_rows($www)>0)$dig[]=$account[0];
|
||||
}
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('P'.($j+2),implode(",",$dig));
|
||||
|
||||
$j++;
|
||||
}
|
||||
$objPHPExcel->getActiveSheet()->duplicateStyleArray(
|
||||
array(
|
||||
'fill' => array(
|
||||
'type' => PHPExcel_Style_Fill::FILL_SOLID,
|
||||
'color' => array('argb' => 'FFCCFFCC')
|
||||
),
|
||||
'borders' => array(
|
||||
'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN),
|
||||
'right' => array('style' => PHPExcel_Style_Border::BORDER_MEDIUM)
|
||||
)
|
||||
),
|
||||
"A".($j+2).":AG".($j+2)
|
||||
);
|
||||
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('D'.($j+2),$ems_qty_in_stock_sum);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('E'.($j+2),$ordered_sum);
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('F'.($j+2),($ems_price_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('G'.($j+2),($stock_value_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('H'.($j+2),($pieces_per_carton_sum/$j));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('I'.($j+2),($q0_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('J'.($j+2),($s0_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('K'.($j+2),($p0_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('L'.($j+2),($q3_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('M'.($j+2),($s3_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('N'.($j+2),($p3_sum));
|
||||
$objPHPExcel->getActiveSheet()->SetCellValue('O'.($j+2),($stock_month_sum/$j));
|
||||
|
||||
$objPHPExcel->getActiveSheet()->setTitle('Simple');
|
||||
$objPHPExcel->setActiveSheetIndex(0);
|
||||
|
||||
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
|
||||
chmod("cache/upload",0777);
|
||||
$microtime=str_replace(".","",str_replace(" ","",microtime()));
|
||||
$name="cache/upload/Products".$microtime.".xlsx";
|
||||
$objWriter->save($name);
|
||||
chmod($name,0777);
|
||||
|
||||
header("Location: ".$name);
|
||||
?>
|
||||
12
modules/EcmProductB2Bs/CreateXML.php
Executable file
12
modules/EcmProductB2Bs/CreateXML.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
header('Content-type: application/xml');
|
||||
header('Content-Disposition: attachment; filename="product.xml"');
|
||||
error_reporting(0);
|
||||
include_once("modules/EcmProductB2Bs/xml_template.php");
|
||||
$xml=xml($_REQUEST['record']);
|
||||
$file="cache/upload/product_xml_".str_replace(" ","_",str_replace(".","_",microtime())).".xml";
|
||||
fopen($file);
|
||||
file_put_contents($file,$xml);
|
||||
chmod($file,0777);
|
||||
header("Location: ".$file);
|
||||
?>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['MyEcmProductB2BsDashlet']['searchFields'] = array(
|
||||
'date_entered' => array('default' => ''),
|
||||
'date_modified' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name)
|
||||
);
|
||||
|
||||
$dashletData['MyEcmProductB2BsDashlet']['columns'] = array(
|
||||
'name' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'date_entered' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'date_modified' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array(
|
||||
'width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array(
|
||||
'width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER'),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyEcmProductB2BsDashlet'] = array(
|
||||
'title' => translate('LBL_LIST_MY_ECMPRODUCTS', 'EcmProductB2Bs'),
|
||||
'icon' => 'modules/EcmProductB2Bs/images/EcmProductB2Bs.gif',
|
||||
'description' => 'A customizable view into EcmProductB2Bs',
|
||||
'category' => 'Module Views'
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Dashlets/MyEcmProductB2BsDashlets/MyEcmProductB2BsDashlet.data.php');
|
||||
|
||||
class MyEcmProductB2BsDashlet extends DashletGeneric {
|
||||
function MyEcmProductB2BsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings, $dashletData;
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
$this->searchFields = $dashletData['MyEcmProductB2BsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyEcmProductB2BsDashlet']['columns'];
|
||||
|
||||
if(empty($def['title']))
|
||||
$this->title = translate('LBL_LIST_MY_ECMPRODUCTS', 'EcmProductB2Bs');
|
||||
$this->seedBean = new EcmProductB2B();
|
||||
}
|
||||
|
||||
function displayOptions() {
|
||||
$this->processDisplayOptions();
|
||||
$this->configureSS->assign('searchFields', $this->currentSearchFields);
|
||||
return $this->configureSS->fetch($this->configureTpl);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
69
modules/EcmProductB2Bs/Delete.php
Executable file
69
modules/EcmProductB2Bs/Delete.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
//TODO: nie pozwolić usunąć produktu, na którym była jakieś operacje magazynowe
|
||||
|
||||
// PERFORM THE DELETE IF GIVEN A RECORD TO DELETE
|
||||
if(!isset($_REQUEST['record']))
|
||||
sugar_die("A record number must be specified to delete the record.");
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
if(!$focus->ACLAccess('Delete')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
// NOW THAT THE DELETE HAS BEEN PERFORMED, RETURN TO GIVEN LOCATION
|
||||
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
|
||||
?>
|
||||
324
modules/EcmProductB2Bs/DetailView.php
Executable file
324
modules/EcmProductB2Bs/DetailView.php
Executable file
@@ -0,0 +1,324 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings, $db;
|
||||
|
||||
$app_list_strings['ecmproducts_parent_dom'] = array (
|
||||
'Accounts' => $app_list_strings['moduleList']['Accounts'],
|
||||
'Leads' => $app_list_strings['moduleList']['Leads'],
|
||||
);
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
require_once('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
if(isset($_REQUEST['record'])){
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
//if(isset($focus->id) && $focus->id != '')$focus->format_all_fields();
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmProductB2Bs/views/DetailView/view.detail.ecmproductb2bs.php');
|
||||
$detail = new ViewDetailEcmProductB2Bs();
|
||||
$detail->ss = new Sugar_Smarty();
|
||||
$detail->bean = $focus;
|
||||
|
||||
$detail->preDisplay();
|
||||
|
||||
$uunit_array = array();
|
||||
$uunit='';
|
||||
$result = $db->query("select id,name from ecmproductusageunits order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$uunit.='<option value="'.$row['id'].'"';
|
||||
if($focus->usage_unit_id==$row['id'])$uunit.=' selected';
|
||||
$uunit.='>'.$row['name'].'</option>';
|
||||
$uunit_array[$row['id']] = $row['name'];
|
||||
}
|
||||
$detail->ss->assign("USAGE_UNIT_ID",$uunit);
|
||||
|
||||
$tax='';
|
||||
$result = $db->query("select id,name from ecmvats where deleted='0' order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$tax.='<option value="'.$row['id'].'"';
|
||||
if($focus->vat_id==$row['id'])$tax.=' selected';
|
||||
$tax.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$detail->ss->assign("VAT_ID",$tax);
|
||||
|
||||
$fbas='';
|
||||
$result = $db->query("select id,name from ecmproductbasis order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$fbas.='<option value="'.$row['id'].'"';
|
||||
if($focus->fob_basis_id==$row['id'])$fbas.=' selected';
|
||||
$fbas.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$detail->ss->assign("FOB_BASIS_ID",$fbas);
|
||||
|
||||
$pack='';
|
||||
$result = $db->query("select id,name from ecmproductpackingtypes order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$pack.='<option value="'.$row['id'].'"';
|
||||
if($focus->packing_type_id==$row['id'])$pack.=' selected';
|
||||
$pack.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$detail->ss->assign("PACKING_TYPE_ID",$pack);
|
||||
|
||||
//load currencies
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
$currency = new Currency();
|
||||
$currency_list = $currency->get_full_list('name');
|
||||
$currency->retrieve('-99');
|
||||
if(is_array($currency_list))
|
||||
{
|
||||
$currency_list = array_merge(Array($currency), $currency_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
$currency_list = Array($currency);
|
||||
}
|
||||
$arr = array();
|
||||
foreach($currency_list as $key=>$value)
|
||||
{
|
||||
$arr[$value->id] = $value->name;
|
||||
}
|
||||
$detail->ss->assign("EXCHANGE_RATE_NAME", $arr[$focus->exchange_rate_id]);
|
||||
|
||||
function show_image($img)
|
||||
{
|
||||
if(is_file($img))
|
||||
{
|
||||
$obraz=@GetImageSize($img);
|
||||
if($obraz[0]>=180)
|
||||
{
|
||||
$szerokosc=180;
|
||||
$wysokosc=$obraz[1]*$szerokosc/$obraz[0];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$szerokosc=$obraz[0];
|
||||
$wysokosc=$obraz[1];
|
||||
}
|
||||
$height=$obraz[1]+20;
|
||||
$width=$obraz[0]+20;
|
||||
return '<a style="cursor:pointer;" onclick="window.open(\''.$img.'\',\'Image\',\'height='.$height.',width='.$width.'\');"><img src="pic.php?p='.$img.'&w='.$szerokosc.'&h='.$wysokosc.'"></a>';
|
||||
}
|
||||
}
|
||||
$detail->ss->assign("PRODUCT_PICTURE", show_image("modules/EcmProductB2Bs/upload/images/".$focus->product_picture));
|
||||
$detail->ss->assign("PACKING_FRONT_PICTURE", show_image("modules/EcmProductB2Bs/upload/images/".$focus->packing_front_picture));
|
||||
$detail->ss->assign("DRIVER_1", $focus->driver_1);
|
||||
if($focus->driver_1)$detail->ss->assign("DRIVER_1_DOWNLOAD",'<a href="modules/EcmProductB2Bs/upload/'.$focus->driver_1.'">Download</a>');
|
||||
$detail->ss->assign("DRIVER_2", $focus->driver_2);
|
||||
if($focus->driver_2)$detail->ss->assign("DRIVER_2_DOWNLOAD",'<a href="modules/EcmProductB2Bs/upload/'.$focus->driver_2.'">Download</a>');
|
||||
|
||||
//add mz
|
||||
$pl3 = $this->bean->showPositions3();
|
||||
$detail->ss->assign('POSITIONS3', $pl3);
|
||||
$pl4 = $this->bean->showPrices();
|
||||
$detail->ss->assign('POSITIONS4', $pl4);
|
||||
$ii='<table cellspacing="0" cellpadding="0" border="0" width="400">
|
||||
<tr>
|
||||
<td><b>'.$mod_strings['LBL_II_STOCK'].'</b></td>
|
||||
<td><b>'.$mod_strings['LBL_II_QTY'].'</b></td>
|
||||
<td><b>'.$mod_strings['LBL_II_PRICE'].'</b></td>
|
||||
</tr>';
|
||||
$w=$GLOBALS['db']->query("select ecmstocks.name as sname,ecmstocks.id as sid,sum(ecmstockstates.quantity) as q,avg(ecmstockstates.price) as p from ecmstockstates inner join ecmstocks on ecmstocks.id=ecmstockstates.stock_id where ecmstockstates.deleted='0' and ecmstockstates.product_id='".$focus->id."' group by ecmstockstates.stock_id order by ecmstocks.name asc");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
if($r['q']>0)$ii.='<tr><td><a href="index.php?query=true&module=EcmStockOperations&action=&searchFormTab=basic_search&product_id_basic='.$_REQUEST['record'].'&product_name_basic='.$focus->name.'&stock_id_basic='.$r['sid'].'&stock_name_basic='.$r['sname'].'">'.$r['sname']."</a></td><td>".$r['q']."</td><td>".number_format($r['p'],2,$GLOBALS['sugar_config']['default_decimal_seperator'],$GLOBALS['sugar_config']['default_number_grouping_seperator'])."</td></tr>";
|
||||
}
|
||||
|
||||
$ii.='</table>';
|
||||
$detail->ss->assign("INVENTORY_INFORMATION",$ii);
|
||||
|
||||
$rp_app=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(p.product_quantity) as s from ecmproducts_ecmpurchaseorders as p inner join ecmpurchaseorders as e on e.id=p.ecmpurchaseorder_id where p.ecmproduct_id='".$focus->id."' and p.deleted='0' and e.status='accepted'"));
|
||||
$rp_cr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(p.product_quantity) as s from ecmproducts_ecmpurchaseorders as p inner join ecmpurchaseorders as e on e.id=p.ecmpurchaseorder_id where p.ecmproduct_id='".$focus->id."' and p.deleted='0' and e.status='registered'"));
|
||||
$detail->ss->assign("ORDERED",$rp_app['s']+$rp_cr['s']);
|
||||
|
||||
$detail->ss->assign("CARTON_DIMENSIONS_1",$focus->carton_dimensions_1);
|
||||
$detail->ss->assign("CARTON_DIMENSIONS_2",$focus->carton_dimensions_2);
|
||||
$detail->ss->assign("CARTON_DIMENSIONS_3",$focus->carton_dimensions_3);
|
||||
$detail->ss->assign("PACKING_DIMENSIONS_1",$focus->packing_dimensions_1);
|
||||
$detail->ss->assign("PACKING_DIMENSIONS_2",$focus->packing_dimensions_2);
|
||||
$detail->ss->assign("PACKING_DIMENSIONS_3",$focus->packing_dimensions_3);
|
||||
|
||||
if($focus->product_picture)$detail->ss->assign("PRODUCT_PICTURE_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
if($focus->packing_front_picture)$detail->ss->assign("PACKING_FRONT_PICTURE_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
if($focus->driver_1)$detail->ss->assign("DRIVER_1_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
if($focus->driver_2)$detail->ss->assign("DRIVER_2_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
|
||||
$result = $GLOBALS['db']->query("select ean,remarks,short_description,long_description,language,price from ecmproduct_language where ecmproduct_id='".$_REQUEST['record']."'");
|
||||
while($row=$GLOBALS['db']->fetchByAssoc($result))
|
||||
{
|
||||
$detail->ss->assign("EAN_".$row['language'],$row['ean']);
|
||||
$detail->ss->assign("REMARKS_".$row['language'],$row['remarks']);
|
||||
$detail->ss->assign("SHORT_DESCRIPTION_".$row['language'],$row['short_description']);
|
||||
$detail->ss->assign("LONG_DESCRIPTION_".$row['language'],str_replace("<","<",str_replace(">",">",$row['long_description'])));
|
||||
$detail->ss->assign("PRICE_".$row['language'],number_format($row['price'],2,",","."));
|
||||
}
|
||||
$send_xml=true;
|
||||
if(!file_exists("modules/EcmProductB2Bs/upload/images/big/".$focus->product_picture))$send_xml=false;
|
||||
if(!file_exists("modules/EcmProductB2Bs/upload/images/big/".$focus->packing_front_picture))$send_xml=false;
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ean,remarks,short_description,long_description,language,price from ecmproduct_language where language='pl' and ecmproduct_id='".$_REQUEST['record']."'"));
|
||||
if(!$r['ean'] || !$r['short_description'] || !$r['long_description'] || !$r['price'])$send_xml=false;
|
||||
if($send_xml)$detail->ss->assign("SEND_XML",1);
|
||||
else $detail->ss->assign("SEND_XML",0);
|
||||
|
||||
/*
|
||||
$desc='';
|
||||
$desc.='<input title="Product Card" class="button" onclick="if(document.getElementById(\'div_desc\').style.display==\'none\')document.getElementById(\'div_desc\').style.display=\'block\';else document.getElementById(\'div_desc\').style.display=\'none\';" type="button" name="productcard" id="productcard" value="Create Catalogue">';
|
||||
$desc.='<div id="div_desc" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
$desc.='Show header: <select name="show_header" id="show_header"><option value="1">Yes</option><option value="0" selected>No</option></select><br /><br />';
|
||||
$desc.='Show content: <select name="show_content" id="show_content"><option value="1">Yes</option><option value="0" selected>No</option></select><br /><br />';
|
||||
$desc.='To image: <select name="image" id="image"><option value="1">Yes</option><option value="0" selected>No</option></select><br /><br />';
|
||||
$desc.='Title page: <select name="title" id="title"><option value="1">Yes</option><option value="0" selected>No</option></select><br /><br />';
|
||||
$desc.='Show price: <select name="show_price" id="show_price"><option value="1">Yes</option><option value="0" selected>No</option></select><br /><br />';
|
||||
$desc.='Extra info: <select name="extra" id="extra"><option value="1">Yes</option><option value="0" selected>No</option></select><br /><br />';
|
||||
$desc.='Price: <select name="price" id="price"><option value="srp_price">SRP Price</option></select><br /><br />';
|
||||
$desc.='Language: <select name="language" id="language"><option value="pl">pl</option><option value="en">en</option></select><br /><br />';
|
||||
$desc.='EAN: <select name="ean" id="ean"><option value="1">1</option><option value="2">2</option></select><br /><br />';
|
||||
$desc.='<input type="button" class="button" name="generate" id="generate" value="Generate" onclick="window.open(\'index.php?module=EcmProductB2Bs&action=generateProductCardsFromProduct&record='.$_REQUEST['record'].'&to_pdf=1&price=\'+document.getElementById(\'price\').value+\'&header=\'+document.getElementById(\'show_header\').value+\'&content=\'+document.getElementById(\'show_content\').value+\'&extra=\'+document.getElementById(\'extra\').value+\'&create_img=\'+document.getElementById(\'image\').value+\'&show_price=\'+document.getElementById(\'show_price\').value+\'&title=\'+document.getElementById(\'title\').value+\'&language=\'+document.getElementById(\'language\').value+\'&ean=\'+document.getElementById(\'ean\').value);"></div>';
|
||||
|
||||
$detail->ss->assign("CATALOGUE",$desc);
|
||||
*/
|
||||
//add mz - nowa karta produktu
|
||||
global $mod_strings;
|
||||
|
||||
$desc='';
|
||||
$desc.='<input title="Product Card" class="button" onclick="if(document.getElementById(\'div_desc2\').style.display==\'none\')document.getElementById(\'div_desc2\').style.display=\'block\';else document.getElementById(\'div_desc2\').style.display=\'none\';" type="button" name="productcard" id="productcard" value="'.$mod_strings['LBL_PRODUCT_CARD'].'">';
|
||||
$desc.='<div id="div_desc2" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
$desc.='Zdjęcie: <select name="new_image" id="new_image"><option value="1">Tak</option><option value="0" selected>Nie</option></select><br /><br />';
|
||||
$desc.='Pokaż cene: <select name="new_show_price" id="new_show_price"><option value="1">Tak</option><option value="0" selected>Nie</option></select><br /><br />';
|
||||
$desc.='Cena: <select name="new_price" id="new_price"><option value="srp_price">SRP Price</option></select><br /><br />';
|
||||
$desc.='Język: <select name="new_language" id="new_language"><option value="pl">pl</option><option value="en">en</option></select><br /><br />';
|
||||
$desc.='EAN: <select name="new_ean" id="new_ean"><option value="1">1</option><option value="2">2</option></select><br /><br />';
|
||||
|
||||
$desc.='<input type="button" class="button" name="generate" id="generate" value="Generuj" onclick="window.open(\'index.php?module=EcmProductB2Bs&action=generateCard&record='.$_REQUEST['record'].'&to_pdf=1&price=\'+document.getElementById(\'new_price\').value+\'&create_img=\'+document.getElementById(\'new_image\').value+\'&show_price=\'+document.getElementById(\'new_show_price\').value+\'&language=\'+document.getElementById(\'new_language\').value+\'&ean=\'+document.getElementById(\'new_ean\').value);"></div>';
|
||||
|
||||
$detail->ss->assign("CATALOGUE_NEW",$desc);
|
||||
|
||||
$desc='<div id="div_desc" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
$desc.='<input type="checkbox" name="show_characteristic" id="show_characteristic" value="1" checked">Show attributes<br />';
|
||||
$desc.='<input type="checkbox" name="show_description" id="show_description" value="1" checked">Show description<br />';
|
||||
$desc.='<input type="checkbox" name="show_specification" id="show_specification" value="1" checked">Show specification<br />';
|
||||
$desc.='<input type="checkbox" name="print_version" id="print_version" value="1" checked">Print version<br />';
|
||||
$desc.='Language: <select name="language" id="language"><option value="">pl</option><option value="en">en</option></select><br /><br />';
|
||||
$desc.='<input type="button" class="button" name="generate" id="generate" value="Generate" onclick="window.open(\'index.php?module=EcmProductB2Bs&action=productCard&record='.$_REQUEST['record'].'&to_pdf=1&show_characteristic=\'+document.getElementById(\'show_characteristic\').checked+\'&show_specification=\'+document.getElementById(\'show_specification\').checked+\'&show_description=\'+document.getElementById(\'show_description\').checked+\'&print_version=\'+document.getElementById(\'print_version\').checked+\'&language=\'+document.getElementById(\'language\').value);"></div>';
|
||||
$detail->ss->assign("DIV_DESC",$desc);
|
||||
|
||||
$desc='<div id="div_desc_card" style="border: 1px solid #cccccc;background:#e6e6e6;padding:5px;position:absolute;display:none;">';
|
||||
$desc.='<input type="checkbox" name="show_characteristic_card" id="show_characteristic_card" value="1" checked">Show attributes<br />';
|
||||
$desc.='<input type="checkbox" name="show_description_card" id="show_description_card" value="1" checked">Show description<br />';
|
||||
$desc.='<input type="checkbox" name="show_specification_card" id="show_specification_card" value="1" checked">Show specification<br />';
|
||||
$desc.='Language: <select name="language" id="language"><option value="">pl</option><option value="en">en</option></select><br /><br />';
|
||||
$desc.='<input type="button" class="button" name="generate_card" id="generate_card" value="Generate" onclick="window.open(\'index.php?module=EcmProductB2Bs&action=productCard&record='.$_REQUEST['record'].'&to_pdf=1&show_characteristic=\'+document.getElementById(\'show_characteristic_card\').checked+\'&show_specification=\'+document.getElementById(\'show_specification_card\').checked+\'&show_description=\'+document.getElementById(\'show_description_card\').checked+\'&html=1\'+\'&language=\'+document.getElementById(\'language\').value,\'create_html\',\'location=0,status=0,scrollbars=0,width=640,height=500\');"></div>';
|
||||
$detail->ss->assign("DIV_DESC_CARD",$desc);
|
||||
|
||||
//Added for Graduated Prices - Begin
|
||||
/* require_once('modules/EcmProductB2Bs/EcmProductB2BGraduatedPrices.php');
|
||||
$epgp = new EcmProductB2BGraduatedPrices($focus->graduated_prices);
|
||||
$detail->ss->assign("PRODUCT_GRADUATED_PRICES_HTML", $epgp->getHtmlDetail());*/
|
||||
//Added for Graduated Prices - End
|
||||
|
||||
//Added for Components
|
||||
$detail->ss->assign("POSITION_LIST", $focus->getPositionList());
|
||||
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
$OPT = array();
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4;
|
||||
$OPT['quick_product_item_adding'] = $cc['quick_product_item_adding'];
|
||||
|
||||
global $current_user;
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_decimal_seperator'];
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_currency_significant_digits'];
|
||||
$OPT['dec_len'] = $tmp;
|
||||
$OPT['default_unit'] = "1";
|
||||
$OPT['default_vat'] = "19.00";
|
||||
$OPT['default_category'] = "";
|
||||
$OPT['default_currency'] = "-99";
|
||||
$OPT['type'] = $focus->type;
|
||||
$OPT['to_is_vat_free'] = $focus->to_is_vat_free;
|
||||
$OPT['ecmproduct_usage_units_options'] = $uunit_array;
|
||||
|
||||
$scriptOpt = '
|
||||
<script language="javascript">
|
||||
var VAT = '.str_replace('"','\"',$json->encode($VAT)).';
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
var N;
|
||||
</script>';
|
||||
echo $scriptOpt;
|
||||
include('modules/EcmProductB2Bs/phpqrcode/qrlib.php');
|
||||
$tempDir = EXAMPLE_TMP_SERVERPATH;
|
||||
|
||||
$codeContents = $_REQUEST['record'];
|
||||
|
||||
// we need to generate filename somehow,
|
||||
// with md5 or with database ID used to obtains $codeContents...
|
||||
$fileName = '005_file_'.md5($codeContents).'.png';
|
||||
$fileName2 ='005_file_'.md5($codeContents).'.html';
|
||||
$pngAbsoluteFilePath = 'qrfile/'.$fileName;
|
||||
$urlRelativeFilePath = EXAMPLE_TMP_URLRELPATH.$fileName;
|
||||
|
||||
// generating
|
||||
if (!file_exists($pngAbsoluteFilePath)) {
|
||||
QRcode::png($codeContents, $pngAbsoluteFilePath);
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// create new PDF document
|
||||
// displaying
|
||||
$desc='<img src="http://'.$_SERVER['HTTP_HOST'].'/crm/'.$pngAbsoluteFilePath.'" />';
|
||||
$desc2.='<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.location = \'modules/EcmProductB2Bs/t.php?r='.$fileName2.'\';" type="button" value="Pokaż PDF QR">';
|
||||
$result = $db->query("select name,code from ecmproducts where id='".$_REQUEST['record']."'");
|
||||
while($row=$db->fetchByAssoc($result)){
|
||||
$n=$row['name'];
|
||||
$c=$row['code'];
|
||||
}
|
||||
$pdfik='Nazwa towaru: '.$n.'<br>Kod towaru: '.$c.'<br>'.$desc;
|
||||
$fp = fopen('modules/EcmProductB2Bs/'.$fileName2.'', 'w');
|
||||
fwrite($fp, $pdfik);
|
||||
fclose($fp);
|
||||
|
||||
$detail->ss->assign("QRGEN",$desc2);
|
||||
$detail->ss->assign("QRCODE",$desc);
|
||||
$detail->ss->assign("OPT", $OPT);
|
||||
//Added for Components
|
||||
global $current_user;
|
||||
echo $detail->display();
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, "EcmProductB2Bs");
|
||||
echo $subpanel->display();
|
||||
|
||||
?>
|
||||
277
modules/EcmProductB2Bs/DetailView1.php
Executable file
277
modules/EcmProductB2Bs/DetailView1.php
Executable file
@@ -0,0 +1,277 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
include("modules/EcmProductB2Bs/moduleMenu.php");
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
function show_image($img)
|
||||
{
|
||||
if(is_file($img))
|
||||
{
|
||||
$obraz=@GetImageSize($img);
|
||||
if($obraz[0]>=180)
|
||||
{
|
||||
$szerokosc=180;
|
||||
$wysokosc=$obraz[1]*$szerokosc/$obraz[0];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$szerokosc=$obraz[0];
|
||||
$wysokosc=$obraz[1];
|
||||
}
|
||||
$height=$obraz[1]+20;
|
||||
$width=$obraz[0]+20;
|
||||
return '<a style="cursor:pointer;" onclick="window.open(\''.$img.'\',\'Image\',\'height='.$height.',width='.$width.'\');"><img src="pic.php?p='.$img.'&w='.$szerokosc.'&h='.$wysokosc.'"></a>';
|
||||
}
|
||||
}
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('data/Tracker.php');
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
require_once('include/DetailView/DetailView.php');
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
$detailView = new DetailView();
|
||||
$offset = 0;
|
||||
|
||||
// ONLY LOAD A RECORD IF A RECORD ID IS GIVEN;
|
||||
// A RECORD ID IS NOT GIVEN WHEN VIEWING IN LAYOUT EDITOR
|
||||
if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) {
|
||||
$result = $detailView->processSugarBean("ECMPRODUCTS", $focus, $offset);
|
||||
if($result == null) {
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$focus = $result;
|
||||
}else{
|
||||
header("Location: index.php?module={EcmProductB2Bs}&action=index");
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
}
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
|
||||
echo "\n</p>\n";
|
||||
global $theme;
|
||||
$theme_path = "themes/".$theme."/";
|
||||
$image_path = $theme_path."images/";
|
||||
require_once($theme_path.'layout_utils.php');
|
||||
|
||||
$GLOBALS['log']->info("EcmProductB2Bs detail view");
|
||||
$focus->format_all_fields();
|
||||
$xtpl=new XTemplate ('modules/EcmProductB2Bs/DetailView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("THEME", $theme);
|
||||
$xtpl->assign("GRIDLINE", $gridline);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
$xtpl->assign("ASSIGNED_TO", $focus->assigned_user_name);
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
|
||||
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
|
||||
|
||||
$xtpl->assign("CODE", $focus->code);
|
||||
$xtpl->assign("PRODUCT_CATEGORY_ID", $focus->product_category_id);
|
||||
$xtpl->assign("PRODUCT_CATEGORY", $focus->product_category);
|
||||
$xtpl->assign("PRODUCT_LINE_ID", $focus->product_line_id);
|
||||
$xtpl->assign("PRODUCT_LINE", $focus->product_line);
|
||||
$xtpl->assign("MANUFACTURER_ID", $focus->manufacturer_id);
|
||||
$xtpl->assign("MANUFACTURER", $focus->manufacturer);
|
||||
$xtpl->assign("CONTACT_ID", $focus->contact_id);
|
||||
$xtpl->assign("CONTACT_NAME", $focus->contact_name);
|
||||
$xtpl->assign("VENDOR_ID", $focus->vendor_id);
|
||||
$xtpl->assign("VENDOR_NAME", $focus->vendor_name);
|
||||
$xtpl->assign("VENDOR_PART_NO", $focus->vendor_part_no);
|
||||
if ($focus->product_active == '1') $xtpl->assign('PRODUCT_ACTIVE', "checked");
|
||||
$xtpl->assign("SALES_START_DATE", $focus->sales_start_date);
|
||||
$xtpl->assign("SALES_END_DATE", $focus->sales_end_date);
|
||||
$xtpl->assign("PARENT_TYPE", $focus->parent_type);
|
||||
$xtpl->assign("PARENT_ID", $focus->parent_id);
|
||||
$xtpl->assign("PARENT_NAME", $focus->parent_name);
|
||||
$xtpl->assign("WEBSITE", $focus->website);
|
||||
$xtpl->assign("PART_NO", $focus->part_no);
|
||||
$xtpl->assign("SERIAL_NO", $focus->serial_no);
|
||||
$xtpl->assign("EXCHANGE_RATE_ID", $focus->exchange_rate_id);
|
||||
$xtpl->assign("EXCHANGE_RATE_NAME", $focus->exchange_rate_name);
|
||||
$xtpl->assign("FOB_PRICE", $focus->fob_price);
|
||||
$xtpl->assign("PURCHASE_PRICE", $focus->purchase_price);
|
||||
$xtpl->assign("SELLING_PRICE", $focus->selling_price);
|
||||
$xtpl->assign("EMS_PRICE", $focus->ems_price);
|
||||
$xtpl->assign("COMMISSION_RATE", $focus->commission_rate);
|
||||
$xtpl->assign("CUSTOM_DUTY_RATE", $focus->custom_duty_rate);
|
||||
$xtpl->assign("SRP_PRICE", $focus->srp_price);
|
||||
$xtpl->assign("SRP_PROMO_PRICE", $focus->srp_promo_price);
|
||||
$xtpl->assign("TAX_CLASS_ID", $focus->vat_id);
|
||||
$xtpl->assign("TAX_CLASS_NAME", $focus->vat_name);
|
||||
$xtpl->assign("USAGE_UNIT_ID", $focus->usage_unit_id);
|
||||
$xtpl->assign("USAGE_UNIT_NAME", $focus->usage_unit_name);
|
||||
$xtpl->assign("EMS_QTY_IN_STOCK", $focus->ems_qty_in_stock);
|
||||
$xtpl->assign("SALES_LAST_MONTH_1", $focus->sales_last_month_1);
|
||||
$xtpl->assign("SALES_LAST_MONTH", $focus->sales_last_month);
|
||||
$xtpl->assign("SALES_THIS_MONTH", $focus->sales_this_month);
|
||||
$xtpl->assign("QTY_PER_UNIT", $focus->qty_per_unit);
|
||||
$xtpl->assign("AVERAGE_SALE_3_MONTHS", $focus->average_sale_3_months);
|
||||
$xtpl->assign("SALES_PLUS_1", $focus->sales_plus_1);
|
||||
$xtpl->assign("SALES_PLUS_2", $focus->sales_plus_2);
|
||||
$xtpl->assign("SALES_PLUS_3", $focus->sales_plus_3);
|
||||
$xtpl->assign("PRODUCT_PICTURE", show_image("modules/EcmProductB2Bs/upload/images/".$focus->product_picture));
|
||||
$xtpl->assign("PACKING_FRONT_PICTURE", show_image("modules/EcmProductB2Bs/upload/images/".$focus->packing_front_picture));
|
||||
$xtpl->assign("DRIVER_1", $focus->driver_1);
|
||||
if($focus->driver_1)$xtpl->assign("DRIVER_1_DOWNLOAD",'<a href="modules/EcmProductB2Bs/upload/'.$focus->driver_1.'">Download</a>');
|
||||
$xtpl->assign("DRIVER_2", $focus->driver_2);
|
||||
if($focus->driver_2)$xtpl->assign("DRIVER_2_DOWNLOAD",'<a href="modules/EcmProductB2Bs/upload/'.$focus->driver_2.'">Download</a>');
|
||||
$xtpl->assign("MOQ", $focus->moq);
|
||||
$xtpl->assign("FOB_BASIS_ID", $focus->fob_basis_id);
|
||||
$xtpl->assign("FOB_BASIS_NAME", $focus->fob_basis_name);
|
||||
$xtpl->assign("DELIVERY_TIME_FOB", $focus->delivery_time_fob);
|
||||
$xtpl->assign("PIECES_PER_CARTON", $focus->pieces_per_carton);
|
||||
$xtpl->assign("PRODUCT_NETTO_WEIGHT", $focus->product_netto_weight);
|
||||
$xtpl->assign("PRODUCT_BRUTTO_WEIGHT", $focus->product_brutto_weight);
|
||||
$xtpl->assign("PACKING_TYPE_ID", $focus->packing_type_id);
|
||||
$xtpl->assign("PACKING_TYPE_NAME", $focus->packing_type_name);
|
||||
$xtpl->assign("PACKING_DIMENSIONS_1", $focus->packing_dimensions_1);
|
||||
$xtpl->assign("PACKING_DIMENSIONS_2", $focus->packing_dimensions_2);
|
||||
$xtpl->assign("PACKING_DIMENSIONS_3", $focus->packing_dimensions_3);
|
||||
$xtpl->assign("RMA", $focus->rma);
|
||||
$xtpl->assign("CARTON_DIMENSIONS_1", $focus->carton_dimensions_1);
|
||||
$xtpl->assign("CARTON_DIMENSIONS_2", $focus->carton_dimensions_2);
|
||||
$xtpl->assign("CARTON_DIMENSIONS_3", $focus->carton_dimensions_3);
|
||||
$xtpl->assign("CARTON_NETTO_WEIGHT", $focus->carton_netto_weight);
|
||||
$xtpl->assign("CARTON_BRUTTO_WEIGHT", $focus->carton_brutto_weight);
|
||||
$xtpl->assign("CARTON_VOLUME_METER", $focus->carton_volume_meter);
|
||||
$xtpl->assign("CARTON_VOLUME_FEET", $focus->carton_volume_feet);
|
||||
$xtpl->assign("COUNTRY_OF_ORIGIN", $focus->country_of_origin);
|
||||
$xtpl->assign("EMS_ORDERED", $focus->ems_ordered);
|
||||
|
||||
$st='';
|
||||
$w=$GLOBALS['db']->query("select id,name from ecmstocks where deleted='0' order by name asc");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$st.='<option value="'.$r['id'].'">'.$r['name'].'</option>';
|
||||
}
|
||||
|
||||
$xtpl->assign("STOCK_INFO", $st);
|
||||
|
||||
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
$currency = new Currency();
|
||||
if(isset($focus->exchange_rate_id) && !empty($focus->exchange_rate_id))
|
||||
{
|
||||
$currency->retrieve($focus->exchange_rate_id);
|
||||
if( $currency->deleted != 1){
|
||||
$xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol );
|
||||
}else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
|
||||
}else{
|
||||
|
||||
$xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() );
|
||||
|
||||
}
|
||||
|
||||
include("modules/EcmDocs/Pagination.php");
|
||||
$xtpl->assign("PAGINATION1",getPagination("ecmproducts","EcmProductB2Bs",$_REQUEST['record']));
|
||||
if ($focus->certificate_of_origin == '1') $xtpl->assign('CERTIFICATE_OF_ORIGIN', "checked");
|
||||
if ($focus->form_a == '1') $xtpl->assign('FORM_A', "checked");
|
||||
global $db;
|
||||
$result = $GLOBALS['db']->query("select ean,remarks,short_description,long_description,language from ecmproduct_language where ecmproduct_id='".$_REQUEST['record']."'");
|
||||
while($row=$GLOBALS['db']->fetchByAssoc($result))
|
||||
{
|
||||
$xtpl->assign("EAN_".$row['language'],$row['ean']);
|
||||
$xtpl->assign("REMARKS_".$row['language'],$row['remarks']);
|
||||
$xtpl->assign("SHORT_DESCRIPTION_".$row['language'],$row['short_description']);
|
||||
$xtpl->assign("LONG_DESCRIPTION_".$row['language'],$row['long_description']);
|
||||
}
|
||||
global $current_user;
|
||||
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
$xtpl->assign("CREATED_BY", $focus->created_by_name);
|
||||
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
|
||||
|
||||
$detailView->processListNavigation($xtpl, "ECMPRODUCTS", $offset, $focus->is_AuditEnabled());
|
||||
|
||||
// ADDING CUSTOM FIELDS:
|
||||
require_once('modules/DynamicFields/templates/Files/DetailView.php');
|
||||
|
||||
if(!empty($focus->id)) {
|
||||
$merge_button = <<<EOQ
|
||||
<input title="{$app_strings['LBL_DUP_MERGE']}" accessKey="M" class="button" onclick="this.form.return_module.value='EcmProductB2Bs'; this.form.return_action.value='DetailView';this.form.return_id.value='{$focus->id}'; this.form.action.value='Step1'; this.form.module.value='MergeRecords';" type="submit" name="Merge" value=" {$app_strings['LBL_DUP_MERGE']} "/>
|
||||
EOQ;
|
||||
$xtpl->assign("FIND_DUPES_MERGE_BUTTON", $merge_button);
|
||||
}
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
|
||||
$sub_xtpl = $xtpl;
|
||||
$old_contents = ob_get_contents();
|
||||
ob_end_clean();
|
||||
ob_start();
|
||||
echo $old_contents;
|
||||
|
||||
require_once('modules/SavedSearch/SavedSearch.php');
|
||||
$savedSearch = new SavedSearch();
|
||||
$json = getJSONobj();
|
||||
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmProductB2Bs')));
|
||||
$str = "<script>
|
||||
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
|
||||
</script>";
|
||||
echo $str;
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, "EcmProductB2Bs");
|
||||
echo $subpanel->display();
|
||||
|
||||
?>
|
||||
20
modules/EcmProductB2Bs/EcmCron/ImportEms.php
Executable file
20
modules/EcmProductB2Bs/EcmCron/ImportEms.php
Executable file
@@ -0,0 +1,20 @@
|
||||
<?
|
||||
require_once("config.php");
|
||||
$sql1=mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
|
||||
mysql_select_db($sugar_config['dbconfig']['db_name']);
|
||||
$sql2=mysql_connect("83.13.113.250","e5crm","e52005pkr");
|
||||
mysql_select_db("e5crm");
|
||||
$q=$GLOBALS['db']->query("select code,id from ecmproducts",$sql1);
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($q))
|
||||
{
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select stan,cena,zamowione from stany where indeks='".$r['code']."'",$sql2));
|
||||
$stan=$rr['stan'];
|
||||
$cena=$rr['cena'];
|
||||
$zamowione=$rr['zamowione'];
|
||||
print "produkt: ".$r['code'].", stan: ".$stan.", cena: ".$cena.", zamowione: ".$zamowione;
|
||||
if($GLOBALS['db']->query("update ecmproducts set ems_ordered='".$zamowione."',ems_price='".$cena."',ems_qty_in_stock='".$stan."' where code='".$r['code']."'",$sql1))print "zapisano<br>";
|
||||
else print "nie zapisano<br>";
|
||||
}
|
||||
mysql_close($sql2);
|
||||
mysql_close($sql1);
|
||||
?>
|
||||
993
modules/EcmProductB2Bs/EcmProductB2B.php
Executable file
993
modules/EcmProductB2Bs/EcmProductB2B.php
Executable file
@@ -0,0 +1,993 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
require_once('data/SugarBean.php');
|
||||
require_once('include/utils.php');
|
||||
include_once("modules/EcmStockOperations/EcmStockOperation.php");
|
||||
include_once("modules/EcmPaymentStates/helper.php");
|
||||
|
||||
// SHOULD INCLUDE SELECTIVELY
|
||||
|
||||
|
||||
class EcmProductB2B extends SugarBean {
|
||||
var $field_name_map = array();
|
||||
// STANDARD FIELDS
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $name;
|
||||
|
||||
//TABLE COLUMNS
|
||||
var $code;
|
||||
var $product_category_id;
|
||||
var $product_category_name;
|
||||
var $product_subcategory_id;
|
||||
var $product_subcategory_name;
|
||||
var $product_line_id;
|
||||
var $product_line_name;
|
||||
var $manufacturer_id;
|
||||
var $manufacturer_name;
|
||||
var $contact_id;
|
||||
var $contact_name;
|
||||
var $vendor_id;
|
||||
var $vendor_name;
|
||||
var $vendor_part_no;
|
||||
var $product_active;
|
||||
var $flag;
|
||||
var $sales_start_date;
|
||||
var $sales_end_date;
|
||||
var $parent_type;
|
||||
var $parent_id;
|
||||
var $parent_name;
|
||||
var $website;
|
||||
var $part_no;
|
||||
var $serial_no;
|
||||
var $exchange_rate_id;
|
||||
var $exchange_rate_name;
|
||||
var $fob_price;
|
||||
var $purchase_price;
|
||||
var $ems_price;
|
||||
var $commission_rate;
|
||||
var $custom_duty_rate;
|
||||
var $srp_price;
|
||||
var $srp_price_eur;
|
||||
var $srp_promo_price;
|
||||
var $tax_class_id;
|
||||
var $tax_class_name;
|
||||
var $usage_unit_id;
|
||||
var $usage_unit_name;
|
||||
var $qty_in_stock;
|
||||
var $qty_in_demand;
|
||||
var $ems_qty_in_stock;
|
||||
var $reorder_level;
|
||||
var $sales_last_month_1;
|
||||
var $sales_last_month;
|
||||
var $sales_this_month;
|
||||
var $qty_per_unit;
|
||||
var $average_sale_3_months;
|
||||
var $sales_plus_1;
|
||||
var $sales_plus_2;
|
||||
var $sales_plus_3;
|
||||
var $product_picture;
|
||||
var $packing_front_picture;
|
||||
var $driver_1;
|
||||
var $driver_2;
|
||||
var $moq;
|
||||
var $fob_basis_id;
|
||||
var $fob_basis_name;
|
||||
var $delivery_time_fob;
|
||||
var $pieces_per_carton;
|
||||
var $product_netto_weight;
|
||||
var $product_brutto_weight;
|
||||
var $packing_type_id;
|
||||
var $packing_type_name;
|
||||
var $packing_dimensions_1;
|
||||
var $packing_dimensions_2;
|
||||
var $packing_dimensions_3;
|
||||
var $rma;
|
||||
var $carton_dimensions_1;
|
||||
var $carton_dimensions_2;
|
||||
var $carton_dimensions_3;
|
||||
var $carton_netto_weight;
|
||||
var $carton_brutto_weight;
|
||||
var $carton_volume_meter;
|
||||
var $carton_volume_feet;
|
||||
var $country_of_origin;
|
||||
var $certificate_of_origin;
|
||||
var $form_a;
|
||||
var $vat_id;
|
||||
var $vat_name;
|
||||
var $vat_value;
|
||||
var $selling_price;
|
||||
var $ems_ordered;
|
||||
var $graduated_prices;
|
||||
var $unit_id;
|
||||
var $ordered;
|
||||
var $lead_time;
|
||||
var $production;
|
||||
var $description_card;
|
||||
var $characteristic_card;
|
||||
var $specification_card;
|
||||
var $used_to_card;
|
||||
var $image_card;
|
||||
var $end_of_line;
|
||||
var $status;
|
||||
var $add_status;
|
||||
var $models;
|
||||
|
||||
var $position_list;
|
||||
|
||||
var $th;
|
||||
|
||||
// RELATED FIELDS
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $assigned_user_name;
|
||||
|
||||
// SUBPANELS RELATED
|
||||
|
||||
// MODULE OBJECT DETAILS
|
||||
var $module_dir = 'EcmProductB2Bs';
|
||||
var $table_name = "ecmproducts";
|
||||
var $object_name = "EcmProductB2B";
|
||||
|
||||
//RELATED TABLE NAMES
|
||||
|
||||
|
||||
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
|
||||
var $additional_column_fields = Array(
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
'modified_user_id',
|
||||
'created_by',
|
||||
);
|
||||
|
||||
var $relationship_fields = Array(
|
||||
//RELATIONSHIP FIELDS
|
||||
|
||||
);
|
||||
|
||||
function EcmProductB2B() {
|
||||
parent::SugarBean();
|
||||
$this->setupCustomFields('EcmProductB2Bs');
|
||||
foreach ($this->field_defs as $field)
|
||||
{
|
||||
$this->field_name_map[$field['name']] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
function get_summary_text(){
|
||||
return "$this->name";
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted = 0){
|
||||
// Fill in the assigned_user_name
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT ";
|
||||
$query .= "
|
||||
ecmproducts.*
|
||||
,users.user_name as assigned_user_name";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmproducts
|
||||
LEFT JOIN users
|
||||
ON ecmproducts.assigned_user_id=users.id";
|
||||
|
||||
|
||||
$query .= " ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
}else if($show_deleted == 1){
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
if(substr_count($order_by, '.') > 0){
|
||||
$query .= " ORDER BY $order_by";
|
||||
}
|
||||
else if($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY ecmproducts.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function create_export_query($order_by, $where){
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT
|
||||
ecmproducts.*,
|
||||
users.user_name assigned_user_name";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmproducts ";
|
||||
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmproducts.assigned_user_id=users.id";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$query .= "";
|
||||
$where_auto = " ecmproducts.deleted=0
|
||||
";
|
||||
|
||||
if($where != "")
|
||||
$query .= " where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= " where ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY ecmproducts.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields(){
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields(){
|
||||
// FILL IN THE ASSIGNED_USER_NAME
|
||||
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
|
||||
$this->created_by_name = get_assigned_user_name($this->created_by);
|
||||
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
|
||||
|
||||
$r = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='".$this->id."'"));
|
||||
$this->ems_qty_in_stock = $r['qty'];
|
||||
}
|
||||
function getSale($date){
|
||||
foreach($date as $d){
|
||||
$z="select
|
||||
sum(
|
||||
CASE WHEN e.type!='correct'
|
||||
THEN
|
||||
CASE WHEN e.currency_value is null or e.currency_value=''
|
||||
THEN
|
||||
i.price*i.quantity
|
||||
ELSE
|
||||
i.price*i.quantity*e.currency_value
|
||||
END
|
||||
ELSE
|
||||
CASE WHEN ci.price is null or ci.quantity is null
|
||||
THEN
|
||||
0
|
||||
ELSE
|
||||
i.price*i.quantity-ci.price*ci.quantity
|
||||
END
|
||||
END
|
||||
) as sales,
|
||||
sum(
|
||||
CASE WHEN e.type!='correct'
|
||||
THEN
|
||||
i.purchase_price*i.quantity
|
||||
ELSE
|
||||
CASE WHEN ci.quantity is null
|
||||
THEN
|
||||
0
|
||||
ELSE
|
||||
ci.purchase_price*i.quantity-ci.purchase_price*ci.quantity
|
||||
END
|
||||
END
|
||||
) as purchase,
|
||||
sum(
|
||||
CASE WHEN e.type!='correct'
|
||||
THEN
|
||||
i.quantity
|
||||
ELSE
|
||||
CASE WHEN ci.quantity is null
|
||||
THEN
|
||||
0
|
||||
ELSE
|
||||
i.quantity-ci.quantity
|
||||
END
|
||||
END
|
||||
) as quantity
|
||||
from ecminvoiceoutitems as i
|
||||
left join ecminvoiceoutitems as ci on i.ecminvoiceoutitem_id=ci.id
|
||||
inner join ecminvoiceouts as e on e.id=i.ecminvoiceout_id
|
||||
left join ecmstockdocouts as w on e.wz_id=w.id
|
||||
left join ecmproducts as p on p.id=i.ecmproduct_id
|
||||
where
|
||||
e.register_date like '".$d."%' and e.status='accepted' and i.ecmproduct_id='".$this->id."'";
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query($z));
|
||||
$total_s+=$r['sales'];
|
||||
$total_p+=$r['purchase'];
|
||||
$total_q+=$r['quantity'];
|
||||
/*$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(i.quantity) as q,sum(i.quantity*i.price) as s,sum(i.quantity*i.purchase_price) as p from ecminvoiceouts as e inner join ecminvoiceoutitems as i on i.ecminvoiceout_id=e.id where e.register_date like '".$d."%' and e.status='accepted' and i.ecmproduct_id='".$this->id."'"));
|
||||
$total_s+=$r['s'];
|
||||
$total_p+=$r['p'];
|
||||
$total_q+=$r['q'];
|
||||
$w=$GLOBALS['db']->query("select i.quantity,i.price,i.purchase_price,i.ecminvoiceoutitem_id from ecminvoiceouts as e inner join ecminvoiceoutitems as i on i.ecminvoiceout_id=e.id where e.register_date like '".$d."%' and e.status='accepted' and e.type='correct' and i.ecmproduct_id='".$this->id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$total_s+=$r['price']*$r['quantity'];
|
||||
$total_q+=$r['quantity'];
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select price,quantity,purchase_price from ecminvoiceoutitems where id='".$r['ecminvoiceoutitem_id']."'"));
|
||||
$totat_s-=$rr['price']*$rr['quantity'];
|
||||
$totat_p-=$rr['purchase_price']*$rr['quantity'];
|
||||
$total_p+=$rr['purchase_price']*$r['quantity'];
|
||||
$totat_q-=$rr['quantity'];
|
||||
}*/
|
||||
}
|
||||
//echo $total_s." ".$total_p." ".$total_q."<br>";
|
||||
return array("sale"=>$total_s,"purchase"=>$total_p,"quantity"=>$total_q);
|
||||
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $current_language,$current_user,$app_list_strings;
|
||||
global $numerek;
|
||||
$numerek=$this->id;
|
||||
$i=0;
|
||||
$i++;
|
||||
$the_array = parent::get_list_view_data();
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$mod_strings = return_module_language($current_language, 'EcmProductB2Bs');
|
||||
global $current_user_id;
|
||||
|
||||
$r = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT SUM(quantity) as qty FROM ecmstockstates WHERE product_id='".$this->id."'"));
|
||||
$this->ems_qty_in_stock = $r['qty'];
|
||||
|
||||
// THE NEW LISTVIEW CODE ONLY FETCHES COLUMNS THAT WE'RE DISPLAYING AND NOT ALL
|
||||
// THE COLUMNS SO WE NEED THESE CHECKS.
|
||||
$the_array['NAME'] = (($this->name == "") ? "<em>blank</em>" : $this->name);
|
||||
//chmod('modules/EcmProductB2Bs/upload/images/'.$this->product_picture,777);
|
||||
if(file_exists('modules/EcmProductB2Bs/upload/images/'.$this->product_picture) && $this->product_picture){
|
||||
$the_array['IMAGE']='<img src="pic.php?p=modules/EcmProductB2Bs/upload/images/'.$this->product_picture.'&w=90&h=84" border="0">';
|
||||
|
||||
}
|
||||
$the_array['STOCK_QTY'] = 0;
|
||||
$op=new EcmStockOperation();
|
||||
$the_array['STOCK_QTY']=$op->getAllQuantity($this->id);
|
||||
$the_array['ENCODED_NAME'] = $this->name;
|
||||
$lolek=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(pp.product_quantity) as l from ecmproducts_ecmpurchaseorders as pp inner join ecmpurchaseorders as p on p.id=pp.ecmpurchaseorder_id where pp.ecmproduct_id='".$this->id."' and p.status='accepted'"));
|
||||
|
||||
$the_array['ORDERED']=$lolek['l'];
|
||||
$the_array['SRP_PRICE'] = number_format($this->srp_price,2,$GLOBALS['sugar_config']['default_decimal_seperator'],$GLOBALS['sugar_config']['default_number_grouping_seperator']);
|
||||
$the_array['EDIT_BTN'] = '<img src="modules/EcmQuotes/images/edit_inline_enabled.gif" onclick="javascript:window.location=\'index.php?module=EcmProductB2Bs&action=EditView&record='.$this->id.'&return_module=EcmProductB2Bs&return_action=index\';" style="cursor: pointer;" border="0">';
|
||||
$the_array['PURCHASE_PRICE'] = number_format($this->purchase_price,2,$GLOBALS['sugar_config']['default_decimal_seperator'],$GLOBALS['sugar_config']['default_number_grouping_seperator']);
|
||||
$the_array['COMMISSION_RATE'] = number_format($this->commission_rate,2,$GLOBALS['sugar_config']['default_decimal_seperator'],$GLOBALS['sugar_config']['default_number_grouping_seperator']);
|
||||
if($_SESSION[$current_user->user_name.'_PREFERENCES']['global']['EcmProductB2BsQ']['stock_id_basic']){
|
||||
$sid=$_SESSION[$current_user->user_name.'_PREFERENCES']['global']['EcmProductB2BsQ']['stock_id_basic'];
|
||||
$st=" and stock_id='".$sid."'";
|
||||
}
|
||||
elseif($_SESSION[$current_user->user_name.'_PREFERENCES']['global']['EcmProductB2BsQ']['stock_id_advanced']) {
|
||||
$sid=$_SESSION[$current_user->user_name.'_PREFERENCES']['global']['EcmProductB2BsQ']['stock_id_advanced'];
|
||||
$st=" and stock_id='".$sid."'";
|
||||
}
|
||||
else $st="";
|
||||
$this->retrieve($this->id);
|
||||
$r2 = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select round(price,2) as price from ecmstockdocinitems where ecmproduct_id='".$this->id."' order by date_entered desc LIMIT 1"));
|
||||
$the_array['LAST_PURCHASE_PRICE']=number_format($r2['price'],2,",",".");
|
||||
|
||||
$the_array['UNIT_NAME']=$app_list_strings['ecmproducts_unit_dom'][$this->unit_id];
|
||||
if (!$this->code) $this->code='--';
|
||||
|
||||
if ($_REQUEST['action']=='ListView' || $_REQUEST['action']=='index') {
|
||||
if ($this->product_active) {
|
||||
if($this->status=='active'){
|
||||
$the_array['CODE']='<div style="background:green;font-weight:bold;padding:3px;color:white;text-align:center">'.$this->code.'</div>';
|
||||
}
|
||||
if($this->status=='new'){
|
||||
$the_array['CODE']='<div style="background:blue;font-weight:bold;padding:3px;color:white;text-align:center">'.$this->code.'</div>';
|
||||
}
|
||||
if($this->status=='end_of_line'){
|
||||
$the_array['CODE']='<div style="background:yellow;font-weight:bold;padding:3px;color:red;text-align:center">'.$this->code.'</div>';
|
||||
}
|
||||
if(!$this->status){
|
||||
$the_array['CODE']='<div style="background:grey;font-weight:bold;padding:3px;color:red;text-align:center">'.$this->code.'</div>';
|
||||
}
|
||||
} else
|
||||
$the_array['CODE']='<div style="background:red;font-weight:bold;padding:3px;color:white;text-align:center">'.$this->code.'</div>';
|
||||
}
|
||||
|
||||
/*$z="select sum(quantity) as q from ecmstockstates where product_id='".$this->id."' and deleted='0'".$st;
|
||||
$w=$GLOBALS['db']->query($z);
|
||||
$qq=0;
|
||||
$r=$GLOBALS['db']->fetchByAssoc($w);
|
||||
$qq+=$r['q'];*/
|
||||
|
||||
|
||||
|
||||
$the_array['EMS_QTY_IN_STOCK']=number_format($this->ems_qty_in_stock,0,"","");
|
||||
|
||||
/*
|
||||
include_once("modules/EcmProductB2BReports/vtigerConnector.php");
|
||||
$vc=new vtigerConnector();
|
||||
$vc->where="poproductrel.productcode like '".$this->code."'";
|
||||
$vc->limit="0,999";
|
||||
$vc->getData();
|
||||
$vc->getCount();
|
||||
$data=$vc->data;
|
||||
for($i=0;$i<$vc->count;$i++){
|
||||
$ord+=$data[$i]['quantity'];
|
||||
}
|
||||
*/
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecmproducts where id='".$this->id."'"));
|
||||
|
||||
$rp_sum=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(p.product_quantity) as s from ecmproducts_ecmpurchaseorders as p inner join ecmpurchaseorders as e on e.id=p.ecmpurchaseorder_id where p.ecmproduct_id='".$this->id."' and p.deleted='0' and e.deleted='0'"));
|
||||
$rp_app=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(p.product_quantity) as s from ecmproducts_ecmpurchaseorders as p inner join ecmpurchaseorders as e on e.id=p.ecmpurchaseorder_id where p.ecmproduct_id='".$this->id."' and p.deleted='0' and (e.status='accepted' or e.status='mailed') and e.deleted='0'"));
|
||||
$rp_cr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select sum(p.product_quantity) as s from ecmproducts_ecmpurchaseorders as p inner join ecmpurchaseorders as e on e.id=p.ecmpurchaseorder_id where p.ecmproduct_id='".$this->id."' and p.deleted='0' and e.status='not_accepted' and e.deleted='0'"));
|
||||
|
||||
$the_array['ORD_CREATED']=$rp_cr['s'];
|
||||
$the_array['ORD_APPROVED']=$rp_app['s'];
|
||||
//$the_array['ORDERED']=$rp_app['s']+$rp_cr['s'];
|
||||
//$the_array['ORD_DELIVERED']=$r['ord_delivered'];
|
||||
|
||||
$the_array['Q0']=round($r['q0']);
|
||||
$the_array['Q3']=round(($r['q3']));
|
||||
|
||||
$the_array['S0']=number_format($r['s0'],2,",",".");
|
||||
$the_array['S3']=number_format($r['s3'],2,",",".");
|
||||
|
||||
$the_array['P0']=number_format($r['p0'],2,",",".");
|
||||
$the_array['P3']=number_format($r['p3'],2,",",".");
|
||||
|
||||
$stock_value=($this->ems_price*$this->ems_qty_in_stock);
|
||||
$the_array['STOCK_VALUE']=number_format($stock_value,2,",",".");
|
||||
|
||||
if(round(($r['s3']))!=0)$stock_month=(($this->ems_qty_in_stock+$this->ordered)/round(($r['s3'])));
|
||||
else $stock_month=0;
|
||||
$the_array['STOCK_MONTH']=number_format($stock_month,2,",",".");
|
||||
|
||||
$the_array['EMS_PRICE']=number_format($this->ems_price,2,",",".");
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select flag from ecmproducts where id='".$this->id."'"));
|
||||
if($this->flag){
|
||||
$flag=0;
|
||||
$color="red";
|
||||
}
|
||||
else {
|
||||
$flag=1;
|
||||
$color="#cccccc";
|
||||
}
|
||||
$the_array['FLAGS']='<a href="index.php?module=EcmProductB2Bs&action=setFlag&flag='.$flag.'&record='.$this->id.'" style="color:'.$color.';font-weight:bold;text-decoration:none;font-size:16px;">!</a>';
|
||||
|
||||
$the_array['HINT']=HintProduct($this->id,$this->description,$this->add_status);
|
||||
|
||||
// $the_array['TO_ORDER'] = $r['to']
|
||||
|
||||
|
||||
|
||||
//$GLOBALS['db']->query("update ecmproducts set q0='".$s0['quantity']."',p0='".($s0['sale']-$s0['purchase'])."',s0='".$s0['sale']."',q3='".($s3['quantity']/3)."',p3='".(($s3['sale']-$s3['purchase'])/3)."',s3='".($s3['sale']/3)."',stock_month='".$stock_month."',stock_value='".$stock_value."' where id='".$this->id."'");
|
||||
//echo mysql_error();
|
||||
// echo $i;
|
||||
|
||||
return $the_array;
|
||||
}
|
||||
|
||||
/**
|
||||
BUILDS A GENERIC SEARCH BASED ON THE QUERY STRING USING OR.
|
||||
DO NOT INCLUDE ANY $THIS-> BECAUSE THIS IS CALLED ON WITHOUT HAVING THE CLASS INSTANTIATED.
|
||||
*/
|
||||
function build_generic_where_clause ($the_query_string) {
|
||||
$where_clauses = Array();
|
||||
$the_query_string = PearDatabase::quote(from_html($the_query_string));
|
||||
array_push($where_clauses, "ecmproducts.name like '$the_query_string%'");
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause){
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $simplemodule){
|
||||
global $mod_strings, $app_list_strings;
|
||||
|
||||
$xtpl->assign("NAME", $simplemodule->name);
|
||||
$xtpl->assign("ECMPRODUCTS_DESCRIPTION", $ecmproducts->description);
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function r($t){
|
||||
$t=str_replace(".","",$t);
|
||||
$t=str_replace(",",".",$t);
|
||||
$t=floatval($t);
|
||||
return $t;
|
||||
}
|
||||
function save($check_notify = FALSE){
|
||||
include("modules/EcmProductB2Bs/generateEAN.php");
|
||||
if ($_REQUEST['newEan']=='1') $_REQUEST['ean']=generateEan(1);
|
||||
if ($_REQUEST['newEan2']=='1') $this->ean2 = generateEAN(2);
|
||||
|
||||
//$_REQUEST['ean2'] = generateEan(1);
|
||||
|
||||
|
||||
if($_REQUEST['massupdate']){
|
||||
foreach($_REQUEST['mass'] as $m)$mm[]="id='".$m."'";
|
||||
if($_REQUEST['production'])$set[]="production='".$_REQUEST['production']."'";
|
||||
if($_REQUEST['product_active'])$set[]="product_active='".$_REQUEST['product_active']."'";
|
||||
if($_REQUEST['end_of_line'])$set[]="end_of_line='".$_REQUEST['end_of_line']."'";
|
||||
if($_REQUEST['sales_start_date'])$set[]="sales_start_date='".date("Y-m-d",strtotime($GLOBALS['timedate']->to_db_date($_REQUEST['sales_start_date']))+24*3600)."'";
|
||||
if($_REQUEST['sales_end_date'])$set[]="sales_end_date='".date("Y-m-d",strtotime($GLOBALS['timedate']->to_db_date($_REQUEST['sales_end_date']))+24*3600)."'";
|
||||
if(count($set)>0)$z="update ecmproducts set ".implode(",",$set)." where ".implode(" or ",$mm);
|
||||
//echo $z;
|
||||
$GLOBALS['db']->query($z);
|
||||
header("Location: index.php?module=EcmProductB2Bs&action=index");
|
||||
}
|
||||
else{
|
||||
$return_id = parent::save($check_notify);
|
||||
|
||||
$components = self::ParseComponentsFromPOST();
|
||||
if(!(!is_array($components) && $components == false)) $this->position_list = $components;
|
||||
$this->savePositions($return_id);
|
||||
|
||||
//save categories
|
||||
$this->savePositions3($_POST['position_list3']);
|
||||
$this->savePrices($_POST['position_list4']);
|
||||
|
||||
return $return_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static function ParseComponentsFromPOST() {
|
||||
if(isset($_POST['position_list'])) {
|
||||
$c_ = $_POST['position_list'];
|
||||
$json = getJSONobj();
|
||||
$c = $json->decode(htmlspecialchars_decode($c_));
|
||||
return $c;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//***************************Start Managing Positions*************************//
|
||||
function constructInsertQuery($data, $table = '') {
|
||||
|
||||
if($table == '' && isset($this->object_name) && $this->object_name != '') {
|
||||
$table = strtolower($this->object_name)."components";
|
||||
} else return "";
|
||||
|
||||
$keys = array();
|
||||
$values = array();
|
||||
foreach($data as $key => $value) {
|
||||
$keys[] = $key;
|
||||
if(is_array($value))
|
||||
$values[] = $value[1].str_replace("'", "\'", $value[0]).$value[1];
|
||||
else
|
||||
$values[] = "'".str_replace("'", "\'", $value)."'";
|
||||
}
|
||||
|
||||
$q = "insert into `$table` (`";
|
||||
$q .= implode('`, `', $keys);
|
||||
$q .= "`) values (";
|
||||
$q .= implode(", ", $values);
|
||||
$q .= ");";
|
||||
|
||||
return $q;
|
||||
}
|
||||
|
||||
function savePrices($prices) {
|
||||
if (!is_array($prices)) return null;
|
||||
|
||||
$fields = array('id','ecmprice_id','ecmproduct_id','price');
|
||||
$new = array();
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$db->query("insert into log (msg) VALUES ('tu')");
|
||||
foreach ($prices as $p) {
|
||||
$db->query("insert into log (msg) VALUES ('tam2')");
|
||||
if (!isset($p['price']) || !isset($p['ecmpricebook_id']) || floatval($p['price'])==0) continue;
|
||||
$db->query("insert into log (msg) VALUES ('tam')");
|
||||
$id = create_guid();
|
||||
$new[] = $id;
|
||||
|
||||
$tmp = array();
|
||||
$tmp[] = $id;
|
||||
$tmp[] = $p['ecmpricebook_id'];
|
||||
$tmp[] = $this->id;
|
||||
$tmp[] = floatval($p['price']);
|
||||
|
||||
$query = "INSERT INTO ecmprices_ecmproducts (".implode(",", $fields).") VALUES ('".implode("','", $tmp)."')";
|
||||
|
||||
$db->query($query);
|
||||
}
|
||||
$db->query("delete from ecmprices_ecmproducts where ecmproduct_id='".$this->id."' AND id NOT IN ('".implode("','",$new)."')");
|
||||
}
|
||||
|
||||
function showPrices(){
|
||||
$arr=$this->getPricesList(true);
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view">
|
||||
<tr class="oddListRowS1">
|
||||
<th width="15%"><b>Nazwa</b></td>
|
||||
<th><b>Wartość</b></td>
|
||||
<th><b>Waluta</b></td>
|
||||
</tr>
|
||||
';
|
||||
foreach($arr as $a){
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||
'.$a['pricebook_name'].'</td>
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||
'.format_number($a['price']).'</td>
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">
|
||||
'.$a['currency'].'</td>
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
function savePositions($id = null, $position_list = null) {
|
||||
|
||||
global $current_user, $timedate;
|
||||
|
||||
if($position_list == null) $position_list = $this->position_list;
|
||||
if($id == null) $id = $this->id;
|
||||
|
||||
if(count($position_list) > 0) $this->deleteAssignedPositions($id);
|
||||
|
||||
$arr = array();
|
||||
$position = 0;
|
||||
|
||||
for($i = 0; $i < count($position_list); $i ++) {
|
||||
|
||||
if($position_list[$i]['name'] == '') continue;
|
||||
|
||||
$p = $position_list[$i];
|
||||
|
||||
/* Not Nessesary
|
||||
require_once("modules/EcmVats/EcmVat.php");
|
||||
$vats = new EcmVat();
|
||||
$vats->retrieve($p['vat_id']);
|
||||
$p['vat_name'] = $vats->name;
|
||||
|
||||
require_once("modules/Currencies/Currency.php");
|
||||
$curr = new Currency();
|
||||
$curr->retrieve($p['currency_id']);
|
||||
$p['currency_name'] = $curr->name;
|
||||
|
||||
if(!empty($p['category_id']) || $p['category_id'] == '') {
|
||||
require_once("modules/EcmProductB2Bs/EcmProductB2B.php");
|
||||
$pr = new EcmProductB2B();
|
||||
$pr->retrieve($p['id']);
|
||||
$p['category_id'] = $pr->product_category_id;
|
||||
}
|
||||
*/
|
||||
|
||||
$arr = array(
|
||||
|
||||
'id' => create_guid(),
|
||||
'date_entered' => array('NOW()', ''),
|
||||
'date_modified' => array('NOW()', ''),
|
||||
'modified_user_id' => $current_user->id,
|
||||
'assigned_user_id' => $current_user->id,
|
||||
'created_by' => $current_user->id,
|
||||
'deleted' => '0',
|
||||
strtolower($this->object_name).'_id' => $id,
|
||||
'ecmcomponent_id' => $p['id'],
|
||||
'position' => $position,
|
||||
'code' => $p['code'],
|
||||
'name' => $p['name'],
|
||||
'quantity' => ((empty($p['quantity']) || $p['quantity'] == '') ? 0 : $p['quantity']),
|
||||
'ecmusageunit_id' => $p['unit_id'],
|
||||
|
||||
/* Not Nessesary
|
||||
'price' => ((empty($p['price']) || $p['price'] == '') ? 0 : $p['price']),
|
||||
'discount' => ((empty($p['discount']) || $p['discount'] == '') ? 0 : $p['discount']),
|
||||
'total' => ((empty($p['total']) || $p['total'] == '') ? 0 : $p['total']),
|
||||
'dd_unit_id' => $p['unit_id'],
|
||||
'dd_unit_name' => '',
|
||||
'ecmvat_id' => $p['vat_id'],
|
||||
'ecmvat_name' => $p['vat_name'],
|
||||
'ecmvat_value' => $p['vat_value'],
|
||||
'ecmproductcategory_id' => $p['category_id'],
|
||||
'currency_id' => $p['currency_id'],
|
||||
'currency_name' => $p['currency_name'],
|
||||
'recipient_code' => $p['recipient_code'],
|
||||
*/
|
||||
|
||||
);
|
||||
|
||||
$this->db->query($this->constructInsertQuery($arr));
|
||||
$position ++;
|
||||
}
|
||||
|
||||
}
|
||||
function getPosition($position) {
|
||||
|
||||
if(!is_array($position)) return '';
|
||||
|
||||
global $timedate;
|
||||
|
||||
$return_array = array();
|
||||
$return_array['id'] = $position['ecmcomponent_id'];
|
||||
$return_array['position'] = $position['position'];
|
||||
$return_array['code'] = $position['code'];
|
||||
$return_array['name'] = str_replace('"','',$position['name']);
|
||||
$return_array['quantity'] = $position['quantity'];
|
||||
$return_array['price'] = $position['price'];
|
||||
$return_array['discount'] = $position['discount'];
|
||||
$return_array['total'] = $position['total'];
|
||||
$return_array['unit_id'] = $position['ecmusageunit_id'];
|
||||
$return_array['unit_name'] = $position['dd_unit_name'];
|
||||
$return_array['vat_id'] = $position['ecmvat_id'];
|
||||
$return_array['vat_name'] = $position['ecmvat_name'];
|
||||
$return_array['vat_value'] = $position['ecmvat_value'];
|
||||
$return_array['category_id'] = $position['ecmproductcategory_id'];
|
||||
$return_array['currency_id'] = $position['currency_id'];
|
||||
$return_array['currency_name'] = $position['currency_name'];
|
||||
$return_array['recipient_code'] = $position['recipient_code'];
|
||||
|
||||
|
||||
//get ems price
|
||||
$r = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT ems_price FROM ecmproducts WHERE id='".$position['ecmcomponent_id']."'"));
|
||||
$return_array['ems_price'] = $position['quantity'] * $r['ems_price'];
|
||||
if (!$r || $r['ems_price']==0) $return_array['ems_price']=0;
|
||||
|
||||
global $db;
|
||||
$c = $db->fetchByAssoc($db->query("SELECT product_category_id as c, purchase_price as p FROM ecmproducts WHERE id='".$position['ecmcomponent_id']."'"));
|
||||
if ($c['c'] == 'd7f876b0-1a3d-43a1-7c9b-511ba40df3d1')
|
||||
$return_array['ems_price'] = $c['p'];
|
||||
|
||||
return $return_array;
|
||||
|
||||
}
|
||||
function getPositionList($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM `ecmproductcomponents` WHERE `ecmproduct_id`='".$this->id."' order by position asc";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
$return_array [] = $this->getPosition($w);
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function deleteAssignedPositions() {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "DELETE FROM `".strtolower($this->object_name)."components` WHERE `".strtolower($this->object_name)."_id`='".$this->id."'";
|
||||
$r = $this->db->query($query);
|
||||
if($r) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//***************************End Managing Positions*************************//
|
||||
//start managing categories
|
||||
function savePositions3($pl) {
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
|
||||
$first = true;
|
||||
foreach ($pl as $p) {
|
||||
if (!isset($p['ecmproductcategory_id']) || $p['ecmproductcategory_id']=='') continue;
|
||||
//first position save into main category
|
||||
if ($first) {
|
||||
$q = "UPDATE ecmproducts set product_category_id='".$p['ecmproductcategory_id']."', product_category_name='".$p['ecmproductcategory_name']."' WHERE id='".$this->id."'";
|
||||
$GLOBALS['db']->query($q);
|
||||
$first = false;
|
||||
}
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE ecmproductcategories_bean set
|
||||
date_modified = '".date("Y-m-d H:i:s")."',
|
||||
modified_user_id = '".$current_user->id."',
|
||||
bean_id = '".addslashes($this->id)."',
|
||||
ecmproductcategory_id = '".addslashes($p['ecmproductcategory_id'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
|
||||
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
addslashes($p['ecmproductcategory_id']),
|
||||
$this->id,
|
||||
"EcmProductB2Bs",
|
||||
date("Y-m-d H:i:s"),
|
||||
date("Y-m-d H:i:s"),
|
||||
$current_user->id,
|
||||
$current_user->id,
|
||||
'0'
|
||||
);
|
||||
$q = "INSERT INTO ecmproductcategories_bean VALUES ('".implode("','", $t)."')";
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
|
||||
}
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE ecmproductcategories_bean SET deleted='1', modified_user_id='".$current_user->id."',date_modified = '".date("Y-m-d H:i:s")."' WHERE bean_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
|
||||
function getPositionList3($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM ecmproductcategories_bean WHERE bean_id='".$this->id."' AND deleted='0' AND bean_name='EcmProductB2Bs'";
|
||||
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
//get category name && assigned_file
|
||||
$n = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT name, assigned_file FROM ecmproductcategories WHERE id='".$w['ecmproductcategory_id']."'"));
|
||||
$w['ecmproductcategory_name'] = $n['name'];
|
||||
$w['assigned_file'] = $n['assigned_file'];
|
||||
$return_array [] = $w;
|
||||
|
||||
}
|
||||
$json = getJSONobj();
|
||||
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
|
||||
function showPositions3(){
|
||||
$arr=$this->getPositionList3(true);
|
||||
|
||||
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view" width="40%">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>'.$mod_strings['LBL_CATEGORY_NAME'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_CATEGORY_ASSIGNED_FILE'].'</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
//assigned file
|
||||
if ($a['assigned_file']!="" && $a['assigned_file']) {
|
||||
$tmp = explode(".", $a['assigned_file']);
|
||||
if (end($tmp) == 'jpeg' || end($tmp) == 'jpg' || end($tmp) == 'png' || end($tmp) == 'bmp')
|
||||
$af = '<img src="modules/EcmProductB2BCategories/files/'.$a['assigned_file'].'"/>';
|
||||
else
|
||||
$af = '<a href="modules/EcmProductB2BCategories/files/'.$a['assigned_file'].'" target="new">'.$a['assigned_file'].'</a>';
|
||||
}
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;"><a href="index.php?module=EcmProductB2BCategories&action=DetailView&record='.$a['ecmproductcategory_id'].'">'.$a['ecmproductcategory_name'].'</a></td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$af.'</td>
|
||||
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
//end managing categories
|
||||
function getProductResInfo($product_id, $stock_id) {
|
||||
$info = array();
|
||||
global $db;
|
||||
|
||||
require_once('modules/EcmStockOperations/EcmStockOperation.php');
|
||||
$op = new EcmStockOperation();
|
||||
$info['stock']= $op -> getRealStock($product_id, $stock_id);
|
||||
//temp reserwations
|
||||
$rr = $db->fetchByAssoc($db->query("SELECT sum(quantity) as s FROM ecmreservations WHERE product_id='$product_id' AND doc_id IS NULL"));
|
||||
if (!$rr['s']) $rr['s'] = 0;
|
||||
$info['res']= $rr['s'];
|
||||
//doc reservations
|
||||
$res = $db->query("SELECT quantity, doc_id, doc_type FROM ecmreservations WHERE product_id='$product_id' AND doc_id IS NOT NULL");
|
||||
|
||||
if (!is_array($res)==0) return $info;
|
||||
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$type = '';
|
||||
if ($row['doc_type']=='EcmSales') $type = 'ZS';
|
||||
if ($row['doc_type']=='EcmInsideOrders') $type = 'ZW';
|
||||
//get document name
|
||||
$doc = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT document_no, parent_name FROM ".strtolower($row['doc_type'])." WHERE id='".$row['doc_id']."'"));
|
||||
$tmp[] ='<a target="new" href="index.php?module='.$row['doc_type'].'&action=DetailView&record='.$row['doc_id'].'">'.$type.' '.$doc['document_no'].'</a> - '.$row['quantity'].'  '.$doc['parent_name'];
|
||||
}
|
||||
$info['docs']=$tmp;
|
||||
|
||||
return $info;
|
||||
}
|
||||
function getPricesList($array = false) {
|
||||
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT p.id as id, p.name as name, pp.price as price,p.exchange_rate_id as currency FROM ecmprices as p
|
||||
LEFT JOIN ecmprices_ecmproducts as pp
|
||||
ON pp.ecmprice_id=p.id AND pp.ecmproduct_id='".$this->id."'
|
||||
WHERE p.deleted='0'";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
$c = new Currency ();
|
||||
|
||||
if($r) {
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
$tmp = array();
|
||||
$tmp['pricebook_id'] = $w['id'];
|
||||
$tmp['pricebook_name'] = $w['name'];
|
||||
$tmp['price'] = $w['price'];
|
||||
$c->retrieve ( $w['currency']);
|
||||
$tmp['currency']= $c->name;
|
||||
$return_array [] = $tmp;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
}
|
||||
?>
|
||||
99
modules/EcmProductB2Bs/EcmProductsQuickCreate.php
Executable file
99
modules/EcmProductB2Bs/EcmProductsQuickCreate.php
Executable file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/EditView/QuickCreate.php');
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('include/javascript/javascript.php');
|
||||
|
||||
class EcmProductB2BsQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'EcmProductB2Bs');
|
||||
|
||||
parent::process();
|
||||
|
||||
//BUILDER:START dropdowns setup
|
||||
//BUILDER:END dropdowns setup
|
||||
|
||||
if($this->viaAJAX) { // OVERRIDE FOR AJAX CALL
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"ecmproductsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"ecmproducts\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_ecmproducts\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('ecmproductsQuickCreate');
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'ecmproductsQuickCreate',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'account_id',
|
||||
'name' => 'account_name',
|
||||
),
|
||||
);
|
||||
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
$this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
|
||||
}
|
||||
}
|
||||
?>
|
||||
242
modules/EcmProductB2Bs/EditView.php
Executable file
242
modules/EcmProductB2Bs/EditView.php
Executable file
@@ -0,0 +1,242 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings, $db;
|
||||
|
||||
$app_list_strings['ecmproducts_parent_dom'] = array (
|
||||
'Accounts' => $app_list_strings['moduleList']['Accounts'],
|
||||
'Leads' => $app_list_strings['moduleList']['Leads'],
|
||||
);
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
require_once('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
//add jquery
|
||||
echo '<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.css"/>';
|
||||
echo '<link rel="stylesheet" type="text/css" href="include/jQuery/jquery-ui/themes/base/jquery-ui.css"/>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/jQuery/jquery-2.1.0.min.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/jQuery/jquery-table/jquery.appendGrid-1.3.1.js"></script>';
|
||||
echo '<script type="text/javascript"
|
||||
src="include/jQuery/jquery-ui/ui/jquery-ui.js"></script>';
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
if(isset($_REQUEST['record'])){
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
//if(isset($focus->id) && $focus->id != '')$focus->format_all_fields();
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmProductB2Bs/views/EditView/view.edit.ecmproducts.php');
|
||||
$edit = new ViewEditEcmProductB2Bs();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->bean = $focus;
|
||||
|
||||
$edit->preDisplay();
|
||||
|
||||
$uunit='';
|
||||
$result = $db->query("select id,name from ecmproductusageunits order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$uunit.='<option value="'.$row['id'].'"';
|
||||
if($focus->usage_unit_id==$row['id'])$uunit.=' selected';
|
||||
$uunit.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("USAGE_UNIT_ID",$uunit);
|
||||
|
||||
$tax='';
|
||||
$result = $db->query("select id,name from ecmvats where deleted='0' order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$tax.='<option value="'.$row['id'].'"';
|
||||
if($focus->vat_id==$row['id'])$tax.=' selected';
|
||||
$tax.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("VAT_ID",$tax);
|
||||
|
||||
$fbas='';
|
||||
$result = $db->query("select id,name from ecmproductbasis order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$fbas.='<option value="'.$row['id'].'"';
|
||||
if($focus->fob_basis_id==$row['id'])$fbas.=' selected';
|
||||
$fbas.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("FOB_BASIS_ID",$fbas);
|
||||
|
||||
$pack='';
|
||||
$result = $db->query("select id,name from ecmproductpackingtypes order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$pack.='<option value="'.$row['id'].'"';
|
||||
if($focus->packing_type_id==$row['id'])$pack.=' selected';
|
||||
$pack.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$edit->ss->assign("PACKING_TYPE_ID",$pack);
|
||||
|
||||
//load currencies
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
$currency = new Currency();
|
||||
$currency_list = $currency->get_full_list('name');
|
||||
$currency->retrieve('-99');
|
||||
if(is_array($currency_list))
|
||||
{
|
||||
$currency_list = array_merge(Array($currency), $currency_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
$currency_list = Array($currency);
|
||||
}
|
||||
$arr = array();
|
||||
foreach($currency_list as $key=>$value)
|
||||
{
|
||||
$arr[$value->id] = $value->name;
|
||||
}
|
||||
$edit->ss->assign("EXCHANGE_RATE_ID", get_select_options_with_id($arr, $focus->exchange_rate_id));
|
||||
|
||||
$arr=unserialize(base64_decode($focus->models));
|
||||
$result = $GLOBALS['db']->query("select * from ecmproductmodels where deleted='0' and parent_id='".$focus->product_subcategory_id."'");
|
||||
$sm='<div id="models_div"><select name="models[]" multiple id="models" sieze="6">';
|
||||
while($row=$GLOBALS['db']->fetchByAssoc($result)){
|
||||
$sm.='<option value="'.$row['id'].'"';
|
||||
if(@in_array($row['id'],$arr))$sm.=' selected';
|
||||
$sm.='>'.$row['name'].'</option>';
|
||||
}
|
||||
$sm.='</select></div>';
|
||||
$edit->ss->assign("SM", $sm);
|
||||
|
||||
$result = $GLOBALS['db']->query("select * from ecmproduct_language where ecmproduct_id='".$_REQUEST['record']."'");
|
||||
while($row=$GLOBALS['db']->fetchByAssoc($result))
|
||||
{
|
||||
$edit->ss->assign("EAN_".$row['language'],$row['ean']);
|
||||
$edit->ss->assign("REMARKS_".$row['language'],$row['remarks']);
|
||||
$edit->ss->assign("SHORT_DESCRIPTION_".$row['language'],$row['short_description']);
|
||||
$edit->ss->assign("LONG_DESCRIPTION_".$row['language'],$row['long_description']);
|
||||
$edit->ss->assign("PRICE_".$row['language'],number_format($row['price'],2,",","."));
|
||||
}
|
||||
$re=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ean, ean2 from ecmproducts where id='".$_REQUEST['record']."'"));
|
||||
$edit->ss->assign("EAN",$re['ean']);
|
||||
$edit->ss->assign("EAN2",$re['ean2']);
|
||||
|
||||
$edit->ss->assign("CARTON_DIMENSIONS_1",number_format($focus->carton_dimensions_1,3,",","."));
|
||||
$edit->ss->assign("CARTON_DIMENSIONS_2",number_format($focus->carton_dimensions_2,2,",","."));
|
||||
$edit->ss->assign("CARTON_DIMENSIONS_3",number_format($focus->carton_dimensions_3,2,",","."));
|
||||
$edit->ss->assign("PACKING_DIMENSIONS_1",number_format($focus->packing_dimensions_1,2,",","."));
|
||||
$edit->ss->assign("PACKING_DIMENSIONS_2",number_format($focus->packing_dimensions_2,2,",","."));
|
||||
$edit->ss->assign("PACKING_DIMENSIONS_3",number_format($focus->packing_dimensions_3,2,",","."));
|
||||
|
||||
$pl3 = $this->bean->getPositionList3();
|
||||
$edit->ss->assign('POSITION_LIST3', $pl3);
|
||||
|
||||
if($focus->product_picture)$edit->ss->assign("PRODUCT_PICTURE_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
if($focus->packing_front_picture)$edit->ss->assign("PACKING_FRONT_PICTURE_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
if($focus->driver_1)$edit->ss->assign("DRIVER_1_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
if($focus->driver_2)$edit->ss->assign("DRIVER_2_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
|
||||
//Added for Graduated Prices - Begin
|
||||
/* require_once('modules/EcmProductB2Bs/EcmProductB2BGraduatedPrices.php');
|
||||
$epgp = new EcmProductB2BGraduatedPrices($focus->graduated_prices);
|
||||
$edit->ss->assign("PRODUCT_GRADUATED_PRICES_HTML", $epgp->getHtmlEdit());*/
|
||||
//Added for Graduated Prices - End
|
||||
|
||||
//Added for Components
|
||||
$pl4 = $this->bean->getPricesList();
|
||||
$edit->ss->assign('POSITION_LIST4', $pl4);
|
||||
|
||||
$edit->ss->assign("POSITION_LIST", $focus->getPositionList());
|
||||
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
$OPT = array();
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4;
|
||||
$OPT['quick_product_item_adding'] = $cc['quick_product_item_adding'];
|
||||
|
||||
global $current_user;
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_decimal_seperator'];
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_currency_significant_digits'];
|
||||
$OPT['dec_len'] = $tmp;
|
||||
$OPT['default_unit'] = "1";
|
||||
$OPT['default_vat'] = "19.00";
|
||||
$OPT['default_category'] = "";
|
||||
$OPT['default_currency'] = "-99";
|
||||
$OPT['type'] = $focus->type;
|
||||
$OPT['to_is_vat_free'] = $focus->to_is_vat_free;
|
||||
$OPT['ecmproduct_usage_units_options'] = $uunit;
|
||||
|
||||
$scriptOpt = '
|
||||
<script language="javascript">
|
||||
var VAT = '.str_replace('"','\"',$json->encode($VAT)).';
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
var N;
|
||||
</script>';
|
||||
echo $scriptOpt;
|
||||
$edit->ss->assign("OPT", $OPT);
|
||||
//Added for Components
|
||||
|
||||
echo $edit->display();
|
||||
echo '<script language="javascript" src="modules/EcmProductB2Bs/helper.js"></script>';
|
||||
echo '<script language="javascript" src="modules/EcmProductB2Bs/mintajax.js"></script>';
|
||||
echo '<script language="javascript">
|
||||
var sb=document.getElementById("product_subcategory_name");
|
||||
sb.onclick=function(){
|
||||
setTimeout(function(){mintajaxget("index.php?to_pdf=1&module=EcmProductB2Bs&action=getModelsBySubCategory&id="+document.getElementById("product_subcategory_id").value,"models_div");},1000);
|
||||
}
|
||||
function doRequest(where,post,doFunction,error) {
|
||||
this.Display = function(result) { doFunction(result.responseText); }
|
||||
this.Fail = function(result){ if(error) alert(error);}
|
||||
YAHOO.util.Connect.asyncRequest(\'POST\',where,{success:this.Display,failure:this.Fail},post);
|
||||
}
|
||||
|
||||
function generateEAN(nr) {
|
||||
if (document.getElementById(\'ean\').value != \'\') {
|
||||
if (confirm("'.$mod_strings['LBL_EAN_EXISTS'].'")) {
|
||||
doRequest(\'index.php\',\'module=EcmProductB2Bs&action=generateEAN&to_pdf=1&ean=\'+document.getElementById(\'ean\').value+\'&ean2=\'+document.getElementById(\'ean2\').value+\'&fromEdit=1\', function(result) {
|
||||
document.getElementById(\'ean\').value = result;
|
||||
});
|
||||
document.getElementById(\'newEan\').value=\'1\'
|
||||
}
|
||||
} else {
|
||||
doRequest(\'index.php\',\'module=EcmProductB2Bs&action=generateEAN&to_pdf=1&ean=\'+document.getElementById(\'ean\').value+\'&ean2=\'+document.getElementById(\'ean2\').value+\'&fromEdit=1\', function(result) {
|
||||
document.getElementById(\'ean\').value = result;
|
||||
});
|
||||
document.getElementById(\'newEan\').value=\'1\'
|
||||
}
|
||||
}
|
||||
function generateEAN2(nr) {
|
||||
if (document.getElementById(\'ean2\').value != \'\') {
|
||||
if (confirm("'.$mod_strings['LBL_EAN_EXISTS'].'")) {
|
||||
doRequest(\'index.php\',\'module=EcmProductB2Bs&action=generateEAN&to_pdf=1&ean=\'+document.getElementById(\'ean\').value+\'&ean2=\'+document.getElementById(\'ean2\').value+\'&fromEdit=1\', function(result) {
|
||||
document.getElementById(\'ean2\').value = result;
|
||||
});
|
||||
document.getElementById(\'newEan2\').value=\'1\' }
|
||||
} else {
|
||||
doRequest(\'index.php\',\'module=EcmProductB2Bs&action=generateEAN&to_pdf=1&ean=\'+document.getElementById(\'ean\').value+\'&ean2=\'+document.getElementById(\'ean2\').value+\'&fromEdit=1\', function(result) {
|
||||
document.getElementById(\'ean2\').value = result;
|
||||
});
|
||||
document.getElementById(\'newEan2\').value=\'1\'
|
||||
}
|
||||
}
|
||||
</script>';
|
||||
|
||||
?>
|
||||
831
modules/EcmProductB2Bs/EditView1.php
Executable file
831
modules/EcmProductB2Bs/EditView1.php
Executable file
@@ -0,0 +1,831 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
include("modules/EcmProductB2Bs/moduleMenu.php");
|
||||
|
||||
// INCLUDE SUPPPORT MODULES
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('data/Tracker.php');
|
||||
|
||||
// INCLUDE MODULE OBJECT AND FORMS
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
global $sugar_version, $sugar_config;
|
||||
global $db;
|
||||
|
||||
// INSTANTIATES THE MODULE CLASSES
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
// IF PROCESSING AN EXISTING RECORD, RETRIEVE IT
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
$focus->format_all_fields();
|
||||
}
|
||||
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
|
||||
$focus->id = "";
|
||||
$focus->simplemodule_number = "";
|
||||
}
|
||||
|
||||
$prefillArray = array(
|
||||
'priority' => 'priority',
|
||||
'name' => 'name',
|
||||
'description' => 'description',
|
||||
'status' => 'status',
|
||||
'type' => 'type',
|
||||
);
|
||||
|
||||
foreach($prefillArray as $requestKey => $focusVar) {
|
||||
if (isset($_REQUEST[$requestKey]) && is_null($focus->$focusVar)) {
|
||||
$focus->$focusVar = urldecode($_REQUEST[$requestKey]);
|
||||
}
|
||||
}
|
||||
|
||||
// BUILD MODULE TITLE LINE
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
global $theme;
|
||||
$theme_path = "themes/".$theme."/";
|
||||
$image_path = $theme_path."images/";
|
||||
require_once ($theme_path.'layout_utils.php');
|
||||
|
||||
$GLOBALS['log']->info("EcmProductB2Bs detail view");
|
||||
|
||||
// ASSIGN XTEMPLATE
|
||||
$xtpl = new XTemplate ('modules/EcmProductB2Bs/EditView.html');
|
||||
|
||||
// FILL XTEMPLATE MODULE & APPLICATION LANGUAGE STRINGS
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
|
||||
|
||||
if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
|
||||
if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
|
||||
if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
|
||||
|
||||
if (empty($_REQUEST['return_id'])) {
|
||||
$xtpl->assign("RETURN_ACTION", 'index');
|
||||
}
|
||||
|
||||
///////////////////////////////////////
|
||||
// SETUP POPUPS START
|
||||
// Users Popup
|
||||
$json = getJSONobj();
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'assigned_user_id',
|
||||
'user_name' => 'assigned_user_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'product_category_id',
|
||||
'name' => 'product_category',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductcategories_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'product_line_id',
|
||||
'name' => 'product_line',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductlines_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'exchange_rate_id',
|
||||
'name' => 'exchange_rate_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductexchangerates_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'vat_id',
|
||||
'name' => 'vat_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmvats_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'usage_unit_id',
|
||||
'name' => 'usage_unit_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductusageunits_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'manufacturer_id',
|
||||
'name' => 'manufacturer',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductmanufacturers_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'fob_basis_id',
|
||||
'name' => 'fob_basis_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductbasis_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'packing_type_id',
|
||||
'name' => 'packing_type_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmproductpackingtypes_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'contact_id',
|
||||
'name' => 'contact_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_contacts_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'parent_id',
|
||||
'name' => 'parent_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_parent_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'vendor_id',
|
||||
'name' => 'vendor_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign('encoded_ecmvendors_popup_request_data', $json->encode($popup_request_data));
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// ACCOUNT_ID WILL BE SET WHEN USER CHOOSES TO CREATE A NEW SIMPLEMODULE FROM ACCOUNT DETAIL VIEW.
|
||||
if (isset($_REQUEST['account_id'])) $xtpl->assign("ACCOUNT_ID", $_REQUEST['account_id']);
|
||||
if (isset($_REQUEST['contact_id'])) $xtpl->assign("CONTACT_ID", $_REQUEST['contact_id']);
|
||||
|
||||
// SET THE CASE_ID, IF SET.
|
||||
// WITH NEW CONCEPT OF SUBPANELS IT,
|
||||
// WHEN THE SUBPANEL IS DISPLAYED IT PULLS FROM THE CLASS NAME WHICH IN THE SITUATION OF CASES IS ACASE SO THE FORM IS GENERATED
|
||||
// WITH ACASE_ID INSTEAD OF CASE_ID, SO I HAVE DONE THE MAPPING HERE
|
||||
if (isset($_REQUEST['acase_id'])) $xtpl->assign("CASE_ID",$_REQUEST['acase_id']);
|
||||
else if(isset($_REQUEST['case_id'])) $xtpl->assign("CASE_ID",$_REQUEST['case_id']);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// QUICK SEARCH SETUP
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
|
||||
$sqs_objects = array(
|
||||
'assigned_user_name' => $qsd->getQSUser(),
|
||||
'product_category' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2BCategories'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('product_category', 'product_category_id'),
|
||||
'conditions' => array(array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'product_line' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2BLines'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('product_line', 'product_line_id'),
|
||||
'conditions' => array(array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'exchange_rate_name' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2BExchangeRates'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('exchange_rate_name', 'exchange_rate_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'vat_name' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmVats'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('vat_name', 'vat_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'manufacturer' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2BManufacturers'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('manufacturer', 'manufacturer_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'fob_basis_name' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2BBasis'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('fob_basis_name', 'fob_basis_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'packing_type_name' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2BPackingTypes'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('packing_type_name', 'packing_type_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'contact_name' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('Contacts'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('contact_name', 'contact_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'vendor_name' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmVendors'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('vendor_name', 'vendor_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'name',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
'product_index' => array(
|
||||
'method' => 'query',
|
||||
'modules' => array('EcmProductB2Bs'),
|
||||
'group' => 'or',
|
||||
'field_list' => array('product_index', 'id'),
|
||||
'populate_list' => array('product_index', 'index_id'),
|
||||
'conditions' => array(
|
||||
array('name'=>'product_index','op'=>'like_custom','end'=>'%','value'=>'')
|
||||
),
|
||||
'order' => 'product_index',
|
||||
'limit' => '30',
|
||||
'no_match_text' => $app_strings['ERR_SQS_NO_MATCH']
|
||||
),
|
||||
);
|
||||
$quicksearch_js = $qsd->getQSScripts();
|
||||
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
|
||||
// QUICK SEARCH SETUP
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ASSIGN GLOBAL VARIABLES
|
||||
$ptype='<option value="Accounts"';
|
||||
if($focus->parent_type=="Accounts")$ptype.=" selected";
|
||||
$ptype.='>Accounts</option><option value="Leads"';
|
||||
if($focus->parent_type=="Leads")$ptype.=" selected";
|
||||
$ptype.='>Leads</option>';
|
||||
|
||||
$focus->parent_type=$ptype;
|
||||
|
||||
$uunit='';
|
||||
$result = $db->query("select id,name from ecmproductusageunits order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$uunit.='<option value="'.$row['id'].'"';
|
||||
if($focus->usage_unit_id==$row['id'])$uunit.=' selected';
|
||||
$uunit.='>'.$row['name'].'</option>';
|
||||
}
|
||||
|
||||
$focus->usage_unit_id=$uunit;
|
||||
|
||||
$tax='';
|
||||
$result = $db->query("select id,name from ecmvats where deleted='0' order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$tax.='<option value="'.$row['id'].'"';
|
||||
if($focus->vat_id==$row['id'])$tax.=' selected';
|
||||
$tax.='>'.$row['name'].'</option>';
|
||||
}
|
||||
|
||||
$focus->vat_id=$tax;
|
||||
|
||||
$fbas='';
|
||||
$result = $db->query("select id,name from ecmproductbasis order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$fbas.='<option value="'.$row['id'].'"';
|
||||
if($focus->fob_basis_id==$row['id'])$fbas.=' selected';
|
||||
$fbas.='>'.$row['name'].'</option>';
|
||||
}
|
||||
|
||||
$focus->fob_basis_id=$fbas;
|
||||
|
||||
$pack='';
|
||||
$result = $db->query("select id,name from ecmproductpackingtypes order by name asc");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$pack.='<option value="'.$row['id'].'"';
|
||||
if($focus->packing_type_id==$row['id'])$pack.=' selected';
|
||||
$pack.='>'.$row['name'].'</option>';
|
||||
}
|
||||
|
||||
$focus->packing_type_id=$pack;
|
||||
|
||||
$xtpl->assign("THEME", $theme);
|
||||
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_js(). $quicksearch_js);
|
||||
$xtpl->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
|
||||
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
|
||||
|
||||
|
||||
|
||||
// ASSIGN GLOBAL VARIABLES
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// ASSIGN MODULE DEFAULT VARIABLES
|
||||
$xtpl->assign("ID", $focus->id);
|
||||
if (!empty($focus->name))
|
||||
$xtpl->assign("NAME", $focus->name);
|
||||
else $xtpl->assign("NAME", "");
|
||||
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
|
||||
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
|
||||
$xtpl->assign("CREATED_BY", $focus->created_by_name);
|
||||
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
|
||||
|
||||
if (empty($focus->assigned_user_id) && empty($focus->id)) $focus->assigned_user_id = $current_user->id;
|
||||
if (empty($focus->assigned_name) && empty($focus->id)) $focus->assigned_user_name = $current_user->user_name;
|
||||
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
|
||||
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
|
||||
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id );
|
||||
|
||||
// ASSIGN MODULE SPECIFIC VARIABLES
|
||||
|
||||
|
||||
$xtpl->assign("PARENT_TYPE",$ptype);
|
||||
|
||||
|
||||
$xtpl->assign("CODE", $focus->code);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_CATEGORY_ID", $focus->product_category_id);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_CATEGORY", $focus->product_category);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_LINE_ID", $focus->product_line_id);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_LINE", $focus->product_line);
|
||||
|
||||
|
||||
$xtpl->assign("MANUFACTURER_ID", $focus->manufacturer_id);
|
||||
|
||||
|
||||
$xtpl->assign("MANUFACTURER", $focus->manufacturer);
|
||||
|
||||
|
||||
$xtpl->assign("CONTACT_ID", $focus->contact_id);
|
||||
|
||||
|
||||
$xtpl->assign("CONTACT_NAME", $focus->contact_name);
|
||||
|
||||
|
||||
$xtpl->assign("VENDOR_ID", $focus->vendor_id);
|
||||
|
||||
|
||||
$xtpl->assign("VENDOR_NAME", $focus->vendor_name);
|
||||
|
||||
|
||||
$xtpl->assign("VENDOR_PART_NO", $focus->vendor_part_no);
|
||||
if (!empty($_REQUEST['product_active'])) {
|
||||
$xtpl->assign("PRODUCT_ACTIVE", "checked");
|
||||
}
|
||||
|
||||
|
||||
if ($focus->product_active == '1') $xtpl->assign("PRODUCT_ACTIVE", "checked");
|
||||
|
||||
|
||||
$xtpl->assign("SALES_START_DATE", $focus->sales_start_date);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_END_DATE", $focus->sales_end_date);
|
||||
|
||||
|
||||
$xtpl->assign("PARENT_TYPE", $focus->parent_type);
|
||||
|
||||
|
||||
$xtpl->assign("PARENT_ID", $focus->parent_id);
|
||||
|
||||
|
||||
$xtpl->assign("PARENT_NAME", $focus->parent_name);
|
||||
|
||||
|
||||
$xtpl->assign("WEBSITE", $focus->website);
|
||||
|
||||
|
||||
$xtpl->assign("PART_NO", $focus->part_no);
|
||||
|
||||
|
||||
$xtpl->assign("SERIAL_NO", $focus->serial_no);
|
||||
|
||||
|
||||
$xtpl->assign("EXCHANGE_RATE_ID", $focus->exchange_rate_id);
|
||||
|
||||
|
||||
$xtpl->assign("EXCHANGE_RATE_NAME", $focus->exchange_rate_name);
|
||||
|
||||
|
||||
$xtpl->assign("FOB_PRICE", $focus->fob_price);
|
||||
|
||||
|
||||
$xtpl->assign("PURCHASE_PRICE", $focus->purchase_price);
|
||||
|
||||
|
||||
$xtpl->assign("SELLING_PRICE", $focus->selling_price);
|
||||
|
||||
|
||||
$xtpl->assign("EMS_ORDERED", $focus->ems_ordered);
|
||||
|
||||
|
||||
$xtpl->assign("EMS_PRICE", $focus->ems_price);
|
||||
|
||||
|
||||
$xtpl->assign("COMMISSION_RATE", $focus->commission_rate);
|
||||
|
||||
|
||||
$xtpl->assign("CUSTOM_DUTY_RATE", $focus->custom_duty_rate);
|
||||
|
||||
|
||||
$xtpl->assign("SRP_PRICE", $focus->srp_price);
|
||||
|
||||
|
||||
$xtpl->assign("SRP_PROMO_PRICE", $focus->srp_promo_price);
|
||||
|
||||
|
||||
$xtpl->assign("VAT_ID", $focus->vat_id);
|
||||
|
||||
|
||||
$xtpl->assign("TAX_CLASS_NAME", $focus->tax_class_name);
|
||||
|
||||
|
||||
$xtpl->assign("USAGE_UNIT_ID", $focus->usage_unit_id);
|
||||
|
||||
|
||||
$xtpl->assign("USAGE_UNIT_NAME", $focus->usage_unit_name);
|
||||
|
||||
|
||||
$xtpl->assign("QTY_IN_STOCK", $focus->qty_in_stock);
|
||||
|
||||
|
||||
$xtpl->assign("QTY_IN_DEMAND", $focus->qty_in_demand);
|
||||
|
||||
|
||||
$xtpl->assign("EMS_QTY_IN_STOCK", $focus->ems_qty_in_stock);
|
||||
|
||||
|
||||
$xtpl->assign("REORDER_LEVEL", $focus->reorder_level);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_LAST_MONTH_1", $focus->sales_last_month_1);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_LAST_MONTH", $focus->sales_last_month);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_THIS_MONTH", $focus->sales_this_month);
|
||||
|
||||
|
||||
$xtpl->assign("QTY_PER_UNIT", $focus->qty_per_unit);
|
||||
|
||||
|
||||
$xtpl->assign("AVERAGE_SALE_3_MONTHS", $focus->average_sale_3_months);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_PLUS_1", $focus->sales_plus_1);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_PLUS_2", $focus->sales_plus_2);
|
||||
|
||||
|
||||
$xtpl->assign("SALES_PLUS_3", $focus->sales_plus_3);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_PICTURE", $focus->product_picture);
|
||||
if($focus->product_picture)$xtpl->assign("PRODUCT_PICTURE_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
|
||||
|
||||
$xtpl->assign("PACKING_FRONT_PICTURE", $focus->packing_front_picture);
|
||||
if($focus->packing_front_picture)$xtpl->assign("PACKING_FRONT_PICTURE_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
|
||||
|
||||
$xtpl->assign("DRIVER_1", $focus->driver_1);
|
||||
if($focus->driver_1)$xtpl->assign("DRIVER_1_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
|
||||
|
||||
$xtpl->assign("DRIVER_2", $focus->driver_2);
|
||||
if($focus->driver_2)$xtpl->assign("DRIVER_2_UPLOAD",$mod_strings['LBL_UPLOADED']);
|
||||
|
||||
|
||||
$xtpl->assign("MOQ", $focus->moq);
|
||||
|
||||
|
||||
$xtpl->assign("FOB_BASIS_ID", $focus->fob_basis_id);
|
||||
|
||||
|
||||
$xtpl->assign("FOB_BASIS_NAME", $focus->fob_basis_name);
|
||||
|
||||
|
||||
$xtpl->assign("DELIVERY_TIME_FOB", $focus->delivery_time_fob);
|
||||
|
||||
|
||||
$xtpl->assign("PIECES_PER_CARTON", $focus->pieces_per_carton);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_NETTO_WEIGHT", $focus->product_netto_weight);
|
||||
|
||||
|
||||
$xtpl->assign("PRODUCT_BRUTTO_WEIGHT", $focus->product_brutto_weight);
|
||||
|
||||
|
||||
$xtpl->assign("PACKING_TYPE_ID", $focus->packing_type_id);
|
||||
|
||||
|
||||
$xtpl->assign("PACKING_TYPE_NAME", $focus->packing_type_name);
|
||||
|
||||
|
||||
$xtpl->assign("PACKING_DIMENSIONS_1", $focus->packing_dimensions_1);
|
||||
|
||||
|
||||
$xtpl->assign("PACKING_DIMENSIONS_2", $focus->packing_dimensions_2);
|
||||
|
||||
|
||||
$xtpl->assign("PACKING_DIMENSIONS_3", $focus->packing_dimensions_3);
|
||||
|
||||
|
||||
$xtpl->assign("RMA", $focus->rma);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_DIMENSIONS_1", $focus->carton_dimensions_1);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_DIMENSIONS_2", $focus->carton_dimensions_2);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_DIMENSIONS_3", $focus->carton_dimensions_3);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_NETTO_WEIGHT", $focus->carton_netto_weight);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_BRUTTO_WEIGHT", $focus->carton_brutto_weight);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_VOLUME_METER", $focus->carton_volume_meter);
|
||||
|
||||
|
||||
$xtpl->assign("CARTON_VOLUME_FEET", $focus->carton_volume_feet);
|
||||
|
||||
|
||||
$xtpl->assign("COUNTRY_OF_ORIGIN", $focus->country_of_origin);
|
||||
if (!empty($_REQUEST['certificate_of_origin'])) {
|
||||
$xtpl->assign("CERTIFICATE_OF_ORIGIN", "checked");
|
||||
}
|
||||
|
||||
$xtpl->assign("TAX_CLASS_ID",get_select_options_with_id($app_list_strings['ecmproducts_vat_dom'], $focus->vat_id));
|
||||
//load currencies
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
$currency = new Currency();
|
||||
$currency_list = $currency->get_full_list('name');
|
||||
$currency->retrieve('-99');
|
||||
if(is_array($currency_list))
|
||||
{
|
||||
$currency_list = array_merge(Array($currency), $currency_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
$currency_list = Array($currency);
|
||||
}
|
||||
$arr = array();
|
||||
foreach($currency_list as $key=>$value)
|
||||
{
|
||||
$arr[$value->id] = $value->name;
|
||||
}
|
||||
$xtpl->assign("EXCHANGE_RATE_ID", get_select_options_with_id($arr, $focus->exchange_rate_id));
|
||||
|
||||
|
||||
if ($focus->certificate_of_origin == '1') $xtpl->assign("CERTIFICATE_OF_ORIGIN", "checked");
|
||||
if (!empty($_REQUEST['form_a'])) {
|
||||
$xtpl->assign("FORM_A", "checked");
|
||||
}
|
||||
|
||||
|
||||
if ($focus->form_a == '1') $xtpl->assign("FORM_A", "checked");
|
||||
|
||||
// ASSIGN MODULE DROPDOWNS WITH DEFAULT KEY
|
||||
|
||||
// ASSIGN MODULE VARIABLES AFFECTED BY DUPLICATE ACTION
|
||||
if(!isset($_REQUEST['isDuplicate'])) {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
$result = $db->query("select ean,remarks,short_description,long_description,language from ecmproduct_language where ecmproduct_id='".$_REQUEST['record']."'");
|
||||
while(($row=$db->fetchByAssoc($result))!=null)
|
||||
{
|
||||
$xtpl->assign("EAN_".strtolower($row['language']),$row['ean']);
|
||||
$xtpl->assign("REMARKS_".strtolower($row['language']),$row['remarks']);
|
||||
$xtpl->assign("SHORT_DESCRIPTION_".strtolower($row['language']),$row['short_description']);
|
||||
$xtpl->assign("LONG_DESCRIPTION_".strtolower($row['language']),$row['long_description']);
|
||||
}
|
||||
|
||||
// ASSIGN MODULE DROPDOWNS WITHOUT DEFAULT KEY
|
||||
|
||||
//BUILDER:END of xtpl
|
||||
|
||||
// ADD CUSTOM FIELDS
|
||||
require_once('modules/DynamicFields/templates/Files/EditView.php');
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// USER ASSIGNMENT
|
||||
global $current_user;
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$record = '';
|
||||
// USER ASSIGNMENT
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if(!empty($_REQUEST['record'])){
|
||||
$record = $_REQUEST['record'];
|
||||
}
|
||||
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
|
||||
}
|
||||
|
||||
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
require_once('include/javascript/javascript.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EditView');
|
||||
$javascript->setSugarBean($focus);
|
||||
$javascript->addAllFields('');
|
||||
|
||||
//BUILDER:START Pro only
|
||||
// $javascript->addFieldGeneric( 'team_name', 'varchar', $app_strings['LBL_TEAM'] ,'true');
|
||||
// $javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
|
||||
//BUILDER:END Pro only
|
||||
|
||||
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
|
||||
|
||||
echo $javascript->getScript();
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// SELECT CHANGES TEXT INPUT FIELD
|
||||
/*
|
||||
$prob_array = $json->encode($app_list_strings['sales_probability_dom']);
|
||||
$prePopProb = '';
|
||||
if(empty($focus->id)) $prePopProb = 'document.getElementsByName(\'sales_stage\')[0].onchange();';
|
||||
echo <<<EOQ
|
||||
<script>
|
||||
prob_array = $prob_array;
|
||||
document.getElementsByName('sales_stage')[0].onchange = function() {
|
||||
if(typeof(document.getElementsByName('sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('sales_stage')[0].value]) {
|
||||
document.getElementsByName('probability')[0].value = prob_array[document.getElementsByName('sales_stage')[0].value];
|
||||
}
|
||||
};
|
||||
$prePopProb
|
||||
</script>
|
||||
EOQ;
|
||||
*/
|
||||
//
|
||||
/// SELECT CHANGES TEXT INPUT FIELD
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
require_once('modules/SavedSearch/SavedSearch.php');
|
||||
$savedSearch = new SavedSearch();
|
||||
$json = getJSONobj();
|
||||
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmProductB2Bs')));
|
||||
$str = "<script>
|
||||
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
|
||||
</script>";
|
||||
echo $str;
|
||||
|
||||
?>
|
||||
111
modules/EcmProductB2Bs/Forms.php
Executable file
111
modules/EcmProductB2Bs/Forms.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*******************************************************************************
|
||||
* CREATE JAVASCRIPT TO VALIDATE THE DATA ENTERED INTO A RECORD.
|
||||
*******************************************************************************/
|
||||
function get_validate_record_js () {
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* CREATE FORM FOR MENU RAPID CREATE
|
||||
*******************************************************************************/
|
||||
function get_new_record_form () {
|
||||
if(!ACLController::checkAccess('EcmProductB2Bs', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $mod_strings;
|
||||
global $theme;
|
||||
global $current_user;
|
||||
|
||||
$lbl_subject = $mod_strings['LBL_SUBJECT'];
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
$user_id = $current_user->id;
|
||||
|
||||
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
$the_form .= <<<EOQ
|
||||
|
||||
<form name="EcmProductB2BSave" onSubmit="return check_form('EcmProductB2BsSave')" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="EcmProductB2Bs">
|
||||
<input type="hidden" name="record" value="">
|
||||
<input type="hidden" name="assigned_user_id" value='${user_id}'>
|
||||
<input type="hidden" name="action" value="Save">
|
||||
|
||||
${lbl_subject} <span class="required">${lbl_required_symbol}</span><br>
|
||||
<p><input name='name' type="text" size='20' maxlength="255"value=""><br>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input title="${lbl_save_button_title}" accessKey="${lbl_save_button_key}" class="button" type="submit" name="button" value=" ${lbl_save_button_label} " >
|
||||
</p>
|
||||
|
||||
</form>
|
||||
EOQ;
|
||||
require_once('include/javascript/javascript.php');
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName('EcmProductB2BsSave}');
|
||||
$javascript->setSugarBean(new EcmProductB2B());
|
||||
$javascript->addRequiredFields('');
|
||||
$the_form .= $javascript->getScript();
|
||||
$the_form .= get_left_form_footer();
|
||||
|
||||
return $the_form;
|
||||
}
|
||||
|
||||
?>
|
||||
41
modules/EcmProductB2Bs/ListView.php
Executable file
41
modules/EcmProductB2Bs/ListView.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
if(file_exists('modules/EcmProductB2Bs/views/view.list.php')) {
|
||||
require_once('modules/EcmProductB2Bs/views/view.list.php');
|
||||
$list = new EcmProductB2BsViewList();
|
||||
}
|
||||
else {
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
$list = new ViewList();
|
||||
}
|
||||
|
||||
$list->bean = $focus;
|
||||
|
||||
// if(!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true") require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
$list->preDisplay();
|
||||
$list->display();
|
||||
|
||||
?>
|
||||
39
modules/EcmProductB2Bs/ListView1.php
Executable file
39
modules/EcmProductB2Bs/ListView1.php
Executable file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
else {}
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
if(file_exists('modules/EcmProductB2Bs/views/view.list.php')) {
|
||||
require_once('modules/EcmProductB2Bs/views/view.list.php');
|
||||
$list = new EcmProductB2BsViewList();
|
||||
}
|
||||
else {
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
$list = new ViewList();
|
||||
}
|
||||
|
||||
$list->bean = $focus;
|
||||
|
||||
// if(!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true") require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
$list->preDisplay();
|
||||
$list->display();
|
||||
|
||||
?>
|
||||
294
modules/EcmProductB2Bs/ListViewAddToPriceBook.php
Executable file
294
modules/EcmProductB2Bs/ListViewAddToPriceBook.php
Executable file
@@ -0,0 +1,294 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if($_GET['end_of_line_advanced']==0 && $_GET['end_of_line_advanced']!="")$_GET['end_of_line_advanced']="no";
|
||||
if($_GET['production_advanced']==0 && $_GET['production_advanced']!="")$_GET['production_advanced']="no";
|
||||
if($_GET['flag_advanced']==0 && $_GET['flag_advanced']!="")$_GET['flag_advanced']="no";
|
||||
|
||||
if($_GET['end_of_line_basic']==0 && $_GET['end_of_line_basic']!="")$_GET['end_of_line_basic']="no";
|
||||
if($_GET['production_basic']==0 && $_GET['production_basic']!="")$_GET['production_basic']="no";
|
||||
if($_GET['flag_basic']==0 && $_GET['flag_basic']!="")$_GET['flag_basic']="no";
|
||||
|
||||
$_REQUEST['clear_query']=true;
|
||||
$_GET['clear_query']=true;
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select user_name from users where id='".$_SESSION['authenticated_user_id']."'"));
|
||||
$user_name=$r['user_name'];
|
||||
$arr_fields=array("name","code","product_category_name","product_category_id","flag","manufacturer_name","manufacturer_id","product_active","commission_rate","qty_per_unit","purchase_price","sales_start_date","sales_end_date","end_of_line","production");
|
||||
/*if(!$_REQUEST['EcmProductB2Bs_ECMPRODUCT_offset'] && !$_REQUEST['EcmProductB2Bs_ECMPRODUCT_ORDER_BY']){
|
||||
foreach($arr_fields as $a){
|
||||
if($_REQUEST['searchFormTab']=="advanced_search")$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$a.'_advanced']=$_REQUEST[$a.'_advanced']=$_GET[$a.'_advanced'];
|
||||
if($_REQUEST['searchFormTab']=="basic_search")$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$a.'_basic']=$_REQUEST[$a.'_basic']=$_GET[$a.'_basic'];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
foreach($arr_fields as $a){
|
||||
if($_REQUEST['searchFormTab']=="advanced_search"){
|
||||
$_REQUEST[$a.'_advanced']=$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$a.'_advanced'];
|
||||
$_GET[$a.'_advanced']=$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$a.'_advanced'];
|
||||
}
|
||||
if($_REQUEST['searchFormTab']=="basic_search"){
|
||||
$_REQUEST[$a.'_basic']=$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$a.'_basic'];
|
||||
$_GET[$a.'_basic']=$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$a.'_basic'];
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
if($_REQUEST['pricebook_id'])$_SESSION['add_to_pricebook_id']=$_REQUEST['pricebook_id'];
|
||||
|
||||
require_once ('XTemplate/xtpl.php');
|
||||
require_once ("data/Tracker.php");
|
||||
require_once ('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once ('themes/'.$theme.'/layout_utils.php');
|
||||
require_once ('log4php/LoggerManager.php');
|
||||
require_once('include/ListView/ListViewSmarty.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
|
||||
if(file_exists('custom/modules/EcmProductB2Bs/metadata/listviewdefs.php')){
|
||||
require_once('custom/modules/EcmProductB2Bs/metadata/listviewdefs.php');
|
||||
}
|
||||
else{
|
||||
require_once('modules/EcmProductB2Bs/metadata/listviewdefs.php');
|
||||
}
|
||||
|
||||
require_once('modules/SavedSearch/SavedSearch.php');
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
|
||||
$header_text = '';
|
||||
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
global $app_list_strings;
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'EcmProductB2Bs');
|
||||
|
||||
global $urlPrefix;
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $current_user;
|
||||
global $focus_list;
|
||||
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$currentModule="EcmProductB2Bs";
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
if(!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true')$current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
|
||||
|
||||
$savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule);
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$seedEcmProductB2B = new EcmProductB2B();
|
||||
$searchForm = new SearchForm('EcmProductB2Bs', $seedEcmProductB2B,"ListViewAddToPricebook");
|
||||
|
||||
$lv = new ListViewSmarty();
|
||||
|
||||
$displayColumns = array();
|
||||
foreach($listViewDefs['EcmProductB2Bs'] as $col => $params) {
|
||||
if(!empty($params['default']) && $params['default'])$displayColumns[$col] = $params;
|
||||
}
|
||||
|
||||
$params = array('massupdate' => true);
|
||||
$params['action']="ListViewAddToPriceBook";
|
||||
if(!empty($_REQUEST['orderBy'])) {
|
||||
$params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
|
||||
$lv->displayColumns = $displayColumns;
|
||||
if (!isset($where)) $where = "";
|
||||
|
||||
require_once('modules/MySettings/StoreQuery.php');
|
||||
$storeQuery = new StoreQuery();
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$storeQuery->loadQuery($currentModule);
|
||||
$storeQuery->populateRequest();
|
||||
}
|
||||
else{
|
||||
$storeQuery->saveFromRequest($currentModule);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['query'])){
|
||||
$current_user->setPreference('ListViewDisplayColumns', $displayColumns, 0, $currentModule);
|
||||
$searchForm->populateFromRequest();
|
||||
foreach($searchForm->searchFields as $k=>$v){
|
||||
$searchForm->searchFields[$k]['value']=$_SESSION[$user_name."_PREFERENCES"]['global']['EcmProductB2BsQ'][$k.'_advanced'];
|
||||
}
|
||||
$where_clauses = $searchForm->generateSearchWhere(true, "EcmProductB2B");
|
||||
if (count($where_clauses) > 0 ){
|
||||
foreach($where_clauses as $wh){
|
||||
if(!eregi("ecmproducts.assigned_user_id",$wh) && !eregi("ecmproducts.product_category_name",$wh) && !eregi("ecmproducts.product_active",$wh) && !eregi("ecmproducts.end_of_line",$wh))$wwh[]=$wh;
|
||||
}
|
||||
$where_clauses=array();
|
||||
$where_clauses=$wwh;
|
||||
}
|
||||
if(count($searchForm->searchFields['assigned_user_id']['value'])>0){
|
||||
$w_clauses=array();
|
||||
foreach($searchForm->searchFields['assigned_user_id']['value'] as $auid){
|
||||
$w_clauses[]="ecmproducts.assigned_user_id='".$auid."'";
|
||||
}
|
||||
$where_clauses[]="(".implode(" or ",$w_clauses).")";
|
||||
}
|
||||
if($_REQUEST['searchFormTab']=="advanced_search"){
|
||||
if($_GET['end_of_line_advanced']!="" && ($_GET['end_of_line_advanced']==1 || $_GET['end_of_line_advanced']=="no")){
|
||||
if($_GET['end_of_line_advanced']=="no")$where_clauses[]="ecmproducts.end_of_line='0'";
|
||||
else $where_clauses[]="ecmproducts.end_of_line='1'";
|
||||
}
|
||||
if($_GET['flag_advanced']!="" && ($_GET['flag_advanced']==1 || $_GET['flag_advanced']=="no")){
|
||||
if($_GET['flag_advanced']=="no")$where_clauses[]="ecmproducts.flag='0'";
|
||||
else $where_clauses[]="ecmproducts.flag='1'";
|
||||
}
|
||||
if($_GET['production_advanced']!="" && ($_GET['production_advanced']==1 || $_GET['production_advanced']=="no")){
|
||||
if($_GET['production_advanced']=="no")$where_clauses[]="ecmproducts.production='0'";
|
||||
else $where_clauses[]="ecmproducts.production='1'";
|
||||
}
|
||||
if($_GET['manufacturer_id_advanced'])$where_clauses[]="ecmproducts.manufacturer_id='".$_GET['manufacturer_id_advanced']."'";
|
||||
if($_GET['product_category_id_advanced'])$where_clauses[]="ecmproducts.product_category_id='".$_GET['product_category_id_advanced']."'";
|
||||
if($_GET['product_category_name_advanced'])$where_clauses[]="ecmproducts.product_category_name like '".$_GET['product_category_name_advanced']."%'";
|
||||
if($_GET['product_active_advanced']==0 && $_GET['product_active_advanced']!="")$where_clauses[]="ecmproducts.product_active='0'";
|
||||
if($_GET['product_active_advanced']==1 && $_GET['product_active_advanced']!="")$where_clauses[]="ecmproducts.product_active='1'";
|
||||
if($_GET['code_advanced'])$where_clauses[]="ecmproducts.code like '%".$_GET['code_advanced']."%'";
|
||||
if($_GET['name_advanced'])$where_clauses[]="ecmproducts.name like '%".$_GET['name_advanced']."%'";
|
||||
}
|
||||
if($_REQUEST['searchFormTab']=="basic_search"){
|
||||
if($_GET['flag_basic']!="" && ($_GET['flag_basic']==1 || $_GET['flag_basic']=="no")){
|
||||
if($_GET['flag_basic']=="no")$where_clauses[]="ecmproducts.flag='0'";
|
||||
else $where_clauses[]="ecmproducts.flag='1'";
|
||||
}
|
||||
if($_GET['production_basic']!="" && ($_GET['production_basic']==1 || $_GET['production_basic']==0))$where_clauses[]="ecmproducts.production='".$_GET['production_basic']."'";
|
||||
if($_GET['manufacturer_id_basic'])$where_clauses[]="ecmproducts.manufacturer_id='".$_GET['manufacturer_id_basic']."'";
|
||||
if($_GET['product_category_id_basic'])$where_clauses[]="ecmproducts.product_category_id='".$_GET['product_category_id_basic']."'";
|
||||
if($_GET['product_category_name_basic'])$where_clauses[]="ecmproducts.product_category_name like '".$_GET['product_category_name_basic']."%'";
|
||||
if($_GET['product_active_basic']==0 && $_GET['product_active_basic']!="")$where_clauses[]="ecmproducts.product_active='0'";
|
||||
if($_GET['product_active_basic']==1 && $_GET['product_active_basic']!="")$where_clauses[]="ecmproducts.product_active='1'";
|
||||
if($_GET['code_basic'])$where_clauses[]="ecmproducts.code like '%".$_GET['code_basic']."%'";
|
||||
if($_GET['name_basic'])$where_clauses[]="ecmproducts.name like '%".$_GET['name_basic']."%'";
|
||||
}
|
||||
if($_SESSION['add_to_pricebook_id']){
|
||||
$w=$GLOBALS['db']->query("select ecmproduct_id from ecmpricebooks_ecmproducts where ecmpricebook_id='".$_SESSION['add_to_pricebook_id']."' and deleted='0'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$where_clauses[]="ecmproducts.id!='".$r['ecmproduct_id']."'";
|
||||
}
|
||||
}
|
||||
|
||||
if (count($where_clauses) > 0 )$where = implode(' and ', $where_clauses);
|
||||
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
|
||||
}
|
||||
|
||||
$searchForm->lv=$lv;
|
||||
if(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
$searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', "advanced", $listViewDefs);
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$searchForm->displayAdvanced(true);
|
||||
}
|
||||
elseif(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'saved_views'){
|
||||
$searchForm->displaySavedViews($listViewDefs, $lv);
|
||||
}
|
||||
else {
|
||||
$searchForm->displayBasic(true);
|
||||
}
|
||||
}
|
||||
//print_r($searchForm->searchFields);
|
||||
echo $qsd->GetQSScripts();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_mass_update = false;
|
||||
$ListView->show_mass_update_form = false;
|
||||
$ListView->multiSelect=false;
|
||||
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->show_delete_button = false;
|
||||
$ListView->show_select_menu = false;
|
||||
|
||||
$ListView->initNewXTemplate('modules/EcmProductB2Bs/ListView1.html',$current_module_strings);
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, "", "ecmproducts.name asc", "ECMPRODUCT");
|
||||
$ListView->processListView($seedEcmProductB2B, "main", "ECMPRODUCT");
|
||||
|
||||
$savedSearch = new SavedSearch();
|
||||
$json = getJSONobj();
|
||||
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmProductB2Bs')));
|
||||
$str = "<script>YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);</script>";
|
||||
echo '<input type="hidden" name="pricebook_id" value="'.$_REQUEST['pricebook_id'].'">';
|
||||
echo '</form>';
|
||||
if(!$_REQUEST['searchFormTab'])$sft="basic_search";
|
||||
else $sft=$_REQUEST['searchFormTab'];
|
||||
|
||||
echo '<script language="javascript">selectTabCSS(\'EcmProductB2Bs|'.$sft.'\');';echo '</script>';
|
||||
echo '<script>setTimeout(function(){';
|
||||
foreach($arr_fields as $v){
|
||||
if($_REQUEST['searchFormTab']=="advanced_search"){
|
||||
if(!in_array($v,array("end_of_line","product_active","flag","production")))echo 'if(document.getElementById("'.$v.'_advanced"))document.getElementById("'.$v.'_advanced").value="'.$_REQUEST[$v.'_advanced'].'";
|
||||
';
|
||||
elseif(in_array($v,array("end_of_line","product_active","flag","production")) && $_GET[$v.'_advanced']=="no")echo 'if(document.getElementById("'.$v.'_advanced"))document.getElementById("'.$v.'_advanced")[1].selected="1";
|
||||
';
|
||||
elseif(in_array($v,array("end_of_line","product_active","flag","production")) && $_REQUEST[$v.'_advanced']==1)echo 'if(document.getElementById("'.$v.'_advanced"))document.getElementById("'.$v.'_advanced")[2].selected="1";
|
||||
';
|
||||
//else echo 'if(document.getElementById("'.$v.'_advanced"))document.getElementById("'.$v.'_advanced").value="'.$_REQUEST[$v.'_advanced'].'";';
|
||||
}
|
||||
if($_REQUEST['searchFormTab']=="basic_search"){
|
||||
if(!in_array($v,array("end_of_line","product_active","flag","production")))echo 'if(document.getElementById("'.$v.'_basic"))document.getElementById("'.$v.'_basic").value="'.$_REQUEST[$v.'_basic'].'";
|
||||
';
|
||||
if(in_array($v,array("end_of_line","product_active","flag","production")) && $_GET[$v.'_basic']=="no")echo 'if(document.getElementById("'.$v.'_basic"))document.getElementById("'.$v.'_basic")[1].selected="1";
|
||||
';
|
||||
if(in_array($v,array("end_of_line","product_active","flag","production")) && $_REQUEST[$v.'_basic']==1)echo 'if(document.getElementById("'.$v.'_basic"))document.getElementById("'.$v.'_basic")[2].selected="1";
|
||||
';
|
||||
//else echo 'if(document.getElementById("'.$v.'_basic"))document.getElementById("'.$v.'_basic").value="'.$_REQUEST[$v.'_basic'].'";';
|
||||
}
|
||||
}
|
||||
echo '},1700);</script>';
|
||||
echo $str;
|
||||
?>
|
||||
41
modules/EcmProductB2Bs/ListViewAddToPriceBook2.php
Executable file
41
modules/EcmProductB2Bs/ListViewAddToPriceBook2.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('modules/EcmProductB2Bs/Forms.php');
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
if(file_exists('modules/EcmProductB2Bs/views/view.list.pricebook.php')) {
|
||||
require_once('modules/EcmProductB2Bs/views/view.list.pricebook.php');
|
||||
$list = new EcmProductB2BsViewList();
|
||||
}
|
||||
else {
|
||||
require_once('include/MVC/View/views/view.list.php');
|
||||
$list = new ViewList();
|
||||
}
|
||||
|
||||
$list->bean = $focus;
|
||||
|
||||
// if(!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true") require_once('modules/EcmGroupSales/HeaderMenu.php');
|
||||
|
||||
$list->preDisplay();
|
||||
$list->display();
|
||||
|
||||
?>
|
||||
200
modules/EcmProductB2Bs/ListViewForPriceBooks.php
Executable file
200
modules/EcmProductB2Bs/ListViewForPriceBooks.php
Executable file
@@ -0,0 +1,200 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
include("modules/EcmProductB2Bs/moduleMenu.php");
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_TITLE'], true);
|
||||
echo "\n</p>\n";
|
||||
require_once ('XTemplate/xtpl.php');
|
||||
require_once ("data/Tracker.php");
|
||||
require_once ('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once ('themes/'.$theme.'/layout_utils.php');
|
||||
require_once ('log4php/LoggerManager.php');
|
||||
require_once('include/ListView/ListViewSmarty.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
|
||||
if(file_exists('custom/modules/EcmProductB2Bs/metadata/listviewdefs.php')){
|
||||
require_once('custom/modules/EcmProductB2Bs/metadata/listviewdefs.php');
|
||||
}else{
|
||||
require_once('modules/EcmProductB2Bs/metadata/listviewdefs.php');
|
||||
}
|
||||
require_once('modules/SavedSearch/SavedSearch.php');
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
|
||||
$header_text = '';
|
||||
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
global $app_list_strings;
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'EcmProductB2Bs');
|
||||
|
||||
global $urlPrefix;
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $current_user;
|
||||
// FOCUS_LIST IS THE MEANS OF PASSING DATA TO A LISTVIEW.
|
||||
global $focus_list;
|
||||
|
||||
// SETUP QUICKSEARCH
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
|
||||
// CLEAR THE DISPLAY COLUMNS BACK TO DEFAULT WHEN CLEAR QUERY IS CALLED
|
||||
if(!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true')
|
||||
$current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
|
||||
|
||||
$savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule); // GET USER DEFINED DISPLAY COLUMNS
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$seedEcmProductB2B = new EcmProductB2B(); // SEED BEAN
|
||||
$searchForm = new SearchForm('EcmProductB2Bs', $seedEcmProductB2B); // NEW SEARCHFORM INSTANCE
|
||||
// SETUP LISTVIEW SMARTY
|
||||
$lv = new ListViewSmarty();
|
||||
|
||||
$displayColumns = array();
|
||||
// CHECK $_REQUEST IF NEW DISPLAY COLUMNS FROM POST
|
||||
if (!empty($_REQUEST['displayColumns'])) {
|
||||
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
|
||||
if (!empty($listViewDefs['EcmProductB2Bs'][$col]))
|
||||
$displayColumns[$col] = $listViewDefs['EcmProductB2Bs'][$col];
|
||||
}
|
||||
}elseif(!empty($savedDisplayColumns)) { // USE USER DEFINED DISPLAY COLUMNS FROM PREFERENCES
|
||||
$displayColumns = $savedDisplayColumns;
|
||||
}else { // USE COLUMNS DEFINED IN LISTVIEWDEFS FOR DEFAULT DISPLAY COLUMNS
|
||||
foreach($listViewDefs['EcmProductB2Bs'] as $col => $params) {
|
||||
if(!empty($params['default']) && $params['default'])
|
||||
$displayColumns[$col] = $params;
|
||||
}
|
||||
}
|
||||
$params = array('massupdate' => true); // SETUP LISTVIEWSMARTY PARAMS
|
||||
if(!empty($_REQUEST['orderBy'])) { // ORDER BY COMING FROM $_REQUEST
|
||||
$params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
$lv->displayColumns = $displayColumns;
|
||||
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only']) { // HANDLE AJAX REQUESTS FOR SEARCH FORMS ONLY
|
||||
switch($_REQUEST['search_form_view']) {
|
||||
case 'basic_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayBasic(false);
|
||||
break;
|
||||
case 'advanced_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayAdvanced(false);
|
||||
break;
|
||||
case 'saved_views':
|
||||
echo $searchForm->displaySavedViews($listViewDefs, $lv, false);
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// USE THE STORED QUERY IF THERE IS ONE
|
||||
if (!isset($where)) $where = "";
|
||||
require_once('modules/MySettings/StoreQuery.php');
|
||||
$storeQuery = new StoreQuery();
|
||||
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$storeQuery->loadQuery($currentModule);
|
||||
$storeQuery->populateRequest();
|
||||
}else{
|
||||
$storeQuery->saveFromGet($currentModule);
|
||||
}
|
||||
if(isset($_REQUEST['query'])){
|
||||
// WE HAVE A QUERY
|
||||
// FIRST SAVE COLUMNS
|
||||
$current_user->setPreference('ListViewDisplayColumns', $displayColumns, 0, $currentModule);
|
||||
$searchForm->populateFromRequest(); // GATHERS SEARCH FIELD INPUTS FROM $_REQUEST
|
||||
$where_clauses = $searchForm->generateSearchWhere(true, "EcmProductB2B"); // BUILDS THE WHERE CLAUSE FROM SEARCH FIELD INPUTS
|
||||
if (count($where_clauses) > 0 )$where = implode(' and ', $where_clauses);
|
||||
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
|
||||
}
|
||||
|
||||
// START DISPLAY
|
||||
// WHICH TAB OF SEARCH FORM TO DISPLAY
|
||||
if(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
$searchForm->setup();
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$searchForm->displayAdvanced();
|
||||
}elseif(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'saved_views'){
|
||||
$searchForm->displaySavedViews($listViewDefs, $lv);
|
||||
}else {
|
||||
$searchForm->displayBasic();
|
||||
}
|
||||
}
|
||||
echo $qsd->GetQSScripts();
|
||||
/*
|
||||
$lv->setup($seedEcmProductB2B, 'include/ListView/ListViewGeneric.tpl', $where, $params);
|
||||
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
|
||||
echo get_form_header($current_module_strings['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
|
||||
echo $lv->display();
|
||||
*/
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate('modules/EcmProductB2Bs/ListViewForPriceBooks.html',$current_module_strings);
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setQuery($where, "", "name asc", "ECMPRODUCT");
|
||||
$ListView->processListView($seedEcmProductB2B, "main", "ECMPRODUCT");
|
||||
$_SESSION['pricebook_id']=$_REQUEST['pricebook_id'];
|
||||
|
||||
$savedSearch = new SavedSearch();
|
||||
$json = getJSONobj();
|
||||
// FILLS IN SAVED VIEWS SELECT BOX ON SHORTCUT MENU
|
||||
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmProductB2Bs')));
|
||||
$str = "<script>
|
||||
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
|
||||
</script>";
|
||||
echo $str;
|
||||
?>
|
||||
68
modules/EcmProductB2Bs/Log.php
Executable file
68
modules/EcmProductB2Bs/Log.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
$tds1='<td class="listViewThS1">';
|
||||
|
||||
$trs='<tr>';
|
||||
$tre='</tr>';
|
||||
|
||||
$tds='<td class="oddListRowS1">';
|
||||
$tde='</td>';
|
||||
|
||||
$tbs='<table cellpadding="0" cellspacing="0" border="0" class="ListView" style="width:100%;">';
|
||||
$tbe='</table>';
|
||||
|
||||
$t.=$tbs;
|
||||
$t.=$trs;
|
||||
$t.=$tds1;
|
||||
$t.="Product";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Index";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Time";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Log";
|
||||
$t.=$tde;
|
||||
$t.=$tds1;
|
||||
$t.="Send";
|
||||
$t.=$tde;
|
||||
$t.=$tre;
|
||||
|
||||
$z="select * from ecmproducts_log where sent is null order by date_entered desc limit 100";
|
||||
$w=$GLOBALS['db']->query($z);
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select name,code from ecmproducts where id='".$r['ecmproduct_id']."'"));
|
||||
if($r['type']=="images")$type="Please upload images";
|
||||
elseif($r['type']=="images_and_description")$type="Please fill localized informations and upload images";
|
||||
elseif($r['type']=="description")$type="Please fill localized informations";
|
||||
else $type="All required informations added";
|
||||
|
||||
if($r['type']=="ok")$link='<a href="index.php?module=EcmProductB2Bs&action=SendXML&record='.$r['ecmproduct_id'].'">Send XML</a>';
|
||||
else $link='';
|
||||
$t.=$trs;
|
||||
$t.=$tds;
|
||||
$t.='<a href="index.php?module=EcmProductB2Bs&action=DetailView&record='.$r['ecmproduct_id'].'">'.$rr['name'].'</a>';
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=$rr['code'];
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=$r['date_entered'];
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=$type;
|
||||
$t.=$tde;
|
||||
$t.=$tds;
|
||||
$t.=$link;
|
||||
$t.=$tde;
|
||||
|
||||
|
||||
$t.=$tre;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$t.=$tbe;
|
||||
echo $t;
|
||||
?>
|
||||
58
modules/EcmProductB2Bs/Menu.php
Executable file
58
modules/EcmProductB2Bs/Menu.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$module="EcmProductB2Bs";
|
||||
if(ACLController::checkAccess($module, 'edit', true))$module_menu [] = Array("index.php?module=".$module."&action=EditView&return_module=".$module."&return_action=DetailView", $mod_strings['LNK_NEW_'.strtoupper($module)],"Create".$module, $module);
|
||||
if(ACLController::checkAccess($module, 'list', true))$module_menu [] = Array("index.php?module=".$module."&action=index&return_module=".$module."&return_action=DetailView", $mod_strings['LNK_'.strtoupper($module).'_LIST'],$module, $module);
|
||||
if(ACLController::checkAccess($module, 'list', true))$module_menu [] = Array("index.php?module=".$module."&action=ean&return_module=".$module."&return_action=DetailView", "Index by EAN",$module, $module);
|
||||
if(ACLController::checkAccess($module, 'list', true))$module_menu [] = Array("index.php?module=".$module."&action=Log&return_module=".$module."&return_action=DetailView", "Log",$module, $module);
|
||||
?>
|
||||
57
modules/EcmProductB2Bs/Popup1.php
Executable file
57
modules/EcmProductB2Bs/Popup1.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
require_once('modules/Popup/Popup_picker.php');
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
|
||||
?>
|
||||
162
modules/EcmProductB2Bs/Popup_picker.php
Executable file
162
modules/EcmProductB2Bs/Popup_picker.php
Executable file
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
global $theme;
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('themes/'.$theme.'/layout_utils.php');
|
||||
require_once('log4php/LoggerManager.php');
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
class Popup_Picker{
|
||||
|
||||
function Popup_Picker(){
|
||||
;
|
||||
}
|
||||
|
||||
function _get_where_clause(){
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query'])){
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "name", "ecmproducts.name");
|
||||
append_where_clause($where_clauses, "code", "ecmproducts.code");
|
||||
append_where_clause($where_clauses, "product_category", "ecmproducts.product_category_id");
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
function process_page(){
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
$image_path = 'themes/'.$theme.'/images/';
|
||||
|
||||
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
|
||||
$code = empty($_REQUEST['code']) ? '' : $_REQUEST['code'];
|
||||
$product_category = empty($_REQUEST['product_category']) ? '' : $_REQUEST['product_category'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button){
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY'] ."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY'] ."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
$form = new XTemplate('modules/EcmProductB2Bs/Popup_picker.html');
|
||||
|
||||
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
$form->assign('NAME', $name);
|
||||
$form->assign('request_data', $request_data);
|
||||
$form->assign('CODE', $code);
|
||||
$www=$GLOBALS['db']->query("select id,name from ecmproductcategories where deleted='0' order by name");
|
||||
$pc='<option value="">select</option>';
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($www)){
|
||||
$pc.='<option value="'.$r['id'].'"';
|
||||
if($product_category==$r['id'])$pc.=' selected';
|
||||
$pc.='>'.$r['name'].'</option>';
|
||||
}
|
||||
$form->assign('PRODUCT_CATEGORY', $pc);
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
$output_html .= get_form_footer();
|
||||
|
||||
// RESET THE SECTIONS THAT ARE ALREADY IN THE PAGE SO THAT THEY DO NOT PRINT AGAIN LATER.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
// CREATE THE LISTVIEW
|
||||
$seed_bean = new EcmProductB2B();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
|
||||
$ListView->setQuery($where, '', 'name', 'ECMPRODUCT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'ECMPRODUCT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_footer();
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
332
modules/EcmProductB2Bs/ProductsStock.php
Executable file
332
modules/EcmProductB2Bs/ProductsStock.php
Executable file
@@ -0,0 +1,332 @@
|
||||
<?
|
||||
function generateNumber($template_id,$date,$table,$date_field,$prefix,$show_number)
|
||||
{
|
||||
global $timedate;
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select * from ecmdocumenttemplates where id='".$template_id."'"));
|
||||
//print mysql_error();
|
||||
$per=$r['documents_per'];
|
||||
$format=$r['document_number_format_id'];
|
||||
$date=$timedate->to_display($date, $timedate->get_date_format(), "Y-m-d");
|
||||
$exp=explode("-",$date);
|
||||
if($per=="day")$daten=$date;
|
||||
if($per=="month")$daten=$exp[0]."-".$exp[1];
|
||||
if($per=="year")$daten=$exp[0];
|
||||
$z="select number from ".$table." where ".$date_field." like '".$daten."%' order by number desc limit 1";
|
||||
print $z;
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query($z));
|
||||
print mysql_error();
|
||||
$no=$r['number']+1;
|
||||
//$number=$_GET['prefix']."/".$no."/".$exp[1]."/".$exp[0];
|
||||
if($format[1]=="/")$sep="/";
|
||||
elseif($format[1]==".")$sep=".";
|
||||
elseif($format[1]=="-")$sep="-";
|
||||
else $sep="";
|
||||
|
||||
if($per=="month")
|
||||
{
|
||||
$format=str_replace("D "," ",$format);
|
||||
$format=str_replace("D-","",$format);
|
||||
$format=str_replace("D/","",$format);
|
||||
$format=str_replace("D.","",$format);
|
||||
}
|
||||
if($per=="year")
|
||||
{
|
||||
$format=str_replace("D "," ",$format);
|
||||
$format=str_replace("D-","",$format);
|
||||
$format=str_replace("M-","",$format);
|
||||
$format=str_replace("D/","",$format);
|
||||
$format=str_replace("M/","",$format);
|
||||
$format=str_replace("D.","",$format);
|
||||
$format=str_replace("M.","",$format);
|
||||
}
|
||||
$format=str_replace("Y",$exp[0],$format);
|
||||
$format=str_replace("M",$exp[1],$format);
|
||||
$format=str_replace("D",$exp[2],$format);
|
||||
$format=str_replace("NR",$no,$format);
|
||||
|
||||
$number=$prefix.$sep.$format;
|
||||
if($show_number)return $number;
|
||||
else return $no;
|
||||
}
|
||||
function addToBooking($pl,$stock_in_id)
|
||||
{
|
||||
/*$quantity=$pl['quantity'];
|
||||
$z="select quantity,order_id,id from ecmstockbookings where product_id='".$pl['id']."' and ecmstockin_id='' order by date_entered asc";
|
||||
$w=$GLOBALS['db']->query($z);
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
if($quantity>0)
|
||||
{
|
||||
if($r['quantity']<=$quantity)
|
||||
{
|
||||
$qty=$r['quantity'];
|
||||
$all=1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$qty=$quantity;
|
||||
$need=$r['quantity']-$quantity;
|
||||
$all=0;
|
||||
}
|
||||
$quantity-=$qty;
|
||||
$data[]=array("stock_in_id"=>$stock_in_id,"qty"=>$qty,"product_id"=>$pl['id']);
|
||||
if($all==0)$data[]=array("stock_in_id"=>"","qty"=>$need,"product_id"=>$pl['id']);
|
||||
if($all==1)
|
||||
{
|
||||
//print "jest";
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id from acl_roles where name like 'manager'"));
|
||||
addInfoToReminder($r['order_id'],"EcmSales","Products Available","There are available products in stock for Your sales order",$rr['id']);
|
||||
}
|
||||
addToDbBookedProducts($data,$r['order_id']);
|
||||
$GLOBALS['db']->query("delete from ecmstockbookings where id='".$r['id']."'");
|
||||
}
|
||||
}*/
|
||||
}
|
||||
function addInfoToReminder($parent_id,$parent_module,$name,$description,$role_id,$time="")
|
||||
{
|
||||
/*if($time=="")$time=date("Y-m-d H:i:s",mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y"))-7200);
|
||||
else
|
||||
{
|
||||
$texp=explode(" ",$time);
|
||||
$dtexp=explode("-",$texp[0]);
|
||||
$ttexp=explode(":",$texp[1]);
|
||||
$time=date("Y-m-d H:i:s",mktime($ttexp[0],$ttexp[1],$ttexp[2],$dtexp[1],$dtexp[2],$dtexp[0])-7200);
|
||||
}
|
||||
$z="insert into ecmreminders(id,name,date_entered,date_modified,modified_user_id,created_by,description,deleted,assigned_user_id,date_start,status,reminder_time,parent_id,parent_module,role_id) values('".create_guid()."','".$name."','".$time."','".$time."','".$_SESSION['authenticated_user_id']."','".$_SESSION['authenticated_user_id']."','".$desciption."','0','".$_SESSION['authenticated_user_id']."','".$time."','Planned','3600','".$parent_id."','".$parent_module."','".$role_id."')";
|
||||
$GLOBALS['db']->query($z);*/
|
||||
}
|
||||
function insertProductsToStock($pl,$return_id,$stock_id)
|
||||
{
|
||||
$guid=create_guid();
|
||||
$z="insert into ecmstockins(id,assigned_user_id,modified_user_id,date_entered,date_modified,created_by,product_id,pz_id,stock_id,quantity_in,quantity_out,price_in,date_in) values('".$guid."','".$_SESSION['authenticated_user_id']."','".$_SESSION['authenticated_user_id']."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','".$_SESSION['authenticated_user_id']."','".$pl['id']."','".$return_id."','".$stock_id."','".$pl['quantity']."','0','".$pl['price']."','".date("Y-m-d H:i:s")."')";
|
||||
$GLOBALS['db']->query($z);
|
||||
addRelationPurchaseOrderStockIn($return_id,$guid);
|
||||
//addToBooking($pl,$guid);
|
||||
}
|
||||
function getStatus($pl,$stock_id)
|
||||
{
|
||||
$status="products in stock";
|
||||
for($i=0; $i<count($pl); $i++)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select * from ecmstockins where product_id='".$pl[$i]['id']."' and stock_id='".$stock_id."'");
|
||||
if(mysql_num_rows($w)==0)$status="registered";
|
||||
else
|
||||
{
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
if($r['quantity_in']-$r['quantity_out']<$pl[$i]['quantity'])
|
||||
{
|
||||
$status="registered";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($status=="registered")break;
|
||||
}
|
||||
return $status;
|
||||
}
|
||||
function bookProducts($pl,$stock_id,$order_id)
|
||||
{
|
||||
/*$data="";
|
||||
for($i=0; $i<count($pl); $i++)
|
||||
{
|
||||
$qty=$pl[$i]['quantity'];
|
||||
$w=$GLOBALS['db']->query("select * from ecmstockins where product_id='".$pl[$i]['id']."' and stock_id='".$stock_id."' and (quantity_in-quantity_out)>0 order by date_entered asc");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$quantity=$r['quantity_in']-$r['quantity_out'];
|
||||
$ww=$GLOBALS['db']->query("select * from ecmstockbookings where ecmstockin_id='".$r['id']."' and used='0'");
|
||||
$used_qty=0;
|
||||
while($rr=$GLOBALS['db']->fetchByAssoc($ww))$used_qty+=$rr['quantity'];
|
||||
if($quantity>=$qty+$used_qty)
|
||||
{
|
||||
$data[]=array(
|
||||
"stock_in_id"=>$r['id'],
|
||||
"qty"=>$qty,
|
||||
"product_id"=>$pl[$i]['id']
|
||||
);
|
||||
$qty=0;
|
||||
break;
|
||||
}
|
||||
elseif($quantity<$qty+$used_qty)
|
||||
{
|
||||
if($quantity-$used_qty>0)
|
||||
{
|
||||
$data[]=array(
|
||||
"stock_in_id"=>$r['id'],
|
||||
"qty"=>$quantity-$used_qty,
|
||||
"product_id"=>$pl[$i]['id']
|
||||
);
|
||||
$qty-=$quantity-$used_qty;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($qty>0)$data[]=array("stock_in_id"=>"","qty"=>$qty,"product_id"=>$pl[$i]['id']);
|
||||
//print_r($data);
|
||||
addToDbBookedProducts($data,$order_id);
|
||||
$data=array();
|
||||
}*/
|
||||
}
|
||||
function deleteProductFromStockIn($stock_in_id,$product_id,$qty)
|
||||
{
|
||||
$GLOBALS['db']->query("update ecmstockins set quantity_out=quantity_out+".$qty." where id='".$stock_in_id."' and product_id='".$product_id."'");
|
||||
}
|
||||
function addProductToStockOut($stock_in_id,$product_id,$quantity,$price,$date,$wz_id,$stock_id)
|
||||
{
|
||||
$z="insert into
|
||||
ecmstockouts(
|
||||
id,
|
||||
assigned_user_id,
|
||||
modified_user_id,
|
||||
date_entered,
|
||||
date_modified,
|
||||
created_by,
|
||||
product_id,
|
||||
quantity_out,
|
||||
price_out,
|
||||
date_out,
|
||||
wz_id,
|
||||
stock_id,
|
||||
ecmstockin_id,
|
||||
deleted,
|
||||
name
|
||||
) values(
|
||||
'".create_guid()."',
|
||||
'".$_SESSION['authenticated_user_id']."',
|
||||
'".$_SESSION['authenticated_user_id']."',
|
||||
'".date("Y-m-d H:i:s")."',
|
||||
'".date("Y-m-d H:i:s")."',
|
||||
'".$_SESSION['authenticated_user_id']."',
|
||||
'".$product_id."',
|
||||
'".$quantity."',
|
||||
'".$price."',
|
||||
'".$date."',
|
||||
'".$wz_id."',
|
||||
'".$stock_id."',
|
||||
'".$stock_in_id."',
|
||||
'0',
|
||||
'out')";
|
||||
//print $z;
|
||||
$GLOBALS['db']->query($z);
|
||||
//print mysql_error();
|
||||
}
|
||||
function addToDbBookedProducts($data,$order_id)
|
||||
{
|
||||
/*$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select booking_time from ecmstocksettings"));
|
||||
$time=$r['booking_time'];
|
||||
foreach($data as $row)
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmstockbookings(id,assigned_user_id,modified_user_id,date_entered,date_modified,created_by,product_id,order_id,ecmstockin_id,valid_date,quantity,used) values('".create_guid()."','".$_SESSION['authenticated_user_id']."','".$_SESSION['authenticated_user_id']."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','".$_SESSION['authenticated_user_id']."','".$row['product_id']."','".$order_id."','".$row['stock_in_id']."','".date("Y-m-d H:i:s",time()+$time)."','".$row['qty']."','0')");
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select pz_id from ecmstockins where id='".$row['stock_in_id']."'"));
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select po_id from ecmpzdocuments where id='".$r['pz_id']."'"));
|
||||
$GLOBALS['db']->query("insert into
|
||||
ecmsales_ecmstockins
|
||||
(id,date_modified,so_id,ecmstockin_id,deleted)
|
||||
values
|
||||
('".create_guid()."','".date("Y-m-d H:i:s")."','".$order_id."','".$row['stock_in_id']."','0')");
|
||||
$GLOBALS['db']->query("insert into
|
||||
ecmsales_ecmpurchaseorders
|
||||
(id,date_modified,so_id,po_id,deleted)
|
||||
values
|
||||
('".create_guid()."','".date("Y-m-d H:i:s")."','".$order_id."','".$rr['po_id']."','0')");
|
||||
$GLOBALS['db']->query("insert into
|
||||
ecmsales_ecmpzdocuments
|
||||
(id,date_modified,so_id,pz_id,deleted)
|
||||
values
|
||||
('".create_guid()."','".date("Y-m-d H:i:s")."','".$order_id."','".$r['pz_id']."','0')");
|
||||
}*/
|
||||
}
|
||||
function addRelationPurchaseOrderStockIn($pz_id,$stock_in_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select po_id from ecmpzdocuments where id='".$pz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmpurchaseorders_ecmstockins(id,date_modified,po_id,ecmstockin_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$r['po_id']."','".$stock_in_id."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationWzDocumentStockIn($so_id,$wz_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select ecmstockin_id from ecmsales_ecmstockins where so_id='".$so_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmwzdocuments_ecmstockins(id,date_modified,wz_id,ecmstockin_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$wz_id."','".$r['ecmstockin_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationWzDocumentPzDocument($so_id,$wz_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select pz_id from ecmsales_ecmpzdocuments where so_id='".$so_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmwzdocuments_ecmpzdocuments(id,date_modified,wz_id,pz_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$wz_id."','".$r['pz_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationWzDocumentPurchaseOrder($so_id,$wz_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select po_id from ecmsales_ecmpurchaseorders where so_id='".$so_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmwzdocuments_ecmpurchaseorders(id,date_modified,wz_id,po_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$wz_id."','".$r['po_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationInvoicePurchaseOrder($wz_id,$ecminvoiceout_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select po_id from ecmwzdocuments_ecmpurchaseorders where wz_id='".$wz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecminvoiceouts_ecmpurchaseorders(id,date_modified,ecminvoiceout_id,po_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$ecminvoiceout_id."','".$r['po_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationInvoicePzDocument($wz_id,$ecminvoiceout_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select pz_id from ecmwzdocuments_ecmpzdocuments where wz_id='".$wz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecminvoiceouts_ecmpzdocuments(id,date_modified,ecminvoiceout_id,pz_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$ecminvoiceout_id."','".$r['pz_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationInvoiceSalesOrder($wz_id,$ecminvoiceout_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select so_id from ecmwzdocuments where id='".$wz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecminvoiceouts_ecmsales(id,date_modified,ecminvoiceout_id,so_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$ecminvoiceout_id."','".$r['so_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationDeliveryNoteSalesOrder($wz_id,$dn_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select so_id from ecmwzdocuments where id='".$wz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmdeliverynotes_ecmsales(id,date_modified,dn_id,so_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$dn_id."','".$r['so_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelationInvoiceStock($wz_id,$ecminvoiceout_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select ecmstockin_id from ecmwzdocuments_ecmstockins where wz_id='".$wz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
//print "ok<br>";
|
||||
$GLOBALS['db']->query("insert into ecminvoiceouts_ecmstockins(id,date_modified,ecminvoiceout_id,ecmstockin_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$ecminvoiceout_id."','".$r['ecmstockin_id']."','0')");
|
||||
}
|
||||
//print mysql_error();
|
||||
}
|
||||
function addRelationDeliveryNoteInvoice($wz_id,$dn_id)
|
||||
{
|
||||
$w=$GLOBALS['db']->query("select so_id from ecmwzdocuments where wz_id='".$wz_id."'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecminvoiceouts_ecmsales(id,date_modified,ecminvoiceout_id,so_id,deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$ecminvoiceout_id."','".$r['so_id']."','0')");
|
||||
}
|
||||
}
|
||||
function addRelation($r_field,$r_relation,$r_id,$r_value,$l_field,$l_relation,$l_value)
|
||||
{
|
||||
$z="select ".$r_field." from ".$r_relation." where ".$r_id."='".$r_value."'";
|
||||
print $z."<br>";
|
||||
$w=$GLOBALS['db']->query($z);
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ".$l_relation."(id,date_modified,".$l_field.",".$r_field.",deleted) values('".create_guid()."','".date("Y-m-d H:i:s")."','".$l_value."','".$r[$r_field]."','0')");
|
||||
print mysql_error();
|
||||
}
|
||||
}
|
||||
?>
|
||||
11
modules/EcmProductB2Bs/ProductsToOrder.php
Executable file
11
modules/EcmProductB2Bs/ProductsToOrder.php
Executable file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
function ProductToOrder($focus, $field, $value, $view) {
|
||||
$db = $focus->db;
|
||||
$query = "SELECT q3, ems_qty_in_stock from ecmproducts WHERE id='".$focus->id."';";
|
||||
$result = $db->query($query);
|
||||
$row = $db->fetchByAssoc($result);
|
||||
$q3 = $row['q3'];
|
||||
$stock = $row['ems_qty_in_stock'];
|
||||
if ( intval($stock) < 3 * intval($q3)) return 1; else return 0;
|
||||
}
|
||||
?>
|
||||
263
modules/EcmProductB2Bs/Save.php
Executable file
263
modules/EcmProductB2Bs/Save.php
Executable file
@@ -0,0 +1,263 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
require_once('include/formbase.php');
|
||||
require_once('include/Upload.php');
|
||||
|
||||
function addLocalizedInformation($id)
|
||||
{
|
||||
global $db;
|
||||
$lang=array("en","de","pl");
|
||||
foreach($lang as $l)
|
||||
{
|
||||
if (!$_REQUEST['short_description_'.$l] || $_REQUEST['short_description_'.$l]=='')
|
||||
$_REQUEST['short_description_'.$l] = ' ';
|
||||
$result=$GLOBALS['db']->query("select ecmproduct_id from ecmproduct_language where ecmproduct_id='".$id."' and language like '".$l."'");
|
||||
if($result->num_rows>0)
|
||||
{
|
||||
$GLOBALS['db']->query("update ecmproduct_language set ean='".$_REQUEST['ean']."',remarks='".$_REQUEST['remarks_'.$l]."',short_description='".$_REQUEST['short_description_'.$l]."',long_description='".$_REQUEST['long_description_'.$l]."',modified_user_id='".$_SESSION['authenticated_user_id']."',date_modified='".date("Y-m-d H:i:s")."',price='".$_REQUEST['price_'.$l]."' where ecmproduct_id='".$id."' and language='".strtolower($l)."'");
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['db']->query("insert into ecmproduct_language set id='".create_guid()."',created_by='".$_SESSION['authenticated_user_id']."',modified_user_id='".$_SESSION['authenticated_user_id']."',date_entered='".date("Y-m-d H:i:s")."',date_modified='".date("Y-m-d H:i:s")."',deleted='0',ean='".$_REQUEST['ean']."',remarks='".$_REQUEST['remarks_'.$l]."',short_description='".$_REQUEST['short_description_'.$l]."',long_description='".$_REQUEST['long_description_'.$l]."',language='".strtolower($l)."',ecmproduct_id='".$id."',price='".$_REQUEST['price_'.$l]."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
$focus = new EcmProductB2B();
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//add mz 2012-04-10
|
||||
//check ean
|
||||
//include("/modules/EcmProductB2Bs/generateEAN.php");
|
||||
//if ($_POST['newEan']=="1") $focus->ean=generateEAN();
|
||||
//if ($_POST['newEan2']=="1") $focus->ean2=generateEAN();
|
||||
//$_REQUEST['name']="test";
|
||||
|
||||
//categories
|
||||
$pll = array();
|
||||
$json = getJSONobj();
|
||||
$exp=explode("||||",$_POST['position_list3']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list3'] = $pll;
|
||||
|
||||
$pll = array();
|
||||
$json = getJSONobj();
|
||||
$exp=explode("||||",$_POST['position_list4']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list4'] = $pll;
|
||||
|
||||
|
||||
|
||||
include('modules/EcmProductB2Bs/SimpleImage.php');
|
||||
if($_FILES['product_picture']['name']){
|
||||
$_POST['product_picture']=upload_file("product_picture","modules/EcmProductB2Bs/upload/images/");
|
||||
$img="modules/EcmProductB2Bs/upload/images/".$_POST['product_picture'];
|
||||
copy($img,"modules/EcmProductB2Bs/upload/images/big/".$_POST['product_picture']);
|
||||
chmod("modules/EcmProductB2Bs/upload/images/big/".$_POST['product_picture'],0777);
|
||||
$size=getSize($img,125);
|
||||
$image = new SimpleImage();
|
||||
$image->load($img);
|
||||
$image->resize($size[0],$size[1]);
|
||||
$image->save($img);
|
||||
|
||||
}
|
||||
chmod($img,0777);
|
||||
if($_FILES['packing_front_picture']['name']){
|
||||
$_POST['packing_front_picture']=upload_file("packing_front_picture","modules/EcmProductB2Bs/upload/images/");
|
||||
$img="modules/EcmProductB2Bs/upload/images/".$_POST['packing_front_picture'];
|
||||
copy($img,"modules/EcmProductB2Bs/upload/images/big/".$_POST['packing_front_picture']);
|
||||
chmod("modules/EcmProductB2Bs/upload/images/big/".$_POST['packing_front_picture'],0777);
|
||||
$size=getSize($img,125);
|
||||
$image = new SimpleImage();
|
||||
$image->load($img);
|
||||
$image->resize($size[0],$size[1]);
|
||||
$image->save($img);
|
||||
}
|
||||
chmod($img,0777);
|
||||
if($_FILES['driver_1']['name'])$_POST['driver_1']=upload_file("driver_1","modules/EcmProductB2Bs/upload/");
|
||||
if($_FILES['driver_2']['name'])$_POST['driver_2']=upload_file("driver_2","modules/EcmProductB2Bs/upload/");
|
||||
chmod("modules/EcmProductB2Bs/upload/".$_POST['driver_1'],0777);
|
||||
chmod("modules/EcmProductB2Bs/upload/".$_POST['driver_2'],0777);
|
||||
|
||||
if($_REQUEST['delete_product_picture']){
|
||||
$_POST['product_picture']=$_REQUEST['product_picture']="";
|
||||
}
|
||||
if($_REQUEST['delete_packing_front_picture']){
|
||||
$_POST['packing_front_picture']=$_REQUEST['packing_front_picture']="";
|
||||
}
|
||||
|
||||
if($_REQUEST['delete_driver_1']){
|
||||
$_POST['driver_1']=$_REQUEST['driver_1']="";
|
||||
}
|
||||
if($_REQUEST['delete_driver_2']){
|
||||
$_POST['driver_2']=$_REQUEST['driver_2']="";
|
||||
}
|
||||
|
||||
if (!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
|
||||
$check_notify = TRUE;
|
||||
}else{
|
||||
$check_notify = FALSE;
|
||||
}
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($_POST[product_active])) {
|
||||
$focus->product_active = '0';
|
||||
}else{
|
||||
$focus->product_active = '1';
|
||||
}
|
||||
if (!isset($_POST[certificate_of_origin])) {
|
||||
$focus->certificate_of_origin = '0';
|
||||
}else{
|
||||
$focus->certificate_of_origin = '1';
|
||||
}
|
||||
if (!isset($_POST[form_a])) {
|
||||
$focus->form_a = '0';
|
||||
}else{
|
||||
$focus->form_a = '1';
|
||||
}
|
||||
|
||||
//Added for Graduated Prices - Begin
|
||||
/*require_once('modules/EcmProductB2Bs/EcmProductB2BGraduatedPrices.php');
|
||||
$epgp = new EcmProductB2BGraduatedPrices();
|
||||
$epgp->setFromPost();
|
||||
$focus->graduated_prices = $epgp->toString();*/
|
||||
//Added for Graduated Prices - End
|
||||
|
||||
require_once('modules/Currencies/Currency.php');
|
||||
$currency = new Currency();
|
||||
$currency_list = $currency->get_full_list('conversion_rate');
|
||||
$currency->retrieve('-99');
|
||||
if(is_array($currency_list))$currency_list = array_merge(Array($currency), $currency_list);
|
||||
else $currency_list = Array($currency);
|
||||
$arr = array();
|
||||
foreach($currency_list as $key=>$value)$arr[$value->id] = $value->conversion_rate;
|
||||
|
||||
$erv=$arr[$_REQUEST['exchange_rate_id']];
|
||||
$focus->unformat_all_fields();
|
||||
|
||||
$focus->carton_volume_meter=$focus->carton_dimensions_1*$focus->carton_dimensions_2*$focus->carton_dimensions_3;
|
||||
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select local_transportation,abroad_transportation from ecmproductcategories where id='".$_REQUEST['product_category_id']."'"));
|
||||
$lt=$r['local_transportation'];
|
||||
$at=$r['abroad_transportation'];
|
||||
if($focus->pieces_per_carton!=0)$pcscbm=$focus->carton_volume_meter/$focus->pieces_per_carton;
|
||||
else $pcscbm=1;
|
||||
if(!$_REQUEST['purchase_price']){
|
||||
|
||||
$customduty=($focus->fob_price+$at*$pcscbm)*($erv*$focus->custom_duty_rate/100);
|
||||
$focus->purchase_price=$focus->fob_price*$erv+$customduty+$lt*$pcscbm;
|
||||
}
|
||||
|
||||
if(!$_REQUEST['commission_rate']){
|
||||
$rv=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select value from ecmvats where id='".$_REQUEST['vat_id']."'"));
|
||||
$focus->commission_rate=100*(($focus->srp_price/(1+$rv['value']/100)-$focus->purchase_price)/($focus->srp_price/(1+$rv['value']/100)));
|
||||
}
|
||||
$rpp=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ems_price from ecmproducts where id='".$focus->id."'"));
|
||||
|
||||
$focus->save($check_notify);
|
||||
$GLOBALS['db']->query("update ecmproducts set ems_price='".$rpp['ems_price']."' where id='".$focus->id."'");
|
||||
$return_id = $focus->id;
|
||||
|
||||
if(isset($_POST['vat_id'])){
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select value,name from ecmvats where id='".$_POST['vat_id']."'"));
|
||||
$GLOBALS['db']->query("update ecmproducts set ean='".$_REQUEST['ean']."',vat_value='".$r['value']."',vat_name='".$r['name']."',product_active='".$_REQUEST['product_active']."',status='".$_REQUEST['status']."' where id='".$return_id."'");
|
||||
}
|
||||
$models=base64_encode(serialize($_REQUEST['models']));
|
||||
$GLOBALS['db']->query("update ecmproducts set models='".$models."',status='".$_REQUEST['status']."' where id='".$return_id."'");
|
||||
|
||||
addLocalizedInformation($return_id);
|
||||
|
||||
$image=true;
|
||||
$desc=true;
|
||||
if(!file_exists("modules/EcmProductB2Bs/upload/images/big/".$focus->product_picture) || !$focus->product_picture)$image=false;
|
||||
if(!file_exists("modules/EcmProductB2Bs/upload/images/big/".$focus->packing_front_picture) || !$focus->packing_front_picture)$image=false;
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ean,remarks,short_description,long_description,language,price from ecmproduct_language where language='pl' and ecmproduct_id='".$return_id."'"));
|
||||
if(!$r['ean'] || !$r['short_description'] || !$r['long_description'] || !$r['price'])$desc=false;
|
||||
|
||||
if(!$image && !$desc)$type="images_and_description";
|
||||
elseif(!$image && $desc)$type="images";
|
||||
elseif($image && !$desc)$type="description";
|
||||
else $type="ok";
|
||||
|
||||
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select type from ecmproducts_log where ecmproduct_id='".$return_id."' and sent is null order by date_entered desc limit 1"));
|
||||
if($r['type']!=$type){
|
||||
$GLOBALS['db']->query("insert into ecmproducts_log(id,date_modified,date_entered,created_by,modified_user_id,ecmproduct_id,type) values('".create_guid()."','".date("Y-m-d H:i:s")."','".date("Y-m-d H:i:s")."','".$_SESSION['authenticated_user_id']."','".$_SESSION['authenticated_user_id']."','".$return_id."','".$type."');");
|
||||
}
|
||||
handleRedirect($return_id,'EcmProductB2Bs');
|
||||
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/SendXML.php
Executable file
24
modules/EcmProductB2Bs/SendXML.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
include_once("modules/EcmProductB2Bs/xml_template.php");
|
||||
$xml=xml($_REQUEST['record']);
|
||||
$file="cache/upload/product_xml_".str_replace(" ","_",str_replace(".","_",microtime())).".xml";
|
||||
fopen($file);
|
||||
file_put_contents($file,$xml);
|
||||
chmod($file,0777);
|
||||
|
||||
$remote_file="/xml_products/".$r['code']."_".date("YmdHis").".xml";
|
||||
$conn_id = ftp_connect("www.leobite.com");
|
||||
$login_result = ftp_login($conn_id, "ftpleobite.leobite.com", "wrT%I9g");
|
||||
|
||||
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
|
||||
//echo "successfully uploaded $file\n";
|
||||
} else {
|
||||
//echo "There was a problem while uploading $file\n";
|
||||
}
|
||||
|
||||
ftp_chmod($conn_id, 0755, $remote_file);
|
||||
$GLOBALS['db']->query("update ecmproducts_log set sent='1' where date_entered<='".date("Y-m-d H:i:s")."' and ecmproduct_id='".$_REQUEST['record']."'");
|
||||
//header("Location: ".$file);
|
||||
header("Location: index.php?module=EcmProductB2Bs&action=DetailView&record=".$_REQUEST['record']);
|
||||
?>
|
||||
84
modules/EcmProductB2Bs/SimpleImage.php
Executable file
84
modules/EcmProductB2Bs/SimpleImage.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?
|
||||
class SimpleImage {
|
||||
|
||||
var $image;
|
||||
var $image_type;
|
||||
|
||||
function load($filename) {
|
||||
$image_info = getimagesize($filename);
|
||||
$this->image_type = $image_info[2];
|
||||
if( $this->image_type == IMAGETYPE_JPEG ) {
|
||||
$this->image = imagecreatefromjpeg($filename);
|
||||
} elseif( $this->image_type == IMAGETYPE_GIF ) {
|
||||
$this->image = imagecreatefromgif($filename);
|
||||
} elseif( $this->image_type == IMAGETYPE_PNG ) {
|
||||
$this->image = imagecreatefrompng($filename);
|
||||
}
|
||||
}
|
||||
function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {
|
||||
if( $image_type == IMAGETYPE_JPEG ) {
|
||||
imagejpeg($this->image,$filename,$compression);
|
||||
} elseif( $image_type == IMAGETYPE_GIF ) {
|
||||
imagegif($this->image,$filename);
|
||||
} elseif( $image_type == IMAGETYPE_PNG ) {
|
||||
imagepng($this->image,$filename);
|
||||
}
|
||||
if( $permissions != null) {
|
||||
chmod($filename,$permissions);
|
||||
}
|
||||
}
|
||||
function output($image_type=IMAGETYPE_JPEG) {
|
||||
if( $image_type == IMAGETYPE_JPEG ) {
|
||||
imagejpeg($this->image);
|
||||
} elseif( $image_type == IMAGETYPE_GIF ) {
|
||||
imagegif($this->image);
|
||||
} elseif( $image_type == IMAGETYPE_PNG ) {
|
||||
imagepng($this->image);
|
||||
}
|
||||
}
|
||||
function getWidth() {
|
||||
return imagesx($this->image);
|
||||
}
|
||||
function getHeight() {
|
||||
return imagesy($this->image);
|
||||
}
|
||||
function resizeToHeight($height) {
|
||||
$ratio = $height / $this->getHeight();
|
||||
$width = $this->getWidth() * $ratio;
|
||||
$this->resize($width,$height);
|
||||
}
|
||||
function resizeToWidth($width) {
|
||||
$ratio = $width / $this->getWidth();
|
||||
$height = $this->getheight() * $ratio;
|
||||
$this->resize($width,$height);
|
||||
}
|
||||
function scale($scale) {
|
||||
$width = $this->getWidth() * $scale/100;
|
||||
$height = $this->getheight() * $scale/100;
|
||||
$this->resize($width,$height);
|
||||
}
|
||||
function resize($width,$height) {
|
||||
$new_image = imagecreatetruecolor($width, $height);
|
||||
imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());
|
||||
$this->image = $new_image;
|
||||
}
|
||||
}
|
||||
function getSize($img,$width)
|
||||
{
|
||||
if(is_file($img))
|
||||
{
|
||||
$im=@GetImageSize($img);
|
||||
if($im[0]>=$width)
|
||||
{
|
||||
$wi=180;
|
||||
$he=$im[1]*$wi/$im[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
$wi=$im[0];
|
||||
$he=$im[1];
|
||||
}
|
||||
}
|
||||
return array($wi,$he);
|
||||
}
|
||||
?>
|
||||
130
modules/EcmProductB2Bs/SubPanelView.php
Executable file
130
modules/EcmProductB2Bs/SubPanelView.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once("data/Tracker.php");
|
||||
require_once("include/ListView/ListView.php");
|
||||
|
||||
global $app_strings;
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'EcmProductB2Bs');
|
||||
$header_text = '';
|
||||
global $currentModule;
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
$theme_path="themes/".$theme."/";
|
||||
$image_path=$theme_path."images/";
|
||||
require_once($theme_path.'layout_utils.php');
|
||||
|
||||
///////////////////////////////////////
|
||||
/// SETUP PARENT POPUP
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return_and_save',
|
||||
'form_name' => 'DetailView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'ecmproduct_id',
|
||||
),
|
||||
);
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
///
|
||||
///////////////////////////////////////
|
||||
|
||||
// FOCUS_LIST IS THE MEANS OF PASSING DATA TO A SUBPANELVIEW.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='EcmProductB2Bs'>\n";
|
||||
|
||||
if ($currentModule == 'Accounts') {
|
||||
$button .= "<input type='hidden' name='account_id' value='$focus->id'>\n";
|
||||
$button .= "<input type='hidden' name='account_name' value='$focus->name'>\n";
|
||||
|
||||
}elseif ($currentModule == 'Contacts') {
|
||||
$button .= "<input type='hidden' name='account_id' value='$focus->account_id'>\n";
|
||||
$button .= "<input type='hidden' name='account_name' value='$focus->account_name'>\n";
|
||||
$button .= "<input type='hidden' name='contact_id' value='$focus->id'>\n";
|
||||
|
||||
}elseif ($currentModule == 'Cases') {
|
||||
$button .= "<input type='hidden' name='case_id' value='$focus->id'>\n";
|
||||
}
|
||||
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']
|
||||
."' accessKey='".$app_strings['LBL_NEW_BUTTON_KEY']
|
||||
."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' "
|
||||
.$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']."' accessKey='"
|
||||
.$app_strings['LBL_SELECT_BUTTON_KEY']."' type='button' class='button' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']
|
||||
." ' name='button' onclick='open_popup(\"EcmProductB2Bs\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate( 'modules/EcmProductB2Bs/SubPanelView.html',$current_module_strings);
|
||||
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id={$_REQUEST['record']}");
|
||||
$ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path.'edit_inline', 'align="absmiddle" alt="'.$app_strings['LNK_EDIT'] .'" border="0"'));
|
||||
$ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path.'delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
|
||||
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=EcmProductB2Bs&record="
|
||||
.$_REQUEST['record']."'>"
|
||||
.get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")
|
||||
."</a>";
|
||||
}
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text );
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->processListView($focus_list, "main", "ECMPRODUCT");
|
||||
?>
|
||||
9
modules/EcmProductB2Bs/cd.php
Executable file
9
modules/EcmProductB2Bs/cd.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$w=$GLOBALS['db']->query("SELECT id,code, name, carton_volume_meter, carton_dimensions_1, carton_dimensions_2, carton_dimensions_3
|
||||
FROM ecmproducts
|
||||
WHERE carton_dimensions_1 >1
|
||||
AND deleted = '0';");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
echo "update ecmproducts set carton_dimensions_1='".("0.".$r['carton_dimensions_1'])."',carton_dimensions_2='".("0.".$r['carton_dimensions_2'])."',carton_dimensions_3='".("0.".$r['carton_dimensions_3'])."' where id='".$r['id']."';<br>";
|
||||
}
|
||||
?>
|
||||
26
modules/EcmProductB2Bs/checkcode.php
Executable file
26
modules/EcmProductB2Bs/checkcode.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if($_REQUEST['code']!='' ){
|
||||
|
||||
$w = $GLOBALS['db']->query("select count(code) as c from ecmproducts where code='".$_REQUEST['code']."'");
|
||||
$r = $GLOBALS['db']->fetchByAssoc($w);
|
||||
|
||||
if($r['c']>0){
|
||||
if($_REQUEST['record']!=''){
|
||||
$w2 = $GLOBALS['db']->query("select code as c from ecmproducts where id='".$_REQUEST['record']."'");
|
||||
$r2 = $GLOBALS['db']->fetchByAssoc($w2);
|
||||
|
||||
if($_REQUEST['code']==$r2['c']){
|
||||
|
||||
} else {
|
||||
echo 'Istnieje już produkt o podanym kodzie!';
|
||||
}
|
||||
} else {
|
||||
echo 'Istnieje już produkt o podanym kodzie!';
|
||||
}
|
||||
}else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/ean.php
Executable file
24
modules/EcmProductB2Bs/ean.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$tds1='<td valign="top" class="listViewThS1" style="vertical-align:top;">';
|
||||
$trs='<tr onmouseover="this.style.backgroundColor=\'#cccccc\';" onmouseout="this.style.backgroundColor=\'#ffffff\';">';
|
||||
$tre='</tr>';
|
||||
$tds='<td valign="top" class="oddListRowS1" style="border-bottom:1px solid #cccccc;vertical-align:top;">';
|
||||
$tde='</td>';
|
||||
$tbs='<table cellpadding="0" cellspacing="0" border="0" class="ListView" style="width:100%;">';
|
||||
$tbe='</table>';
|
||||
echo $tbs;
|
||||
echo $trs.$tds1.'<b>Indeks</b>'.$tde.$tds1.'<b>Nazwa</b>'.$tde.$tds1.'<b>Kategoria</b>'.$tde.$tds1.'<b>EAN</b>'.$tde.$tre;
|
||||
$w=$GLOBALS['db']->query("select name,code,id,product_category_name,product_category_id from ecmproducts where product_active='1' and code!='' and code is not null order by code asc");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$ean="";
|
||||
$eans=array();
|
||||
$ww=$GLOBALS['db']->query("select ean from ecmproduct_language where ean!='' and ean is not null and ecmproduct_id='".$r['id']."'");
|
||||
while($rr=$GLOBALS['db']->fetchByAssoc($ww)){
|
||||
if($rr['ean'])$eans[$rr['ean']]=$rr['ean'];
|
||||
}
|
||||
$ean=implode("<br>",$eans);
|
||||
echo $trs.$tds.$r['code'].$tde.$tds.'<a href="index.php?module=EcmProductB2Bs&action=DetailView&record='.$r['id'].'">'.$r['name'].'</a>'.$tde.$tds.'<a href="index.php?module=EcmProductB2BCategories&action=DetailView&record='.$r['product_category_id'].'">'.$r['product_category_name'].'</a>'.$tde.$tds.$ean.' '.$tde.$tre;
|
||||
}
|
||||
echo $tbe;
|
||||
|
||||
?>
|
||||
265
modules/EcmProductB2Bs/field_arrays.php
Executable file
265
modules/EcmProductB2Bs/field_arrays.php
Executable file
@@ -0,0 +1,265 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
$fields_array['EcmProductB2B'] = array (
|
||||
'column_fields' => Array(
|
||||
"id",
|
||||
"name",
|
||||
"date_entered",
|
||||
"date_modified",
|
||||
"modified_user_id",
|
||||
"assigned_user_id",
|
||||
"created_by",
|
||||
//NEW COLUMN FIELDS
|
||||
"code",
|
||||
"product_category_id",
|
||||
"product_category_name",
|
||||
"product_subcategory_id",
|
||||
"product_subcategory_name",
|
||||
"product_line_id",
|
||||
"product_line_name",
|
||||
"manufacturer_id",
|
||||
"manufacturer_name",
|
||||
"contact_id",
|
||||
"contact_name",
|
||||
"vendor_id",
|
||||
"vendor_name",
|
||||
"vendor_part_no",
|
||||
"product_active",
|
||||
"sales_start_date",
|
||||
"sales_end_date",
|
||||
"parent_type",
|
||||
"parent_id",
|
||||
"parent_name",
|
||||
"website",
|
||||
"part_no",
|
||||
"serial_no",
|
||||
"exchange_rate_id",
|
||||
"exchange_rate_name",
|
||||
"fob_price",
|
||||
"purchase_price",
|
||||
"ems_price",
|
||||
"commission_rate",
|
||||
"custom_duty_rate",
|
||||
"srp_price",
|
||||
"srp_price_eur",
|
||||
"srp_promo_price",
|
||||
"tax_class_id",
|
||||
"tax_class_name",
|
||||
"usage_unit_id",
|
||||
"usage_unit_name",
|
||||
"qty_in_stock",
|
||||
"qty_in_demand",
|
||||
"ems_qty_in_stock",
|
||||
"reorder_level",
|
||||
"sales_last_month_1",
|
||||
"sales_last_month",
|
||||
"sales_this_month",
|
||||
"qty_per_unit",
|
||||
"average_sale_3_months",
|
||||
"sales_plus_1",
|
||||
"sales_plus_2",
|
||||
"sales_plus_3",
|
||||
"product_picture",
|
||||
"packing_front_picture",
|
||||
"driver_1",
|
||||
"driver_2",
|
||||
"moq",
|
||||
"fob_basis_id",
|
||||
"fob_basis_name",
|
||||
"delivery_time_fob",
|
||||
"pieces_per_carton",
|
||||
"product_netto_weight",
|
||||
"product_brutto_weight",
|
||||
"packing_type_id",
|
||||
"packing_type_name",
|
||||
"packing_dimensions_1",
|
||||
"packing_dimensions_2",
|
||||
"packing_dimensions_3",
|
||||
"rma",
|
||||
"carton_dimensions_1",
|
||||
"carton_dimensions_2",
|
||||
"carton_dimensions_3",
|
||||
"carton_netto_weight",
|
||||
"carton_brutto_weight",
|
||||
"carton_volume_meter",
|
||||
"carton_volume_feet",
|
||||
"country_of_origin",
|
||||
"certificate_of_origin",
|
||||
"form_a",
|
||||
"vat_id",
|
||||
"vat_value",
|
||||
"vat_name",
|
||||
"selling_price",
|
||||
"ems_ordered",
|
||||
"stock_month",
|
||||
"lead_time",
|
||||
"production",
|
||||
"description_card",
|
||||
"characteristic_card",
|
||||
"specification_card",
|
||||
"used_to_card",
|
||||
"image_card",
|
||||
"end_of_line",
|
||||
"status",
|
||||
"flag",
|
||||
"add_status",
|
||||
"description",
|
||||
"th",
|
||||
"ean"
|
||||
),
|
||||
|
||||
'list_fields' => Array(
|
||||
'id',
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
//NEW LIST_FIELDS
|
||||
'code',
|
||||
'product_category_id',
|
||||
'product_category_name',
|
||||
'product_subcategory_id',
|
||||
'product_subcategory_name',
|
||||
'product_line_id',
|
||||
'product_line_name',
|
||||
'manufacturer_id',
|
||||
'manufacturer_name',
|
||||
'contact_id',
|
||||
'contact_name',
|
||||
'vendor_id',
|
||||
'vendor_name',
|
||||
'vendor_part_no',
|
||||
'product_active',
|
||||
'sales_start_date',
|
||||
'sales_end_date',
|
||||
'parent_type',
|
||||
'parent_id',
|
||||
'parent_name',
|
||||
'website',
|
||||
'part_no',
|
||||
'serial_no',
|
||||
'exchange_rate_id',
|
||||
'exchange_rate_name',
|
||||
'fob_price',
|
||||
'purchase_price',
|
||||
'ems_price',
|
||||
'commission_rate',
|
||||
'custom_duty_rate',
|
||||
'srp_price',
|
||||
'srp_price_eur',
|
||||
'srp_promo_price',
|
||||
'tax_class_id',
|
||||
'tax_class_name',
|
||||
'usage_unit_id',
|
||||
'usage_unit_name',
|
||||
'qty_in_stock',
|
||||
'qty_in_demand',
|
||||
'ems_qty_in_stock',
|
||||
'reorder_level',
|
||||
'sales_last_month_1',
|
||||
'sales_last_month',
|
||||
'sales_this_month',
|
||||
'qty_per_unit',
|
||||
'average_sale_3_months',
|
||||
'sales_plus_1',
|
||||
'sales_plus_2',
|
||||
'sales_plus_3',
|
||||
'product_picture',
|
||||
'packing_front_picture',
|
||||
'driver_1',
|
||||
'driver_2',
|
||||
'moq',
|
||||
'fob_basis_id',
|
||||
'fob_basis_name',
|
||||
'delivery_time_fob',
|
||||
'pieces_per_carton',
|
||||
'product_netto_weight',
|
||||
'product_brutto_weight',
|
||||
'packing_type_id',
|
||||
'packing_type_name',
|
||||
'packing_dimensions_1',
|
||||
'packing_dimensions_2',
|
||||
'packing_dimensions_3',
|
||||
'rma',
|
||||
'carton_dimensions_1',
|
||||
'carton_dimensions_2',
|
||||
'carton_dimensions_3',
|
||||
'carton_netto_weight',
|
||||
'carton_brutto_weight',
|
||||
'carton_volume_meter',
|
||||
'carton_volume_feet',
|
||||
'country_of_origin',
|
||||
'certificate_of_origin',
|
||||
'form_a',
|
||||
'vat_id',
|
||||
'vat_value',
|
||||
'vat_name',
|
||||
'selling_price',
|
||||
'ems_ordered',
|
||||
'stock_month',
|
||||
'lead_time',
|
||||
'production',
|
||||
"description_card",
|
||||
"characteristic_card",
|
||||
"specification_card",
|
||||
"used_to_card",
|
||||
"image_card",
|
||||
"end_of_line",
|
||||
"status",
|
||||
"flag",
|
||||
"add_status",
|
||||
"description",
|
||||
"th",
|
||||
"ean"
|
||||
),
|
||||
'required_fields' => array(
|
||||
'name'=>1
|
||||
),
|
||||
);
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/formattedInfo.php
Executable file
25
modules/EcmProductB2Bs/formattedInfo.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$w=$GLOBALS['db']->query("select
|
||||
l.long_description,
|
||||
p.name,
|
||||
p.code,
|
||||
p.product_category_name
|
||||
from ecmproducts as p inner join ecmproduct_language as l on l.ecmproduct_id=p.id
|
||||
where
|
||||
p.deleted='0' and
|
||||
(l.long_description!='' or l.long_description is not null) and
|
||||
(l.language='PL' or l.language='pl') and
|
||||
p.product_active='1' and
|
||||
p.production!=1 and
|
||||
p.end_of_line!=1
|
||||
order by p.product_category_name asc,p.code asc");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
echo "<div>
|
||||
".$r['code']."<br>
|
||||
".$r['name']."<br>
|
||||
".$r['product_category_name']."<br>
|
||||
".str_replace("<","<",str_replace(">",">",$r['long_description']))."
|
||||
</div>
|
||||
<br>";
|
||||
}
|
||||
?>
|
||||
335
modules/EcmProductB2Bs/formloader.php
Executable file
335
modules/EcmProductB2Bs/formloader.php
Executable file
@@ -0,0 +1,335 @@
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$module = $_REQUEST['module'];
|
||||
|
||||
$cM = $_REQUEST['createModule'];
|
||||
|
||||
$lA = $_REQUEST['loaderAction'];
|
||||
|
||||
$fN = $_REQUEST['loaderFieldName'];
|
||||
|
||||
$record = $_REQUEST['record'];
|
||||
|
||||
if($lA == "EditView") {
|
||||
|
||||
ob_start();
|
||||
|
||||
$_REQUEST['module'] = $cM;
|
||||
|
||||
$_REQUEST['action'] = "EditView";
|
||||
|
||||
$_REQUEST['record'] = $record;
|
||||
|
||||
$_POST['module'] = $cM;
|
||||
|
||||
$_POST['action'] = "EditView";
|
||||
|
||||
$_POST['record'] = $record;
|
||||
|
||||
$_GET['record'] = $record;
|
||||
|
||||
include('index.php');
|
||||
|
||||
$out = ob_get_contents();
|
||||
|
||||
ob_end_clean();
|
||||
|
||||
echo $out;
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($lA == "get_module_fields") {
|
||||
|
||||
global $beanList, $beanFiles;
|
||||
|
||||
$file = 'cache/modules/'.$cM.'/'.$beanList[$cM].'vardefs.php';
|
||||
|
||||
if(file_exists($file)) {
|
||||
|
||||
include($file);
|
||||
|
||||
$dict = $GLOBALS['dictionary'][$beanList[$cM]]['fields'];
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
$file = 'modules/'.$cM.'/vardefs.php';
|
||||
|
||||
if(file_exists($file)) { include($file); $dict = $dictionary[$beanList[$cM]]['fields']; } else return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$file = $beanFiles[$beanList[$cM]];
|
||||
|
||||
if(file_exists($file)) {
|
||||
|
||||
require_once($file);
|
||||
|
||||
$bean = new $beanList[$cM]();
|
||||
|
||||
$bean->retrieve($record);
|
||||
|
||||
if(isset($bean->id) && $bean->id != '') {
|
||||
|
||||
$arr = array();
|
||||
|
||||
foreach($dict as $key => $value) {
|
||||
|
||||
if(isset($bean->$value['name']) && (is_string($bean->$value['name']) || is_float($bean->$value['name']) || is_int($bean->$value['name']) || is_bool($bean->$value['name'])))
|
||||
|
||||
$arr[$value['name']] = $bean->$value['name'];
|
||||
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
echo '['.str_replace('"','\"',$json->encode($arr)).']';
|
||||
|
||||
} else return;
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
|
||||
|
||||
<title></title>
|
||||
|
||||
<script type="text/javascript" src="include/javascript/sugar_grp1_yui.js?s=5.0.0c&c="></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="hidder" style="position:absolute;left:0;top:0;width:105%;height:100%;background-color:white;visibility:visible;text-align:center;padding:40px;"><img src="themes/default/images/loading.gif"/></div>
|
||||
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
|
||||
|
||||
|
||||
function doRequest(where,post,success,error) {
|
||||
|
||||
this.Display = function(result) { success(result.responseText); }
|
||||
|
||||
this.Fail = function(result){ if(error) error(result); }
|
||||
|
||||
YAHOO.util.Connect.asyncRequest('POST',where,{success:this.Display,failure:this.Fail},post);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function iframeLoad() {
|
||||
|
||||
var frame = document.getElementById("input_create");
|
||||
|
||||
|
||||
var doc = frame.contentDocument;
|
||||
|
||||
if(typeof(doc) == "undefined" || !doc)
|
||||
|
||||
doc = frame.contentWindow.document;
|
||||
|
||||
//alert(doc.forms.DetailView);
|
||||
|
||||
|
||||
|
||||
if(doc && doc.forms && ((doc.forms.EditView || doc.forms.DetailView || doc.forms.Save) || doc.return_module_fields)) {
|
||||
|
||||
|
||||
|
||||
if(doc.forms.EditView) {
|
||||
|
||||
|
||||
|
||||
} else
|
||||
|
||||
if(doc.forms.DetailView) {
|
||||
|
||||
var record = doc.forms.DetailView.record;
|
||||
|
||||
if(record && record.value != "") {
|
||||
|
||||
doRequest(
|
||||
|
||||
"index.php",
|
||||
|
||||
"module="+module+"&action=formloader&loaderAction=get_module_fields&createModule="+cM+"&to_pdf=1&record="+record.value,
|
||||
|
||||
function(result) {
|
||||
|
||||
if(result == '')
|
||||
|
||||
window.close();
|
||||
|
||||
else {
|
||||
|
||||
|
||||
var obj = eval(result);
|
||||
|
||||
if(obj) {
|
||||
|
||||
obj = obj[0];
|
||||
|
||||
eval('window.opener.'+fN+'.responseData(obj)');
|
||||
|
||||
}
|
||||
|
||||
window.close();
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
function(result) {
|
||||
|
||||
window.close();
|
||||
|
||||
}
|
||||
|
||||
);
|
||||
|
||||
} else window.close();
|
||||
|
||||
} else
|
||||
|
||||
if(doc.forms.Save) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else { window.close(); return; }
|
||||
|
||||
|
||||
|
||||
var main = doc.getElementById('main');
|
||||
|
||||
if(main) {
|
||||
|
||||
var dd = doc.createElement('div');
|
||||
dd.innerHTML = '<table style="width:100%;"><tr id="main2"></tr></table>';
|
||||
|
||||
doc.body.insertBefore(dd,doc.body.firstChild);
|
||||
|
||||
doc.getElementById('main2').appendChild(main);
|
||||
main.style.position = 'absolute';
|
||||
main.style.left = 0;
|
||||
main.style.top = 0;
|
||||
for(var i=1; i<doc.body.childNodes.length; i++) if(doc.body.childNodes[i] !== main && doc.body.childNodes[i].style) {
|
||||
doc.body.childNodes[i].style.visibility = 'hidden';
|
||||
}
|
||||
if(doc && doc.forms && !doc.forms.DetailView) doc.body.FormLoader = true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var oldLocation = '';
|
||||
|
||||
setInterval(function(){
|
||||
|
||||
var frame = document.getElementById("input_create");
|
||||
|
||||
if(frame) {
|
||||
|
||||
var doc = frame.contentDocument;
|
||||
|
||||
if(doc == undefined || doc == null)
|
||||
|
||||
doc = frame.contentWindow.document;
|
||||
|
||||
|
||||
|
||||
if(doc && doc.body && doc.body.FormLoader) {
|
||||
|
||||
if(hidder.style.visibility = "visible") hidder.style.visibility = "hidden";
|
||||
|
||||
} else {
|
||||
|
||||
if(hidder.style.visibility = "hidden") hidder.style.visibility = "visible"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},60);
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if($lA == "ViewForm") {
|
||||
|
||||
echo '<script language="javascript">
|
||||
|
||||
var module = "'.$module.'";
|
||||
|
||||
var cM = "'.$cM.'";
|
||||
|
||||
var lA = "'.$lA.'";
|
||||
|
||||
var fN = "'.$fN.'";
|
||||
|
||||
</script>';
|
||||
|
||||
$data = '';
|
||||
|
||||
foreach($_REQUEST as $key=>$value) {
|
||||
|
||||
if(strpos($key,"fl_") === 0) {
|
||||
|
||||
$data .= "&".substr($key,3)."=".$value;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo "<iframe onload='iframeLoad();' frameborder='no' width='100%' height='100%' id='input_create' name='input_create' src='index.php?module=$module&action=formloader&to_pdf=1&loaderAction=EditView&createModule=$cM".$data."'></iframe>";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
27
modules/EcmProductB2Bs/generateCard.php
Executable file
27
modules/EcmProductB2Bs/generateCard.php
Executable file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
include_once("modules/EcmProductB2Bs/productCardReallyNew.php");
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF("L");
|
||||
$p->SetAutoPageBreak(10);
|
||||
|
||||
|
||||
$p=productCardNew($p,$_REQUEST['record'],$_GET['language'],true,true,"","",$_REQUEST['show_price'], $_REQUEST['ean'], $_REQUEST['simage']);
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
$guid=create_guid();
|
||||
$type="F";
|
||||
$file="cache/upload/Catalogue".$guid.".pdf";
|
||||
}
|
||||
else{
|
||||
$type="D";
|
||||
$file="Catalogue".date("YmdHi").".pdf";
|
||||
}
|
||||
$p->Output($file,$type);
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
exec("convert -density 120 -quality 100 /var/www/html/e5new/".$file." /var/www/html/e5new/".str_replace(".pdf",".jpg",$file));
|
||||
chmod(str_replace(".pdf",".jpg",$file),0777);
|
||||
header("Location: index.php?module=EcmProductB2Bs&action=showProductsCardImages&to_pdf=1&guid=".$guid);
|
||||
}
|
||||
?>
|
||||
8
modules/EcmProductB2Bs/generateCategoryContent.php
Executable file
8
modules/EcmProductB2Bs/generateCategoryContent.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
include_once("modules/EcmProductB2Bs/productCardNew.php");
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF();
|
||||
$p->SetAutoPageBreak(10);
|
||||
$p=contentView($p,$_GET['category_id'],$_GET['lang'],$_GET['record']);
|
||||
$p->Output(str_replace(" ","_",$_GET['category_name'])."-".$_GET['lang'].".pdf","D");
|
||||
?>
|
||||
69
modules/EcmProductB2Bs/generateEAN.php
Executable file
69
modules/EcmProductB2Bs/generateEAN.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
if ($_REQUEST['fromEdit']==1) generateEAN();
|
||||
|
||||
function generateEAN($validate = 0) {
|
||||
$country_code = '590';
|
||||
$company_code = '0488';
|
||||
|
||||
$res = $GLOBALS['db']->query("SELECT ean, ean2 FROM ecmproducts;");
|
||||
$used_ean = array();
|
||||
while ($r = $GLOBALS['db']->fetchByAssoc($res)) {
|
||||
if ((strlen($r['ean'])==13) && (intval($r['ean'])!=0)) $used_ean[] = substr($r['ean'],7,5);
|
||||
if ((strlen($r['ean2'])==13) && (intval($r['ean'])!=0)) $used_ean[] = SUBSTR($r['ean2'],7,5);
|
||||
}
|
||||
|
||||
//if validate !=0 don't add current values to $used_ean
|
||||
if ($validate==0) {
|
||||
if (strlen($_REQUEST['ean'])==13) $used_ean[] = substr($_REQUEST['ean'],7,5);
|
||||
if (strlen($_REQUEST['ean2'])==13) $used_ean[] = substr($_REQUEST['ean2'],7,5);
|
||||
}
|
||||
|
||||
if ($validate==2)
|
||||
if (strlen($_REQUEST['ean'])==13) $used_ean[] = substr($_REQUEST['ean'],7,5);
|
||||
//find max of last eans
|
||||
$max=0;
|
||||
foreach ($used_ean as $ue)
|
||||
if ($ue>$max) $max=$ue;
|
||||
|
||||
//echo $max;
|
||||
|
||||
$new=$max+1;
|
||||
//new_ean
|
||||
$ne = array();
|
||||
//country code
|
||||
$ne[0]=5;
|
||||
$ne[1]=9;
|
||||
$ne[2]=0;
|
||||
//company code
|
||||
$ne[3]=0;
|
||||
$ne[4]=4;
|
||||
$ne[5]=8;
|
||||
$ne[6]=8;
|
||||
//new product code
|
||||
$ne[7]=intval(substr($new,0,1));
|
||||
$ne[8]=intval(substr($new,1,1));
|
||||
$ne[9]=intval(substr($new,2,1));
|
||||
$ne[10]=intval(substr($new,3,1));
|
||||
$ne[11]=intval(substr($new,4,1));
|
||||
|
||||
//calculate check sum value
|
||||
$h1 = $ne[11]+$ne[9]+$ne[7]+$ne[5]+$ne[3]+$ne[1];
|
||||
$h2 = $h1*3;
|
||||
$h3 = $ne[10]+$ne[8]+$ne[6]+$ne[4]+$ne[2]+$ne[0];
|
||||
$h4 = $h2+$h3;
|
||||
$h5=$h4;
|
||||
//ZAOKR.GÓRA :)
|
||||
if ($h5 % 10 != 0)
|
||||
while ($h5 % 10 != 0) {
|
||||
$h5++;
|
||||
}
|
||||
$ne[12]=$h5-$h4;
|
||||
|
||||
$ean ='';
|
||||
foreach ($ne as $v)
|
||||
$ean.=$v;
|
||||
echo $ean;
|
||||
return $ean;
|
||||
}
|
||||
?>
|
||||
12
modules/EcmProductB2Bs/generateProductCards.php
Executable file
12
modules/EcmProductB2Bs/generateProductCards.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
include_once("modules/EcmProductB2Bs/productCardNew.php");
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF("L");
|
||||
$p->SetAutoPageBreak(10);
|
||||
$w=$GLOBALS['db']->query("select p.id as id from ecmproducts as p inner join ecmpricebooks_ecmproducts as c on c.ecmproduct_id=p.id where p.product_active=1 and c.ecmpricebook_id='5a7c1379-a50b-3ce6-f96b-4ce4e7a9496a' and (p.product_category_name like '".$_GET['cat']."%') and p.deleted='0' and c.deleted='0' order by p.product_category_name asc,p.code asc,p.name asc");
|
||||
//$w=$GLOBALS['db']->query("select id from ecmproducts where product_category_name like '".$_GET['cat']."%' and deleted='0' and product_active='1'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$p=productCardNew($p,$r['id'],$_GET['lang']);
|
||||
}
|
||||
$p->Output(str_replace(" ","_",$_GET['cat'])."-".$_GET['lang'].".pdf","D");
|
||||
?>
|
||||
134
modules/EcmProductB2Bs/generateProductCardsFromPricebook.php
Executable file
134
modules/EcmProductB2Bs/generateProductCardsFromPricebook.php
Executable file
@@ -0,0 +1,134 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
set_time_limit (99999999);
|
||||
include_once("modules/EcmProductB2Bs/productCardReallyNew.php");
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF("L");
|
||||
$p->SetAutoPageBreak(10);
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select c.iso4217 as s from currencies as c inner join ecmpricebooks as q on q.exchange_rate_id=c.id where q.id='".$_REQUEST['record']."'"));
|
||||
$symbol=$rr['s'];
|
||||
|
||||
|
||||
$result = $GLOBALS['db']->query("select * from ecmpricebooks_customview where id='".$_GET['customview_id']."'");
|
||||
$row=$GLOBALS['db']->fetchByAssoc($result);
|
||||
$c=explode("||",$row['columns']);
|
||||
$t=explode("||",$row['titles']);
|
||||
$o=explode("||",$row['orders']);
|
||||
|
||||
if($_COOKIE['customview_id']!=$_GET['customview_id'] || $_SESSION['customview_id']=="" || !$_GET['order_by'])
|
||||
{
|
||||
$pbo=array();
|
||||
for($i=0;$i<=8;$i++)
|
||||
{
|
||||
if($o[$i])
|
||||
{
|
||||
$exp=explode(" ",$o[$i]);
|
||||
$adesc=$exp[1];
|
||||
$ord=$exp[0];
|
||||
if($ord=="list_price")$pbo[]="ecmpricebooks_ecmproducts.price ".$adesc;
|
||||
else $pbo[]="ecmproducts.".$ord." ".$adesc;
|
||||
}
|
||||
}
|
||||
$_SESSION['pricebook_order']=implode(",",$pbo);
|
||||
}
|
||||
setcookie('customview_id',$_GET['customview_id'],time()+60*24*60*3600);
|
||||
|
||||
$order=$_SESSION['pricebook_order'];
|
||||
$order=str_replace("ecmproducts.margin_rate","margin_rate",$order);
|
||||
if($_REQUEST['order_by']){
|
||||
$order=str_replace($_REQUEST['order_by']." desc",$_REQUEST['order_by']." ".$_REQUEST['sorder'],$order);
|
||||
$order=str_replace($_REQUEST['order_by']." asc",$_REQUEST['order_by']." ".$_REQUEST['sorder'],$order);
|
||||
}
|
||||
|
||||
$_SESSION['pricebook_order']=$order;
|
||||
|
||||
if($_REQUEST['order_by'] && $_REQUEST['sorder'])$_SESSION['pricebook_order']=$_REQUEST['order_by']." ".$_REQUEST['sorder'];
|
||||
|
||||
$where="";
|
||||
if(count($_SESSION['pricebook_check'][$_SESSION['pricebook_id']])>0)
|
||||
{
|
||||
foreach($_SESSION['pricebook_check'][$_SESSION['pricebook_id']] as $key=>$value){
|
||||
if($_SESSION['pricebook_check'][$_SESSION['pricebook_id']][$key]!="true" && $_SESSION['pricebook_check'][$_SESSION['pricebook_id']]['all']=="true"){
|
||||
$where_clauses[]="i.id!='".$key."'";
|
||||
$orand=' and ';
|
||||
}
|
||||
elseif($_SESSION['pricebook_check'][$_SESSION['pricebook_id']][$key]=="true" && $_SESSION['pricebook_check'][$_SESSION['pricebook_id']]['all']!="true"){
|
||||
$where_clauses[]="i.id='".$key."'";
|
||||
$orand=' or ';
|
||||
}
|
||||
}
|
||||
if(count($where_clauses)>0)$where="(".implode($orand,$where_clauses).") and ";
|
||||
elseif($_SESSION['pricebook_check'][$_SESSION['pricebook_id']]['all']!="true" && count($where_clauses)==0)$where="ecmpricebooks_ecmproducts.id='9999999999999999' and ";
|
||||
}
|
||||
else $where="i.id='9999999999999999' and ";
|
||||
if($_SESSION['pricebook_order'])$order=" order by ".$_SESSION['pricebook_order'];
|
||||
$z="select distinct i.ecmproduct_id,i.price,p.product_category_id,p.th from ecmpricebooks_ecmproducts as i inner join ecmproducts as p on p.id=i.ecmproduct_id inner join ecmpricebooks_ecmproducts_categories_sort as c on c.category_id=p.product_category_id where ".$where." i.ecmpricebook_id='".$_REQUEST['record']."' and i.deleted='0' order by c.position asc,i.position asc";
|
||||
$num=mysql_num_rows($GLOBALS['db']->query($z));
|
||||
$w=$GLOBALS['db']->query($z);
|
||||
$cat="";
|
||||
$i=0;
|
||||
if($_REQUEST['header']==1){
|
||||
$rwt=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query($z));
|
||||
$p=catalogueHeader($p,$rwt['th']);
|
||||
}
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$id=$r['ecmproduct_id'];
|
||||
if($_GET['price']=="srp_price")$r['price']="";
|
||||
/*
|
||||
if(($cat!=$r['product_category_id'] || $cat=="") && $_REQUEST['title']==1){
|
||||
if($_REQUEST['extra']==1 && $cat!=""){
|
||||
if(categoryExtra($p,$cat,$th)){
|
||||
$p->AddPage();
|
||||
$p->Image("modules/EcmProductB2Bs/".categoryExtra($p,$cat,$th),5,0,283);
|
||||
}
|
||||
}
|
||||
$p->AddPage();
|
||||
$p=categoryTitle($p,$r['product_category_id'],$r['th']);
|
||||
}
|
||||
$cat=$r['product_category_id'];
|
||||
$th=$r['th'];
|
||||
*/
|
||||
//add mz 05-12-201
|
||||
//exchange price if EUR
|
||||
if ($_REQUEST['price']=="srp_price") {
|
||||
$srp_price_result = $GLOBALS['db']->query("SELECT srp_price FROM ecmproducts WHERE id ='".$r['ecmproduct_id']."'");
|
||||
$srp_price_row = $GLOBALS['db']->fetchByAssoc($srp_price_result);
|
||||
$price = $srp_price_row['srp_price'];
|
||||
} else
|
||||
$price = $r['price'];
|
||||
|
||||
$exchange_result = $GLOBALS['db']->query("SELECT exchange_rate_id, currency_value FROM ecmpricebooks WHERE id='".$_SESSION['pricebook_id']."'");
|
||||
|
||||
$exchange_row=$GLOBALS['db']->fetchByAssoc($exchange_result);
|
||||
if ($exchange_row['exchange_rate_id']=="5e72f103-1989-8b1f-dc9a-493fe7c7449f")
|
||||
$price = $price * (1 / $exchange_row['currency_value']);
|
||||
|
||||
//$i++;
|
||||
//if ($i<202) continue;
|
||||
$p=productCardNew($p,$id,$_GET['language'],true,true,$price,$symbol,$_REQUEST['show_price'], $_REQUEST['ean']);
|
||||
}
|
||||
/*
|
||||
if($_REQUEST['extra']==1){
|
||||
if(categoryExtra($p,$cat,$th)){
|
||||
$p->AddPage();
|
||||
$p->Image("modules/EcmProductB2Bs/".categoryExtra($p,$cat,$th),5,0,283);
|
||||
}
|
||||
}
|
||||
*/
|
||||
if($_REQUEST['create_img']==1){
|
||||
$guid=create_guid();
|
||||
$type="F";
|
||||
$file="cache/upload/Catalogue".$guid.".pdf";
|
||||
}
|
||||
else{
|
||||
$type="D";
|
||||
$file="Catalogue".date("YmdHi").".pdf";
|
||||
}
|
||||
$p->Output($file,$type);
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
exec("convert -density 120 -quality 100 /var/www/html/e5crm/".$file." /var/www/html/e5crm/".str_replace(".pdf",".jpg",$file));
|
||||
chmod(str_replace(".pdf",".jpg",$file),0777);
|
||||
header("Location: index.php?module=EcmProductB2Bs&action=showProductsCardImages&to_pdf=1&guid=".$guid);
|
||||
}
|
||||
?>
|
||||
42
modules/EcmProductB2Bs/generateProductCardsFromProduct.php
Executable file
42
modules/EcmProductB2Bs/generateProductCardsFromProduct.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
include_once("modules/EcmProductB2Bs/productCardNew.php");
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF("L");
|
||||
$p->SetAutoPageBreak(10);
|
||||
$rcat=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select product_category_id,th from ecmproducts where id='".$_REQUEST['record']."'"));
|
||||
if($_REQUEST['header']==1){
|
||||
$p=catalogueHeader($p,$rcat['th']);
|
||||
}
|
||||
if($_REQUEST['content']==1){
|
||||
$p=catalogueContent($p);
|
||||
}
|
||||
if($_REQUEST['title']==1){
|
||||
$p->AddPage();$p=categoryTitle($p,$rcat['product_category_id'],$rcat['th']);
|
||||
}
|
||||
|
||||
|
||||
$p=productCardNew($p,$_REQUEST['record'],$_GET['language'],true,true,"","",$_REQUEST['show_price'], $_REQUEST['ean']);
|
||||
if($_REQUEST['extra']==1){
|
||||
if(categoryExtra($p,$rcat['product_category_id'],$rcat['th'])){
|
||||
$p->AddPage();
|
||||
$p->Image("modules/EcmProductB2Bs/".categoryExtra($p,$rcat['product_category_id'],$rcat['th']),5,0,283);
|
||||
}
|
||||
}
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
$guid=create_guid();
|
||||
$type="F";
|
||||
$file="cache/upload/Catalogue".$guid.".pdf";
|
||||
}
|
||||
else{
|
||||
$type="D";
|
||||
$file="Catalogue".date("YmdHi").".pdf";
|
||||
}
|
||||
$p->Output($file,$type);
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
exec("convert -density 120 -quality 100 /var/www/html/e5crm/".$file." /var/www/html/e5crm/".str_replace(".pdf",".jpg",$file));
|
||||
chmod(str_replace(".pdf",".jpg",$file),0777);
|
||||
header("Location: index.php?module=EcmProductB2Bs&action=showProductsCardImages&to_pdf=1&guid=".$guid);
|
||||
}
|
||||
?>
|
||||
60
modules/EcmProductB2Bs/generateProductCardsFromQuote.php
Executable file
60
modules/EcmProductB2Bs/generateProductCardsFromQuote.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
include_once("modules/EcmProductB2Bs/productCardReallyNew.php");
|
||||
include_once("include/html2fpdf/html2fpdf.php");
|
||||
$p=new HTML2FPDF("L");
|
||||
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select c.iso4217 as s from currencies as c inner join ecmquotes as q on q.currency_id=c.id where q.id='".$_REQUEST['record']."'"));
|
||||
$symbol=$rr['s'];
|
||||
|
||||
$w=$GLOBALS['db']->query("select i.ecmproduct_id,i.price,p.product_category_id,p.th from ecmquoteitems as i inner join ecmproducts as p on p.id=i.ecmproduct_id where i.ecmquote_id='".$_REQUEST['record']."' and i.deleted='0' order by i.position asc");
|
||||
$cat="";
|
||||
|
||||
|
||||
if($_REQUEST['header']==1){
|
||||
$rwt=$GLOBALS['db']->fetchByAssoc($wt);
|
||||
$p=catalogueHeader($p,$rwt['th']);
|
||||
}
|
||||
echo 'lol';
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$id=$r['ecmproduct_id'];
|
||||
if($_GET['price']=="srp_price")$r['price']="";
|
||||
/*
|
||||
if(($cat!=$r['product_category_id'] || $cat=="") && $_REQUEST['title']==1){
|
||||
if($_REQUEST['extra']==1 && $cat!=""){
|
||||
if(categoryExtra($p,$cat,$th)){
|
||||
$p->AddPage();
|
||||
$p->Image("modules/EcmProductB2Bs/".categoryExtra($p,$cat,$th),5,0,283);
|
||||
}
|
||||
}
|
||||
$p->AddPage();
|
||||
$p=categoryTitle($p,$r['product_category_id'],$r['th']);
|
||||
}
|
||||
*/
|
||||
$cat=$r['product_category_id'];
|
||||
$th=$r['th'];
|
||||
$p=productCardNew($p,$id,$_GET['language'],true,true,$r['price'],$symbol,$_GET['show_price']);
|
||||
}
|
||||
if($_REQUEST['extra']==1){
|
||||
if(categoryExtra($p,$cat,$th)){
|
||||
$p->AddPage();
|
||||
$p->Image("modules/EcmProductB2Bs/".categoryExtra($p,$cat,$th),5,0,283);
|
||||
}
|
||||
}
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
$guid=create_guid();
|
||||
$type="F";
|
||||
$file="cache/upload/Catalogue".$guid.".pdf";
|
||||
}
|
||||
else{
|
||||
$type="D";
|
||||
$file="Catalogue.pdf";
|
||||
}
|
||||
$p->Output($file,$type);
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
exec("convert -density 120 -quality 100 /var/www/html/e5crm/".$file." /var/www/html/e5crm/".str_replace(".pdf",".jpg",$file));
|
||||
chmod(str_replace(".pdf",".jpg",$file),0777);
|
||||
header("Location: index.php?module=EcmProductB2Bs&action=showProductsCardImages&to_pdf=1&guid=".$guid);
|
||||
}
|
||||
?>
|
||||
13
modules/EcmProductB2Bs/getDescWithEnter.php
Executable file
13
modules/EcmProductB2Bs/getDescWithEnter.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$w=$GLOBALS['db']->query("select long_description,ecmproduct_id from ecmproduct_language where language='en' and deleted='0'");
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w)){
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,code,name,product_active,status from ecmproducts where id='".$r['ecmproduct_id']."'"));
|
||||
$s=str_replace("<","<",$r['long_description']);
|
||||
$s=str_replace(">",">",$s);
|
||||
$p=explode("<p>",$s);
|
||||
$p=explode("</p>",$p[1]);
|
||||
$p=$p[0];
|
||||
if(eregi("
|
||||
",$p) && $rr['product_active'] && $rr['status']!="end_of_line")echo '<a href="index.php?module=EcmProductB2Bs&action=EditView&record='.$rr['id'].'">'.$rr['code']." ".$rr['name']."</a><br>";
|
||||
}
|
||||
?>
|
||||
9
modules/EcmProductB2Bs/getModelsBySubCategory.php
Executable file
9
modules/EcmProductB2Bs/getModelsBySubCategory.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$result = $GLOBALS['db']->query("select * from ecmproductmodels where deleted='0' and parent_id='".$_REQUEST['id']."'");
|
||||
$sm='<select name="models[]" multiple id="models" sieze="6">';
|
||||
while($row=$GLOBALS['db']->fetchByAssoc($result)){
|
||||
$sm.='<option value="'.$row['id'].'">'.$row['name'].'</option>';
|
||||
}
|
||||
$sm.='</select>';
|
||||
echo $sm;
|
||||
?>
|
||||
12
modules/EcmProductB2Bs/getProductResInfo.php
Executable file
12
modules/EcmProductB2Bs/getProductResInfo.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if (!$_REQUEST['product_id'] || !$_REQUEST['product_id']) {echo 'error'; return;}
|
||||
|
||||
require_once('modules/EcmProductB2Bs/EcmProductB2B.php');
|
||||
|
||||
$prod = new EcmProductB2B();
|
||||
|
||||
$info = $prod->getProductResInfo($_REQUEST['product_id'], $_REQUEST['stock_id']);
|
||||
|
||||
$json = getJSONobj();
|
||||
echo '['.$json->encode($info).']';
|
||||
?>
|
||||
12
modules/EcmProductB2Bs/getStockInfo.php
Executable file
12
modules/EcmProductB2Bs/getStockInfo.php
Executable file
@@ -0,0 +1,12 @@
|
||||
<?
|
||||
$q=0;
|
||||
$w=$GLOBALS['db']->query("select quantity_in,quantity_out from ecmstockins where product_id='".$_REQUEST['record']."' and stock_id='".$_REQUEST['stock_id']."'");
|
||||
//print mysql_error();
|
||||
while($r=$GLOBALS['db']->fetchByAssoc($w))
|
||||
{
|
||||
//print $r['quantity_in']." ".$r['quantity_out']."<BR>";
|
||||
$qty=$r['quantity_in']-$r['quantity_out'];
|
||||
$q+=$qty;
|
||||
}
|
||||
print $q;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arial.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arial.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='ArialMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -283 979 896]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>375,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>615,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arial.z';
|
||||
$size1=5917;
|
||||
$size2=25247;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialbd.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialbd.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-BoldMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -319 972 919]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>385,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>719,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialbd.z';
|
||||
$size1=5932;
|
||||
$size2=25747;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialbi.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialbi.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-BoldItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-109 -298 1068 905]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>396,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>740,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialbi.z';
|
||||
$size1=5962;
|
||||
$size2=26288;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/ariali - Copy.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/ariali - Copy.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-ItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-121 -275 1062 894]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>281,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>354,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>625,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='ariali.z';
|
||||
$size1=5942;
|
||||
$size2=26173;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/ariali.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/ariali.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-ItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-121 -275 1062 894]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>281,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>354,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>625,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='ariali.z';
|
||||
$size1=5942;
|
||||
$size2=26173;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialpl.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialpl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='ArialMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -283 979 896]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>375,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>615,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialpl.z';
|
||||
$size1=5917;
|
||||
$size2=25247;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialpl1.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialpl1.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='ArialMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -283 979 938]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>375,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>615,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='';
|
||||
$originalsize=0;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialzpl1.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/arialzpl1.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='Arial-BoldItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-109 -298 1068 939]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>396,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>740,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='arialzpl.z';
|
||||
$originalsize=221756;
|
||||
?>
|
||||
7
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/courier.php
Executable file
7
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/courier.php
Executable file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helvetica.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helvetica.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helveticab.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helveticab.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helveticabi.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helveticabi.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helveticai.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/helveticai.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
400
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/makefont/makefont.php
Executable file
400
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/makefont/makefont.php
Executable file
@@ -0,0 +1,400 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Utility to generate font definition files *
|
||||
* Version: 1.12 *
|
||||
* Date: 2003-12-30 *
|
||||
*******************************************************************************/
|
||||
|
||||
function ReadMap($enc)
|
||||
{
|
||||
//Read a map file
|
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('<B>Error:</B> encoding not found: '.$enc);
|
||||
$cc2gn=array();
|
||||
foreach($a as $l)
|
||||
{
|
||||
if($l{0}=='!')
|
||||
{
|
||||
$e=preg_split('/[ \\t]+/',chop($l));
|
||||
$cc=hexdec(substr($e[0],1));
|
||||
$gn=$e[2];
|
||||
$cc2gn[$cc]=$gn;
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=255;$i++)
|
||||
if(!isset($cc2gn[$i]))
|
||||
$cc2gn[$i]='.notdef';
|
||||
return $cc2gn;
|
||||
}
|
||||
|
||||
function ReadAFM($file,&$map)
|
||||
{
|
||||
//Read a font metric file
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('File not found');
|
||||
$widths=array();
|
||||
$fm=array();
|
||||
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
|
||||
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
|
||||
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
|
||||
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
|
||||
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
|
||||
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
|
||||
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
|
||||
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
|
||||
foreach($a as $l)
|
||||
{
|
||||
$e=explode(' ',chop($l));
|
||||
if(count($e)<2)
|
||||
continue;
|
||||
$code=$e[0];
|
||||
$param=$e[1];
|
||||
if($code=='C')
|
||||
{
|
||||
//Character metrics
|
||||
$cc=(int)$e[1];
|
||||
$w=$e[4];
|
||||
$gn=$e[7];
|
||||
if(substr($gn,-4)=='20AC')
|
||||
$gn='Euro';
|
||||
if(isset($fix[$gn]))
|
||||
{
|
||||
//Fix incorrect glyph name
|
||||
foreach($map as $c=>$n)
|
||||
if($n==$fix[$gn])
|
||||
$map[$c]=$gn;
|
||||
}
|
||||
if(empty($map))
|
||||
{
|
||||
//Symbolic font: use built-in encoding
|
||||
$widths[$cc]=$w;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widths[$gn]=$w;
|
||||
if($gn=='X')
|
||||
$fm['CapXHeight']=$e[13];
|
||||
}
|
||||
if($gn=='.notdef')
|
||||
$fm['MissingWidth']=$w;
|
||||
}
|
||||
elseif($code=='FontName')
|
||||
$fm['FontName']=$param;
|
||||
elseif($code=='Weight')
|
||||
$fm['Weight']=$param;
|
||||
elseif($code=='ItalicAngle')
|
||||
$fm['ItalicAngle']=(double)$param;
|
||||
elseif($code=='Ascender')
|
||||
$fm['Ascender']=(int)$param;
|
||||
elseif($code=='Descender')
|
||||
$fm['Descender']=(int)$param;
|
||||
elseif($code=='UnderlineThickness')
|
||||
$fm['UnderlineThickness']=(int)$param;
|
||||
elseif($code=='UnderlinePosition')
|
||||
$fm['UnderlinePosition']=(int)$param;
|
||||
elseif($code=='IsFixedPitch')
|
||||
$fm['IsFixedPitch']=($param=='true');
|
||||
elseif($code=='FontBBox')
|
||||
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
|
||||
elseif($code=='CapHeight')
|
||||
$fm['CapHeight']=(int)$param;
|
||||
elseif($code=='StdVW')
|
||||
$fm['StdVW']=(int)$param;
|
||||
}
|
||||
if(!isset($fm['FontName']))
|
||||
die('FontName not found');
|
||||
if(!empty($map))
|
||||
{
|
||||
if(!isset($widths['.notdef']))
|
||||
$widths['.notdef']=600;
|
||||
if(!isset($widths['Delta']) and isset($widths['increment']))
|
||||
$widths['Delta']=$widths['increment'];
|
||||
//Order widths according to map
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($widths[$map[$i]]))
|
||||
{
|
||||
echo '<B>Warning:</B> character '.$map[$i].' is missing<BR>';
|
||||
$widths[$i]=$widths['.notdef'];
|
||||
}
|
||||
else
|
||||
$widths[$i]=$widths[$map[$i]];
|
||||
}
|
||||
}
|
||||
$fm['Widths']=$widths;
|
||||
return $fm;
|
||||
}
|
||||
|
||||
function MakeFontDescriptor($fm,$symbolic)
|
||||
{
|
||||
//Ascent
|
||||
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
|
||||
$fd="array('Ascent'=>".$asc;
|
||||
//Descent
|
||||
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
|
||||
$fd.=",'Descent'=>".$desc;
|
||||
//CapHeight
|
||||
if(isset($fm['CapHeight']))
|
||||
$ch=$fm['CapHeight'];
|
||||
elseif(isset($fm['CapXHeight']))
|
||||
$ch=$fm['CapXHeight'];
|
||||
else
|
||||
$ch=$asc;
|
||||
$fd.=",'CapHeight'=>".$ch;
|
||||
//Flags
|
||||
$flags=0;
|
||||
if(isset($fm['IsFixedPitch']) and $fm['IsFixedPitch'])
|
||||
$flags+=1<<0;
|
||||
if($symbolic)
|
||||
$flags+=1<<2;
|
||||
if(!$symbolic)
|
||||
$flags+=1<<5;
|
||||
if(isset($fm['ItalicAngle']) and $fm['ItalicAngle']!=0)
|
||||
$flags+=1<<6;
|
||||
$fd.=",'Flags'=>".$flags;
|
||||
//FontBBox
|
||||
if(isset($fm['FontBBox']))
|
||||
$fbb=$fm['FontBBox'];
|
||||
else
|
||||
$fbb=array(0,$des-100,1000,$asc+100);
|
||||
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
|
||||
//ItalicAngle
|
||||
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
|
||||
$fd.=",'ItalicAngle'=>".$ia;
|
||||
//StemV
|
||||
if(isset($fm['StdVW']))
|
||||
$stemv=$fm['StdVW'];
|
||||
elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight']))
|
||||
$stemv=120;
|
||||
else
|
||||
$stemv=70;
|
||||
$fd.=",'StemV'=>".$stemv;
|
||||
//MissingWidth
|
||||
if(isset($fm['MissingWidth']))
|
||||
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
|
||||
$fd.=')';
|
||||
return $fd;
|
||||
}
|
||||
|
||||
function MakeWidthArray($fm)
|
||||
{
|
||||
//Make character width array
|
||||
$s="array(\n\t";
|
||||
$cw=$fm['Widths'];
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(chr($i)=="'")
|
||||
$s.="'\\''";
|
||||
elseif(chr($i)=="\\")
|
||||
$s.="'\\\\'";
|
||||
elseif($i>=32 and $i<=126)
|
||||
$s.="'".chr($i)."'";
|
||||
else
|
||||
$s.="chr($i)";
|
||||
$s.='=>'.$fm['Widths'][$i];
|
||||
if($i<255)
|
||||
$s.=',';
|
||||
if(($i+1)%22==0)
|
||||
$s.="\n\t";
|
||||
}
|
||||
$s.=')';
|
||||
return $s;
|
||||
}
|
||||
|
||||
function MakeFontEncoding($map)
|
||||
{
|
||||
//Build differences from reference encoding
|
||||
$ref=ReadMap('cp1252');
|
||||
$s='';
|
||||
$last=0;
|
||||
for($i=32;$i<=255;$i++)
|
||||
{
|
||||
if($map[$i]!=$ref[$i])
|
||||
{
|
||||
if($i!=$last+1)
|
||||
$s.=$i.' ';
|
||||
$last=$i;
|
||||
$s.='/'.$map[$i].' ';
|
||||
}
|
||||
}
|
||||
return chop($s);
|
||||
}
|
||||
|
||||
function SaveToFile($file,$s,$mode='t')
|
||||
{
|
||||
$f=fopen($file,'w'.$mode);
|
||||
if(!$f)
|
||||
die('Can\'t write to file '.$file);
|
||||
fwrite($f,$s,strlen($s));
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
function ReadShort($f)
|
||||
{
|
||||
$a=unpack('n1n',fread($f,2));
|
||||
return $a['n'];
|
||||
}
|
||||
|
||||
function ReadLong($f)
|
||||
{
|
||||
$a=unpack('N1N',fread($f,4));
|
||||
return $a['N'];
|
||||
}
|
||||
|
||||
function CheckTTF($file)
|
||||
{
|
||||
//Check if font license allows embedding
|
||||
$f=fopen($file,'rb');
|
||||
if(!$f)
|
||||
die('<B>Error:</B> Can\'t open '.$file);
|
||||
//Extract number of tables
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$nb=ReadShort($f);
|
||||
fseek($f,6,SEEK_CUR);
|
||||
//Seek OS/2 table
|
||||
$found=false;
|
||||
for($i=0;$i<$nb;$i++)
|
||||
{
|
||||
if(fread($f,4)=='OS/2')
|
||||
{
|
||||
$found=true;
|
||||
break;
|
||||
}
|
||||
fseek($f,12,SEEK_CUR);
|
||||
}
|
||||
if(!$found)
|
||||
{
|
||||
fclose($f);
|
||||
return;
|
||||
}
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$offset=ReadLong($f);
|
||||
fseek($f,$offset,SEEK_SET);
|
||||
//Extract fsType flags
|
||||
fseek($f,8,SEEK_CUR);
|
||||
$fsType=ReadShort($f);
|
||||
$rl=($fsType & 0x02)!=0;
|
||||
$pp=($fsType & 0x04)!=0;
|
||||
$e=($fsType & 0x08)!=0;
|
||||
fclose($f);
|
||||
if($rl and !$pp and !$e)
|
||||
echo '<B>Warning:</B> font license does not allow embedding';
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* $fontfile: path to TTF file (or empty string if not to be embedded) *
|
||||
* $afmfile: path to AFM file *
|
||||
* $enc: font encoding (or empty string for symbolic fonts) *
|
||||
* $patch: optional patch for encoding *
|
||||
* $type : font type if $fontfile is empty *
|
||||
*******************************************************************************/
|
||||
function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueType')
|
||||
{
|
||||
//Generate a font definition file
|
||||
set_magic_quotes_runtime(0);
|
||||
if($enc)
|
||||
{
|
||||
$map=ReadMap($enc);
|
||||
foreach($patch as $cc=>$gn)
|
||||
$map[$cc]=$gn;
|
||||
}
|
||||
else
|
||||
$map=array();
|
||||
if(!file_exists($afmfile))
|
||||
die('<B>Error:</B> AFM file not found: '.$afmfile);
|
||||
$fm=ReadAFM($afmfile,$map);
|
||||
if($enc)
|
||||
$diff=MakeFontEncoding($map);
|
||||
else
|
||||
$diff='';
|
||||
$fd=MakeFontDescriptor($fm,empty($map));
|
||||
//Find font type
|
||||
if($fontfile)
|
||||
{
|
||||
$ext=strtolower(substr($fontfile,-3));
|
||||
if($ext=='ttf')
|
||||
$type='TrueType';
|
||||
elseif($ext=='pfb')
|
||||
$type='Type1';
|
||||
else
|
||||
die('<B>Error:</B> unrecognized font file extension: '.$ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($type!='TrueType' and $type!='Type1')
|
||||
die('<B>Error:</B> incorrect font type: '.$type);
|
||||
}
|
||||
//Start generation
|
||||
$s='<?php'."\n";
|
||||
$s.='$type=\''.$type."';\n";
|
||||
$s.='$name=\''.$fm['FontName']."';\n";
|
||||
$s.='$desc='.$fd.";\n";
|
||||
if(!isset($fm['UnderlinePosition']))
|
||||
$fm['UnderlinePosition']=-100;
|
||||
if(!isset($fm['UnderlineThickness']))
|
||||
$fm['UnderlineThickness']=50;
|
||||
$s.='$up='.$fm['UnderlinePosition'].";\n";
|
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n";
|
||||
$w=MakeWidthArray($fm);
|
||||
$s.='$cw='.$w.";\n";
|
||||
$s.='$enc=\''.$enc."';\n";
|
||||
$s.='$diff=\''.$diff."';\n";
|
||||
$basename=substr(basename($afmfile),0,-4);
|
||||
if($fontfile)
|
||||
{
|
||||
//Embedded font
|
||||
if(!file_exists($fontfile))
|
||||
die('<B>Error:</B> font file not found: '.$fontfile);
|
||||
if($type=='TrueType')
|
||||
CheckTTF($fontfile);
|
||||
$f=fopen($fontfile,'rb');
|
||||
if(!$f)
|
||||
die('<B>Error:</B> Can\'t open '.$fontfile);
|
||||
$file=fread($f,filesize($fontfile));
|
||||
fclose($f);
|
||||
if($type=='Type1')
|
||||
{
|
||||
//Find first two sections and discard third one
|
||||
$pos=strpos($file,'eexec');
|
||||
if(!$pos)
|
||||
die('<B>Error:</B> font file does not seem to be valid Type1');
|
||||
$size1=$pos+6;
|
||||
$pos=strpos($file,'00000000');
|
||||
if(!$pos)
|
||||
die('<B>Error:</B> font file does not seem to be valid Type1');
|
||||
$size2=$pos-$size1;
|
||||
$file=substr($file,0,$size1+$size2);
|
||||
}
|
||||
if(function_exists('gzcompress'))
|
||||
{
|
||||
$cmp=$basename.'.z';
|
||||
SaveToFile($cmp,gzcompress($file),'b');
|
||||
$s.='$file=\''.$cmp."';\n";
|
||||
echo 'Font file compressed ('.$cmp.')<BR>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='$file=\''.basename($fontfile)."';\n";
|
||||
echo '<B>Notice:</B> font file could not be compressed (gzcompress not available)<BR>';
|
||||
}
|
||||
if($type=='Type1')
|
||||
{
|
||||
$s.='$size1='.$size1.";\n";
|
||||
$s.='$size2='.$size2.";\n";
|
||||
}
|
||||
else
|
||||
$s.='$originalsize='.filesize($fontfile).";\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not embedded font
|
||||
$s.='$file='."'';\n";
|
||||
}
|
||||
$s.="?>\n";
|
||||
SaveToFile($basename.'.php',$s);
|
||||
echo 'Font definition file generated ('.$basename.'.php'.')<BR>';
|
||||
}
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/symbol.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/symbol.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/times.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/times.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/timesb.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/timesb.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/timesbi.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/timesbi.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/timesi.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/timesi.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/zapfdingbats.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf-3.0.2b/font/zapfdingbats.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
2325
modules/EcmProductB2Bs/html2fpdf-3.0.2b/fpdf.php
Executable file
2325
modules/EcmProductB2Bs/html2fpdf-3.0.2b/fpdf.php
Executable file
File diff suppressed because it is too large
Load Diff
1083
modules/EcmProductB2Bs/html2fpdf-3.0.2b/gif.php
Executable file
1083
modules/EcmProductB2Bs/html2fpdf-3.0.2b/gif.php
Executable file
File diff suppressed because it is too large
Load Diff
2910
modules/EcmProductB2Bs/html2fpdf-3.0.2b/html2fpdf.php
Executable file
2910
modules/EcmProductB2Bs/html2fpdf-3.0.2b/html2fpdf.php
Executable file
File diff suppressed because it is too large
Load Diff
253
modules/EcmProductB2Bs/html2fpdf-3.0.2b/htmltoolkit.php
Executable file
253
modules/EcmProductB2Bs/html2fpdf-3.0.2b/htmltoolkit.php
Executable file
@@ -0,0 +1,253 @@
|
||||
<?php
|
||||
/*
|
||||
This script is supposed to be used together with the HTML2FPDF.php class
|
||||
Copyright (C) 2004-2005 Renato Coelho
|
||||
*/
|
||||
|
||||
function ConvertColor($color="#000000"){
|
||||
//returns an associative array (keys: R,G,B) from html code (e.g. #3FE5AA)
|
||||
|
||||
//W3C approved color array (disabled)
|
||||
//static $common_colors = array('black'=>'#000000','silver'=>'#C0C0C0','gray'=>'#808080', 'white'=>'#FFFFFF','maroon'=>'#800000','red'=>'#FF0000','purple'=>'#800080','fuchsia'=>'#FF00FF','green'=>'#008000','lime'=>'#00FF00','olive'=>'#808000','yellow'=>'#FFFF00','navy'=>'#000080', 'blue'=>'#0000FF','teal'=>'#008080','aqua'=>'#00FFFF');
|
||||
//All color names array
|
||||
static $common_colors = array('antiquewhite'=>'#FAEBD7','aquamarine'=>'#7FFFD4','beige'=>'#F5F5DC','black'=>'#000000','blue'=>'#0000FF','brown'=>'#A52A2A','cadetblue'=>'#5F9EA0','chocolate'=>'#D2691E','cornflowerblue'=>'#6495ED','crimson'=>'#DC143C','darkblue'=>'#00008B','darkgoldenrod'=>'#B8860B','darkgreen'=>'#006400','darkmagenta'=>'#8B008B','darkorange'=>'#FF8C00','darkred'=>'#8B0000','darkseagreen'=>'#8FBC8F','darkslategray'=>'#2F4F4F','darkviolet'=>'#9400D3','deepskyblue'=>'#00BFFF','dodgerblue'=>'#1E90FF','firebrick'=>'#B22222','forestgreen'=>'#228B22','gainsboro'=>'#DCDCDC','gold'=>'#FFD700','gray'=>'#808080','green'=>'#008000','greenyellow'=>'#ADFF2F','hotpink'=>'#FF69B4','indigo'=>'#4B0082','khaki'=>'#F0E68C','lavenderblush'=>'#FFF0F5','lemonchiffon'=>'#FFFACD','lightcoral'=>'#F08080','lightgoldenrodyellow'=>'#FAFAD2','lightgreen'=>'#90EE90','lightsalmon'=>'#FFA07A','lightskyblue'=>'#87CEFA','lightslategray'=>'#778899','lightyellow'=>'#FFFFE0','limegreen'=>'#32CD32','magenta'=>'#FF00FF','mediumaquamarine'=>'#66CDAA','mediumorchid'=>'#BA55D3','mediumseagreen'=>'#3CB371','mediumspringgreen'=>'#00FA9A','mediumvioletred'=>'#C71585','mintcream'=>'#F5FFFA','moccasin'=>'#FFE4B5','navy'=>'#000080','olive'=>'#808000','orange'=>'#FFA500','orchid'=>'#DA70D6','palegreen'=>'#98FB98','palevioletred'=>'#D87093','peachpuff'=>'#FFDAB9','pink'=>'#FFC0CB','powderblue'=>'#B0E0E6','red'=>'#FF0000','royalblue'=>'#4169E1','salmon'=>'#FA8072','seagreen'=>'#2E8B57','sienna'=>'#A0522D','skyblue'=>'#87CEEB','slategray'=>'#708090','springgreen'=>'#00FF7F','tan'=>'#D2B48C','thistle'=>'#D8BFD8','turquoise'=>'#40E0D0','violetred'=>'#D02090','white'=>'#FFFFFF','yellow'=>'#FFFF00');
|
||||
//http://www.w3schools.com/css/css_colornames.asp
|
||||
if ( ($color{0} != '#') and ( strstr($color,'(') === false ) ) $color = $common_colors[strtolower($color)];
|
||||
|
||||
if ($color{0} == '#') //case of #nnnnnn or #nnn
|
||||
{
|
||||
$cor = strtoupper($color);
|
||||
if (strlen($cor) == 4) // Turn #RGB into #RRGGBB
|
||||
{
|
||||
$cor = "#" . $cor{1} . $cor{1} . $cor{2} . $cor{2} . $cor{3} . $cor{3};
|
||||
}
|
||||
$R = substr($cor, 1, 2);
|
||||
$vermelho = hexdec($R);
|
||||
$V = substr($cor, 3, 2);
|
||||
$verde = hexdec($V);
|
||||
$B = substr($cor, 5, 2);
|
||||
$azul = hexdec($B);
|
||||
$color = array();
|
||||
$color['R']=$vermelho;
|
||||
$color['G']=$verde;
|
||||
$color['B']=$azul;
|
||||
}
|
||||
else //case of RGB(r,g,b)
|
||||
{
|
||||
$color = str_replace("rgb(",'',$color); //remove <20>rgb(<28>
|
||||
$color = str_replace("RGB(",'',$color); //remove <20>RGB(<28> -- PHP < 5 does not have str_ireplace
|
||||
$color = str_replace(")",'',$color); //remove <20>)<29>
|
||||
$cores = explode(",", $color);
|
||||
$color = array();
|
||||
$color['R']=$cores[0];
|
||||
$color['G']=$cores[1];
|
||||
$color['B']=$cores[2];
|
||||
}
|
||||
if (empty($color)) return array('R'=>255,'G'=>255,'B'=>255);
|
||||
else return $color; // array['R']['G']['B']
|
||||
}
|
||||
|
||||
function ConvertSize($size=5,$maxsize=0){
|
||||
// Depends of maxsize value to make % work properly. Usually maxsize == pagewidth
|
||||
//Identify size (remember: we are using 'mm' units here)
|
||||
if ( stristr($size,'px') ) $size *= 0.2645; //pixels
|
||||
elseif ( stristr($size,'cm') ) $size *= 10; //centimeters
|
||||
elseif ( stristr($size,'mm') ) $size += 0; //millimeters
|
||||
elseif ( stristr($size,'in') ) $size *= 25.4; //inches
|
||||
elseif ( stristr($size,'pc') ) $size *= 38.1/9; //PostScript picas
|
||||
elseif ( stristr($size,'pt') ) $size *= 25.4/72; //72dpi
|
||||
elseif ( stristr($size,'%') )
|
||||
{
|
||||
$size += 0; //make "90%" become simply "90"
|
||||
$size *= $maxsize/100;
|
||||
}
|
||||
else $size *= 0.2645; //nothing == px
|
||||
|
||||
return $size;
|
||||
}
|
||||
|
||||
function value_entity_decode($html)
|
||||
{
|
||||
//replace each value entity by its respective char
|
||||
preg_match_all('|&#(.*?);|',$html,$temparray);
|
||||
foreach($temparray[1] as $val) $html = str_replace("&#".$val.";",chr($val),$html);
|
||||
return $html;
|
||||
}
|
||||
|
||||
function lesser_entity_decode($html)
|
||||
{
|
||||
//supports the most used entity codes
|
||||
$html = str_replace(" "," ",$html);
|
||||
$html = str_replace("&","&",$html);
|
||||
$html = str_replace("<","<",$html);
|
||||
$html = str_replace(">",">",$html);
|
||||
$html = str_replace("«","<EFBFBD>",$html);
|
||||
$html = str_replace("»","<EFBFBD>",$html);
|
||||
$html = str_replace("¶","<EFBFBD>",$html);
|
||||
$html = str_replace("€","<EFBFBD>",$html);
|
||||
$html = str_replace("™","<EFBFBD>",$html);
|
||||
$html = str_replace("©","<EFBFBD>",$html);
|
||||
$html = str_replace("®","<EFBFBD>",$html);
|
||||
$html = str_replace("±","<EFBFBD>",$html);
|
||||
$html = str_replace("˜","~",$html);
|
||||
$html = str_replace("ˆ","^",$html);
|
||||
$html = str_replace(""",'"',$html);
|
||||
$html = str_replace("‰","<EFBFBD>",$html);
|
||||
$html = str_replace("‡","<EFBFBD>",$html);
|
||||
$html = str_replace("†","<EFBFBD>",$html);
|
||||
return $html;
|
||||
}
|
||||
|
||||
function AdjustHTML($html,$usepre=true)
|
||||
{
|
||||
//Try to make the html text more manageable (turning it into XHTML)
|
||||
|
||||
//Remove javascript code from HTML (should not appear in the PDF file)
|
||||
$regexp = '|<script.*?</script>|si';
|
||||
$html = preg_replace($regexp,'',$html);
|
||||
|
||||
$html = str_replace("\r\n","\n",$html); //replace carriagereturn-linefeed-combo by a simple linefeed
|
||||
$html = str_replace("\f",'',$html); //replace formfeed by nothing
|
||||
$html = str_replace("\r",'',$html); //replace carriage return by nothing
|
||||
if ($usepre) //used to keep \n on content inside <pre> and inside <textarea>
|
||||
{
|
||||
// Preserve '\n's in content between the tags <pre> and </pre>
|
||||
$regexp = '#<pre(.*?)>(.+?)</pre>#si';
|
||||
$thereispre = preg_match_all($regexp,$html,$temp);
|
||||
// Preserve '\n's in content between the tags <textarea> and </textarea>
|
||||
$regexp2 = '#<textarea(.*?)>(.+?)</textarea>#si';
|
||||
$thereistextarea = preg_match_all($regexp2,$html,$temp2);
|
||||
$html = str_replace("\n",' ',$html); //replace linefeed by spaces
|
||||
$html = str_replace("\t",' ',$html); //replace tabs by spaces
|
||||
$regexp3 = '#\s{2,}#s'; // turn 2+ consecutive spaces into one
|
||||
$html = preg_replace($regexp3,' ',$html);
|
||||
$iterator = 0;
|
||||
while($thereispre) //Recover <pre attributes>content</pre>
|
||||
{
|
||||
$temp[2][$iterator] = str_replace("\n","<br>",$temp[2][$iterator]);
|
||||
$html = preg_replace($regexp,'<erp'.$temp[1][$iterator].'>'.$temp[2][$iterator].'</erp>',$html,1);
|
||||
$thereispre--;
|
||||
$iterator++;
|
||||
}
|
||||
$iterator = 0;
|
||||
while($thereistextarea) //Recover <textarea attributes>content</textarea>
|
||||
{
|
||||
$temp2[2][$iterator] = str_replace(" "," ",$temp2[2][$iterator]);
|
||||
$html = preg_replace($regexp2,'<aeratxet'.$temp2[1][$iterator].'>'.trim($temp2[2][$iterator]).'</aeratxet>',$html,1);
|
||||
$thereistextarea--;
|
||||
$iterator++;
|
||||
}
|
||||
//Restore original tag names
|
||||
$html = str_replace("<erp","<pre",$html);
|
||||
$html = str_replace("</erp>","</pre>",$html);
|
||||
$html = str_replace("<aeratxet","<textarea",$html);
|
||||
$html = str_replace("</aeratxet>","</textarea>",$html);
|
||||
// (the code above might slowdown overall performance?)
|
||||
} //end of if($usepre)
|
||||
else
|
||||
{
|
||||
$html = str_replace("\n",' ',$html); //replace linefeed by spaces
|
||||
$html = str_replace("\t",' ',$html); //replace tabs by spaces
|
||||
$regexp = '/\\s{2,}/s'; // turn 2+ consecutive spaces into one
|
||||
$html = preg_replace($regexp,' ',$html);
|
||||
}
|
||||
// remove redundant <br>'s before </div>, avoiding huge leaps between text blocks
|
||||
// such things appear on computer-generated HTML code
|
||||
$regexp = '/(<br[ \/]?[\/]?>)+?<\/div>/si'; //<?//fix PSPAD highlight bug
|
||||
$html = preg_replace($regexp,'</div>',$html);
|
||||
return $html;
|
||||
}
|
||||
|
||||
function dec2alpha($valor,$toupper="true"){
|
||||
// returns a string from A-Z to AA-ZZ to AAA-ZZZ
|
||||
// OBS: A = 65 ASCII TABLE VALUE
|
||||
if (($valor < 1) || ($valor > 18278)) return "?"; //supports 'only' up to 18278
|
||||
$c1 = $c2 = $c3 = '';
|
||||
if ($valor > 702) // 3 letters (up to 18278)
|
||||
{
|
||||
$c1 = 65 + floor(($valor-703)/676);
|
||||
$c2 = 65 + floor((($valor-703)%676)/26);
|
||||
$c3 = 65 + floor((($valor-703)%676)%26);
|
||||
}
|
||||
elseif ($valor > 26) // 2 letters (up to 702)
|
||||
{
|
||||
$c1 = (64 + (int)(($valor-1) / 26));
|
||||
$c2 = (64 + (int)($valor % 26));
|
||||
if ($c2 == 64) $c2 += 26;
|
||||
}
|
||||
else // 1 letter (up to 26)
|
||||
{
|
||||
$c1 = (64 + $valor);
|
||||
}
|
||||
$alpha = chr($c1);
|
||||
if ($c2 != '') $alpha .= chr($c2);
|
||||
if ($c3 != '') $alpha .= chr($c3);
|
||||
if (!$toupper) $alpha = strtolower($alpha);
|
||||
return $alpha;
|
||||
}
|
||||
|
||||
function dec2roman($valor,$toupper=true){
|
||||
//returns a string as a roman numeral
|
||||
if (($valor >= 5000) || ($valor < 1)) return "?"; //supports 'only' up to 4999
|
||||
$aux = (int)($valor/1000);
|
||||
if ($aux!==0)
|
||||
{
|
||||
$valor %= 1000;
|
||||
while($aux!==0)
|
||||
{
|
||||
$r1 .= "M";
|
||||
$aux--;
|
||||
}
|
||||
}
|
||||
$aux = (int)($valor/100);
|
||||
if ($aux!==0)
|
||||
{
|
||||
$valor %= 100;
|
||||
switch($aux){
|
||||
case 3: $r2="C";
|
||||
case 2: $r2.="C";
|
||||
case 1: $r2.="C"; break;
|
||||
case 9: $r2="CM"; break;
|
||||
case 8: $r2="C";
|
||||
case 7: $r2.="C";
|
||||
case 6: $r2.="C";
|
||||
case 5: $r2="D".$r2; break;
|
||||
case 4: $r2="CD"; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
$aux = (int)($valor/10);
|
||||
if ($aux!==0)
|
||||
{
|
||||
$valor %= 10;
|
||||
switch($aux){
|
||||
case 3: $r3="X";
|
||||
case 2: $r3.="X";
|
||||
case 1: $r3.="X"; break;
|
||||
case 9: $r3="XC"; break;
|
||||
case 8: $r3="X";
|
||||
case 7: $r3.="X";
|
||||
case 6: $r3.="X";
|
||||
case 5: $r3="L".$r3; break;
|
||||
case 4: $r3="XL"; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
switch($valor){
|
||||
case 3: $r4="I";
|
||||
case 2: $r4.="I";
|
||||
case 1: $r4.="I"; break;
|
||||
case 9: $r4="IX"; break;
|
||||
case 8: $r4="I";
|
||||
case 7: $r4.="I";
|
||||
case 6: $r4.="I";
|
||||
case 5: $r4="V".$r4; break;
|
||||
case 4: $r4="IV"; break;
|
||||
default: break;
|
||||
}
|
||||
$roman = $r1.$r2.$r3.$r4;
|
||||
if (!$toupper) $roman = strtolower($roman);
|
||||
return $roman;
|
||||
}
|
||||
|
||||
?>
|
||||
228
modules/EcmProductB2Bs/html2fpdf-3.0.2b/source2doc.php
Executable file
228
modules/EcmProductB2Bs/html2fpdf-3.0.2b/source2doc.php
Executable file
@@ -0,0 +1,228 @@
|
||||
<?php
|
||||
/*
|
||||
Copyright (C) 2004 Renato Coelho
|
||||
(PHP)Source 2 Doc v0.5.0
|
||||
This is a simple script created in order to update the HTML2FPDF page
|
||||
It should make a php class documentation
|
||||
LICENSE: Freeware.
|
||||
Lacks: html_decode and the likes
|
||||
Plans: make an independent table for each part?
|
||||
|
||||
Usage:
|
||||
|
||||
require_once('source2doc.php');
|
||||
echo source2doc('filename.php'); //Print doc info on browser
|
||||
|
||||
HOW TO declare var types and HOW TO use @return and @desc: (//! is a one-line comment)
|
||||
|
||||
var $name; //! type
|
||||
|
||||
function name()
|
||||
{
|
||||
//! @return void
|
||||
//! @desc Say something in one line, but dont use tags or ';' here
|
||||
//! @desc Fale algo em uma linha, mas nao use tags ou ';' aqui
|
||||
...}
|
||||
|
||||
*/
|
||||
|
||||
function source2doc($filename)
|
||||
{
|
||||
define('endl',"\n");
|
||||
$classname = '';
|
||||
$extends = '';
|
||||
|
||||
$file = fopen($filename,"r");
|
||||
$tamarquivo = filesize($filename);
|
||||
$buffer = fread($file, $tamarquivo);
|
||||
fclose($file);
|
||||
|
||||
////
|
||||
// Remove all PHP comments
|
||||
// Leave only the special comments '//!'
|
||||
////
|
||||
|
||||
//Remove /* multi-line comments */
|
||||
$regexp = '|/\\*.*?\\*/|s';
|
||||
$buffer = preg_replace($regexp,'',$buffer);
|
||||
//Remove // one line comments
|
||||
$regexp = '|//[^!].*|m';
|
||||
$buffer = preg_replace($regexp,'',$buffer);
|
||||
|
||||
////
|
||||
// Get class name and what it extends (or not)
|
||||
////
|
||||
|
||||
$regexp = '|class\\s+?(\\S+)(\\s+?\\S+\\s+?(\\S+))?|mi';
|
||||
preg_match($regexp,$buffer,$aux); //one class per source file
|
||||
|
||||
$classname = $aux[1];
|
||||
if (!empty($aux[3])) $extends = $aux[3];
|
||||
else $extends = '';
|
||||
|
||||
$html = '<b>CLASSNAME:</b> ' . $classname . '<br />' . endl;
|
||||
if ($extends != '') $html .= '<b>EXTENDS:</b> ' . $extends . '<br />' . endl;
|
||||
$html .= '<table border="1" width="100%">' . endl;
|
||||
|
||||
////
|
||||
// Get constants from source code
|
||||
////
|
||||
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<th bgcolor="#6191ff" colspan="2">' . endl;
|
||||
$html .= 'CONSTANTS' . endl;
|
||||
$html .= '</th>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
|
||||
$regexp = '/define[(](.*?);/si';
|
||||
preg_match_all($regexp,$buffer,$const);
|
||||
|
||||
$const = $const[0];
|
||||
for($i=0; $i < count($const) ; $i++)
|
||||
{
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<td colspan="2">' . endl;
|
||||
$html .= '<font size=2>' . $const[$i] . '</font>' .endl;
|
||||
$html .= '</td>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
}
|
||||
|
||||
////
|
||||
// Get imports from source code
|
||||
////
|
||||
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<th bgcolor="#6191ff" colspan="2">' . endl;
|
||||
$html .= 'IMPORTS' . endl;
|
||||
$html .= '</th>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
|
||||
$regexp = '/((require|include)[(_].*?);/si';
|
||||
preg_match_all($regexp,$buffer,$imports);
|
||||
|
||||
$imports = $imports[0];
|
||||
for($i=0; $i < count($imports) ; $i++)
|
||||
{
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<td colspan="2">' . endl;
|
||||
$html .= '<font size=2>' . $imports[$i] . '</font>' .endl;
|
||||
$html .= '</td>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
}
|
||||
|
||||
////
|
||||
// Get attributes from class
|
||||
////
|
||||
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<th bgcolor="#6191ff" colspan="2">' . endl;
|
||||
$html .= 'ATTRIBUTES' . endl;
|
||||
$html .= '</th>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
|
||||
$regexp = '|var\\s(.+);\\s*(//!\\s*?(\\S+))?|mi';
|
||||
preg_match_all($regexp,$buffer,$atr);
|
||||
|
||||
$vname = $atr[1];
|
||||
$vtype = $atr[3];
|
||||
|
||||
if(!empty($vname))
|
||||
{
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<td align="center" width="10%" bgcolor="#bbbbbb">' . endl;
|
||||
$html .= 'TYPE' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
$html .= '<td align="center" width="90%" bgcolor="#bbbbbb">' . endl;
|
||||
$html .= 'NAME' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
}
|
||||
|
||||
for($i=0; $i < count($vname) ; $i++)
|
||||
{
|
||||
$html .= '<tr>' . endl;
|
||||
|
||||
$html .= '<td align="center">' . endl;
|
||||
if (empty($vtype[$i])) $html .= '<font size=2><i>(???)</i></font>' . endl;
|
||||
else $html .= '<font size=2><i>('. $vtype[$i] .')</i></font>' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
|
||||
$html .= '<td>' . endl;
|
||||
$html .= '<font size=2><b>var</b> ' . $vname[$i] . ';</font>' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
}
|
||||
|
||||
/////
|
||||
// Get class' methods
|
||||
/////
|
||||
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<th bgcolor="#6191ff" colspan="2">' . endl;
|
||||
$html .= 'METHODS' . endl;
|
||||
$html .= '</th>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
|
||||
$regexp = '|function\\s([^)]*)[)].*?(//!.*?)*;|si';
|
||||
preg_match_all($regexp,$buffer,$func);
|
||||
|
||||
$funcname = $func[1];
|
||||
$funccomment = $func[0];
|
||||
|
||||
for($i=0; $i < count($funcname) ; $i++)
|
||||
{
|
||||
$html .= '<tr>' . endl;
|
||||
$html .= '<td bgcolor="#33ff99" colspan="2">' . endl;
|
||||
$html .= '<font size=2><b>function</b> ' . $funcname[$i] . ')</font>' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
$html .= '</tr>' . endl;
|
||||
|
||||
$desc = '';
|
||||
$ret = '';
|
||||
$regexp = '|//!(.*)|mi';
|
||||
preg_match_all($regexp,$funccomment[$i],$temp);
|
||||
$temp = $temp[1];
|
||||
|
||||
if (empty($temp[0])) continue;
|
||||
foreach($temp as $val)
|
||||
{
|
||||
if (strstr($val,'@desc'))
|
||||
{
|
||||
$regexp = '|.*?@desc(.*)|si';
|
||||
preg_match($regexp,$val,$temp2);
|
||||
$desc = $temp2[1];
|
||||
}
|
||||
elseif (strstr($val,'@return'))
|
||||
{
|
||||
$regexp = '|.*?@return(.*)|si';
|
||||
preg_match($regexp,$val,$temp3);
|
||||
$ret = $temp3[1];
|
||||
}
|
||||
}
|
||||
if ($ret != '' or $desc != '')
|
||||
{
|
||||
$html .= '<tr>' . endl;
|
||||
|
||||
//@return column
|
||||
$html .= '<td width="30%">' . endl;
|
||||
if ($ret == '') $html .= '<font size=2><b>Return:</b> <i>?void?</i></font>' . endl;
|
||||
else $html .= '<font size=2><b>Return:</b> <i>' . trim($ret) . '</i></font>' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
//@desc column
|
||||
$html .= '<td width="70%">' . endl;
|
||||
if ($desc == '') $html .= '<font size=2><b>OBS:</b> </font>' . endl;
|
||||
else $html .= '<font size=2><b>OBS:</b> ' . trim($desc) . '</font>' . endl;
|
||||
$html .= '</td>' . endl;
|
||||
|
||||
$html .= '</tr>' . endl;
|
||||
}
|
||||
}
|
||||
|
||||
/////
|
||||
|
||||
$html .= '</table>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/248934_arial.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/248934_arial.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='ArialMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -283 979 896]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>375,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>615,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='248934_arial.z';
|
||||
$size1=5917;
|
||||
$size2=25247;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf/font/248934_arial1.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf/font/248934_arial1.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='ArialMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-664 -325 2000 1006]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>375,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>615,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='248934_arial.z';
|
||||
$originalsize=367112;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/248934_arialbd.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/248934_arialbd.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-BoldMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -319 972 919]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>385,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>719,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='248934_arialbd.z';
|
||||
$size1=5932;
|
||||
$size2=25747;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf/font/248934_arialbd1.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf/font/248934_arialbd1.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='Arial-BoldMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-627 -376 2000 1010]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>385,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>719,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='248934_arialbd.z';
|
||||
$originalsize=352224;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/248934_ariali.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/248934_ariali.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-ItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-121 -275 1062 894]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>281,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>354,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>625,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='248934_ariali.z';
|
||||
$size1=5942;
|
||||
$size2=26173;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf/font/248934_ariali1.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf/font/248934_ariali1.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='Arial-ItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-517 -325 1082 998]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>281,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>354,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>625,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='248934_ariali.z';
|
||||
$originalsize=207808;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/873326_arialbi.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/873326_arialbi.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-BoldItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-109 -298 1068 905]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>396,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>740,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='873326_arialbi.z';
|
||||
$size1=5962;
|
||||
$size2=26288;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf/font/873326_arialbi1.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf/font/873326_arialbi1.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='Arial-BoldItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-560 -376 1157 1000]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>396,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>740,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='873326_arialbi.z';
|
||||
$originalsize=226748;
|
||||
?>
|
||||
24
modules/EcmProductB2Bs/html2fpdf/font/arialzpl.php
Executable file
24
modules/EcmProductB2Bs/html2fpdf/font/arialzpl.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$type='TrueType';
|
||||
$name='Arial-BoldMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-627 -376 2000 1010]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>385,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>719,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdot 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdot /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dslash /Nacute /Ncaron 213 /Odblacute 216 /Rcaron /Uring 219 /Udblacute 222 /Tcedilla 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dmacron /nacute /ncaron 245 /odblacute 248 /rcaron /uring 251 /udblacute 254 /tcedilla /dotaccent';
|
||||
$file='arialzpl.z';
|
||||
$originalsize=352224;
|
||||
?>
|
||||
7
modules/EcmProductB2Bs/html2fpdf/font/courier.php
Executable file
7
modules/EcmProductB2Bs/html2fpdf/font/courier.php
Executable file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
for($i=0;$i<=255;$i++)
|
||||
$fpdf_charwidths['courier'][chr($i)]=600;
|
||||
$fpdf_charwidths['courierB']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierI']=$fpdf_charwidths['courier'];
|
||||
$fpdf_charwidths['courierBI']=$fpdf_charwidths['courier'];
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/helvetica.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/helvetica.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helvetica']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/helveticab.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/helveticab.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaB']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/helveticabi.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/helveticabi.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaBI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/helveticai.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/helveticai.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['helveticaI']=array(
|
||||
chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
|
||||
chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
|
||||
chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialbdpl.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialbdpl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-BoldMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -319 972 919]','ItalicAngle'=>0,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>385,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>719,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialbdpl.z';
|
||||
$size1=5932;
|
||||
$size2=25747;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialbipl.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialbipl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-BoldItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-109 -298 1068 905]','ItalicAngle'=>-12,'StemV'=>120,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=105;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
|
||||
'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
|
||||
'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>722,chr(162)=>333,chr(163)=>611,chr(164)=>556,chr(165)=>611,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>278,chr(180)=>333,chr(181)=>396,chr(182)=>556,chr(183)=>333,chr(184)=>333,chr(185)=>556,chr(186)=>556,chr(187)=>479,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>611,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>389,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>278,chr(230)=>556,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>740,chr(240)=>611,chr(241)=>611,
|
||||
chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>549,chr(248)=>389,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>333,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialbipl.z';
|
||||
$size1=5962;
|
||||
$size2=26288;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialipl.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialipl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='Arial-ItalicMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>96,'FontBBox'=>'[-121 -275 1062 894]','ItalicAngle'=>-12,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>281,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>354,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>625,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialipl.z';
|
||||
$size1=5942;
|
||||
$size2=26173;
|
||||
?>
|
||||
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialpl.php
Executable file
25
modules/EcmProductB2Bs/html2fpdf/font/makefont/arialpl.php
Executable file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
$type='Type1';
|
||||
$name='ArialMT';
|
||||
$desc=array('Ascent'=>905,'Descent'=>-212,'CapHeight'=>716,'Flags'=>32,'FontBBox'=>'[-46 -283 979 896]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>750);
|
||||
$up=-106;
|
||||
$ut=73;
|
||||
$cw=array(
|
||||
chr(0)=>750,chr(1)=>750,chr(2)=>750,chr(3)=>750,chr(4)=>750,chr(5)=>750,chr(6)=>750,chr(7)=>750,chr(8)=>750,chr(9)=>750,chr(10)=>750,chr(11)=>750,chr(12)=>750,chr(13)=>750,chr(14)=>750,chr(15)=>750,chr(16)=>750,chr(17)=>750,chr(18)=>750,chr(19)=>750,chr(20)=>750,chr(21)=>750,
|
||||
chr(22)=>750,chr(23)=>750,chr(24)=>750,chr(25)=>750,chr(26)=>750,chr(27)=>750,chr(28)=>750,chr(29)=>750,chr(30)=>750,chr(31)=>750,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
|
||||
','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
|
||||
'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
|
||||
'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>750,chr(128)=>750,chr(129)=>750,chr(130)=>750,chr(131)=>750,
|
||||
chr(132)=>750,chr(133)=>750,chr(134)=>750,chr(135)=>750,chr(136)=>750,chr(137)=>750,chr(138)=>750,chr(139)=>750,chr(140)=>750,chr(141)=>750,chr(142)=>750,chr(143)=>750,chr(144)=>750,chr(145)=>750,chr(146)=>750,chr(147)=>750,chr(148)=>750,chr(149)=>750,chr(150)=>750,chr(151)=>750,chr(152)=>750,chr(153)=>750,
|
||||
chr(154)=>750,chr(155)=>750,chr(156)=>750,chr(157)=>750,chr(158)=>750,chr(159)=>750,chr(160)=>278,chr(161)=>667,chr(162)=>333,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>667,chr(167)=>556,chr(168)=>333,chr(169)=>667,chr(170)=>667,chr(171)=>611,chr(172)=>611,chr(173)=>333,chr(174)=>611,chr(175)=>611,
|
||||
chr(176)=>400,chr(177)=>556,chr(178)=>333,chr(179)=>222,chr(180)=>333,chr(181)=>292,chr(182)=>500,chr(183)=>333,chr(184)=>333,chr(185)=>500,chr(186)=>500,chr(187)=>375,chr(188)=>500,chr(189)=>333,chr(190)=>500,chr(191)=>500,chr(192)=>722,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>556,
|
||||
chr(198)=>722,chr(199)=>722,chr(200)=>722,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>667,chr(205)=>278,chr(206)=>278,chr(207)=>722,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>667,chr(222)=>611,chr(223)=>611,chr(224)=>333,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>222,chr(230)=>500,chr(231)=>500,chr(232)=>500,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>556,chr(237)=>278,chr(238)=>278,chr(239)=>615,chr(240)=>556,chr(241)=>556,
|
||||
chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>549,chr(248)=>333,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>278,chr(255)=>333);
|
||||
$enc='iso-8859-2';
|
||||
$diff='128 /.notdef 130 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 142 /.notdef 145 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 158 /.notdef /.notdef 161 /Aogonek /breve /Lslash 165 /Lcaron /Sacute 169 /Scaron /Scedilla /Tcaron /Zacute 174 /Zcaron /Zdotaccent 177 /aogonek /ogonek /lslash 181 /lcaron /sacute /caron 185 /scaron /scedilla /tcaron /zacute /hungarumlaut /zcaron /zdotaccent /Racute 195 /Abreve 197 /Lacute /Cacute 200 /Ccaron 202 /Eogonek 204 /Ecaron 207 /Dcaron /Dcroat /Nacute /Ncaron 213 /Ohungarumlaut 216 /Rcaron /Uring 219 /Uhungarumlaut 222 /Tcommaaccent 224 /racute 227 /abreve 229 /lacute /cacute 232 /ccaron 234 /eogonek 236 /ecaron 239 /dcaron /dcroat /nacute /ncaron 245 /ohungarumlaut 248 /rcaron /uring 251 /uhungarumlaut 254 /tcommaaccent /dotaccent';
|
||||
$file='arialpl.z';
|
||||
$size1=5917;
|
||||
$size2=25247;
|
||||
?>
|
||||
6
modules/EcmProductB2Bs/html2fpdf/font/makefont/make.php
Executable file
6
modules/EcmProductB2Bs/html2fpdf/font/makefont/make.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
require("makefont.php");
|
||||
Makefont("arialbdpl.pfb", "arialbdpl.afm", "iso-8859-2");
|
||||
Makefont("arialbipl.pfb", "arialbipl.afm", "iso-8859-2");
|
||||
Makefont("arialipl.pfb", "arialipl.afm", "iso-8859-2");
|
||||
?>
|
||||
400
modules/EcmProductB2Bs/html2fpdf/font/makefont/makefont.php
Executable file
400
modules/EcmProductB2Bs/html2fpdf/font/makefont/makefont.php
Executable file
@@ -0,0 +1,400 @@
|
||||
<?php
|
||||
/*******************************************************************************
|
||||
* Utility to generate font definition files *
|
||||
* Version: 1.12 *
|
||||
* Date: 2003-12-30 *
|
||||
*******************************************************************************/
|
||||
|
||||
function ReadMap($enc)
|
||||
{
|
||||
//Read a map file
|
||||
$file=dirname(__FILE__).'/'.strtolower($enc).'.map';
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('<B>Error:</B> encoding not found: '.$enc);
|
||||
$cc2gn=array();
|
||||
foreach($a as $l)
|
||||
{
|
||||
if($l{0}=='!')
|
||||
{
|
||||
$e=preg_split('/[ \\t]+/',chop($l));
|
||||
$cc=hexdec(substr($e[0],1));
|
||||
$gn=$e[2];
|
||||
$cc2gn[$cc]=$gn;
|
||||
}
|
||||
}
|
||||
for($i=0;$i<=255;$i++)
|
||||
if(!isset($cc2gn[$i]))
|
||||
$cc2gn[$i]='.notdef';
|
||||
return $cc2gn;
|
||||
}
|
||||
|
||||
function ReadAFM($file,&$map)
|
||||
{
|
||||
//Read a font metric file
|
||||
$a=file($file);
|
||||
if(empty($a))
|
||||
die('File not found');
|
||||
$widths=array();
|
||||
$fm=array();
|
||||
$fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent',
|
||||
'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut',
|
||||
'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent',
|
||||
'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent',
|
||||
'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent',
|
||||
'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat',
|
||||
'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb',
|
||||
'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong');
|
||||
foreach($a as $l)
|
||||
{
|
||||
$e=explode(' ',chop($l));
|
||||
if(count($e)<2)
|
||||
continue;
|
||||
$code=$e[0];
|
||||
$param=$e[1];
|
||||
if($code=='C')
|
||||
{
|
||||
//Character metrics
|
||||
$cc=(int)$e[1];
|
||||
$w=$e[4];
|
||||
$gn=$e[7];
|
||||
if(substr($gn,-4)=='20AC')
|
||||
$gn='Euro';
|
||||
if(isset($fix[$gn]))
|
||||
{
|
||||
//Fix incorrect glyph name
|
||||
foreach($map as $c=>$n)
|
||||
if($n==$fix[$gn])
|
||||
$map[$c]=$gn;
|
||||
}
|
||||
if(empty($map))
|
||||
{
|
||||
//Symbolic font: use built-in encoding
|
||||
$widths[$cc]=$w;
|
||||
}
|
||||
else
|
||||
{
|
||||
$widths[$gn]=$w;
|
||||
if($gn=='X')
|
||||
$fm['CapXHeight']=$e[13];
|
||||
}
|
||||
if($gn=='.notdef')
|
||||
$fm['MissingWidth']=$w;
|
||||
}
|
||||
elseif($code=='FontName')
|
||||
$fm['FontName']=$param;
|
||||
elseif($code=='Weight')
|
||||
$fm['Weight']=$param;
|
||||
elseif($code=='ItalicAngle')
|
||||
$fm['ItalicAngle']=(double)$param;
|
||||
elseif($code=='Ascender')
|
||||
$fm['Ascender']=(int)$param;
|
||||
elseif($code=='Descender')
|
||||
$fm['Descender']=(int)$param;
|
||||
elseif($code=='UnderlineThickness')
|
||||
$fm['UnderlineThickness']=(int)$param;
|
||||
elseif($code=='UnderlinePosition')
|
||||
$fm['UnderlinePosition']=(int)$param;
|
||||
elseif($code=='IsFixedPitch')
|
||||
$fm['IsFixedPitch']=($param=='true');
|
||||
elseif($code=='FontBBox')
|
||||
$fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]);
|
||||
elseif($code=='CapHeight')
|
||||
$fm['CapHeight']=(int)$param;
|
||||
elseif($code=='StdVW')
|
||||
$fm['StdVW']=(int)$param;
|
||||
}
|
||||
if(!isset($fm['FontName']))
|
||||
die('FontName not found');
|
||||
if(!empty($map))
|
||||
{
|
||||
if(!isset($widths['.notdef']))
|
||||
$widths['.notdef']=600;
|
||||
if(!isset($widths['Delta']) and isset($widths['increment']))
|
||||
$widths['Delta']=$widths['increment'];
|
||||
//Order widths according to map
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(!isset($widths[$map[$i]]))
|
||||
{
|
||||
echo '<B>Warning:</B> character '.$map[$i].' is missing<BR>';
|
||||
$widths[$i]=$widths['.notdef'];
|
||||
}
|
||||
else
|
||||
$widths[$i]=$widths[$map[$i]];
|
||||
}
|
||||
}
|
||||
$fm['Widths']=$widths;
|
||||
return $fm;
|
||||
}
|
||||
|
||||
function MakeFontDescriptor($fm,$symbolic)
|
||||
{
|
||||
//Ascent
|
||||
$asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000);
|
||||
$fd="array('Ascent'=>".$asc;
|
||||
//Descent
|
||||
$desc=(isset($fm['Descender']) ? $fm['Descender'] : -200);
|
||||
$fd.=",'Descent'=>".$desc;
|
||||
//CapHeight
|
||||
if(isset($fm['CapHeight']))
|
||||
$ch=$fm['CapHeight'];
|
||||
elseif(isset($fm['CapXHeight']))
|
||||
$ch=$fm['CapXHeight'];
|
||||
else
|
||||
$ch=$asc;
|
||||
$fd.=",'CapHeight'=>".$ch;
|
||||
//Flags
|
||||
$flags=0;
|
||||
if(isset($fm['IsFixedPitch']) and $fm['IsFixedPitch'])
|
||||
$flags+=1<<0;
|
||||
if($symbolic)
|
||||
$flags+=1<<2;
|
||||
if(!$symbolic)
|
||||
$flags+=1<<5;
|
||||
if(isset($fm['ItalicAngle']) and $fm['ItalicAngle']!=0)
|
||||
$flags+=1<<6;
|
||||
$fd.=",'Flags'=>".$flags;
|
||||
//FontBBox
|
||||
if(isset($fm['FontBBox']))
|
||||
$fbb=$fm['FontBBox'];
|
||||
else
|
||||
$fbb=array(0,$des-100,1000,$asc+100);
|
||||
$fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'";
|
||||
//ItalicAngle
|
||||
$ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0);
|
||||
$fd.=",'ItalicAngle'=>".$ia;
|
||||
//StemV
|
||||
if(isset($fm['StdVW']))
|
||||
$stemv=$fm['StdVW'];
|
||||
elseif(isset($fm['Weight']) and eregi('(bold|black)',$fm['Weight']))
|
||||
$stemv=120;
|
||||
else
|
||||
$stemv=70;
|
||||
$fd.=",'StemV'=>".$stemv;
|
||||
//MissingWidth
|
||||
if(isset($fm['MissingWidth']))
|
||||
$fd.=",'MissingWidth'=>".$fm['MissingWidth'];
|
||||
$fd.=')';
|
||||
return $fd;
|
||||
}
|
||||
|
||||
function MakeWidthArray($fm)
|
||||
{
|
||||
//Make character width array
|
||||
$s="array(\n\t";
|
||||
$cw=$fm['Widths'];
|
||||
for($i=0;$i<=255;$i++)
|
||||
{
|
||||
if(chr($i)=="'")
|
||||
$s.="'\\''";
|
||||
elseif(chr($i)=="\\")
|
||||
$s.="'\\\\'";
|
||||
elseif($i>=32 and $i<=126)
|
||||
$s.="'".chr($i)."'";
|
||||
else
|
||||
$s.="chr($i)";
|
||||
$s.='=>'.$fm['Widths'][$i];
|
||||
if($i<255)
|
||||
$s.=',';
|
||||
if(($i+1)%22==0)
|
||||
$s.="\n\t";
|
||||
}
|
||||
$s.=')';
|
||||
return $s;
|
||||
}
|
||||
|
||||
function MakeFontEncoding($map)
|
||||
{
|
||||
//Build differences from reference encoding
|
||||
$ref=ReadMap('cp1252');
|
||||
$s='';
|
||||
$last=0;
|
||||
for($i=32;$i<=255;$i++)
|
||||
{
|
||||
if($map[$i]!=$ref[$i])
|
||||
{
|
||||
if($i!=$last+1)
|
||||
$s.=$i.' ';
|
||||
$last=$i;
|
||||
$s.='/'.$map[$i].' ';
|
||||
}
|
||||
}
|
||||
return chop($s);
|
||||
}
|
||||
|
||||
function SaveToFile($file,$s,$mode='t')
|
||||
{
|
||||
$f=fopen($file,'w'.$mode);
|
||||
if(!$f)
|
||||
die('Can\'t write to file '.$file);
|
||||
fwrite($f,$s,strlen($s));
|
||||
fclose($f);
|
||||
}
|
||||
|
||||
function ReadShort($f)
|
||||
{
|
||||
$a=unpack('n1n',fread($f,2));
|
||||
return $a['n'];
|
||||
}
|
||||
|
||||
function ReadLong($f)
|
||||
{
|
||||
$a=unpack('N1N',fread($f,4));
|
||||
return $a['N'];
|
||||
}
|
||||
|
||||
function CheckTTF($file)
|
||||
{
|
||||
//Check if font license allows embedding
|
||||
$f=fopen($file,'rb');
|
||||
if(!$f)
|
||||
die('<B>Error:</B> Can\'t open '.$file);
|
||||
//Extract number of tables
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$nb=ReadShort($f);
|
||||
fseek($f,6,SEEK_CUR);
|
||||
//Seek OS/2 table
|
||||
$found=false;
|
||||
for($i=0;$i<$nb;$i++)
|
||||
{
|
||||
if(fread($f,4)=='OS/2')
|
||||
{
|
||||
$found=true;
|
||||
break;
|
||||
}
|
||||
fseek($f,12,SEEK_CUR);
|
||||
}
|
||||
if(!$found)
|
||||
{
|
||||
fclose($f);
|
||||
return;
|
||||
}
|
||||
fseek($f,4,SEEK_CUR);
|
||||
$offset=ReadLong($f);
|
||||
fseek($f,$offset,SEEK_SET);
|
||||
//Extract fsType flags
|
||||
fseek($f,8,SEEK_CUR);
|
||||
$fsType=ReadShort($f);
|
||||
$rl=($fsType & 0x02)!=0;
|
||||
$pp=($fsType & 0x04)!=0;
|
||||
$e=($fsType & 0x08)!=0;
|
||||
fclose($f);
|
||||
if($rl and !$pp and !$e)
|
||||
echo '<B>Warning:</B> font license does not allow embedding';
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
* $fontfile: path to TTF file (or empty string if not to be embedded) *
|
||||
* $afmfile: path to AFM file *
|
||||
* $enc: font encoding (or empty string for symbolic fonts) *
|
||||
* $patch: optional patch for encoding *
|
||||
* $type : font type if $fontfile is empty *
|
||||
*******************************************************************************/
|
||||
function MakeFont($fontfile,$afmfile,$enc='cp1252',$patch=array(),$type='TrueType')
|
||||
{
|
||||
//Generate a font definition file
|
||||
set_magic_quotes_runtime(0);
|
||||
if($enc)
|
||||
{
|
||||
$map=ReadMap($enc);
|
||||
foreach($patch as $cc=>$gn)
|
||||
$map[$cc]=$gn;
|
||||
}
|
||||
else
|
||||
$map=array();
|
||||
if(!file_exists($afmfile))
|
||||
die('<B>Error:</B> AFM file not found: '.$afmfile);
|
||||
$fm=ReadAFM($afmfile,$map);
|
||||
if($enc)
|
||||
$diff=MakeFontEncoding($map);
|
||||
else
|
||||
$diff='';
|
||||
$fd=MakeFontDescriptor($fm,empty($map));
|
||||
//Find font type
|
||||
if($fontfile)
|
||||
{
|
||||
$ext=strtolower(substr($fontfile,-3));
|
||||
if($ext=='ttf')
|
||||
$type='TrueType';
|
||||
elseif($ext=='pfb')
|
||||
$type='Type1';
|
||||
else
|
||||
die('<B>Error:</B> unrecognized font file extension: '.$ext);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($type!='TrueType' and $type!='Type1')
|
||||
die('<B>Error:</B> incorrect font type: '.$type);
|
||||
}
|
||||
//Start generation
|
||||
$s='<?php'."\n";
|
||||
$s.='$type=\''.$type."';\n";
|
||||
$s.='$name=\''.$fm['FontName']."';\n";
|
||||
$s.='$desc='.$fd.";\n";
|
||||
if(!isset($fm['UnderlinePosition']))
|
||||
$fm['UnderlinePosition']=-100;
|
||||
if(!isset($fm['UnderlineThickness']))
|
||||
$fm['UnderlineThickness']=50;
|
||||
$s.='$up='.$fm['UnderlinePosition'].";\n";
|
||||
$s.='$ut='.$fm['UnderlineThickness'].";\n";
|
||||
$w=MakeWidthArray($fm);
|
||||
$s.='$cw='.$w.";\n";
|
||||
$s.='$enc=\''.$enc."';\n";
|
||||
$s.='$diff=\''.$diff."';\n";
|
||||
$basename=substr(basename($afmfile),0,-4);
|
||||
if($fontfile)
|
||||
{
|
||||
//Embedded font
|
||||
if(!file_exists($fontfile))
|
||||
die('<B>Error:</B> font file not found: '.$fontfile);
|
||||
if($type=='TrueType')
|
||||
CheckTTF($fontfile);
|
||||
$f=fopen($fontfile,'rb');
|
||||
if(!$f)
|
||||
die('<B>Error:</B> Can\'t open '.$fontfile);
|
||||
$file=fread($f,filesize($fontfile));
|
||||
fclose($f);
|
||||
if($type=='Type1')
|
||||
{
|
||||
//Find first two sections and discard third one
|
||||
$pos=strpos($file,'eexec');
|
||||
if(!$pos)
|
||||
die('<B>Error:</B> font file does not seem to be valid Type1');
|
||||
$size1=$pos+6;
|
||||
$pos=strpos($file,'00000000');
|
||||
if(!$pos)
|
||||
die('<B>Error:</B> font file does not seem to be valid Type1');
|
||||
$size2=$pos-$size1;
|
||||
$file=substr($file,0,$size1+$size2);
|
||||
}
|
||||
if(function_exists('gzcompress'))
|
||||
{
|
||||
$cmp=$basename.'.z';
|
||||
SaveToFile($cmp,gzcompress($file),'b');
|
||||
$s.='$file=\''.$cmp."';\n";
|
||||
echo 'Font file compressed ('.$cmp.')<BR>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$s.='$file=\''.basename($fontfile)."';\n";
|
||||
echo '<B>Notice:</B> font file could not be compressed (gzcompress not available)<BR>';
|
||||
}
|
||||
if($type=='Type1')
|
||||
{
|
||||
$s.='$size1='.$size1.";\n";
|
||||
$s.='$size2='.$size2.";\n";
|
||||
}
|
||||
else
|
||||
$s.='$originalsize='.filesize($fontfile).";\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Not embedded font
|
||||
$s.='$file='."'';\n";
|
||||
}
|
||||
$s.="?>\n";
|
||||
SaveToFile($basename.'.php',$s);
|
||||
echo 'Font definition file generated ('.$basename.'.php'.')<BR>';
|
||||
}
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/symbol.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/symbol.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['symbol']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
|
||||
','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
|
||||
'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
|
||||
'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
|
||||
chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
|
||||
chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
|
||||
chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
|
||||
chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
|
||||
chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/times.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/times.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['times']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
|
||||
'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/timesb.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/timesb.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesB']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
|
||||
'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
|
||||
'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
|
||||
'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
|
||||
chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/timesbi.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/timesbi.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesBI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
|
||||
'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
|
||||
'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
|
||||
'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
|
||||
chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/timesi.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/timesi.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['timesI']=array(
|
||||
chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
|
||||
chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
|
||||
','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
|
||||
'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
|
||||
'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
|
||||
'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
|
||||
chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
|
||||
chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
|
||||
chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
|
||||
chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
|
||||
chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
|
||||
chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
|
||||
?>
|
||||
15
modules/EcmProductB2Bs/html2fpdf/font/zapfdingbats.php
Executable file
15
modules/EcmProductB2Bs/html2fpdf/font/zapfdingbats.php
Executable file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
$fpdf_charwidths['zapfdingbats']=array(
|
||||
chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
|
||||
chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
|
||||
','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
|
||||
'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
|
||||
'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
|
||||
'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
|
||||
chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
|
||||
chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
|
||||
chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
|
||||
chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
|
||||
chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
|
||||
chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user