本文整理汇总了PHP中getActionname函数的典型用法代码示例。如果您正苦于以下问题:PHP getActionname函数的具体用法?PHP getActionname怎么用?PHP getActionname使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getActionname函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
} else {
$permission_value = 1;
}
$update_query = "update vtiger_profile2standardpermissions set permissions=? where tabid=? and Operation=? and profileid=?";
$adb->pquery($update_query, array($permission_value, $tab_id, $action_id, $profileid));
if ($tab_id == 9) {
$update_query = "update vtiger_profile2standardpermissions set permissions=? where tabid=16 and Operation=? and profileid=?";
$adb->pquery($update_query, array($permission_value, $action_id, $profileid));
}
}
}
//Update Profile 2 utility
for ($i = 0; $i < $num_act_util_per; $i++) {
$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);
示例2: isPermitted
/** Function to check if the currently logged in user is permitted to perform the specified action
* @param $module -- Module Name:: Type varchar
* @param $actionname -- Action Name:: Type varchar
* @param $recordid -- Record Id:: Type integer
* @returns yes or no. If Yes means this action is allowed for the currently logged in user. If no means this action is not allowed for the currently logged in user
*
*/
function isPermitted($module, $actionname, $record_id = '')
{
$log = vglobal('log');
$log->debug("Entering isPermitted(" . $module . "," . $actionname . "," . $record_id . ") method ...");
$adb = PearDatabase::getInstance();
$current_user = vglobal('current_user');
global $seclog;
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
$permission = 'no';
if (($module == 'Users' || $module == 'Home' || $module == 'uploads') && $_REQUEST['parenttab'] != 'Settings') {
//These modules dont have security right now
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking the Access for the Settings Module
if ($module == 'Settings' || $module == 'Administration' || $module == 'System' || $_REQUEST['parenttab'] == 'Settings') {
if (!$is_admin) {
$permission = 'no';
} else {
$permission = 'yes';
}
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Retreiving the Tabid and Action Id
$tabid = getTabid($module);
$actionid = getActionid($actionname);
$checkModule = $module;
if ($checkModule == 'Events') {
$checkModule = 'Calendar';
}
if (vtlib_isModuleActive($checkModule)) {
//Checking whether the user is admin
if ($is_admin) {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//If no actionid, then allow action is vtiger_tab permission is available
if ($actionid === '') {
if ($profileTabsPermission[$tabid] == 0) {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
} else {
$permission = 'no';
}
return $permission;
}
$action = getActionname($actionid);
//Checking for view all permission
if ($profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
if ($actionid == 3 || $actionid == 4) {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Checking for edit all permission
if ($profileGlobalPermission[2] == 0) {
if ($actionid == 3 || $actionid == 4 || $actionid == 0 || $actionid == 1) {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Checking for vtiger_tab permission
if ($profileTabsPermission[$tabid] != 0) {
$permission = 'no';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking for Action Permission
if (strlen($profileActionPermission[$tabid][$actionid]) < 1 && $profileActionPermission[$tabid][$actionid] == '') {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
if ($profileActionPermission[$tabid][$actionid] != 0 && $profileActionPermission[$tabid][$actionid] != '') {
$permission = 'no';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking and returning true if recorid is null
if ($record_id == '') {
$permission = 'yes';
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//If modules is Products,Vendors,Faq,PriceBook then no sharing
if ($record_id != '') {
if (getTabOwnedBy($module) == 1) {
//.........这里部分代码省略.........
示例3: isPermitted
/** Function to check if the currently logged in user is permitted to perform the specified action
* @param $module -- Module Name:: Type varchar
* @param $actionname -- Action Name:: Type varchar
* @param $recordid -- Record Id:: Type integer
* @returns yes or no. If Yes means this action is allowed for the currently logged in user. If no means this action is not allowed for the currently logged in user
*
*/
function isPermitted($module, $actionname, $record_id = '')
{
global $log;
$log->debug("Entering isPermitted(" . $module . "," . $actionname . "," . $record_id . ") method ...");
global $adb;
global $current_user;
global $seclog;
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
$parenttab = empty($_REQUEST['parenttab']) ? '' : vtlib_purify($_REQUEST['parenttab']);
$permission = "no";
if (($module == 'Users' || $module == 'Home' || $module == 'uploads') && $parenttab != 'Settings') {
//These modules dont have security right now
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking the Access for the Settings Module
if ($module == 'Settings' || $module == 'Administration' || $parenttab == 'Settings') {
if (!$is_admin) {
$permission = "no";
} else {
$permission = "yes";
}
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking whether the user is admin
if ($is_admin) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Retreiving the Tabid and Action Id
$tabid = getTabid($module);
$actionid = getActionid($actionname);
//If no actionid, then allow action is vtiger_tab permission is available
if ($actionid === '') {
if ($profileTabsPermission[$tabid] == 0) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
} else {
$permission = "no";
}
return $permission;
}
$action = getActionname($actionid);
//Checking for view all permission
if ($profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
if ($actionid == 3 || $actionid == 4) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Checking for edit all permission
if ($profileGlobalPermission[2] == 0) {
if ($actionid == 3 || $actionid == 4 || $actionid == 0 || $actionid == 1) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Checking for vtiger_tab permission
if ($profileTabsPermission[$tabid] != 0) {
$permission = "no";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
if (!isset($profileActionPermission[$tabid][$actionid]) && $action == 'Export') {
return "no";
}
//Checking for Action Permission
if (strlen($profileActionPermission[$tabid][$actionid]) < 1 && $profileActionPermission[$tabid][$actionid] == '') {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
if ($profileActionPermission[$tabid][$actionid] != 0 && $profileActionPermission[$tabid][$actionid] != '') {
$permission = "no";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking and returning true if recorid is null
if ($record_id == '') {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//If modules is Products,Vendors,Faq,PriceBook then no sharing
if ($record_id != '') {
if (getTabOwnedBy($module) == 1) {
$permission = "yes";
//.........这里部分代码省略.........
示例4: getQuickCreate
/** Function to getQuickCreate for a given tabid
* @param $tabid -- tab id :: Type string
* @param $actionid -- action id :: Type integer
* @returns $QuickCreateForm -- QuickCreateForm :: Type boolean
*/
function getQuickCreate($tabid, $actionid)
{
global $log;
$log->debug("Entering getQuickCreate(" . $tabid . "," . $actionid . ") method ...");
$module = getTabModuleName($tabid);
$actionname = getActionname($actionid);
$QuickCreateForm = 'true';
$perr = isPermitted($module, $actionname);
if ($perr == 'no') {
$QuickCreateForm = 'false';
}
$log->debug("Exiting getQuickCreate method ...");
return $QuickCreateForm;
}
示例5: getDisplayOutput
/** returns html check box code based on the input id
* @param $id -- Role Name:: Type varchar
* @returns $value -- html check box code:: Type varcha:w
*/
function getDisplayOutput($id, $tabid, $actionid)
{
if ($actionid == '') {
$name = $tabid . '_tab';
$ckbox_id = 'tab_chk_com_' . $tabid;
$jsfn = 'hideTab(' . $tabid . ')';
} else {
$temp_name = getActionname($actionid);
$name = $tabid . '_' . $temp_name;
$ckbox_id = 'tab_chk_' . $actionid . '_' . $tabid;
if ($actionid == 1) {
$jsfn = 'unSelectCreate(' . $tabid . ')';
} elseif ($actionid == 4) {
$jsfn = 'unSelectView(' . $tabid . ')';
} elseif ($actionid == 2) {
$jsfn = 'unSelectDelete(' . $tabid . ')';
} else {
$ckbox_id = $tabid . '_field_util_' . $actionid;
$jsfn = 'javascript:';
}
}
if ($id == '' && $id != 0) {
$value = '';
} elseif ($id == 0) {
$value = '<input type="checkbox" onClick="' . $jsfn . ';" id="' . $ckbox_id . '" name="' . $name . '" checked>';
} elseif ($id == 1) {
$value = '<input type="checkbox" onClick="' . $jsfn . ';" id="' . $ckbox_id . '" name="' . $name . '">';
}
return $value;
}
示例6: _vtisPermitted
/** Function to check if the currently logged in user is permitted to perform the specified action
* @param $module -- Module Name:: Type varchar
* @param $actionname -- Action Name:: Type varchar
* @param $recordid -- Record Id:: Type integer
* @returns yes or no. If Yes means this action is allowed for the currently logged in user. If no means this action is not allowed for the currently logged in user
*/
function _vtisPermitted($module, $actionname, $record_id = '')
{
global $log, $adb, $current_user, $seclog;
$log->debug("Entering isPermitted(" . $module . "," . $actionname . "," . $record_id . ") method ...");
if (strpos($record_id, 'x') > 0) {
// is webserviceid
list($void, $record_id) = explode('x', $record_id);
}
require 'user_privileges/user_privileges_' . $current_user->id . '.php';
require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
$parenttab = empty($_REQUEST['parenttab']) ? '' : vtlib_purify($_REQUEST['parenttab']);
$permission = "no";
if (($module == 'Users' || $module == 'Home' || $module == 'uploads') && $parenttab != 'Settings') {
//These modules dont have security right now
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking the Access for the Settings Module
if ($module == 'Settings' || $module == 'Administration' || $parenttab == 'Settings') {
if (!$is_admin) {
$permission = "no";
} else {
$permission = "yes";
}
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking whether the user is admin
if ($is_admin) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Retreiving the Tabid and Action Id
$tabid = getTabid($module);
$actionid = getActionid($actionname);
//If no actionid, then allow action is vtiger_tab permission is available
if ($actionid === '') {
if ($profileTabsPermission[$tabid] == 0) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
} else {
$permission = "no";
}
return $permission;
}
$action = getActionname($actionid);
//Checking for view all permission
if ($profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
if ($actionid == 3 || $actionid == 4) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Checking for edit all permission
if ($profileGlobalPermission[2] == 0) {
if ($actionid == 3 || $actionid == 4 || $actionid == 0 || $actionid == 1) {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
}
//Checking for vtiger_tab permission
if ($profileTabsPermission[$tabid] != 0) {
$permission = "no";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
if (!isset($profileActionPermission[$tabid][$actionid]) && ($action == 'Export' || $action == 'Import')) {
return "no";
}
//Checking for Action Permission
if (strlen($profileActionPermission[$tabid][$actionid]) < 1 && $profileActionPermission[$tabid][$actionid] == '') {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
if ($profileActionPermission[$tabid][$actionid] != 0 && $profileActionPermission[$tabid][$actionid] != '') {
$permission = "no";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//Checking and returning true if recorid is null
if ($record_id == '') {
$permission = "yes";
$log->debug("Exiting isPermitted method ...");
return $permission;
}
//If modules is Faq or PriceBook then no sharing
if ($record_id != '') {
if (getTabOwnedBy($module) == 1) {
$permission = "yes";
//.........这里部分代码省略.........