当前位置: 首页>>代码示例>>PHP>>正文


PHP vtigerCRM_Smarty::assign方法代码示例

本文整理汇总了PHP中vtigerCRM_Smarty::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP vtigerCRM_Smarty::assign方法的具体用法?PHP vtigerCRM_Smarty::assign怎么用?PHP vtigerCRM_Smarty::assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vtigerCRM_Smarty的用法示例。


在下文中一共展示了vtigerCRM_Smarty::assign方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show_error_import

/**	function used to show the error message occured during import process
 *	@param	string	$message - Error message to display in the screen, where the passed error message will be displayed in screen using Importerror.tpl file
 */
function show_error_import($message)
{
    global $import_mod_strings;
    global $theme;
    global $log;
    global $mod_strings;
    global $app_strings;
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $log->info("Upload Error");
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign("MOD", $mod_strings);
    $smarty->assign("APP", $app_strings);
    if (isset($_REQUEST['return_module'])) {
        $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
    }
    if (isset($_REQUEST['return_action'])) {
        $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
    }
    $smarty->assign("THEME", $theme);
    $category = getParenttab();
    $smarty->assign("CATEGORY", $category);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']);
    $smarty->assign("MODULE", vtlib_purify($_REQUEST['module']));
    $smarty->assign("MESSAGE", $message);
    $smarty->display('Importerror.tpl');
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:error.php

示例2: viewController

 function viewController()
 {
     $smarty = new vtigerCRM_Smarty();
     foreach ($this->parameters as $k => $v) {
         $smarty->assign($k, $v);
     }
     $smarty->assign("IS_SAFARI", Mobile::isSafari());
     $smarty->assign("SKIN", Mobile::config('Default.Skin'));
     return $smarty;
 }
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:10,代码来源:Viewer.php

示例3: viewController

 function viewController()
 {
     global $theme;
     $themePath = "themes/" . $theme . "/";
     $imagePath = $themePath . "images/";
     $smarty = new vtigerCRM_Smarty();
     foreach ($this->parameters as $k => $v) {
         $smarty->assign($k, $v);
     }
     $smarty->assign('MODULE', 'Import');
     $smarty->assign('THEME', $theme);
     $smarty->assign('IMAGE_PATH', $imagePath);
     return $smarty;
 }
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:14,代码来源:Viewer.php

示例4: 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;
}
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:22,代码来源:SaveTooltipInformation.php

示例5: getViewer

 function getViewer()
 {
     global $theme, $app_strings, $current_language;
     $smarty = new vtigerCRM_Smarty();
     $smarty->assign('APP', $app_strings);
     $smarty->assign('MOD', return_module_language($current_language, 'ModComments'));
     $smarty->assign('THEME', $theme);
     $smarty->assign('IMAGE_PATH', "themes/{$theme}/images/");
     $smarty->assign('UIKEY', $this->uikey());
     $smarty->assign('WIDGET_TITLE', $this->title());
     $smarty->assign('WIDGET_NAME', $this->name());
     return $smarty;
 }
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:13,代码来源:DetailViewBlockComment.php

示例6: explode

$nr_row = $adb->num_rows($getMapQuery);
if ($nr_row != 0) {
    $viewmode = "edit";
    $origin = $adb->query_result($getMapQuery, 0, 'origin');
    $originname = $adb->query_result($getMapQuery, 0, 'originname');
    $target = $adb->query_result($getMapQuery, 0, 'target');
    $targetname = $adb->query_result($getMapQuery, 0, 'targetname');
    $field1 = $adb->query_result($getMapQuery, 0, 'field1');
    $field2 = $adb->query_result($getMapQuery, 0, 'field2');
    $seldelimiter = $adb->query_result($getMapQuery, 0, 'delimiter');
    $maptype = $adb->query_result($getMapQuery, 0, 'maptype');
    $blocks = $adb->query_result($getMapQuery, 0, 'blocks');
    $targetFieldsArr = explode("::", $field2);
    $originFieldsArr = explode(",", $field1);
    $nrFields = count($originFieldsArr);
    $mapTemplate->assign("nrFields", $nrFields);
    $mapTemplate->assign("originFieldsArr", $field1);
    $mapTemplate->assign("targetFieldsArr", $field2);
    $mapTemplate->assign("originID", $origin);
    $mapTemplate->assign("targetID", $target);
    $mapTemplate->assign("originName", $originname);
    $mapTemplate->assign("targetName", $targetname);
    $mapTemplate->assign("seldelimiter", $seldelimiter);
    $mapTemplate->assign('maptype', $maptype);
} else {
    $viewmode = "create";
}
$mapTemplate->assign("MOD", $mod_strings);
$mapTemplate->assign("APP", $app_strings);
$mapTemplate->assign("module_list", json_encode($mapInstance->module_list));
$mapTemplate->assign("related_modules", json_encode($mapInstance->related_modules));
开发者ID:kduqi,项目名称:corebos,代码行数:31,代码来源:getMap.php

