Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.216.57.57
<?php
function getUserRightsDetails($aobj_context){
session_start();
$college_code= $aobj_context->mobj_data['collcode'];;
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$get_user_type="SELECT FMENUCODE AS `key`,FMENUCODE AS `value`, fmenuname AS `label` FROM col_masmenu WHERE fmenucode LIKE '%M%'";
$lobj_get_user_type = $aobj_context->mobj_db->GetAll($get_user_type);
$arr['user_rights_module_type']=$lobj_get_user_type;
$get_super_viser = "SELECT s.internal_code AS `key`, s.internal_code AS `value`,CONCAT(real_name,' - ',sysusr) AS label FROM s_sysdb s
WHERE college_code='{$college_code}' ORDER BY real_name,sysusr";
$lobj_get_super_viser = $aobj_context->mobj_db->GetAll($get_super_viser);
$arr['user_rights_user']=$lobj_get_super_viser;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function usersGetModuleNames($aobj_context){
$module_type=($aobj_context->mobj_data["module"]);
$user_id=($aobj_context->mobj_data["user"]);
$query = "SELECT fmenucode AS `key`,fmenucode AS `value`,fmenuname as label
FROM col_masmenu WHERE fmainmenu='{$module_type}'";
$res = $aobj_context->mobj_db->GetAll($query);
if($res){
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
}else{
echo $aobj_context->mobj_output->ToJSONEnvelope($res,-1,"failed");
}
}
?>
|