$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 = getModuleAccessArray();
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;
        }
        $readonlyfieldid = $fieldid . '_readonly';
        $readOnlyValue = $_REQUEST[$readonlyfieldid];
        //Updating the Mandatory vtiger_fields
        $uitype = $adb->query_result($fieldListResult, $i, "uitype");
        $displaytype = $adb->query_result($fieldListResult, $i, "displaytype");
示例#2
0
    $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;
    }
    $sql9 = "insert into vtiger_profile2utility values(?,?,?,?)";
    $adb->pquery($sql9, array($profileid, $tab_id, $action_id, $permission_value));
}
$modArr = getFieldModuleAccessArray();
foreach ($modArr as $fld_module => $fld_label) {
    $fieldListResult = getProfile2FieldList($fld_module, $first_prof_id);
    $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");
        $fieldname = $adb->query_result($fieldListResult, $i, "fieldname");
        $typeofdata = $adb->query_result($fieldListResult, $i, "typeofdata");