Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,265 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
class Configurator {
var $config = '';
var $override = '';
var $allow_undefined = array ('stack_trace_errors', 'export_delimiter', 'use_real_names', 'developerMode', 'default_module_favicon');
var $errors = array ('main' => '');
var $logger = NULL;
var $previous_sugar_override_config_array = array();
function Configurator() {
$this->loadConfig();
}
function loadConfig() {
$this->logger = LoggerManager::getLogger();
global $sugar_config;
$this->config = $sugar_config;
}
function populateFromPost() {
$sugarConfig = SugarConfig::getInstance();
foreach ($_POST as $key => $value) {
if (isset ($this->config[$key]) || in_array($key, $this->allow_undefined)) {
if (strcmp("$value", 'true') == 0) {
$value = true;
}
if (strcmp("$value", 'false') == 0) {
$value = false;
}
$this->config[$key] = $value;
} else {
$v = $sugarConfig->get(str_replace('_', '.', $key));
if ($v !== null){
setDeepArrayValue($this->config, $key, $value);
}}
}
}
function handleOverride() {
global $sugar_config, $sugar_version;
$sc = SugarConfig::getInstance();
$overrideArray = $this->readOverride();
$this->previous_sugar_override_config_array = $overrideArray;
$diffArray = deepArrayDiff($this->config, $sugar_config);
$overrideArray = sugarArrayMerge($overrideArray, $diffArray);
$overideString = "<?php\n/***CONFIGURATOR***/\n";
sugar_cache_put('sugar_config', $this->config);
$GLOBALS['sugar_config'] = $this->config;
foreach($overrideArray as $key => $val) {
if (in_array($key, $this->allow_undefined) || isset ($sugar_config[$key])) {
if (strcmp("$val", 'true') == 0) {
$val = true;
$this->config[$key] = $val;
}
if (strcmp("$val", 'false') == 0) {
$val = false;
$this->config[$key] = false;
}
}
$overideString .= override_value_to_string_recursive2('sugar_config', $key, $val);
}
$overideString .= '/***CONFIGURATOR***/';
$this->saveOverride($overideString);
if(isset($this->config['logger']['level']) && $this->logger) $this->logger->setLevel($this->config['logger']['level']);
}
//bug #27947 , if previous $sugar_config['stack_trace_errors'] is true and now we disable it , we should clear all the cache.
function clearCache(){
global $sugar_config, $sugar_version;
$currentConfigArray = $this->readOverride();
foreach($currentConfigArray as $key => $val) {
if (in_array($key, $this->allow_undefined) || isset ($sugar_config[$key])) {
if (empty($val) ) {
if(!empty($this->previous_sugar_override_config_array['stack_trace_errors']) && $key == 'stack_trace_errors'){
require_once('include/TemplateHandler/TemplateHandler.php');
TemplateHandler::clearAll();
return;
}
}
}
}
}
function saveConfig() {
$this->saveImages();
$this->populateFromPost();
$this->handleOverride();
$this->clearCache();
}
function readOverride() {
$sugar_config = array();
if (file_exists('config_override.php')) {
include('config_override.php');
}
return $sugar_config;
}
function saveOverride($override) {
$fp = sugar_fopen('config_override.php', 'w');
fwrite($fp, $override);
fclose($fp);
}
function overrideClearDuplicates($array_name, $key) {
if (!empty ($this->override)) {
$pattern = '/.*CONFIGURATOR[^\$]*\$'.$array_name.'\[\''.$key.'\'\][\ ]*=[\ ]*[^;]*;\n/';
$this->override = preg_replace($pattern, '', $this->override);
} else {
$this->override = "<?php\n\n?>";
}
}
function replaceOverride($array_name, $key, $value) {
$GLOBALS[$array_name][$key] = $value;
$this->overrideClearDuplicates($array_name, $key);
$new_entry = '/***CONFIGURATOR***/'.override_value_to_string($array_name, $key, $value);
$this->override = str_replace('?>', "$new_entry\n?>", $this->override);
}
function restoreConfig() {
$this->readOverride();
$this->overrideClearDuplicates('sugar_config', '[a-zA-Z0-9\_]+');
$this->saveOverride();
ob_clean();
header('Location: index.php?action=EditView&module=Configurator');
}
function saveImages() {
if (!empty ($_POST['company_logo'])) {
$this->saveCompanyLogo($_POST['company_logo']);
}
}
/**
* Saves the company logo to the custom directory for the default theme, so all themes can use it
*
* @param string $path path to the image to set as the company logo image
*/
function saveCompanyLogo($path)
{
$path = $this->checkTempImage($path);
mkdir_recursive('custom/'.SugarThemeRegistry::current()->getDefaultImagePath(), true);
copy($path,'custom/'. SugarThemeRegistry::current()->getDefaultImagePath(). '/company_logo.png');
sugar_cache_clear('company_logo_attributes');
SugarThemeRegistry::clearAllCaches();
}
/**
* @params : none
* @return : An array of logger configuration properties including log size, file extensions etc. See SugarLogger for more details.
* Parses the old logger settings from the log4php.properties files.
*
*/
function parseLoggerSettings(){
if(!function_exists('setDeepArrayValue')){
require('include/utils/array_utils.php');
}
if (file_exists('log4php.properties')) {
$fileContent = file_get_contents('log4php.properties');
$old_props = explode('\n', $fileContent);
$new_props = array();
$key_names=array();
foreach($old_props as $value) {
if(!empty($value) && !preg_match("/^\/\//", $value)) {
$temp = explode("=",$value);
$property = isset( $temp[1])? $temp[1] : array();
if(preg_match("/log4php.appender.A2.MaxFileSize=/",$value)){
setDeepArrayValue($this->config, 'logger_file_maxSize', rtrim( $property));
}
elseif(preg_match("/log4php.appender.A2.File=/", $value)){
$ext = preg_split("/\./",$property);
if(preg_match( "/^\./", $property)){ //begins with .
setDeepArrayValue($this->config, 'logger_file_ext', isset($ext[2]) ? '.' . rtrim( $ext[2]):'.log');
setDeepArrayValue($this->config, 'logger_file_name', rtrim( ".".$ext[1]));
}else{
setDeepArrayValue($this->config, 'logger_file_ext', isset($ext[1]) ? '.' . rtrim( $ext[1]):'.log');
setDeepArrayValue($this->config, 'logger_file_name', rtrim( $ext[0] ));
}
}elseif(preg_match("/log4php.appender.A2.layout.DateFormat=/",$value)){
setDeepArrayValue($this->config, 'logger_file_dateFormat', trim(rtrim( $property), '""'));
}elseif(preg_match("/log4php.rootLogger=/",$value)){
$property = explode(",",$property);
setDeepArrayValue($this->config, 'logger_level', rtrim( $property[0]));
}
}
}
setDeepArrayValue($this->config, 'logger_file_maxLogs', 10);
setDeepArrayValue($this->config, 'logger_file_suffix', "%m_%Y");
$this->handleOverride();
unlink('log4php.properties');
$GLOBALS['sugar_config'] = $this->config; //load the rest of the sugar_config settings.
require_once('include/SugarLogger/SugarLogger.php');
//$logger = new SugarLogger(); //this will create the log file.
}
if (!isset($this->config['logger']) || empty($this->config['logger'])) {
$this->config['logger'] = array (
'file' => array(
'ext' => '.log',
'name' => 'sugarcrm',
'dateFormat' => '%c',
'maxSize' => '10MB',
'maxLogs' => 10,
'suffix' => '%m_%Y'),
'level' => 'fatal');
}
$this->handleOverride();
}
function checkTempImage($path)
{
if(!verify_uploaded_image($path)) {
$GLOBALS['log']->fatal("A user ({$GLOBALS['current_user']->id}) attempted to use an invalid file for the logo - {$path}");
sugar_die('Invalid File Type');
}
return $path;
}
}
?>

103
modules/Configurator/Forms.php Executable file
View File

