diff options
Diffstat (limited to 'mayor-orig/mayor-fenntarto/www/policy/private')
4 files changed, 154 insertions, 0 deletions
diff --git a/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/admin/nodes-pre.php b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/admin/nodes-pre.php new file mode 100644 index 00000000..9e93b4b1 --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/admin/nodes-pre.php @@ -0,0 +1,69 @@ +<?php + + if (_RIGHTS_OK !== true) die(); + + + require_once('include/share/ssl/ssl.php'); + require_once('include/modules/fenntarto/share/rpc.php'); + require_once('include/modules/fenntarto/share/sql.php'); + + $ADAT['requests'] = getSetField('fenntarto', 'rpcKerelem', 'requ'); + + $ADAT['nodes'] = reindex(getPublicDataFromLocalKeychain(), array('nodeId')); + $ADAT['requ'] = getRPCRequests(_USERACCOUNT); + + $RPC = new Interconnect(); + $ADAT['my']['publicKey'] = $RPC->getPublicKey(); + $ADAT['my']['nodeId'] = $RPC->getNodeId(); + + if ($action == 'addNode') { + + $DATA['userAccount'] = _USERACCOUNT; + $DATA['nodeId'] = readVariable($_POST['nodeId'], 'id'); + $DATA['OMKod'] = readVariable($_POST['OMKod'], 'numeric unsigned'); + + addNodeToRPCRequs($DATA); + $ADAT['requ'] = getRPCRequests(_USERACCOUNT); + + } elseif ($action == 'setRequ') { + + $DATA['userAccount'] = _USERACCOUNT; + $DATA['nodeId'] = readVariable($_POST['nodeId'], 'id'); + $DATA['OMKod'] = readVariable($_POST['OMKod'], 'numeric unsigned'); + $DATA['requ'] = readVariable($_POST['requ'], 'enum', 'OMKod', $ADAT['requests']); + + setRequests($DATA); + $ADAT['requ'] = getRPCRequests(_USERACCOUNT); + + } elseif ($action == 'delRequ') { + + $DATA['userAccount'] = _USERACCOUNT; + $DATA['nodeId'] = readVariable($_POST['nodeId'], 'id'); + $DATA['OMKod'] = readVariable($_POST['OMKod'], 'numeric unsigned'); + + delNodeFromRPCRequs($DATA); + $ADAT['requ'] = getRPCRequests(_USERACCOUNT); + + } elseif ($action == 'checkJogosultsag') { + + // honnan + $DATA['nodeId'] = $ADAT['my']['nodeId']; + $DATA['userAccount'] = _USERACCOUNT; + // hova + $remoteNodeId = readVariable($_POST['nodeId'], 'id'); + $RPC->setRemoteHostByNodeId($remoteNodeId); + $DATA['OMKod'] = readVariable($_POST['OMKod'], 'numeric unsigned'); + // mit + $DATA['func'] = 'getPrivilegeInfo'; + + $RPC->setRequestTarget('naplo'); + $ADAT['rpcResult'] = $RPC->sendRequest($DATA); + if (is_array($ADAT['rpcResult']['alert'])) foreach ($ADAT['rpcResult']['alert'] as $alert) $_SESSION['alert'][] = $alert; + elseif (isset($ADAT['rpcResult']['alert'])) $_SESSION['alert'][] = $ADAT['rpcResult']['alert']; + if (is_array($ADAT['rpcResult']['priv'])) $ADAT['nodes'][ $RPC->getRemoteNodeId() ][0]['priv'] = $ADAT['rpcResult']['priv']; + //dump($ADAT['rpcResult']); + + } + + +?>
\ No newline at end of file diff --git a/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/admin/nodes.php b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/admin/nodes.php new file mode 100644 index 00000000..c01ea6f5 --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/admin/nodes.php @@ -0,0 +1,9 @@ +<?php + + if (_RIGHTS_OK !== true) die(); + + global $ADAT; + + putAddNodeForm($ADAT); + putRequestsForm($ADAT); +?>
\ No newline at end of file diff --git a/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/naplo/tantargyfelosztas-pre.php b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/naplo/tantargyfelosztas-pre.php new file mode 100644 index 00000000..5ae7643c --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/naplo/tantargyfelosztas-pre.php @@ -0,0 +1,65 @@ +<?php + + if (_RIGHTS_OK !== true) die(); + if (__NAPLOADMIN !== true && __VEZETOSEG !== true) { + $_SESSION['alert'][] = 'page:insufficient_access'; + } else { + + require_once('include/share/ssl/ssl.php'); + require_once('include/modules/fenntarto/share/rpc.php'); + require_once('include/modules/fenntarto/share/osztaly.php'); + require_once('include/modules/fenntarto/share/sql.php'); + + + $RPC = new Interconnect(); + $ADAT['my']['publicKey'] = $RPC->getPublicKey(); + $ADAT['my']['nodeId'] = $RPC->getNodeId(); + + $tanev = $ADAT['tanev'] = readVariable($_POST['tanev'], 'numeric unsigned'); + $ADAT['show'] = $req = readVariable($_POST['req'], 'string', null); + // Kívánt tantárgyfelosztást adó node-ok lekérdezése + $ADAT['requs'] = getRPCRequests(_USERACCOUNT, 'Tantárgyfelosztás'); + foreach ($ADAT['requs'] as $index => $rAdat) { + $nAdat = getPublicDataFromLocalKeychain($rAdat['nodeId']); + $ADAT['requs'][$index]['nev'] = $nAdat['nev']; + } + + if (isset($tanev)) { + + // Ezek jobb lenne, ha RPC-ből jönnének??? + // Most két helyen javíandó, ha változik (naplo/include/tantargyfelosztas) + $ADAT['evfolyamJelek'] = getEvfolyamJelek(array('result'=>'idonly')); + $ADAT['finanszírozott pedagógus létszám'] = array( + 'általános iskola' => 11.8, // 11.8 tanuló / 1 pedagógus + 'gimnázium' => 12.5, // 12.5 tanuló / 1 pedagógus + 'szakiskola, Híd programok' => 12, // ... + 'szakközépiskola, nem szakkképző évfolyam' => 12.4, + 'szakközépiskola, szakkképző évfolyam' => 13.7 + ); // -- TODO szakgimnázium??? + + + + if (is_array($ADAT['requs'])) foreach ($ADAT['requs'] as $rAdat) { + if (!in_array($rAdat['nodeId'].'/'.$rAdat['OMKod'], $req)) continue; + // honnan + $DATA['nodeId'] = $ADAT['my']['nodeId']; + $DATA['userAccount'] = _USERACCOUNT; + // hova + $RPC->setRemoteHostByNodeId($rAdat['nodeId']); + $DATA['OMKod'] = $rAdat['OMKod']; + // mit + $DATA['func'] = 'getTantargyfelosztasStat'; + $DATA['tanev'] = $tanev; + + $RPC->setRequestTarget('naplo'); + $ADAT['rpcResult'] = $RPC->sendRequest($DATA); + // alert + if (is_array($ADAT['rpcResult']['alert'])) foreach ($ADAT['rpcResult']['alert'] as $alert) $_SESSION['alert'][] = $alert; + elseif (isset($ADAT['rpcResult']['alert'])) $_SESSION['alert'][] = $ADAT['rpcResult']['alert']; + + $ADAT['intezmeny'][] = $ADAT['rpcResult']['IA']; + //dump($ADAT['rpcResult']); + } + } + } +?>
\ No newline at end of file diff --git a/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/naplo/tantargyfelosztas.php b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/naplo/tantargyfelosztas.php new file mode 100644 index 00000000..168366af --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/policy/private/fenntarto/naplo/tantargyfelosztas.php @@ -0,0 +1,11 @@ +<?php + + if (_RIGHTS_OK !== true) die(); + + global $ADAT; + + putTanevIntezmenySelect($ADAT); + if (is_array($ADAT['intezmeny']) && count($ADAT['intezmeny'])>0) putStat($ADAT); + + +?>
\ No newline at end of file |