示例7: getCustomFieldSupportedModules

<?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 'Smarty_setup.php';
require_once 'include/database/PearDatabase.php';
require_once 'include/CustomFieldUtil.php';
global $mod_strings, $app_strings, $theme;
$smarty = new vtigerCRM_Smarty();
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$theme_path = "themes/" . $theme . "/";
$image_path = "themes/images/";
$smarty->assign("IMAGE_PATH", $image_path);
$module_array = getCustomFieldSupportedModules();
$cfimagecombo = array($image_path . "text.gif", $image_path . "number.gif", $image_path . "percent.gif", $image_path . "currency.gif", $image_path . "date.gif", $image_path . "email.gif", $image_path . "phone.gif", $image_path . "picklist.gif", $image_path . "url.gif", $image_path . "checkbox.gif", $image_path . "text.gif", $image_path . "picklist.gif");
$cftextcombo = array($mod_strings['Text'], $mod_strings['Number'], $mod_strings['Percent'], $mod_strings['Currency'], $mod_strings['Date'], $mod_strings['Email'], $mod_strings['Phone'], $mod_strings['PickList'], $mod_strings['LBL_URL'], $mod_strings['LBL_CHECK_BOX'], $mod_strings['LBL_TEXT_AREA'], $mod_strings['LBL_MULTISELECT_COMBO']);
$smarty->assign("MODULES", $module_array);
$smarty->assign("CFTEXTCOMBO", $cftextcombo);
$smarty->assign("CFIMAGECOMBO", $cfimagecombo);
if ($_REQUEST['fld_module'] != '') {
    $fld_module = vtlib_purify($_REQUEST['fld_module']);
} elseif ($_REQUEST['formodule'] != '') {
    $fld_module = vtlib_purify($_REQUEST['formodule']);
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:CustomFieldList.php

示例8: getParentTab

global $mod_strings, $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
global $current_language;
$mod_strings = return_module_language($current_language, 'Users');
$category = getParentTab();
$focus = new Users();
$no_of_users = UserCount();
//Display the mail send status
$smarty = new vtigerCRM_Smarty();
if ($_REQUEST['mail_error'] != '') {
    require_once "modules/Emails/mail.php";
    $error_msg = strip_tags(parseEmailErrorString($_REQUEST['mail_error']));
    $error_msg = $app_strings['LBL_MAIL_NOT_SENT_TO_USER'] . ' ' . vtlib_purify($_REQUEST['user']) . '. ' . $app_strings['LBL_PLS_CHECK_EMAIL_N_SERVER'];
    $smarty->assign("ERROR_MSG", $mod_strings['LBL_MAIL_SEND_STATUS'] . ' <b><font class="warning">' . $error_msg . '</font></b>');
}
//Retreiving the start value from request
if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
    $start = vtlib_purify($_REQUEST['start']);
} elseif ($_SESSION['user_pagestart'] != '') {
    $start = $_SESSION['user_pagestart'];
} else {
    $start = 1;
}
$list_query = getListQuery("Users");
$userid = array();
$userid_Query = "SELECT id,user_name FROM vtiger_users WHERE user_name IN ('admin')";
$users = $adb->pquery($userid_Query, array());
$norows = $adb->num_rows($users);
if ($norows > 0) {
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:ListView.php

示例9: getParentTab

 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ************************************************************************************/
global $app_strings, $mod_strings, $current_language, $currentModule, $theme, $adb, $log, $current_user;
require_once 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'include/CustomFieldUtil.php';
require_once 'include/utils/utils.php';
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
$category = getParentTab($currentModule);
$record = vtlib_purify($_REQUEST['record']);
$isduplicate = vtlib_purify($_REQUEST['isDuplicate']);
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
$currencyid = fetchCurrency($current_user->id);
$rate_symbol = getCurrencySymbolandCRate($currencyid);
$rate = $rate_symbol['rate'];
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
    $focus->id = $record;
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($record, 'PurchaseOrder');
    $focus->name = $focus->column_fields['subject'];
}
if ($isduplicate == 'true') {
    $smarty->assign('DUPLICATE_FROM', $focus->id);
    $PO_associated_prod = getAssociatedProducts($currentModule, $focus);
    $inventory_cur_info = getInventoryCurrencyInfo($currentModule, $focus->id);
    $currencyid = $inventory_cur_info['currency_id'];
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:EditView.php

示例10: setObjectValuesFromRequest

/*+********************************************************************************
 * 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 'Smarty_setup.php';
require_once 'include/utils/utils.php';
global $app_strings, $mod_strings, $theme, $currentModule;
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
    $focus->id = $_REQUEST['record'];
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($_REQUEST['record'], "Vendors");
    $focus->name = $focus->column_fields['vendorname'];
}
if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
    $focus->id = "";
    $focus->mode = '';
}
if (empty($_REQUEST['record']) && $focus->mode != 'edit') {
    setObjectValuesFromRequest($focus);
}
$theme_path = "themes/" . $theme . "/";
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:EditView.php

示例11: getParentTab

 ********************************************************************************/
require_once 'Smarty_setup.php';
require_once "data/Tracker.php";
require_once 'include/logging.php';
require_once 'include/ListView/ListView.php';
require_once 'include/utils/utils.php';
global $app_strings, $default_charset;
global $currentModule, $current_user;
global $theme, $adb;
$url_string = '';
$smarty = new vtigerCRM_Smarty();
if (!isset($where)) {
    $where = "";
}
$parent_tab = getParentTab();
$smarty->assign("CATEGORY", $parent_tab);
$url = '';
$popuptype = '';
$popuptype = vtlib_purify($_REQUEST["popuptype"]);
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("THEME_PATH", $theme_path);
$smarty->assign("MODULE", $currentModule);
$form = vtlib_purify($_REQUEST['form']);
//added to get relatedto field value for todo, while selecting from the popup list, after done the alphabet or basic search.
if (isset($_REQUEST['maintab']) && $_REQUEST['maintab'] != '') {
    $act_tab = vtlib_purify($_REQUEST['maintab']);
    $url = "&maintab=" . $act_tab;
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:31,代码来源:Popup.php

示例12: vtEditExpressions

function vtEditExpressions($adb, $appStrings, $current_language, $theme, $formodule = '')
{
    $theme_path = "themes/" . $theme . "/";
    $image_path = $theme_path . "images/";
    $smarty = new vtigerCRM_Smarty();
    $smarty->assign('APP', $appStrings);
    $mod = array_merge(return_module_language($current_language, 'FieldFormulas'), return_module_language($current_language, 'Settings'));
    $jsStrings = array('NEED_TO_ADD_A' => $mod['NEED_TO_ADD_A'], 'CUSTOM_FIELD' => $mod['LBL_CUSTOM_FIELD'], 'LBL_USE_FUNCTION_DASHDASH' => $mod['LBL_USE_FUNCTION_DASHDASH'], 'LBL_USE_FIELD_VALUE_DASHDASH' => $mod['LBL_USE_FIELD_VALUE_DASHDASH'], 'LBL_DELETE_EXPRESSION_CONFIRM' => $mod['LBL_DELETE_EXPRESSION_CONFIRM']);
    $smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings));
    $smarty->assign("MOD", $mod);
    $smarty->assign("THEME", $theme);
    $smarty->assign("IMAGE_PATH", $image_path);
    $smarty->assign("MODULE_NAME", 'FieldFormulas');
    $smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS');
    $smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION');
    $smarty->assign("FORMODULE", $formodule);
    if (file_exists("modules/{$formodule}/{$formodule}.php")) {
        $focus = CRMEntity::getInstance($formodule);
        $validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule)));
        $smarty->assign('VALIDATION_DATA_FIELDNAME', $validationArray['fieldname']);
        $smarty->assign('VALIDATION_DATA_FIELDDATATYPE', $validationArray['datatype']);
        $smarty->assign('VALIDATION_DATA_FIELDLABEL', $validationArray['fieldlabel']);
    }
    $smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl'));
}
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:26,代码来源:editexpressions.php

