コード例 #1
0
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
 * @param $profileid -- profile id:: Type integer
 * @returns $standCustFld -- field label/permission array :: Type varchar
 *
 */
function getStdOutput($fieldListResult, $noofrows, $lang_strings, $profileid)
{
コード例 #2
0
global $theme;
global $theme_path;
global $image_path;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$field_module = array();
$result = $adb->query("select name from ec_tab where reportable=1 order by tabid");
$num_rows = $adb->num_rows($result);
for ($i = 0; $i < $num_rows; $i++) {
    $modulename = $adb->query_result($result, $i, 'name');
    $field_module[] = $modulename;
}
$allfields = array();
foreach ($field_module as $fld_module) {
    $language_strings = return_module_language($current_language, $fld_module);
    $allfields[$fld_module] = getStdOutput($fld_module, $language_strings);
}
if ($_REQUEST['fld_module'] != '') {
    $smarty->assign("DEF_MODULE", $_REQUEST['fld_module']);
} else {
    $smarty->assign("DEF_MODULE", 'Quotes');
}
/** 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 $lang_strings -- i18n language mod strings array:: Type array
 * @param $profileid -- profile id:: Type integer
 * @returns $standCustFld -- field label/permission array :: Type varchar
 *
 */
function getStdOutput($fld_module, $lang_strings)
{
コード例 #3
0
    $userinfo = array_chunk($userinfo, 2);
    //Check for Current User
    global $current_user;
    $current_role = fetchUserRole($current_user->id);
    $return_data = array('profileinfo' => $profileinfo, 'userinfo' => $userinfo);
    return $return_data;
}
if (isset($_REQUEST['roleid']) && $_REQUEST['roleid'] != '') {
    $roleid = vtlib_purify($_REQUEST['roleid']);
    $mode = vtlib_purify($_REQUEST['mode']);
    $roleInfo = getRoleInformation($roleid);
    $thisRoleDet = $roleInfo[$roleid];
    $rolename = $thisRoleDet[0];
    $parent = $thisRoleDet[3];
    //retreiving the vtiger_profileid
    $roleRelatedProfiles = getRoleRelatedProfiles($roleid);
}
$parentname = getRoleName($parent);
//Retreiving the Role Info
$roleInfoArr = getRoleInformation($roleid);
$rolename = $roleInfoArr[$roleid][0];
$smarty->assign("ROLE_NAME", $rolename);
$smarty->assign("ROLEID", $roleid);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
$smarty->assign("ROLEINFO", getStdOutput($roleid));
$smarty->assign("PARENTNAME", $parentname);
$smarty->display("RoleDetailView.tpl");
コード例 #4
0
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
 ********************************************************************************/
require_once 'include/database/PearDatabase.php';
require_once 'include/utils/UserInfoUtil.php';
global $mod_strings;
global $app_strings;
global $app_list_strings;
$groupId = vtlib_purify($_REQUEST['groupId']);
$groupInfoArr = getGroupInfo($groupId);
$smarty = new vtigerCRM_Smarty();
global $adb;
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
$smarty->assign("GROUPINFO", getStdOutput($groupInfoArr, $groupId, $mod_strings));
$smarty->assign("GROUPID", $groupId);
$smarty->assign("GROUP_NAME", $groupInfoArr[0]);
/** Gives the group info and the group member info array 
  * @param $groupInfoArr -- Group Info Array got by calling getGroupInfo($groupId):: Type array
  * @param $groupID -- group id::Type integer
  * @param $mod_strings -- i18n mod strings array::Type array
  * @returns $returndata:: Type array, Example array format given below
	Array
	(
    	[0] => Array
        	(
            		[groupname] => vtiger grp
            		[description] => 
        	)
コード例 #5
0
    global $adb;
    $return_data = array();
    for ($i = 0; $i < $noofrows; $i++) {
        $standCustFld = array();
        $profile_name = $adb->query_result($profileListResult, $i, "profilename");
        $profile_id = $adb->query_result($profileListResult, $i, "profileid");
        $description = $adb->query_result($profileListResult, $i, "description");
        global $current_user;
        $current_profile = fetchUserProfileId($current_user->id);
        if ($profile_id != 1 && $profile_id != $current_profile) {
            $standCustFld['del_permission'] = 'yes';
        } else {
            $standCustFld['del_permission'] = 'no';
        }
        $standCustFld['profileid'] = $profile_id;
        $standCustFld['profilename'] = $profile_name;
        $standCustFld['description'] = $description;
        $return_data[] = $standCustFld;
    }
    return $return_data;
}
$smarty->assign("LIST_HEADER", $list_entries);
$smarty->assign("LIST_ENTRIES", getStdOutput($profileListResult, $noofrows, $mod_strings));
$smarty->assign("MOD", return_module_language($current_language, 'Settings'));
$smarty->assign("PROFILES", $standCustFld);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("COUNT", $noofrows);
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
$smarty->display("UserProfileList.tpl");