Beispiel #1
0
//Update Profile 2 utility
for ($i = 0; $i < $num_act_util_per; $i++) {
    $tab_id = $adb->query_result($act_utility_result, $i, "tabid");
    $action_id = $adb->query_result($act_utility_result, $i, "activityid");
    $action_name = getActionname($action_id);
    $request_var = $tab_id . '_' . $action_name;
    $permission = $_REQUEST[$request_var];
    if ($permission == 'on') {
        $permission_value = 0;
    } else {
        $permission_value = 1;
    }
    $update_query = "update vtiger_profile2utility set permission=? where tabid=? and activityid=? and profileid=?";
    $adb->pquery($update_query, array($permission_value, $tab_id, $action_id, $profileid));
}
$modArr = getFieldModuleAccessArray();
foreach ($modArr as $fld_module => $fld_label) {
    $fieldListResult = getProfile2FieldList($fld_module, $profileid);
    $noofrows = $adb->num_rows($fieldListResult);
    $tab_id = getTabid($fld_module);
    for ($i = 0; $i < $noofrows; $i++) {
        $fieldid = $adb->query_result($fieldListResult, $i, "fieldid");
        $visible = $_REQUEST[$fieldid];
        if ($visible == 'on') {
            $visible_value = 0;
        } else {
            $visible_value = 1;
        }
        //Updating the Mandatory vtiger_fields
        $uitype = $adb->query_result($fieldListResult, $i, "uitype");
        $displaytype = $adb->query_result($fieldListResult, $i, "displaytype");
 * ("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 'include/utils/UserInfoUtil.php';
require_once 'include/utils/utils.php';
global $mod_strings;
global $app_strings;
global $app_list_strings;
global $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$field_module = getFieldModuleAccessArray();
$allfields = array();
foreach ($field_module as $fld_module) {
    $fieldListResult = getDefOrgFieldList($fld_module);
    $noofrows = $adb->num_rows($fieldListResult);
    $language_strings = return_module_language($current_language, $fld_module);
    $allfields[$fld_module] = getStdOutput($fieldListResult, $noofrows, $language_strings, $profileid);
}
if ($_REQUEST['fld_module'] != '') {
    $smarty->assign("DEF_MODULE", vtlib_purify($_REQUEST['fld_module']));
} else {
    $smarty->assign("DEF_MODULE", 'Leads');
}
/** Function to get the field label/permission array to construct the default orgnization field UI for the specified profile 
 * @param $fieldListResult -- mysql query result that contains the field label and uitype:: Type array
 * @param $mod_strings -- i18n language mod strings array:: Type array
Beispiel #3
0
/** Function to get the list of module for which the user defined sharing rules can be defined  
 * @returns Array:: Type array
 *
 */
function getSharingModuleList()
{
    global $log;
    //changed by dingjianting on 2007-2-28 for new version to support new modules easy
    //$sharingModuleArray=Array('Accounts', 'Leads', 'Contacts', 'Potentials','HelpDesk', 'Emails', 'Campaigns', 'Quotes','PurchaseOrder', 'SalesOrder', 'Invoice');
    $sharingModuleArray = getFieldModuleAccessArray();
    $sharingModuleArray = array_keys($sharingModuleArray);
    return $sharingModuleArray;
}