示例13:

 * ("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 'Smarty_setup.php';
require_once 'data/Tracker.php';
require_once 'include/utils/utils.php';
global $app_strings, $app_list_strings, $mod_strings, $theme, $currentModule;
$module = vtlib_purify($_REQUEST['module']);
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
$smarty->assign("UPLOADSIZE", $upload_maxsize / 1000000);
//Convert to MB
$smarty->assign("UPLOAD_MAXSIZE", $upload_maxsize);
if ($_REQUEST['upload_error'] == true) {
    echo '<br><b><font color="red"> ' . $mod_strings['FILE_HAS_NO_DATA'] . '.</font></b><br>';
}
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
    $focus->id = $_REQUEST['record'];
    $focus->mode = 'edit';
    $focus->retrieve_entity_info($_REQUEST['record'], "Documents");
    $focus->name = $focus->column_fields['notes_title'];
}
if ($focus->mode != 'edit') {
    if (isset($_REQUEST['parent_id']) && isset($_REQUEST['return_module'])) {
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:EditView.php

示例14: CustomView

    }
}
$focus = CRMEntity::getInstance($select_module);
if (count($module_name) > 0) {
    $cur_mod_view = new CustomView($select_module);
    $viewid = $cur_mod_view->getViewIdByName('All', $select_module);
    global $current_user;
    $queryGenerator = new QueryGenerator($select_module, $current_user);
    $queryGenerator->initForCustomViewById($viewid);
    // Enabling Module Search
    $url_string = '';
    if ($_REQUEST['query'] == 'true') {
        $queryGenerator->addUserSearchConditions($_REQUEST);
        $ustring = getSearchURL($_REQUEST);
        $url_string .= "&query=true{$ustring}";
        $smarty->assign('SEARCH_URL', $url_string);
    }
    $list_query = $queryGenerator->getQuery();
    $list_query = preg_replace("/vtiger_crmentity.deleted\\s*=\\s*0/i", 'vtiger_crmentity.deleted = 1', $list_query);
    //Search criteria added to the list Query
    if (isset($where) && $where != '') {
        $list_query .= ' AND ' . $where;
    }
    $count_result = $adb->query(mkCountQuery($list_query));
    $noofrows = $adb->query_result($count_result, 0, "count");
    $controller = new ListViewController($adb, $current_user, $queryGenerator);
    $rb_listview_header = $controller->getListViewHeader($focus, $select_module, $url_string, $sorder, $order_by, true);
    $listview_header_search = $controller->getBasicSearchFieldInfoList();
    $smarty->assign("SEARCHLISTHEADER", $listview_header_search);
    if (isset($_REQUEST['start']) && $_REQUEST['start'] != '') {
        $start = vtlib_purify($_REQUEST['start']);
开发者ID:hbsman,项目名称:vtigercrm-5.3.0-ja,代码行数:31,代码来源:ListView.php

示例15: unset

     $log->debug("id is " . $focus->id);
     $log->debug("name is " . $focus->name);
 }
 global $mod_strings;
 global $app_strings;
 global $theme;
 global $currentModule;
 global $current_user;
 $theme_path = "themes/" . $theme . "/";
 $image_path = $theme_path . "images/";
 $smarty = new vtigerCRM_Smarty();
 if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
     $focus->id = "";
 }
 if (isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
     $smarty->assign("OP_MODE", vtlib_purify($_REQUEST['mode']));
 }
 if (!$_SESSION['rlvs'][$module]) {
     unset($_SESSION['rlvs']);
 }
 if (isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
     $userid = $current_user->id;
     $sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 7 and vtiger_field.presence in (0,2)";
     $result = $adb->pquery($sql, array());
     $num_fieldnames = $adb->num_rows($result);
     for ($i = 0; $i < $num_fieldnames; $i++) {
         $fieldname = $adb->query_result($result, $i, "fieldname");
         $permit = getFieldVisibilityPermission("Leads", $userid, $fieldname);
     }
 }
 $smarty->assign("TODO_PERMISSION", CheckFieldPermission('parent_id', 'Calendar'));
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:CallRelatedList.php


注:本文中的vtigerCRM_Smarty::assign方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。