diff options
Diffstat (limited to 'mayor-orig/mayor-fenntarto/www/include')
4 files changed, 103 insertions, 0 deletions
diff --git a/mayor-orig/mayor-fenntarto/www/include/menu/private/hu_HU/module-fenntarto.php b/mayor-orig/mayor-fenntarto/www/include/menu/private/hu_HU/module-fenntarto.php new file mode 100644 index 00000000..ec3a5ea1 --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/include/menu/private/hu_HU/module-fenntarto.php @@ -0,0 +1,21 @@ +<?php + + $MENU['fenntarto'] = array(array('txt' => 'Fenntartó', 'url' => 'index.php?page=fenntarto')); + + // A menüpontok sorrendjének beállítása - ettől még nem jelenik meg semmi :) + $MENU['modules']['fenntarto'] = array( + 'vegpontok' => array(), + 'tantargyfelosztas' => array(), + ); + + $MENU['modules']['fenntarto']['admin'] = array(array('txt' => 'Admin', 'url' => 'index.php?page=fenntarto&sub=admin&f=nodes')); + $MENU['modules']['fenntarto']['naplo'] = array(array('txt' => 'Napló', 'url' => 'index.php?page=fenntarto&sub=naplo&f=tantargyfelosztas')); + $MENU['modules']['fenntarto']['sub']['admin'] = array( + 'nodes' => array(array('txt' => 'Végpontok')), + ); + $MENU['modules']['fenntarto']['sub']['naplo'] = array( + 'tantargyfelosztas' => array(array('txt' => 'Tantárgyfelosztás')), + ); + + +?>
\ No newline at end of file diff --git a/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/osztaly.php b/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/osztaly.php new file mode 100644 index 00000000..f6abf79c --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/osztaly.php @@ -0,0 +1,17 @@ +<?php + +function getEvfolyamJelek($SET = array('result'=>'indexed')) { + $J = array( +'1','2','3','4','5','6','7','8', +'9N','9/N','9Ny','9/Ny','9Kny','9/Kny','9AJTP','9/AJTP','9AJKP','9/AJKP','9','10','11','12','13','14','15', +'H1','H/I','H2','H/II/1','H/II/2', +'1/8','2/9','3/10','1/9','2/10','3/11', +'1/11','2/12','1/13','2/14','3/15','4/16','5/13' +); + if ($SET['result'] == 'idonly') return $J; + $ret = array(); + foreach ($J as $evfolyamJel) $ret[] = array('evfolyamJel'=>$evfolyamJel); + return $ret; +} + +?>
\ No newline at end of file diff --git a/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/rpc.php b/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/rpc.php new file mode 100644 index 00000000..7310bedf --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/rpc.php @@ -0,0 +1,38 @@ +<?php + + function getRPCRequests($userAccount, $requ = null) { + + if (isset($requ)) { + $q = "SELECT * FROM rpcKerelem WHERE userAccount='%s' AND requ LIKE '%%%s%%'"; + $v = array($userAccount, $requ); + } else { + $q = "SELECT * FROM rpcKerelem WHERE userAccount='%s'"; + $v = array($userAccount); + } + return db_query($q, array('debug'=>false,'fv'=>'getRPCRequests','modul'=>'fenntarto','result'=>'indexed','values'=>$v)); + + } + function delNodeFromRPCRequs($DATA) { + + $q = "DELETE FROM rpcKerelem WHERE nodeId=%u AND userAccount='%s' AND OMKod=%u"; + $v = array($DATA['nodeId'], $DATA['userAccount'], $DATA['OMKod']); + return db_query($q, array('debug'=>false,'fv'=>'delNodeFromRPCRequs','modul'=>'fenntarto','values'=>$v)); + + } + function addNodeToRPCRequs($DATA) { + + $q = "INSERT INTO rpcKerelem (nodeId, userAccount, OMKod) VALUES (%u, '%s', %u)"; + $v = array($DATA['nodeId'], $DATA['userAccount'], $DATA['OMKod']); + return db_query($q, array('debug'=>false,'fv'=>'addNodeToRPCRequs','modul'=>'fenntarto','values'=>$v)); + + } + function setRequests($DATA) { + + $q = "UPDATE rpcKerelem SET requ='%s' WHERE nodeId=%u AND userAccount='%s' AND OMKod=%u"; + $v = array(implode(',',$DATA['requ']),$DATA['nodeId'],$DATA['userAccount'],$DATA['OMKod']); + return db_query($q, array('debug'=>false,'fv'=>'setRequests','modul'=>'fenntarto','values'=>$v)); + + } + + +?> diff --git a/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/sql.php b/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/sql.php new file mode 100644 index 00000000..72d6ed11 --- /dev/null +++ b/mayor-orig/mayor-fenntarto/www/include/modules/fenntarto/share/sql.php @@ -0,0 +1,27 @@ +<?php + + function getEnumField($modul, $table, $field) { + + $table = '`'.str_replace('.','`.`',$table).'`'; + $q = "SHOW FIELDS FROM %s LIKE '%s'"; + $v = array($table, $field); + $field = db_query($q, array('fv' => 'getEnumField', 'modul' => $modul, 'result' => 'record', 'values' => $v)); + $enum = substr($field['Type'], 6, -2); + $values = explode("','", $enum); + + return $values; + } + + function getSetField($modul, $table, $field) { + + $table = '`'.str_replace('.','`.`',$table).'`'; + $q = "SHOW FIELDS FROM %s LIKE '%s'"; + $v = array($table, $field); + $field = db_query($q, array('fv' => 'getSetField', 'modul' => $modul, 'result' => 'record', 'values' => $v)); + $set = substr($field['Type'], 5, -2); + $values = explode("','", $set); + + return $values; + } + +?>
\ No newline at end of file |