@@ -0,0 +1,103 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
/*********************************************************************************
* Description: Contains a variety of utility functions specific to this module.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
function get_configsettings_js() {
global $mod_strings;
global $app_strings;
$lbl_last_name = $mod_strings['LBL_NOTIFY_FROMADDRESS'];
$err_missing_required_fields = $app_strings['ERR_MISSING_REQUIRED_FIELDS'];
return <<<EOQ
<script type="text/javascript" language="Javascript">
<!-- to hide script contents from old browsers
function notify_setrequired(f) {
return true;
}
function add_checks(f) {
removeFromValidate('ConfigureSettings', 'mail_smtpserver');
removeFromValidate('ConfigureSettings', 'mail_smtpport');
removeFromValidate('ConfigureSettings', 'mail_smtpuser');
removeFromValidate('ConfigureSettings', 'mail_smtppass');
removeFromValidate('ConfigureSettings', 'proxy_port');
removeFromValidate('ConfigureSettings', 'proxy_host');
removeFromValidate('ConfigureSettings', 'proxy_username');
removeFromValidate('ConfigureSettings', 'proxy_password');
if (typeof f.mail_sendtype != "undefined" && f.mail_sendtype.value == "SMTP") {
addToValidate('ConfigureSettings', 'mail_smtpserver', 'varchar', 'true', '{$mod_strings['LBL_MAIL_SMTPSERVER']}');
addToValidate('ConfigureSettings', 'mail_smtpport', 'int', 'true', '{$mod_strings['LBL_MAIL_SMTPPORT']}');
if (f.mail_smtpauth_req.checked) {
addToValidate('ConfigureSettings', 'mail_smtpuser', 'varchar', 'true', '{$mod_strings['LBL_MAIL_SMTPUSER']}');
addToValidate('ConfigureSettings', 'mail_smtppass', 'varchar', 'true', '{$mod_strings['LBL_MAIL_SMTPPASS']}');
}
}
if (typeof f.proxy_on != "undefined" && f.proxy_on.checked ) {
addToValidate('ConfigureSettings', 'proxy_port', 'int', 'true', '{$mod_strings['LBL_PROXY_PORT']}');
addToValidate('ConfigureSettings', 'proxy_host', 'varchar', 'true', '{$mod_strings['LBL_PROXY_HOST']}');
if (f.proxy_auth.checked ) {
addToValidate('ConfigureSettings', 'proxy_username', 'varchar', 'true', '{$mod_strings['LBL_PROXY_USERNAME']}');
addToValidate('ConfigureSettings', 'proxy_password', 'varchar', 'true', '{$mod_strings['LBL_PROXY_PASSWORD']}');
}
}
return true;
}
notify_setrequired(document.ConfigureSettings);
// end hiding contents from old browsers -->
</script>
EOQ;
}
?>

153
modules/Configurator/LogView.php Executable file
View File

@@ -0,0 +1,153 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$filter = '';
if(!empty($_REQUEST['filter'])){
$filter = $_REQUEST['filter'];
}
$ignore_self = false;
if(!empty($_REQUEST['ignore_self'])){
$ignore_self = 'checked';
}
$reg_ex = false;
if(!empty($_REQUEST['reg_ex'])){
$reg_ex = 'checked';
}
set_time_limit(180);
echo <<<EOQ
<form action='index.php' name='logview'>
<input type='hidden' name='action' value='LogView'>
<input type='hidden' name='module' value='Configurator'>
<input type='hidden' name='doaction' value=''>
<input type='button' onclick='document.logview.doaction.value="all";document.logview.submit()' name='all' value='{$mod_strings['LBL_ALL']}'>
<input type='button' onclick='document.logview.doaction.value="mark";document.logview.submit()' name='mark' value='{$mod_strings['LBL_MARK_POINT']}'>
<input type='submit' name='display' value='{$mod_strings['LBL_REFRESH_FROM_MARK']}'>
<input type='button' onclick='document.logview.doaction.value="next";document.logview.submit()' name='next' value='{$mod_strings['LBL_NEXT_']}'>
<br>
{$mod_strings['LBL_SEARCH']} <input type='text' name='filter' value='$filter'>&nbsp;{$mod_strings['LBL_REG_EXP']} <input type='checkbox' name='reg_ex' $reg_ex>
<br>
{$mod_strings['LBL_IGNORE_SELF']} <input type='checkbox' name='ignore_self' $ignore_self>
</form>
EOQ;
define('PROCESS_ID', 1);
define('LOG_LEVEL', 2);
define('LOG_NAME', 3);
define('LOG_DATA', 4);
$logFile = $sugar_config['log_dir'].'/'.$sugar_config['log_file'];
if (!file_exists($logFile)) {
die('No Log File');
}
$lastMatch = false;
$doaction =(!empty($_REQUEST['doaction']))?$_REQUEST['doaction']:'';
switch($doaction){
case 'mark':
echo "<h3>{$mod_strings['LBL_MARKING_WHERE_START_LOGGING']}</h3><br>";
$_SESSION['log_file_size'] = filesize($logFile);
break;
case 'next':
if(!empty($_SESSION['last_log_file_size'])){
$_SESSION['log_file_size'] = $_SESSION['last_log_file_size'];
}else{
$_SESSION['log_file_size'] = 0;
}
$_REQUEST['display'] = true;
break;
case 'all':
$_SESSION['log_file_size'] = 0;
$_REQUEST['display'] = true;
break;
}
if (!empty ($_REQUEST['display'])) {
echo "<h3>{$mod_strings['LBL_DISPLAYING_LOG']}</h3>";
$process_id = getmypid();
echo $mod_strings['LBL_YOUR_PROCESS_ID'].' [' . $process_id. ']';
echo '<br>'.$mod_strings['LBL_YOUR_IP_ADDRESS'].' ' . $_SERVER['REMOTE_ADDR'];
if($ignore_self){
echo $mod_strings['LBL_IT_WILL_BE_IGNORED'];
}
if (empty ($_SESSION['log_file_size'])) {
$_SESSION['log_file_size'] = 0;
}
$cur_size = filesize($logFile);
$_SESSION['last_log_file_size'] = $cur_size;
$pos = 0;
if ($cur_size >= $_SESSION['log_file_size']) {
$pos = $_SESSION['log_file_size'] - $cur_size;
}
if($_SESSION['log_file_size'] == $cur_size){
echo $mod_strings['LBL_LOG_NOT_CHANGED'].'<br>';
}else{
$fp = sugar_fopen($logFile, 'r');
fseek($fp, $pos , SEEK_END);
echo '<pre>';
while($line = fgets($fp)){
//preg_match('/[^\]]*\[([0-9]*)\] ([a-zA-Z]+) ([a-zA-Z0-9\.]+) - (.*)/', $line, $result);
preg_match('/[^\]]*\[([0-9]*)\]/', $line, $result);
ob_flush();
flush();
if(empty($result) && $lastMatch){
echo $line;
}else{
$lastMatch = false;
if(empty($result) || ($ignore_self &&$result[LOG_NAME] == $_SERVER['REMOTE_ADDR'] )){
}else{
if(empty($filter) || (!$reg_ex && substr_count($line, $filter) > 0) || ($reg_ex && preg_match($filter, $line))){
$lastMatch = true;
echo $line;
}
}
}
}
echo '</pre>';
fclose($fp);
}
}
?>

42
modules/Configurator/Menu.php Executable file
View File

@@ -0,0 +1,42 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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;
$module_menu[]=Array("index.php?module=Configurator&action=EditView",$mod_strings['LBL_CONFIGURE_SETTINGS_TITLE'], "Administration");
$module_menu[]=Array("index.php?module=Configurator&action=LogView",$mod_strings['LBL_LOGVIEW'], "Leads");

View File

@@ -0,0 +1,173 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
require_once("modules/Configurator/metadata/SugarpdfSettingsdefs.php");
if(file_exists('custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php')){
require_once('custom/modules/Configurator/metadata/SugarpdfSettingsdefs.php');
}
if(!empty($_POST['save'])){
// Save the logos
$error=checkUploadImage();
if(empty($error)){
$focus = new Administration();
foreach($SugarpdfSettings as $k=>$v){
if($v['type'] == 'password'){
if(isset($_POST[$k])){
$_POST[$k] = blowfishEncode(blowfishGetKey($k), $_POST[$k]);
}
}
}
if(!empty($_POST["sugarpdf_pdf_class"]) && $_POST["sugarpdf_pdf_class"] != PDF_CLASS){
// clear the cache for quotes detailview in order to switch the pdf class.
if(is_file($GLOBALS['sugar_config']['cache_dir'].'modules/Quotes/DetailView.tpl'))
unlink($GLOBALS['sugar_config']['cache_dir'].'modules/Quotes/DetailView.tpl');
}
$focus->saveConfig();
header('Location: index.php?module=Administration&action=index');
}
}
if(!empty($_POST['restore'])){
$focus = new Administration();
foreach($_POST as $key => $val) {
$prefix = $focus->get_config_prefix($key);
if(in_array($prefix[0], $focus->config_categories)) {
$result = $focus->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'");
$row = $focus->db->fetchByAssoc( $result, -1, true );
if( $row['the_count'] != 0){
$focus->db->query("DELETE FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'");
}
}
}
header('Location: index.php?module=Configurator&action=SugarpdfSettings');
}
echo getClassicModuleTitle(
"Administration",
array(
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
$mod_strings['LBL_PDFMODULE_NAME'],
),
true
);
$pdf_class = array("TCPDF"=>"TCPDF","EZPDF"=>"EZPDF");
require_once('include/Sugar_Smarty.php');
$sugar_smarty = new Sugar_Smarty();
$sugar_smarty->assign('MOD', $mod_strings);
$sugar_smarty->assign('APP', $app_strings);
$sugar_smarty->assign('APP_LIST', $app_list_strings);
$sugar_smarty->assign("JAVASCRIPT",get_set_focus_js());
$sugar_smarty->assign("SugarpdfSettings", $SugarpdfSettings);
$sugar_smarty->assign("pdf_enable_ezpdf", PDF_ENABLE_EZPDF);
if(PDF_ENABLE_EZPDF == "0" && PDF_CLASS == "EZPDF"){
$error = "ERR_EZPDF_DISABLE";
$sugar_smarty->assign("selected_pdf_class", "TCPDF");
}else{
$sugar_smarty->assign("selected_pdf_class", PDF_CLASS);
}
$sugar_smarty->assign("pdf_class", $pdf_class);
if(!empty($error)){
$sugar_smarty->assign("error", $mod_strings[$error]);
}
if (!function_exists('imagecreatefrompng')) {
$sugar_smarty->assign("GD_WARNING", 1);
}
else
$sugar_smarty->assign("GD_WARNING", 0);
$sugar_smarty->display('modules/Configurator/tpls/SugarpdfSettings.tpl');
require_once("include/javascript/javascript.php");
$javascript = new javascript();
$javascript->setFormName("ConfigureSugarpdfSettings");
foreach($SugarpdfSettings as $k=>$v){
if(isset($v["required"]) && $v["required"] == true)
$javascript->addFieldGeneric($k, "varchar", $v['label'], TRUE, "");
}
echo $javascript->getScript();
function checkUploadImage(){
$error="";
$files = array('sugarpdf_pdf_header_logo'=>$_FILES['new_header_logo'], 'sugarpdf_pdf_small_header_logo'=>$_FILES['new_small_header_logo']);
foreach($files as $k=>$v){
if(empty($error) && isset($v) && !empty($v['name'])){
$file_name = K_PATH_CUSTOM_IMAGES .'pdf_logo_'. basename($v['name']);
if(file_exists($file_name))
rmdir_recursive($file_name);
if (!empty($v['error']))
$error='ERR_ALERT_FILE_UPLOAD';
if(!mkdir_recursive(K_PATH_CUSTOM_IMAGES))
$error='ERR_ALERT_FILE_UPLOAD';
if(empty($error)){
if (!move_uploaded_file($v['tmp_name'], $file_name))
die("Possible file upload attack!\n");
if(file_exists($file_name) && is_file($file_name)){
if(!empty($_REQUEST['sugarpdf_pdf_class']) && $_REQUEST['sugarpdf_pdf_class'] == "EZPDF") {
if(!verify_uploaded_image($file_name, true)) {
$error='LBL_ALERT_TYPE_IMAGE_EZPDF';
}
}else{
if(!verify_uploaded_image($file_name)) {
$error='LBL_ALERT_TYPE_IMAGE';
}
}
if(!empty($error)){
rmdir_recursive($file_name);
}else{
$_POST[$k]='pdf_logo_'. basename($v['name']);
}
}else{
$error='ERR_ALERT_FILE_UPLOAD';
}
}
}
}
return $error;
}
?>

View File

@@ -0,0 +1,106 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
require_once('include/JSON.php');
require_once('include/entryPoint.php');
global $sugar_config;
$json = getJSONobj();
$rmdir=true;
$returnArray = array();
if($json->decode(html_entity_decode($_REQUEST['forQuotes']))){
$returnArray['forQuotes']="quotes";
}else{
$returnArray['forQuotes']="company";
}
if(isset($_FILES['file_1'])){
$uploadTmpDir=$sugar_config['tmp_dir'].'tmp_logo_'.$returnArray['forQuotes'].'_upload';
$file_name = $uploadTmpDir .'/'. basename($_FILES['file_1']['name']);
if(file_exists($uploadTmpDir))
rmdir_recursive($uploadTmpDir);
mkdir_recursive( $uploadTmpDir,null,true );
if (!empty($_FILES['file_1']['error'])){
rmdir_recursive($uploadTmpDir);
$returnArray['data']='not_recognize';
echo $json->encode($returnArray);
sugar_cleanup();
exit();
}
if (!move_uploaded_file($_FILES['file_1']['tmp_name'], $file_name)){
rmdir_recursive($uploadTmpDir);
die("Possible file upload attack!\n");
}
}else{
$returnArray['data']='not_recognize';
echo $json->encode($returnArray);
sugar_cleanup();
exit();
}
if(file_exists($file_name) && is_file($file_name)){
$returnArray['path']=$file_name;
if(!verify_uploaded_image($file_name, $returnArray['forQuotes'] == 'quotes')) {
$returnArray['data']='other';
$returnArray['path']='';
}else{
$img_size = getimagesize($file_name);
$filetype = $img_size['mime'];
$test=$img_size[0]/$img_size[1];
if (($test>10 || $test<1) && $returnArray['forQuotes'] == 'company'){
$rmdir=false;
$returnArray['data']='size';
}
if (($test>20 || $test<3)&& $returnArray['forQuotes'] == 'quotes')
$returnArray['data']='size';
}
if(!empty($returnArray['data'])){
echo $json->encode($returnArray);
}else{
$rmdir=false;
$returnArray['data']='ok';
echo $json->encode($returnArray);
}
}else{
$returnArray['data']='file_error';
echo $json->encode($returnArray);
}
if($rmdir)
rmdir_recursive($uploadTmpDir);
sugar_cleanup();
exit();
?>

View File

@@ -0,0 +1,38 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
$action_view_map['adminwizard'] = 'adminwizard';

View File

@@ -0,0 +1,181 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
require_once('include/MVC/Controller/SugarController.php');
class ConfiguratorController extends SugarController
{
/**
* Go to the font manager view
*/
function action_FontManager(){
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$this->view = 'fontmanager';
}
/**
* Delete a font and go back to the font manager
*/
function action_deleteFont(){
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$urlSTR = 'index.php?module=Configurator&action=FontManager';
if(!empty($_REQUEST['filename'])){
require_once('include/Sugarpdf/FontManager.php');
$fontManager = new FontManager();
$fontManager->filename = $_REQUEST['filename'];
if(!$fontManager->deleteFont()){
$urlSTR .='&error='.urlencode(implode("<br>",$fontManager->errors));
}
}
header("Location: $urlSTR");
}
function action_listview(){
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$this->view = 'edit';
}
/**
* Show the addFont view
*/
function action_addFontView(){
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$this->view = 'addFontView';
}
/**
* Add a new font and show the addFontResult view
*/
function action_addFont(){
global $current_user, $mod_strings;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
if(empty($_FILES['pdf_metric_file']['name'])){
$this->errors[]=translate("ERR_MISSING_REQUIRED_FIELDS")." ".translate("LBL_PDF_METRIC_FILE", "Configurator");
$this->view = 'addFontView';
return;
}
if(empty($_FILES['pdf_font_file']['name'])){
$this->errors[]=translate("ERR_MISSING_REQUIRED_FIELDS")." ".translate("LBL_PDF_FONT_FILE", "Configurator");
$this->view = 'addFontView';
return;
}
$path_info = pathinfo($_FILES['pdf_font_file']['name']);
$path_info_metric = pathinfo($_FILES['pdf_metric_file']['name']);
if(($path_info_metric['extension']!="afm" && $path_info_metric['extension']!="ufm") ||
($path_info['extension']!="ttf" && $path_info['extension']!="otf" && $path_info['extension']!="pfb")){
$this->errors[]=translate("JS_ALERT_PDF_WRONG_EXTENSION", "Configurator");
$this->view = 'addFontView';
return;
}
if($_REQUEST['pdf_embedded'] == "false"){
if(empty($_REQUEST['pdf_cidinfo'])){
$this->errors[]=translate("ERR_MISSING_CIDINFO", "Configurator");
$this->view = 'addFontView';
return;
}
$_REQUEST['pdf_embedded']=false;
}else{
$_REQUEST['pdf_embedded']=true;
$_REQUEST['pdf_cidinfo']="";
}
if(empty($_REQUEST['pdf_patch'])){
$_REQUEST['pdf_patch']="return array();";
}else{
$_REQUEST['pdf_patch']="return {$_REQUEST['pdf_patch']};";
}
$this->view = 'addFontResult';
}
function action_saveadminwizard()
{
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$focus = new Administration();
$focus->retrieveSettings();
$focus->saveConfig();
$configurator = new Configurator();
$configurator->populateFromPost();
$configurator->handleOverride();
$configurator->parseLoggerSettings();
$configurator->saveConfig();
SugarApplication::redirect('index.php?module=Users&action=Wizard&skipwelcome=1');
}
function action_saveconfig()
{
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$configurator = new Configurator();
$configurator->saveConfig();
$focus = new Administration();
$focus->saveConfig();
// Clear the Contacts file b/c portal flag affects rendering
if (file_exists($GLOBALS['sugar_config']['cache_dir'].'modules/Contacts/EditView.tpl'))
unlink($GLOBALS['sugar_config']['cache_dir'].'modules/Contacts/EditView.tpl');
SugarApplication::redirect('index.php?module=Administration&action=index');
}
function action_detail()
{
global $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$this->view = 'edit';
}
}

View File

