Exemple #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 'include/utils/UserInfoUtil.php';
require_once 'include/utils/utils.php';
global $app_strings, $mod_strings, $current_user, $currentModule, $adb, $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$profileId = vtlib_purify($_REQUEST['profileid']);
$profileName = '';
$profileDescription = '';
if (!empty($profileId)) {
    if (!profileExists($profileId) || !is_numeric($profileId)) {
        die(getTranslatedString('ERR_INVALID_PROFILE_ID', $currentModule));
    }
} elseif ($_REQUEST['mode'] != 'create') {
    die(getTranslatedString('ERR_INVALID_PROFILE_ID', $currentModule));
}
$parentProfileId = vtlib_purify($_REQUEST['parentprofile']);
if ($_REQUEST['mode'] == 'create' && $_REQUEST['radiobutton'] != 'baseprofile') {
    $parentProfileId = '';
}
$smarty = new vtigerCRM_Smarty();
if (isset($_REQUEST['selected_tab']) && vtlib_purify($_REQUEST['selected_tab']) != '') {
    $smarty->assign("SELECTED_TAB", vtlib_purify($_REQUEST['selected_tab']));
} else {
    $smarty->assign("SELECTED_TAB", "global_privileges");
}
Exemple #2
0
 * All Rights Reserved.
 ********************************************************************************/
require_once 'include/utils/UserInfoUtil.php';
require_once 'include/utils/utils.php';
global $app_strings;
global $mod_strings;
global $current_user, $currentModule;
global $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$profileId = vtlib_purify($_REQUEST['profileid']);
$profileName = '';
$profileDescription = '';
if (!empty($profileId)) {
    if (!profileExists($profileId)) {
        die(getTranslatedString('ERR_INVALID_PROFILE_ID', $currentModule));
    }
} elseif ($_REQUEST['mode'] != 'create') {
    die(getTranslatedString('ERR_INVALID_PROFILE_ID', $currentModule));
}
$parentProfileId = vtlib_purify($_REQUEST['parentprofile']);
if ($_REQUEST['mode'] == 'create' && $_REQUEST['radiobutton'] != 'baseprofile') {
    $parentProfileId = '';
}
$smarty = new vtigerCRM_Smarty();
if (isset($_REQUEST['selected_tab']) && $_REQUEST['selected_tab'] != '') {
    $smarty->assign("SELECTED_TAB", vtlib_purify($_REQUEST['selected_tab']));
} else {
    $smarty->assign("SELECTED_TAB", "global_privileges");
}