本文整理汇总了PHP中vtigerCRM_Smarty::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP vtigerCRM_Smarty::fetch方法的具体用法?PHP vtigerCRM_Smarty::fetch怎么用?PHP vtigerCRM_Smarty::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vtigerCRM_Smarty
的用法示例。
在下文中一共展示了vtigerCRM_Smarty::fetch方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDetailViewForTooltip
/**
* this function returns the detailview for tooltip
* @param integer $fieldid - the fieldid of the field for which you want the detailview
* @param array $checkedFields - the fields which are selected to be displayed in quickview
* @return string $data - the formatted quickview data
*/
function getDetailViewForTooltip($fieldid, $checkedFields)
{
global $app_strings;
$labels = array();
if (!empty($checkedFields)) {
$labels = getFieldLabels($checkedFields);
}
$smarty = new vtigerCRM_Smarty();
$smarty->assign("FIELDID", $fieldid);
$smarty->assign("APP", $app_strings);
$smarty->assign("IMAGES", "themes/images/");
$smarty->assign("LABELS", $labels);
$smarty->assign("COUNT", count($labels));
$data = $smarty->fetch("modules/Tooltip/DetailQuickView.tpl");
return $data;
}
示例2: getRoleName
$fieldLabel = vtlib_purify($_REQUEST['fieldlabel']);
$moduleName = vtlib_purify($_REQUEST["moduleName"]);
$roleid = vtlib_purify($_REQUEST['roleid']);
if (!empty($roleid)) {
$roleName = getRoleName($roleid);
}
if ($moduleName == 'Events') {
$temp_module_strings = return_module_language($current_language, 'Calendar');
} else {
$temp_module_strings = return_module_language($current_language, $moduleName);
}
if (!empty($fieldName)) {
foreach (getAllPickListValues($fieldName, $temp_module_strings) as $key => $value) {
$values[$key] = $value;
}
}
foreach (getAssignedPicklistValues($fieldName, $roleid, $adb, $temp_module_strings) as $key => $value) {
$assignedValues[$key] = $value;
}
$smarty->assign("THEME", $theme);
$smarty->assign("FIELDNAME", $fieldName);
$smarty->assign("FIELDLABEL", getTranslatedString($fieldLabel));
$smarty->assign("MODULE", $moduleName);
$smarty->assign("PICKVAL", $values);
$smarty->assign("ASSIGNED_VALUES", $assignedValues);
$smarty->assign("ROLEID", $roleid);
$smarty->assign("ROLENAME", $roleName);
$smarty->assign("MOD", return_module_language($current_language, 'PickList'));
$smarty->assign("APP", $app_strings);
$data = $smarty->fetch("modules/PickList/AssignPicklistValues.tpl");
echo $data;
示例3: getTranslatedString
*************************************************************************************************/
global $adb, $log, $mod_strings, $app_strings, $currentModule, $current_user, $theme;
require_once 'modules/cbupdater/cbupdaterHelper.php';
$error = false;
$errmsg = '';
$smarty = new vtigerCRM_Smarty();
$smarty->assign('APP', $app_strings);
$smarty->assign('MOD', $mod_strings);
$smarty->assign('MODULE', $currentModule);
$smarty->assign('SINGLE_MOD', getTranslatedString('SINGLE_' . $currentModule));
$smarty->assign('CATEGORY', $category);
$smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
$smarty->assign('THEME', $theme);
include 'modules/cbupdater/forcedButtons.php';
$smarty->assign('CHECK', $tool_buttons);
echo $smarty->fetch('Buttons_List.tpl');
$ids = vtlib_purify($_REQUEST['idstring']);
if (!empty($ids)) {
echo '<br>';
require_once 'modules/cbupdater/cbupdater.php';
require_once 'modules/cbupdater/cbupdaterWorker.php';
if (isset($_REQUEST['doundo'])) {
$whattodo = 'undo';
} else {
$whattodo = 'apply';
}
$sql = 'select cbupdaterid,filename,pathfilename,classname, cbupd_no, description from vtiger_cbupdater
inner join vtiger_crmentity on crmid=cbupdaterid
where deleted=0 and ';
if ($ids == 'all') {
$sql .= "execstate in ('Pending','Continuous')";
示例4: getToolTip
/**
* this function accepts the tooltip text and returns it after formatting
* @param $text - the tooltip text which is to be formatted
* @param $format - the format in which tooltip has to be formatted; default value will be each entry in single line
*/
function getToolTip($text, $format = "default")
{
require_once 'Smarty_setup.php';
$smarty = new vtigerCRM_Smarty();
$tip = "";
if (trim($text) == "") {
return $tip;
}
$smarty->assign("TEXT", $text);
$tip = $smarty->fetch("modules/Tooltip/{$format}.tpl");
return $tip;
}
示例5: array
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once 'modules/PickList/PickListUtils.php';
require_once 'include/utils/utils.php';
require_once 'Smarty_setup.php';
global $mod_strings, $current_language, $adb;
$roleid = $_REQUEST['roleid'];
if (empty($roleid)) {
echo "role id cannot be empty";
exit;
}
$otherRoles = getrole2picklist();
$otherRoles = array_diff($otherRoles, array($roleid => getRoleName($roleid)));
$smarty = new vtigerCRM_Smarty();
$smarty->assign("ROLES", $otherRoles);
$smarty->assign("MOD", return_module_language($current_language, 'PickList'));
$smarty->assign("APP", $app_strings);
$str = $smarty->fetch("modules/PickList/ShowRoleSelect.tpl");
echo $str;
示例6: getToolTip
/**
* this function accepts the tooltip text and returns it after formatting
* @param $text - the tooltip text which is to be formatted
* @param $format - the format in which tooltip has to be formatted; default value will be each entry in single line
*/
function getToolTip($text, $format = "default")
{
$smarty = new vtigerCRM_Smarty();
$tip = "";
if (trim(implode('', $text)) == '') {
return $tip;
}
$smarty->assign("TEXT", $text);
$tip = $smarty->fetch("modules/Tooltip/{$format}.tpl");
return $tip;
}
示例7: array
$widgetInfoList = Zend_Json::decode($_REQUEST['widgetInfoList']);
$widgetInfoList = Zend_Json::decode($_REQUEST['widgetInfoList']);
$widgetHTML = array();
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
foreach ($widgetInfoList as $widgetInfo) {
$widgetType = $widgetInfo['widgetType'];
$widgetId = $widgetInfo['widgetId'];
if ($widgetType == 'Tag Cloud') {
$freetag = new freetag();
$smarty->assign("ALL_TAG", $freetag->get_tag_cloud_html("", $current_user->id));
$smarty->assign("USER_TAG_SHOWAS", getTagCloudShowAs($current_user->id));
$html = $smarty->fetch("Home/TagCloud.tpl");
} elseif ($widgetType == 'Notebook') {
$contents = $homeObj->getNoteBookContents($widgetId);
$smarty->assign("NOTEBOOK_CONTENTS", $contents);
$smarty->assign("NOTEBOOKID", $widgetId);
$html = $smarty->fetch("Home/notebook.tpl");
} elseif ($widgetType == 'URL') {
$url = $homeObj->getWidgetURL($widgetId);
if (strpos($url, "://") === false) {
$url = "http://" . trim($url);
}
$smarty->assign("URL", $url);
$smarty->assign("WIDGETID", $widgetId);
$html = $smarty->fetch("Home/HomeWidgetURL.tpl");
} else {
$homestuff_values = $homeObj->getHomePageStuff($widgetId, $widgetType);
示例8: getEditablePicklistValues
$moduleName = vtlib_purify($_REQUEST["moduleName"]);
$mode = $_REQUEST["mode"];
if ($moduleName == 'Events') {
$temp_module_strings = return_module_language($current_language, 'Calendar');
} else {
$temp_module_strings = return_module_language($current_language, $moduleName);
}
if (isset($fieldName)) {
$editableValues = getEditablePicklistValues($fieldName, $temp_module_strings, $adb);
$nonEditableValues = getNonEditablePicklistValues($fieldName, $temp_module_strings, $adb);
}
$temp_label = getTranslatedString($fieldLabel);
$roleDetails = getAllRoleDetails();
// Remove Organization from the list of roles (which is the first one in the list of roles)
array_shift($roleDetails);
$smarty->assign("FIELDNAME", $fieldName);
$smarty->assign("FIELDLABEL", $temp_label);
$smarty->assign('NONEDITPICKLIST', $nonEditableValues);
$smarty->assign("MODULE", $moduleName);
$smarty->assign("PICKVAL", $editableValues);
$smarty->assign("ROLEDETAILS", $roleDetails);
$smarty->assign("MOD", return_module_language($current_language, 'PickList'));
$smarty->assign("APP", $app_strings);
if ($mode == 'add') {
$data = $smarty->fetch("modules/PickList/AddPickList.tpl");
} elseif ($mode == 'edit') {
$data = $smarty->fetch("modules/PickList/EditPickList.tpl");
} elseif ($mode == 'delete') {
$data = $smarty->fetch("modules/PickList/DeletePickList.tpl");
}
echo $data;