@@ -0,0 +1,441 @@
<?php
/*********************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 2009 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".
********************************************************************************/
/*********************************************************************************
* Description: Defines the English language pack for the base application.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
//BEGIN ASTERISK PATCH
'LBL_ASTERISK_TITLE' => 'Asterisk<73> / VoiceRD<52>',
'LBL_ASTERISK_ON' => 'Enable Asterisk / VoiceRD Integration?',
'LBL_ASTERISK_ON_DESC' => 'Allows users to click on phone numbers in Contacts and Accounts and initiate an outbound call from a VOIP phone to an Asterisk or VoiceRD server. Enabling this requires all the below information as well as filling in the Asterisk Extension field on each user you would like to enable.',
'LBL_ASTERISK_PRO' => 'Enable Asterisk / VoiceRD Pro Version',
'LBL_ASTERISK_PRO_DESC' => 'Displays a SugarPro popup features',
'LBL_ASTERISK_SERVER' => 'Asterisk Server:',
'LBL_ASTERISK_SERVER_DESC' => 'Server IP or DNS name. REQUIRED',
'LBL_ASTERISK_PORT' => 'Asterisk Port:',
'LBL_ASTERISK_PORT_DESC' => 'Asterisk port default: 5038',
'LBL_ASTERISK_USERNAME' => 'Asterisk Username:',
'LBL_ASTERISK_USERNAME_DESC' => 'User to login to server as for outbound dialing. REQUIRED',
'LBL_ASTERISK_SECRET' => 'Asterisk Secret:',
'LBL_ASTERISK_SECRET_DESC' => 'Users secret for phrase. REQUIRED',
'LBL_ASTERISK_INTERNAL_CONTEXT' => 'Asterisk Internal Context:',
'LBL_ASTERISK_INTERNAL_CONTEXT_DESC' => 'Asterisk internal context default: from-internal',
'LBL_ASTERISK_EXTERNAL_CONTEXT' => 'Asterisk External Context:',
'LBL_ASTERISK_EXTERNAL_CONTEXT_DESC' => 'Asterisk external context default: from-internal',
'LBL_ASTERISK_PREFIX' => 'Asterisk Prefix:',
'LBL_ASTERISK_PREFIX_DESC' => 'Number used to get an outside line',
'LBL_ASTERISK_AUTO_PICKUP' => 'Asterisk Auto Pickup:',
'LBL_ASTERISK_AUTO_PICKUP_DESC' => 'Asterisk auto pickup number default:*3',
'LBL_ASTERISK_CALL_RECORD' => 'Asterisk Call Record Option:',
'LBL_ASTERISK_CALL_RECORD_DESC' => 'Displays button that allows user to record a conversation',
'LBL_ASTERISK_PHONEICON_ON' => 'Asterisk Phone Icon:',
'LBL_ASTERISK_PHONEICON_ON_DESC' => 'Places phone icon next to number',
'LBL_ASTERISK_POPUP_TIMER' => 'Asterisk Popup Timer',
'LBL_ASTERISK_POPUP_TIMER_DESC' => '(sec) Causes the asterisk popup to close automatically',
//END OF ASTERISK PATCH
/*'ADMIN_EXPORT_ONLY'=>'Admin export only',*/
'ADVANCED'=>'Advanced',
'DEFAULT_CURRENCY_ISO4217'=>'ISO 4217 currency code',
'DEFAULT_CURRENCY_NAME'=>'Currency name',
'DEFAULT_CURRENCY_SYMBOL'=>'Currency symbol',
'DEFAULT_CURRENCY'=>'Default Currency',
'DEFAULT_DATE_FORMAT'=>'Default date format',
'DEFAULT_DECIMAL_SEP' => 'Decimal symbol',
'DEFAULT_LANGUAGE'=>'Default language',
'DEFAULT_NUMBER_GROUPING_SEP' => '1000s separator',
'DEFAULT_SYSTEM_SETTINGS'=>'User Interface',
'DEFAULT_THEME'=> 'Default theme',
'DEFAULT_TIME_FORMAT'=>'Default time format',
/* 'DISABLE_EXPORT'=>'Disable export',*/
'DISPLAY_LOGIN_NAV'=>'Display tabs on login screen',
'DISPLAY_RESPONSE_TIME'=>'Display server response times',
/*'EXPORT'=>'Export',
'EXPORT_CHARSET' => 'Default Export Character Set',
'EXPORT_DELIMITER' => 'Export Delimiter',*/
'IMAGES'=>'Logos',
'LBL_CONFIGURE_SETTINGS_TITLE' => 'System Settings',
'LBL_ENABLE_MAILMERGE' => 'Enable mail merge?',
'LBL_LOGVIEW' => 'Configure Log Settings',
'LBL_MAIL_SMTPAUTH_REQ' => 'Use SMTP Authentication?',
'LBL_MAIL_SMTPPASS' => 'SMTP Password:',
'LBL_MAIL_SMTPPORT' => 'SMTP Port:',
'LBL_MAIL_SMTPSERVER' => 'SMTP Server:',
'LBL_MAIL_SMTPUSER' => 'SMTP Username:',
'LBL_MAILMERGE_DESC' => 'This flag should be checked only if you have the Sugar Plug-in for Microsoft&reg; Word&reg;.',
'LBL_MAILMERGE' => 'Mail Merge',
'LBL_MODULE_FAVICON' => 'Display module icon as favicon',
'LBL_MODULE_FAVICON_HELP' => 'If you are in a module with an icon, use the module\'s icon as the favicon, instead of the theme\'s favicon, in the browser tab.',
'LBL_MODULE_NAME'=>'System Settings',
'LBL_MODULE_ID' => 'Configurator',
'LBL_MODULE_TITLE'=>'User Interface',
'LBL_NOTIFY_FROMADDRESS' => '"From" Address:',
'LBL_NOTIFY_SUBJECT' => 'Email subject:',
'LBL_PORTAL_ON_DESC' => 'Allows users to manage portal user information within contact records. Portal users can access Cases, Bugs, Knowledge Base articles and other data through the Sugar Portal application.',
'LBL_PORTAL_ON' => 'Enable Portal User Management',
'LBL_PORTAL_TITLE' => 'Customer Self-Service Portal',
'LBL_PROXY_AUTH'=>'Authentication?',
'LBL_PROXY_HOST'=>'Proxy Host',
'LBL_PROXY_ON_DESC'=>'Configure proxy server address and authentication settings',
'LBL_PROXY_ON'=>'Use proxy server?',
'LBL_PROXY_PASSWORD'=>'Password',
'LBL_PROXY_PORT'=>'Port',
'LBL_PROXY_TITLE'=>'Proxy Settings',
'LBL_PROXY_USERNAME'=>'User Name',
'LBL_RESTORE_BUTTON_LABEL'=>'Restore',
'LBL_SKYPEOUT_ON_DESC' => 'Allows users to click on phone numbers to call using SkypeOut&reg;. The numbers must be formatted properly to make use of this feature. That is, it must be "+" "The Country Code" "The Number", like +1 (555) 555-1234. For more information, see the Skype FAQ at <a href="http://www.skype.com/help/faq/skypeout.html#calling" target="skype">skype&reg; faq</a> ',
'LBL_SKYPEOUT_ON' => 'Enable SkypeOut&reg; integration?',
'LBL_SKYPEOUT_TITLE' => 'SkypeOut&reg;',
'LBL_USE_REAL_NAMES' => 'Show Full Name (not Login)',
'LIST_ENTRIES_PER_LISTVIEW'=>'Listview items per page',
'LIST_ENTRIES_PER_SUBPANEL'=>'Subpanel items per page',
'LOG_MEMORY_USAGE'=>'Log memory usage',
'LOG_SLOW_QUERIES'=>'Log slow queries',
'LOCK_HOMEPAGE_HELP'=>'This setting is to prevent<BR> 1) the addition of any dashlets to the home page, <BR>2) customization of dashlet placement in the home pages by dragging and dropping.',
'CURRENT_LOGO'=>'Current Logo',
'CURRENT_LOGO_HELP'=>'This logo is displayed at the top left-hand corner of the Sugar application.',
'NEW_LOGO'=>'Select New Logo',
'NEW_LOGO_HELP'=>'The image file format can be either .png or .jpg.<BR>The recommended size is 212x40 px.',
'NEW_QUOTE_LOGO'=>'Upload new Quotes logo',
'NEW_QUOTE_LOGO_HELP'=>'The required image file format is .jpg.<BR>The recommended size is 867x74 px.',
'QUOTES_CURRENT_LOGO'=>'Quotes logo',
'SLOW_QUERY_TIME_MSEC'=>'Slow query time threshold (msec)',
'STACK_TRACE_ERRORS'=>'Display stack trace of errors',
'UPLOAD_MAX_SIZE'=>'Maximum upload size',
'VERIFY_CLIENT_IP'=>'Validate user IP address',
'LOCK_HOMEPAGE' => 'Prevent user customizable Homepage layout',
'LOCK_SUBPANELS' => 'Prevent user customizable subpanel layout',
'MAX_DASHLETS' => 'Maximum number of Sugar Dashlets on Homepage',
'SYSTEM_NAME'=>'System Name',
'LBL_LDAP_TITLE'=>'LDAP Authentication Support',
'LBL_LDAP_ENABLE'=>'Enable LDAP',
'LBL_LDAP_SERVER_HOSTNAME'=> 'Server:',
'LBL_LDAP_SERVER_PORT'=> 'Port Number:',
'LBL_LDAP_ADMIN_USER'=> 'User Name:',
'LBL_LDAP_ADMIN_USER_DESC'=>'Used to search for the Sugar user. [May need to be fully qualified] It will bind anonymously if not provided.',
'LBL_LDAP_ADMIN_PASSWORD'=> 'Password:',
'LBL_LDAP_AUTHENTICATION'=> 'Authentication:',
'LBL_LDAP_AUTHENTICATION_DESC'=>'Bind to the LDAP server using a specific users credentials',
'LBL_LDAP_AUTO_CREATE_USERS'=>'Auto Create Users:',
'LBL_LDAP_USER_DN'=>'User DN:',
'LBL_LDAP_GROUP_DN'=>'Group DN:',
'LBL_LDAP_GROUP_DN_DESC'=>'Example: <em>ou=groups,dc=example,dc=com</em>',
'LBL_LDAP_USER_FILTER'=>'User Filter:',
'LBL_LDAP_GROUP_MEMBERSHIP'=>'Group Membership:',
'LBL_LDAP_GROUP_MEMBERSHIP_DESC'=>'Users must be a member of a specific group',
'LBL_LDAP_GROUP_USER_ATTR'=>'User Attribute:',
'LBL_LDAP_GROUP_USER_ATTR_DESC'=>'The unique identifier of the person that will be used to check if they are a member of the group Example: <em>uid</em>',
'LBL_LDAP_GROUP_ATTR_DESC'=>'The attribute of the Group that will be used to filter against the User Attribute Example: <em>memberUid</em>',
'LBL_LDAP_GROUP_ATTR'=>'Group Attribute:',
'LBL_LDAP_USER_FILTER_DESC'=>'Any additional filter params to apply when authenticating users e.g.<em>is_sugar_user=1 or (is_sugar_user=1)(is_sales=1)</em>',
'LBL_LDAP_LOGIN_ATTRIBUTE'=>'Login Attribute:',
'LBL_LDAP_BIND_ATTRIBUTE'=>'Bind Attribute:',
'LBL_LDAP_BIND_ATTRIBUTE_DESC'=>'For Binding the LDAP User Examples:[<b>AD:</b>&nbsp;userPrincipalName] [<b>openLDAP:</b>&nbsp;userPrincipalName] [<b>Mac&nbsp;OS&nbsp;X:</b>&nbsp;uid] ',
'LBL_LDAP_LOGIN_ATTRIBUTE_DESC'=>'For searching for the LDAP User Examples:[<b>AD:</b>&nbsp;userPrincipalName] [<b>openLDAP:</b>&nbsp;dn] [<b>Mac&nbsp;OS&nbsp;X:</b>&nbsp;dn] ',
'LBL_LDAP_SERVER_HOSTNAME_DESC'=>'Example: ldap.example.com or ldaps://ldap.example.com for SSL',
'LBL_LDAP_SERVER_PORT_DESC'=>'Example: <em>389 or 636 for SSL</em>',
'LBL_LDAP_GROUP_NAME'=>'Group Name:',
'LBL_LDAP_GROUP_NAME_DESC'=>'Example <em>cn=sugarcrm</em>',
'LBL_LDAP_USER_DN_DESC'=>'Example: <em>ou=people,dc=example,dc=com</eM>',
'LBL_LDAP_AUTO_CREATE_USERS_DESC'=> 'If an authenticated user does not exist one will be created in Sugar.',
'LBL_LDAP_ENC_KEY' => 'Encryption Key:',
'DEVELOPER_MODE'=>'Developer Mode',
'LBL_LDAP_ENC_KEY_DESC' => 'For SOAP authentication when using LDAP.',
'LDAP_ENC_KEY_NO_FUNC_DESC' => 'The php_mcrypt extension must be enabled in your php.ini file.',
'LBL_ALL' => 'All',
'LBL_MARK_POINT' => 'Mark Point',
'LBL_NEXT_' => 'Next>>',
'LBL_REFRESH_FROM_MARK' => 'Refresh From Mark',
'LBL_SEARCH' => 'Search:',
'LBL_REG_EXP' => 'Reg Exp:',
'LBL_IGNORE_SELF' => 'Ignore Self:',
'LBL_MARKING_WHERE_START_LOGGING'=>'Marking Where To Start Logging From',
'LBL_DISPLAYING_LOG'=>'Displaying Log',
'LBL_YOUR_PROCESS_ID'=>'Your process ID',
'LBL_YOUR_IP_ADDRESS'=>'Your IP Address is',
'LBL_IT_WILL_BE_IGNORED'=>' It will be ignored ',
'LBL_LOG_NOT_CHANGED'=>'Log has not changed',
'LBL_ALERT_JPG_IMAGE' => 'The file format of the image must be JPEG. Upload a new file with the file extension .jpg.',
'LBL_ALERT_TYPE_IMAGE' => 'The file format of the image must be JPEG or PNG. Upload a new file with the file extension .jpg or .png.',
'LBL_ALERT_SIZE_RATIO' => 'The aspect ratio of the image should be between 1:1 and 10:1. The image will be resized.',
'LBL_ALERT_SIZE_RATIO_QUOTES' => 'The aspect ratio of the image must be between 3:1 and 20:1. Upload a new file with this ratio.',
'ERR_ALERT_FILE_UPLOAD' => 'Error during the upload of the image.',
'LBL_LOGGER'=>'Logger Settings',
'LBL_LOGGER_FILENAME'=>'Log File Name',
'LBL_LOGGER_FILE_EXTENSION'=>'Extension',
'LBL_LOGGER_MAX_LOG_SIZE'=>'Maximum log size',
'LBL_LOGGER_DEFAULT_DATE_FORMAT'=>'Default date format',
'LBL_LOGGER_LOG_LEVEL'=>'Log Level',
'LBL_LOGGER_MAX_LOGS'=>'Maximum number of logs (before rolling)',
'LBL_LOGGER_FILENAME_SUFFIX' =>'Append after filename',
'LBL_VCAL_PERIOD' => 'vCal Updates Time Period:',
'vCAL_HELP' => 'Use this setting to determine the number of months in advance of the current date that Free/Busy information for calls and meetings is published.<BR>To turn Free/Busy publishing off, enter "0". The minimum is 1 month; the maximum is 12 months.',
'LBL_PDFMODULE_NAME' => 'PDF Settings',
'SUGARPDF_BASIC_SETTINGS' => 'Document Properties',
'SUGARPDF_ADVANCED_SETTINGS' => 'Advanced Settings',
'SUGARPDF_LOGO_SETTINGS' => 'Images',
'PDF_CREATOR' => 'PDF Creator',
'PDF_CREATOR_INFO' => 'Defines the creator of the document. <br>This is typically the name of the application that generates the PDF.',
'PDF_AUTHOR' => 'Author',
'PDF_AUTHOR_INFO' => 'The Author appears in the document properties.',
'PDF_HEADER_LOGO' => 'For Quotes PDF Documents',
'PDF_HEADER_LOGO_INFO' => 'This image appears in the default Header in Quotes PDF Documents.',
'PDF_NEW_HEADER_LOGO' => 'Select New Image for Quotes',
'PDF_NEW_HEADER_LOGO_INFO' => 'The file format can be either .jpg or .png. (Only .jpg for EZPDF)<BR>The recommended size is 867x74 px.',
'PDF_HEADER_LOGO_WIDTH' => 'Quotes Image Width',
'PDF_HEADER_LOGO_WIDTH_INFO' => 'Change the scale of the uploaded image that appears in Quotes PDF Documents. (TCPDF only)',
'PDF_SMALL_HEADER_LOGO' => 'For Reports PDF Documents',
'PDF_SMALL_HEADER_LOGO_INFO' => 'This image appears in the default Header in Reports PDF Documents.<br> This image also appears in the top left-hand corner of the Sugar application.',
'PDF_NEW_SMALL_HEADER_LOGO' => 'Select New Image for Reports',
'PDF_NEW_SMALL_HEADER_LOGO_INFO' => 'The file format can be either .jpg or .png. (Only .jpg for EZPDF)<BR>The recommended size is 212x40 px.',
'PDF_SMALL_HEADER_LOGO_WIDTH' => 'Reports Image Width',
'PDF_SMALL_HEADER_LOGO_WIDTH_INFO' => 'Change the scale of the uploaded image that appears in Reports PDF Documents. (TCPDF only)',
'PDF_HEADER_STRING' => 'Header String',
'PDF_HEADER_STRING_INFO' => 'Header description string',
'PDF_HEADER_TITLE' => 'Header Title',
'PDF_HEADER_TITLE_INFO' => 'String to print as title on document header',
'PDF_FILENAME' => 'Default Filename',
'PDF_FILENAME_INFO' => 'Default filename for the generated PDF files',
'PDF_TITLE' => 'Title',
'PDF_TITLE_INFO' => 'The Title appears in the document properties.',
'PDF_SUBJECT' => 'Subject',
'PDF_SUBJECT_INFO' => 'The Subject appears in the document properties.',
'PDF_KEYWORDS' => 'Keyword(s)',
'PDF_KEYWORDS_INFO' => 'Associate Keywords with the document, generally in the form "keyword1 keyword2..."',
'PDF_COMPRESSION' => 'Compression',
'PDF_COMPRESSION_INFO' => 'Activates or deactivates page compression. <br>When activated, the internal representation of each page is compressed, which leads to a compression ratio of about 2 for the resulting document.',
'PDF_JPEG_QUALITY' => 'JPEG Quality (1-100)',
'PDF_JPEG_QUALITY_INFO' => 'Set the default JPEG compression quality (1-100)',
'PDF_PDF_VERSION' => 'PDF Version',
'PDF_PDF_VERSION_INFO' => 'Set the PDF version (check PDF reference for valid values).',
'PDF_PROTECTION' => 'Document Protection',
'PDF_PROTECTION_INFO' => 'Set document protection<br>- copy: copy text and images to the clipboard<br>- print: print the document<br>- modify: modify it (except for annotations and forms)<br>- annot-forms: add annotations and forms<br>Note: the protection against modification is for people who have the full Acrobat product.',
'PDF_USER_PASSWORD' => 'User Password',
'PDF_USER_PASSWORD_INFO' => 'If you don\\\'t set any password, the document will open as usual. <br>If you set a user password, the PDF viewer will ask for it before displaying the document. <br>The master password, if different from the user one, can be used to get full access.',
'PDF_OWNER_PASSWORD' => 'Owner Password',
'PDF_OWNER_PASSWORD_INFO' => 'If you don\\\'t set any password, the document will open as usual. <br>If you set a user password, the PDF viewer will ask for it before displaying the document. <br>The master password, if different from the user one, can be used to get full access.',
'PDF_ACL_ACCESS' => 'Access Control',
'PDF_ACL_ACCESS_INFO' => 'Default Access Control for the PDF generation.',
'K_CELL_HEIGHT_RATIO' => 'Cell Height Ratio',
'K_CELL_HEIGHT_RATIO_INFO' => 'If the height of a cell is smaller than (Font Height x Cell Height Ratio), then (Font Height x Cell Height Ratio) is used as the cell height.<br>(Font Height x Cell Height Ratio) is also used as the height of the cell when no height is define.',
'K_TITLE_MAGNIFICATION' => 'Title Magnification',
'K_TITLE_MAGNIFICATION_INFO' => 'Title magnification respect main font size.',
'K_SMALL_RATIO' => 'Small Font Factor',
'K_SMALL_RATIO_INFO' => 'Reduction factor for small font.',
'HEAD_MAGNIFICATION' => 'Head Magnification',
'HEAD_MAGNIFICATION_INFO' => 'Magnification factor for titles.',
'PDF_IMAGE_SCALE_RATIO' => 'Image scale ratio',
'PDF_IMAGE_SCALE_RATIO_INFO' => 'Ratio used to scale the images',
'PDF_UNIT' => 'Unit',
'PDF_UNIT_INFO' => 'document unit of measure',
'PDF_GD_WARNING'=>'You do not have the GD library installed for PHP. Without the GD library installed, only JPEG logos can be displayed in PDF documents.',
'ERR_EZPDF_DISABLE'=>'Warning : The EZPDF class is disabled from the config table and it set as the PDF class. Please "Save" this form to set TCPDF as the PDF Class and return in a stable state.',
'LBL_IMG_RESIZED'=>"(resized for display)",
'LBL_FONTMANAGER_BUTTON' => 'PDF Font Manager',
'LBL_FONTMANAGER_TITLE' => 'PDF Font Manager',
'LBL_FONT_BOLD' => 'Bold',
'LBL_FONT_ITALIC' => 'Italic',
'LBL_FONT_BOLDITALIC' => 'Bold/Italic',
'LBL_FONT_REGULAR' => 'Regular',
'LBL_FONT_TYPE_CID0' => 'CID-0',
'LBL_FONT_TYPE_CORE' => 'Core',
'LBL_FONT_TYPE_TRUETYPE' => 'TrueType',
'LBL_FONT_TYPE_TYPE1' => 'Type1',
'LBL_FONT_TYPE_TRUETYPEU' => 'TrueTypeUnicode',
'LBL_FONT_LIST_NAME' => 'Name',
'LBL_FONT_LIST_FILENAME' => 'Filename',
'LBL_FONT_LIST_TYPE' => 'Type',
'LBL_FONT_LIST_STYLE' => 'Style',
'LBL_FONT_LIST_STYLE_INFO' => 'Style of the font',
'LBL_FONT_LIST_ENC' => 'Encoding',
'LBL_FONT_LIST_EMBEDDED' => 'Embedded',
'LBL_FONT_LIST_EMBEDDED_INFO' => 'Check to embed the font into the PDF file',
'LBL_FONT_LIST_CIDINFO' => 'CID Information',
'LBL_FONT_LIST_CIDINFO_INFO' => "Examples :".
"<ul><li>".
"Chinese Traditional :<br>".
"<pre>\$enc=\'UniCNS-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'CNS1\',\'Supplement\'=>0);<br>".
"include(\'include/tcpdf/fonts/uni2cid_ac15.php\');</pre>".
"</li><li>".
"Chinese Simplified :<br>".
"<pre>\$enc=\'UniGB-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'GB1\',\'Supplement\'=>2);<br>".
"include(\'include/tcpdf/fonts/uni2cid_ag15.php\');</pre>".
"</li><li>".
"Korean :<br>".
"<pre>\$enc=\'UniKS-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Korea1\',\'Supplement\'=>0);<br>".
"include(\'include/tcpdf/fonts/uni2cid_ak12.php\');</pre>".
"</li><li>".
"Japanese :<br>".
"<pre>\$enc=\'UniJIS-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Japan1\',\'Supplement\'=>5);<br>".
"include(\'include/tcpdf/fonts/uni2cid_aj16.php\');</pre>".
"</li></ul>".
"More help : www.tcpdf.org",
'LBL_FONT_LIST_FILESIZE' => 'Font Size (KB)',
'LBL_ADD_FONT' => 'Add a font',
'LBL_BACK' => 'Back',
'LBL_REMOVE' => 'rem',
'LBL_JS_CONFIRM_DELETE_FONT' => 'Are you sure that you want to delete this font?',
'LBL_ADDFONT_TITLE' => 'Add a PDF Font',
'LBL_PDF_PATCH' => 'Patch',
'LBL_PDF_PATCH_INFO' => 'Custom modification of the encoding. Write a PHP array.<br>Example :<br>ISO-8859-1 does not contain the euro symbol. To add it at position 164, write "array(164=>\\\'Euro\\\')".',
'LBL_PDF_ENCODING_TABLE' => 'Encoding Table',
'LBL_PDF_ENCODING_TABLE_INFO' => 'Name of the encoding table.<br>This option is ignored for TrueType Unicode, OpenType Unicode and symbolic fonts.<br>The encoding defines the association between a code (from 0 to 255) and a character contained in the font.<br>The first 128 are fixed and correspond to ASCII.',
'LBL_PDF_FONT_FILE' => 'Font File',
'LBL_PDF_FONT_FILE_INFO' => '.ttf or .otf or .pfb file',
'LBL_PDF_METRIC_FILE' => 'Metric File',
'LBL_PDF_METRIC_FILE_INFO' => '.afm or .ufm file',
'LBL_ADD_FONT_BUTTON' => 'Add',
'JS_ALERT_PDF_WRONG_EXTENSION' => 'This file do not have a good file extension.',
'LBL_PDF_INSTRUCTIONS' => 'Instructions',
'PDF_INSTRUCTIONS_ADD_FONT' => <<<BSOFR
Fonts supported by SugarPDF :
<ul>
<li>TrueTypeUnicode (UTF-8 Unicode)</li>
<li>OpenTypeUnicode</li>
<li>TrueType</li>
<li>OpenType</li>
<li>Type1</li>
<li>CID-0</li>
</ul>
<br>
If you choose to not embed your font in the PDF, the generated PDF file will be lighter but a substitution will be use if the font is not available in the system of your reader.
<br><br>
Adding a PDF font to SugarCRM requires to follow steps 1 and 2 of the TCPDF Fonts documentation available in the "DOCS" section of the <a href="http://www.tcpdf.org" target="_blank">TCPDF website</a>.
<br><br>The pfm2afm and ttf2ufm utils are available in fonts/utils in the TCPDF package that you can download on the "DOWNLOAD" section of the <a href="http://www.tcpdf.org" target="_blank">TCPDF website</a>.
<br><br>Load the metric file generated in step 2 and your font file below.
BSOFR
,
'ERR_MISSING_CIDINFO' => 'The field CID Information cannot be empty.',
'LBL_ADDFONTRESULT_TITLE' => 'Result of the add font process',
'LBL_STATUS_FONT_SUCCESS' => 'SUCCESS : The font has been added to SugarCRM.',
'LBL_STATUS_FONT_ERROR' => 'ERROR : The font has not been added. Look at the log below.',
'LBL_FONT_MOVE_DEFFILE' => 'Font definition file move to : ',
'LBL_FONT_MOVE_FILE' => 'Font file move to : ',
// Font manager
'ERR_LOADFONTFILE' => 'ERROR: LoadFontFile error!',
'ERR_FONT_EMPTYFILE' => 'ERROR: Empty filename!',
'ERR_FONT_UNKNOW_TYPE' => 'ERROR: Unknow font type:',
'ERR_DELETE_CORE_FILE' => 'ERROR: It is not possible to delete a core font.',
'ERR_NO_FONT_PATH' => 'ERROR: No font path available!',
'ERR_NO_CUSTOM_FONT_PATH' => 'ERROR: No custom font path available!',
'ERR_FONT_NOT_WRITABLE' => 'is not writable.',
'ERR_FONT_FILE_DO_NOT_EXIST' => 'doesn\'t exist or is not a directory.',
'ERR_FONT_MAKEFONT' => 'ERROR: MakeFont error',
'ERR_FONT_ALREADY_EXIST' => 'ERROR : This font already exist. Rollback...',
'ERR_PDF_NO_UPLOAD' => 'Error during the upload of the font or metric file.',
);
?>

