添加到 trunk
+YUCHENG HU+ git-svn-id: https://svn.code.sf.net/p/hawebs/svn@358 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,280 @@
|
||||
<?php
|
||||
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* Container class for storing session data
|
||||
*
|
||||
* PHP version 4
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to [email protected] so we can mail you a copy immediately.
|
||||
*
|
||||
* @category HTTP
|
||||
* @package HTTP_Session
|
||||
* @author Alexander Radivanovich <[email protected]>
|
||||
* @author David Costa <[email protected]>
|
||||
* @author Michael Metz <[email protected]>
|
||||
* @author Stefan Neufeind <[email protected]>
|
||||
* @author Torsten Roehr <[email protected]>
|
||||
* @copyright 1997-2005 The PHP Group
|
||||
* @license http://www.php.net/license/3_0.txt PHP License 3.0
|
||||
* @version CVS: $Id: Container.php,v 1.8 2007/07/14 12:11:54 troehr Exp $
|
||||
* @link http://pear.php.net/package/HTTP_Session
|
||||
* @since File available since Release 0.4.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Container class for storing session data
|
||||
*
|
||||
* @category HTTP
|
||||
* @package HTTP_Session
|
||||
* @author David Costa <[email protected]>
|
||||
* @author Michael Metz <[email protected]>
|
||||
* @author Stefan Neufeind <[email protected]>
|
||||
* @author Torsten Roehr <[email protected]>
|
||||
* @copyright 1997-2005 The PHP Group
|
||||
* @license http://www.php.net/license/3_0.txt PHP License 3.0
|
||||
* @version Release: @package_version@
|
||||
* @link http://pear.php.net/package/HTTP_Session
|
||||
* @since Class available since Release 0.4.0
|
||||
*/
|
||||
class HTTP_Session_Container
|
||||
{
|
||||
/**
|
||||
* Additional options for the container object
|
||||
*
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
var $options = array();
|
||||
|
||||
/**
|
||||
* Constrtuctor method
|
||||
*
|
||||
* @param array $options Additional options for the container object
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
function HTTP_Session_Container($options = null)
|
||||
{
|
||||
$this->_setDefaults();
|
||||
if (is_array($options)) {
|
||||
$this->_parseOptions();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set some default options
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _setDefaults()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse options passed to the container class
|
||||
*
|
||||
* @param array $options Options
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _parseOptions($options)
|
||||
{
|
||||
foreach ($options as $option => $value) {
|
||||
if (in_array($option, array_keys($this->options))) {
|
||||
$this->options[$option] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called by the session handler to initialize things
|
||||
*
|
||||
* @param string $save_path Save path
|
||||
* @param string $session_name Session name
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function open($save_path, $session_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called when the page is finished
|
||||
* executing and the session handler needs to close things off
|
||||
*
|
||||
* Has to be overwritten by each container class
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called by the session handler
|
||||
* to read the data associated with a given session ID.
|
||||
* This function must retrieve and return the session data
|
||||
* for the session identified by $id.
|
||||
*
|
||||
* Has to be overwritten by each container class
|
||||
*
|
||||
* @param string $id ID of the session
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
function read($id)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called when the session handler
|
||||
* has session data to save, which usually happens
|
||||
* at the end of your script
|
||||
*
|
||||
* Has to be overwritten by each container class
|
||||
*
|
||||
* @param string $id ID of the session
|
||||
* @param mixed $data The data associated with a given session ID
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function write($id, $data)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called when a session is destroyed.
|
||||
* It is responsible for deleting the session and cleaning things up.
|
||||
*
|
||||
* Has to be overwritten by each container class
|
||||
*
|
||||
* @param string $id ID of the session
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function destroy($id)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function copies session data of specified id to specified table
|
||||
*
|
||||
* Has to be overwritten by each container class
|
||||
*
|
||||
* @param string $targetTable Table to replicate data to
|
||||
* @param string $id ID of the session
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function replicate($targetTable, $id = null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is responsible for garbage collection.
|
||||
* In the case of session handling, it is responsible
|
||||
* for deleting old, stale sessions that are hanging around.
|
||||
* The session handler will call this every now and then.
|
||||
*
|
||||
* Has to be overwritten by each container class
|
||||
*
|
||||
* @param integer $maxlifetime Maximum lifetime
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function gc($maxlifetime)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set session save handler
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function set()
|
||||
{
|
||||
$GLOBALS['HTTP_Session_Container'] =& $this;
|
||||
session_module_name('user');
|
||||
session_set_save_handler('HTTP_Session_Open',
|
||||
'HTTP_Session_Close',
|
||||
'HTTP_Session_Read',
|
||||
'HTTP_Session_Write',
|
||||
'HTTP_Session_Destroy',
|
||||
'HTTP_Session_GC');
|
||||
}
|
||||
|
||||
/**
|
||||
* Destructor for compatibility with PHP >= 5.0.5
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function __destruct()
|
||||
{
|
||||
$GLOBALS['HTTP_Session_Container'] =& $this;
|
||||
session_write_close();
|
||||
}
|
||||
}
|
||||
|
||||
// Delegate function calls to the object's methods
|
||||
/** @ignore */
|
||||
function HTTP_Session_Open($save_path, $session_name)
|
||||
{
|
||||
return (isset($GLOBALS['HTTP_Session_Container'])) ? $GLOBALS['HTTP_Session_Container']->open($save_path, $session_name)
|
||||
: false;
|
||||
}
|
||||
/** @ignore */
|
||||
function HTTP_Session_Close()
|
||||
{
|
||||
return (isset($GLOBALS['HTTP_Session_Container'])) ? $GLOBALS['HTTP_Session_Container']->close()
|
||||
: false;
|
||||
}
|
||||
/** @ignore */
|
||||
function HTTP_Session_Read($id)
|
||||
{
|
||||
return (isset($GLOBALS['HTTP_Session_Container'])) ? $GLOBALS['HTTP_Session_Container']->read($id)
|
||||
: false;
|
||||
}
|
||||
/** @ignore */
|
||||
function HTTP_Session_Write($id, $data)
|
||||
{
|
||||
return (isset($GLOBALS['HTTP_Session_Container'])) ? $GLOBALS['HTTP_Session_Container']->write($id, $data)
|
||||
: false;
|
||||
}
|
||||
/** @ignore */
|
||||
function HTTP_Session_Destroy($id)
|
||||
{
|
||||
return (isset($GLOBALS['HTTP_Session_Container'])) ? $GLOBALS['HTTP_Session_Container']->destroy($id)
|
||||
: false;
|
||||
}
|
||||
/** @ignore */
|
||||
function HTTP_Session_GC($maxlifetime)
|
||||
{
|
||||
return (isset($GLOBALS['HTTP_Session_Container'])) ? $GLOBALS['HTTP_Session_Container']->gc($maxlifetime)
|
||||
: false;
|
||||
}
|
||||
?>
|
||||
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,202 @@
|
||||
<?php
|
||||
|
||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||
|
||||
/**
|
||||
* Database container for session data
|
||||
*
|
||||
* Memcache database container
|
||||
*
|
||||
* PHP version 4
|
||||
*
|
||||
* LICENSE: This source file is subject to version 3.0 of the PHP license
|
||||
* that is available through the world-wide-web at the following URI:
|
||||
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
|
||||
* the PHP License and are unable to obtain it through the web, please
|
||||
* send a note to [email protected] so we can mail you a copy immediately.
|
||||
*
|
||||
* @category HTTP
|
||||
* @package HTTP_Session
|
||||
* @author Chad Wagner <[email protected]>
|
||||
* @author Torsten Roehr <[email protected]>
|
||||
* @copyright 1997-2007 The PHP Group
|
||||
* @license http://www.php.net/license/3_0.txt PHP License 3.0
|
||||
* @version CVS: $Id: Memcache.php,v 1.3 2007/07/14 12:11:55 troehr Exp $
|
||||
* @link http://pear.php.net/package/HTTP_Session
|
||||
* @since File available since Release 0.5.6
|
||||
*/
|
||||
|
||||
require_once 'HTTP/Session/Container.php';
|
||||
|
||||
/**
|
||||
* Database container for session data
|
||||
*
|
||||
* @category HTTP
|
||||
* @package HTTP_Session
|
||||
* @author Chad Wagner <[email protected]>
|
||||
* @author Torsten Roehr <[email protected]>
|
||||
* @copyright 1997-2007 The PHP Group
|
||||
* @license http://www.php.net/license/3_0.txt PHP License 3.0
|
||||
* @version Release: @package_version@
|
||||
* @link http://pear.php.net/package/HTTP_Session
|
||||
* @since Class available since Release 0.5.6
|
||||
*/
|
||||
class HTTP_Session_Container_Memcache extends HTTP_Session_Container
|
||||
{
|
||||
/**
|
||||
* Memcache connection object
|
||||
*
|
||||
* @var object Memcache
|
||||
* @access private
|
||||
*/
|
||||
var $mc;
|
||||
|
||||
/**
|
||||
* Constructor method
|
||||
*
|
||||
* $options is an array with the options.<br>
|
||||
* The options are:
|
||||
* <ul>
|
||||
* <li>'memcache' - Memcache object
|
||||
* <li>'prefix' - Key prefix, default is 'sessiondata:'</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param array $options Options
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
function HTTP_Session_Container_Memcache($options)
|
||||
{
|
||||
$this->_setDefaults();
|
||||
|
||||
if (is_array($options)) {
|
||||
$this->_parseOptions($options);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to database by using the given DSN string
|
||||
*
|
||||
* @param string $mc Memcache object
|
||||
*
|
||||
* @access private
|
||||
* @return mixed Object on error, otherwise bool
|
||||
*/
|
||||
function _connect($mc)
|
||||
{
|
||||
if (is_object($mc) && is_a($mc, 'Memcache')) {
|
||||
$this->mc = $mc;
|
||||
|
||||
} else {
|
||||
|
||||
return new PEAR_Error('The given memcache object was not valid in file '
|
||||
. __FILE__ . ' at line ' . __LINE__,
|
||||
41,
|
||||
PEAR_ERROR_RETURN,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set some default options
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
function _setDefaults()
|
||||
{
|
||||
$this->options['prefix'] = 'sessiondata:';
|
||||
$this->options['memcache'] = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Establish connection to a database
|
||||
*
|
||||
* @param string $save_path Save path
|
||||
* @param string $session_name Session name
|
||||
*
|
||||
* @access public
|
||||
* @return mixed Object on error, otherwise bool
|
||||
*/
|
||||
function open($save_path, $session_name)
|
||||
{
|
||||
return $this->_connect($this->options['memcache']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Free resources
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read session data
|
||||
*
|
||||
* @param string $id Session id
|
||||
*
|
||||
* @access public
|
||||
* @return mixed
|
||||
*/
|
||||
function read($id)
|
||||
{
|
||||
$result = $this->mc->get($this->options['prefix'] . $id);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write session data
|
||||
*
|
||||
* @param string $id Session id
|
||||
* @param mixed $data Session data
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function write($id, $data)
|
||||
{
|
||||
$this->mc->set($this->options['prefix'] . $id,
|
||||
$data,
|
||||
MEMCACHE_COMPRESSED,
|
||||
time() + ini_get('session.gc_maxlifetime'));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy session data
|
||||
*
|
||||
* @param string $id Session id
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function destroy($id)
|
||||
{
|
||||
$this->mc->delete($this->options['prefix'] . $id);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Garbage collection
|
||||
*
|
||||
* @param int $maxlifetime Maximum lifetime
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function gc($maxlifetime)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,288 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
|
||||
* ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
|
||||
* the specific language governing rights and limitations under the License.
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* $Header$
|
||||
* Description: generic list view class.
|
||||
********************************************************************************/
|
||||
require_once('include/logging.php');
|
||||
require_once('include/ListView/ListViewSession.php');
|
||||
|
||||
class ListView {
|
||||
|
||||
var $local_theme = null;
|
||||
var $local_app_strings= null;
|
||||
var $local_image_path = null;
|
||||
var $local_current_module = null;
|
||||
var $local_mod_strings = null;
|
||||
var $records_per_page = 20;
|
||||
var $xTemplate = null;
|
||||
var $xTemplatePath = null;
|
||||
var $seed_data = null;
|
||||
var $query_where = null;
|
||||
var $query_limit = -1;
|
||||
var $query_orderby = null;
|
||||
var $header_title = "";
|
||||
var $header_text = "";
|
||||
var $log = null;
|
||||
var $initialized = false;
|
||||
var $querey_where_has_changed = false;
|
||||
var $display_header_and_footer = true;
|
||||
|
||||
|
||||
/**initializes ListView
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function ListView(){
|
||||
global $log;
|
||||
$log->debug("Entering ListView() method ...");
|
||||
|
||||
|
||||
if(!$this->initialized){
|
||||
global $list_max_entries_per_page;
|
||||
$this->records_per_page = $list_max_entries_per_page + 0;
|
||||
$this->initialized = true;
|
||||
global $theme, $app_strings, $image_path, $currentModule;
|
||||
$this->local_theme = $theme;
|
||||
$this->local_app_strings = &$app_strings;
|
||||
$this->local_image_path = $image_path;
|
||||
$this->local_current_module = $currentModule;
|
||||
|
||||
if(empty($this->local_image_path)){
|
||||
$this->local_image_path = 'themes/'.$theme.'/images';
|
||||
}
|
||||
$this->log = LoggerManager::getLogger('listView_'.$this->local_current_module);
|
||||
$log->debug("Exiting ListView method ...");
|
||||
}
|
||||
}
|
||||
/**sets the header title */
|
||||
function setHeaderTitle($value){
|
||||
global $log;
|
||||
$log->debug("Entering setHeaderTitle(".$value.") method ...");
|
||||
$this->header_title = $value;
|
||||
$log->debug("Exiting setHeaderTitle method ...");
|
||||
}
|
||||
/**sets the header text this is text thats appended to the header vtiger_table and is usually used for the creation of buttons
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setHeaderText($value){
|
||||
global $log;
|
||||
$log->debug("Entering setHeaderText(".$value.") method ...");
|
||||
$this->header_text = $value;
|
||||
$log->debug("Exiting setHeaderText method ...");
|
||||
}
|
||||
/**sets the parameters dealing with the db
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setQuery($where, $limit, $orderBy, $varName, $allowOrderByOveride= true){
|
||||
global $log;
|
||||
$log->debug("Entering setQuery(".$where.",". $limit.",". $orderBy.",". $varName.",". $allowOrderByOveride.") method ...");
|
||||
$this->query_where = $where;
|
||||
if($this->getSessionVariable("query", "where") != $where){
|
||||
$this->querey_where_has_changed = true;
|
||||
$this->setSessionVariable("query", "where", $where);
|
||||
}
|
||||
|
||||
$this->query_limit = $limit;
|
||||
if(!$allowOrderByOveride){
|
||||
$this->query_orderby = $orderBy;
|
||||
$log->debug("Exiting setQuery method ...");
|
||||
return;
|
||||
}
|
||||
$sortBy = $this->getSessionVariable($varName, "ORDER_BY") ;
|
||||
|
||||
if(empty($sortBy)){
|
||||
$this->setUserVariable($varName, "ORDER_BY", $orderBy);
|
||||
$sortBy = $orderBy;
|
||||
}else{
|
||||
$this->setUserVariable($varName, "ORDER_BY", $sortBy);
|
||||
}
|
||||
if($sortBy == 'amount'){
|
||||
$sortBy = 'amount*1';
|
||||
}
|
||||
|
||||
$desc = false;
|
||||
$desc = $this->getSessionVariable($varName, $sortBy."_desc");
|
||||
|
||||
if(empty($desc))
|
||||
$desc = false;
|
||||
if(isset($_REQUEST[$this->getSessionVariableName($varName, "ORDER_BY")]))
|
||||
$last = $this->getSessionVariable($varName, "ORDER_BY_LAST");
|
||||
if(!empty($last) && $last == $sortBy){
|
||||
$desc = !$desc;
|
||||
}else {
|
||||
$this->setSessionVariable($varName, "ORDER_BY_LAST", $sortBy);
|
||||
}
|
||||
$this->setSessionVariable($varName, $sortBy."_desc", $desc);
|
||||
if(!empty($sortBy)){
|
||||
if(substr_count(strtolower($sortBy), ' desc') == 0 && substr_count(strtolower($sortBy), ' asc') == 0){
|
||||
if($desc){
|
||||
$this->query_orderby = $sortBy.' desc';
|
||||
}else{
|
||||
$this->query_orderby = $sortBy.' asc';
|
||||
}
|
||||
}
|
||||
else{
|
||||
$this->query_orderby = $sortBy;
|
||||
}
|
||||
}else {
|
||||
$this->query_orderby = "";
|
||||
}
|
||||
$log->debug("Exiting setQuery method ...");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**sets the theme used only use if it is different from the global
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setTheme($theme){
|
||||
global $log;
|
||||
$log->debug("Entering setTheme(".$theme.") method ...");
|
||||
$this->local_theme = $theme;
|
||||
if(isset($this->xTemplate))$this->xTemplate->assign("THEME", $this->local_theme );
|
||||
$log->debug("Exiting setTheme method ...");
|
||||
}
|
||||
|
||||
/**sets the AppStrings used only use if it is different from the global
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setAppStrings(&$app_strings){
|
||||
global $log;
|
||||
$log->debug("Entering setAppStrings(".$app_strings.") method ...");
|
||||
unset($this->local_app_strings);
|
||||
$this->local_app_strings = $app_strings;
|
||||
if(isset($this->xTemplate))$this->xTemplate->assign("APP", $this->local_app_strings );
|
||||
$log->debug("Exiting setAppStrings method ...");
|
||||
}
|
||||
|
||||
/**sets the ModStrings used
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setModStrings(&$mod_strings){
|
||||
global $log;
|
||||
$log->debug("Entering setModStrings(".$mod_strings.") method ...");
|
||||
unset($this->local_module_strings);
|
||||
$this->local_mod_strings = $mod_strings;
|
||||
if(isset($this->xTemplate))$this->xTemplate->assign("MOD", $this->local_mod_strings );
|
||||
$log->debug("Exiting setModStrings method ...");
|
||||
}
|
||||
|
||||
/**sets the ImagePath used
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setImagePath($image_path){
|
||||
global $log;
|
||||
$log->debug("Entering setImagePath(".$image_path.") method ...");
|
||||
$this->local_image_path = $image_path;
|
||||
if(empty($this->local_image_path)){
|
||||
$this->local_image_path = 'themes/'.$this->local_theme.'/images';
|
||||
}
|
||||
if(isset($this->xTemplate))$this->xTemplate->assign("IMAGE_PATH", $this->local_image_path );
|
||||
$log->debug("Exiting setImagePath method ...");
|
||||
}
|
||||
|
||||
/**sets the currentModule only use if this is different from the global
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setCurrentModule($currentModule){
|
||||
global $log;
|
||||
$log->debug("Entering setCurrentModule(".$currentModule.") method ...");
|
||||
unset($this->local_current_module);
|
||||
$this->local_current_module = $currentModule;
|
||||
$this->log = LoggerManager::getLogger('listView_'.$this->local_current_module);
|
||||
if(isset($this->xTemplate))$this->xTemplate->assign("MODULE_NAME", $this->local_current_module );
|
||||
$log->debug("Exiting setCurrentModule method ...");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**INTERNAL FUNCTION sets a session variable
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function setSessionVariable($localVarName,$varName, $value){
|
||||
global $log;
|
||||
$log->debug("Entering setSessionVariable(".$localVarName.",".$varName.",". $value.") method ...");
|
||||
$_SESSION[$this->local_current_module."_".$localVarName."_".$varName] = $value;
|
||||
$log->debug("Exiting setSessionVariable method ...");
|
||||
}
|
||||
|
||||
function setUserVariable($localVarName,$varName, $value){
|
||||
global $log;
|
||||
$log->debug("Entering setUserVariable(".$localVarName.",".$varName.",". $value.") method ...");
|
||||
global $current_user;
|
||||
$current_user->setPreference($this->local_current_module."_".$localVarName."_".$varName, $value);
|
||||
$log->debug("Exiting setUserVariable method ...");
|
||||
}
|
||||
|
||||
/**INTERNAL FUNCTION returns a session variable first checking the querey for it then checking the session
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
function getSessionVariable($localVarName,$varName){
|
||||
global $log;
|
||||
$log->debug("Entering getSessionVariable(".$localVarName.",".$varName.") method ...");
|
||||
if(isset($_REQUEST[$this->getSessionVariableName($localVarName, $varName)])){
|
||||
$this->setSessionVariable($localVarName,$varName,vtlib_purify($_REQUEST[$this->getSessionVariableName($localVarName, $varName)]));
|
||||
}
|
||||
if(isset($_SESSION[$this->getSessionVariableName($localVarName, $varName)])){
|
||||
$log->debug("Exiting getSessionVariable method ...");
|
||||
return $_SESSION[$this->getSessionVariableName($localVarName, $varName)];
|
||||
}
|
||||
$log->debug("Exiting getSessionVariable method ...");
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
* @return void
|
||||
* @param unknown $localVarName
|
||||
* @param unknown $varName
|
||||
* @desc INTERNAL FUNCTION returns the session/query variable name
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function getSessionVariableName($localVarName,$varName){
|
||||
global $log;
|
||||
$log->debug("Entering getSessionVariableName(".$localVarName.",".$varName.") method ...");
|
||||
$log->debug("Exiting getSessionVariableName method ...");
|
||||
return $this->local_current_module."_".$localVarName."_".$varName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/*+********************************************************************************
|
||||
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*********************************************************************************/
|
||||
global $app_strings, $mod_strings, $current_language, $currentModule, $theme;
|
||||
global $list_max_entries_per_page;
|
||||
|
||||
require_once('Smarty_setup.php');
|
||||
require_once('include/ListView/ListView.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
require_once('include/DatabaseUtil.php');
|
||||
|
||||
checkFileAccess("modules/$currentModule/$currentModule.php");
|
||||
require_once("modules/$currentModule/$currentModule.php");
|
||||
|
||||
// Custom View
|
||||
$customView = new CustomView($currentModule);
|
||||
$viewid = $customView->getViewId($currentModule);
|
||||
$customview_html = $customView->getCustomViewCombo($viewid);
|
||||
$viewinfo = $customView->getCustomViewByCvid($viewid);
|
||||
|
||||
if($viewid != "0"&& $viewid != 0){
|
||||
$listquery = getListQuery($currentModule);
|
||||
$list_query= $customView->getModifiedCvListQuery($viewid, $listquery, $currentModule);
|
||||
}else{
|
||||
$list_query = getListQuery($currentModule);
|
||||
}
|
||||
|
||||
// Enabling Module Search
|
||||
$url_string = '';
|
||||
if($_REQUEST['query'] == 'true') {
|
||||
if(!empty($_REQUEST['globalSearch'])){
|
||||
$searchValue = vtlib_purify($_REQUEST['globalSearchText']);
|
||||
$where = '(' . getUnifiedWhere($list_query,$currentModule,$searchValue) . ')';
|
||||
$url_string .= '&query=true&globalSearch=true&globalSearchText='.$searchValue;
|
||||
}else{
|
||||
list($where, $ustring) = split('#@@#', getWhereCondition($currentModule));
|
||||
$url_string .= "&query=true$ustring";
|
||||
}
|
||||
}
|
||||
//print_r($where);
|
||||
if($where != '') {
|
||||
$list_query = "$list_query AND $where";
|
||||
$_SESSION['export_where'] = $where;
|
||||
}else{
|
||||
unset($_SESSION['export_where']);
|
||||
}
|
||||
// Sorting
|
||||
if($order_by) {
|
||||
if($order_by == 'smownerid'){
|
||||
if( $adb->dbType == "pgsql"){
|
||||
$list_query .= ' GROUP BY user_name';
|
||||
}
|
||||
$list_query .= ' ORDER BY user_name '.$sorder;
|
||||
}else {
|
||||
$tablename = getTableNameForField($currentModule, $order_by);
|
||||
$tablename = ($tablename != '')? ($tablename . '.') : '';
|
||||
if( $adb->dbType == "pgsql"){
|
||||
$list_query .= ' GROUP BY '. $tablename . $order_by;
|
||||
}
|
||||
$list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder;
|
||||
}
|
||||
}
|
||||
|
||||
$count_result = $adb->query(mkCountQuery($list_query));
|
||||
$noofrows = $adb->query_result($count_result,0,"count");
|
||||
|
||||
$pageNumber = ceil($noofrows/$list_max_entries_per_page);
|
||||
if($pageNumber == 0){
|
||||
$pageNumber = 1;
|
||||
}
|
||||
echo $app_strings['LBL_LIST_OF'].' '.$pageNumber;
|
||||
?>
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/logging.php');
|
||||
require_once('modules/CustomView/CustomView.php');
|
||||
|
||||
class ListViewSession {
|
||||
|
||||
var $module = null;
|
||||
var $viewname = null;
|
||||
var $start = null;
|
||||
var $sorder = null;
|
||||
var $sortby = null;
|
||||
var $page_view = null;
|
||||
|
||||
/**initializes ListViewSession
|
||||
* Portions created by vtigerCRM are Copyright (C) vtigerCRM.
|
||||
* All Rights Reserved.
|
||||
*/
|
||||
|
||||
function ListViewSession()
|
||||
{
|
||||
global $log,$currentModule;
|
||||
$log->debug("Entering ListViewSession() method ...");
|
||||
|
||||
$this->module = $currentModule;
|
||||
$this->sortby = 'ASC';
|
||||
$this->start =1;
|
||||
}
|
||||
|
||||
function getCurrentPage($currentModule,$viewId){
|
||||
if(!empty($_SESSION['lvs'][$currentModule][$viewId]['start'])){
|
||||
return $_SESSION['lvs'][$currentModule][$viewId]['start'];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
function getRequestStartPage(){
|
||||
$start = $_REQUEST['start'];
|
||||
if(!is_numeric($start)){
|
||||
$start = 1;
|
||||
}
|
||||
if($start < 1){
|
||||
$start = 1;
|
||||
}
|
||||
$start = ceil($start);
|
||||
return $start;
|
||||
}
|
||||
|
||||
function getListViewNavigation($currentRecordId){
|
||||
global $currentModule,$current_user,$adb,$log,$list_max_entries_per_page;
|
||||
Zend_Json::$useBuiltinEncoderDecoder = true;
|
||||
$reUseData = false;
|
||||
$displayBufferRecordCount = 10;
|
||||
$bufferRecordCount = 15;
|
||||
if($currentModule == 'Documents'){
|
||||
$sql = "select folderid from vtiger_notes where notesid=?";
|
||||
$params = array($currentRecordId);
|
||||
$result = $adb->pquery($sql,$params);
|
||||
$folderId = $adb->query_result($result,0,'folderid');
|
||||
}
|
||||
$cv = new CustomView();
|
||||
$viewId = $cv->getViewId($currentModule);
|
||||
if(!empty($_SESSION[$currentModule.'_DetailView_Navigation'.$viewId])){
|
||||
$recordNavigationInfo = Zend_Json::decode($_SESSION[$currentModule.'_DetailView_Navigation'.$viewId]);
|
||||
$pageNumber =0;
|
||||
if(count($recordNavigationInfo) == 1){
|
||||
foreach ($recordNavigationInfo as $recordIdList) {
|
||||
if(in_array($currentRecordId,$recordIdList)){
|
||||
$reUseData = true;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$recordList = array();
|
||||
$recordPageMapping = array();
|
||||
foreach ($recordNavigationInfo as $start=>$recordIdList){
|
||||
foreach ($recordIdList as $index=>$recordId) {
|
||||
$recordList[] = $recordId;
|
||||
$recordPageMapping[$recordId] = $start;
|
||||
if($recordId == $currentRecordId){
|
||||
$searchKey = count($recordList)-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($searchKey > $displayBufferRecordCount -1 && $searchKey < count($recordList)-$displayBufferRecordCount){
|
||||
$reUseData= true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($reUseData === false){
|
||||
$recordNavigationInfo = array();
|
||||
if(!empty($_REQUEST['start'])){
|
||||
$start = ListViewSession::getRequestStartPage();
|
||||
}else{
|
||||
$start = ListViewSession::getCurrentPage($currentModule,$viewId);
|
||||
}
|
||||
$startRecord = (($start - 1) * $list_max_entries_per_page) - $bufferRecordCount;
|
||||
if($startRecord < 0){
|
||||
$startRecord = 0;
|
||||
}
|
||||
|
||||
$list_query = $_SESSION[$currentModule.'_listquery'];
|
||||
if($currentModule=='Documents' && !empty($folderId)){
|
||||
$list_query = preg_replace("/[\n\r\s]+/"," ",$list_query);
|
||||
$findOrderByPosition = stripos($list_query,' ORDER BY ');
|
||||
if ($findOrderByPosition > 0) {
|
||||
$orderByClause = substr($list_query, $findOrderByPosition, strlen($list_query));
|
||||
$list_query = substr($list_query, 0, $findOrderByPosition). " AND vtiger_notes.folderid=$folderId " . $orderByClause;
|
||||
} else {
|
||||
$list_query .= " AND vtiger_notes.folderid=$folderId";
|
||||
}
|
||||
}
|
||||
if($start !=1){
|
||||
$recordCount = ($list_max_entries_per_page+2 * $bufferRecordCount);
|
||||
}else{
|
||||
$recordCount = ($list_max_entries_per_page+ $bufferRecordCount);
|
||||
}
|
||||
if( $adb->dbType == "pgsql"){
|
||||
$list_query .= " OFFSET $startRecord LIMIT $recordCount";
|
||||
}else{
|
||||
$list_query .= " LIMIT $startRecord, $recordCount";
|
||||
}
|
||||
|
||||
$resultAllCRMIDlist_query=$adb->pquery($list_query,array());
|
||||
$navigationRecordList = array();
|
||||
while($forAllCRMID = $adb->fetch_array($resultAllCRMIDlist_query)) {
|
||||
$navigationRecordList[] = $forAllCRMID['crmid'];
|
||||
}
|
||||
|
||||
$pageCount = 0;
|
||||
$current = $start;
|
||||
if($start ==1){
|
||||
$firstPageRecordCount = $list_max_entries_per_page;
|
||||
}else{
|
||||
$firstPageRecordCount = $bufferRecordCount;
|
||||
$current -=1;
|
||||
}
|
||||
|
||||
$searchKey = array_search($currentRecordId,$navigationRecordList);
|
||||
$recordNavigationInfo = array();
|
||||
if($searchKey !== false){
|
||||
foreach ($navigationRecordList as $index => $recordId) {
|
||||
if(!is_array($recordNavigationInfo[$current])){
|
||||
$recordNavigationInfo[$current] = array();
|
||||
}
|
||||
if($index == $firstPageRecordCount || $index == ($firstPageRecordCount+$pageCount * $list_max_entries_per_page)){
|
||||
$current++;
|
||||
$pageCount++;
|
||||
}
|
||||
$recordNavigationInfo[$current][] = $recordId;
|
||||
}
|
||||
}
|
||||
$_SESSION[$currentModule.'_DetailView_Navigation'.$viewId] =
|
||||
Zend_Json::encode($recordNavigationInfo);
|
||||
}
|
||||
return $recordNavigationInfo;
|
||||
}
|
||||
|
||||
function getRequestCurrentPage($currentModule, $query, $viewid, $queryMode = false) {
|
||||
global $list_max_entries_per_page, $adb;
|
||||
$start = 1;
|
||||
if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true'){
|
||||
return ListViewSession::getRequestStartPage();
|
||||
}
|
||||
if(!empty($_REQUEST['start'])){
|
||||
$start = $_REQUEST['start'];
|
||||
if($start == 'last'){
|
||||
$count_result = $adb->query( mkCountQuery( $query));
|
||||
$noofrows = $adb->query_result($count_result,0,"count");
|
||||
if($noofrows > 0){
|
||||
$start = ceil($noofrows/$list_max_entries_per_page);
|
||||
}
|
||||
}
|
||||
if(!is_numeric($start)){
|
||||
$start = 1;
|
||||
}elseif($start < 1){
|
||||
$start = 1;
|
||||
}
|
||||
$start = ceil($start);
|
||||
}else if(!empty($_SESSION['lvs'][$currentModule][$viewid]['start'])){
|
||||
$start = $_SESSION['lvs'][$currentModule][$viewid]['start'];
|
||||
}
|
||||
if(!$queryMode) {
|
||||
$_SESSION['lvs'][$currentModule][$viewid]['start'] = intval($start);
|
||||
}
|
||||
return $start;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
@@ -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,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);
|
||||
?>
|
||||
@@ -0,0 +1,11 @@
|
||||
BODY {font-family:times new roman,serif}
|
||||
H2 {color:#4000A0}
|
||||
P.demo {text-align:center; margin-top:-10px}
|
||||
A.demo {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
A.demo:link {text-decoration:none; font-weight:bold; color:#0000CC}
|
||||
A.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
A.demo:active {text-decoration:none; font-weight:bold; color:#0000FF}
|
||||
.st {font-weight:bold; color:#900000}
|
||||
.kw {color:#000080; font-weight:bold}
|
||||
.str {color:#CC0000}
|
||||
.cmt {color:#008000}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
||||
* ("License"); You may not use this file except in compliance with the License
|
||||
* The Original Code is: vtiger CRM Open Source
|
||||
* The Initial Developer of the Original Code is vtiger.
|
||||
* Portions created by vtiger are Copyright (C) vtiger.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
********************************************************************************/
|
||||
|
||||
//Following variables will be used in include/fpdf/templates/body.php
|
||||
|
||||
//where the bottom line starts. If you change this bottom then all related changes will be done automatically
|
||||
|
||||
//If the product description is too long and you want to avoid the display clearly then you can change bottom =170 or products_per_page=5 or less.
|
||||
|
||||
//Enter values less than 170 if value > 170 then last lines will be displayed in next page
|
||||
$bottom="130";//"130"
|
||||
|
||||
//how may products per page
|
||||
$products_per_page="6";//used in modules/{PO/SO/Quotes/Invoice}/CreatePDF.php
|
||||
|
||||
|
||||
//where the top line starts
|
||||
$body_top="80";
|
||||
|
||||
//This is the y position where the nettotal starts, next fields will be displayed in bottom+n(6) pixels
|
||||
$nettotal_y = $bottom+38;//"168";
|
||||
$next_y = "6";
|
||||
|
||||
|
||||
//Following variables will be used in modules/{PO/SO/Quotes/Invoice}/pdf_templates/footer.php
|
||||
$top = $nettotal_y+48;//"216";
|
||||
|
||||
|
||||
//if true then Description and Terms & Conditions will be displayed in all pages, false - displayed only in the last page
|
||||
$display_desc_tc = 'true';
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
// watermark based on status
|
||||
// this is the postion of the watermark before the rotate
|
||||
$waterMarkPositions=array("30","180");
|
||||
// this is the rotate amount (todo)
|
||||
$waterMarkRotate=array("45","50","180");
|
||||
$pdf->watermark( $status, $waterMarkPositions, $waterMarkRotate );
|
||||
|
||||
include("include/fpdf/pdfconfig.php");
|
||||
|
||||
// blow a bubble around the table
|
||||
$Bubble=array("10",$body_top,"170","$bottom");
|
||||
$pdf->tableWrapper($Bubble);
|
||||
|
||||
/* ************ Begin Table Setup ********************** */
|
||||
// Each of these arrays needs to have matching keys
|
||||
// "key" => "Length"
|
||||
// total of columns needs to be 190 in order to fit the table
|
||||
// correctly
|
||||
$prodTable=array("10","60");
|
||||
//added for value field allignment
|
||||
//contains the x angle starting point of the value field
|
||||
$space=array("4"=>"191","5"=>"189","6"=>"187","7"=>"186","8"=>"184","9"=>"182","10"=>"180","11"=>"179","12"=>"177","13"=>"175");
|
||||
//if taxtype is individual
|
||||
if($focus->column_fields["hdnTaxType"] == "individual")
|
||||
{
|
||||
$colsAlign["Product Name"] = "L";
|
||||
$colsAlign["Description"] = "L";
|
||||
$colsAlign["Qty"] = "R";
|
||||
$colsAlign["Price"] = "R";
|
||||
$colsAlign["Discount"] = "R";
|
||||
$colsAlign["Tax"] = "R";
|
||||
$colsAlign["Total"] = "R";
|
||||
$cols["Product Code"] = "30";
|
||||
$cols["Product Name"] = "65";
|
||||
$cols["Qty"] = "13";
|
||||
$cols["Price"] = "22";
|
||||
$cols["Discount"] = "15";
|
||||
$cols["Tax"] = "20";
|
||||
$cols["Total"] = "25";
|
||||
}
|
||||
else
|
||||
{
|
||||
//if taxtype is group
|
||||
$colsAlign["Product Name"] = "L";
|
||||
$colsAlign["Description"] = "L";
|
||||
$colsAlign["Qty"] = "R";
|
||||
$colsAlign["Price"] = "R";
|
||||
$colsAlign["Discount"] = "R";
|
||||
$colsAlign["Total"] = "R";
|
||||
$cols["Product Code"] = "30";
|
||||
$cols["Product Name"] = "65";
|
||||
$cols["Qty"] = "15";
|
||||
$cols["Price"] = "30";
|
||||
$cols["Discount"] = "20";
|
||||
$cols["Total"] = "30";
|
||||
}
|
||||
|
||||
|
||||
$pdf->addCols( $cols,$prodTable,$bottom, $focus->column_fields["hdnTaxType"]);
|
||||
$pdf->addLineFormat( $colsAlign);
|
||||
|
||||
/* ************** End Table Setup *********************** */
|
||||
|
||||
|
||||
|
||||
/* ************* Begin Product Population *************** */
|
||||
$ppad=3;
|
||||
$y = $body_top+10;
|
||||
|
||||
for($i=0;$i<count($line);$i++)
|
||||
{
|
||||
$size = $pdf->addProductLine( $y, $line[$i] );
|
||||
$y += $size+$ppad;
|
||||
}
|
||||
|
||||
/* ******************* End product population ********* */
|
||||
|
||||
|
||||
/* ************* Begin Totals ************************** */
|
||||
$t=$bottom+56;
|
||||
$pad=6;
|
||||
for($i=0;$i<count($total);$i++)
|
||||
{
|
||||
$size = $pdf->addProductLine( $t, $total[$i], $total[$i] );
|
||||
$t += $pad;
|
||||
}
|
||||
|
||||
//Set the x and y positions to place the NetTotal, Discount, S&H charge
|
||||
//if taxtype is not individual ie., group tax
|
||||
if($focus->column_fields["hdnTaxType"] != "individual")
|
||||
{
|
||||
$lineData=array("105",$bottom+37,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data= $app_strings['LBL_NET_TOTAL'].":";// ".$price_subtotal."";
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(0*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_subtotal)] , ($nettotal_y+(0*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_subtotal);
|
||||
|
||||
|
||||
$lineData=array("105",$bottom+43,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
|
||||
//For alignment
|
||||
if($final_price_discount_percent != '')
|
||||
$data= $app_strings['LBL_DISCOUNT'].": $final_price_discount_percent";// ".$price_discount."";
|
||||
else
|
||||
$data= $app_strings['LBL_DISCOUNT'].":";// ".$price_discount."";
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(1*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_discount)] , ($nettotal_y+(1*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_discount);
|
||||
|
||||
$lineData=array("105",$bottom+49,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data= $app_strings['LBL_TAX'].": ($group_total_tax_percent %)";// ".$price_salestax."";
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(2*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_salestax)] , ($nettotal_y+(2*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_salestax);
|
||||
|
||||
$lineData=array("105",$bottom+55,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data = $app_strings['LBL_SHIPPING_AND_HANDLING_CHARGES'].":";// ".$price_shipping;
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(3*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_shipping)] , ($nettotal_y+(3*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_shipping);
|
||||
}
|
||||
else
|
||||
{
|
||||
//if taxtype is individual
|
||||
$lineData=array("105",$bottom+43,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data= $app_strings['LBL_NET_TOTAL'].":";// ".$price_subtotal."";
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(1*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
// added for value field allignment
|
||||
|
||||
$pdf->SetXY( $space[strlen($price_subtotal)] , ($nettotal_y+(1*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4,$price_subtotal);
|
||||
|
||||
|
||||
$lineData=array("105",$bottom+49,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
|
||||
//For alignment
|
||||
if($final_price_discount_percent != '')
|
||||
$data= $app_strings['LBL_DISCOUNT'].": $final_price_discount_percent";// ".$price_discount."";
|
||||
else
|
||||
$data= $app_strings['LBL_DISCOUNT'].":";// ".$price_discount."";
|
||||
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(2*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_discount)] , ($nettotal_y+(2*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_discount);
|
||||
|
||||
|
||||
$lineData=array("105",$bottom+55,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data = $app_strings['LBL_SHIPPING_AND_HANDLING_CHARGES'].":";// ".$price_shipping;
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(3*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
|
||||
$pdf->SetXY( $space[strlen($price_shipping)] , ($nettotal_y+(3*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_shipping);
|
||||
|
||||
}
|
||||
|
||||
//Set the x and y positions to place the S&H Tax, Adjustment and Grand Total
|
||||
$lineData=array("105",$bottom+61,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data = $app_strings['LBL_TAX_FOR_SHIPPING_AND_HANDLING'].": ($sh_tax_percent %)";// ".$price_shipping_tax;
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(4*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_shipping_tax)] , ($nettotal_y+(4*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_shipping_tax);
|
||||
|
||||
$lineData=array("105",$bottom+67,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data = $app_strings['LBL_ADJUSTMENT'].":";// ".$price_adjustment;
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(5*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_adjustment)] , ($nettotal_y+(5*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_adjustment);
|
||||
|
||||
|
||||
$lineData=array("105",$bottom+73,"94");
|
||||
$pdf->drawLine($lineData);
|
||||
$data = $app_strings['LBL_GRAND_TOTAL'].":(in $currency_symbol)";// ".$price_total;
|
||||
$pdf->SetXY( 105 , ($nettotal_y+(6*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $data);
|
||||
|
||||
//Added for value field alignment
|
||||
$pdf->SetXY( $space[strlen($price_total)] , ($nettotal_y+(6*$next_y)) );
|
||||
$pdf->SetFont( "stsongstdlight", "", 10);
|
||||
$pdf->MultiCell(110, 4, $price_total);
|
||||
|
||||
/* ************** End Totals *********************** */
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
|
||||
CREDITS
|
||||
|
||||
Almost everything written by Edward Z. Yang (Ambush Commander). Lots of thanks
|
||||
to the DevNetwork Community for their help (see docs/ref-devnetwork.html for
|
||||
more details), Feyd especially (namely IPv6 and optimization). Thanks to RSnake
|
||||
for letting me package his fantastic XSS cheatsheet for a smoketest.
|
||||
|
||||
vim: et sw=4 sts=4
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user