key = 'db&operation=export'; break; case 'logs': $key = 'logs&operation=admin'; break; default: $key = $action; break; } //return returnperm($key,$perms); if(isset($perms[$key])) { return $perms[$key]; } return false; } function returnperm($key,$perms) { if(isset($perms[$key])) { return $perms[$key]; } else { return false; } } function check_itemaccess($itemid, $mname) { global $_G, $_SGLOBAL; if($mname == "shop") { $shopid = $itemid; } else { $shopid = DB::result_first("SELECT shopid FROM ".DB::table($mname."items")." WHERE itemid = $itemid"); } if(!empty($shopid)) { $shopcatid = DB::result_first("SELECT catid FROM ".DB::table("shopitems")." WHERE itemid = $shopid"); } if(!empty($shopcatid)) { if(!empty($_SGLOBAL['adminsession']['cpgroupshopcats']) && in_array($shopcatid, explode(",", $_SGLOBAL['adminsession']['cpgroupshopcats']))) { return true; } } return false; } /** * 鏄?惁闇 |