示例#1
0
} else {
    $temp_module_strings = return_module_language($current_language, $fld_module);
}
$picklists_entries = getUserFldArray($fld_module, $roleid);
$available_module_picklist = array();
$picklist_fields = array();
if (!empty($picklists_entries)) {
    $available_module_picklist = get_available_module_picklist($picklists_entries);
    $picklist_fields = array_chunk(array_pad($picklists_entries, $value, ''), 3);
}
$mods = array();
foreach ($modules as $lbl => $m) {
    $mods[$m] = getTranslatedString($lbl, $m);
}
$smarty->assign("MODULE_LISTS", $mods);
$smarty->assign("ROLE_LISTS", getrole2picklist());
$smarty->assign("ALL_LISTS", $available_module_picklist);
$smarty->assign("APP", $app_strings);
//the include language files
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
//the settings module language file
$smarty->assign("MOD_PICKLIST", return_module_language($current_language, 'PickList'));
//the picklist module language files
$smarty->assign("TEMP_MOD", $temp_module_strings);
//the selected modules' language file
$smarty->assign("MODULE", $fld_module);
$smarty->assign("PICKLIST_VALUES", $picklist_fields);
$smarty->assign("THEME", $theme);
$smarty->assign("UITYPE", $uitype);
$smarty->assign("SEL_ROLEID", $roleid);
if ($_REQUEST['directmode'] != 'ajax') {
<?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;