| [ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 3 /********************************************************************************* 4 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 5 * ("License"); You may not use this file except in compliance with the License 6 * The Original Code is: vtiger CRM Open Source 7 * The Initial Developer of the Original Code is vtiger. 8 * Portions created by vtiger are Copyright (C) vtiger. 9 * All Rights Reserved. 10 * 11 ********************************************************************************/ 12 require_once ('include/database/PearDatabase.php'); 13 require_once('themes/'.$theme.'/layout_utils.php'); 14 require_once ('include/utils/UserInfoUtil.php'); 15 16 global $mod_strings; 17 global $app_strings; 18 global $app_list_strings; 19 20 global $adb; 21 global $theme; 22 $theme_path="themes/".$theme."/"; 23 $image_path=$theme_path."images/"; 24 require_once ($theme_path.'layout_utils.php'); 25 26 $smarty = new vtigerCRM_Smarty; 27 $sql = "select * from vtiger_profile"; 28 $profileListResult = $adb->query($sql); 29 $noofrows = $adb->num_rows($profileListResult); 30 $list_entries = array($mod_strings['LBL_LIST_NO'],$mod_strings['LBL_LIST_TOOLS'],$mod_strings['LBL_NEW_PROFILE_NAME'],$mod_strings['LBL_DESCRIPTION']); 31 32 /** gives the profile list info array 33 * @param $profileListResult -- profile list database result:: Type array 34 * @param $noofrows -- no of rows in the $profileListResult:: Type integer 35 * @param $mod_strings -- i18n mod_strings array:: Type array 36 * @returns $return_date -- profile list info array:: Type array 37 * 38 */ 39 function getStdOutput($profileListResult, $noofrows, $mod_strings) 40 { 41 global $adb; 42 $return_data = array(); 43 for($i=0; $i<$noofrows; $i++) 44 { 45 $standCustFld = array(); 46 $profile_name = $adb->query_result($profileListResult,$i,"profilename"); 47 $profile_id = $adb->query_result($profileListResult,$i,"profileid"); 48 $description = $adb->query_result($profileListResult,$i,"description"); 49 global $current_user; 50 $current_profile = fetchUserProfileId($current_user->id); 51 if($profile_id != 1 && $profile_id != 2 && $profile_id != 3 && $profile_id != 4 && $profile_id != $current_profile) 52 $standCustFld['del_permission']='yes'; 53 else 54 $standCustFld['del_permission']='no'; 55 56 $standCustFld['profileid']= $profile_id; 57 $standCustFld['profilename']= $profile_name; 58 $standCustFld['description']= $description; 59 $return_data[]=$standCustFld; 60 } 61 return $return_data; 62 } 63 64 $smarty->assign("LIST_HEADER",$list_entries); 65 $smarty->assign("LIST_ENTRIES",getStdOutput($profileListResult, $noofrows, $mod_strings)); 66 $smarty->assign("MOD", return_module_language($current_language,'Settings')); 67 $smarty->assign("PROFILES", $standCustFld); 68 $smarty->assign("IMAGE_PATH",$image_path); 69 $smarty->assign("COUNT",$noofrows); 70 $smarty->assign("APP", $app_strings); 71 $smarty->assign("CMOD", $mod_strings); 72 73 $smarty->display("UserProfileList.tpl"); 74 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |