本文整理汇总了PHP中sapp_Global::_check_menu_access方法的典型用法代码示例。如果您正苦于以下问题:PHP sapp_Global::_check_menu_access方法的具体用法?PHP sapp_Global::_check_menu_access怎么用?PHP sapp_Global::_check_menu_access使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sapp_Global
的用法示例。
在下文中一共展示了sapp_Global::_check_menu_access方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveagencycomment
/**
* This function acts as a service to save comments given by agency for particular screening detail(isactive is active) of each employee / candidate
* @param array $params_arr = array of parameters
* userid, groupid, roleid, detailid, comment are the input parameters
* @return array of comments.
*/
public function saveagencycomment($params_arr)
{
$result = array();
$status = 0;
$message = "Message cannot be saved.";
$edit_flag = 'No';
if (isset($params_arr['role_id']) && $params_arr['role_id'] != '' && isset($params_arr['group_id']) && $params_arr['group_id'] != '' && $params_arr['group_id'] == $this->usergroup && isset($params_arr['detailid'])) {
$role_id = $params_arr['role_id'];
$group_id = $params_arr['group_id'];
$loginid = $params_arr['userid'];
$detailid = $params_arr['detailid'];
$comment = $params_arr['comment'];
$empscreening_model = new Services_Model_Empscreening();
$privilege_flag = sapp_Global::_check_menu_access(EMPSCREENING, $group_id, $role_id);
$edit_flag = sapp_Global::_checkprivileges(EMPSCREENING, $group_id, $role_id, "edit");
$checkarr = $empscreening_model->checkagencyfordetail($detailid, $loginid);
if ($privilege_flag == 'Yes' && $edit_flag == 'Yes' && $checkarr != 'norows') {
$commentflag = $empscreening_model->savecomment($detailid, $loginid, $comment);
if ($commentflag) {
$message = "Success.";
} else {
$message = "Message cannot be saved.";
}
} else {
$message = "you are not authorized to access this page";
}
}
return array('status' => $status, 'message' => $message, 'result' => $result, 'edit_flag' => $edit_flag);
}