From f51c9ed2abe5c68211bb3736be5f70b1fe2c9ec0 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Fri, 8 Mar 2019 21:20:34 +0100 Subject: további rendrakás --- mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php | 70 ---------------------- 1 file changed, 70 deletions(-) delete mode 100644 mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php (limited to 'mayor-orig/www/policy/public/rpc/naplo') diff --git a/mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php b/mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php deleted file mode 100644 index aba7552f..00000000 --- a/mayor-orig/www/policy/public/rpc/naplo/rpc-pre.php +++ /dev/null @@ -1,70 +0,0 @@ -setRemoteHostByNodeId($senderNodeId); - $RPC->processRequest(); - $_RPC['request'] = $RPC->getIncomingRequest(); - */ - $func = $_RPC['request']['func']; - // processing - $DATA = array(); - if (isset($func) && $func!='') { - switch ($func) { - // itt a currens verziót kellene visszaadni - case 'getVersion': - case 'ping': - $DATA = array('func'=>'getVersion','revision'=>_MAYORREV,'pong'); - $RPC->setResponse($DATA); - break; - case 'getPrivilegeInfo': - $nodeId = $_RPC['senderNodeId']; - $userAccount = readVariable($_RPC['request']['userAccount'], 'string'); - $OMKod = readVariable($_RPC['request']['OMKod'],'numeric unsigned'); - $priv = explode(',',getRPCPrivilegeByNUO($nodeId, $userAccount, $OMKod)); - if (is_array($priv) && in_array('Jogosultság',$priv)) { - $DATA = array('func'=>'getPrivilegeInfo','result'=>'success','priv'=>$priv); - } else { - $DATA = array('func'=>'getPrivilegeInfo','result'=>'failure','alert'=>'message:insufficient_access'); - } - $RPC->setResponse($DATA); - break; - case 'getTantargyfelosztasStat': - $nodeId = $_RPC['senderNodeId']; - $userAccount = readVariable($_RPC['request']['userAccount'], 'string'); - $OMKod = readVariable($_RPC['request']['OMKod'],'numeric unsigned'); // a naplo/base/rights már felhasználta az __INTEZMENY beállításnál - $priv = explode(',',getRPCPrivilegeByNUO($nodeId, $userAccount, $OMKod)); - if (is_array($priv) && in_array('Tantárgyfelosztás',$priv)) { - // Az __INTEZMENY és __TANEV beállítását a naplo/rights.php már elvégezte... - - require_once('include/modules/naplo/share/intezmenyek.php'); - require_once('include/modules/naplo/share/osztaly.php'); - require_once('include/modules/naplo/share/targy.php'); - require_once('include/modules/naplo/share/tankor.php'); - require_once('include/modules/naplo/stat/tantargyFelosztas.php'); - global $ADAT; $ADAT = array(); - $IA = getTantargyfelosztasStat(); - - $DATA = array('func'=>'getTantargyfelosztasStat','result'=>'success','tanev'=>__TANEV,'intezmeny'=>__INTEZMENY, 'IA'=>$IA); - } else { - $DATA = array('func'=>'getTantargyfelosztasStat','result'=>'failure','alert'=>'message:insufficient_access'); - } - $RPC->setResponse($DATA); - break; - default: - $DATA['result'] = 'ismeretlen függvény: '.$func; - break; - } - - } -?> -- cgit v1.2.3