• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getActionname函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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);
开发者ID:sacredwebsite,项目名称:vtigercrm,代码行数:31,代码来源:UpdateProfileChanges.php


示例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) {
//.........这里部分代码省略.........
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:101,代码来源:UserInfoUtil.php


示例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";
//.........这里部分代码省略.........
开发者ID:jaimeaga84,项目名称:corebos,代码行数:101,代码来源:UserInfoUtil.php


示例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;
}
开发者ID:jgjermeni,项目名称:corebos,代码行数:19,代码来源:utils.php


示例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;
}
开发者ID:kduqi,项目名称:corebos,代码行数:34,代码来源:profilePrivileges.php


示例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";
//.........这里部分代码省略.........
开发者ID:kduqi,项目名称:corebos,代码行数:101,代码来源:UserInfoUtil.php



注:本文中的getActionname函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getActiveUserDetails函数代码示例发布时间:2022-05-15
下一篇:
PHP getAction函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap