/** * Smarty {sugar_include} function plugin * * Type: function<br> * Name: sugar_include<br> * Purpose: Handles rendering the global file includes from the metadata files defined * in templateMeta=>includes. * * @author Collin Lee {clee@sugarcrm.com} * @param array * @param Smarty */ function smarty_function_sugar_getwebpath($params, &$smarty) { if (!isset($params['file'])) { $smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file'); } return getWebPath($params['file']); }
/** * Initialize the skin. * * @param ETController $sender The page controller. * @return void */ public function handler_init($sender) { $sender->addCSSFile((C("esoTalk.https") ? "https" : "http") . "://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"); $sender->addCSSFile("core/skin/base.css", true); $sender->addCSSFile($this->getResource("styles.css"), true); // If we're viewing from a mobile browser, add the mobile CSS and change the master view. if ($isMobile = isMobileBrowser()) { $sender->addCSSFile($this->getResource("mobile.css"), true); $sender->masterView = "mobile.master"; $sender->addToHead("<meta name='viewport' content='width=device-width; initial-scale=1.0; maximum-scale=1.0;'>"); } // If custom colors have been set in this skin's settings, add some CSS to the page. $styles = array(); // If a custom header color has been set... if ($c = C("skin.Default.headerColor")) { $styles[] = "#hdr {background-color:{$c}}"; // If the header color is in the top half of the lightness spectrum, add the "lightHdr" class to the body. $rgb = colorUnpack($c, true); $hsl = rgb2hsl($rgb); if ($hsl[2] >= 0.5) { $sender->bodyClass .= " lightHdr"; } } // If a custom body color has been set... if ($c = C("skin.Default.bodyColor")) { $styles[] = "body, .scrubberMore {background-color:{$c} !important}"; // If the body color is in the bottom half of the lightness spectrum, add the "darkBody" class to the body. $rgb = colorUnpack($c, true); $hsl = rgb2hsl($rgb); if ($hsl[2] < 0.5) { $sender->bodyClass .= " darkBody"; } // Slightly darken the body color and set it as the border color for the body content area. $hsl[2] = max(0, $hsl[2] - 0.1); $hsl[1] = min($hsl[1], 0.5); $b = colorPack(hsl2rgb($hsl), true); $styles[] = "#body-content {border-color:{$b}}"; } // If a custom body background image has been set... if ($img = C("skin.Default.bodyImage") and !$isMobile) { $styles[] = "body {background-image:url(" . getWebPath($img) . "); background-position:top center; background-attachment:fixed}"; } // Do we want this background image to not repeat? if ($img and C("skin.Default.noRepeat")) { $styles[] = "body {background-repeat:no-repeat}"; } // If we have any custom styles at all, add them to the page head. if (count($styles)) { $sender->addToHead("<style type='text/css'>\n" . implode("\n", $styles) . "\n</style>"); } }
/** * Initialize the skin. * * @param ETController $sender The page controller. * @return void */ public function handler_init($sender) { $sender->addToHead("<link rel='shortcut icon' href='" . getWebPath($this->resource("favicon.ico")) . "'>"); $sender->addCSSFile((C("esoTalk.https") ? "https" : "http") . "://fonts.googleapis.com/css?family=Open+Sans:400,600|Roboto|TitilliumWeb"); $sender->addCSSFile("core/skin/base.css", true); $sender->addCSSFile("core/skin/font-awesome.css", true); $sender->addCSSFile($this->resource("styles.css"), true); // If we're viewing from a mobile browser, add the mobile CSS and change the master view. if ($isMobile = isMobileBrowser()) { $sender->addCSSFile($this->resource("mobile.css"), true); $sender->masterView = "mobile.master"; $sender->addToHead("<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0'>"); } $sender->addCSSFile("config/colors.css", true); if (!C("skin.Doragon.primaryColor")) { $this->writeColors("#364159"); } }
/** * Smarty plugin * * @package Smarty * @subpackage PluginsFunction * @author Bismay Kumar Mohaptra */ function smarty_function_logikscripts($params) { include_once ROOT . API_FOLDER . "scripts.php"; $s = ""; $bg = getConfig("PAGE_BACKGROUND"); if (strlen($bg) > 0) { if (substr($bg, 0, 7) == "http://" || substr($bg, 0, 8) == "https://") { $s = "background: url({$bg}) repeat;"; $s = "body { {$s} }"; } elseif (file_exists($bg)) { $bg = getWebPath($bg); $s = "background: url({$bg}) repeat;"; $s = "body { {$s} }"; } else { $s = "background: url(" . loadMedia($bg) . ") repeat;"; $s = "body { {$s} }"; } } if (strlen($s) > 0) { $s = "<style>{$s}</style>"; } echo $s; }
</span></li> <li class='sep'></li> <li><a href='<?php echo URL("admin/languages/uninstall/{$k}?token=" . ET::$session->token); ?> '><?php echo T("Uninstall"); ?> </a></li> </ul> <?php if (file_exists(PATH_LANGUAGES . "/{$k}/icon.png")) { ?> <img src='<?php echo getWebPath(PATH_LANGUAGES . "/{$k}/icon.png"); ?> ' alt=''/><?php } ?> <strong><?php echo $language["name"]; ?> </strong> <small class='version'><?php echo $language["version"]; ?> </small> <small class='description'><?php echo $language["description"]; ?>
/** * Construct a URL, given a request path. * * Constructs a relative or absolute URL which can be used to link * to a page in esoTalk, according to the format specified by C("esoTalk.urls"). * * @param string $url The request path (eg. conversations/all). May include a query string/hash. * @param bool $absolute Whether or not to return an absolute URL. * @return string * * @package esoTalk */ function URL($url = "", $absolute = false) { if (preg_match('/^(https?\\:)?\\/\\//', $url)) { return $url; } // Strip off the hash. $hash = strstr($url, "#"); if ($hash) { $url = substr($url, 0, -strlen($hash)); } // Strip off the query string. $query = strstr($url, "?"); if ($query) { $url = substr($url, 0, -strlen($query)); } // If we don't have nice urls, use ?p=controller/method/argument instead. if (!C("esoTalk.urls.friendly") and $url) { $link = "?p=" . $url; if ($query) { $query[0] = "&"; } } else { $link = $url; } // Re-add the query string and has to the URL. $link .= $query . $hash; // If we're not using mod_rewrite, we need to prepend "index.php/" to the link. if (C("esoTalk.urls.friendly") and !C("esoTalk.urls.rewrite")) { $link = "index.php/{$link}"; } return $absolute ? rtrim(C("esoTalk.baseURL"), "/") . "/" . $link : getWebPath($link); }
/** * Return a HTML element to display a member's avatar. * * @param array $member An array of the member's details. (memberId and avatarFormat are required in this implementation.) * @param string $className CSS class names to apply to the avatar. * * @package esoTalk */ function avatar($member = array(), $className = "") { // Construct the avatar path from the provided information. if (!empty($member["memberId"]) and !empty($member["avatarFormat"])) { $file = "uploads/avatars/{$member["memberId"]}.{$member["avatarFormat"]}"; $url = getWebPath($file); return "<img src='{$url}' alt='' class='avatar {$className}'/>"; } // Default to an avatar with the first letter of the member's name. return "<span class='avatar {$className}'>" . (!empty($member["username"]) ? strtoupper($member["username"][0]) : " ") . "</span>"; }
* * 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. * * 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. * * Contributor(s): www.synolia.com - sugar@synolia.com * You can contact SYNOLIA at 51 avenue Jean Jaures 69007 - LYON FRANCE * or at email address contact@synolia.com. ********************************************************************************/ if (!defined('sugarEntry') || !sugarEntry) { die('Not A Valid Entry Point'); } $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/soap/hoovers/images/hooversLogo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'Hoovers© fournit des données à jour gratuitement sur les sociétés pour les utilisateurs des produits SugarCRM. Pour avoir plus d\'information et de rapports sur les sociétés, et autres établissements aller sur <a href="http://www.hoovers.com" target="_blank">http://www.hoovers.com</a>.</td></tr></table>', 'LBL_SEARCH_FIELDS_INFO' => 'Les champs supportés par l'API Hoovers sont : Nom de la société, Ville, Etat, Pays et Code postal.', 'LBL_ID' => 'ID', 'LBL_NAME' => 'Nom de la société', 'LBL_DUNS' => 'DUNS', 'LBL_PARENT_DUNS' => 'DUNS Parent', 'LBL_STREET' => 'Adresse', 'LBL_ADDRESS_STREET1' => 'Adresse Rue 1', 'LBL_ADDRESS_STREET2' => 'Adresse Rue 2', 'LBL_CITY' => 'Ville', 'LBL_STATE' => 'Etat', 'LBL_COUNTRY' => 'Pays', 'LBL_ZIP' => 'Code Postal', 'LBL_FINSALES' => 'CA Annuel', 'LBL_SALES' => 'CA Annuel', 'LBL_HQPHONE' => 'Téléphone', 'LBL_TOTAL_EMPLOYEES' => 'Nombre Employés', 'LBL_PRIMARY_URL' => 'Site Web', 'LBL_DESCRIPTION' => 'Description', 'LBL_SYNOPSIS' => 'Synopsis', 'LBL_LOCATION_TYPE' => 'Type de localisation', 'LBL_COMPANY_TYPE' => 'Type de société', 'ERROR_NULL_CLIENT' => 'Impossible de créer le client SOAP pour se connecter à Hoovers. Le service doit être indisponible ou votre licence à expiré ou bien vous avez atteint la limite du nombre de requête par jour autorisée.', 'ERROR_MISSING_SOAP_LIBRARIES' => 'Erreur : Impossible de charger la librairie SOAP (SoapClient, SoapHeader).', 'hoovers_endpoint' => 'URL du Web Service', 'hoovers_wsdl' => 'URL de la WSDL', 'hoovers_api_key' => 'Clé API');
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html * By installing or using this file, You have unconditionally agreed to the * terms and conditions of the License, and You may not use this file except in * compliance with the License. Under the terms of the license, You shall not, * among other things: 1) sublicense, resell, rent, lease, redistribute, assign * or otherwise transfer Your rights to the Software, and 2) use the Software * for timesharing or service bureau purposes such as hosting the Software for * commercial gain and/or for the benefit of a third party. Use of the Software * may be subject to applicable fees and any use of the Software without first * paying applicable fees is strictly prohibited. You do not have the right to * remove SugarCRM copyrights from the source code or user interface. * * 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. * * Your Warranty, Limitations of liability and Indemnity are expressly stated * in the License. Please refer to the License for the specific language * governing these rights and limitations under the License. Portions created * by SugarCRM are Copyright (C) 2004-2011 SugarCRM, Inc.; All Rights Reserved. ********************************************************************************/ /********************************************************************************* * Description: Defines the Spanish language pack for the base application. * $Id: es_es.lang.php,v 1.6 2011/02/08 20:36:21 aserrano Exp $ * Source: SugarCRM 6.1.1 * Contributor(s): Alberto Serrano (alb.serrano@gmail.com). ********************************************************************************/ $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/soap/hoovers/images/hooversLogo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'Hoovers© provee información gratuita y actualizada sobre compañías a usuarios de productos SugarCRM. Para obtener una información más completa así como informes sobre compañías, industrias, y ejecutivos vaya a <a href="http://www.hoovers.com" target="_blank">http://www.hoovers.com</a>.</td></tr></table>', 'LBL_ID' => 'ID', 'LBL_NAME' => 'Nombre de Empresa', 'LBL_DUNS' => 'DUNS', 'LBL_PARENT_DUNS' => 'DUNS Padre', 'LBL_STREET' => 'Calle', 'LBL_ADDRESS_STREET1' => 'Calle de Dirección1', 'LBL_ADDRESS_STREET2' => 'Calle de Dirección2', 'LBL_CITY' => 'Ciudad', 'LBL_STATE' => 'Estado/Provincia', 'LBL_COUNTRY' => 'País', 'LBL_ZIP' => 'Código Postal', 'LBL_FINSALES' => 'Volumen de Negocio Anual', 'LBL_HQPHONE' => 'Teléfono de Oficina', 'LBL_TOTAL_EMPLOYEES' => 'Nº de Empleados', 'LBL_PRIMARY_URL' => 'URL Principal', 'LBL_DESCRIPTION' => 'Descripción', 'LBL_SYNOPSIS' => 'Sinopsis', 'LBL_LOCATION_TYPE' => 'Tipo de Ubicación', 'LBL_COMPANY_TYPE' => 'Tipo de Empresa', 'ERROR_NULL_CLIENT' => 'No ha sido posible crear un SoapClient para conectarse a Hoovers. Es posible que el servicio no esté disponible o que su clave de licencia haya caducado o haya alcanzado el límite de uso diario.', 'ERROR_MISSING_SOAP_LIBRARIES' => 'Error: No ha sido posible cargar las bibliotecas de SOAP (SoapClient, SoapHeader).', 'hoovers_endpoint' => 'URL del punto final', 'hoovers_wsdl' => 'URL WSDL', 'hoovers_api_key' => 'Clave API');
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html * By installing or using this file, You have unconditionally agreed to the * terms and conditions of the License, and You may not use this file except in * compliance with the License. Under the terms of the license, You shall not, * among other things: 1) sublicense, resell, rent, lease, redistribute, assign * or otherwise transfer Your rights to the Software, and 2) use the Software * for timesharing or service bureau purposes such as hosting the Software for * commercial gain and/or for the benefit of a third party. Use of the Software * may be subject to applicable fees and any use of the Software without first * paying applicable fees is strictly prohibited. You do not have the right to * remove SugarCRM copyrights from the source code or user interface. * * 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. * * Your Warranty, Limitations of liability and Indemnity are expressly stated * in the License. Please refer to the License for the specific language * governing these rights and limitations under the License. Portions created * by SugarCRM are Copyright (C) 2004-2010 SugarCRM, Inc.; All Rights Reserved. ********************************************************************************/ /********************************************************************************* * Description: Defines the Spanish language pack for the base application. * $Id: es_es.lang.php,v 1.3 2010/08/03 11:29:12 aserrano Exp $ * Source: SugarCRM 6.0.0 * Contributor(s): Alberto Serrano (alb.serrano@gmail.com). ********************************************************************************/ $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/rest/zoominfocompany/images/zoominfo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'ZoomInfo© provee extensa información sobre 45 millones de gente de negocio en unas 5 millones de compañías. Sepa más. <a target="_blank" href="http://www.zoominfo.com/about">http://www.zoominfo.com/about</a></td></tr></table>', 'LBL_SEARCH_FIELDS_INFO' => 'Los siguientes campos están soportados por el API de Zoominfo© para Compañías: Nombre de Compañía, Ciudad, Estado/Provincia y País.', 'LBL_COMPANY_ID' => 'ID', 'LBL_COMPANY_NAME' => 'Nombre de Compañía', 'LBL_STREET' => 'Calle', 'LBL_CITY' => 'Ciudad', 'LBL_ZIP' => 'Código Postal', 'LBL_STATE' => 'Estado/Provincia', 'LBL_COUNTRY' => 'País', 'LBL_INDUSTRY' => 'Industria', 'LBL_WEBSITE' => 'Sitio Web', 'LBL_DESCRIPTION' => 'Descripción', 'LBL_PHONE' => 'Teléfono', 'LBL_COMPANY_TICKER' => 'Ticker de la Compañía', 'LBL_ZOOMINFO_COMPANY_URL' => 'URL con el Perfil de la Compañía', 'LBL_REVENUE' => 'Volumen de Negocio Anual', 'LBL_EMPLOYEES' => 'Empleados', 'company_search_url' => 'URL de Búsqueda de Compañía', 'company_detail_url' => 'URL de Detalle de Compañía', 'partner_code' => 'Código del API del Partner', 'api_key' => 'CLAVE API', 'ERROR_LBL_CONNECTION_PROBLEM' => 'Error: No ha sido posible realizar la conexión al servidor de Zoominfo - Conector para compañías.');
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html * By installing or using this file, You have unconditionally agreed to the * terms and conditions of the License, and You may not use this file except in * compliance with the License. Under the terms of the license, You shall not, * among other things: 1) sublicense, resell, rent, lease, redistribute, assign * or otherwise transfer Your rights to the Software, and 2) use the Software * for timesharing or service bureau purposes such as hosting the Software for * commercial gain and/or for the benefit of a third party. Use of the Software * may be subject to applicable fees and any use of the Software without first * paying applicable fees is strictly prohibited. You do not have the right to * remove SugarCRM copyrights from the source code or user interface. * * 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. * * Your Warranty, Limitations of liability and Indemnity are expressly stated * in the License. Please refer to the License for the specific language * governing these rights and limitations under the License. Portions created * by SugarCRM are Copyright (C) 2004-2010 SugarCRM, Inc.; All Rights Reserved. ********************************************************************************/ /********************************************************************************* * Description: Defines the Spanish language pack for the base application. * $Id: es_es.lang.php,v 1.3 2010/08/03 11:30:18 aserrano Exp $ * Source: SugarCRM 6.0.0 * Contributor(s): Alberto Serrano (alb.serrano@gmail.com). ********************************************************************************/ $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/rest/zoominfoperson/images/zoominfo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'ZoomInfo© provee extensa información sobre 45 millones de gente de negocio en unas 5 millones de compañías. Sepa más. <a target="_blank" href="http://www.zoominfo.com/about">http://www.zoominfo.com/about</a></td></tr></table>', 'LBL_SEARCH_FIELDS_INFO' => 'Los siguientes campos están soportados por el API de Zoominfo© para Personas: Nombre, Apellido y Dirección de Email.', 'LBL_ID' => 'ID', 'LBL_EMAIL' => 'Dirección de Email', 'LBL_FIRST_NAME' => 'Nombre', 'LBL_LAST_NAME' => 'Apellido', 'LBL_JOB_TITLE' => 'Puesto Laboral', 'LBL_IMAGE_URL' => 'URL de Imagen', 'LBL_SUMMARY_URL' => 'URL de Resumen', 'LBL_COMPANY_NAME' => 'Nombre de Compañía', 'LBL_ZOOMPERSON_URL' => 'URL de Persona Zoominfo', 'LBL_DIRECT_PHONE' => 'Teléfono Directo', 'LBL_COMPANY_PHONE' => 'Teléfono de Compañía', 'LBL_FAX' => 'Fax', 'LBL_CURRENT_JOB_TITLE' => 'Cargo en Trabajo Actual', 'LBL_CURRENT_JOB_START_DATE' => 'Fecha de Inicio del Trabajo Actual', 'LBL_CURRENT_JOB_COMPANY_NAME' => 'Nombre de Compañía del Trabajo Actual', 'LBL_CURRENT_JOB_COMPANY_STREET' => 'Calle de Dirección del Trabajo Actual', 'LBL_CURRENT_JOB_COMPANY_CITY' => 'Ciudad de Dirección del Trabajo Actual', 'LBL_CURRENT_JOB_COMPANY_STATE' => 'Estado/Provincia del Trabajo Actual', 'LBL_CURRENT_JOB_COMPANY_ZIP' => 'CP del Trabajo Actual', 'LBL_CURRENT_JOB_COMPANY_COUNTRY_CODE' => 'Código de País del Trabajo Actual', 'LBL_CURRENT_INDUSTRY' => 'Industria del Trabajo Actual', 'LBL_BIOGRAPHY' => 'Biografía', 'LBL_EDUCATION_SCHOOL' => 'Escuela/Universidad', 'LBL_AFFILIATION_TITLE' => 'Cargo de Trabajo de Afilicación', 'LBL_AFFILIATION_COMPANY_PHONE' => 'Teléfono de Compañía de Afiliación', 'LBL_AFFILIATION_COMPANY_NAME' => 'Nombre de Compañía de Afiliación', 'LBL_AFFILIATION_COMPANY_WEBSITE' => 'Sitio web de Compañía de Afiliación', 'person_search_url' => 'URL de Consulta de Búsqueda de Persona', 'person_detail_url' => 'URL de Consulta de Detalle de Persona', 'partner_code' => 'Código del API del Partner', 'api_key' => 'Clave API', 'ERROR_LBL_CONNECTION_PROBLEM' => 'Error: No ha sido posible realizar la conexión al servidor de Zoominfo - Conector para Personas.');
* may be subject to applicable fees and any use of the Software without first * paying applicable fees is strictly prohibited. You do not have the right to * remove SugarCRM copyrights from the source code or user interface. * * 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. * * Your Warranty, Limitations of liability and Indemnity are expressly stated * in the License. Please refer to the License for the specific language * governing these rights and limitations under the License. Portions created * by SugarCRM are Copyright (C) 2004-2009 SugarCRM, Inc.; All Rights Reserved. ********************************************************************************/ /********************************************************************************* * Description: Defines the English language pack for the base application. * Portions created by SugarCRM are Copyright (C) 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): ______________________________________.. ********************************************************************************/ $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/rest/zoominfoperson/images/zoominfo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'ZoomInfo© dostarcza sporo informacji o ponad 45 milionach zatrudnionych w ponad 5 milionach przedsiębiorstw. Zobacz więcej na <a target="_blank" href="http://www.zoominfo.com/about">http://www.zoominfo.com/about</a></td></tr></table>', 'LBL_SEARCH_FIELDS_INFO' => 'Następujące pola są wspierane przez Zoominfo© Osoba; API: Imię, Nazwisko i adres email.', 'LBL_ID' => 'ID', 'LBL_EMAIL' => 'Adres email', 'LBL_FIRST_NAME' => 'Imię', 'LBL_LAST_NAME' => 'Nazwisko', 'LBL_JOB_TITLE' => 'Stanowisko', 'LBL_IMAGE_URL' => 'Adres URL zdjęcia', 'LBL_SUMMARY_URL' => 'Adres URL podsumowania', 'LBL_COMPANY_NAME' => 'Nazwa firmy', 'url' => 'Adres URL', 'api_key' => 'Klucz API', 'ERROR_LBL_CONNECTION_PROBLEM' => 'Błąd: Nie można połączyć się z serwerem Zoominfo - Company connector.');
$captcha_privatekey = ""; $captcha_publickey = ""; $captcha_js = ""; $Captcha = ""; if (isset($admin->settings['captcha_on']) && $admin->settings['captcha_on'] == '1' && !empty($admin->settings['captcha_private_key']) && !empty($admin->settings['captcha_public_key'])) { $add_captcha = 1; $captcha_privatekey = $admin->settings['captcha_private_key']; $captcha_publickey = $admin->settings['captcha_public_key']; $captcha_js .= "<script type='text/javascript' src='" . getJSPath('include/javascript/sugar_grp1_yui.js') . "'></script><script type='text/javascript' src='" . getJSPath('include/javascript/sugar_grp_yui2.js') . "'></script>\n\t\t<script type='text/javascript' src='http://api.recaptcha.net/js/recaptcha_ajax.js'></script>\n\t\t<script> //var oldFormAction = document.getElementById('form').action; //save old action\n\t\tfunction initCaptcha(){\n\t\t\t\tRecaptcha.create('{$captcha_publickey}' ,'captchaImage',{theme:'custom',callback:Recaptcha.focus_response_field});\n\t\t\t\t}\n\n\t\twindow.onload=initCaptcha;\n\n\t\tvar handleFailure=handleSuccess;\n\t\tvar handleSuccess = function(o){\n\t\t\tif(o.responseText!==undefined && o.responseText =='Success'){\n\t\t\t\t\n\t\t\t\tdocument.getElementById('user_password').value=document.getElementById('new_password').value;\n\t\t\t\tdocument.getElementById('ChangePasswordForm').submit();\n\t\t\t}\n\t\t\telse{\n\t\t\t\talert(o.responseText);\n\t\t\t\tRecaptcha.reload();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tvar callback2 =\n\t\t{\n\t\t success:handleSuccess,\n\t\t failure: handleFailure\n\t\t};\n\t\tfunction validateCaptchaAndSubmit(){\n\t\t\t\tvar form = document.getElementById('form');\n\t\t\t\tvar url = '&to_pdf=1&module=Home&action=index&entryPoint=Changenewpassword&recaptcha_challenge_field='+Recaptcha.get_challenge()+'&recaptcha_response_field='+ Recaptcha.get_response();\n\t\t\t\tYAHOO.util.Connect.asyncRequest('POST','index.php',callback2,url);\n\t\t\t\t\n\t\t}\n\t\t\n\t</script>"; $Captcha .= $captcha_js; $Captcha .= "<tr>\n\t\t\t\t\t<td scope='row' width='20%'>" . $mod_strings['LBL_RECAPTCHA_INSTRUCTION_OPPOSITE'] . ":</td>\n\t\t <td width='70%'><input type='text' size='26' id='recaptcha_response_field' value=''></td>\n\t\t \t<th rowsapn='2' class='x-sqs-list' ><div id='recaptcha_image'></div></th>\n\t\t\t </tr>\n\t\t\t \n\t\t\t <tr>\n\t\t \t<td colspan='2'>\n\t\t \t\t<a href='javascript:Recaptcha.reload()'> " . $mod_strings['LBL_RECAPTCHA_NEW_CAPTCHA'] . "</a> \n\t\t \t\t<a class='recaptcha_only_if_image' href='javascript:Recaptcha.switch_type('audio')'>" . $mod_strings['LBL_RECAPTCHA_SOUND'] . "</a>\n\t\t \t\t<a class='recaptcha_only_if_audio' href='javascript:Recaptcha.switch_type('image')'>" . $mod_strings['LBL_RECAPTCHA_IMAGE'] . "</a>\n\t\t \t</td>\n\t\t </tr>"; } else { echo "<script>function validateCaptchaAndSubmit(){document.getElementById('user_password').value=document.getElementById('new_password').value;document.getElementById('ChangePasswordForm').submit();}</script>"; } $pwd_settings = $GLOBALS['sugar_config']['passwordsetting']; $sugar_smarty->assign('sugar_md', getWebPath('include/images/sugar_md_open.png')); $sugar_smarty->assign("MOD", $mod_strings); $sugar_smarty->assign("CAPTCHA", $Captcha); $sugar_smarty->assign("IS_ADMIN", '1'); $sugar_smarty->assign("ENTRY_POINT", 'Changenewpassword'); $sugar_smarty->assign('return_action', 'login'); $sugar_smarty->assign("APP", $app_strings); $sugar_smarty->assign("INSTRUCTION", $app_strings['NTC_LOGIN_MESSAGE']); $sugar_smarty->assign("USERNAME_FIELD", '<td scope="row" width="30%">' . $mod_strings['LBL_USER_NAME'] . ':</td><td width="70%"><input type="text" size="20" tabindex="1" id="user_name" name="user_name" value=""</td>'); $sugar_smarty->assign('PWDSETTINGS', $GLOBALS['sugar_config']['passwordsetting']); $rules = "'','',''"; $sugar_smarty->assign('SUBMIT_BUTTON', '<input title="' . $mod_strings['LBL_LOGIN_BUTTON_TITLE'] . '" accessKey="' . $mod_strings['LBL_LOGIN_BUTTON_TITLE'] . '" class="button" ' . 'onclick="if(!set_password(form,newrules(' . $rules . '))) return false; validateCaptchaAndSubmit();" ' . 'type="button" tabindex="3" id="login_button" name="Login" value="' . $mod_strings['LBL_LOGIN_BUTTON_LABEL'] . '" /><br> '); if (!empty($_REQUEST['guid'])) { $sugar_smarty->assign("GUID", $_REQUEST['guid']); } $sugar_smarty->display('modules/Users/Changenewpassword.tpl');
/** * Return an image tag containing a member's avatar. * * @param int $memberId The member's ID. * @param string $avatarFormat The format of the member's avatar (as stored in the database - jpg|gif|png.) * @param string $className CSS class names to apply to the avatar. */ function avatar($memberId = 0, $avatarFormat = "", $className = "") { // Otherwise, construct the avatar path from the provided information. if ($memberId and $avatarFormat) { $file = "uploads/avatars/{$memberId}.{$avatarFormat}"; $url = getWebPath($file); } // If the user doesn't have an avatar, return the skin's default one. if (!$avatarFormat) { $url = getResource("skins/base/avatar.png"); } return "<img src='{$url}' alt='' class='avatar {$className}'/>"; }
public function test_getWebPath() { $result = getWebPath(__FILE__); $expected = SiteLocation . str_replace(ROOT, "", dirname(__FILE__) . "/" . basename(__FILE__)); $this->assertEquals($expected, $result); }
* paying applicable fees is strictly prohibited. You do not have the right to * remove SugarCRM copyrights from the source code or user interface. * * 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. * * Your Warranty, Limitations of liability and Indemnity are expressly stated * in the License. Please refer to the License for the specific language * governing these rights and limitations under the License. Portions created * by SugarCRM are Copyright (C) 2004-2009 SugarCRM, Inc.; All Rights Reserved. ********************************************************************************/ /********************************************************************************* * Description: Defines the English language pack for the base application. * Portions created by SugarCRM are Copyright (C) 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): ______________________________________.. ********************************************************************************/ $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/rest/zoominfocompany/images/zoominfo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'ZoomInfo© dostarcza sporo informacji o ponad 45 milionach zatrudnionych w ponad 5 milionach przedsiębiorstw. Zobacz więcej na <a target="_blank" href="http://www.zoominfo.com/about">http://www.zoominfo.com/about</a></td></tr></table>', 'LBL_SEARCH_FIELDS_INFO' => 'Następujące pola są wspierane przez Zoominfo© Firma; API: Nazwa firmy, Miasto, Wokjewództwo (stan) i kraj.', 'LBL_COMPANY_ID' => 'ID', 'LBL_COMPANY_NAME' => 'Nazwa firmy', 'LBL_STREET' => 'Ulica', 'LBL_CITY' => 'Miasto', 'LBL_ZIP' => 'Kod pocztowy', 'LBL_STATE' => 'Województwo', 'LBL_COUNTRY' => 'Kraj', 'LBL_INDUSTRY' => 'Branża', 'LBL_WEBSITE' => 'Strona www', 'LBL_DESCRIPTION' => 'Opis', 'company_search_url' => 'Adres URL firmy', 'company_detail_url' => 'Adres URL szczegółów o firmie', 'api_key' => 'Klucz API', 'ERROR_LBL_CONNECTION_PROBLEM' => 'Błąd: Nie można połączyć się z serwerem Zoominfo - Company connector.');
function getGalleryImages($galId, $index = 0, $limit = 100, $greedyOnLarge = false, $greedyOnThumbs = false, $autoImageTagOnGreedy = true, $bPath = "galleries/") { $baseDir = APPROOT . APPS_MEDIA_FOLDER . $bPath; $bannerDir = $baseDir . $galId . "/large/"; $textDir = $baseDir . $galId . "/text/"; $thumbDir = $baseDir . $galId . "/thumbs/"; $lnkDir = $baseDir . $galId . "/lnks/"; if (!is_dir($bannerDir)) { if (mkdir($bannerDir, 0777, true)) { chmod($bannerDir, 0777); } } if (!is_dir($textDir)) { if (mkdir($textDir, 0777, true)) { chmod($textDir, 0777); } } if (!is_dir($thumbDir)) { if (mkdir($thumbDir, 0777, true)) { chmod($thumbDir, 0777); } } if (is_dir($bannerDir)) { $gallery = array("large" => array(), "thumb" => array(), "text" => array(), "link" => array(), "config" => array()); $bs = scandir($bannerDir, 1); unset($bs[count($bs) - 1]); unset($bs[count($bs) - 1]); $bs = array_reverse($bs); $maxPhotos = count($bs); if ($index > $maxPhotos) { $index = $maxPhotos - $limit; } if ($index + $limit > $maxPhotos) { $limit = $maxPhotos - $index; } $gallery['config'] = parseConfigFile($baseDir . $galId . "/config.cfg"); foreach ($gallery['config'] as $a => $b) { $gallery['config'][$a] = $b['value']; } for ($i = $index; $i < $index + $limit; $i++) { $a = $bs[$i]; $bf = getWebPath($bannerDir . $a) . $a; $pathInfo = pathinfo($bf); $ext = $pathInfo["extension"]; $fname = $pathInfo["filename"]; if ($greedyOnLarge) { $data = file_get_contents($bannerDir . $a); $data = base64_encode($data); $mime = "image/{$ext}"; if ($autoImageTagOnGreedy) { $data = "<img src='data:{$mime};charset=utf-8;base64,{$data}' alt='Gallery Photo' with=100% height=100% />"; } else { $data = array("mime" => $mime, "image" => $data); } array_push($gallery['large'], $data); } else { array_push($gallery['large'], $bf); } $msgTxt = ""; $msgLnk = ""; if (file_exists("{$textDir}{$fname}.html") && is_readable("{$textDir}{$fname}.html")) { $msgTxt = trim(file_get_contents("{$textDir}{$fname}.html")); } if (file_exists("{$lnkDir}{$fname}.lnk") && is_readable("{$lnkDir}{$fname}.lnk")) { $msgLnk = trim(file_get_contents("{$lnkDir}{$fname}.lnk")); } if (strlen($msgLnk) <= 0) { $msgLnk = "#"; } elseif (strpos("{$msgLnk}", "://") < 1) { $msgLnk = SiteLocation . $msgLnk; } array_push($gallery['text'], $msgTxt); array_push($gallery['link'], $msgLnk); $thumbFile = ""; if (file_exists($thumbDir . $a) && is_readable($thumbDir . $a)) { $thumbFile = $thumbDir . $a; } elseif (file_exists("{$thumbDir}{$fname}.png") && is_readable("{$thumbDir}{$fname}.png")) { $a = "{$fname}.png"; $thumbFile = $thumbDir . $a; } if ($greedyOnThumbs) { $pathInfo = pathinfo($thumbFile); $ext = $pathInfo["extension"]; $data = file_get_contents($thumbFile); $data = base64_encode($data); $mime = "image/{$ext}"; if ($autoImageTagOnGreedy) { $thumbData = "<img src='data:{$mime};charset=utf-8;base64,{$data}' alt='Thumb Photo' with=100% height=100% />"; } else { $thumbData = array("mime" => $mime, "image" => $data); } array_push($gallery['thumb'], $thumbData); } else { $thumbFile = getWebPath($thumbFile) . basename($thumbFile); array_push($gallery['thumb'], $thumbFile); } } return $gallery; } else { if (MASTER_DEBUG_MODE == 'true') { trigger_error("Gallery/Banner Not Found :: " . $galId); } } return array(); }
/** * Return an image tag containing a member's avatar. * * @param array $member An array of the member's details. (memberId is required in this implementation.) * @param string $avatarFormat The format of the member's avatar (as stored in the database - jpg|gif|png.) * @param string $className CSS class names to apply to the avatar. * * @package esoTalk */ function avatar($member = array(), $className = "") { $url = getResource("core/skin/avatar.png"); // Construct the avatar path from the provided information. if (!empty($member["memberId"]) and !empty($member["avatarFormat"])) { $file = "uploads/avatars/{$member["memberId"]}.{$member["avatarFormat"]}"; $url = getWebPath($file); } return "<img src='{$url}' alt='' class='avatar {$className}'/>"; }
</style><br> <br> <table cellpadding="0" align="center" width="100%" cellspacing="0" border="0"> <tr> <td> <form action="index.php" method="post" name="DetailView" id="form" onsubmit="return document.getElementById('cant_login').value == ''"> <table cellpadding="0" cellspacing="0" border="0" align="center" width='350px'> <tr> <td style="padding-bottom: 10px;" ><b><?php echo $mod_strings['LBL_LOGIN_WELCOME_TO']; ?> </b><br> <IMG src="<?php echo getWebPath('include/images/sugar_md.png'); ?> " alt="Sugar" width="340" height="25"></td> </tr> <tr> <td align="center"> <div class="edit view login"> <table cellpadding="0" cellspacing="2" border="0" align="center" width="100%"> <tr> <td scope="row" colspan="2" width="100%" style="font-size: 12px; padding-bottom: 5px; font-weight: normal;"><?php echo $app_strings['NTC_LOGIN_MESSAGE']; ?> <input type="hidden" name="module" value="Users"> <input type="hidden" name="action" value="Authenticate"> <input type="hidden" name="return_module" value="Users"> <input type="hidden" name="return_action" value="Login">
/** * Set a cookie with a standardized name prefix. * * @param string $name The name of the cookie. * @param string $value The value of the cookie. * @param int $expire The time before the cookie will expire. */ public function setCookie($name, $value, $expire = 0) { return setcookie(C("esoTalk.cookie.name") . "_" . $name, $value, $expire, C("esoTalk.cookie.path", getWebPath('')), C("esoTalk.cookie.domain")); }
/** * Render the specified view, in the format according to the controller's set response type. * * @param string $view The view to render. This can be left blank if we know the response type is one that * doesn't require a view, such as JSON or ATOM. * @return void */ public function render($view = "") { $this->trigger("renderBefore"); if ($this->responseType == RESPONSE_TYPE_DEFAULT and ET::$session->user) { // Fetch all unread notifications so we have a count for the notifications button. $notifications = ET::activityModel()->getNotifications(-1); $count = count($notifications); $this->addToMenu("user", "notifications", "<a href='" . URL("settings/notifications") . "' id='notifications' class='button popupButton " . ($count ? "new" : "") . "'><span>{$count}</span></a>"); // Show messages with these notifications. $this->notificationMessages($notifications); } // Set up the master view, content type, and other stuff depending on the response type. switch ($this->responseType) { // For an ATOM response, set the master view and the content type. case RESPONSE_TYPE_ATOM: $this->masterView = "atom.master"; $this->contentType = "application/atom+xml"; break; // For an AJAX or JSON response, set the master view and the content type. // If it's an AJAX response, set one of the JSON parameters to the specified view's contents. // For an AJAX or JSON response, set the master view and the content type. // If it's an AJAX response, set one of the JSON parameters to the specified view's contents. case RESPONSE_TYPE_AJAX: if ($view) { $this->json("view", $this->getViewContents($view, $this->data)); } case RESPONSE_TYPE_JSON: $this->masterView = "json.master"; $this->contentType = "application/json"; } // Set a content-type header. header("Content-type: " . $this->contentType . "; charset=" . T("charset", "utf-8")); // If we're just outputting the view on its own, do that now. if ($this->responseType === RESPONSE_TYPE_VIEW) { $this->renderView($view, $this->data); } else { // Make a new data array for the master view. $data = array(); // For any master views but the JSON and ATOM ones, give the view some data that will be useful in // rendering a HTML page. if ($this->masterView != "json.master" and $this->masterView != "atom.master") { // Fetch the content of the view, passing the data collected in the controller. if ($view) { $data["content"] = $this->getViewContents($view, $this->data); } // If config/custom.css contains something, add it to be included in the page. if (file_exists($file = PATH_CONFIG . "/custom.css") and filesize($file) > 0) { $this->addCSSFile("config/custom.css", true); } // Add the <head> contents and the page title. $data["head"] = $this->head(); $titleParts = array(); if ($this->title) { $titleParts[] = $this->title; } if ($t = C("esoTalk.forumTitle")) { $titleParts[] = $t; } $data["pageTitle"] = implode(" - ", $titleParts); // Add the forum title, or logo if the forum has one. $logo = C("esoTalk.forumLogo"); $title = C("esoTalk.forumTitle"); if ($logo) { $size = getimagesize($logo); } $data["forumTitle"] = $logo ? "<img src='" . getWebPath($logo) . "' {$size[3]} alt='{$title}'/>" : $title; // Add the details for the "back" button. $data["backButton"] = ET::$session->getNavigation($this->navigationId); // Get common menu items. foreach ($this->menus as $menu => $items) { $data[$menu . "MenuItems"] = $items->getContents(); } // Add the body class. $data["bodyClass"] = $this->bodyClass; // Get messages. $data["messages"] = $this->getMessages(); } $this->renderView($this->masterView, $data); } $this->trigger("renderAfter"); }
* By installing or using this file, You have unconditionally agreed to the * terms and conditions of the License, and You may not use this file except in * compliance with the License. Under the terms of the license, You shall not, * among other things: 1) sublicense, resell, rent, lease, redistribute, assign * or otherwise transfer Your rights to the Software, and 2) use the Software * for timesharing or service bureau purposes such as hosting the Software for * commercial gain and/or for the benefit of a third party. Use of the Software * may be subject to applicable fees and any use of the Software without first * paying applicable fees is strictly prohibited. You do not have the right to * remove SugarCRM copyrights from the source code or user interface. * * 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. * * Your Warranty, Limitations of liability and Indemnity are expressly stated * in the License. Please refer to the License for the specific language * governing these rights and limitations under the License. Portions created * by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved. ********************************************************************************/ /********************************************************************************* * 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): ______________________________________.. ********************************************************************************/ $connector_strings = array('LBL_LICENSING_INFO' => '<table border="0" cellspacing="1"><tr><td valign="top" width="35%" class="dataLabel"><image src="' . getWebPath('modules/Connectors/connectors/sources/ext/soap/hoovers/images/hooversLogo.gif') . '" border="0"></td><td width="65%" valign="top" class="dataLabel">' . 'Hoovers© dostarcza za darmo aktualnych informacji o przedsiębiorstwach dla użytkowników produktów SugarCRM. Aby zasięgnąć pełniejszych informacji i raportów na temat firm, fabryk i ich kierownictwa, wejdź na stronę <a href="http://www.hoovers.com" target="_blank">http://www.hoovers.com</a>.</td></tr></table>', 'LBL_SEARCH_FIELDS_INFO' => 'Następujące pola są wspierane przez wyszukiwanie API Hoovers©: Nazwa firmy, Miasto, Województwo, Kraj i Kod pocztowy.', 'LBL_ID' => 'ID', 'LBL_NAME' => 'Nazwa firmy', 'LBL_STREET' => 'Ulica', 'LBL_ADDRESS_STREET1' => 'Dodatkowa ulica', 'LBL_ADDRESS_STREET2' => 'Dodatkowa ulica', 'LBL_CITY' => 'Miasto', 'LBL_STATE' => 'Województwo', 'LBL_COUNTRY' => 'Kraj', 'LBL_ZIP' => 'Kod pocztowy', 'LBL_FINSALES' => 'Roczna sprzedaż', 'LBL_LOCATION_TYPE' => 'Typ lokalizacji', 'LBL_HQPHONE' => 'Telefon do biura', 'LBL_COMPANY_TYPE' => 'Typ firmy', 'LBL_TOTAL_EMPLOYEES' => 'Liczba zatrudnionych', 'hoovers_endpoint' => 'Endpoint URL', 'hoovers_wsdl' => 'Adres WSDL URL', 'hoovers_api_key' => 'Klucz API');
public function showFrame($event, $args) { if ($GLOBALS['app']->controller->action != 'DetailView') { return; } require_once 'include/connectors/utils/ConnectorUtils.php'; $bean = $GLOBALS['app']->controller->bean; // Build the base arguments static $userFieldMap = array('crm_user_id' => 'id', 'crm_user_fn' => 'first_name', 'crm_user_ln' => 'last_name', 'crm_user_email' => 'email1'); if ($GLOBALS['current_user']->id != '1') { $extraUrl = $this->handleFieldMap($GLOBALS['current_user'], $userFieldMap); } else { // Need some extra code here for the '1' admin user $myUserFieldMap = $userFieldMap; unset($myUserFieldMap['crm_user_id']); $extraUrl = 'crm_user_id=' . urlencode($GLOBALS['sugar_config']['unique_key']) . '&' . $this->handleFieldMap($GLOBALS['current_user'], $myUserFieldMap); } $extraUrl .= '&crm_org_id=' . urlencode($GLOBALS['sugar_config']['unique_key']) . '&crm_org_name=' . (!empty($GLOBALS['system_config']->settings['system_name']) ? urlencode($GLOBALS['system_config']->settings['system_name']) : '') . '&crm_server_url=' . urlencode($GLOBALS['sugar_config']['site_url']) . '&crm_session_id=&crm_version=v62&crm_deploy_id=3&crm_size=400&is_embed_version=true'; // Use the per-module functions to build the frame if (is_a($bean, 'Account')) { $url = $this->getAccountFrameUrl($bean, $extraUrl); } else { if (is_a($bean, 'Contact')) { $url = $this->getContactFrameUrl($bean, $extraUrl); } else { if (is_a($bean, 'Lead')) { $url = $this->getLeadFrameUrl($bean, $extraUrl); } else { if (is_a($bean, 'Opportunity')) { $url = $this->getOpportunityFrameUrl($bean, $extraUrl); } else { $url = ''; } } } } if ($url != '') { // Check if the user should be shown the frame or not $smarty = new Sugar_Smarty(); $tplName = 'modules/Connectors/connectors/sources/ext/rest/insideview/tpls/InsideView.tpl'; require_once 'include/connectors/utils/ConnectorUtils.php'; $connector_language = ConnectorUtils::getConnectorStrings('ext_rest_insideview'); $smarty->assign('connector_language', $connector_language); $smarty->assign('logo', getWebPath('modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview.png')); $smarty->assign('video', getWebPath('modules/Connectors/connectors/sources/ext/rest/insideview/images/video.png')); $smarty->assign('close', getWebPath('modules/Connectors/connectors/sources/ext/rest/insideview/images/close.png')); $smarty->assign('logo_expanded', getWebPath('modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_expanded.png')); $smarty->assign('logo_collapsed', getWebPath('modules/Connectors/connectors/sources/ext/rest/insideview/images/insideview_collapsed.png')); $smarty->assign('AJAX_URL', $url); $smarty->assign('APP', $GLOBALS['app_strings']); if ($GLOBALS['current_user']->getPreference('allowInsideView', 'Connectors') != 1) { $smarty->assign('showInsideView', false); } else { $smarty->assign('showInsideView', true); $smarty->assign('URL', $url); //echo "<div id='insideViewDiv' style='width:100%;height:400px;overflow:hidden'><iframe id='insideViewFrame' src='$url' style='border:0px; width:100%;height:480px;overflow:hidden'></iframe></div>"; } echo $smarty->fetch($tplName); } }
/** * @deprecated use SugarTheme::getImage() */ function get_image($image, $other_attributes, $width = "", $height = "") { static $cached_results = array(); if (!empty($cached_results[$image])) { return $cached_results[$image] . "{$other_attributes}>"; } global $png_support; $rel_path = $image; if (defined('TEMPLATE_URL')) { $rel_path = str_replace(TEMPLATE_URL . '/', '', $image); } if ($png_support == false) { $ext = "gif"; } else { $ext = "png"; } $out = ''; if (file_exists('custom/' . $rel_path . '.' . $ext)) { $rel_path = 'custom/' . $rel_path; } if (file_exists($rel_path . '.' . $ext)) { $size = getimagesize($rel_path . '.' . $ext); if ($width == "") { $width = $size[0]; } if ($height == "") { $height = $size[1]; } $path = $image . '.' . $ext; $out = "<img src='{$path}' width='" . $width . "' height='" . $height . "' {$other_attributes}>"; } else { if (substr_count($rel_path, 'themes') > 0) { $path = explode('/', $rel_path); $path[1] = 'default'; $new_path = implode('/', $path); if (file_exists('custom/' . $new_path . '.' . $ext)) { $new_path = 'custom/' . $new_path; } if (file_exists($new_path . '.' . $ext)) { $size = getimagesize($new_path . '.' . $ext); if ($width == "") { $width = $size[0]; } if ($height == "") { $height = $size[1]; } $path = $new_path . '.' . $ext; if (defined('TEMPLATE_URL')) { $path = getWebPath($path); } $out = "<img src='{$path}' width='" . $width . "' height='" . $height . "' {$other_attributes}>"; } } } // Cache everything but the other attributes.... $cached_results[$image] = "<img src='{$path}' width='" . $width . "' height='" . $height . "' "; return $out; }