View File

@@ -0,0 +1,436 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version
* 1.1.3 ("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.
*
* All copies of the Covered Code must include on each user interface screen:
* (i) the "Powered by SugarCRM" logo and
* (ii) the SugarCRM copyright notice
* in the same form as they appear in the distribution. See full license for
* requirements.
*
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
* Translator: Krzysztof Morawski
* All Rights Reserved.
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = array (
/* 'ADMIN_EXPORT_ONLY'=>'Tylko administrator eksportuje',*/
'ADVANCED'=>'Zaawansowane',
'DEFAULT_CURRENCY_ISO4217'=>'Sybmol waluty wg ISO 4217',
'DEFAULT_CURRENCY_NAME'=>'Nazwa waluty',
'DEFAULT_CURRENCY_SYMBOL'=>'Symbol waluty',
'DEFAULT_CURRENCY'=>'Waluta Domyślna',
'DEFAULT_DATE_FORMAT'=>'Domyślny format daty',
'DEFAULT_DECIMAL_SEP'=> 'Symbol dziesiętny',
'DEFAULT_LANGUAGE'=>'Domyślny język',
'DEFAULT_NUMBER_GROUPING_SEP'=> 'Separator tysięcy',
'DEFAULT_SYSTEM_SETTINGS'=>'Interfejs użytkownika',
'DEFAULT_THEME'=> 'Domyślny temat',
'DEFAULT_TIME_FORMAT'=>'Domyślny format czasu',
/* 'DISABLE_EXPORT'=>'Wyłącz eksport',*/
'DISPLAY_LOGIN_NAV'=>'Wyświetlaj zakładki na stronie logowania',
'DISPLAY_RESPONSE_TIME'=>'Wyświetlaj czas odpowiedzi serwera',
/* 'EXPORT'=>'Eksport',
'EXPORT_CHARSET' => 'Domyślny zestaw znaków dla eksportu',
'EXPORT_DELIMITER' => 'Separator eksportu',*/
'IMAGES'=>'Znaki graficzne',
'LBL_CONFIGURE_SETTINGS_TITLE' => 'Ustawienia systemowe',
'LBL_ENABLE_MAILMERGE' => 'Czy włączyć scalanie poczty?',
'LBL_LOGVIEW' => 'Konfiguruj ustawienia dziennika',
'LBL_MAIL_SMTPAUTH_REQ' => 'Czy używać autentykacji SMTP?',
'LBL_MAIL_SMTPPASS'=> 'Hasło SMTP:',
'LBL_MAIL_SMTPPORT'=> 'SMTP Port:',
'LBL_MAIL_SMTPSERVER'=> 'Serwer SMTP:',
'LBL_MAIL_SMTPUSER'=> 'Nazwa użytkownika SMTP:',
'LBL_MAILMERGE_DESC' => 'Ta opcja powinna być zaznaczona tylko wtedy, gdy masz Sugar plug-in dla Microsoft&reg; Word&reg;.',
'LBL_MAILMERGE' => 'Ustawienia scalania poczty',
'LBL_MODULE_FAVICON' => 'Wyświetl ikonkę modułu w adresie',
'LBL_MODULE_FAVICON_HELP' => 'Jeśli jesteś w module z ikoną, użyj ikony tego modułu jak favicon w adresie URL zamiast ikonki ze stylu strony',
'LBL_MODULE_NAME'=>'Ustawienia systemowe',
'LBL_MODULE_ID' => 'Konfigurator',
'LBL_MODULE_TITLE'=>'Interfejs użytkownika',
'LBL_NOTIFY_FROMADDRESS' => 'Adres "Od":',
'LBL_NOTIFY_SUBJECT' => 'Temat listu:',
'LBL_PORTAL_ON_DESC' => 'Umożliwia dostęp do spraw, notatek i innych danych poprzez zewnętrzny własny portal samoobsługowy.',
'LBL_PORTAL_ON' => 'Czy włączyć integracje z własnym portalem samoobsługowym?',
'LBL_PORTAL_TITLE' => 'Własny portal samoobsługowy',
'LBL_PROXY_AUTH'=>'Autentykacja?',
'LBL_PROXY_HOST'=>'Proxy host',
'LBL_PROXY_ON_DESC'=>'Konfiguruje adres serwera proxy i ustawienia autoryzacji',
'LBL_PROXY_ON'=>'Czy użyć serwera proxy?',
'LBL_PROXY_PASSWORD'=>'Hasło',
'LBL_PROXY_PORT'=>'Port',
'LBL_PROXY_TITLE'=>'Ustawienia proxy',
'LBL_PROXY_USERNAME'=>'Nazwa użytkownika',
'LBL_RESTORE_BUTTON_LABEL'=>'Przywracanie',
'LBL_SKYPEOUT_ON_DESC' => 'Klikając na numer telefonu pozwala na połącznie z użyciem SkypeOut&reg;. Aby skorzystać z tej funkcji numer musi być podany odpowienim formacie: "+" "Kod Kraju" "Numer". Więcej: <a href="http://www.skype.com/help/faq/skypeout.html#calling" target="skype">skype&reg; faq</a> ',
'LBL_SKYPEOUT_ON' => 'Czy uruchomić integracje ze SkypeOut&reg;?',
'LBL_SKYPEOUT_TITLE' => 'SkypeOut&reg;',
'LBL_USE_REAL_NAMES' => 'Pokaż pełną nazwę użytkownika (nie login)',
'LIST_ENTRIES_PER_LISTVIEW'=>'Widok elementów listy na stronie',
'LIST_ENTRIES_PER_SUBPANEL'=>'Widok elementów subpaneli na stronie',
'LBL_WIRELESS_LIST_ENTRIES' => 'Widok elementów listy na stronie (dla klienta bezprzewodowego)',
'LBL_WIRELESS_SUBPANEL_LIST_ENTRIES' => 'Widok elementów subpaneli na stronie dla klienta bezprzewodowego)',
'LOG_MEMORY_USAGE'=>'Dziennik użycia pamięci',
'LOG_SLOW_QUERIES'=> 'Dziennik szybkości wykonywania zapytań',
'LOCK_HOMEPAGE_HELP'=>'To ustawienie zapobiega:<BR> 1) dodawaniu nowych stron startowych na stronie głównej <BR>2) zmiany położenia zakładek na Stronie główej, poprzez ich przeciąganie i upuszczanie.',
'CURRENT_LOGO'=>'Logo w użyciu',
'CURRENT_LOGO_HELP'=>'To logo jest wyświetlane w lewym górnym rogu strony aplikacji Sugar.',
'NEW_LOGO'=>'Załaduj nowe logo',
'NEW_LOGO_HELP'=>'Plik obrazka może być w formacie .png lub .jpg.<BR>Rekomendowany wymiar to 212x40 pikseli.',
'NEW_QUOTE_LOGO'=>'Załaduj nowe logo oferty',
'NEW_QUOTE_LOGO_HELP'=>'Wymagany format pliku to .jpg.<BR>Rekomendowany wymiar to 867x74 pikseli.',
'QUOTES_CURRENT_LOGO'=>'Logo w ofertach',
'SLOW_QUERY_TIME_MSEC'=>'Próg czasu dla szybkości wykonywania zapytań (msec)',
'STACK_TRACE_ERRORS'=>'Wyświetlaj spis śladów błędów',
'UPLOAD_MAX_SIZE'=>'Maksymalna wielkość ładowania',
'VERIFY_CLIENT_IP'=>'Sprawdzaj numer IP użytkownika',
'LOCK_HOMEPAGE' => 'Wyłacz opcję dostosowania wyglądu dla użytkownika',
'LOCK_SUBPANELS' => 'Wyłacz opcję dostosowania subpaneli dla użytkownika',
'MAX_DASHLETS' => 'Maksymalna liczba zakładek na stronie głównej',
'SYSTEM_NAME'=> 'Nazwa systemu',
'LBL_OC_STATUS' => 'Domyślny status dla klientów bez stałego dostępu',
'DEFAULT_OC_STATUS' => 'Włącz domyślnie klientów bez stałego dostępu',
'LBL_OC_STATUS_DESC' => 'Zaznacz tutaj, jeżeli chcesz aby którykolwiek z użytkowników miał mozliwość dostępu przez klienta bez stałego dostępu. Możesz też skonfigurować ten dostęp z poziomu użytkownika.',
'SESSION_TIMEOUT' => 'Wyczerpany czas trwania sesji portalu',
'SESSION_TIMEOUT_UNITS' => 'sekund',
'LBL_LDAP_TITLE'=>'Wsparcie autentykacji porzez LDAP',
'LBL_LDAP_ENABLE'=>'Włącz LDAP',
'LBL_LDAP_SERVER_HOSTNAME'=> 'Serwer:',
'LBL_LDAP_SERVER_PORT'=> 'Numer portu:',
'LBL_LDAP_ADMIN_USER'=> 'Autentykowany użytkownik:',
'LBL_LDAP_ADMIN_USER_DESC'=>'Używane do wyszukiwania użytkownika Sugar. [Moze wymagać pełnej nazwy]<br>Jeśli nie zostanie użyte - powiąże anonimowo].',
'LBL_LDAP_ADMIN_PASSWORD'=> 'Hasło autentykacji:',
'LBL_LDAP_AUTHENTICATION'=> 'Autentykacja:',
'LBL_LDAP_AUTHENTICATION_DESC'=>'Łączenie do serwera LDAP z wykorzystaniem listy uwierzytalniącej użytkowników',
'LBL_LDAP_AUTO_CREATE_USERS'=>'Automatyczne tworzenie użytkowników:',
'LBL_LDAP_USER_DN'=>'Użytkownik DN:',
'LBL_LDAP_GROUP_DN'=>'Grupa DN:',
'LBL_LDAP_GROUP_DN_DESC'=>'Przykład: <em>ou=groups,dc=example,dc=com</em>',
'LBL_LDAP_USER_FILTER'=>'Filtr użytkownika:',
'LBL_LDAP_GROUP_MEMBERSHIP'=>'Członkostwo w grupie:',
'LBL_LDAP_GROUP_MEMBERSHIP_DESC'=>'Użytkownik musi należeć do grupy.',
'LBL_LDAP_GROUP_USER_ATTR'=>'Atrybuty użytkownika:',
'LBL_LDAP_GROUP_USER_ATTR_DESC'=>'Unikalny identyfikator osoby, który będzie stosowany do ustalenia, czy jest członkiem grupy Przykład: <em>uid</em>',
'LBL_LDAP_GROUP_ATTR_DESC'=>'Atrybut grupy który będzie użyty do filtrownia atrybutów użytkownika Przkład: <em>memberUid</em>',
'LBL_LDAP_GROUP_ATTR'=>'Atrybuty grupy:',
'LBL_LDAP_USER_FILTER_DESC'=>'Dodatkowe parametry filtrów zastosowane podczas uwierzytelniania użytkowników np.<em>is_sugar_user=1 or (is_sugar_user=1)(is_sales=1)</em>',
'LBL_LDAP_LOGIN_ATTRIBUTE'=>'Atrybut logowania:',
'LBL_LDAP_BIND_ATTRIBUTE'=>'Atrybut powiązany:',
'LBL_LDAP_BIND_ATTRIBUTE_DESC'=>'Przykład powiązania użytkownika LDAP:[<b>AD:</b>&nbsp;userPrincipalName] [<b>openLDAP:</b>&nbsp;userPrincipalName] [<b>Mac&nbsp;OS&nbsp;X:</b>&nbsp;uid] ',
'LBL_LDAP_LOGIN_ATTRIBUTE_DESC'=>'Przykład wyszukiwania użytkownika LDAP:[<b>AD:</b>&nbsp;userPrincipalName] [<b>openLDAP:</b>&nbsp;dn] [<b>Mac&nbsp;OS&nbsp;X:</b>&nbsp;dn] ',
'LBL_LDAP_SERVER_HOSTNAME_DESC'=>'Przykład: ldap.example.com',
'LBL_LDAP_SERVER_PORT_DESC'=>'Przykład: 389',
'LBL_LDAP_GROUP_NAME'=>'Nazwa grupy:',
'LBL_LDAP_GROUP_NAME_DESC'=>'Przykład <em>cn=sugarcrm</em>',
'LBL_LDAP_USER_DN_DESC'=>'Przykład: <em>ou=people,dc=example,dc=com</eM>',
'LBL_LDAP_AUTO_CREATE_USERS_DESC'=> 'Jeżeli autentykowany użytkownik nie istnieje w aplikacji - zostanie automatycznie utworzony w Sugar.',
'LBL_LDAP_ENC_KEY' => 'Klucz szyfrowania:',
'DEVELOPER_MODE'=>'Developer Mode',
'LBL_LDAP_ENC_KEY_DESC' => 'Dla auntentykacji SOAP authentication, kiedy LDAP jest używany.',
'LDAP_ENC_KEY_NO_FUNC_DESC' => 'Rozszeżenie php_mcrypt musi być włączone w pliku php.ini.',
'LBL_ALL' => 'Wszystko',
'LBL_MARK_POINT' => 'Punkt zaznaczenia',
'LBL_NEXT_' => 'Następny>>',
'LBL_REFRESH_FROM_MARK' => 'Odśwież od znaku',
'LBL_SEARCH' => 'Szukaj:',
'LBL_REG_EXP' => 'Zarejestrowanie wygasa:',
'LBL_IGNORE_SELF' => 'Samoczynne ignorowanie:',
'LBL_MARKING_WHERE_START_LOGGING'=>'Zaznacz, od kiedy rozpocząć zapis dziennika',
'LBL_DISPLAYING_LOG'=>'Wyświetl dziennik',
'LBL_YOUR_PROCESS_ID'=>'ID Twojego procesu',
'LBL_YOUR_IP_ADDRESS'=>'Twój adres IP to',
'LBL_IT_WILL_BE_IGNORED'=>' będzie zignorowane ',
'LBL_LOG_NOT_CHANGED'=>'dziennik nie zmienił się',
'LBL_ALERT_JPG_IMAGE' => 'Formatem pliku obrazka musi być jpg. Nadpisz nowy plik z nowym rozszerzeniem .jpg.',
'LBL_ALERT_TYPE_IMAGE' => 'Formatem pliku obrazka musi być jpg lub png. Nadpisz nowy plik z nowym rozszerzeniem .jpg lub .png.',
'LBL_ALERT_SIZE_RATIO' => 'Współczynnik zmniejszenia obrazka powinien wynosić od 1:1 do 10:1. Obrazek zostanie przeskalowany.',
'LBL_ALERT_SIZE_RATIO_QUOTES' => 'Współczynnik zmniejszenia obrazka powinien wynosić od 3:1 do 20:1. Nadpisz nowy plik z takimi parametrami.',
'ERR_ALERT_FILE_UPLOAD' => 'Błąd podczas ładowania obrazka.',
'LBL_LOGGER'=>'Ustawienia dziennika',
'LBL_LOGGER_FILENAME'=>'Nazwa pliku dziennika',
'LBL_LOGGER_FILE_EXTENSION'=>'Rozszerzenie',
'LBL_LOGGER_MAX_LOG_SIZE'=>'Maksymalna wielkość pliku',
'LBL_LOGGER_DEFAULT_DATE_FORMAT'=>'Domyślny format daty',
'LBL_LOGGER_LOG_LEVEL'=>'Poziom dziennika',
'LBL_LOGGER_MAX_LOGS'=>'Maksymalna ilość dzienników (before rolling)',
'LBL_LOGGER_FILENAME_SUFFIX' =>'Dołącz po nazwie pliku',
'LBL_VCAL_PERIOD' => 'Okres czasu uaktualniania vCal:',
'vCAL_HELP' => 'Użyj tego ustawienia, aby określić ile do przodu (od dzisiejszej daty) system będzie podawał informacje o statusie Wolny/Zajęty. Aby wyłączyć ten status, zaznacz 0. Możesz wybrać liczbę miesięcy od 1 do 12.',
// *******************************************
//BEGIN ASTERISK PATCH
'LBL_ASTERISK_TITLE' => 'Asterisk<73> / VoiceRD<52>',
'LBL_ASTERISK_ON' => 'Enable Asterisk / VoiceRD Integration?',
'LBL_ASTERISK_ON_DESC' => 'Allows users to click on phone numbers in Contacts and Accounts and initiate an outbound call from a VOIP phone to an Asterisk or VoiceRD server. Enabling this requires all the below information as well as filling in the Asterisk Extension field on each user you would like to enable.',
'LBL_ASTERISK_PRO' => 'Enable Asterisk / VoiceRD Pro Version',
'LBL_ASTERISK_PRO_DESC' => 'Displays a SugarPro popup features',
'LBL_ASTERISK_SERVER' => 'Asterisk Server:',
'LBL_ASTERISK_SERVER_DESC' => 'Server IP or DNS name. REQUIRED',
'LBL_ASTERISK_PORT' => 'Asterisk Port:',
'LBL_ASTERISK_PORT_DESC' => 'Asterisk port default: 5038',
'LBL_ASTERISK_USERNAME' => 'Asterisk Username:',
'LBL_ASTERISK_USERNAME_DESC' => 'User to login to server as for outbound dialing. REQUIRED',
'LBL_ASTERISK_SECRET' => 'Asterisk Secret:',
'LBL_ASTERISK_SECRET_DESC' => 'Users secret for phrase. REQUIRED',
'LBL_ASTERISK_INTERNAL_CONTEXT' => 'Asterisk Internal Context:',
'LBL_ASTERISK_INTERNAL_CONTEXT_DESC' => 'Asterisk internal context default: from-internal',
'LBL_ASTERISK_EXTERNAL_CONTEXT' => 'Asterisk External Context:',
'LBL_ASTERISK_EXTERNAL_CONTEXT_DESC' => 'Asterisk external context default: from-internal',
'LBL_ASTERISK_PREFIX' => 'Asterisk Prefix:',
'LBL_ASTERISK_PREFIX_DESC' => 'Number used to get an outside line',
'LBL_ASTERISK_AUTO_PICKUP' => 'Asterisk Auto Pickup:',
'LBL_ASTERISK_AUTO_PICKUP_DESC' => 'Asterisk auto pickup number default:*3',
'LBL_ASTERISK_CALL_RECORD' => 'Asterisk Call Record Option:',
'LBL_ASTERISK_CALL_RECORD_DESC' => 'Displays button that allows user to record a conversation',
'LBL_ASTERISK_PHONEICON_ON' => 'Asterisk Phone Icon:',
'LBL_ASTERISK_PHONEICON_ON_DESC' => 'Places phone icon next to number',
'LBL_ASTERISK_POPUP_TIMER' => 'Asterisk Popup Timer',
'LBL_ASTERISK_POPUP_TIMER_DESC' => '(sec) Causes the asterisk popup to close automatically',
//END OF ASTERISK PATCH
'LBL_PDFMODULE_NAME' => 'Ustawienia PDF',
'SUGARPDF_BASIC_SETTINGS' => 'Właściwości dokumentu',
'SUGARPDF_ADVANCED_SETTINGS' => 'Opcje zaawansowane',
'SUGARPDF_LOGO_SETTINGS' => 'Obrazki',
'PDF_CREATOR' => 'Kreator PDF',
'PDF_CREATOR_INFO' => 'Definiowane przez kreator PDF. <br>Zwykle jest to nazwa aplikacji, która generuje PDF.',
'PDF_AUTHOR' => 'Autor',
'PDF_AUTHOR_INFO' => 'Autor występuje we właściwości dokumentu.',
'PDF_HEADER_LOGO' => 'Dla dokumentów wyceny PDF',
'PDF_HEADER_LOGO_INFO' => 'To logo pojawi się domyślnie w nagłówku dokumentów w formacie PDF.',
'PDF_NEW_HEADER_LOGO' => 'Wybierz nowe logo do wycen',
'PDF_NEW_HEADER_LOGO_INFO' => 'Formatem pliku może być .jpg lub .png. (tylko .jpg w EZPDF)<BR>Zalecana wielkość 867x74 px.',
'PDF_HEADER_LOGO_WIDTH' => 'Szerokość logo do wycen',
'PDF_HEADER_LOGO_WIDTH_INFO' => 'Zmiana wielkości załadowanego obrazka, który zostanie załączony w dokumentach Wycen PDF. (TCPDF tylko)',
'PDF_SMALL_HEADER_LOGO' => 'Dla dokumentów raportu w PDF',
'PDF_SMALL_HEADER_LOGO_INFO' => 'Ten obrazek pojawia się, domyślnie w nagłówku w raportach dokumentów PDF.<br> Ten obrazek pojawia się również w lewym górnym rogu strony Sugar.',
'PDF_NEW_SMALL_HEADER_LOGO' => 'Wybierz nowe logo dla Raportów',
'PDF_NEW_SMALL_HEADER_LOGO_INFO' => 'Formatem pliku może być .jpg lub .png. (tylko .jpg dla EZPDF)<BR>Zalecana wielkość to 212x40 px.',
'PDF_SMALL_HEADER_LOGO_WIDTH' => 'Szerokość logo w Raportach',
'PDF_SMALL_HEADER_LOGO_WIDTH_INFO' => 'Zmiana wielkości załadowanego obrazka, który zostanie załączony w dokumentach Raportów PDF. (TCPDF tylko)',
'PDF_HEADER_STRING' => 'Łańcuch nagłówka',
'PDF_HEADER_STRING_INFO' => 'Opis nagłówka',
'PDF_HEADER_TITLE' => 'Tytuł nagłówka',
'PDF_HEADER_TITLE_INFO' => 'Napis wyświetlny jako tytuł w nagłówku dokumentu',
'PDF_FILENAME' => 'Domyślna nazwa pliku',
'PDF_FILENAME_INFO' => 'Domyślna nazwa pliku dla generowanych plików PDF',
'PDF_TITLE' => 'Tytuł',
'PDF_TITLE_INFO' => 'Tytuł pojawi się we właściwościach dokumentu.',
'PDF_SUBJECT' => 'Temat',
'PDF_SUBJECT_INFO' => 'Temat pojawi się we właściwościach dokumentu.',
'PDF_KEYWORDS' => 'Słowo/a kluczowe',
'PDF_KEYWORDS_INFO' => 'Słowa kluczowe skojarzone z dokumentem, na ogół w formie "keyword1 keyword2..."',
'PDF_COMPRESSION' => 'Kompresja',
'PDF_COMPRESSION_INFO' => 'Włącza lub wyłącz kompresję stron. <br>Po włączeniu, każda strona jest kompresowana, ze stopniem kompresji ok. 2 dla wynikowego dokumentu.',
'PDF_JPEG_QUALITY' => 'Jakość JPEG (1-100)',
'PDF_JPEG_QUALITY_INFO' => 'Ustawienie domyślnej jakość kompresji JPEG (1-100)',
'PDF_PDF_VERSION' => 'Wersja PDF',
'PDF_PDF_VERSION_INFO' => 'Ustawienie wersji PDF (Sprawdzanie odwołań PDF do prawidłowych wartości).',
'PDF_PROTECTION' => 'Ochrona dokumentów',
'PDF_PROTECTION_INFO' => 'Ustawienie ochrony dokumentu<br>- kopiowanie: Kopiowanie tekstu i zdjęć do schowka<br>-drukowanie: drukowanie dokumentu<br>- modyfikowanie: modyfikowanie dokumentu (z wyjątkiem przypisów i form)<br>- przypis-forma: Dodawanie przypisów i form<br>Uwaga: ochrona przed zmianami dla użytkowników, pełnej wersji Acrobat.',
'PDF_USER_PASSWORD' => 'Hasło użytkownika',
'PDF_USER_PASSWORD_INFO' => 'Jeśli nie ustawiono hasła dokument otworzy się jak zwykle. <br>Jeśli ustawisz hasło użytkownika, przeglądarka plików PDF poprosi o to przed wyświetleniem dokumentu. <br>Główne hasło, jeśli jest inne od hasła użytkownika, może być użyte, aby uzyskać pełny dostęp.',
'PDF_OWNER_PASSWORD' => 'Właściciel hasła',
'PDF_OWNER_PASSWORD_INFO' => 'Jeśli nie ustawiono hasła dokument otworzy się jak zwykle. <br>Jeśli ustawisz hasło użytkownika, przeglądarka plików PDF poprosi o to przed wyświetleniem dokumentu. <br>Główne hasło, jeśli jest inne od hasła użytkownika, może być użyte, aby uzyskać pełny dostęp.',
'PDF_ACL_ACCESS' => 'Kontrola dostępu',
'PDF_ACL_ACCESS_INFO' => 'Domyślna kontrola dostępu do generowania PDF.',
'K_CELL_HEIGHT_RATIO' => 'Wysokość wskaźnika komórkii',
'K_CELL_HEIGHT_RATIO_INFO' => 'Jeśli wysokość komórki jest mniejsza niż (Wysokość czcionki x Wysokość wskaźnika komórki) to (Wysokość czcionki x Wysokość wskaźnika komórki) zostanie użyta do ustalnia wys.komórki.<br>(Wysokość czcionki x Wysokość wskaźnika komórki) jest również stosowana jako wysokości komórki, gdy wysokość nie jest określena.',
'K_TITLE_MAGNIFICATION' => 'Powiększenie tytuł',
'K_TITLE_MAGNIFICATION_INFO' => 'Powiększenie tytułu ma odniesienie do glównego rozmiaru czcionki.',
'K_SMALL_RATIO' => 'Mała czcionka',
'K_SMALL_RATIO_INFO' => 'Współczynnik pomniejszenia czcionki.',
'HEAD_MAGNIFICATION' => 'Powiekszenie nagłówka',
'HEAD_MAGNIFICATION_INFO' => 'Współczynnik powiększenia nagłówka.',
'PDF_IMAGE_SCALE_RATIO' => 'Skala ograzka',
'PDF_IMAGE_SCALE_RATIO_INFO' => 'Wielkość skali obrazka',
'PDF_UNIT' => 'Jednostka',
'PDF_UNIT_INFO' => 'Jednostka miary dokumentu',
'PDF_GD_WARNING'=>'Nie masz zainstalowanych bibliotek GD do PHP. Bez zainstalowanej biblioteki GD , tylko logo JPEG może być wyświetlane w dokumentach PDF.',
'ERR_EZPDF_DISABLE'=>'Ostrzeżenie: klasa EZPDF jest wyłączona w tabeli config i ustawiona jako klasa PDF. Proszę "Zapisz" ten formularz, aby ustawić TCPDF jako klasa PDF.',
'LBL_IMG_RESIZED'=>"(przeskalowane do wyświetlania)",
'LBL_FONTMANAGER_BUTTON' => 'Menadżer czcionek PDF',
'LBL_FONTMANAGER_TITLE' => 'Menadżer czcionek PDFr',
'LBL_FONT_BOLD' => 'Pogrubiona',
'LBL_FONT_ITALIC' => 'Kursywa',
'LBL_FONT_BOLDITALIC' => 'Pogrubiona/Kursywa',
'LBL_FONT_REGULAR' => 'Standardowa',
'LBL_FONT_TYPE_CID0' => 'CID-0',
'LBL_FONT_TYPE_CORE' => 'Core',
'LBL_FONT_TYPE_TRUETYPE' => 'TrueType',
'LBL_FONT_TYPE_TYPE1' => 'Type1',
'LBL_FONT_TYPE_TRUETYPEU' => 'TrueTypeUnicode',
'LBL_FONT_LIST_NAME' => 'Nazwa',
'LBL_FONT_LIST_FILENAME' => 'Nazwa pliku',
'LBL_FONT_LIST_TYPE' => 'Typ',
'LBL_FONT_LIST_STYLE' => 'Styl',
'LBL_FONT_LIST_STYLE_INFO' => 'Styl czcionki',
'LBL_FONT_LIST_ENC' => 'Kodowanie',
'LBL_FONT_LIST_EMBEDDED' => 'Osadzanie',
'LBL_FONT_LIST_EMBEDDED_INFO' => 'Sprawdź, aby umieścić czcionki w pliku PDF',
'LBL_FONT_LIST_CIDINFO' => 'Informacja CID',
'LBL_FONT_LIST_CIDINFO_INFO' => "Przykład :".
"<ul><li>".
"Chinese Traditional :<br>".
"<pre>\$enc=\'UniCNS-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'CNS1\',\'Supplement\'=>0);<br>".
"include(\'include/tcpdf/fonts/uni2cid_ac15.php\');</pre>".
"</li><li>".
"Chinese Simplified :<br>".
"<pre>\$enc=\'UniGB-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'GB1\',\'Supplement\'=>2);<br>".
"include(\'include/tcpdf/fonts/uni2cid_ag15.php\');</pre>".
"</li><li>".
"Korean :<br>".
"<pre>\$enc=\'UniKS-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Korea1\',\'Supplement\'=>0);<br>".
"include(\'include/tcpdf/fonts/uni2cid_ak12.php\');</pre>".
"</li><li>".
"Japanese :<br>".
"<pre>\$enc=\'UniJIS-UTF16-H\';<br>".
"\$cidinfo=array(\'Registry\'=>\'Adobe\', \'Ordering\'=>\'Japan1\',\'Supplement\'=>5);<br>".
"include(\'include/tcpdf/fonts/uni2cid_aj16.php\');</pre>".
"</li></ul>".
"More help : www.tcpdf.org",
'LBL_FONT_LIST_FILESIZE' => 'Wielkość czcionki (KB)',
'LBL_ADD_FONT' => 'Dodaj czcionkę',
'LBL_BACK' => 'Powrót',
'LBL_REMOVE' => 'rem',
'LBL_JS_CONFIRM_DELETE_FONT' => 'Czy na pewno chcesz usunąć tę czcionkę?',
'LBL_ADDFONT_TITLE' => 'Dodaj czcionkę PDF',
'LBL_PDF_PATCH' => 'Patch',
'LBL_PDF_PATCH_INFO' => 'Własne zmiany kodowania. Wpisz do tablicy PHP.<br>Przykład :<br>ISO-8859-1 nie zawiera symbolu euro. Dodaj je w pozycji 164, wpisując "array(164=>\\\'Euro\\\')".',
'LBL_PDF_ENCODING_TABLE' => 'Tablica kodowania',
'LBL_PDF_ENCODING_TABLE_INFO' => 'Nazwa tabeli kodowania.<br>Ta opcja jest ignorowana dla TrueType Unicode, OpenType Unicode i czcionek symboli.<br>Kodowanie określa związek pomiędzy kodem (od 0 do 255) a znakami zawartymi w czcionce.<br> Pierwsze 128 są stałe i odpowiadają kodą ASCII.',
'LBL_PDF_FONT_FILE' => 'Plik czcionki',
'LBL_PDF_FONT_FILE_INFO' => 'plik .ttf , .otf lub .pfb',
'LBL_PDF_METRIC_FILE' => 'Plik metryczny',
'LBL_PDF_METRIC_FILE_INFO' => 'plik .afm lub .ufm',
'LBL_ADD_FONT_BUTTON' => 'Dodaj',
'JS_ALERT_PDF_WRONG_EXTENSION' => 'Ten plik nie ma nieprawidłowe rozszerzenie.',
'LBL_PDF_INSTRUCTIONS' => 'Instrukcja',
'PDF_INSTRUCTIONS_ADD_FONT' => <<<BSOFR
Czcionki obsługiwane przez SugarPDF :
<ul>
<li>TrueTypeUnicode (UTF-8 Unicode)</li>
<li>OpenTypeUnicode</li>
<li>TrueType</li>
<li>OpenType</li>
<li>Type1</li>
<li>CID-0</li>
</ul>
<br>
Jeśli zdecydujesz się nie osadzać czcionki w PDF, wygenerowany plik PDF będzie lżejszy, ale może zostać użyty zastepnik, jeśli czcionka nie jest dostępna w systemie czytnika.
<br><br>
Dodanie czcionki PDF do SugarCRM wymaga wykonania kroków 1 i 2 jak w dokumentacji Czcionek TCPDF dostępnej w sekcji "DOCS" na stronie <a href="http://www.tcpdf.org" target="_blank">TCPDF</a>.
<br><br>narzędzia pfm2afm i ttf2ufm dostępne są w folderze fonts/utils w pakiecie TCPDF, który można pobrać z sekcji "DOWNLOAD" na stronie <a href="http://www.tcpdf.org" target="_blank">TCPDF</a>.
<br><br>Załadowuj plik metryki generowane w kroku 2 i czcionki pliku poniżej.
BSOFR
,
'ERR_MISSING_CIDINFO' => 'Pole informacji CID nie może być puste.',
'LBL_ADDFONTRESULT_TITLE' => 'Wyniku procesu dodawania czcionki',
'LBL_STATUS_FONT_SUCCESS' => 'Sukces : Czcionki zostały dodane do SugarCRM.',
'LBL_STATUS_FONT_ERROR' => 'Błąd : Czcionka nie została dodana. Dodatkowe informacje zawiera log poniżej.',
'LBL_FONT_MOVE_DEFFILE' => 'Plik z definicją czcionki został przeniesiony do : ',
'LBL_FONT_MOVE_FILE' => 'Plik czcionki został przeniesiony do : ',
// Font manager
'ERR_LOADFONTFILE' => 'Błąd: LoadFontFile error!',
'ERR_FONT_EMPTYFILE' => 'Błąd: Nie podano nazwy pliku!',
'ERR_FONT_UNKNOW_TYPE' => 'Błąd: Nierozpoznany typ czcionki:',
'ERR_DELETE_CORE_FILE' => 'Błąd: Nie można usunąć czcionki bazowej.',
'ERR_NO_FONT_PATH' => 'Błąd: Folder z czcionką nie jest dostępny!',
'ERR_NO_CUSTOM_FONT_PATH' => 'Błąd: Własny folder z czcionką nie jest dostępny!',
'ERR_FONT_NOT_WRITABLE' => 'nie można zapisać.',
'ERR_FONT_FILE_DO_NOT_EXIST' => 'nie istnieje lub nie jest katalogiem.',
'ERR_FONT_MAKEFONT' => 'Błąd: MakeFont error',
'ERR_FONT_ALREADY_EXIST' => 'Błąd : Ta czcionka już istnieje. Wycofuje zmiany...',
'ERR_PDF_NO_UPLOAD' => 'Błąd podczas przesyłania pliku czcionki lub pliku metrycznego.',
'CAPTCHA'=>'Uwierzytelnianie poprzez Captcha',
'CAPTCHA_PRIVATE_KEY'=>'Własny klucz Captcha',
'CAPTCHA_PUBLIC_KEY'=>'Własny klucz Captcha',
'ENABLE_CAPTCHA'=>'Czy włączyć uwierzytelnianie poprzez Captcha aby uniemożliwić automatyczne wypełnianie formularza?',
'DEVELOPER_MODE' => 'Tryb developerski',
'LBL_LDAP_BASE_DN'=>'Podstawowy DN:',
'LBL_LDAP_BASE_DN_DESC'=>'Przykład: dc=SugarCRM,dc=com',
);
?>

View File

@@ -0,0 +1,278 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
require_once('include/Sugarpdf/sugarpdf_config.php');
$SugarpdfSettings = array(
"sugarpdf_pdf_title"=>array(
"label"=>$mod_strings["PDF_TITLE"],
"info_label"=>$mod_strings["PDF_TITLE_INFO"],
"value"=>PDF_TITLE,
"class"=>"basic",
"type"=>"text",
),
"sugarpdf_pdf_subject"=>array(
"label"=>$mod_strings["PDF_SUBJECT"],
"info_label"=>$mod_strings["PDF_SUBJECT_INFO"],
"value"=>PDF_SUBJECT,
"class"=>"basic",
"type"=>"text",
),
/* "sugarpdf_pdf_creator"=>array(
"label"=>$mod_strings["PDF_CREATOR"],
"info_label"=>$mod_strings["PDF_CREATOR_INFO"],
"value"=>PDF_CREATOR,
"class"=>"basic",
"type"=>"text",
"required"=>"true"
),*/
"sugarpdf_pdf_author"=>array(
"label"=>$mod_strings["PDF_AUTHOR"],
"info_label"=>$mod_strings["PDF_AUTHOR_INFO"],
"value"=>PDF_AUTHOR,
"class"=>"basic",
"type"=>"text",
"required"=>"true"
),
"sugarpdf_pdf_keywords"=>array(
"label"=>$mod_strings["PDF_KEYWORDS"],
"info_label"=>$mod_strings["PDF_KEYWORDS_INFO"],
"value"=>PDF_KEYWORDS,
"class"=>"basic",
"type"=>"text"
),
/*
"sugarpdf_pdf_header_title"=>array(
"label"=>$mod_strings["PDF_HEADER_TITLE"],
"info_label"=>$mod_strings["PDF_HEADER_TITLE_INFO"],
"value"=>PDF_HEADER_TITLE,
"class"=>"basic",
"type"=>"text",
),
"sugarpdf_pdf_header_string"=>array(
"label"=>$mod_strings["PDF_HEADER_STRING"],
"info_label"=>$mod_strings["PDF_HEADER_STRING_INFO"],
"value"=>PDF_HEADER_STRING,
"class"=>"basic",
"type"=>"text",
),
*/
"sugarpdf_pdf_header_logo"=>array(
"label"=>$mod_strings["PDF_HEADER_LOGO"],
"info_label"=>$mod_strings["PDF_HEADER_LOGO_INFO"],
"value"=>PDF_HEADER_LOGO,
"path"=>K_PATH_CUSTOM_IMAGES.PDF_HEADER_LOGO,
"class"=>"logo",
"type"=>"image",
),
"new_header_logo"=>array(
"label"=>$mod_strings["PDF_NEW_HEADER_LOGO"],
"info_label"=>$mod_strings["PDF_NEW_HEADER_LOGO_INFO"],
"value"=>"",
"class"=>"logo",
"type"=>"file",
),
/*
"sugarpdf_pdf_header_logo_width"=>array(
"label"=>$mod_strings["PDF_HEADER_LOGO_WIDTH"],
"info_label"=>$mod_strings["PDF_HEADER_LOGO_WIDTH_INFO"],
"value"=>PDF_HEADER_LOGO_WIDTH,
"class"=>"logo",
"type"=>"number",
"required"=>"true",
"unit"=>PDF_UNIT
),
*/
"sugarpdf_pdf_small_header_logo"=>array(
"label"=>$mod_strings["PDF_SMALL_HEADER_LOGO"],
"info_label"=>$mod_strings["PDF_SMALL_HEADER_LOGO_INFO"],
"value"=>PDF_SMALL_HEADER_LOGO,
"path"=>K_PATH_CUSTOM_IMAGES.PDF_SMALL_HEADER_LOGO,
"class"=>"logo",
"type"=>"image",
),
"new_small_header_logo"=>array(
"label"=>$mod_strings["PDF_NEW_SMALL_HEADER_LOGO"],
"info_label"=>$mod_strings["PDF_NEW_SMALL_HEADER_LOGO_INFO"],
"value"=>"",
"class"=>"logo",
"type"=>"file",
),
/*
"sugarpdf_pdf_small_header_logo_width"=>array(
"label"=>$mod_strings["PDF_SMALL_HEADER_LOGO_WIDTH"],
"info_label"=>$mod_strings["PDF_SMALL_HEADER_LOGO_WIDTH_INFO"],
"value"=>PDF_SMALL_HEADER_LOGO_WIDTH,
"class"=>"logo",
"type"=>"number",
"required"=>"true",
"unit"=>PDF_UNIT
),
*/
"sugarpdf_pdf_filename"=>array(
"label"=>$mod_strings["PDF_FILENAME"],
"info_label"=>$mod_strings["PDF_FILENAME_INFO"],
"value"=>PDF_FILENAME,
"class"=>"advanced",
"type"=>"text",
"required"=>"true"
),
"sugarpdf_pdf_compression"=>array(
"label"=>$mod_strings["PDF_COMPRESSION"],
"info_label"=>$mod_strings["PDF_COMPRESSION_INFO"],
"value"=>PDF_COMPRESSION,
"class"=>"advanced",
"type"=>"bool",
),
"sugarpdf_pdf_jpeg_quality"=>array(
"label"=>$mod_strings["PDF_JPEG_QUALITY"],
"info_label"=>$mod_strings["PDF_JPEG_QUALITY_INFO"],
"value"=>PDF_JPEG_QUALITY,
"class"=>"advanced",
"type"=>"percent",
"required"=>"true"
),
"sugarpdf_pdf_pdf_version"=>array(
"label"=>$mod_strings["PDF_PDF_VERSION"],
"info_label"=>$mod_strings["PDF_PDF_VERSION_INFO"],
"value"=>PDF_PDF_VERSION,
"class"=>"advanced",
"type"=>"number",
"required"=>"true"
),
"sugarpdf_pdf_protection"=>array(
"label"=>$mod_strings["PDF_PROTECTION"],
"info_label"=>$mod_strings["PDF_PROTECTION_INFO"],
"value"=>explode(",",PDF_PROTECTION),
"class"=>"advanced",
"type"=>"multiselect",
"selectList"=>array("print"=>"Print", "modify"=>"Modify", "copy"=>"Copy", "annot-forms"=>"Annotations and forms"),
),
"sugarpdf_pdf_user_password"=>array(
"label"=>$mod_strings["PDF_USER_PASSWORD"],
"info_label"=>$mod_strings["PDF_USER_PASSWORD_INFO"],
"value"=>blowfishDecode(blowfishGetKey('sugarpdf_pdf_user_password'), PDF_USER_PASSWORD),
"class"=>"advanced",
"type"=>"password"
),
"sugarpdf_pdf_owner_password"=>array(
"label"=>$mod_strings["PDF_OWNER_PASSWORD"],
"info_label"=>$mod_strings["PDF_OWNER_PASSWORD_INFO"],
"value"=>blowfishDecode(blowfishGetKey('sugarpdf_pdf_owner_password'), PDF_OWNER_PASSWORD),
"class"=>"advanced",
"type"=>"password"
),
"sugarpdf_pdf_acl_access"=>array(
"label"=>$mod_strings["PDF_ACL_ACCESS"],
"info_label"=>$mod_strings["PDF_ACL_ACCESS_INFO"],
"value"=>PDF_ACL_ACCESS,
"class"=>"advanced",
"type"=>"select",
"selectList"=>array("edit"=>"Edition","list"=>"List","detail"=>"Detail", "export"=>"Export"),
"required"=>"true"
),
/* "sugarpdf_head_magnification"=>array(
"label"=>$mod_strings["HEAD_MAGNIFICATION"],
"info_label"=>$mod_strings["HEAD_MAGNIFICATION_INFO"],
"value"=>HEAD_MAGNIFICATION,
"class"=>"advanced",
"type"=>"number",
"required"=>"true"
),*/
/* "sugarpdf_k_title_magnification"=>array(
"label"=>$mod_strings["K_TITLE_MAGNIFICATION"],
"info_label"=>$mod_strings["K_TITLE_MAGNIFICATION_INFO"],
"value"=>K_TITLE_MAGNIFICATION,
"class"=>"advanced",
"type"=>"number",
"required"=>"true"
),*/
"sugarpdf_k_small_ratio"=>array(
"label"=>$mod_strings["K_SMALL_RATIO"],
"info_label"=>$mod_strings["K_SMALL_RATIO_INFO"],
"value"=>K_SMALL_RATIO,
"class"=>"advanced",
"type"=>"number",
"required"=>"true"
),
"sugarpdf_k_cell_height_ratio"=>array(
"label"=>$mod_strings["K_CELL_HEIGHT_RATIO"],
"info_label"=>$mod_strings["K_CELL_HEIGHT_RATIO_INFO"],
"value"=>K_CELL_HEIGHT_RATIO,
"class"=>"advanced",
"type"=>"number",
"required"=>"true"
),
"sugarpdf_pdf_image_scale_ratio"=>array(
"label"=>$mod_strings["PDF_IMAGE_SCALE_RATIO"],
"info_label"=>$mod_strings["PDF_IMAGE_SCALE_RATIO_INFO"],
"value"=>PDF_IMAGE_SCALE_RATIO,
"class"=>"advanced",
"type"=>"number",
"required"=>"true"
),
"sugarpdf_pdf_unit"=>array(
"label"=>$mod_strings["PDF_UNIT"],
"info_label"=>$mod_strings["PDF_UNIT_INFO"],
"value"=>PDF_UNIT,
"class"=>"advanced",
"type"=>"select",
//TODO translate
"selectList"=>array("mm"=>"Millimeter", "pt"=>"Point", "cm"=>"Centimeter", "in"=>"Inch"),
"required"=>"true"
),
);
// Use the OOB directory for images if there is no image in the custom directory
$small_logo = $SugarpdfSettings['sugarpdf_pdf_small_header_logo']['path'];
$logo = $SugarpdfSettings['sugarpdf_pdf_header_logo']['path'];
if (@getimagesize($logo) === FALSE) {
$SugarpdfSettings['sugarpdf_pdf_header_logo']['path'] = K_PATH_IMAGES.$SugarpdfSettings['sugarpdf_pdf_header_logo']['value'];
}
if (@getimagesize($small_logo) === FALSE) {
$SugarpdfSettings['sugarpdf_pdf_small_header_logo']['path'] = K_PATH_IMAGES.$SugarpdfSettings['sugarpdf_pdf_small_header_logo']['value'];
}
?>

View File

@@ -0,0 +1,107 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
require_once('include/MVC/View/SugarView.php');
class ConfiguratorViewAddFontResult extends SugarView {
var $log="";
/**
* Constructor
*/
public function AddFontResult(){
parent::SugarView();
}
/**
* display the form
*/
public function display(){
global $mod_strings, $app_list_strings, $app_strings, $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$error = $this->addFont();
$this->ss->assign("MODULE_TITLE",
get_module_title(
$mod_strings['LBL_MODULE_ID'],
$mod_strings['LBL_ADDFONTRESULT_TITLE'],
false
)
);
if($error){
$this->ss->assign("error", $this->log);
}else{
$this->ss->assign("info", $this->log);
}
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
//display
$this->ss->display('modules/Configurator/tpls/addFontResult.tpl');
}
/**
* This method prepares the received data and call the addFont method of the fontManager
* @return boolean true on success
*/
private function addFont(){
$this->log="";
$error=false;
require_once('include/upload_file.php');
$files = array("pdf_metric_file","pdf_font_file");
foreach($files as $k){
// handle uploaded file
$uploadFile = new UploadFile($k);
if (isset($_FILES[$k]) && $uploadFile->confirm_upload()){
$uploadFile->final_move(basename($_FILES[$k]['name']));
$uploadFileNames[$k] = $uploadFile->get_upload_path(basename($_FILES[$k]['name']));
}else{
$this->log = translate('ERR_PDF_NO_UPLOAD', "Configurator");
$error=true;
}
}
if(!$error){
require_once('include/Sugarpdf/FontManager.php');
$fontManager = new FontManager();
$error = $fontManager->addFont($uploadFileNames["pdf_font_file"],$uploadFileNames["pdf_metric_file"], $_REQUEST['pdf_embedded'], $_REQUEST['pdf_encoding_table'], eval($_REQUEST['pdf_patch']), htmlspecialchars_decode($_REQUEST['pdf_cidinfo'],ENT_QUOTES), $_REQUEST['pdf_style_list']);
$this->log .= $fontManager->log;
if($error){
$this->log .= implode("\n",$fontManager->errors);
}
}
return $error;
}
}

View File

@@ -0,0 +1,85 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
require_once('include/MVC/View/SugarView.php');
require_once('include/Sugarpdf/FontManager.php');
class ConfiguratorViewAddFontView extends SugarView {
/**
* Constructor
*/
public function AddFontView(){
parent::SugarView();
}
/**
* display the form
*/
public function display(){
global $mod_strings, $app_list_strings, $app_strings, $current_user;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$this->ss->assign("MODULE_TITLE",
get_module_title(
$mod_strings['LBL_MODULE_ID'],
$mod_strings['LBL_ADDFONT_TITLE'],
true
)
);
if(!empty($_REQUEST['error'])){
$this->ss->assign("error", $_REQUEST['error']);
}
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
if(isset($_REQUEST['return_action'])){
$this->ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
}else{
$this->ss->assign("RETURN_ACTION", 'FontManager');
}
$this->ss->assign("STYLE_LIST", array(
"regular"=>$mod_strings["LBL_FONT_REGULAR"],
"italic"=>$mod_strings["LBL_FONT_ITALIC"],
"bold"=>$mod_strings["LBL_FONT_BOLD"],
"boldItalic"=>$mod_strings["LBL_FONT_BOLDITALIC"]
));
$this->ss->assign("ENCODING_TABLE", array_combine(explode(",",PDF_ENCODING_TABLE_LIST), explode(",",PDF_ENCODING_TABLE_LABEL_LIST)));
//display
$this->ss->display('modules/Configurator/tpls/addFontView.tpl');
}
}

View File

@@ -0,0 +1,122 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
/*********************************************************************************
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/MVC/View/SugarView.php');
require_once('modules/Configurator/Forms.php');
require_once('modules/Administration/Forms.php');
require_once('modules/Configurator/Configurator.php');
class ViewAdminwizard extends SugarView
{
public function __construct()
{
parent::SugarView();
$this->options['show_header'] = false;
$this->options['show_footer'] = false;
$this->options['show_javascript'] = false;
}
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_list_strings, $sugar_config, $locale, $sugar_version;
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$themeObject = SugarThemeRegistry::current();
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = new Administration();
$focus->retrieveSettings();
$ut = $GLOBALS['current_user']->getPreference('ut');
if(empty($ut))
$this->ss->assign('SKIP_URL','index.php?module=Users&action=Wizard&skipwelcome=1');
else
$this->ss->assign('SKIP_URL','index.php?module=Home&action=index');
// Always mark that we have got past this point
$focus->saveSetting('system','adminwizard',1);
$css = $themeObject->getCSS();
$favicon = $themeObject->getImageURL('sugar_icon.ico',false);
$this->ss->assign('FAVICON_URL',getJSPath($favicon));
$this->ss->assign('SUGAR_CSS', $css);
$this->ss->assign('MOD_USERS',return_module_language($GLOBALS['current_language'], 'Users'));
$this->ss->assign('CSS', '<link rel="stylesheet" type="text/css" href="'.SugarThemeRegistry::current()->getCSSURL('wizard.css').'" />');
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign('config', $sugar_config);
$this->ss->assign('SUGAR_VERSION', $sugar_version);
$this->ss->assign('settings', $focus->settings);
$this->ss->assign('exportCharsets', get_select_options_with_id($locale->getCharsetSelect(), $sugar_config['default_export_charset']));
$this->ss->assign('getNameJs', $locale->getNameJs());
$this->ss->assign('JAVASCRIPT',get_set_focus_js(). get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
$this->ss->assign('mail_smtptype', $focus->settings['mail_smtptype']);
$this->ss->assign('mail_smtpserver', $focus->settings['mail_smtpserver']);
$this->ss->assign('mail_smtpport', $focus->settings['mail_smtpport']);
$this->ss->assign('mail_smtpuser', $focus->settings['mail_smtpuser']);
$this->ss->assign('mail_smtppass', $focus->settings['mail_smtppass']);
$this->ss->assign('mail_smtpauth_req', ($focus->settings['mail_smtpauth_req']) ? "checked='checked'" : '');
$this->ss->assign('MAIL_SSL_OPTIONS', get_select_options_with_id($app_list_strings['email_settings_for_ssl'], $focus->settings['mail_smtpssl']));
$this->ss->assign('notify_allow_default_outbound_on', (!empty($focus->settings['notify_allow_default_outbound']) && $focus->settings['notify_allow_default_outbound'] == 2) ? 'CHECKED' : '');
$this->ss->assign('THEME', SugarThemeRegistry::current()->__toString());
// get javascript
ob_start();
$this->options['show_javascript'] = true;
$this->renderJavascript();
$this->options['show_javascript'] = false;
$this->ss->assign("SUGAR_JS",ob_get_contents().$themeObject->getJS());
ob_end_clean();
$this->ss->assign('START_PAGE', !empty($_REQUEST['page']) ? $_REQUEST['page'] : 'welcome');
$this->ss->display('modules/Configurator/tpls/adminwizard.tpl');
}
}

View File

@@ -0,0 +1,137 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
/*********************************************************************************
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('include/MVC/View/views/view.edit.php');
require_once('modules/Configurator/Forms.php');
require_once('modules/Administration/Forms.php');
require_once('modules/Configurator/Configurator.php');
require_once('include/SugarLogger/SugarLogger.php');
class ConfiguratorViewEdit extends ViewEdit
{
/**
* @see SugarView::preDisplay()
*/
public function preDisplay()
{
if(!is_admin($GLOBALS['current_user']))
sugar_die('Admin Only');
}
/**
* @see SugarView::_getModuleTitleParams()
*/
protected function _getModuleTitleParams()
{
global $mod_strings;
return array(
"<a href='index.php?module=Administration&action=index'>".translate('LBL_MODULE_NAME','Administration')."</a>",
$mod_strings['LBL_SYSTEM_SETTINGS']
);
}
/**
* @see SugarView::display()
*/
public function display()
{
global $current_user, $mod_strings, $app_strings, $app_list_strings, $sugar_config, $locale;
$configurator = new Configurator();
$sugarConfig = SugarConfig::getInstance();
$focus = new Administration();
$configurator->parseLoggerSettings();
$focus->retrieveSettings();
if(!empty($_POST['restore'])){
$configurator->restoreConfig();
}
$this->ss->assign('MOD', $mod_strings);
$this->ss->assign('APP', $app_strings);
$this->ss->assign('APP_LIST', $app_list_strings);
$this->ss->assign('config', $configurator->config);
$this->ss->assign('error', $configurator->errors);
$this->ss->assign('THEMES', SugarThemeRegistry::availableThemes());
$this->ss->assign('LANGUAGES', get_languages());
$this->ss->assign("JAVASCRIPT",get_set_focus_js(). get_configsettings_js());
$this->ss->assign('company_logo', SugarThemeRegistry::current()->getImageURL('company_logo.png'));
$this->ss->assign("settings", $focus->settings);
$this->ss->assign("mail_sendtype_options", get_select_options_with_id($app_list_strings['notifymail_sendtype'], $focus->settings['mail_sendtype']));
if(!empty($focus->settings['proxy_on'])){
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'inline');
}else{
$this->ss->assign("PROXY_CONFIG_DISPLAY", 'none');
}
if(!empty($focus->settings['proxy_auth'])){
$this->ss->assign("PROXY_AUTH_DISPLAY", 'inline');
}else{
$this->ss->assign("PROXY_AUTH_DISPLAY", 'none');
}
if (!empty($configurator->config['logger']['level'])) {
$this->ss->assign('log_levels', get_select_options_with_id( LoggerManager::getLoggerLevels(), $configurator->config['logger']['level']));
} else {
$this->ss->assign('log_levels', get_select_options_with_id( LoggerManager::getLoggerLevels(), ''));
}
if (!empty($configurator->config['logger']['file']['suffix'])) {
$this->ss->assign('filename_suffix', get_select_options_with_id( SugarLogger::$filename_suffix,$configurator->config['logger']['file']['suffix']));
} else {
$this->ss->assign('filename_suffix', get_select_options_with_id( SugarLogger::$filename_suffix,''));
}
echo $this->getModuleTitle();
$this->ss->display('modules/Configurator/tpls/EditView.tpl');
$javascript = new javascript();
$javascript->setFormName("ConfigureSettings");
$javascript->addFieldGeneric("notify_fromaddress", "email", $mod_strings['LBL_NOTIFY_FROMADDRESS'], TRUE, "");
$javascript->addFieldGeneric("notify_subject", "varchar", $mod_strings['LBL_NOTIFY_SUBJECT'], TRUE, "");
$javascript->addFieldGeneric("proxy_host", "varchar", $mod_strings['LBL_PROXY_HOST'], TRUE, "");
$javascript->addFieldGeneric("proxy_port", "int", $mod_strings['LBL_PROXY_PORT'], TRUE, "");
$javascript->addFieldGeneric("proxy_password", "varchar", $mod_strings['LBL_PROXY_PASSWORD'], TRUE, "");
$javascript->addFieldGeneric("proxy_username", "varchar", $mod_strings['LBL_PROXY_USERNAME'], TRUE, "");
echo $javascript->getScript();
}
}

