init
This commit is contained in:
66
modules/EcmDocumentTemplatesaa/Delete.php
Executable file
66
modules/EcmDocumentTemplatesaa/Delete.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?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/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
// 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']);
|
||||
?>
|
||||
51
modules/EcmDocumentTemplatesaa/DetailView.php
Executable file
51
modules/EcmDocumentTemplatesaa/DetailView.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?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;
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('modules/EcmDocumentTemplates/Forms.php');
|
||||
require_once('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
if(isset($_REQUEST['record'])){
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmDocumentTemplates/views/DetailView/view.detail.my.php');
|
||||
$detail = new ViewDetailEcmDocumentTemplates();
|
||||
$detail->ss = new Sugar_Smarty();
|
||||
$detail->module="EcmDocumentTemplates";
|
||||
$detail->bean = $focus;
|
||||
|
||||
$detail->preDisplay();
|
||||
|
||||
$arr=unserialize(base64_decode($focus->template_files_defs));
|
||||
$dir_path="modules/EcmDocumentTemplates/templates/";
|
||||
$docs=$focus->docs;
|
||||
|
||||
$tf='<table cellspacing="0" cellpadding="0" border="0" width="100%">';
|
||||
foreach($docs as $d){
|
||||
//$r=mysql_fetch_array(mysql_query("select id from ".strtolower($d)." where deleted='0' order by id asc limit 1"));
|
||||
//$id=$r['id'];
|
||||
$tf.='<tr>
|
||||
<td width="20%">'.$app_list_strings['moduleList'][$d].'</td>
|
||||
<td width="20%">'.$arr[$d].'</td>
|
||||
<td width="60%"><a style="cursor:pointer;" onclick="EcmPreviewPDF(\'index.php?module='.$d.'&action=previewPDF&method=I&record='.$id.'&to_pdf=1\',{zoom:75,toolbar:1});">'.$mod_strings['LBL_PREVIEW_PDF'].'</a></td>
|
||||
</tr>';
|
||||
}
|
||||
$tf.='</table>';
|
||||
$detail->ss->assign("TEMPLATE_FILES",$tf);
|
||||
echo $detail->display();
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, "EcmDocumentTemplates");
|
||||
echo $subpanel->display();
|
||||
?>
|
||||
129
modules/EcmDocumentTemplatesaa/DetailView2.html
Executable file
129
modules/EcmDocumentTemplatesaa/DetailView2.html
Executable file
@@ -0,0 +1,129 @@
|
||||
<!--
|
||||
/*****************************************************************************
|
||||
* 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.
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<form action="index.php" method="post" name="DetailView" id="form">
|
||||
<input type="hidden" name="module" value="EcmDocumentTemplates">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="isDuplicate" value=false>
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="return_module">
|
||||
<input type="hidden" name="return_action">
|
||||
<input type="hidden" name="return_id" >
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="padding-bottom: 2px;">
|
||||
<input title="{APP.LBL_EDIT_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_EDIT_BUTTON_KEY}"
|
||||
class="button"
|
||||
onclick="this.form.return_module.value='EcmDocumentTemplates'; this.form.return_action.value='DetailView'; this.form.return_id.value='{ID}'; this.form.action.value='EditView'"
|
||||
type="submit"
|
||||
name="Edit"
|
||||
value=" {APP.LBL_EDIT_BUTTON_LABEL} ">
|
||||
<input title="{APP.LBL_DUPLICATE_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}"
|
||||
class="button"
|
||||
onclick="this.form.return_module.value='EcmDocumentTemplates'; this.form.return_action.value='index'; this.form.isDuplicate.value=true; this.form.action.value='EditView'"
|
||||
type="submit"
|
||||
name="Duplicate"
|
||||
value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} ">
|
||||
<input title="{APP.LBL_DELETE_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_DELETE_BUTTON_KEY}"
|
||||
class="button"
|
||||
onclick="this.form.return_module.value='EcmDocumentTemplates'; this.form.return_action.value='ListView'; this.form.action.value='Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')"
|
||||
type="submit"
|
||||
name="Delete"
|
||||
value=" {APP.LBL_DELETE_BUTTON_LABEL} ">
|
||||
{FIND_DUPES_MERGE_BUTTON}
|
||||
</td>
|
||||
<td align='right'>{ADMIN_EDIT}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0" class="tabDetailView">
|
||||
{PAGINATION}
|
||||
<tr>
|
||||
<td width="15%" class="tabDetailViewDL"><span sugar='slot1'>{MOD.LBL_NAME}</span sugar='slot'></td>
|
||||
<td width="35%" class="tabDetailViewDF"><span sugar='slot1b'>{NAME} </span sugar='slot'></td>
|
||||
<td width="15%" valign="top" class="tabDetailViewDL"><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
|
||||
<td width="35%" valign="top" class="tabDetailViewDF"><span sugar='slot2b'>{ASSIGNED_TO} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot3'>{MOD.LBL_DOCUMENT_NUMBER_FORMAT_ID}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot3b'>{DOCUMENT_NUMBER_FORMAT} </span sugar='slot'></td>
|
||||
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot4'>{MOD.LBL_ACCOUNT_NAME}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot4b'>{ACCOUNT_NAME} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot5'>{MOD.LBL_ACCOUNT_ID}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot5b'>{ACCOUNT_ID} </span sugar='slot'></td>
|
||||
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot6'>{MOD.LBL_ACCOUNT_NUMBER}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot6b'>{ACCOUNT_NUMBER} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot3'>{MOD.LBL_LOGO_PATH}</span sugar='slot'></td>
|
||||
<td valign="top" colspan="3" class="tabDetailViewDF"><span sugar='slot3b'>{LOGO_PATH} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
<!-- BEGIN: subpanel -->
|
||||
<span sugar='slot23'>{SUBPANEL}</span sugar='slot'>
|
||||
<!-- END: subpanel -->
|
||||
148
modules/EcmDocumentTemplatesaa/DetailView2.php
Executable file
148
modules/EcmDocumentTemplatesaa/DetailView2.php
Executable file
@@ -0,0 +1,148 @@
|
||||
<?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('XTemplate/xtpl.php');
|
||||
require_once('data/Tracker.php');
|
||||
require_once('modules/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('modules/EcmDocumentTemplates/Forms.php');
|
||||
require_once('include/DetailView/DetailView.php');
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
$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("ECMDOCUMENTTEMPLATES", $focus, $offset);
|
||||
if($result == null) {
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$focus = $result;
|
||||
}else{
|
||||
header("Location: index.php?module={EcmDocumentTemplates}&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("EcmDocumentTemplates detail view");
|
||||
$focus->format_all_fields();
|
||||
$xtpl=new XTemplate ('modules/EcmDocumentTemplates/DetailView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("THEME", $theme);
|
||||
$xtpl->assign("GRIDLINE", isset($gridline)?$gridline:0);
|
||||
$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("LOGO_PATH", $focus->logo_path);
|
||||
$xtpl->assign("ACCOUNT_NAME", $focus->account_name);
|
||||
$xtpl->assign("ACCOUNT_ID", $focus->account_id);
|
||||
$xtpl->assign("ACCOUNT_NUMBER", $focus->account_number);
|
||||
$xtpl->assign("CURRENCY", $focus->currency);
|
||||
$xtpl->assign("DOCUMENT_NUMBER_FORMAT", $app_list_strings['ecmdocumenttemplates_document_number_format_dom'][$focus->document_number_format_id]);
|
||||
if ($focus->table_currency == '1') $xtpl->assign('TABLE_CURRENCY', "checked");
|
||||
|
||||
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, "ECMDOCUMENTTEMPLATES", $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='EcmDocumentTemplates'; 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('EcmDocumentTemplates')));
|
||||
$str = "<script>
|
||||
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
|
||||
</script>";
|
||||
echo $str;
|
||||
?>
|
||||
341
modules/EcmDocumentTemplatesaa/DocumentPDF.php
Executable file
341
modules/EcmDocumentTemplatesaa/DocumentPDF.php
Executable file
@@ -0,0 +1,341 @@
|
||||
<?php
|
||||
|
||||
define('FPDF_FONTPATH','modules/EcmDocumentTemplates/html2fpdf-3.0.2b/font/');
|
||||
require_once('html2fpdf-3.0.2b/html2fpdf.php');
|
||||
|
||||
class DocumentPDF extends HTML2FPDF {
|
||||
|
||||
private $blnShowHeader = true;
|
||||
private $blnShowFooter = true;
|
||||
|
||||
var $iconvFrom = "UTF-8";
|
||||
var $iconvTo = "ISO-8859-2";
|
||||
|
||||
public function DocumentPDF($orientation='P',$unit='mm',$format='A4') {
|
||||
parent::HTML2FPDF($orientation,$unit,$format);
|
||||
$this->AddFont('arialpl', '', 'arial.php');
|
||||
$this->AddFont('arialpl', 'I', 'ariali.php');
|
||||
$this->AddFont('arialpl', 'B', 'arialbd.php');
|
||||
$this->AddFont('arialpl', 'BI', 'arialbi.php');
|
||||
$this->SetFont('arialpl', '', 9);
|
||||
|
||||
$this->rMargin = 15;
|
||||
$this->lMargin = 25;
|
||||
$this->bMargin = 19;
|
||||
$this->SetTopMargin(10);
|
||||
$this->SetAutoPageBreak(true,$this->bMargin+$this->tMarign+5);
|
||||
$this->pgwidth = $this->fw - $this->lMargin - $this->rMargin ;
|
||||
$this->ZoomMode = 73;
|
||||
|
||||
}
|
||||
|
||||
public function enableHeader() { $this->blnShowHeader = true; }
|
||||
public function disableHeader() { $this->blnShowHeader = false; }
|
||||
public function enableFooter() { $this->blnShowFooter = true; }
|
||||
public function disableFooter() { $this->blnShowFooter = false; }
|
||||
|
||||
|
||||
function iconvArray($from,$to,$arr) {
|
||||
if(is_array($arr)) {
|
||||
foreach($arr as $key => $value)
|
||||
$arr[$key] = iconvArray($from,$to,$value);
|
||||
} else $arr = iconv($from,$to,$arr);
|
||||
return $arr;
|
||||
}
|
||||
|
||||
/*
|
||||
function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='',$currentx=0) {
|
||||
return parent::Cell($w,$h=0,iconv("UTF-8","ISO-8859-2",$txt),$border,$ln,$align,$fill,$link,$currentx);
|
||||
}
|
||||
function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0,$link='') {
|
||||
return parent::MultiCell($w,$h,iconv("UTF-8","ISO-8859-2",$txt),$border,$align,$fill,$link);
|
||||
}
|
||||
*/
|
||||
|
||||
public function Header($content='') {}
|
||||
public function Footer() {}
|
||||
function Main() {}
|
||||
|
||||
function DrawTable($table, $headers = null, $ctm = 1, $cbm = 1, $cth = 4) {
|
||||
if(is_array($headers) && count($headers) > 0) {
|
||||
$arr = array();
|
||||
foreach($headers as $key => $value) $arr[] = $table[$value];
|
||||
$headers = $arr;
|
||||
}
|
||||
foreach($table as $row)
|
||||
$this->DrawTableRow($row, $headers, $ctm, $cbm, $cth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function CalcCell($cell) {
|
||||
$cell_tmp = array();
|
||||
$cw=&$this->CurrentFont['cw'];
|
||||
$w = $cell['width']*(($this->fw-$this->lMargin-$this->rMargin)/100);
|
||||
$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
|
||||
$s=str_replace("\r",'',$cell['value']);
|
||||
$nb=strlen($s);
|
||||
if($nb>0 and $s[$nb-1]=="\n") $nb--;
|
||||
$sep=-1;
|
||||
$i=0;
|
||||
$j=0;
|
||||
$l=0;
|
||||
$ns=0;
|
||||
$nl=1;
|
||||
$rc = 0;
|
||||
while($i<$nb)
|
||||
{
|
||||
//Get next character
|
||||
$c=$s{$i};
|
||||
if($c=="\n")
|
||||
{
|
||||
//Explicit line break
|
||||
//$rc++;
|
||||
$cell_tmp[] = substr($s,$j,$i-$j); //$j=$i; $rc = 0;//add next full page
|
||||
$i++;
|
||||
$sep=-1;
|
||||
$j=$i;
|
||||
$l=0;
|
||||
$ns=0;
|
||||
$nl++;
|
||||
continue;
|
||||
}
|
||||
if($c==' ')
|
||||
{
|
||||
$sep=$i;
|
||||
$ls=$l;
|
||||
$ns++;
|
||||
}
|
||||
$l+=$cw[$c];
|
||||
if($l>$wmax)
|
||||
{
|
||||
//Automatic line break
|
||||
if($sep==-1)
|
||||
{
|
||||
if($i==$j) $i++;
|
||||
$rc++;
|
||||
$cell_tmp[] = substr($s,$j,$i-$j); //$j=$i; $rc = 0;//add next full page
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$rc++;
|
||||
$cell_tmp[] = substr($s,$j,$sep-$j); //$j=$i; $rc = 0;//add next full page
|
||||
$i=$sep+1;
|
||||
}
|
||||
$sep=-1;
|
||||
$j=$i;
|
||||
$l=0;
|
||||
$ns=0;
|
||||
$nl++;
|
||||
//$cell_tmp[] = substr($s,$j,$i-$j); //$j=$i; $rc = 0;//add next full page
|
||||
}
|
||||
else $i++;
|
||||
}
|
||||
//Last chunk
|
||||
//$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link);
|
||||
$cell_tmp[] = substr($s,$j,$i-$j);
|
||||
//$this->x=$this->lMargin;
|
||||
|
||||
return $cell_tmp;
|
||||
}
|
||||
|
||||
function getScaledImageHeight($file, $w) {
|
||||
$pos=strrpos($file,'.');
|
||||
if(!$pos) $this->Error('Image file has no extension and no type was specified: '.$file);
|
||||
$type=substr($file,$pos+1);
|
||||
|
||||
if($type=='jpg' or $type=='jpeg') $info=$this->_parsejpg($file);
|
||||
elseif($type=='png') $info=$this->_parsepng($file);
|
||||
elseif($type=='gif') $info=$this->_parsegif($file);
|
||||
|
||||
if(!isset($info)) return 0;
|
||||
|
||||
$h=$w*$info['h']/$info['w'];
|
||||
|
||||
return $h;
|
||||
}
|
||||
|
||||
function DrawTableRow($row, $headers = null, $ctm = 1, $cbm = 1, $cth = 4) {
|
||||
$lm = $this->lMargin;
|
||||
$rm = $this->rMargin;
|
||||
$fw = $this->fw-$lm-$rm;
|
||||
$pr = $fw/100;
|
||||
|
||||
$img_result_bottom = 0;
|
||||
//$ctm = 1; //cell top margin
|
||||
//$cbm = 1; //cell bottom margin
|
||||
//$cth = 4; //cell text height
|
||||
|
||||
//prepare row to draw
|
||||
$row_tmp = array();
|
||||
$maxRows = 0;
|
||||
foreach($row as $key => $cell) {
|
||||
// $row_tmp[$key] = $this->CalcCell($row[$key],$this->fh-($this->GetY()+$ctm)-($this->bMargin+$cbm),$ctm,$cbm);
|
||||
$this->SetFont(
|
||||
(isset($cell['font-family'])?$cell['font-family']:'arialpl'),
|
||||
(isset($cell['font-style'])?$cell['font-style']:''),
|
||||
(isset($cell['font-size'])?$cell['font-size']:8)
|
||||
);
|
||||
if(!isset($cell['image_path'])) {
|
||||
$row_tmp[$key] = $this->CalcCell($row[$key]);
|
||||
if(count($row_tmp[$key]) > $maxRows) $maxRows = count($row_tmp[$key]);
|
||||
} else {
|
||||
$row_tmp[$key] = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$img_path_bool = true;
|
||||
$img_height = 0;
|
||||
for($i=0;$i<$maxRows;$i++) {
|
||||
$row_pre[$i] = $row;
|
||||
foreach($row_tmp as $key => $cell) {
|
||||
if(isset($row_pre[$i][$key]['image_path'])) {
|
||||
if($row_pre[$i][$key]['image_path'] != '' && $img_path_bool == true) {
|
||||
if(file_exists($row_pre[$i][$key]['image_path'])) {
|
||||
$img_path_ = $row_pre[$i][$key]['image_path'];
|
||||
$img_path_bool = false;
|
||||
$img_height = $this->getScaledImageHeight($row_pre[$i][$key]['image_path'], $row_pre[$i][$key]['width']*$pr);
|
||||
}
|
||||
} else $img_path_ = 'none';
|
||||
$row_pre[$i][$key]['image_path'] = $img_path_;
|
||||
}
|
||||
$row_pre[$i][$key]['value'] = isset($cell[$i])?$cell[$i]:'';
|
||||
}
|
||||
}
|
||||
if(($this->GetY() + $img_height) > $this->getBreakLine()) {
|
||||
$this->AddPage();
|
||||
if(is_array($headers) && count($headers) > 0) $this->DrawTable($headers);
|
||||
}
|
||||
|
||||
if($img_height != 0) {
|
||||
$rows_height = count($row_pre) * $cth;
|
||||
if($img_height > $rows_height) $cbm = $cbm + $img_height - $rows_height; else { $img_height = 0; }
|
||||
}
|
||||
$rows_height = count($row_pre) * ($cth + $ctm + $cbm);
|
||||
if($this->GetY()+$rows_height > $this->fh-$this->bMargin) {
|
||||
$this->AddPage();
|
||||
$this->Ln(0);
|
||||
$img_result_bottom = 0;
|
||||
//table headers
|
||||
if(is_array($headers) && count($headers) > 0) $this->DrawTable($headers);
|
||||
$this->Ln(0);
|
||||
}
|
||||
for($rows=0; $rows<count($row_pre); $rows++) {
|
||||
$row = $row_pre[$rows];
|
||||
//row draw
|
||||
$maxy = 0;
|
||||
//drawing a row
|
||||
if($this->GetY()+$cth*5 > $this->fh-$this->bMargin) {
|
||||
$this->AddPage();
|
||||
$mar = null;
|
||||
if ($this->getX()!=$this->lMargin)
|
||||
$mar = $this->getX();
|
||||
|
||||
$this->Ln(0, $mar);
|
||||
$new_x = $this->getX();
|
||||
$img_result_bottom = 0;
|
||||
|
||||
//table headers
|
||||
if(is_array($headers) && count($headers) > 0) $this->DrawTable($headers);
|
||||
$this->Ln(0, $mar);
|
||||
}
|
||||
/*if($this->GetY()> 130){
|
||||
$this->AddPage();
|
||||
} */
|
||||
$cp1 = $this->page;
|
||||
$cp2 = $this->page;
|
||||
$cy = $this->GetY();
|
||||
$sx = $this->GetX(); //start X
|
||||
$sy = $this->GetY(); //start Y
|
||||
$cx = $sx;
|
||||
|
||||
$cell_countner = 0;
|
||||
foreach($row as $key => $cell) {
|
||||
|
||||
//set font
|
||||
$this->SetFont(
|
||||
(isset($cell['font-family'])?$cell['font-family']:'arialpl'),
|
||||
(isset($cell['font-style'])?$cell['font-style']:''),
|
||||
(isset($cell['font-size'])?$cell['font-size']:8)
|
||||
);
|
||||
|
||||
//set text color
|
||||
$this->SetTextColor((isset($cell['color'])?$cell['color']:'0,0,0'));
|
||||
|
||||
//set fill color
|
||||
if(isset($cell['background']))
|
||||
$this->SetFillColor($cell['background'][0],$cell['background'][1],$cell['background'][2]);
|
||||
else
|
||||
$this->SetFillColor(255,255,255);
|
||||
|
||||
//draw top cell margin
|
||||
if($rows == 0) {
|
||||
//if($this->GetY()+$cth*2 > $this->fh-$this->bMargin) { $this->AddPage(); $this->Ln(0); }
|
||||
$xtmp = $this->GetX();
|
||||
$ytmp = $this->GetY();
|
||||
$this->Cell($cell['width']*$pr,$ctm,'',($cell['border']==1?'LTR':''),0,0,1);
|
||||
$this->SetXY($xtmp,$ytmp+$ctm);
|
||||
$cell['border'].='T';
|
||||
}
|
||||
if($rows == $maxRows-1) {
|
||||
if($this->GetY()+$cth*2 > $this->fh-$this->bMargin) {
|
||||
$this->AddPage();
|
||||
$this->Ln(0);
|
||||
//table headers
|
||||
$img_result_bottom = 0;
|
||||
$this->Ln(0);
|
||||
}
|
||||
$xtmp = $this->GetX();
|
||||
$ytmp = $this->GetY();
|
||||
$this->SetXY($xtmp,$ytmp+$cth);
|
||||
if(isset($cell['image_path'])) {
|
||||
} else
|
||||
$this->Cell($cell['width']*$pr,$cbm,'',($cell['border']==1?'LBR':''),0,0,1);
|
||||
$this->SetXY($xtmp,$ytmp);
|
||||
//$this->Rect($this->GetX(),$this->GetY()+$cth,$cell['width']*$pr,$cbm,'DF');
|
||||
}
|
||||
//draw cell text
|
||||
//if($this->GetY()+$cth*2 > $this->fh-$this->bMargin) { $this->AddPage(); $this->Ln(0); }
|
||||
if(isset($cell['image_path']) && $cell['image_path'] != '') {
|
||||
if(file_exists($cell['image_path'])) {
|
||||
$img_y = $this->GetY();
|
||||
$img_result = $this->Image($cell['image_path'],$this->GetX(),$img_y,$cell['width']*$pr,0);
|
||||
$img_result_bottom = $img_y + $img_result['HEIGHT'];
|
||||
$this->SetXY($this->GetX(), $img_y);
|
||||
//if($img_y + $img_result['HEIGHT'] > $maxy) $maxy = $img_y + $img_result['HEIGHT'];
|
||||
}
|
||||
$c_tmp=$cell['width']*$pr;
|
||||
|
||||
} else
|
||||
$this->Cell($c_tmp=$cell['width']*$pr,$cth,$cell['value'],($cell['border']==1?'LR':''),0,$cell['align'],1);
|
||||
|
||||
$this->SetXY($this->GetX(),$this->GetY()+$cth);
|
||||
//draw bottom cell margin
|
||||
if($rows == $maxRows-1) $this->SetXY($this->GetX(),$this->GetY()+$cbm);
|
||||
|
||||
//set end of text
|
||||
if(($this->GetY()) > $maxy) $maxy = $this->GetY();
|
||||
|
||||
if($this->page > $cp1) { $cy = $this->tMargin; $img_result_bottom = 0; $cp1=$this->page; }
|
||||
$this->SetXY($cx+=$c_tmp,$cy);
|
||||
}
|
||||
|
||||
$this->SetXY($sx,$maxy);
|
||||
}
|
||||
if(isset($img_result_bottom) && $img_result_bottom > $this->GetY()) $this->SetXY($this->GetX(), $img_result_bottom);
|
||||
}
|
||||
|
||||
function DrawHorizontalDottedLine($x1,$x2,$y,$r) {
|
||||
for($i=$x1,$j=0;$i<$x2-$r;$i+=$r,$j++) {
|
||||
if($j%2) $this->_out('1 1 1 RG'); else $this->_out($this->DrawColor);
|
||||
$this->Line($i,$y,$i+$r,$y);
|
||||
}
|
||||
$this->_out($this->DrawColor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
116
modules/EcmDocumentTemplatesaa/DocumentTemplatePDF.php
Executable file
116
modules/EcmDocumentTemplatesaa/DocumentTemplatePDF.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
error_reporting(LC_ALL);
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/DocumentPDF.php');
|
||||
|
||||
class DocumentTemplatePDF extends DocumentPDF {
|
||||
|
||||
private $blnShowHeader = true;
|
||||
private $blnShowFooter = true;
|
||||
|
||||
public $edt; // EcmDocumentTemplate
|
||||
|
||||
public function WorkReportPDF($orientation='P',$unit='mm',$format='A4') {
|
||||
parent::DocumentPDF($orientation,$unit,$format);
|
||||
}
|
||||
public function enableHeader() { $this->blnShowHeader = true; }
|
||||
public function disableHeader() { $this->blnShowHeader = false; }
|
||||
public function enableFooter() { $this->blnShowFooter = true; }
|
||||
public function disableFooter() { $this->blnShowFooter = false; }
|
||||
|
||||
public function Header($content='') {
|
||||
$arr=$this->edt->getTemplateFile($_REQUEST['module']);
|
||||
$nip=$this->edt->footer_nip;
|
||||
$module_t=$_REQUEST['module'];
|
||||
if($_REQUEST['module']=="EcmInsideOrders"){
|
||||
$arr[0]="EcmInsideOrders";$arr[1]="e5";
|
||||
}
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/header.php");
|
||||
}
|
||||
|
||||
public function getBreakLine() {
|
||||
return $this->fh-$this->bMargin+1;
|
||||
}
|
||||
|
||||
public function Footer() {
|
||||
global $mod_strings;
|
||||
//if(!$this->blnShowFooter) return;
|
||||
|
||||
$arr=$this->edt->getTemplateFile($_REQUEST['module']);
|
||||
if($_REQUEST['module']=="EcmInsideOrders"){
|
||||
$arr[0]="EcmInsideOrders";$arr[1]="e5";
|
||||
}
|
||||
//manage pdf types
|
||||
//sales
|
||||
if ($_REQUEST['module']=='EcmSales') {
|
||||
$s = new EcmSale();
|
||||
$s->retrieve($_REQUEST['record']);
|
||||
if ($s->invoice_type=='U' || $s->invoice_type=='I')
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.en.php");
|
||||
else
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.pl.php");
|
||||
return;
|
||||
}
|
||||
//invoices
|
||||
if ($_REQUEST['module']=='EcmInvoiceOuts') {
|
||||
$i = new EcmInvoiceOut();
|
||||
$i->retrieve($_REQUEST['record']);
|
||||
if ($i->pdf_type=='U' || $i->pdf_type=='I')
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.en.php");
|
||||
else
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.pl.php");
|
||||
return;
|
||||
}
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.php");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Main() {
|
||||
|
||||
global $mod_strings;
|
||||
$arr=$this->edt->getTemplateFile($_REQUEST['module']);
|
||||
|
||||
include_once("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/subheader.php");
|
||||
|
||||
//$this->edt->DrawPositions($this);
|
||||
|
||||
include_once("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/subfooter.php");
|
||||
|
||||
|
||||
}
|
||||
|
||||
function DrawPositions($positions) {
|
||||
$name_w = 55;
|
||||
if($this->document_info['calc']['draw_discount']) $name_w -= 8;
|
||||
if($this->document_info['calc']['draw_vat']) $name_w -= 8;
|
||||
$table = array();
|
||||
$table [0]['position'] = array('width' => 5, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_POSITION'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['quantity'] = array('width' => 6, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_QUANTITY'],'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['unit'] = array('width' => 6, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_UNIT'],'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_DESCRIPTION'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['unit_price'] = array('width' => 14, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_SELLING_PRICE'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
if($this->document_info['calc']['draw_discount']) $table [0]['discount'] = array('width' => 8, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_DISCOUNT'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
if($this->document_info['calc']['draw_vat']) $table [0]['vat_id'] = array('width' => 8, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_VAT'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_TOTAL'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
|
||||
$i = 1;
|
||||
if($positions != '')
|
||||
foreach($positions as $p) {
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => $i, 'border' => 'LR', 'align' => 'C', );
|
||||
$table [$i]['quantity'] = array('width' => 6, 'value' => $p['quantity'], 'border' => 1, 'align' => 'C', );
|
||||
$table [$i]['unit'] = array('width' => 6, 'value' => $p['unit_id'], 'border' => 1, 'align' => 'C', );
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => $p['name'], 'border' => 1, 'align' => 'L', );
|
||||
$table [$i]['unit_price'] = array('width' => 14, 'value' => $p['price'], 'border' => 1, 'align' => 'R', );
|
||||
if($this->document_info['calc']['draw_discount']) $table [$i]['discount'] = array('width' => 8, 'value' => $p['discount'], 'border' => 1, 'align' => 'R', );
|
||||
if($this->document_info['calc']['draw_vat']) $table [$i]['vat_id'] = array('width' => 8, 'value' => $p['vat_id'], 'border' => 1, 'align' => 'R', );
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => $p['total'], 'border' => 1, 'align' => 'R', );
|
||||
$i++;
|
||||
}
|
||||
$this->DrawTable($table);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
?>
|
||||
645
modules/EcmDocumentTemplatesaa/EcmDocumentTemplate.php
Executable file
645
modules/EcmDocumentTemplatesaa/EcmDocumentTemplate.php
Executable file
@@ -0,0 +1,645 @@
|
||||
<?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');
|
||||
|
||||
// SHOULD INCLUDE SELECTIVELY
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
|
||||
class EcmDocumentTemplate 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 $place_of_register;
|
||||
|
||||
var $logo_path;
|
||||
|
||||
var $logo_id;
|
||||
var $logo_name;
|
||||
|
||||
var $account_name;
|
||||
var $account_id;
|
||||
var $account_number;
|
||||
|
||||
//footer
|
||||
var $footer_account;
|
||||
var $footer_address;
|
||||
var $footer_phone;
|
||||
var $footer_fax;
|
||||
var $footer_krs;
|
||||
var $footer_nip;
|
||||
var $footer_regon;
|
||||
var $footer_capital;
|
||||
var $footer_management;
|
||||
var $footer_swift;
|
||||
var $footer_bankname;
|
||||
var $footer_vatid;
|
||||
var $document_number_format_id;
|
||||
var $documents_per_day_id;
|
||||
var $documents_per;
|
||||
// var $document_number_letter;
|
||||
// var $correct_number_letter;
|
||||
var $ecmlanguage;
|
||||
var $footer_text;
|
||||
var $header_text;
|
||||
var $show_header_on_all_pages;
|
||||
var $show_footer_on_all_pages;
|
||||
|
||||
var $template_files_defs;
|
||||
var $docs=array("EcmInsideOrders","EcmQuotes","EcmSales","EcmPurchaseOrders","EcmDeliveryNotes","EcmInvoiceOuts","EcmReceiptOuts","EcmStockDocIns","EcmStockDocOuts", "EcmStockDocInsideIns","EcmStockDocInsideOuts", "EcmStockDocMoves", "EcmTemplates", "EcmDocuments","EcmStockDocCorrects");
|
||||
|
||||
|
||||
var $pdf;
|
||||
var $account;
|
||||
var $mfp;
|
||||
|
||||
|
||||
// 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 = 'EcmDocumentTemplates';
|
||||
var $table_name = "ecmdocumenttemplates";
|
||||
var $object_name = "EcmDocumentTemplate";
|
||||
|
||||
//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 EcmDocumentTemplate() {
|
||||
parent::SugarBean();
|
||||
$this->setupCustomFields('EcmDocumentTemplates');
|
||||
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 .= "
|
||||
ecmdocumenttemplates.*
|
||||
,users.user_name as assigned_user_name";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmdocumenttemplates
|
||||
LEFT JOIN users
|
||||
ON ecmdocumenttemplates.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 ecmdocumenttemplates.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function create_export_query($order_by, $where){
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT
|
||||
ecmdocumenttemplates.*,
|
||||
users.user_name assigned_user_name";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmdocumenttemplates ";
|
||||
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmdocumenttemplates.assigned_user_id=users.id";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$query .= "";
|
||||
$where_auto = " ecmdocumenttemplates.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 ecmdocumenttemplates.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);
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $current_language;
|
||||
$the_array = parent::get_list_view_data();
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$mod_strings = return_module_language($current_language, 'EcmDocumentTemplates');
|
||||
// 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);
|
||||
$the_array['ENCODED_NAME'] = $this->name;
|
||||
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, "ecmdocumenttemplates.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("ECMDOCUMENTTEMPLATES_DESCRIPTION", $ecmdocumenttemplates->description);
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE){
|
||||
if($this->polish_correct_format == 'on') $this->polish_correct_format = 1; else $this->polish_correct_format = 0;
|
||||
if($this->change_all_old_records == 1) {
|
||||
$this->UpdateFormatNumber("EcmQuotes", "ecmquotes");
|
||||
$this->UpdateFormatNumber("EcmSales", "ecmsales");
|
||||
$this->UpdateFormatNumber("EcmInvoiceOuts", "ecminvoiceouts");
|
||||
$this->UpdateFormatNumber("EcmWorkReports", "ecmworkreports");
|
||||
$this->UpdateFormatNumber("EcmDeliveryNotes", "ecmdeliverynotes");
|
||||
}
|
||||
$arr=array();
|
||||
foreach($this->docs as $d){
|
||||
$arr[$d]=$_REQUEST[$d."_file"];
|
||||
}
|
||||
$tfd=base64_encode(serialize($arr));
|
||||
$this->template_files_defs=$tfd;
|
||||
return parent::save($check_notify);
|
||||
}
|
||||
|
||||
public function UpdateFormatNumber($module, $table_name, $field_number = 'number', $field_formatted_number = 'document_no', $field_template_id = 'template_id') {
|
||||
$query = "SELECT `id`, `$field_number` as `number` FROM `$table_name` WHERE `$field_template_id`='$this->id' ORDER BY `date_entered` ASC";
|
||||
$results = $GLOBALS['db']->query($query);
|
||||
if(is_resource($results)) {
|
||||
$numberPrefix = $this->getNumberPrefix($module);
|
||||
while($row = $GLOBALS['db']->fetchByAssoc($results)) {
|
||||
$new_number = $this->formatNumber($row['number'], $module, $table_name, $field_number, $numberPrefix);
|
||||
$query = "UPDATE `$table_name` SET `$field_formatted_number`='$new_number' WHERE `id`='".$row['id']."'";
|
||||
$this->db->query($query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function retrieveByAccountId($id) {
|
||||
$query = "select id from ecmdocumenttemplates where account_id='".$id."' AND deleted=0 limit 1";
|
||||
$result = mysql_query($query);
|
||||
if(!$result) return '';
|
||||
$idtmp = mysql_fetch_array($result);
|
||||
$this->retrieve($idtmp[0]);
|
||||
$this->unformat_all_fields();
|
||||
}
|
||||
|
||||
function setPDF($id) {
|
||||
$this->retrieve($id);
|
||||
if($this->id == '') return;
|
||||
$this->format_all_fields();
|
||||
$this->setAccount();
|
||||
$this->loadParser();
|
||||
$this->header_text = $this->mfp->parseText($this->header_text);
|
||||
$this->footer_text = $this->mfp->parseText($this->footer_text);
|
||||
|
||||
$address = $this->account->name;
|
||||
if($this->account->billing_address_street) $address .= " - ".$this->account->billing_address_street;
|
||||
if($this->account->billing_address_postalcode) $address .= " - ".$this->account->billing_address_postalcode;
|
||||
if($this->account->billing_address_city) $address .= " ".$this->account->billing_address_city;
|
||||
$this->address = $address;
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/DocumentTemplatePDF.php');
|
||||
$this->pdf = new DocumentTemplatePDF();
|
||||
$this->pdf->edt = $this;
|
||||
$this->pdf->SetXY(25,25);
|
||||
$this->pdf->SetLineWidth(0);
|
||||
$this->pdf->SetDrawColor(0,0,0);
|
||||
$this->pdf->SetFont('Arial', '', 8);
|
||||
$this->pdf->AddPage();
|
||||
|
||||
}
|
||||
|
||||
function outputPDF($name='auto_pdf.pdf',$method = 'I') {
|
||||
if($method == "S")
|
||||
echo $this->pdf->Output($name,$method);
|
||||
else
|
||||
$this->pdf->Output($name,$method);
|
||||
}
|
||||
|
||||
function getPDF($id,$name='auto_pdf.pdf',$method = 'I') {
|
||||
$this->setPDF($id);
|
||||
$this->outputPDF($name,$method);
|
||||
}
|
||||
|
||||
function setAccount() {
|
||||
if(isset($this->account_id) && $this->account_id != '') {
|
||||
require_once('modules/Accounts/Account.php');
|
||||
$this->account = new Account();
|
||||
$this->account->retrieve($this->account_id);
|
||||
}
|
||||
}
|
||||
|
||||
function loadParser() {
|
||||
if(isset($this->mfp) && $this->mfp != '') return true;
|
||||
$path = 'modules/EcmDocumentTemplates/ModuleFieldsParser/ModuleFieldsParser.php';
|
||||
if(file_exists($path)) {
|
||||
require_once($path);
|
||||
$this->mfp = new ModuleFieldsParser();
|
||||
$this->mfp->modules['EcmDocumentTemplates']['focus'] = $this;
|
||||
if(!isset($this->account->id) || $this->account->id == '') {
|
||||
if(isset($this->account_id) && $this->account_id != '') {
|
||||
$this->setAccount();
|
||||
$this->mfp->modules['Accounts']['focus'] = $this->account;
|
||||
}
|
||||
} else
|
||||
$this->mfp->modules['Accounts']['focus'] = $this->account;
|
||||
|
||||
require_once('modules/Users/User.php');
|
||||
$us = new User();
|
||||
global $current_user;
|
||||
$us->retrieve(($this->assigned_user_id)?$this->assigned_user_id:$current_user->id);
|
||||
if(isset($us->id) && $us->id != '') {
|
||||
$this->mfp->modules['Users']['focus'] = $us;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function generateNumber($table_name, $field_name = 'number') {
|
||||
|
||||
$number = date("Y");
|
||||
|
||||
if($table_name=="ecminvoiceouts")
|
||||
$query = "SELECT COUNT(*) as `count` FROM `$table_name` WHERE `ecminvoiceout_id` is null and `".$field_name."` LIKE '".$number."%' AND deleted='0' ORDER BY `".$field_name."` DESC LIMIT 1";
|
||||
|
||||
else $query = "SELECT COUNT(*) as `count` FROM `$table_name` WHERE correct_id is null and `".$field_name."` LIKE '".$number."%' ORDER BY `".$field_name."` DESC LIMIT 1";
|
||||
|
||||
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$count = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($count['count']);
|
||||
//różnice między systemami - skasować po nowym roku:
|
||||
if ($table_name=='ecminvoiceouts')
|
||||
$count = $count - 14;
|
||||
} else $count = 1;
|
||||
|
||||
|
||||
|
||||
$number = date("Ymd");
|
||||
$number .= sprintf("%d", ++$count);
|
||||
|
||||
|
||||
return $number;
|
||||
|
||||
}
|
||||
|
||||
function getNumberPrefix($module) {
|
||||
$mod_strings2 = array();
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
if(isset($this->ecmlanguage) && $this->ecmlanguage != '') {
|
||||
$data = EcmText::LoadText(null,null,$module,$this->ecmlanguage);
|
||||
if(isset($data[0]) && isset($data[0]['data']) && isset($data[0]['data']['labels'])) {
|
||||
$data = $data[0]['data']['labels'];
|
||||
foreach($data as $key => $value) {
|
||||
$mod_strings2[$value['label']] = $value['translation'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $mod_strings2['LBL_PDF_CODE'];
|
||||
}
|
||||
|
||||
function formatNumber($number, $module, $table_name = '', $field_name = 'number', $numberPrefix = null) {
|
||||
|
||||
if($table_name == '') $table_name = strtolower($module);
|
||||
|
||||
if($this->documents_per != "year") {
|
||||
|
||||
$from_number = strval(substr($number,0,4));
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$query = "SELECT COUNT(*) as `count`";
|
||||
$query .= " FROM `".$table_name."`";
|
||||
$query .= " WHERE ";
|
||||
if($table_name=="ecminvoiceouts")$query .= " ecminvoiceout_id is null and ";
|
||||
else $query .= " correct_id is null and ";
|
||||
$query .= " SUBSTRING(`number`, 1, 4) = '".$from_number."'";
|
||||
|
||||
if($this->documents_per == "month") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,6) = '".substr($number,0,6)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
else if($this->documents_per == "day") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,8) = '".substr($number,0,8)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
$query .= ";";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
|
||||
if(is_resource($result)) {
|
||||
$tmp = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($tmp['count']);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
$number = substr($number,0,8).strval($count);
|
||||
|
||||
}
|
||||
|
||||
if($numberPrefix == null)
|
||||
$numberPrefix = $this->getNumberPrefix($module);
|
||||
if($this->id=="57d2b950-00c8-62b7-16bb-4d678a086f05" || $this->id=="d48b9458-bf48-d30f-7f7c-4bb074833504"){
|
||||
$a1=array("001/E","002/E","003/E","004/E","005/E","006/E","007/E","008/E","009/E","010/E","011/E","012/E","013/E","014/E","015/E","016/E","017/E","018/E","019/E");
|
||||
$a2=array("1/E","2/E","3/E","4/E","5/E","6/E","7/E","8/E","9/E","10/E","11/E","12/E","13/E","14/E","15/E","16/E","17/E","18/E","19/E");
|
||||
$nnoo=str_replace($a1,$a2,$this->formatDocumentNumber($number, $numberPrefix));
|
||||
$t = explode("/", $nnoo);
|
||||
if (substr($t[0],0,1) == "0") {
|
||||
//return $t[0];
|
||||
$t[0] = substr($t[0], 1, strlen($t[0]));
|
||||
$nnoo = implode("/",$t);
|
||||
}
|
||||
if ($this->id=="57d2b950-00c8-62b7-16bb-4d678a086f05") return str_replace("E", "U", $nnoo);
|
||||
return $nnoo;
|
||||
}
|
||||
else $nnoo=$this->formatDocumentNumber($number, $numberPrefix);
|
||||
return $nnoo;
|
||||
}
|
||||
|
||||
function generateNumberCorrect($table_name, $field_name = 'number') {
|
||||
|
||||
$number = date("Y");
|
||||
|
||||
if($table_name=="ecminvoiceouts"){
|
||||
$query="SELECT COUNT(*) as count FROM ecminvoiceouts WHERE deleted='0' and (ecminvoiceout_id is not null or ecminvoiceout_id!='') and type='correct' and number LIKE '".$number."%' ORDER BY number DESC limit 1";
|
||||
}
|
||||
else $query = "SELECT COUNT(*) as `count` FROM `$table_name` WHERE `correct_id` is not null and `".$field_name."` LIKE '".$number."%' ORDER BY `".$field_name."` DESC LIMIT 1";
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$count = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($count['count']);
|
||||
|
||||
//różnice między systemami - skasować po nowym roku:
|
||||
if ($table_name=='ecminvoiceouts')
|
||||
$count = $count - 6;
|
||||
} else $count = 1;
|
||||
|
||||
$number = date("Ymd");
|
||||
$number .=$count;
|
||||
|
||||
return $number;
|
||||
}
|
||||
function getNumberPrefixCorrect($module) {
|
||||
$mod_strings2 = array();
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
if(isset($this->ecmlanguage) && $this->ecmlanguage != '') {
|
||||
$data = EcmText::LoadText(null,null,$module,$this->ecmlanguage);
|
||||
if(isset($data[0]) && isset($data[0]['data']) && isset($data[0]['data']['labels'])) {
|
||||
$data = $data[0]['data']['labels'];
|
||||
foreach($data as $key => $value) {
|
||||
$mod_strings2[$value['label']] = $value['translation'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $mod_strings2['LBL_PDF_CODE_CORRECT'];
|
||||
}
|
||||
|
||||
function formatNumberCorrect($number, $module, $table_name = '', $field_name = 'number', $numberPrefix = null) {
|
||||
|
||||
if($table_name == '') $table_name = strtolower($module);
|
||||
|
||||
if($this->documents_per != "year") {
|
||||
|
||||
$from_number = strval(substr($number,0,4));
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$query = "SELECT COUNT(*) as `count`";
|
||||
$query .= " FROM `".$table_name."`";
|
||||
$query .= " WHERE ";
|
||||
if($table_name=="ecminvoiceouts")$query .= " ecminvoiceout_id is not null and ";
|
||||
else $query .= " correct_id is not null and ";
|
||||
$query .= " SUBSTRING(`number`, 1, 4) = '".$from_number."'";
|
||||
if($this->documents_per == "month") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,6) = '".substr($number,0,6)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
else if($this->documents_per == "day") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,8) = '".substr($number,0,8)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
$query .= ";";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$tmp = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($tmp['count']);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
$number = substr($number,0,8).strval($count);
|
||||
|
||||
}
|
||||
|
||||
if($numberPrefix == null)
|
||||
$numberPrefix = $this->getNumberPrefixCorrect($module);
|
||||
return $this->formatDocumentNumber($number, $numberPrefix);
|
||||
}
|
||||
|
||||
function formatDocumentNumber($documentNumber = '', $code = '') {
|
||||
$cf = '';
|
||||
$format = $this->document_number_format_id;
|
||||
$format = str_replace('CODE', '[cOdE]', $format);
|
||||
$ARR1 = array ('y', 'Y', 'M', 'D', 'NR', '[cOdE]');
|
||||
$ARR2 = array (substr($documentNumber,2,2), substr($documentNumber,0,4), substr($documentNumber,4,2), substr($documentNumber,6,2), substr($documentNumber,8));
|
||||
$ARR2[4] = sprintf("%0".$this->documents_per_day_id."d",$ARR2[4]);
|
||||
$ARR2[5] = $code;
|
||||
$nno=str_replace($ARR1,$ARR2,$format).$cf;
|
||||
$exp=explode(" ",$nno);
|
||||
if($exp[0]=="")$nno=$exp[1];
|
||||
return $nno;;
|
||||
}
|
||||
|
||||
|
||||
function getListOfTemplateFiles($path,$module){
|
||||
if(!file_exists($path.$module))$module="Other";
|
||||
if($handle=opendir($path.$module)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if($file!="." && $file!=".." && is_dir($path.$module."/".$file))$arr[]=$file;
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
function selectTemplateFile($module,$files,$value){
|
||||
$html='<select name="'.$module.'_file" id="'.$module.'_file">';
|
||||
foreach($files as $f){
|
||||
$html.='<option value="'.$f.'"';
|
||||
if($value==$f)$html.=' selected';
|
||||
$html.='>'.$f.'</option>';
|
||||
}
|
||||
$html.='</select>';
|
||||
return $html;
|
||||
}
|
||||
function getTemplateFile($module, $type = null){
|
||||
$arr=unserialize(base64_decode($this->template_files_defs));
|
||||
if(
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/header.php") &&
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/footer.php") &&
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/subheader.php") &&
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/subfooter.php")
|
||||
)return array($module,$arr[$module]);
|
||||
else return array("Other",$arr[$module]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
76
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates.js
Executable file
76
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates.js
Executable file
@@ -0,0 +1,76 @@
|
||||
|
||||
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 changeValidateRequired(formname,name,required) {
|
||||
for(var i=0; i<validate[formname].length; i++)
|
||||
if(validate[formname][i][0] == name) { validate[formname][i][2] = required; break; }
|
||||
}
|
||||
|
||||
function set_focus() { document.getElementById('name').focus(); }
|
||||
|
||||
function my_popup(module, field_array, call_back_function, form_name) {
|
||||
if(!call_back_function) call_back_function = "set_return";
|
||||
if(!form_name) form_name = "EditView";
|
||||
return open_popup(module, 600, 400, "", true, false, {"call_back_function":call_back_function,"form_name":form_name,"field_to_name_array":field_array});
|
||||
}
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
function updatePreviewNumber() {
|
||||
doRequest(
|
||||
'index.php',
|
||||
'module=EcmDocumentTemplates&action=formatDocumentNumber&to_pdf=1&ex=1&f='+document.getElementById('document_number_format_id').value+'&d='+document.getElementById('documents_per_day_id').value,
|
||||
function (response) { var dnfp = document.getElementById('doc_num_for_prev'); if(dnfp) dnfp.innerHTML = '('+response+')'; }
|
||||
)
|
||||
}
|
||||
|
||||
function deleteLogo() {
|
||||
var div = document.getElementById('logoDiv');
|
||||
if(div) div.parentNode.removeChild(div);
|
||||
}
|
||||
|
||||
var accountFL;
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function () {
|
||||
|
||||
//adding a div to document_number_format_id
|
||||
var dnfi = document.getElementById('document_number_format_id');
|
||||
if(dnfi) {
|
||||
var span = document.createElement('span');
|
||||
span.id = 'doc_num_for_prev';
|
||||
span.appendChild(document.createTextNode('()'));
|
||||
dnfi.parentNode.appendChild(span);
|
||||
}
|
||||
addEvent(dnfi, 'change', function () {updatePreviewNumber();});
|
||||
addEvent('documents_per_day_id', 'change', function () {updatePreviewNumber();});
|
||||
updatePreviewNumber();
|
||||
|
||||
|
||||
//create Account
|
||||
accountFL = new FormLoader();
|
||||
accountFL.load('EcmDocumentTemplates','Accounts','accountFL');
|
||||
accountFL.onResponseData = function(data) {
|
||||
document.forms.EditView.account_id.value = data['id'];
|
||||
document.forms.EditView.account_name.value = data['name'];
|
||||
};
|
||||
accountFL.setEditDblClick(document.forms.EditView.account_name);
|
||||
accountFL.onEditDblClick = function() { return "&fl_record="+document.forms.EditView.account_id.value; }
|
||||
accountFL.onButtonClick = function() { return "&fl_name="+document.forms.EditView.account_name.value; }
|
||||
//document.forms.EditView.account_id.parentNode.appendChild(accountFL.createButton());
|
||||
}
|
||||
);
|
||||
66
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Delete.php
Executable file
66
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Delete.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?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/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
// 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']);
|
||||
?>
|
||||
51
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DetailView.php
Executable file
51
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DetailView.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?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;
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('modules/EcmDocumentTemplates/Forms.php');
|
||||
require_once('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
if(isset($_REQUEST['record'])){
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmDocumentTemplates/views/DetailView/view.detail.my.php');
|
||||
$detail = new ViewDetailEcmDocumentTemplates();
|
||||
$detail->ss = new Sugar_Smarty();
|
||||
$detail->module="EcmDocumentTemplates";
|
||||
$detail->bean = $focus;
|
||||
|
||||
$detail->preDisplay();
|
||||
|
||||
$arr=unserialize(base64_decode($focus->template_files_defs));
|
||||
$dir_path="modules/EcmDocumentTemplates/templates/";
|
||||
$docs=$focus->docs;
|
||||
|
||||
$tf='<table cellspacing="0" cellpadding="0" border="0" width="100%">';
|
||||
foreach($docs as $d){
|
||||
//$r=mysql_fetch_array(mysql_query("select id from ".strtolower($d)." where deleted='0' order by id asc limit 1"));
|
||||
//$id=$r['id'];
|
||||
$tf.='<tr>
|
||||
<td width="20%">'.$app_list_strings['moduleList'][$d].'</td>
|
||||
<td width="20%">'.$arr[$d].'</td>
|
||||
<td width="60%"><a style="cursor:pointer;" onclick="EcmPreviewPDF(\'index.php?module='.$d.'&action=previewPDF&method=I&record='.$id.'&to_pdf=1\',{zoom:75,toolbar:1});">'.$mod_strings['LBL_PREVIEW_PDF'].'</a></td>
|
||||
</tr>';
|
||||
}
|
||||
$tf.='</table>';
|
||||
$detail->ss->assign("TEMPLATE_FILES",$tf);
|
||||
echo $detail->display();
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, "EcmDocumentTemplates");
|
||||
echo $subpanel->display();
|
||||
?>
|
||||
129
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DetailView2.html
Executable file
129
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DetailView2.html
Executable file
@@ -0,0 +1,129 @@
|
||||
<!--
|
||||
/*****************************************************************************
|
||||
* 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.
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<form action="index.php" method="post" name="DetailView" id="form">
|
||||
<input type="hidden" name="module" value="EcmDocumentTemplates">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="isDuplicate" value=false>
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="return_module">
|
||||
<input type="hidden" name="return_action">
|
||||
<input type="hidden" name="return_id" >
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="padding-bottom: 2px;">
|
||||
<input title="{APP.LBL_EDIT_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_EDIT_BUTTON_KEY}"
|
||||
class="button"
|
||||
onclick="this.form.return_module.value='EcmDocumentTemplates'; this.form.return_action.value='DetailView'; this.form.return_id.value='{ID}'; this.form.action.value='EditView'"
|
||||
type="submit"
|
||||
name="Edit"
|
||||
value=" {APP.LBL_EDIT_BUTTON_LABEL} ">
|
||||
<input title="{APP.LBL_DUPLICATE_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}"
|
||||
class="button"
|
||||
onclick="this.form.return_module.value='EcmDocumentTemplates'; this.form.return_action.value='index'; this.form.isDuplicate.value=true; this.form.action.value='EditView'"
|
||||
type="submit"
|
||||
name="Duplicate"
|
||||
value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} ">
|
||||
<input title="{APP.LBL_DELETE_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_DELETE_BUTTON_KEY}"
|
||||
class="button"
|
||||
onclick="this.form.return_module.value='EcmDocumentTemplates'; this.form.return_action.value='ListView'; this.form.action.value='Delete'; return confirm('{APP.NTC_DELETE_CONFIRMATION}')"
|
||||
type="submit"
|
||||
name="Delete"
|
||||
value=" {APP.LBL_DELETE_BUTTON_LABEL} ">
|
||||
{FIND_DUPES_MERGE_BUTTON}
|
||||
</td>
|
||||
<td align='right'>{ADMIN_EDIT}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0" class="tabDetailView">
|
||||
{PAGINATION}
|
||||
<tr>
|
||||
<td width="15%" class="tabDetailViewDL"><span sugar='slot1'>{MOD.LBL_NAME}</span sugar='slot'></td>
|
||||
<td width="35%" class="tabDetailViewDF"><span sugar='slot1b'>{NAME} </span sugar='slot'></td>
|
||||
<td width="15%" valign="top" class="tabDetailViewDL"><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
|
||||
<td width="35%" valign="top" class="tabDetailViewDF"><span sugar='slot2b'>{ASSIGNED_TO} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot3'>{MOD.LBL_DOCUMENT_NUMBER_FORMAT_ID}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot3b'>{DOCUMENT_NUMBER_FORMAT} </span sugar='slot'></td>
|
||||
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot4'>{MOD.LBL_ACCOUNT_NAME}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot4b'>{ACCOUNT_NAME} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot5'>{MOD.LBL_ACCOUNT_ID}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot5b'>{ACCOUNT_ID} </span sugar='slot'></td>
|
||||
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot6'>{MOD.LBL_ACCOUNT_NUMBER}</span sugar='slot'></td>
|
||||
<td valign="top" class="tabDetailViewDF"><span sugar='slot6b'>{ACCOUNT_NUMBER} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="tabDetailViewDL"><span sugar='slot3'>{MOD.LBL_LOGO_PATH}</span sugar='slot'></td>
|
||||
<td valign="top" colspan="3" class="tabDetailViewDF"><span sugar='slot3b'>{LOGO_PATH} </span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
<!-- BEGIN: subpanel -->
|
||||
<span sugar='slot23'>{SUBPANEL}</span sugar='slot'>
|
||||
<!-- END: subpanel -->
|
||||
148
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DetailView2.php
Executable file
148
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DetailView2.php
Executable file
@@ -0,0 +1,148 @@
|
||||
<?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('XTemplate/xtpl.php');
|
||||
require_once('data/Tracker.php');
|
||||
require_once('modules/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('modules/EcmDocumentTemplates/Forms.php');
|
||||
require_once('include/DetailView/DetailView.php');
|
||||
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
$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("ECMDOCUMENTTEMPLATES", $focus, $offset);
|
||||
if($result == null) {
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$focus = $result;
|
||||
}else{
|
||||
header("Location: index.php?module={EcmDocumentTemplates}&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("EcmDocumentTemplates detail view");
|
||||
$focus->format_all_fields();
|
||||
$xtpl=new XTemplate ('modules/EcmDocumentTemplates/DetailView.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("THEME", $theme);
|
||||
$xtpl->assign("GRIDLINE", isset($gridline)?$gridline:0);
|
||||
$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("LOGO_PATH", $focus->logo_path);
|
||||
$xtpl->assign("ACCOUNT_NAME", $focus->account_name);
|
||||
$xtpl->assign("ACCOUNT_ID", $focus->account_id);
|
||||
$xtpl->assign("ACCOUNT_NUMBER", $focus->account_number);
|
||||
$xtpl->assign("CURRENCY", $focus->currency);
|
||||
$xtpl->assign("DOCUMENT_NUMBER_FORMAT", $app_list_strings['ecmdocumenttemplates_document_number_format_dom'][$focus->document_number_format_id]);
|
||||
if ($focus->table_currency == '1') $xtpl->assign('TABLE_CURRENCY', "checked");
|
||||
|
||||
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, "ECMDOCUMENTTEMPLATES", $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='EcmDocumentTemplates'; 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('EcmDocumentTemplates')));
|
||||
$str = "<script>
|
||||
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
|
||||
</script>";
|
||||
echo $str;
|
||||
?>
|
||||
341
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DocumentPDF.php
Executable file
341
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DocumentPDF.php
Executable file
@@ -0,0 +1,341 @@
|
||||
<?php
|
||||
|
||||
define('FPDF_FONTPATH','modules/EcmDocumentTemplates/html2fpdf-3.0.2b/font/');
|
||||
require_once('html2fpdf-3.0.2b/html2fpdf.php');
|
||||
|
||||
class DocumentPDF extends HTML2FPDF {
|
||||
|
||||
private $blnShowHeader = true;
|
||||
private $blnShowFooter = true;
|
||||
|
||||
var $iconvFrom = "UTF-8";
|
||||
var $iconvTo = "ISO-8859-2";
|
||||
|
||||
public function DocumentPDF($orientation='P',$unit='mm',$format='A4') {
|
||||
parent::HTML2FPDF($orientation,$unit,$format);
|
||||
$this->AddFont('arialpl', '', 'arial.php');
|
||||
$this->AddFont('arialpl', 'I', 'ariali.php');
|
||||
$this->AddFont('arialpl', 'B', 'arialbd.php');
|
||||
$this->AddFont('arialpl', 'BI', 'arialbi.php');
|
||||
$this->SetFont('arialpl', '', 9);
|
||||
|
||||
$this->rMargin = 15;
|
||||
$this->lMargin = 25;
|
||||
$this->bMargin = 19;
|
||||
$this->SetTopMargin(10);
|
||||
$this->SetAutoPageBreak(true,$this->bMargin+$this->tMarign+5);
|
||||
$this->pgwidth = $this->fw - $this->lMargin - $this->rMargin ;
|
||||
$this->ZoomMode = 73;
|
||||
|
||||
}
|
||||
|
||||
public function enableHeader() { $this->blnShowHeader = true; }
|
||||
public function disableHeader() { $this->blnShowHeader = false; }
|
||||
public function enableFooter() { $this->blnShowFooter = true; }
|
||||
public function disableFooter() { $this->blnShowFooter = false; }
|
||||
|
||||
|
||||
function iconvArray($from,$to,$arr) {
|
||||
if(is_array($arr)) {
|
||||
foreach($arr as $key => $value)
|
||||
$arr[$key] = iconvArray($from,$to,$value);
|
||||
} else $arr = iconv($from,$to,$arr);
|
||||
return $arr;
|
||||
}
|
||||
|
||||
/*
|
||||
function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='',$currentx=0) {
|
||||
return parent::Cell($w,$h=0,iconv("UTF-8","ISO-8859-2",$txt),$border,$ln,$align,$fill,$link,$currentx);
|
||||
}
|
||||
function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0,$link='') {
|
||||
return parent::MultiCell($w,$h,iconv("UTF-8","ISO-8859-2",$txt),$border,$align,$fill,$link);
|
||||
}
|
||||
*/
|
||||
|
||||
public function Header($content='') {}
|
||||
public function Footer() {}
|
||||
function Main() {}
|
||||
|
||||
function DrawTable($table, $headers = null, $ctm = 1, $cbm = 1, $cth = 4) {
|
||||
if(is_array($headers) && count($headers) > 0) {
|
||||
$arr = array();
|
||||
foreach($headers as $key => $value) $arr[] = $table[$value];
|
||||
$headers = $arr;
|
||||
}
|
||||
foreach($table as $row)
|
||||
$this->DrawTableRow($row, $headers, $ctm, $cbm, $cth);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function CalcCell($cell) {
|
||||
$cell_tmp = array();
|
||||
$cw=&$this->CurrentFont['cw'];
|
||||
$w = $cell['width']*(($this->fw-$this->lMargin-$this->rMargin)/100);
|
||||
$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
|
||||
$s=str_replace("\r",'',$cell['value']);
|
||||
$nb=strlen($s);
|
||||
if($nb>0 and $s[$nb-1]=="\n") $nb--;
|
||||
$sep=-1;
|
||||
$i=0;
|
||||
$j=0;
|
||||
$l=0;
|
||||
$ns=0;
|
||||
$nl=1;
|
||||
$rc = 0;
|
||||
while($i<$nb)
|
||||
{
|
||||
//Get next character
|
||||
$c=$s{$i};
|
||||
if($c=="\n")
|
||||
{
|
||||
//Explicit line break
|
||||
//$rc++;
|
||||
$cell_tmp[] = substr($s,$j,$i-$j); //$j=$i; $rc = 0;//add next full page
|
||||
$i++;
|
||||
$sep=-1;
|
||||
$j=$i;
|
||||
$l=0;
|
||||
$ns=0;
|
||||
$nl++;
|
||||
continue;
|
||||
}
|
||||
if($c==' ')
|
||||
{
|
||||
$sep=$i;
|
||||
$ls=$l;
|
||||
$ns++;
|
||||
}
|
||||
$l+=$cw[$c];
|
||||
if($l>$wmax)
|
||||
{
|
||||
//Automatic line break
|
||||
if($sep==-1)
|
||||
{
|
||||
if($i==$j) $i++;
|
||||
$rc++;
|
||||
$cell_tmp[] = substr($s,$j,$i-$j); //$j=$i; $rc = 0;//add next full page
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$rc++;
|
||||
$cell_tmp[] = substr($s,$j,$sep-$j); //$j=$i; $rc = 0;//add next full page
|
||||
$i=$sep+1;
|
||||
}
|
||||
$sep=-1;
|
||||
$j=$i;
|
||||
$l=0;
|
||||
$ns=0;
|
||||
$nl++;
|
||||
//$cell_tmp[] = substr($s,$j,$i-$j); //$j=$i; $rc = 0;//add next full page
|
||||
}
|
||||
else $i++;
|
||||
}
|
||||
//Last chunk
|
||||
//$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill,$link);
|
||||
$cell_tmp[] = substr($s,$j,$i-$j);
|
||||
//$this->x=$this->lMargin;
|
||||
|
||||
return $cell_tmp;
|
||||
}
|
||||
|
||||
function getScaledImageHeight($file, $w) {
|
||||
$pos=strrpos($file,'.');
|
||||
if(!$pos) $this->Error('Image file has no extension and no type was specified: '.$file);
|
||||
$type=substr($file,$pos+1);
|
||||
|
||||
if($type=='jpg' or $type=='jpeg') $info=$this->_parsejpg($file);
|
||||
elseif($type=='png') $info=$this->_parsepng($file);
|
||||
elseif($type=='gif') $info=$this->_parsegif($file);
|
||||
|
||||
if(!isset($info)) return 0;
|
||||
|
||||
$h=$w*$info['h']/$info['w'];
|
||||
|
||||
return $h;
|
||||
}
|
||||
|
||||
function DrawTableRow($row, $headers = null, $ctm = 1, $cbm = 1, $cth = 4) {
|
||||
$lm = $this->lMargin;
|
||||
$rm = $this->rMargin;
|
||||
$fw = $this->fw-$lm-$rm;
|
||||
$pr = $fw/100;
|
||||
|
||||
$img_result_bottom = 0;
|
||||
//$ctm = 1; //cell top margin
|
||||
//$cbm = 1; //cell bottom margin
|
||||
//$cth = 4; //cell text height
|
||||
|
||||
//prepare row to draw
|
||||
$row_tmp = array();
|
||||
$maxRows = 0;
|
||||
foreach($row as $key => $cell) {
|
||||
// $row_tmp[$key] = $this->CalcCell($row[$key],$this->fh-($this->GetY()+$ctm)-($this->bMargin+$cbm),$ctm,$cbm);
|
||||
$this->SetFont(
|
||||
(isset($cell['font-family'])?$cell['font-family']:'arialpl'),
|
||||
(isset($cell['font-style'])?$cell['font-style']:''),
|
||||
(isset($cell['font-size'])?$cell['font-size']:8)
|
||||
);
|
||||
if(!isset($cell['image_path'])) {
|
||||
$row_tmp[$key] = $this->CalcCell($row[$key]);
|
||||
if(count($row_tmp[$key]) > $maxRows) $maxRows = count($row_tmp[$key]);
|
||||
} else {
|
||||
$row_tmp[$key] = '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$img_path_bool = true;
|
||||
$img_height = 0;
|
||||
for($i=0;$i<$maxRows;$i++) {
|
||||
$row_pre[$i] = $row;
|
||||
foreach($row_tmp as $key => $cell) {
|
||||
if(isset($row_pre[$i][$key]['image_path'])) {
|
||||
if($row_pre[$i][$key]['image_path'] != '' && $img_path_bool == true) {
|
||||
if(file_exists($row_pre[$i][$key]['image_path'])) {
|
||||
$img_path_ = $row_pre[$i][$key]['image_path'];
|
||||
$img_path_bool = false;
|
||||
$img_height = $this->getScaledImageHeight($row_pre[$i][$key]['image_path'], $row_pre[$i][$key]['width']*$pr);
|
||||
}
|
||||
} else $img_path_ = 'none';
|
||||
$row_pre[$i][$key]['image_path'] = $img_path_;
|
||||
}
|
||||
$row_pre[$i][$key]['value'] = isset($cell[$i])?$cell[$i]:'';
|
||||
}
|
||||
}
|
||||
if(($this->GetY() + $img_height) > $this->getBreakLine()) {
|
||||
$this->AddPage();
|
||||
if(is_array($headers) && count($headers) > 0) $this->DrawTable($headers);
|
||||
}
|
||||
|
||||
if($img_height != 0) {
|
||||
$rows_height = count($row_pre) * $cth;
|
||||
if($img_height > $rows_height) $cbm = $cbm + $img_height - $rows_height; else { $img_height = 0; }
|
||||
}
|
||||
$rows_height = count($row_pre) * ($cth + $ctm + $cbm);
|
||||
if($this->GetY()+$rows_height > $this->fh-$this->bMargin) {
|
||||
$this->AddPage();
|
||||
$this->Ln(0);
|
||||
$img_result_bottom = 0;
|
||||
//table headers
|
||||
if(is_array($headers) && count($headers) > 0) $this->DrawTable($headers);
|
||||
$this->Ln(0);
|
||||
}
|
||||
for($rows=0; $rows<count($row_pre); $rows++) {
|
||||
$row = $row_pre[$rows];
|
||||
//row draw
|
||||
$maxy = 0;
|
||||
//drawing a row
|
||||
if($this->GetY()+$cth*5 > $this->fh-$this->bMargin) {
|
||||
$this->AddPage();
|
||||
$mar = null;
|
||||
if ($this->getX()!=$this->lMargin)
|
||||
$mar = $this->getX();
|
||||
|
||||
$this->Ln(0, $mar);
|
||||
$new_x = $this->getX();
|
||||
$img_result_bottom = 0;
|
||||
|
||||
//table headers
|
||||
if(is_array($headers) && count($headers) > 0) $this->DrawTable($headers);
|
||||
$this->Ln(0, $mar);
|
||||
}
|
||||
/*if($this->GetY()> 130){
|
||||
$this->AddPage();
|
||||
} */
|
||||
$cp1 = $this->page;
|
||||
$cp2 = $this->page;
|
||||
$cy = $this->GetY();
|
||||
$sx = $this->GetX(); //start X
|
||||
$sy = $this->GetY(); //start Y
|
||||
$cx = $sx;
|
||||
|
||||
$cell_countner = 0;
|
||||
foreach($row as $key => $cell) {
|
||||
|
||||
//set font
|
||||
$this->SetFont(
|
||||
(isset($cell['font-family'])?$cell['font-family']:'arialpl'),
|
||||
(isset($cell['font-style'])?$cell['font-style']:''),
|
||||
(isset($cell['font-size'])?$cell['font-size']:8)
|
||||
);
|
||||
|
||||
//set text color
|
||||
$this->SetTextColor((isset($cell['color'])?$cell['color']:'0,0,0'));
|
||||
|
||||
//set fill color
|
||||
if(isset($cell['background']))
|
||||
$this->SetFillColor($cell['background'][0],$cell['background'][1],$cell['background'][2]);
|
||||
else
|
||||
$this->SetFillColor(255,255,255);
|
||||
|
||||
//draw top cell margin
|
||||
if($rows == 0) {
|
||||
//if($this->GetY()+$cth*2 > $this->fh-$this->bMargin) { $this->AddPage(); $this->Ln(0); }
|
||||
$xtmp = $this->GetX();
|
||||
$ytmp = $this->GetY();
|
||||
$this->Cell($cell['width']*$pr,$ctm,'',($cell['border']==1?'LTR':''),0,0,1);
|
||||
$this->SetXY($xtmp,$ytmp+$ctm);
|
||||
$cell['border'].='T';
|
||||
}
|
||||
if($rows == $maxRows-1) {
|
||||
if($this->GetY()+$cth*2 > $this->fh-$this->bMargin) {
|
||||
$this->AddPage();
|
||||
$this->Ln(0);
|
||||
//table headers
|
||||
$img_result_bottom = 0;
|
||||
$this->Ln(0);
|
||||
}
|
||||
$xtmp = $this->GetX();
|
||||
$ytmp = $this->GetY();
|
||||
$this->SetXY($xtmp,$ytmp+$cth);
|
||||
if(isset($cell['image_path'])) {
|
||||
} else
|
||||
$this->Cell($cell['width']*$pr,$cbm,'',($cell['border']==1?'LBR':''),0,0,1);
|
||||
$this->SetXY($xtmp,$ytmp);
|
||||
//$this->Rect($this->GetX(),$this->GetY()+$cth,$cell['width']*$pr,$cbm,'DF');
|
||||
}
|
||||
//draw cell text
|
||||
//if($this->GetY()+$cth*2 > $this->fh-$this->bMargin) { $this->AddPage(); $this->Ln(0); }
|
||||
if(isset($cell['image_path']) && $cell['image_path'] != '') {
|
||||
if(file_exists($cell['image_path'])) {
|
||||
$img_y = $this->GetY();
|
||||
$img_result = $this->Image($cell['image_path'],$this->GetX(),$img_y,$cell['width']*$pr,0);
|
||||
$img_result_bottom = $img_y + $img_result['HEIGHT'];
|
||||
$this->SetXY($this->GetX(), $img_y);
|
||||
//if($img_y + $img_result['HEIGHT'] > $maxy) $maxy = $img_y + $img_result['HEIGHT'];
|
||||
}
|
||||
$c_tmp=$cell['width']*$pr;
|
||||
|
||||
} else
|
||||
$this->Cell($c_tmp=$cell['width']*$pr,$cth,$cell['value'],($cell['border']==1?'LR':''),0,$cell['align'],1);
|
||||
|
||||
$this->SetXY($this->GetX(),$this->GetY()+$cth);
|
||||
//draw bottom cell margin
|
||||
if($rows == $maxRows-1) $this->SetXY($this->GetX(),$this->GetY()+$cbm);
|
||||
|
||||
//set end of text
|
||||
if(($this->GetY()) > $maxy) $maxy = $this->GetY();
|
||||
|
||||
if($this->page > $cp1) { $cy = $this->tMargin; $img_result_bottom = 0; $cp1=$this->page; }
|
||||
$this->SetXY($cx+=$c_tmp,$cy);
|
||||
}
|
||||
|
||||
$this->SetXY($sx,$maxy);
|
||||
}
|
||||
if(isset($img_result_bottom) && $img_result_bottom > $this->GetY()) $this->SetXY($this->GetX(), $img_result_bottom);
|
||||
}
|
||||
|
||||
function DrawHorizontalDottedLine($x1,$x2,$y,$r) {
|
||||
for($i=$x1,$j=0;$i<$x2-$r;$i+=$r,$j++) {
|
||||
if($j%2) $this->_out('1 1 1 RG'); else $this->_out($this->DrawColor);
|
||||
$this->Line($i,$y,$i+$r,$y);
|
||||
}
|
||||
$this->_out($this->DrawColor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
116
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DocumentTemplatePDF.php
Executable file
116
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/DocumentTemplatePDF.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
error_reporting(LC_ALL);
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/DocumentPDF.php');
|
||||
|
||||
class DocumentTemplatePDF extends DocumentPDF {
|
||||
|
||||
private $blnShowHeader = true;
|
||||
private $blnShowFooter = true;
|
||||
|
||||
public $edt; // EcmDocumentTemplate
|
||||
|
||||
public function WorkReportPDF($orientation='P',$unit='mm',$format='A4') {
|
||||
parent::DocumentPDF($orientation,$unit,$format);
|
||||
}
|
||||
public function enableHeader() { $this->blnShowHeader = true; }
|
||||
public function disableHeader() { $this->blnShowHeader = false; }
|
||||
public function enableFooter() { $this->blnShowFooter = true; }
|
||||
public function disableFooter() { $this->blnShowFooter = false; }
|
||||
|
||||
public function Header($content='') {
|
||||
$arr=$this->edt->getTemplateFile($_REQUEST['module']);
|
||||
$nip=$this->edt->footer_nip;
|
||||
$module_t=$_REQUEST['module'];
|
||||
if($_REQUEST['module']=="EcmInsideOrders"){
|
||||
$arr[0]="EcmInsideOrders";$arr[1]="e5";
|
||||
}
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/header.php");
|
||||
}
|
||||
|
||||
public function getBreakLine() {
|
||||
return $this->fh-$this->bMargin+1;
|
||||
}
|
||||
|
||||
public function Footer() {
|
||||
global $mod_strings;
|
||||
//if(!$this->blnShowFooter) return;
|
||||
|
||||
$arr=$this->edt->getTemplateFile($_REQUEST['module']);
|
||||
if($_REQUEST['module']=="EcmInsideOrders"){
|
||||
$arr[0]="EcmInsideOrders";$arr[1]="e5";
|
||||
}
|
||||
//manage pdf types
|
||||
//sales
|
||||
if ($_REQUEST['module']=='EcmSales') {
|
||||
$s = new EcmSale();
|
||||
$s->retrieve($_REQUEST['record']);
|
||||
if ($s->invoice_type=='U' || $s->invoice_type=='I')
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.en.php");
|
||||
else
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.pl.php");
|
||||
return;
|
||||
}
|
||||
//invoices
|
||||
if ($_REQUEST['module']=='EcmInvoiceOuts') {
|
||||
$i = new EcmInvoiceOut();
|
||||
$i->retrieve($_REQUEST['record']);
|
||||
if ($i->pdf_type=='U' || $i->pdf_type=='I')
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.en.php");
|
||||
else
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.pl.php");
|
||||
return;
|
||||
}
|
||||
include("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/footer.php");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Main() {
|
||||
|
||||
global $mod_strings;
|
||||
$arr=$this->edt->getTemplateFile($_REQUEST['module']);
|
||||
|
||||
include_once("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/subheader.php");
|
||||
|
||||
//$this->edt->DrawPositions($this);
|
||||
|
||||
include_once("modules/EcmDocumentTemplates/templates/".$arr[0]."/".$arr[1]."/subfooter.php");
|
||||
|
||||
|
||||
}
|
||||
|
||||
function DrawPositions($positions) {
|
||||
$name_w = 55;
|
||||
if($this->document_info['calc']['draw_discount']) $name_w -= 8;
|
||||
if($this->document_info['calc']['draw_vat']) $name_w -= 8;
|
||||
$table = array();
|
||||
$table [0]['position'] = array('width' => 5, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_POSITION'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['quantity'] = array('width' => 6, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_QUANTITY'],'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['unit'] = array('width' => 6, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_UNIT'],'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['description'] = array('width' => $name_w, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_DESCRIPTION'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['unit_price'] = array('width' => 14, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_SELLING_PRICE'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
if($this->document_info['calc']['draw_discount']) $table [0]['discount'] = array('width' => 8, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_DISCOUNT'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
if($this->document_info['calc']['draw_vat']) $table [0]['vat_id'] = array('width' => 8, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_VAT'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
$table [0]['total'] = array('width' => 14, 'value' => $this->TEXT['LBL_PDF_POSITIONS_LIST_TOTAL'], 'background' => array(233,233,233), 'border' => 1, 'overflow' => 1, 'align' => 'C');
|
||||
|
||||
$i = 1;
|
||||
if($positions != '')
|
||||
foreach($positions as $p) {
|
||||
$table [$i]['position'] = array('width' => 5, 'value' => $i, 'border' => 'LR', 'align' => 'C', );
|
||||
$table [$i]['quantity'] = array('width' => 6, 'value' => $p['quantity'], 'border' => 1, 'align' => 'C', );
|
||||
$table [$i]['unit'] = array('width' => 6, 'value' => $p['unit_id'], 'border' => 1, 'align' => 'C', );
|
||||
$table [$i]['description'] = array('width' => $name_w, 'value' => $p['name'], 'border' => 1, 'align' => 'L', );
|
||||
$table [$i]['unit_price'] = array('width' => 14, 'value' => $p['price'], 'border' => 1, 'align' => 'R', );
|
||||
if($this->document_info['calc']['draw_discount']) $table [$i]['discount'] = array('width' => 8, 'value' => $p['discount'], 'border' => 1, 'align' => 'R', );
|
||||
if($this->document_info['calc']['draw_vat']) $table [$i]['vat_id'] = array('width' => 8, 'value' => $p['vat_id'], 'border' => 1, 'align' => 'R', );
|
||||
$table [$i]['total'] = array('width' => 14, 'value' => $p['total'], 'border' => 1, 'align' => 'R', );
|
||||
$i++;
|
||||
}
|
||||
$this->DrawTable($table);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
?>
|
||||
645
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EcmDocumentTemplate.php
Executable file
645
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EcmDocumentTemplate.php
Executable file
@@ -0,0 +1,645 @@
|
||||
<?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');
|
||||
|
||||
// SHOULD INCLUDE SELECTIVELY
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
|
||||
class EcmDocumentTemplate 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 $place_of_register;
|
||||
|
||||
var $logo_path;
|
||||
|
||||
var $logo_id;
|
||||
var $logo_name;
|
||||
|
||||
var $account_name;
|
||||
var $account_id;
|
||||
var $account_number;
|
||||
|
||||
//footer
|
||||
var $footer_account;
|
||||
var $footer_address;
|
||||
var $footer_phone;
|
||||
var $footer_fax;
|
||||
var $footer_krs;
|
||||
var $footer_nip;
|
||||
var $footer_regon;
|
||||
var $footer_capital;
|
||||
var $footer_management;
|
||||
var $footer_swift;
|
||||
var $footer_bankname;
|
||||
var $footer_vatid;
|
||||
var $document_number_format_id;
|
||||
var $documents_per_day_id;
|
||||
var $documents_per;
|
||||
// var $document_number_letter;
|
||||
// var $correct_number_letter;
|
||||
var $ecmlanguage;
|
||||
var $footer_text;
|
||||
var $header_text;
|
||||
var $show_header_on_all_pages;
|
||||
var $show_footer_on_all_pages;
|
||||
|
||||
var $template_files_defs;
|
||||
var $docs=array("EcmInsideOrders","EcmQuotes","EcmSales","EcmPurchaseOrders","EcmDeliveryNotes","EcmInvoiceOuts","EcmReceiptOuts","EcmStockDocIns","EcmStockDocOuts", "EcmStockDocInsideIns","EcmStockDocInsideOuts", "EcmStockDocMoves", "EcmTemplates", "EcmDocuments","EcmStockDocCorrects");
|
||||
|
||||
|
||||
var $pdf;
|
||||
var $account;
|
||||
var $mfp;
|
||||
|
||||
|
||||
// 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 = 'EcmDocumentTemplates';
|
||||
var $table_name = "ecmdocumenttemplates";
|
||||
var $object_name = "EcmDocumentTemplate";
|
||||
|
||||
//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 EcmDocumentTemplate() {
|
||||
parent::SugarBean();
|
||||
$this->setupCustomFields('EcmDocumentTemplates');
|
||||
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 .= "
|
||||
ecmdocumenttemplates.*
|
||||
,users.user_name as assigned_user_name";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmdocumenttemplates
|
||||
LEFT JOIN users
|
||||
ON ecmdocumenttemplates.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 ecmdocumenttemplates.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function create_export_query($order_by, $where){
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT
|
||||
ecmdocumenttemplates.*,
|
||||
users.user_name assigned_user_name";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmdocumenttemplates ";
|
||||
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmdocumenttemplates.assigned_user_id=users.id";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$query .= "";
|
||||
$where_auto = " ecmdocumenttemplates.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 ecmdocumenttemplates.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);
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $current_language;
|
||||
$the_array = parent::get_list_view_data();
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
$mod_strings = return_module_language($current_language, 'EcmDocumentTemplates');
|
||||
// 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);
|
||||
$the_array['ENCODED_NAME'] = $this->name;
|
||||
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, "ecmdocumenttemplates.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("ECMDOCUMENTTEMPLATES_DESCRIPTION", $ecmdocumenttemplates->description);
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE){
|
||||
if($this->polish_correct_format == 'on') $this->polish_correct_format = 1; else $this->polish_correct_format = 0;
|
||||
if($this->change_all_old_records == 1) {
|
||||
$this->UpdateFormatNumber("EcmQuotes", "ecmquotes");
|
||||
$this->UpdateFormatNumber("EcmSales", "ecmsales");
|
||||
$this->UpdateFormatNumber("EcmInvoiceOuts", "ecminvoiceouts");
|
||||
$this->UpdateFormatNumber("EcmWorkReports", "ecmworkreports");
|
||||
$this->UpdateFormatNumber("EcmDeliveryNotes", "ecmdeliverynotes");
|
||||
}
|
||||
$arr=array();
|
||||
foreach($this->docs as $d){
|
||||
$arr[$d]=$_REQUEST[$d."_file"];
|
||||
}
|
||||
$tfd=base64_encode(serialize($arr));
|
||||
$this->template_files_defs=$tfd;
|
||||
return parent::save($check_notify);
|
||||
}
|
||||
|
||||
public function UpdateFormatNumber($module, $table_name, $field_number = 'number', $field_formatted_number = 'document_no', $field_template_id = 'template_id') {
|
||||
$query = "SELECT `id`, `$field_number` as `number` FROM `$table_name` WHERE `$field_template_id`='$this->id' ORDER BY `date_entered` ASC";
|
||||
$results = $GLOBALS['db']->query($query);
|
||||
if(is_resource($results)) {
|
||||
$numberPrefix = $this->getNumberPrefix($module);
|
||||
while($row = $GLOBALS['db']->fetchByAssoc($results)) {
|
||||
$new_number = $this->formatNumber($row['number'], $module, $table_name, $field_number, $numberPrefix);
|
||||
$query = "UPDATE `$table_name` SET `$field_formatted_number`='$new_number' WHERE `id`='".$row['id']."'";
|
||||
$this->db->query($query);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function retrieveByAccountId($id) {
|
||||
$query = "select id from ecmdocumenttemplates where account_id='".$id."' AND deleted=0 limit 1";
|
||||
$result = mysql_query($query);
|
||||
if(!$result) return '';
|
||||
$idtmp = mysql_fetch_array($result);
|
||||
$this->retrieve($idtmp[0]);
|
||||
$this->unformat_all_fields();
|
||||
}
|
||||
|
||||
function setPDF($id) {
|
||||
$this->retrieve($id);
|
||||
if($this->id == '') return;
|
||||
$this->format_all_fields();
|
||||
$this->setAccount();
|
||||
$this->loadParser();
|
||||
$this->header_text = $this->mfp->parseText($this->header_text);
|
||||
$this->footer_text = $this->mfp->parseText($this->footer_text);
|
||||
|
||||
$address = $this->account->name;
|
||||
if($this->account->billing_address_street) $address .= " - ".$this->account->billing_address_street;
|
||||
if($this->account->billing_address_postalcode) $address .= " - ".$this->account->billing_address_postalcode;
|
||||
if($this->account->billing_address_city) $address .= " ".$this->account->billing_address_city;
|
||||
$this->address = $address;
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/DocumentTemplatePDF.php');
|
||||
$this->pdf = new DocumentTemplatePDF();
|
||||
$this->pdf->edt = $this;
|
||||
$this->pdf->SetXY(25,25);
|
||||
$this->pdf->SetLineWidth(0);
|
||||
$this->pdf->SetDrawColor(0,0,0);
|
||||
$this->pdf->SetFont('Arial', '', 8);
|
||||
$this->pdf->AddPage();
|
||||
|
||||
}
|
||||
|
||||
function outputPDF($name='auto_pdf.pdf',$method = 'I') {
|
||||
if($method == "S")
|
||||
echo $this->pdf->Output($name,$method);
|
||||
else
|
||||
$this->pdf->Output($name,$method);
|
||||
}
|
||||
|
||||
function getPDF($id,$name='auto_pdf.pdf',$method = 'I') {
|
||||
$this->setPDF($id);
|
||||
$this->outputPDF($name,$method);
|
||||
}
|
||||
|
||||
function setAccount() {
|
||||
if(isset($this->account_id) && $this->account_id != '') {
|
||||
require_once('modules/Accounts/Account.php');
|
||||
$this->account = new Account();
|
||||
$this->account->retrieve($this->account_id);
|
||||
}
|
||||
}
|
||||
|
||||
function loadParser() {
|
||||
if(isset($this->mfp) && $this->mfp != '') return true;
|
||||
$path = 'modules/EcmDocumentTemplates/ModuleFieldsParser/ModuleFieldsParser.php';
|
||||
if(file_exists($path)) {
|
||||
require_once($path);
|
||||
$this->mfp = new ModuleFieldsParser();
|
||||
$this->mfp->modules['EcmDocumentTemplates']['focus'] = $this;
|
||||
if(!isset($this->account->id) || $this->account->id == '') {
|
||||
if(isset($this->account_id) && $this->account_id != '') {
|
||||
$this->setAccount();
|
||||
$this->mfp->modules['Accounts']['focus'] = $this->account;
|
||||
}
|
||||
} else
|
||||
$this->mfp->modules['Accounts']['focus'] = $this->account;
|
||||
|
||||
require_once('modules/Users/User.php');
|
||||
$us = new User();
|
||||
global $current_user;
|
||||
$us->retrieve(($this->assigned_user_id)?$this->assigned_user_id:$current_user->id);
|
||||
if(isset($us->id) && $us->id != '') {
|
||||
$this->mfp->modules['Users']['focus'] = $us;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
function generateNumber($table_name, $field_name = 'number') {
|
||||
|
||||
$number = date("Y");
|
||||
|
||||
if($table_name=="ecminvoiceouts")
|
||||
$query = "SELECT COUNT(*) as `count` FROM `$table_name` WHERE `ecminvoiceout_id` is null and `".$field_name."` LIKE '".$number."%' AND deleted='0' ORDER BY `".$field_name."` DESC LIMIT 1";
|
||||
|
||||
else $query = "SELECT COUNT(*) as `count` FROM `$table_name` WHERE correct_id is null and `".$field_name."` LIKE '".$number."%' ORDER BY `".$field_name."` DESC LIMIT 1";
|
||||
|
||||
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$count = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($count['count']);
|
||||
//różnice między systemami - skasować po nowym roku:
|
||||
if ($table_name=='ecminvoiceouts')
|
||||
$count = $count - 14;
|
||||
} else $count = 1;
|
||||
|
||||
|
||||
|
||||
$number = date("Ymd");
|
||||
$number .= sprintf("%d", ++$count);
|
||||
|
||||
|
||||
return $number;
|
||||
|
||||
}
|
||||
|
||||
function getNumberPrefix($module) {
|
||||
$mod_strings2 = array();
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
if(isset($this->ecmlanguage) && $this->ecmlanguage != '') {
|
||||
$data = EcmText::LoadText(null,null,$module,$this->ecmlanguage);
|
||||
if(isset($data[0]) && isset($data[0]['data']) && isset($data[0]['data']['labels'])) {
|
||||
$data = $data[0]['data']['labels'];
|
||||
foreach($data as $key => $value) {
|
||||
$mod_strings2[$value['label']] = $value['translation'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $mod_strings2['LBL_PDF_CODE'];
|
||||
}
|
||||
|
||||
function formatNumber($number, $module, $table_name = '', $field_name = 'number', $numberPrefix = null) {
|
||||
|
||||
if($table_name == '') $table_name = strtolower($module);
|
||||
|
||||
if($this->documents_per != "year") {
|
||||
|
||||
$from_number = strval(substr($number,0,4));
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$query = "SELECT COUNT(*) as `count`";
|
||||
$query .= " FROM `".$table_name."`";
|
||||
$query .= " WHERE ";
|
||||
if($table_name=="ecminvoiceouts")$query .= " ecminvoiceout_id is null and ";
|
||||
else $query .= " correct_id is null and ";
|
||||
$query .= " SUBSTRING(`number`, 1, 4) = '".$from_number."'";
|
||||
|
||||
if($this->documents_per == "month") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,6) = '".substr($number,0,6)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
else if($this->documents_per == "day") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,8) = '".substr($number,0,8)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
$query .= ";";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
|
||||
if(is_resource($result)) {
|
||||
$tmp = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($tmp['count']);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
$number = substr($number,0,8).strval($count);
|
||||
|
||||
}
|
||||
|
||||
if($numberPrefix == null)
|
||||
$numberPrefix = $this->getNumberPrefix($module);
|
||||
if($this->id=="57d2b950-00c8-62b7-16bb-4d678a086f05" || $this->id=="d48b9458-bf48-d30f-7f7c-4bb074833504"){
|
||||
$a1=array("001/E","002/E","003/E","004/E","005/E","006/E","007/E","008/E","009/E","010/E","011/E","012/E","013/E","014/E","015/E","016/E","017/E","018/E","019/E");
|
||||
$a2=array("1/E","2/E","3/E","4/E","5/E","6/E","7/E","8/E","9/E","10/E","11/E","12/E","13/E","14/E","15/E","16/E","17/E","18/E","19/E");
|
||||
$nnoo=str_replace($a1,$a2,$this->formatDocumentNumber($number, $numberPrefix));
|
||||
$t = explode("/", $nnoo);
|
||||
if (substr($t[0],0,1) == "0") {
|
||||
//return $t[0];
|
||||
$t[0] = substr($t[0], 1, strlen($t[0]));
|
||||
$nnoo = implode("/",$t);
|
||||
}
|
||||
if ($this->id=="57d2b950-00c8-62b7-16bb-4d678a086f05") return str_replace("E", "U", $nnoo);
|
||||
return $nnoo;
|
||||
}
|
||||
else $nnoo=$this->formatDocumentNumber($number, $numberPrefix);
|
||||
return $nnoo;
|
||||
}
|
||||
|
||||
function generateNumberCorrect($table_name, $field_name = 'number') {
|
||||
|
||||
$number = date("Y");
|
||||
|
||||
if($table_name=="ecminvoiceouts"){
|
||||
$query="SELECT COUNT(*) as count FROM ecminvoiceouts WHERE deleted='0' and (ecminvoiceout_id is not null or ecminvoiceout_id!='') and type='correct' and number LIKE '".$number."%' ORDER BY number DESC limit 1";
|
||||
}
|
||||
else $query = "SELECT COUNT(*) as `count` FROM `$table_name` WHERE `correct_id` is not null and `".$field_name."` LIKE '".$number."%' ORDER BY `".$field_name."` DESC LIMIT 1";
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$count = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($count['count']);
|
||||
|
||||
//różnice między systemami - skasować po nowym roku:
|
||||
if ($table_name=='ecminvoiceouts')
|
||||
$count = $count - 6;
|
||||
} else $count = 1;
|
||||
|
||||
$number = date("Ymd");
|
||||
$number .=$count;
|
||||
|
||||
return $number;
|
||||
}
|
||||
function getNumberPrefixCorrect($module) {
|
||||
$mod_strings2 = array();
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
if(isset($this->ecmlanguage) && $this->ecmlanguage != '') {
|
||||
$data = EcmText::LoadText(null,null,$module,$this->ecmlanguage);
|
||||
if(isset($data[0]) && isset($data[0]['data']) && isset($data[0]['data']['labels'])) {
|
||||
$data = $data[0]['data']['labels'];
|
||||
foreach($data as $key => $value) {
|
||||
$mod_strings2[$value['label']] = $value['translation'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $mod_strings2['LBL_PDF_CODE_CORRECT'];
|
||||
}
|
||||
|
||||
function formatNumberCorrect($number, $module, $table_name = '', $field_name = 'number', $numberPrefix = null) {
|
||||
|
||||
if($table_name == '') $table_name = strtolower($module);
|
||||
|
||||
if($this->documents_per != "year") {
|
||||
|
||||
$from_number = strval(substr($number,0,4));
|
||||
|
||||
$GLOBALS['db'] = new MysqlManager();
|
||||
$GLOBALS['db']->connect();
|
||||
$query = "SELECT COUNT(*) as `count`";
|
||||
$query .= " FROM `".$table_name."`";
|
||||
$query .= " WHERE ";
|
||||
if($table_name=="ecminvoiceouts")$query .= " ecminvoiceout_id is not null and ";
|
||||
else $query .= " correct_id is not null and ";
|
||||
$query .= " SUBSTRING(`number`, 1, 4) = '".$from_number."'";
|
||||
if($this->documents_per == "month") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,6) = '".substr($number,0,6)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
else if($this->documents_per == "day") {
|
||||
$query .= " AND";
|
||||
$query .= " SUBSTRING(`number`,1,8) = '".substr($number,0,8)."'";
|
||||
$query .= " AND";
|
||||
$query .= " CAST(`number` AS UNSIGNED) < ".$number;
|
||||
}
|
||||
$query .= ";";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
if(is_resource($result)) {
|
||||
$tmp = $GLOBALS['db']->fetchByAssoc($result);
|
||||
$count = intval($tmp['count']);
|
||||
$count ++;
|
||||
}
|
||||
|
||||
$number = substr($number,0,8).strval($count);
|
||||
|
||||
}
|
||||
|
||||
if($numberPrefix == null)
|
||||
$numberPrefix = $this->getNumberPrefixCorrect($module);
|
||||
return $this->formatDocumentNumber($number, $numberPrefix);
|
||||
}
|
||||
|
||||
function formatDocumentNumber($documentNumber = '', $code = '') {
|
||||
$cf = '';
|
||||
$format = $this->document_number_format_id;
|
||||
$format = str_replace('CODE', '[cOdE]', $format);
|
||||
$ARR1 = array ('y', 'Y', 'M', 'D', 'NR', '[cOdE]');
|
||||
$ARR2 = array (substr($documentNumber,2,2), substr($documentNumber,0,4), substr($documentNumber,4,2), substr($documentNumber,6,2), substr($documentNumber,8));
|
||||
$ARR2[4] = sprintf("%0".$this->documents_per_day_id."d",$ARR2[4]);
|
||||
$ARR2[5] = $code;
|
||||
$nno=str_replace($ARR1,$ARR2,$format).$cf;
|
||||
$exp=explode(" ",$nno);
|
||||
if($exp[0]=="")$nno=$exp[1];
|
||||
return $nno;;
|
||||
}
|
||||
|
||||
|
||||
function getListOfTemplateFiles($path,$module){
|
||||
if(!file_exists($path.$module))$module="Other";
|
||||
if($handle=opendir($path.$module)) {
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
if($file!="." && $file!=".." && is_dir($path.$module."/".$file))$arr[]=$file;
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
function selectTemplateFile($module,$files,$value){
|
||||
$html='<select name="'.$module.'_file" id="'.$module.'_file">';
|
||||
foreach($files as $f){
|
||||
$html.='<option value="'.$f.'"';
|
||||
if($value==$f)$html.=' selected';
|
||||
$html.='>'.$f.'</option>';
|
||||
}
|
||||
$html.='</select>';
|
||||
return $html;
|
||||
}
|
||||
function getTemplateFile($module, $type = null){
|
||||
$arr=unserialize(base64_decode($this->template_files_defs));
|
||||
if(
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/header.php") &&
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/footer.php") &&
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/subheader.php") &&
|
||||
file_exists("modules/EcmDocumentTemplates/templates/".$module."/".$arr[$module]."/subfooter.php")
|
||||
)return array($module,$arr[$module]);
|
||||
else return array("Other",$arr[$module]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
76
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EcmDocumentTemplates.js
Executable file
76
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EcmDocumentTemplates.js
Executable file
@@ -0,0 +1,76 @@
|
||||
|
||||
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 changeValidateRequired(formname,name,required) {
|
||||
for(var i=0; i<validate[formname].length; i++)
|
||||
if(validate[formname][i][0] == name) { validate[formname][i][2] = required; break; }
|
||||
}
|
||||
|
||||
function set_focus() { document.getElementById('name').focus(); }
|
||||
|
||||
function my_popup(module, field_array, call_back_function, form_name) {
|
||||
if(!call_back_function) call_back_function = "set_return";
|
||||
if(!form_name) form_name = "EditView";
|
||||
return open_popup(module, 600, 400, "", true, false, {"call_back_function":call_back_function,"form_name":form_name,"field_to_name_array":field_array});
|
||||
}
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
function updatePreviewNumber() {
|
||||
doRequest(
|
||||
'index.php',
|
||||
'module=EcmDocumentTemplates&action=formatDocumentNumber&to_pdf=1&ex=1&f='+document.getElementById('document_number_format_id').value+'&d='+document.getElementById('documents_per_day_id').value,
|
||||
function (response) { var dnfp = document.getElementById('doc_num_for_prev'); if(dnfp) dnfp.innerHTML = '('+response+')'; }
|
||||
)
|
||||
}
|
||||
|
||||
function deleteLogo() {
|
||||
var div = document.getElementById('logoDiv');
|
||||
if(div) div.parentNode.removeChild(div);
|
||||
}
|
||||
|
||||
var accountFL;
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function () {
|
||||
|
||||
//adding a div to document_number_format_id
|
||||
var dnfi = document.getElementById('document_number_format_id');
|
||||
if(dnfi) {
|
||||
var span = document.createElement('span');
|
||||
span.id = 'doc_num_for_prev';
|
||||
span.appendChild(document.createTextNode('()'));
|
||||
dnfi.parentNode.appendChild(span);
|
||||
}
|
||||
addEvent(dnfi, 'change', function () {updatePreviewNumber();});
|
||||
addEvent('documents_per_day_id', 'change', function () {updatePreviewNumber();});
|
||||
updatePreviewNumber();
|
||||
|
||||
|
||||
//create Account
|
||||
accountFL = new FormLoader();
|
||||
accountFL.load('EcmDocumentTemplates','Accounts','accountFL');
|
||||
accountFL.onResponseData = function(data) {
|
||||
document.forms.EditView.account_id.value = data['id'];
|
||||
document.forms.EditView.account_name.value = data['name'];
|
||||
};
|
||||
accountFL.setEditDblClick(document.forms.EditView.account_name);
|
||||
accountFL.onEditDblClick = function() { return "&fl_record="+document.forms.EditView.account_id.value; }
|
||||
accountFL.onButtonClick = function() { return "&fl_name="+document.forms.EditView.account_name.value; }
|
||||
//document.forms.EditView.account_id.parentNode.appendChild(accountFL.createButton());
|
||||
}
|
||||
);
|
||||
48
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EditView.php
Executable file
48
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EditView.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?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/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('modules/EcmDocumentTemplates/Forms.php');
|
||||
require_once('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
if(isset($_REQUEST['record'])){
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
}
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmDocumentTemplates/views/EditView/view.edit.my.php');
|
||||
$edit = new ViewEditEcmDocumentTemplates();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->bean = $focus;
|
||||
|
||||
$edit->preDisplay();
|
||||
|
||||
$arr=unserialize(base64_decode($focus->template_files_defs));
|
||||
$dir_path="modules/EcmDocumentTemplates/templates/";
|
||||
$docs=$focus->docs;
|
||||
|
||||
$tf='<table cellspacing="0" cellpadding="0" border="0" width="100%">';
|
||||
foreach($docs as $d){
|
||||
$tf.='<tr>
|
||||
<td width="20%">'.$app_list_strings['moduleList'][$d].'</td>
|
||||
<td width="80%">'.$focus->selectTemplateFile($d,$focus->getListOfTemplateFiles($dir_path,$d),$arr[$d]).'</td>
|
||||
</tr>';
|
||||
}
|
||||
$tf.='</table>';
|
||||
$edit->ss->assign("TEMPLATE_FILES",$tf);
|
||||
echo $edit->display();
|
||||
|
||||
?>
|
||||
205
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EditView2.html
Executable file
205
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EditView2.html
Executable file
@@ -0,0 +1,205 @@
|
||||
<!--
|
||||
/*****************************************************************************
|
||||
* 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.
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
|
||||
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<form name="EditView" method="POST" enctype="multipart/form-data" action="index.php">
|
||||
<input type="hidden" name="module" value="EcmDocumentTemplates">
|
||||
<input type="hidden" name="record" value="{ID}">
|
||||
<input type="hidden" name="action">
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
||||
<input type="hidden" name="return_id" value="{RETURN_ID}">
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
||||
<input type="hidden" name="contact_id" value="{CONTACT_ID}">
|
||||
<input type="hidden" name="email_id" value="{EMAIL_ID}">
|
||||
<input type="hidden" name="case_id" value="{CASE_ID}">
|
||||
<!--// InboundEmail support //-->
|
||||
<input type="hidden" name="inbound_email_id" value="{INBOUND_EMAIL_ID}">
|
||||
<input type="hidden" name="start" value="{START}">
|
||||
<input type="hidden" name="type" value="{TYPE}">
|
||||
<td style="padding-bottom: 2px;">
|
||||
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button"
|
||||
onclick="this.form.action.value='Save';return check_form('EditView');"
|
||||
type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
|
||||
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button"
|
||||
onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'"
|
||||
type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
|
||||
</td>
|
||||
<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
|
||||
<td align='right'>{ADMIN_EDIT}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabForm">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td width="15%" class="dataLabel"><span sugar='slot1'>{MOD.LBL_NAME} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></span sugar='slot'></td>
|
||||
<td width="35%" class="dataField"><span sugar='slot1b'><input name='name' type="text" tabindex='1' size='35' maxlength='50' value="{NAME}"></span sugar='slot'></td>
|
||||
<td class="dataLabel" ><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
|
||||
<td class="dataField"><span sugar='slot2b'>
|
||||
<input class="sqsEnabled" tabindex="2" autocomplete="off" id="assigned_user_name" name='assigned_user_name' type="text" value="{ASSIGNED_USER_NAME}">
|
||||
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{ASSIGNED_USER_ID}" />
|
||||
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" class="button" value='{APP.LBL_SELECT_BUTTON_LABEL}' name='btn1' onclick='open_popup("Users", 600, 400, "", true, false, {encoded_users_popup_request_data});' /></span sugar='slot'>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel"><span sugar='slot3'>{MOD.LBL_LOGO_PATH}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField">
|
||||
<span sugar='slot3b'>
|
||||
<input name='logo_path' title="{MOD.LBL_LOGO_PATH}" type="file" type="text" tabindex='3' maxlength='255' value="{LOGO_PATH}">
|
||||
</span sugar='slot'>
|
||||
</td>
|
||||
|
||||
<td valign="top" class="dataLabel"><span sugar='slot4'>{MOD.LBL_ACCOUNT_NAME}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField"><span sugar='slot4b'>
|
||||
<input class="sqsEnabled" tabindex="1" autocomplete="off" id="account_name" name="account_name" type="text" onDblclick='window.open("index.php?module=Accounts&action=CreateAccountQuickWindow&to_pdf=1&account_id="+document.getElementById("account_id").value+"&account_name="+document.getElementById("account_name").value+"&assigned_user_id="+document.getElementById("assigned_user_id").value,"Account","resizable=yes,scrollbars=yes,status=no,height=450,width=600").focus();return false;' value="{ACCOUNT_NAME}" />
|
||||
<input id="account_id" name="account_id" type="hidden" value="{ACCOUNT_ID}" />
|
||||
<input title="{APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{APP.LBL_SELECT_BUTTON_KEY}" type="button" tabindex="1" class="button" value="{APP.LBL_SELECT_BUTTON_LABEL}" name="bn2" onclick='open_popup("Accounts", 600, 400, "", true, false, {encoded_accounts_popup_request_data});' />
|
||||
<input name="createaccount" type="button" onClick='window.open("index.php?module=Accounts&action=CreateAccountQuickWindow&to_pdf=1&assigned_user_id="+document.getElementById("assigned_user_id").value,"Account","resizable=yes,scrollbars=yes,status=no,height=450,width=600").focus();return false;' class="button" id="createaccount" value="Create" />
|
||||
</span sugar='slot'>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel"><span sugar='slot6'>{MOD.LBL_DOCUMENT_NUMBER_FORMAT_ID}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField"><span sugar='slot6'><select name='document_number_format_id' id='document_number_format_id' onChange="doc_num_for_prev();" style="width:90px;" tabindex='1'>{DOCUMENT_NUMBER_FORMAT_OPTIONS}</select>(<span id="doc_num_for_prev"></span>)</span sugar='slot'></td>
|
||||
<script language="javascript">
|
||||
function doc_num_for_prev() {
|
||||
this.Display = function(result) { document.getElementById('doc_num_for_prev').innerHTML = result.responseText;}
|
||||
this.Fail = function() {};
|
||||
YAHOO.util.Connect.asyncRequest('POST','index.php',{success:this.Display,failure:this.Fail},'module=EcmDocumentTemplates&action=formatDocumentNumber&to_pdf=1&ex=1&f='+document.getElementById('document_number_format_id').value+'&d='+document.getElementById('documents_per_day_id').value);
|
||||
}
|
||||
</script>
|
||||
<td valign="top" class="dataLabel"><span sugar='slot6'>{MOD.LBL_DOCUMENTS_PER_DAY_ID}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField"><span sugar='slot6'><select name='documents_per_day_id' id='documents_per_day_id' onChange="doc_num_for_prev();" tabindex='1'>{DOCUMENTS_PER_DAY_OPTIONS}</select></span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel"><span sugar='slot6'>{MOD.LBL_DOCUMENT_NUMBER_LETTER}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField"><span sugar='slot6'><input type="text" class="text" style="width:40px;" id="document_number_letter" name="document_number_letter" tabindex="1" lenght="1" value="{DOCUMENT_NUMBER_LETTER}"/></span sugar='slot'></td>
|
||||
<td valign="top" class="dataLabel"><span sugar='slot6'>{MOD.LBL_CORRECT_NUMBER_LETTER}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField"><span sugar='slot6'><input type="text" class="text" style="width:40px;" id="correct_number_letter" name="correct_number_letter" tabindex="1" lenght="1" value="{CORRECT_NUMBER_LETTER}"/></span sugar='slot'></td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel">{MOD.LBL_FOOTER_ACCOUNT}</td>
|
||||
<td valign="top" class="dataField"><input name="footer_account" type="text" id="footer_account" value="{FOOTER_ACCOUNT}" /></td>
|
||||
<td valign="top" class="dataLabel"><span sugar='slot6'>{MOD.LBL_ACCOUNT_NUMBER}</span sugar='slot'></td>
|
||||
<td valign="top" class="dataField"><span sugar='slot6b'>
|
||||
<input name='account_number' title="{MOD.LBL_ACCOUNT_NUMBER}" type="text" tabindex='6' maxlength='255' value="{ACCOUNT_NUMBER}">
|
||||
</span sugar='slot'>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel">{MOD.LBL_FOOTER_ADDRESS}</td>
|
||||
<td valign="top" class="dataField"><input name="footer_address" type="text" id="footer_address" value="{FOOTER_ADDRESS}" /></td>
|
||||
<td class="dataLabel">{MOD.LBL_FOOTER_KRS}</td>
|
||||
<td class="dataField"><input name="footer_krs" type="text" id="footer_krs" value="{FOOTER_KRS}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel">{MOD.LBL_FOOTER_PHONE}</td>
|
||||
<td valign="top" class="dataField"><input name="footer_phone" type="text" id="footer_phone" value="{FOOTER_PHONE}" /></td>
|
||||
<td class="dataLabel">{MOD.LBL_FOOTER_REGON}</td>
|
||||
<td class="dataField"><input name="footer_regon" type="text" id="footer_regon" value="{FOOTER_REGON}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel">{MOD.LBL_FOOTER_FAX}</td>
|
||||
<td valign="top" class="dataField"><input name="footer_fax" type="text" id="footer_fax" value="{FOOTER_FAX}" /></td>
|
||||
<td class="dataLabel">{MOD.LBL_FOOTER_CAPITAL}</td>
|
||||
<td class="dataField"><input name="footer_capital" type="text" id="footer_capital" value="{FOOTER_CAPITAL}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel">{MOD.LBL_FOOTER_SWIFT}</td>
|
||||
<td valign="top" class="dataField"><input name="footer_swift" type="text" id="footer_swift" value="{FOOTER_SWIFT}" /></td>
|
||||
<td class="dataLabel">{MOD.LBL_FOOTER_MANAGEMENT}</td>
|
||||
<td class="dataField"><input name="footer_management" type="text" id="footer_management" value="{FOOTER_MANAGEMENT}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel">{MOD.LBL_FOOTER_BANKNAME}</td>
|
||||
<td valign="top" class="dataField"><input name="footer_bankname" type="text" id="footer_bankname" value="{FOOTER_BANKNAME}" /></td>
|
||||
<td class="dataLabel">{MOD.LBL_FOOTER_NIP}</td>
|
||||
<td class="dataField"><input name="footer_nip" type="text" id="footer_nip" value="{FOOTER_NIP}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="dataLabel"> </td>
|
||||
<td valign="top" class="dataField">{FORMFILE}</td>
|
||||
<td class="dataLabel">{MOD.LBL_FOOTER_VATID}</td>
|
||||
<td class="dataField"><input name="footer_vatid" type="text" id="footer_vatid" value="{FOOTER_VATID}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="padding-top: 2px">
|
||||
<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.action.value='Save';return check_form('EditView');" type="submit" name="button" value=" {APP.LBL_SAVE_BUTTON_LABEL} " >
|
||||
<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value=" {APP.LBL_CANCEL_BUTTON_LABEL} ">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{JAVASCRIPT}
|
||||
{JAVASCRIPT_VALIDATE}
|
||||
<script language="javascript">
|
||||
doc_num_for_prev();
|
||||
PolishCorrectFormatChange();
|
||||
</script>
|
||||
<!-- END: main -->
|
||||
362
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EditView2.php
Executable file
362
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/EditView2.php
Executable file
@@ -0,0 +1,362 @@
|
||||
<?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 SUPPPORT MODULES
|
||||
require_once('XTemplate/xtpl.php');
|
||||
require_once('data/Tracker.php');
|
||||
|
||||
// INCLUDE MODULE OBJECT AND FORMS
|
||||
require_once('modules/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('modules/EcmDocumentTemplates/Forms.php');
|
||||
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
// INSTANTIATES THE MODULE CLASSES
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
// IF PROCESSING AN EXISTING RECORD, RETRIEVE IT
|
||||
if(isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
$focus->unformat_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("EcmDocumentTemplates detail view");
|
||||
|
||||
// ASSIGN XTEMPLATE
|
||||
$xtpl = new XTemplate ('modules/EcmDocumentTemplates/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' => 'account_id',
|
||||
'name' => 'account_name',
|
||||
),
|
||||
);
|
||||
$xtpl->assign("encoded_accounts_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' => 'account_id',
|
||||
'name' => 'account_name',
|
||||
),
|
||||
);
|
||||
$json = getJSONobj();
|
||||
$xtpl->assign('encoded_account_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(),
|
||||
'account_name' => array (
|
||||
'method' => 'query',
|
||||
'modules' => array('Accounts'),
|
||||
'field_list' => array('name', 'id'),
|
||||
'populate_list' => array('account_name', 'account_id'),
|
||||
'conditions' => array (
|
||||
array('name'=>'name','op'=>'like_custom','end'=>'%','value'=>''),
|
||||
array('name'=>'name','op'=>'like_custom','begin'=>'% ','end'=>'%','value'=>'')
|
||||
),
|
||||
'group' => 'or',
|
||||
'order' => 'name',
|
||||
'limit' => '300',
|
||||
'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
|
||||
$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 );
|
||||
|
||||
//footer
|
||||
|
||||
$xtpl->assign("FOOTER_ACCOUNT", $focus->footer_account );
|
||||
$xtpl->assign("FOOTER_ADDRESS", $focus->footer_address );
|
||||
$xtpl->assign("FOOTER_PHONE", $focus->footer_phone );
|
||||
$xtpl->assign("FOOTER_FAX", $focus->footer_fax );
|
||||
$xtpl->assign("FOOTER_KRS", $focus->footer_krs );
|
||||
$xtpl->assign("FOOTER_NIP", $focus->footer_nip );
|
||||
$xtpl->assign("FOOTER_REGON", $focus->footer_regon );
|
||||
$xtpl->assign("FOOTER_CAPITAL", $focus->footer_capital );
|
||||
$xtpl->assign("FOOTER_MANAGEMENT", $focus->footer_management );
|
||||
$xtpl->assign("FOOTER_SWIFT", $focus->footer_swift );
|
||||
$xtpl->assign("FOOTER_BANKNAME", $focus->footer_bankname );
|
||||
$xtpl->assign("FOOTER_VATID", $focus->footer_vatid );
|
||||
|
||||
|
||||
if(isset($focus->document_number_format_id)) $xtpl->assign("DOCUMENT_NUMBER_FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['ecmdocumenttemplates_document_number_format_dom'], $focus->document_number_format_id));
|
||||
else $xtpl->assign("DOCUMENT_NUMBER_FORMAT_OPTIONS", get_select_options_with_id($app_list_strings['ecmdocumenttemplates_document_number_format_dom'], ''));
|
||||
|
||||
if(isset($focus->documents_per_day_id)) $xtpl->assign("DOCUMENTS_PER_DAY_OPTIONS", get_select_options_with_id($app_list_strings['ecmdocumenttemplates_documents_per_day_dom'], $focus->documents_per_day_id));
|
||||
else $xtpl->assign("DOCUMENTS_PER_DAY_OPTIONS", get_select_options_with_id($app_list_strings['ecmdocumenttemplates_documents_per_day_dom'], ''));
|
||||
|
||||
$xtpl->assign("DOCUMENT_NUMBER_LETTER", $focus->document_number_letter);
|
||||
$xtpl->assign("CORRECT_NUMBER_LETTER", $focus->correct_number_letter);
|
||||
|
||||
// ASSIGN MODULE SPECIFIC VARIABLES
|
||||
|
||||
require_once('modules/EcmDocumentTemplates/FileUpload.php');
|
||||
$f = new FileUpload();
|
||||
// $xtpl->assign("FORMFILE", $f->getFormHTML());
|
||||
$xtpl->assign("LOGO_PATH", $focus->logo_path);
|
||||
|
||||
|
||||
$xtpl->assign("ACCOUNT_NAME", $focus->account_name);
|
||||
|
||||
|
||||
$xtpl->assign("ACCOUNT_ID", $focus->account_id);
|
||||
|
||||
|
||||
$xtpl->assign("ACCOUNT_NUMBER", $focus->account_number);
|
||||
|
||||
/*
|
||||
$xtpl->assign("CURRENCY", $focus->currency);
|
||||
if (!empty($_REQUEST['table_currency'])) {
|
||||
$xtpl->assign("TABLE_CURRENCY", "checked");
|
||||
}
|
||||
|
||||
|
||||
if ($focus->table_currency == '1') $xtpl->assign("TABLE_CURRENCY", "checked");
|
||||
*/
|
||||
// ASSIGN MODULE DROPDOWNS WITH DEFAULT KEY
|
||||
|
||||
// ASSIGN MODULE VARIABLES AFFECTED BY DUPLICATE ACTION
|
||||
if(!isset($_REQUEST['isDuplicate'])) {
|
||||
$focus->id = "";
|
||||
}
|
||||
|
||||
|
||||
// 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>");
|
||||
}
|
||||
|
||||
$currency="";
|
||||
$currency.="<select name='currency'><option value='pln'";
|
||||
if($focus->currency=="pln")$currency.=" selected";
|
||||
$currency.=">PLN</option><option value='eur'";
|
||||
if($focus->currency=="eur")$currency.=" selected";
|
||||
$currency.=">EUR</option></select>";
|
||||
$xtpl->assign("CURRENCY", $currency);
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
|
||||
$xtpl->assign("JAVASCRIPT_VALIDATE", $javascript->getScript());
|
||||
|
||||
$xtpl->parse("main");
|
||||
$xtpl->out("main");
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// 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('EcmDocumentTemplates')));
|
||||
$str = "<script>
|
||||
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
|
||||
</script>";
|
||||
echo $str;
|
||||
|
||||
?>
|
||||
43
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/FileUpload.php
Executable file
43
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/FileUpload.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
class FileUpload {
|
||||
|
||||
var $name;
|
||||
var $toPath;
|
||||
var $newName;
|
||||
var $location;
|
||||
|
||||
function upload_file($name, $toPath, $newName="") {
|
||||
$file_tmp_name = $_FILES[$name]['tmp_name'];
|
||||
$file_name = $_FILES[$name]['name'];
|
||||
$file_size = $_FILES[$name]['size'];
|
||||
if(is_uploaded_file($file_tmp_name)) {
|
||||
$ext = strtolower(substr(strrchr($file_name, "."),1));
|
||||
while(file_exists($p = $toPath.create_guid().".".$ext));
|
||||
move_uploaded_file($file_tmp_name, $p);
|
||||
}
|
||||
return $p;
|
||||
}
|
||||
|
||||
function getFormHTML($ajax = true) {
|
||||
$html = '';
|
||||
if($ajax == true) {
|
||||
$html = '<iframe src="index.php?module=EcmDocumentTemplates&action=FileUpload&to_pdf=1&file=dfs">Yours browser not accept iframes!</iframe>';
|
||||
} else {
|
||||
}
|
||||
return $html;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if(isset($_REQUEST['form']) && $_REQUEST['form']!='') {
|
||||
echo '<form name="FileUpload" action="index.php" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="EcmDocumentTemplates" />
|
||||
<input type="hidden" name="action" value="FileUpload" />
|
||||
<input type="hidden" name="to_pdf" value="1" />
|
||||
<input type="file" id="logo_image" name="logo_image" value="" />
|
||||
</form>
|
||||
';
|
||||
}
|
||||
|
||||
?>
|
||||
9
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Forms.php
Executable file
9
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Forms.php
Executable file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
|
||||
function get_validate_record_js () {
|
||||
}
|
||||
|
||||
function get_new_record_form () {
|
||||
}
|
||||
?>
|
||||
59
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Menu.php
Executable file
59
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Menu.php
Executable file
@@ -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 $mod_strings;
|
||||
|
||||
if(ACLController::checkAccess('EcmDocumentTemplates', 'edit', true))
|
||||
$module_menu [] = Array("index.php?module=EcmDocumentTemplates&action=EditView&return_module=EcmDocumentTemplates&return_action=DetailView", $mod_strings['LNK_NEW_ECMDOCUMENTTEMPLATES'],"CreateEcmDocumentTemplates", 'EcmDocumentTemplates');
|
||||
if(ACLController::checkAccess('EcmDocumentTemplates', 'list', true))
|
||||
$module_menu [] = Array("index.php?module=EcmDocumentTemplates&action=index&return_module=EcmDocumentTemplates&return_action=DetailView", $mod_strings['LNK_ECMDOCUMENTTEMPLATES_LIST'],"EcmDocumentTemplates", 'EcmDocumentTemplates');
|
||||
if(ACLController::checkAccess('EcmDocumentTemplates','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
|
||||
class ModuleFieldsParser {
|
||||
|
||||
var $modules;
|
||||
var $name;
|
||||
|
||||
function ModuleFieldsParser($name = 'mfp') {
|
||||
$this->modules = Array();
|
||||
if(file_exists('modules/EcmDocumentTemplates/ModuleFieldsParser/config.php')) {
|
||||
require_once('modules/EcmDocumentTemplates/ModuleFieldsParser/config.php');
|
||||
$this->modules = $mfp_modules;
|
||||
}
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
function getModulesSelectOptions($fieldRealNames = false) {
|
||||
global $app_list_strings;
|
||||
$arr = array();
|
||||
if(count($this->modules)>0) {
|
||||
foreach($this->modules as $key => $value) {
|
||||
if(isset($value['name']) && $value['name'] != '')
|
||||
if(isset($app_list_strings['moduleList'][$value['name']]) && $app_list_strings['moduleList'][$value['name']] != '')
|
||||
$value['name'] = $app_list_strings['moduleList'][$value['name']];
|
||||
$arr[$key]['name'] = $value['name'];
|
||||
$arr[$key]['fields'] = $this->getModuleFieldsSelectOptions($key,$fieldRealNames);
|
||||
}
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
function getModuleFieldsSelectOptions($module,$fieldRealNames = false) {
|
||||
global $beanList, $current_language, $GLOBALS;
|
||||
$dict = null;
|
||||
$file = 'cache/modules/'.$module.'/'.$beanList[$module].'vardefs.php';
|
||||
if(file_exists($file)) {
|
||||
include($file);
|
||||
$dict = $GLOBALS['dictionary'][$beanList[$module]]['fields'];
|
||||
}
|
||||
else {
|
||||
$file = 'modules/'.$module.'/vardefs.php';
|
||||
if(file_exists($file)) { include($file); $dict = $dictionary[$beanList[$module]]['fields']; }
|
||||
}
|
||||
if($dict) {
|
||||
$mod = return_module_language($current_language, $module);
|
||||
$arr = array();
|
||||
foreach($dict as $key => $value) {
|
||||
$tmp = '$'.$this->modules[$module]['prefix'].$value['name'];
|
||||
if(!$fieldRealNames)
|
||||
$arr[$tmp] = ((isset($mod[$value['vname']]) && $mod[$value['vname']] != '') ? $mod[$value['vname']] : $value['name']);
|
||||
else
|
||||
$arr[$tmp] = $value['name'];
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
return array();
|
||||
}
|
||||
|
||||
function getJS() {
|
||||
$json = getJSONobj();
|
||||
$js = '<script language="javascript">';
|
||||
$js .= 'var '.$this->name.'_data = '.$json->encode($this->getModulesSelectOptions()).';';
|
||||
$js .= 'function '.$this->name.'_loadModules() { var ms = document.getElementById("'.$this->name.'_module"); for(x in '.$this->name.'_data) { ms.options[ms.options.length] = new Option('.$this->name.'_data[x]["name"],x,false); }; }';
|
||||
$js .= 'function '.$this->name.'_loadFields() { var ms = document.getElementById("'.$this->name.'_module"); var fs = document.getElementById("'.$this->name.'_fields"); while(fs.options.length>0) fs.remove(0); var fields = '.$this->name.'_data[ms.value]["fields"]; for(x in fields) fs.options[fs.options.length] = new Option(fields[x],x,false); fs.onchange(); };';
|
||||
$js .= 'function '.$this->name.'_loadField() { var fs = document.getElementById("'.$this->name.'_fields"); var fe = document.getElementById("'.$this->name.'_field"); fe.value = fs.value; };';
|
||||
$js .= $this->name.'_loadModules(); '.$this->name.'_loadFields(); '.$this->name.'_loadField();';
|
||||
$js .= '</script>';
|
||||
return $js;
|
||||
}
|
||||
|
||||
function getFormHTML($smarty = false, $name = '') {
|
||||
if($name != '') $this->name = $name;
|
||||
$html = '
|
||||
<span>
|
||||
<select id="'.$this->name.'_module" name="'.$this->name.'_module" onChange="'.$this->name.'_loadFields();"></select>
|
||||
<select id="'.$this->name.'_fields" name="'.$this->name.'_fields" onChange="'.$this->name.'_loadField()"></select>
|
||||
<input id="'.$this->name.'_field" name="'.$this->name.'_field" value="" size="40">'
|
||||
.($smarty ? '{literal}' : '').$this->getJS().($smarty ? '{/literal}' : '').
|
||||
'</span>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
function fillFocusToModules() {
|
||||
foreach($this->modules as $key => $value) {
|
||||
if((!isset($value['focus']) || $value['focus'] == '') && (isset($value['id']) && $value['id'] != '')) {
|
||||
global $beanFiles, $beanList;
|
||||
$path = $beanFiles[$beanList[$key]];
|
||||
if(file_exists($path)) {
|
||||
require_once($path);
|
||||
$this->modules[$key]['focus'] = new $beanList[$key]();
|
||||
$this->modules[$key]['focus']->format_all_fields();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseText($text) {
|
||||
$this->fillFocusToModules();
|
||||
$temp = $this->getModulesSelectOptions(true);
|
||||
foreach($this->modules as $module => $arr) {
|
||||
// var_dump($this->modules[$module]); echo '<br><br><br><br><br><br><br><br><br><br>';
|
||||
if(isset($arr['focus']) && $arr['focus']!='') {
|
||||
foreach($temp[$module]['fields'] as $field => $value) {
|
||||
//var_dump($field.' - '.$value.' - '.((isset($this->modules[$module]['focus']->$value) && $this->modules[$module]['focus']->$value != '')?$this->modules[$module]['focus']->$value:''));
|
||||
try {
|
||||
$text = str_replace($field,((isset($this->modules[$module]['focus']->$value) && $this->modules[$module]['focus']->$value != '' && is_string($this->modules[$module]['focus']->$value))?$this->modules[$module]['focus']->$value:''),$text);
|
||||
} catch(Exception $e) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
return $text;
|
||||
}
|
||||
|
||||
function clear() {
|
||||
$this->modules = null;
|
||||
$this->modules = array();
|
||||
}
|
||||
|
||||
function add($module,$prefix,$focus,$name='') {
|
||||
$this->modules[$module]['prefix'] = $prefix;
|
||||
$this->modules[$module]['focus'] = $focus;
|
||||
$this->modules[$module]['id'] = '';
|
||||
$this->modules[$module]['name'] = $name;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
$mfp_modules = Array(
|
||||
'EcmDocumentTemplates' => array(
|
||||
'name' => $app_list_strings['moduleList']['EcmDocumentTemplates'],
|
||||
'prefix' => 'dt_',
|
||||
'id' => '',
|
||||
'focus' => ''
|
||||
),
|
||||
'Accounts' => array(
|
||||
'name' => $app_list_strings['moduleList']['Accounts'],
|
||||
'prefix' => 'acc_',
|
||||
'id' => '',
|
||||
'focus' => ''
|
||||
),
|
||||
'Users' => array(
|
||||
'name' => $app_list_strings['moduleList']['Users'],
|
||||
'prefix' => 'us_',
|
||||
'id' => '',
|
||||
'focus' => ''
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
122
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Save.php
Executable file
122
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/Save.php
Executable file
@@ -0,0 +1,122 @@
|
||||
<?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/EcmDocumentTemplates/EcmDocumentTemplate.php');
|
||||
require_once('include/formbase.php');
|
||||
require_once('modules/EcmDocumentTemplates/UploadFile.php');
|
||||
|
||||
//var_dump($_FILES); die();
|
||||
|
||||
/*
|
||||
else
|
||||
{
|
||||
$z="select logo_name from ecmdocumenttemplates where id='".$_REQUEST['record']."'";
|
||||
$w=mysql_query($z);
|
||||
$r=mysql_fetch_array($w);
|
||||
$logo=$r['logo_name'];
|
||||
}
|
||||
$_POST['logo_name']=$logo;
|
||||
*/
|
||||
|
||||
$focus = new EcmDocumentTemplate();
|
||||
|
||||
$focus->retrieve($_POST['record']);
|
||||
$oldid=$_POST['record'];
|
||||
$_POST['record']="";
|
||||
$focus->id="";
|
||||
|
||||
|
||||
if(!isset($_POST['old_logo_name']) || $_POST['old_logo_name']=='') {
|
||||
$focus->logo_id = '';
|
||||
$focus->logo_name = '';
|
||||
$focus->logo_path = '';
|
||||
}
|
||||
if(isset($_FILES['logo_name']['name']) && $_FILES['logo_name']['name']) {
|
||||
$focus->logo_id = upload_file('logo_name','modules/EcmDocumentTemplates/files/');
|
||||
$focus->logo_name = ($focus->logo_id == '') ? '' : $_FILES['logo_name']['name'];
|
||||
$focus->logo_path = ($focus->logo_id == '') ? '' : 'modules/EcmDocumentTemplates/files/'.$focus->logo_id;
|
||||
}
|
||||
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
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['show_header_on_all_pages']) && $_POST['show_header_on_all_pages']) $focus->show_header_on_all_pages = 1; else $focus->show_header_on_all_pages = 0;
|
||||
if(isset($_POST['show_header_on_all_pages']) && $_POST['show_header_on_all_pages']) $focus->show_header_on_all_pages = 1; else $focus->show_header_on_all_pages = 0;
|
||||
if(isset($_POST['change_all_old_records']) && $_POST['change_all_old_records']) $focus->change_all_old_records = 1; else $focus->change_all_old_records = 0;
|
||||
|
||||
$focus->save($check_notify);
|
||||
$return_id = $focus->id;
|
||||
mysql_query("update ecmdocumenttemplates set deleted='1' where id='".$oldid."'");
|
||||
//handleRedirect($return_id,'EcmDocumentTemplates');
|
||||
header("Location: index.php?module=EcmDocumentTemplates&action=DetailView&record=".$return_id);
|
||||
|
||||
?>
|
||||
18
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/UploadFile.php
Executable file
18
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/UploadFile.php
Executable file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
function upload_file($name, $toPath, $newName="") {
|
||||
|
||||
$file_tmp_name = $_FILES[$name]['tmp_name'];
|
||||
$file_name = $_FILES[$name]['name'];
|
||||
$file_size = $_FILES[$name]['size'];
|
||||
|
||||
if(is_uploaded_file($file_tmp_name)) {
|
||||
$ext = strtolower(substr(strrchr($file_name, "."),1));
|
||||
if($ext != "jpg" && $ext != "png") return '';
|
||||
while(file_exists($p = $toPath.($guid=create_guid()).".".$ext));
|
||||
move_uploaded_file($file_tmp_name, $p);
|
||||
}
|
||||
return $guid.'.'.$ext;
|
||||
}
|
||||
|
||||
?>
|
||||
139
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/field_arrays.php
Executable file
139
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/field_arrays.php
Executable file
@@ -0,0 +1,139 @@
|
||||
<?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['EcmDocumentTemplate'] = array (
|
||||
'column_fields' => Array(
|
||||
"id",
|
||||
"name",
|
||||
"date_entered",
|
||||
"date_modified",
|
||||
"modified_user_id",
|
||||
"assigned_user_id",
|
||||
"created_by",
|
||||
"deleted",
|
||||
//NEW COLUMN FIELDS
|
||||
"place_of_regster",
|
||||
"logo_path",
|
||||
"logo_id",
|
||||
"logo_name",
|
||||
"account_name",
|
||||
"account_id",
|
||||
"account_number",
|
||||
"currency",
|
||||
"table_currency",
|
||||
'footer_account',
|
||||
'footer_address',
|
||||
'footer_phone',
|
||||
'footer_fax',
|
||||
'footer_krs',
|
||||
'footer_nip',
|
||||
'footer_regon',
|
||||
'footer_capital',
|
||||
'footer_management',
|
||||
'footer_swift',
|
||||
'footer_bankname',
|
||||
'footer_vatid',
|
||||
'document_number_format_id',
|
||||
'documents_per_day_id',
|
||||
'documents_per',
|
||||
//'document_number_letter',
|
||||
//'correct_number_letter',
|
||||
'ecmlanguage',
|
||||
'footer_text',
|
||||
'header_text',
|
||||
'show_header_on_all_pages',
|
||||
'show_footer_on_all_pages',
|
||||
'change_all_old_records',
|
||||
'template_files_defs',
|
||||
),
|
||||
|
||||
'list_fields' => Array(
|
||||
'id',
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
//NEW LIST_FIELDS
|
||||
'logo_path',
|
||||
"logo_id",
|
||||
"logo_name",
|
||||
'account_name',
|
||||
'account_id',
|
||||
'account_number',
|
||||
'currency',
|
||||
'table_currency',
|
||||
'footer_account',
|
||||
'footer_address',
|
||||
'footer_phone',
|
||||
'footer_fax',
|
||||
'footer_krs',
|
||||
'footer_nip',
|
||||
'footer_regon',
|
||||
'footer_capital',
|
||||
'footer_management',
|
||||
'footer_swift',
|
||||
'footer_bankname',
|
||||
'footer_vatid',
|
||||
'document_number_format_id',
|
||||
'documents_per_day_id',
|
||||
'documents_per',
|
||||
//'document_number_letter',
|
||||
//'correct_number_letter',
|
||||
'ecmlanguage',
|
||||
'footer_text',
|
||||
'header_text',
|
||||
'show_header_on_all_pages',
|
||||
'show_footer_on_all_pages',
|
||||
'change_all_old_records',
|
||||
'template_files_defs',
|
||||
),
|
||||
'required_fields' => array(
|
||||
'name'=>1
|
||||
),
|
||||
);
|
||||
?>
|
||||
33
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/formatDocumentNumber.php
Executable file
33
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/formatDocumentNumber.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*
|
||||
Default document number format to convert is YMDNR for example 20080501001
|
||||
where Y - year, M - month, D - day, NR - 4 digits number.
|
||||
|
||||
Example 1:
|
||||
echo formatDocumentNumber('200805010001','Y/M/D/NR');
|
||||
Results:
|
||||
2008/05/01/001
|
||||
|
||||
Example 2:
|
||||
.../formatDocumentNumber.php?dn=20080501001&f=Y/M/D%20NR
|
||||
Results:
|
||||
2008/05/01 001
|
||||
*/
|
||||
|
||||
function formatDocumentNumber($documentNumber, $format, $d = '3') {
|
||||
$format = str_replace('CODE', '[cOdE]', $format);
|
||||
$ARR1 = array ('y', 'Y', 'M', 'D', 'NR', '[cOdE]');
|
||||
$ARR2 = array (substr($documentNumber,2,2), substr($documentNumber,0,4), substr($documentNumber,4,2), substr($documentNumber,6,2), substr($documentNumber,8));
|
||||
$ARR2[4] = sprintf("%0".$d."d",$ARR2[4]);
|
||||
$ARR2[5] = 'CODE';
|
||||
return str_replace($ARR1,$ARR2,$format);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['dn']) && $_REQUEST['dn']!='' && isset($_REQUEST['f']) && $_REQUEST['f']!='') {
|
||||
echo formatDocumentNumber($_REQUEST['dn'],$_REQUEST['f']);
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['f']) && $_REQUEST['f']!='' && isset($_REQUEST['d']) && $_REQUEST['d']!='' && isset($_REQUEST['ex']) && $_REQUEST['ex']!='') {
|
||||
echo formatDocumentNumber(date("Ymd").'1',$_REQUEST['f'],$_REQUEST['d']);
|
||||
}
|
||||
?>
|
||||
82
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/formloader.js
Executable file
82
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/formloader.js
Executable file
@@ -0,0 +1,82 @@
|
||||
|
||||
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 changeValidateRequired(formname,name,required) {
|
||||
for(var i=0; i<validate[formname].length; i++)
|
||||
if(validate[formname][i][0] == name) { validate[formname][i][2] = required; break; }
|
||||
}
|
||||
|
||||
function my_popup(module, field_array, call_back_function, form_name) {
|
||||
if(!call_back_function) call_back_function = "set_return";
|
||||
if(!form_name) form_name = "EditView";
|
||||
return open_popup(module, 600, 400, "", true, false, {"call_back_function":call_back_function,"form_name":form_name,"field_to_name_array":field_array});
|
||||
}
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function FormLoader() {
|
||||
|
||||
this.module;
|
||||
this.createModule;
|
||||
this.fieldName;
|
||||
this.buttonName = 'FormLoaderButton';
|
||||
|
||||
this.load = function(module,createModule,fieldName) {
|
||||
this.module = module;
|
||||
this.createModule = createModule;
|
||||
this.fieldName = fieldName;
|
||||
}
|
||||
|
||||
this.createButton = function() {
|
||||
var b = document.createElement('input');
|
||||
b.type = 'button';
|
||||
b.className = 'button';
|
||||
b.name = this.buttonName;
|
||||
b.value = 'Create';
|
||||
b.FL = this;
|
||||
b.onclick = function() {
|
||||
if(this.FL.createModule == '') return;
|
||||
if(this.FL.onButtonClick) var data = this.FL.onButtonClick();
|
||||
window.open("index.php?module="+this.FL.module+"&action=formloader&to_pdf=1&loaderAction=ViewForm&loaderFieldName="+this.FL.fieldName+"&createModule="+this.FL.createModule+(data?data:''),"Create","resizable=yes,scrollbars=no,status=no,height=540,width=700").focus();
|
||||
}
|
||||
return b;
|
||||
}
|
||||
this.setEditDblClick = function(edit) { edit.FL=this; edit.ondblclick=this.editDblClick; }
|
||||
this.editDblClick = function() {
|
||||
if(this.FL.createModule == '') return;
|
||||
if(this.FL.onEditDblClick) var data = this.FL.onEditDblClick();
|
||||
window.open("index.php?module="+this.FL.module+"&action=formloader&to_pdf=1&loaderAction=ViewForm&loaderFieldName="+this.FL.fieldName+"&createModule="+this.FL.createModule+(data?data:''),"Create","resizable=yes,scrollbars=no,status=no,height=540,width=700").focus();
|
||||
}
|
||||
|
||||
this.responseData = function(data) {
|
||||
if(this.onResponseData) this.onResponseData(data);
|
||||
}
|
||||
|
||||
this.onResponseData;
|
||||
|
||||
this.addPostData = function() {
|
||||
if(this.onAddPostData)
|
||||
return this.onAddPostData();
|
||||
else
|
||||
return '';
|
||||
}
|
||||
|
||||
this.onAddPostData;
|
||||
this.onButtonClick;
|
||||
}
|
||||
|
||||
|
||||
|
||||
170
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/formloader.php
Executable file
170
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/formloader.php
Executable file
@@ -0,0 +1,170 @@
|
||||
|
||||
<?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 '['.$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(doc == undefined || doc == null)
|
||||
doc = frame.contentWindow.document;
|
||||
|
||||
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 div = doc.createElement('div');
|
||||
div.innerHTML = main.innerHTML;
|
||||
main.innerHTML = '';
|
||||
var div2 = doc.createElement('div');
|
||||
div2.style.display = 'none';
|
||||
div2.innerHTML = doc.body.innerHTML;
|
||||
doc.body.innerHTML = '';
|
||||
doc.body.appendChild(div2);
|
||||
doc.body.appendChild(div);
|
||||
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>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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'];
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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>';
|
||||
}
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
2321
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/html2fpdf-3.0.2b.cp/fpdf.php
Executable file
2321
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/html2fpdf-3.0.2b.cp/fpdf.php
Executable file
File diff suppressed because it is too large
Load Diff
1083
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/html2fpdf-3.0.2b.cp/gif.php
Executable file
1083
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/html2fpdf-3.0.2b.cp/gif.php
Executable file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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;
|
||||
?>
|
||||
@@ -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'];
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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>';
|
||||
}
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
@@ -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);
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
123
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/language/en_us.lang.php
Executable file
123
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/language/en_us.lang.php
Executable file
@@ -0,0 +1,123 @@
|
||||
<?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.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//added 01.07.2009
|
||||
'LBL_PLACE_OF_REGISTER'=>'Place of register',
|
||||
//added 26.02.2009
|
||||
'LBL_TEMPLATE_FILES_DEFS' => 'Template Files',
|
||||
'LBL_PREVIEW_PDF' => 'Preview PDF',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Document Templates',
|
||||
'LBL_MODULE_TITLE' => 'Document Templates: Home',
|
||||
'LBL_MODULE_ID' => 'Document Templates',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Document Templates Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Document Templates List',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Document Templates',
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_DATE_ENTERED' => 'Date entered',
|
||||
'LBL_DATE_MODIFIED' => 'Date modified',
|
||||
'LBL_MODIFIED_BY' => 'Modified by',
|
||||
'LBL_ASSIGNED_TO' => 'Assigned to',
|
||||
'LBL_CREATED_BY' => 'Created by',
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned to',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_LOGO_PATH' => 'Logo',
|
||||
'LBL_LOGO_NAME' => 'Logo name',
|
||||
'LBL_LOGO_ID' => 'Logo ID',
|
||||
'LBL_LOGO_NO_LOGO' => 'No Image Logo',
|
||||
'LBL_LOGO_INFO' => 'The image file format can be either .png or .jpg',
|
||||
'LBL_LOGO_PREVIEW' => 'Logo Preview:',
|
||||
'LBL_INFORMATIONS' => 'Informations',
|
||||
'LBL_LOGO' => 'Add Logo',
|
||||
'LBL_ACCOUNT_NAME' => 'Account name',
|
||||
'LBL_ACCOUNT_ID' => 'Account id',
|
||||
'LBL_ACCOUNT_NUMBER' => 'Account number',
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
'LBL_DEFAULT_FOOTER_TEXT' => "\$dt_account_name - Tel: \$dt_footer_phone - Fax: \$dt_footer_fax\nKonto: \$dt_footer_account - BLZ \$dt_footer_swift - Bank: \$dt_footer_bankname\nVAT-ID (UmSt. Nr.) \$dt_footer_vatid - TAX Nr. (Steuer Nr.) \$dt_footer_regon - HRB: \$dt_footer_krs - Amtsgericht: Neuss",
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
'LBL_DEFAULT_HEADER_TEXT' => "\$acc_name\n\$acc_billing_address_street\n\$acc_billing_address_postalcode \$acc_billing_address_city",
|
||||
'LBL_TEMPLATE_TEXTS' => 'Template Texts',
|
||||
'LBL_FOOTER_ACCOUNT' => 'Account',
|
||||
'LBL_FOOTER_ADDRESS' => 'Address',
|
||||
'LBL_FOOTER_PHONE' => 'Phone',
|
||||
'LBL_FOOTER_FAX' => 'Fax',
|
||||
'LBL_FOOTER_KRS' => 'KRS',
|
||||
'LBL_FOOTER_NIP' => 'NIP',
|
||||
'LBL_FOOTER_REGON' => 'REGON',
|
||||
'LBL_FOOTER_CAPITAL' => 'Account capital',
|
||||
'LBL_FOOTER_MANAGEMENT' => 'Management',
|
||||
'LBL_FOOTER_SWIFT' => 'Swift',
|
||||
'LBL_FOOTER_BANKNAME' => 'Bank name',
|
||||
'LBL_FOOTER_VATID' => 'VAT-ID',
|
||||
'LBL_DOCUMENT_NUMBER_FORMAT_ID' => 'Doc. number format',
|
||||
'LBL_DOCUMENTS_PER_DAY_ID' => 'Number Of Documents',
|
||||
'LBL_DOCUMENT_NUMBER_LETTER' => 'Doc. number letter',
|
||||
'LBL_CORRECT_NUMBER_LETTER' => 'Correct number letter',
|
||||
|
||||
'LNK_NEW_ECMDOCUMENTTEMPLATES' => 'Create Document Tmplate',
|
||||
'LNK_ECMDOCUMENTTEMPLATES_LIST' => 'Document Template list',
|
||||
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF' => 'Show PDF',
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_TITLE' => 'Show Work Report in PDF file.',
|
||||
'LBL_DOCUMENTS_PER' => 'Documents Per',
|
||||
'LBL_SHOW_HEADER_ON_ALL_PAGES' => 'Show Header On All Pages',
|
||||
'LBL_SHOW_FOOTER_ON_ALL_PAGES' => 'Show Footer On All Pages',
|
||||
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_CHANGE_ALL_OLD_RECORDS' => 'Change All Old Records',
|
||||
);
|
||||
?>
|
||||
119
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/language/ge_ge.lang.php
Executable file
119
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,119 @@
|
||||
<?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.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
|
||||
'LBL_MODULE_NAME' => 'Document Templates',
|
||||
'LBL_MODULE_TITLE' => 'Document Templates: Home',
|
||||
'LBL_MODULE_ID' => 'Document Templates',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Document Templates Search',
|
||||
'LBL_LIST_FORM_TITLE' => 'Document Templates List',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Document Templates',
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
'LBL_NAME' => 'Name',
|
||||
'LBL_DATE_ENTERED' => 'Date entered',
|
||||
'LBL_DATE_MODIFIED' => 'Date modified',
|
||||
'LBL_MODIFIED_BY' => 'Modified by',
|
||||
'LBL_ASSIGNED_TO' => 'Assigned to',
|
||||
'LBL_CREATED_BY' => 'Created by',
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned to',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_LOGO_PATH' => 'Logo',
|
||||
'LBL_LOGO_NAME' => 'Logo name',
|
||||
'LBL_LOGO_ID' => 'Logo ID',
|
||||
'LBL_LOGO_NO_LOGO' => 'No Image Logo',
|
||||
'LBL_LOGO_INFO' => 'The image file format can be either .png or .jpg',
|
||||
'LBL_LOGO_PREVIEW' => 'Logo Preview:',
|
||||
'LBL_INFORMATIONS' => 'Informations',
|
||||
'LBL_LOGO' => 'Add Logo',
|
||||
'LBL_ACCOUNT_NAME' => 'Account name',
|
||||
'LBL_ACCOUNT_ID' => 'Account id',
|
||||
// 'LBL_ACCOUNT_NUMBER' => 'Account number',
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
'LBL_DEFAULT_FOOTER_TEXT' => "\$dt_account_name - Tel: \$dt_footer_phone - Fax: \$dt_footer_fax\nKonto: \$dt_footer_account - BLZ \$dt_footer_swift - Bank: \$dt_footer_bankname\nVAT-ID (UmSt. Nr.) \$dt_footer_vatid - TAX Nr. (Steuer Nr.) \$dt_footer_regon - HRB: \$dt_footer_krs - Amtsgericht: Neuss",
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
'LBL_DEFAULT_HEADER_TEXT' => "\$acc_name\n\$acc_billing_address_street\n\$acc_billing_address_postalcode \$acc_billing_address_city",
|
||||
'LBL_TEMPLATE_TEXTS' => 'Template Texts',
|
||||
// 'LBL_FOOTER_ACCOUNT' => 'Account',
|
||||
// 'LBL_FOOTER_ADDRESS' => 'Address',
|
||||
// 'LBL_FOOTER_PHONE' => 'Phone',
|
||||
// 'LBL_FOOTER_FAX' => 'Fax',
|
||||
// 'LBL_FOOTER_KRS' => 'KRS',
|
||||
// 'LBL_FOOTER_NIP' => 'NIP',
|
||||
// 'LBL_FOOTER_REGON' => 'REGON',
|
||||
// 'LBL_FOOTER_CAPITAL' => 'Account capital',
|
||||
// 'LBL_FOOTER_MANAGEMENT' => 'Management',
|
||||
// 'LBL_FOOTER_SWIFT' => 'Swift',
|
||||
// 'LBL_FOOTER_BANKNAME' => 'Bank name',
|
||||
// 'LBL_FOOTER_VATID' => 'VAT-ID',
|
||||
'LBL_DOCUMENT_NUMBER_FORMAT_ID' => 'Doc. number format',
|
||||
'LBL_DOCUMENTS_PER_DAY_ID' => 'Number Of Documents',
|
||||
'LBL_DOCUMENT_NUMBER_LETTER' => 'Doc. number letter',
|
||||
'LBL_CORRECT_NUMBER_LETTER' => 'Correct number letter',
|
||||
|
||||
'LNK_NEW_ECMDOCUMENTTEMPLATES' => 'Create Document Tmplate',
|
||||
'LNK_ECMDOCUMENTTEMPLATES_LIST' => 'Document Template list',
|
||||
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF' => 'Show PDF',
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_TITLE' => 'Show Work Report in PDF file.',
|
||||
'LBL_DOCUMENTS_PER' => 'Documents Per',
|
||||
'LBL_SHOW_HEADER_ON_ALL_PAGES' => 'Show Header On All Pages',
|
||||
'LBL_SHOW_FOOTER_ON_ALL_PAGES' => 'Show Footer On All Pages',
|
||||
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_CHANGE_ALL_OLD_RECORDS' => 'Change All Old Records',
|
||||
|
||||
);
|
||||
?>
|
||||
121
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/language/pl_pl.lang.php
Executable file
121
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?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.
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//added 26.02.2009
|
||||
'LBL_TEMPLATE_FILES_DEFS' => 'Pliki Szablonów',
|
||||
'LBL_PREVIEW_PDF' => 'Podglad PDF',
|
||||
|
||||
'LBL_MODULE_NAME' => 'Szablony Dokumentów',
|
||||
'LBL_MODULE_TITLE' => 'Szablony Dokumentów: Strona Glówna',
|
||||
'LBL_MODULE_ID' => 'Szablony Dokumentów',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukaj',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Szablonów Dokumentów',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowy Szablon Dokumentów',
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_DATE_ENTERED' => 'Date Utworzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modzfikacji',
|
||||
'LBL_MODIFIED_BY' => 'Zmodyfikowane przez',
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane Do',
|
||||
'LBL_CREATED_BY' => 'Utworzeone Przez',
|
||||
'LBL_CREATED_BY_USER' => 'Utworzeone Przez',
|
||||
'LBL_MODIFIED_BY_USER' => 'Zmodyfikowane Przez',
|
||||
'LBL_ASSIGNED_TO_USER' => 'Przypisane Do',
|
||||
'LBL_DELETED' => 'Usuniete',
|
||||
'LBL_LOGO_PATH' => 'Logo',
|
||||
'LBL_LOGO_NAME' => 'Nazwa Logo',
|
||||
'LBL_LOGO_ID' => 'Logo ID',
|
||||
'LBL_LOGO_NO_LOGO' => 'Braka logo obrazka',
|
||||
'LBL_LOGO_INFO' => 'Format pliku obrazka moze byc .png lub .jpg',
|
||||
'LBL_LOGO_PREVIEW' => 'Podglad Logo:',
|
||||
'LBL_INFORMATIONS' => 'Informacje:',
|
||||
'LBL_LOGO' => 'Dodaj Logo',
|
||||
'LBL_ACCOUNT_NAME' => 'Nazwa Firmy',
|
||||
'LBL_ACCOUNT_ID' => 'Nazwa Firmy',
|
||||
// 'LBL_ACCOUNT_NUMBER' => 'Account number',
|
||||
'LBL_FOOTER_TEXT' => 'Tekst Stopki',
|
||||
'LBL_DEFAULT_FOOTER_TEXT' => "\$dt_account_name - Tel: \$dt_footer_phone - Fax: \$dt_footer_fax\nKonto: \$dt_footer_account - BLZ \$dt_footer_swift - Bank: \$dt_footer_bankname\nVAT-ID (UmSt. Nr.) \$dt_footer_vatid - TAX Nr. (Steuer Nr.) \$dt_footer_regon - HRB: \$dt_footer_krs - Amtsgericht: Neuss",
|
||||
'LBL_HEADER_TEXT' => 'Tekst Naglówka',
|
||||
'LBL_DEFAULT_HEADER_TEXT' => "\$acc_name\n\$acc_billing_address_street\n\$acc_billing_address_postalcode \$acc_billing_address_city",
|
||||
'LBL_TEMPLATE_TEXTS' => 'Template Texts',
|
||||
// 'LBL_FOOTER_ACCOUNT' => 'Account',
|
||||
// 'LBL_FOOTER_ADDRESS' => 'Address',
|
||||
// 'LBL_FOOTER_PHONE' => 'Phone',
|
||||
// 'LBL_FOOTER_FAX' => 'Fax',
|
||||
// 'LBL_FOOTER_KRS' => 'KRS',
|
||||
// 'LBL_FOOTER_NIP' => 'NIP',
|
||||
// 'LBL_FOOTER_REGON' => 'REGON',
|
||||
// 'LBL_FOOTER_CAPITAL' => 'Account capital',
|
||||
// 'LBL_FOOTER_MANAGEMENT' => 'Management',
|
||||
// 'LBL_FOOTER_SWIFT' => 'Swift',
|
||||
// 'LBL_FOOTER_BANKNAME' => 'Bank name',
|
||||
// 'LBL_FOOTER_VATID' => 'VAT-ID',
|
||||
'LBL_DOCUMENT_NUMBER_FORMAT_ID' => 'Format Numeru Dokumenu',
|
||||
'LBL_DOCUMENTS_PER_DAY_ID' => 'Ilosc Dokumentów',
|
||||
'LBL_DOCUMENT_NUMBER_LETTER' => 'Doc. number letter',
|
||||
'LBL_CORRECT_NUMBER_LETTER' => 'Correct number letter',
|
||||
|
||||
'LNK_NEW_ECMDOCUMENTTEMPLATES' => 'Nowy Szablon',
|
||||
'LNK_ECMDOCUMENTTEMPLATES_LIST' => 'Lista Szablonów',
|
||||
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF' => 'Pokaz PDF',
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_KEY' => 'Pokaz PDF [Alt+P]',
|
||||
'LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_TITLE' => 'Pokaz Raport z Pracy w Pliku PDF.',
|
||||
'LBL_DOCUMENTS_PER' => 'Documents Per',
|
||||
'LBL_SHOW_HEADER_ON_ALL_PAGES' => 'Pokaz Naglówek na Wszystkich Stronach',
|
||||
'LBL_SHOW_FOOTER_ON_ALL_PAGES' => 'Pokaz Stopke na Wszystkich Stronach',
|
||||
|
||||
'LBL_ECMLANGUAGE' => 'Jezyk',
|
||||
'LBL_CHANGE_ALL_OLD_RECORDS' => 'Zamien Wszystkie Stare Rekordy',
|
||||
);
|
||||
?>
|
||||
28
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/logo.php
Executable file
28
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/logo.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
if(isset($_REQUEST['logo']) && $_REQUEST['logo'] != '') {
|
||||
|
||||
$file_name = 'modules/EcmDocumentTemplates/files/'.$_REQUEST['logo'];
|
||||
|
||||
if(file_exists($file_name)) {
|
||||
|
||||
$ext = strtolower(substr(strrchr($file_name, "."),1));
|
||||
|
||||
if($ext == "jpg" || $ext == "png") {
|
||||
|
||||
header('Content-type: image/jpg');
|
||||
|
||||
header('Content-length: '.filesize($file_name));
|
||||
|
||||
readfile($file_name);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$searchFields['EcmDocumentTemplates'] = array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'account_name'=> array('query_type'=>'default'),
|
||||
'date_entered'=> array('query_type'=>'default'),
|
||||
'account_number'=> array('query_type'=>'default'),
|
||||
);
|
||||
|
||||
?>
|
||||
115
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/detailviewdefs.php
Executable file
115
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
|
||||
global $app_list_strings;
|
||||
$viewdefs['EcmDocumentTemplates']['DetailView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array ('EDIT', 'DUPLICATE', 'DELETE',
|
||||
array(
|
||||
'customCode' => '<input name="ecmdocumenttemplate_pdf" id="ecmdocumenttemplate_pdf" title="{$MOD.LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_TITLE}" accessKey="{$MOD.LBL_ECMDOCUMENTTEMPLATE_PDF_BUTTON_KEY}" class="button" onclick="EcmPreviewPDF(\'index.php?module=EcmDocumentTemplates&action=previewPDF&to_pdf=1&record={$fields.id.value}\',{literal}{{/literal}zoom:75,toolbar:1{literal}}{/literal});" type="button" value="{$MOD.LBL_ECMDOCUMENTTEMPLATE_PDF}">'
|
||||
),
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array ('label' => '10', 'field' => '30'),
|
||||
array ('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes' => array(
|
||||
array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
|
||||
),
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_INFORMATIONS'=> array(
|
||||
array('name', 'assigned_user_name'),
|
||||
array('document_number_format_id', 'account_name'),
|
||||
array('documents_per',
|
||||
array(
|
||||
'name' => 'show_header_on_all_pages',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_header_on_all_pages" name="show_header_on_all_pages" value="{$fields.show_header_on_all_pages.value}" {if $fields.show_header_on_all_pages.value == 1}checked{/if}>'
|
||||
),
|
||||
),//'document_number_letter'),
|
||||
array('documents_per_day_id',
|
||||
array(
|
||||
'name' => 'show_footer_on_all_pages',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_footer_on_all_pages" name="show_footer_on_all_pages" value="{$fields.show_footer_on_all_pages.value}" {if $fields.show_footer_on_all_pages.value == 1}checked{/if}>'
|
||||
),
|
||||
),//'correct_number_letter'),
|
||||
array('', 'account_number'),
|
||||
array('footer_account', 'footer_krs'),
|
||||
array('footer_address', 'footer_regon'),
|
||||
array('footer_phone', 'footer_capital'),
|
||||
array('footer_fax', 'footer_management'),
|
||||
array('footer_swift', 'footer_nip'),
|
||||
array('footer_bankname', 'footer_vatid'),
|
||||
array ('place_of_register', 'ecmlanguage'),
|
||||
),
|
||||
'LBL_LOGO' => array(
|
||||
array(array('name'=>'logo_name','customCode'=>'{$fields.logo_name.value}'), array('name'=>'logo_path','label'=>'LBL_LOGO_PREVIEW','customCode'=>'{if $fields.logo_id.value != \'\'}<img src="index.php?module=EcmDocumentTemplates&action=logo&to_pdf=1&logo={$fields.logo_id.value}" />{/if}')),
|
||||
),
|
||||
'LBL_TEMPLATE_TEXTS' => array (
|
||||
|
||||
|
||||
/*
|
||||
array(
|
||||
array(
|
||||
'name' => 'show_header_on_all_pages',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_header_on_all_pages" name="show_header_on_all_pages" value="{$fields.show_header_on_all_pages.value}" {if $fields.show_header_on_all_pages.value == 1}checked{/if}>'
|
||||
),
|
||||
array(
|
||||
'name' => 'show_footer_on_all_pages',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" disabled="disabled" type="checkbox" id="show_footer_on_all_pages" name="show_footer_on_all_pages" value="{$fields.show_footer_on_all_pages.value}" {if $fields.show_footer_on_all_pages.value == 1}checked{/if}>'
|
||||
),
|
||||
),
|
||||
*/
|
||||
array('header_text'),
|
||||
array('footer_text'),
|
||||
),
|
||||
'LBL_TEMPLATE_FILES_DEFS' => array(
|
||||
|
||||
array(
|
||||
array('label'=>'LBL_TEMPLATE_FILES_DEFS','customCode'=>'{$TEMPLATE_FILES}'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
161
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/editviewdefs.php
Executable file
161
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
|
||||
global $sugar_config;
|
||||
|
||||
$path = 'modules/EcmDocumentTemplates/ModuleFieldsParser/ModuleFieldsParser.php';
|
||||
if(file_exists($path)) {
|
||||
require_once($path);
|
||||
$mfp = new ModuleFieldsParser();
|
||||
}
|
||||
|
||||
if((!isset($focus->footer_text) || $focus->footer_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->footer_text = translate('LBL_DEFAULT_FOOTER_TEXT', 'EcmDocumentTemplates');
|
||||
if((!isset($focus->header_text) || $focus->header_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->header_text = translate('LBL_DEFAULT_HEADER_TEXT', 'EcmDocumentTemplates');
|
||||
|
||||
$viewdefs['EcmDocumentTemplates']['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'enctype'=>'multipart/form-data',
|
||||
'buttons'=>array(
|
||||
'SAVE',
|
||||
'CANCEL',
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'includes' => array(
|
||||
array('file'=>'include/JSON.js'),
|
||||
array('file'=>'include/javascript/quicksearch.js'),
|
||||
array('file'=>'modules/EcmDocumentTemplates/formloader.js'),
|
||||
array('file'=>'modules/EcmDocumentTemplates/EcmDocumentTemplates.js'),
|
||||
),
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_INFORMATIONS'=> array(
|
||||
array (
|
||||
'name',
|
||||
'assigned_user_name'
|
||||
),
|
||||
array (
|
||||
'document_number_format_id',
|
||||
'account_name'
|
||||
),
|
||||
array (
|
||||
array(
|
||||
'name' => 'change_all_old_records',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" type="checkbox" id="change_all_old_records" name="change_all_old_records" {if $fields.change_all_old_records.value == 1}checked{/if}>'
|
||||
),
|
||||
array(
|
||||
'name' => 'show_header_on_all_pages',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" type="checkbox" id="show_header_on_all_pages" name="show_header_on_all_pages" {if $fields.show_header_on_all_pages.value == 1}checked{/if}>'
|
||||
),
|
||||
//'document_number_letter'
|
||||
),
|
||||
array (
|
||||
'documents_per',
|
||||
array(
|
||||
'name' => 'show_footer_on_all_pages',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input tabindex="1" type="checkbox" id="show_footer_on_all_pages" name="show_footer_on_all_pages" {if $fields.show_footer_on_all_pages.value == 1}checked{/if}>'
|
||||
),
|
||||
//'correct_number_letter'
|
||||
),
|
||||
array ('place_of_register', 'ecmlanguage'),
|
||||
array (
|
||||
'',
|
||||
'account_number'
|
||||
),
|
||||
array (
|
||||
'footer_account',
|
||||
'footer_krs',
|
||||
),
|
||||
array (
|
||||
'footer_address',
|
||||
'footer_regon'
|
||||
),
|
||||
array (
|
||||
'footer_phone',
|
||||
'footer_capital'
|
||||
),
|
||||
array (
|
||||
'footer_fax',
|
||||
'footer_management'
|
||||
),
|
||||
array (
|
||||
'footer_swift',
|
||||
'footer_nip'
|
||||
),
|
||||
array (
|
||||
'footer_bankname',
|
||||
'footer_vatid'
|
||||
),
|
||||
),
|
||||
'LBL_LOGO' => array(
|
||||
array (
|
||||
array(
|
||||
'name' => 'logo_name',
|
||||
'label' => 'LBL_LOGO_PATH',
|
||||
'tabIndex' => 'l',
|
||||
'customCode' => '<input type="file" id="logo_name" name="logo_name" value="" onChange="{literal} var name=this.value.toLowerCase(); if(name.search(/.jpg/)==-1 && name.search(/.png/)==-1) { this.value=\'\'; }{/literal}" /><br>{$MOD.LBL_LOGO_INFO}',
|
||||
),
|
||||
array(
|
||||
'label' => 'LBL_LOGO_PREVIEW',
|
||||
'customCode' => '{if $fields.logo_id.value != ""}<div id="logoDiv"><input type="hidden" name="old_logo_name" id="old_logo_name" value="{$fields.logo_name.value}" /><img src="index.php?module=EcmDocumentTemplates&action=logo&to_pdf=1&logo={$fields.logo_id.value}" /><br>({$fields.logo_name.value}) <a href="javascript:deleteLogo();">{$APP.LBL_DELETE_BUTTON_LABEL}</a></div>{/if}'
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_TEMPLATE_TEXTS' => array (
|
||||
// array(array('label' => 'LBL_HEADER_TEXT','customCode' => $mfp->getFormHTML(true, 'header')),),
|
||||
array(array('label' => 'LBL_HEADER_TEXT','tabIndex'=>'f', 'customCode'=>'<textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>')),
|
||||
// array(array('label' => 'LBL_FOOTER_TEXT','customCode' => $mfp->getFormHTML(true, 'footer')),),
|
||||
array(array('label' => 'LBL_FOOTER_TEXT','tabIndex'=>'f', 'customCode'=>'<textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>')),
|
||||
),
|
||||
'LBL_TEMPLATE_FILES_DEFS' => array(
|
||||
array(
|
||||
array('customCode'=>'{$TEMPLATE_FILES}'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['EcmDocumentTemplates'] = array(
|
||||
|
||||
'NAME' => array(
|
||||
'width' => '35',
|
||||
'label' => 'LBL_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => false),
|
||||
|
||||
'ACCOUNT_NAME' => array(
|
||||
'width' => '35',
|
||||
'label' => 'LBL_ACCOUNT_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
|
||||
|
||||
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'MODIFIED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MODIFIED_USER',
|
||||
'module' => 'Users',
|
||||
'id' => 'USERS_ID',
|
||||
'default' => false,
|
||||
'sortable' => false,
|
||||
'related_fields' => array('modified_user_id')
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
61
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/searchdefs.php
Executable file
61
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/searchdefs.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$searchdefs['EcmDocumentTemplates'] = array(
|
||||
'templateMeta' => array (
|
||||
'maxColumns' => '3',
|
||||
'widths' => array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array (
|
||||
'name',
|
||||
'account_name',
|
||||
'date_entered',
|
||||
),
|
||||
'advanced_search' => array (
|
||||
'name',
|
||||
'account_name',
|
||||
'date_entered',
|
||||
'account_number',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
64
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/studio.php
Executable file
64
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/studio.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?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.
|
||||
********************************************************************************/
|
||||
|
||||
$GLOBALS['studioDefs']['EcmDocumentTemplates'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmDocumentTemplates/DetailView.html',
|
||||
'php_file' => 'modules/EcmDocumentTemplates/DetailView.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmDocumentTemplates/EditView.html',
|
||||
'php_file' => 'modules/EcmDocumentTemplates/EditView.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
);
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['Documents'] =
|
||||
array (
|
||||
'document_name' => array( 'query_type'=>'default'),
|
||||
'category_id'=> array('query_type'=>'default', 'options' => 'document_category_dom', 'template_var' => 'CATEGORY_OPTIONS'),
|
||||
'subcategory_id'=> array('query_type'=>'default', 'options' => 'document_subcategory_dom', 'template_var' => 'SUBCATEGORY_OPTIONS'),
|
||||
'active_date'=> array('query_type'=>'default'),
|
||||
'exp_date'=> array('query_type'=>'default'),
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['Documents']['EditView'] = array(
|
||||
'templateMeta' => array('form' => array('enctype'=>'multipart/form-data',
|
||||
'hidden'=>array('<input type="hidden" name="old_id" value="{$fields.document_revision_id.value}">',
|
||||
'<input type="hidden" name="parent_id" value="{$smarty.request.parent_id}">',
|
||||
'<input type="hidden" name="parent_type" value="{$smarty.request.parent_type}">',)),
|
||||
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'javascript' => '<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/init.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/lib/urllib.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
|
||||
<script type="text/javascript" src="modules/Documents/documents.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>',
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
'document_name',
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array('name'=>'uploadfile',
|
||||
'customCode' => '<input type="hidden" name="escaped_document_name"><input name="uploadfile" type="{$FILE_OR_HIDDEN}" size="30" maxlength="" onchange="setvalue(this);" value="{$fields.filename.value}">{$fields.filename.value}',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
array('name'=>'revision',
|
||||
'customCode' => '<input name="revision" type="text" value="{$fields.revision.value}" {$DISABLED}>'
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'is_template',
|
||||
'label' => 'LBL_DET_IS_TEMPLATE',
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'template_type',
|
||||
'label' => 'LBL_DET_TEMPLATE_TYPE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
),
|
||||
|
||||
array (
|
||||
'status_id',
|
||||
|
||||
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'active_date','displayParams'=>array('required'=>true)),
|
||||
'exp_date',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'related_doc_name',
|
||||
'customCode' => '<input name="related_document_name" type="text" size="30" maxlength="255" value="{$RELATED_DOCUMENT_NAME}" readonly>' .
|
||||
'<input name="related_doc_id" type="hidden" value="{$fields.related_doc_id.value}"/> ' .
|
||||
'<input title="{$APP.LBL_SELECT_BUTTON_TITLE}" accessKey="{$APP.LBL_SELECT_BUTTON_KEY}" type="{$RELATED_DOCUMENT_BUTTON_AVAILABILITY}" class="button" value="{$APP.LBL_SELECT_BUTTON_LABEL}" name="btn2" onclick=\'open_popup("Documents", 600, 400, "", true, false, {$encoded_document_popup_request_data}, "single", true);\'/>'),
|
||||
array('name'=>'related_doc_rev_number',
|
||||
'customCode' => '<select name="related_doc_rev_id" id="related_doc_rev_id" {$RELATED_DOCUMENT_REVISION_DISABLED}>{$RELATED_DOCUMENT_REVISION_OPTIONS}</select>',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$searchdefs['Documents'] = array(
|
||||
'templateMeta' => array('maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
'document_name',
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'document_name',
|
||||
'category_id',
|
||||
'subcategory_id',
|
||||
'active_date',
|
||||
'exp_date',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
global $mod_strings;
|
||||
$viewdefs['Documents']['SideQuickCreate'] = array(
|
||||
'templateMeta' => array('form'=>array(
|
||||
'enctype'=>'multipart/form-data',
|
||||
'buttons'=>array('SAVE'),
|
||||
'button_location'=>'bottom',
|
||||
'headerTpl'=>'include/EditView/header.tpl',
|
||||
'footerTpl'=>'include/EditView/footer.tpl',
|
||||
),
|
||||
'maxColumns' => '1',
|
||||
'panelClass'=>'none',
|
||||
|
||||
'labelsOnTop'=>true,
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'DEFAULT' =>
|
||||
array (
|
||||
array (
|
||||
array('name'=>'document_name', 'displayParams'=>array('size'=>20, 'required'=>true)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'uploadfile', 'displayParams'=>array('size'=>11, 'required'=>true)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'revision', 'displayParams'=>array('size'=>11, 'required'=>true)),
|
||||
),
|
||||
array (
|
||||
array('name'=>'active_date', 'displayParams'=>array('size'=>11, 'required'=>true)),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
65
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/tmp/studio.php
Executable file
65
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/metadata/tmp/studio.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['Documents'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Documents/DetailView.html',
|
||||
'php_file'=>'modules/Documents/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Documents/EditView.html',
|
||||
'php_file'=>'modules/Documents/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/Documents/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Documents/SearchForm.html',
|
||||
'php_file'=>'modules/Documents/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Layout definition for Quotes
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Documents'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'therevisions' => array(
|
||||
'order' => 10,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'revision',
|
||||
'module' => 'DocumentRevisions',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_DOC_REV_HEADER',
|
||||
'get_subpanel_data' => 'revisions',
|
||||
'fill_in_additional_fields'=>true,
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Bugs
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
// $Id$
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Documents','field_to_name_array'=>array('document_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'document_name'=> array(
|
||||
'name' => 'document_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'is_template'=>array(
|
||||
'name' => 'is_template',
|
||||
'vname' => 'LBL_LIST_IS_TEMPLATE',
|
||||
'width' => '5%',
|
||||
'widget_type'=>'checkbox',
|
||||
),
|
||||
'template_type'=>array(
|
||||
'name' => 'template_types',
|
||||
'vname' => 'LBL_LIST_TEMPLATE_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'latest_revision'=>array(
|
||||
'name' => 'latest_revision',
|
||||
'vname' => 'LBL_LATEST_REVISION',
|
||||
'width' => '10%',
|
||||
'sortable' => false
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Documents',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Documents',
|
||||
'width' => '5%',
|
||||
),
|
||||
'document_revision_id'=>array(
|
||||
'usage'=>'query_only'
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Bugs
|
||||
*
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Documents','field_to_name_array'=>array('document_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
'image2'=>'attachment',
|
||||
'image2_url_field'=>array('id_field'=>'selected_revision_id','filename_field'=>'selected_revision_filename'),
|
||||
'attachment_image_only'=>true,
|
||||
|
||||
),
|
||||
'document_name'=> array(
|
||||
'name' => 'document_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'is_template'=>array(
|
||||
'name' => 'is_template',
|
||||
'vname' => 'LBL_LIST_IS_TEMPLATE',
|
||||
'width' => '5%',
|
||||
'widget_type'=>'checkbox',
|
||||
),
|
||||
'template_type'=>array(
|
||||
'name' => 'template_types',
|
||||
'vname' => 'LBL_LIST_TEMPLATE_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'selected_revision_name'=>array(
|
||||
'name' => 'selected_revision_name',
|
||||
'vname' => 'LBL_LIST_SELECTED_REVISION',
|
||||
'width' => '10%',
|
||||
),
|
||||
'latest_revision_name'=>array(
|
||||
'name' => 'latest_revision_name',
|
||||
'vname' => 'LBL_LIST_LATEST_REVISION',
|
||||
'width' => '10%',
|
||||
),
|
||||
'get_latest'=>array(
|
||||
'widget_class' => 'SubPanelGetLatestButton',
|
||||
'module' => 'Documents',
|
||||
'width' => '5%',
|
||||
),
|
||||
'load_signed'=>array(
|
||||
'widget_class' => 'SubPanelLoadSignedButton',
|
||||
'module' => 'Documents',
|
||||
'width' => '5%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Documents',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Documents',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
8
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/previewPDF.php
Executable file
8
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/previewPDF.php
Executable file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
|
||||
require_once("modules/EcmDocumentTemplates/EcmDocumentTemplate.php");
|
||||
$edt = new EcmDocumentTemplate();
|
||||
$method = (isset($_REQUEST['method']) && $_REQUEST['method'] != '') ? $_REQUEST['record'] : 'I';
|
||||
$edt->getPDF($_REQUEST['record']);
|
||||
}
|
||||
?>
|
||||
77
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/templates/E/footer.php
Executable file
77
modules/EcmDocumentTemplatesaa/EcmDocumentTemplates/templates/E/footer.php
Executable file
@@ -0,0 +1,77 @@
|
||||
<?
|
||||
$this->SetFont('arialpl', '', 8);
|
||||
$this->SetY($this->fh-15);
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->SetFillColor(255,255,255);
|
||||
$this->Rect(0, $this->getBreakLine(), $this->fw, $this->bMargin+1, "F");
|
||||
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Cell(0, 10, $this->PageNo().'/{nb}');
|
||||
|
||||
$this->Ln(5);
|
||||
$this->AliasNbPages();
|
||||
$this->SetLineWidth(0);
|
||||
$this->SetDrawColor(0,0,0);
|
||||
$this->Line($this->lMargin,$this->getBreakLine()-16,$this->fw-$this->rMargin,$this->fh-$this->bMargin-16+1);
|
||||
|
||||
|
||||
if($this->edt->show_footer_on_all_pages == 0 && $this->page > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->SetXY($this->lMargin,$this->fh-$this->bMargin+3-16);
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_account);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'KRS: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_krs,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_address);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'NIP: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_nip,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_phone);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'REGON: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_regon,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,$this->edt->footer_fax);
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'Bank: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->footer_bankname,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,'www.e5.pl');
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'Numer konta: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,$this->edt->account_number,0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(110,4,'');
|
||||
$this->SetFont('arialpl','B','7');
|
||||
$this->Cell(20,4,'Numer GIOS: ');
|
||||
$this->SetFont('arialpl','','7');
|
||||
$this->Cell(45,4,"E0006254W",0,0,'L');
|
||||
$this->Ln();
|
||||
|
||||
$this->SetFont("arialpl","B",8);
|
||||
$this->SetXY(40,$this->GetY()+1);
|
||||
$r=mysql_fetch_array(mysql_query("select document_no from ".strtolower($_REQUEST['module'])." where id='".$_REQUEST['record']."'"));
|
||||
$this->Cell(45,4,$r['document_no'],0,0,'L');
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user