/** * Function to Check for Security whether the Buttons are permitted in List/Edit/Detail View of all Modules * @param string $module -- module name * Returns an array with permission as Yes or No **/ function Button_Check($module) { global $log; $log->debug("Entering Button_Check(" . $module . ") method ..."); $permit_arr = array('EditView' => '', 'index' => '', 'Import' => '', 'Export' => '', 'Merge' => '', 'DuplicatesHandling' => ''); foreach ($permit_arr as $action => $perr) { $tempPer = isPermitted($module, $action, ''); $permit_arr[$action] = $tempPer; } $permit_arr["Calendar"] = isPermitted("Calendar", "index", ''); $permit_arr["moduleSettings"] = isModuleSettingPermitted($module); $log->debug("Exiting Button_Check method ..."); return $permit_arr; }
* 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. ********************************************************************************/ global $app_strings, $mod_strings, $current_language, $currentModule, $theme; global $list_max_entries_per_page; require_once 'Smarty_setup.php'; require_once 'include/ListView/ListView.php'; require_once 'modules/CustomView/CustomView.php'; require_once 'include/DatabaseUtil.php'; require_once "modules/{$currentModule}/{$currentModule}.php"; $category = getParentTab(); $url_string = ''; $tool_buttons = array("index" => "yes"); $tool_buttons["moduleSettings"] = isModuleSettingPermitted($currentModule); $list_buttons = array(); if (isPermitted($currentModule, 'Delete', '') == 'yes') { $list_buttons['del'] = $app_strings[LBL_MASS_DELETE]; } $focus = new $currentModule(); $sorder = $focus->getSortOrder(); $order_by = $focus->getOrderBy(); $_SESSION[$currentModule . "_Order_By"] = $order_by; $_SESSION[$currentModule . "_Sort_Order"] = $sorder; $smarty = new vtigerCRM_Smarty(); // Identify this module as custom module. $smarty->assign('CUSTOM_MODULE', true); $smarty->assign('MOD', $mod_strings); $smarty->assign('APP', $app_strings); $smarty->assign("THEME", $theme);