View File

@@ -0,0 +1,244 @@
<?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-2010 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU Affero 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 Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero 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 Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero 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".
********************************************************************************/
require_once('include/Sugarpdf/sugarpdf_config.php');
require_once('include/MVC/View/SugarView.php');
require_once('include/Sugarpdf/FontManager.php');
class ConfiguratorViewFontManager extends SugarView {
/**
* Constructor
*/
public function FontManager(){
parent::SugarView();
}
/**
* display the form
*/
public function display(){
global $mod_strings, $app_list_strings, $app_strings, $current_user;
$error="";
if(!is_admin($current_user)){
sugar_die('Admin Only');
}
$fontManager = new FontManager();
if(!$fontManager->listFontFiles()){
$error = implode("<br>",$fontManager->errors);
}
$this->ss->assign("MODULE_TITLE",
get_module_title(
$mod_strings['LBL_MODULE_ID'],
$mod_strings['LBL_FONTMANAGER_TITLE'],
false
)
);
if(!empty($_REQUEST['error'])){
$error .= "<br>".$_REQUEST['error'];
}
$this->ss->assign("error", $error);
$this->ss->assign("MOD", $mod_strings);
$this->ss->assign("APP", $app_strings);
$this->ss->assign("JAVASCRIPT", $this->_getJS());
if(isset($_REQUEST['return_action'])){
$this->ss->assign("RETURN_ACTION", $_REQUEST['return_action']);
}else{
$this->ss->assign("RETURN_ACTION", 'SugarpdfSettings');
}
$this->ss->assign("K_PATH_FONTS", K_PATH_FONTS);
// YUI List
$this->ss->assign("COLUMNDEFS", $this->getYuiColumnDefs($fontManager->fontList));
$this->ss->assign("DATASOURCE", $this->getYuiDataSource($fontManager->fontList));
$this->ss->assign("RESPONSESCHEMA", $this->getYuiResponseSchema());
//display
$this->ss->display('modules/Configurator/tpls/fontmanager.tpl');
}
/**
* Returns JS used in this view
*/
private function _getJS()
{
global $mod_strings;
return <<<EOJAVASCRIPT
EOJAVASCRIPT;
}
/**
* Return the columnDefs for the YUI datatable
* @return String
*/
private function getYuiColumnDefs($fontList){
global $mod_strings;
// Do not show the column with the delete buttons if there is only core fonts
$removeColumn = '{key:"button", label:"", formatter:removeFormatter}';
if($this->isAllOOBFont($fontList))
$removeColumn = '';
$return = <<<BSOFR
[
{key:"name", minWidth:140, label:"{$mod_strings['LBL_FONT_LIST_NAME']}", sortable:true},
{key:"filename", minWidth:120, label:"{$mod_strings['LBL_FONT_LIST_FILENAME']}", sortable:true},
{key:"type", minWidth:100, label:"{$mod_strings['LBL_FONT_LIST_TYPE']}", sortable:true},
{key:"style", minWidth:90, label:"{$mod_strings['LBL_FONT_LIST_STYLE']}", sortable:true},
{key:"filesize", minWidth:70, label:"{$mod_strings['LBL_FONT_LIST_FILESIZE']}", formatter:YAHOO.widget.DataTable.formatNumber, sortable:true},
{key:"enc", minWidth:80, label:"{$mod_strings['LBL_FONT_LIST_ENC']}", sortable:true},
{key:"embedded", minWidth:70, label:"{$mod_strings['LBL_FONT_LIST_EMBEDDED']}", sortable:true},
$removeColumn
]
BSOFR;
return $return;
}
/**
* Return the dataSource for the YUI Data Table
* @param $fontList
* @return String
*/
private function getYuiDataSource($fontList){
$return = "[";
$first=true;
foreach($fontList as $k=>$v){
if($first){
$first=false;
}else{
$return .= ',';
}
$return .= '{';
if(!empty($v['displayname'])){
$return .= 'name:"'.$v['displayname'].'"';
}else if(!empty($v['name'])){
$return .= 'name:"'.$v['name'].'"';
}
$return .= ', filename:"'.$v['filename'].'"';
$return .= ', fontpath:"'.$v['fontpath'].'"';
$return .= ', style:"'.$this->formatStyle($v['style']).'"';
$return .= ', type:"'.$this->formatType($v['type']).'"';
$return .= ', filesize:'.$v['filesize'];
if(!empty($v['enc'])){
$return .= ', enc:"'.$v['enc'].'"';
}
if($v['embedded'] == true){
$return .= ', embedded:"<input type=\'checkbox\' checked disabled/>"}';
}else{
$return .= ', embedded:"<input type=\'checkbox\' disabled/>"}';
}
}
$return .= "]";
return $return;
}
/**
* Return the Response Schema for the YUI data table
* @return String
*/
private function getYuiResponseSchema(){
return <<<BSOFR
{
fields: [{key:"name", parser:"string"},
{key:"filename", parser:"string"},
{key:"fontpath", parser:"string"},
{key:"type", parser:"string"},
{key:"style", parser:"string"},
{key:"filesize", parser:"number"},
{key:"enc", parser:"string"},
{key:"embedded", parser:"string"}]
}
BSOFR;
}
/**
* Return the label of the passed style
* @param $style
* @return String
*/
private function formatStyle($style){
global $mod_strings;
$return = "";
if(count($style) == 2){
$return .= "<b><i>".$mod_strings['LBL_FONT_BOLDITALIC']."</b></i>";
}else{
switch($style[0]){
case "bold":
$return .= "<b>".$mod_strings['LBL_FONT_BOLD']."</b>";
break;
case "italic":
$return .= "<i>".$mod_strings['LBL_FONT_ITALIC']."</i>";
break;
default:
$return .= $mod_strings['LBL_FONT_REGULAR'];
}
}
return $return;
}
private function formatType($type){
global $mod_strings;
switch($type){
case "cidfont0":
$return = $mod_strings['LBL_FONT_TYPE_CID0'];break;
case "core":
$return = $mod_strings['LBL_FONT_TYPE_CORE'];break;
case "TrueType":
$return = $mod_strings['LBL_FONT_TYPE_TRUETYPE'];break;
case "Type1":
$return = $mod_strings['LBL_FONT_TYPE_TYPE1'];break;
case "TrueTypeUnicode":
$return = $mod_strings['LBL_FONT_TYPE_TRUETYPEU'];break;
default:
$return = "";
}
return $return;
}
/**
* Determine if all the fonts are core fonts
* @param $fontList
* @return boolean return true if all the fonts are core type
*/
private function isAllOOBFont($fontList){
foreach($fontList as $v){
if($v['type'] != "core" && $v['fontpath'] != K_PATH_FONTS)
return false;
}
return true;
}
}