From aaab24c8c081b8e2b42cf8bf003120f27070aa6c Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Wed, 15 Dec 2021 20:35:04 +0100 Subject: Rev: 4825 --- .../modules/naplo/dokumentum/dokumentum.php | 13 +++++-- .../www/include/modules/naplo/share/tanar.php | 18 +++++++++- .../www/policy/private/naplo/admin/debug-pre.php | 2 ++ .../private/naplo/dokumentum/dokumentum-pre.php | 12 +++++-- .../policy/private/naplo/dokumentum/dokumentum.php | 1 - .../www/policy/private/naplo/szulinap-pre.php | 5 ++- .../www/policy/private/naplo/szulinap.php | 13 ++++++- .../module-naplo/css/dokumentum/dokumentum.css | 12 +++++++ .../module-naplo/html/dokumentum/dokumentum.phtml | 42 +++++++++++++--------- 9 files changed, 93 insertions(+), 25 deletions(-) (limited to 'mayor-orig/mayor-naplo/www') diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/dokumentum/dokumentum.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/dokumentum/dokumentum.php index 9e454063..6dc46577 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/dokumentum/dokumentum.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/dokumentum/dokumentum.php @@ -2,7 +2,7 @@ function getDokumentumok() { - $q = "SELECT * FROM dokumentum ORDER BY dokumentumId"; + $q = "SELECT * FROM dokumentum ORDER BY dokumentumTipus, dokumentumSorrend"; $v = array(); $r = db_query($q, array('modul'=>'naplo_intezmeny','fv'=>'dokumentum','values'=>$v, 'result'=>'indexed')); return $r; @@ -11,17 +11,24 @@ function getDokumentumokAssoc() { - $q = "select dokumentum.*,IFNULL(tanev,YEAR(dokumentumDt)) AS dokumentumTanev from dokumentum left join szemeszter ON (dokumentumDt>kezdesDt && dokumentumDt<=szemeszter.ZarasDt)"; + $q = "select dokumentum.*,IFNULL(tanev,YEAR(dokumentumDt)) AS dokumentumTanev from dokumentum left join szemeszter ON (dokumentumDt>kezdesDt && dokumentumDt<=szemeszter.ZarasDt) +ORDER BY dokumentumTipus, dokumentumSorrend"; $v = array(); $r = db_query($q, array('modul'=>'naplo_intezmeny','fv'=>'dokumentum','values'=>$v, 'result'=>'indexed')); - return reindex($r,array('dokumentumTipus','dokumentumTanev')); + return (reindex($r,array('dokumentumTipus','dokumentumTanev'))); return $r; } function updateDokumentum($ADAT) { + if ($ADAT['dokumentumSorrend']>0 && readVariable($ADAT['dokumentumId'],'id')>0) { + $q = "UPDATE dokumentum SET dokumentumSorrend=%u WHERE dokumentumId=%u"; + $v = array(intval($ADAT['dokumentumSorrend']),intval($ADAT['dokumentumId'])); + $r = db_query($q, array('modul'=>'naplo_intezmeny','fv'=>'dokumentum','values'=>$v, 'result'=>'update')); + } + return $r; } diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php index 0a931863..77b47fb8 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php @@ -121,7 +121,7 @@ if (!is_array($tanarIds)) $tanarIds = array($tanarIds); $q = "SELECT *,TRIM(CONCAT_WS(' ',viseltNevElotag, ViseltCsaladiNev, viseltUtoNev)) AS tanarNev FROM ".__INTEZMENYDBNEV.".tanar WHERE tanarId IN (".implode(',', array_fill(0, count($tanarIds), '%u')).")"; - $R = db_query($q, array('fv' => 'getTanarAdatById', 'modul' => 'naplo_intezmeny', 'result' => 'indexed', 'values' => $tanarIds)); + $R = db_query($q, array('fv' => 'getTanarAdatById', 'modul' => 'naplo_intezmeny', 'result' => 'indexed', 'values' => $tanarIds), $olr); // for ($i=0; $i$lr,'fv' => 'getTanarBySzulDt', 'modul' => 'naplo_intezmeny', 'result' => 'idonly', 'values' => array('____-'.$md))); + if (count($tanarIds)>0) { + $RET = getTanarAdatById($tanarIds,$lr); + } else { + $RET = false; + } + db_close($lr); + return $RET; + } + ?> diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/debug-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/debug-pre.php index 1eed8cb9..d6862ba9 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/debug-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/admin/debug-pre.php @@ -17,6 +17,8 @@ if (__NAPLOADMIN!==true) { ini_set('xdebug.var_display_max_children', '4096'); ini_set('xdebug.var_display_max_data', '4096'); + $ADAT['debug_result']['post_max_size'] = ini_get('post_max_size'); + $ADAT['debug_result']['config']['backend'] = $config['backend']; $ADAT['debug_result']['config']['MYSQLI_ENABLED'] = MYSQLI_ENABLED; $ADAT['debug_result']['config']['__PORTAL_CODE'] = __PORTAL_CODE; diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum-pre.php index c41e820c..3ff6eab7 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum-pre.php @@ -30,9 +30,17 @@ 'dokumentumPolicy' => $_policy ) ); - } elseif ($action=='delDokumentum') { + } elseif ($action=='delModDokumentum') { $_ids = readVariable($_POST['dokumentumId'],'id'); - delDokumentum($_ids); + for($i=0; $i ($_ids[$i]), + 'dokumentumSorrend' => readVariable($_POST['sorrend_'.$_ids[$i]],'id',1) + ); + updateDokumentum($DATA); + } + $_delids = readVariable($_POST['delDokumentumId'],'id'); + delDokumentum($_delids); } } $ADAT = getDokumentumok(); diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum.php index 04259088..89919bc1 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum.php @@ -7,7 +7,6 @@ global $ADAT,$ADATASSOC; if (__NAPLOADMIN===true) { - putDokumentumLista($ADATASSOC); putDokumentumListaAdmin($ADAT, true); putDokumentumAdmin($ADAT); diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php index 25332988..8fecbb97 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php @@ -5,6 +5,7 @@ // if ($skin=='ajax') { require_once('include/modules/naplo/share/diak.php'); + require_once('include/modules/naplo/share/tanar.php'); require_once('include/modules/naplo/share/osztaly.php'); $ADAT['ma'] = getDiakBySzulDt(date('Y-m-d')); @@ -18,11 +19,13 @@ $_md = date('m-d',strtotime('+'.$i.' day',strtotime($dt))); $ADAT['heti'][$i]['dt']= date('Y-m-d',strtotime('+'.$i.' day',strtotime($dt))); $ADAT['heti'][$i]['diakok'] = getDiakBySzulDt($_md); + $ADAT['heti'][$i]['tanarok'] = getTanarBySzulDt($_md); } $ADAT['osztaly'] = getOsztalyok(__TANEV,array('result'=>'assoc')); - // } + dump($ADAT['heti']); + if ($skin!='ajax') { global $_TANEV; diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php index deca5915..c8172121 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php @@ -47,6 +47,16 @@ } echo ''; } + + for ($i=0; $i'; + echo $_D['tanarNev'].' (tanár)'; + echo ''; + } + } echo ''; } @@ -59,10 +69,11 @@ if ($szulinapos) echo _HAPPYBIRTHDAY; + if ($skin=='ajax') { echo ''; echo ''; echo ''; - + } if ($skin!='ajax') echo ''; /* diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/dokumentum/dokumentum.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/dokumentum/dokumentum.css index 01db5fb2..fd5c19b5 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/dokumentum/dokumentum.css +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/dokumentum/dokumentum.css @@ -14,3 +14,15 @@ table.dokumentumLista tbody tr td span.material-icons { display: inline-block; font-size:12px;padding-right:2px; color: white; } table.dokumentumLista tbody tr td:hover span.material-icons { display: inline-block; font-size:12px;padding-right:2px; color: #444; } + table.dokumentumLista tr td a:before { content: ""; padding-right:4px; color: #ddd;} + table.dokumentumLista tr td:hover a:before { content: ""; padding-right:4px; color: cornflowerblue;} + + table.dokumentumLista tr td { height:1.8em;} + table.dokumentumLista.admin { outline: solid 2px orange; border-radius:10px;} + table.dokumentumLista.admin tr td:hover div.dokumentumUrl_pl {display: inline-block;} + + table.dokumentumLista tr th span.tanev { + border-radius: 4px; padding:2px 4px; color:white; opacity:70%; +} + table.dokumentumLista tr th span.tanev0 {background-color: cornflowerblue} + table.dokumentumLista tr th span.tanev1 {background-color: orange} diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/dokumentum/dokumentum.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/dokumentum/dokumentum.phtml index 5284321d..5fefacd2 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/dokumentum/dokumentum.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/dokumentum/dokumentum.phtml @@ -4,7 +4,7 @@ formBegin(); echo ''; - echo ''; + echo '
'; echo ''; echo ''; @@ -21,7 +21,11 @@ echo ''; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -54,10 +58,10 @@ if ($admin===true) { formBegin(); - echo ''; + echo ''; } echo '

Adminisztráció

'; - echo '
'; echo 'Új dokumentum
Url:'; + // echo $INTEZMENY['honlap']; + echo ''; + echo ''; + echo '
Megjegyzés a link mögött:
'; + echo '
'; // echo ''; if ($admin===true) { echo ''; echo ''; echo ''; echo ''; - echo ''; - echo ''; + echo ''; + echo ''; } echo ''; } @@ -109,28 +114,33 @@ function putDokumentumLista($ADAT, $admin=false) { + global $policy; + $genOn = false; echo '

Dokumentumok

'; echo '
'.'
'; @@ -70,6 +74,7 @@ echo '
'; echo $D['dokumentumId']; + echo ''; echo ''; echo $D['dokumentumDt']; @@ -94,8 +99,8 @@ if ($admin===true) { echo ''.$D['dokumentumTipus'].''.$D['dokumentumPolicy'].''.$D['dokumentumSorrend'].''.'
'; echo ''; if (is_array($ADAT)) foreach($ADAT as $tipus=>$DAT) if (is_array($DAT)) foreach($DAT as $tanev=>$AT) { - echo ''; - echo ''; + echo ''; - echo ''; + echo ''; + } for ($i=0; $i'; - echo ''; + echo ''; echo '
'; - if ($tipus=='general') echo 'Általános dokumentumok'; - else echo $tanev.'/'.($tanev+1); + if ($genOn==false || $tipus!='general') { + echo '
'; + if ($tipus=='general') { + echo 'Általános dokumentumok'; + $genOn=true; + } else echo $tanev.'/'.($tanev+1); echo '
'; - echo $D['dokumentumLeiras']; - echo ''.$D['dokumentumTanev'].'/'.($D['dokumentumTanev']+1).''; - echo ''; - echo htmlspecialchars($D['dokumentumRovidLeiras']); + echo ''; + if ($D['dokumentumLeiras']!='') echo htmlspecialchars($D['dokumentumLeiras']); + // if ($D['dokumentumRovidLeiras']!='') echo htmlspecialchars($D['dokumentumRovidLeiras']); // echo ' '; echo ''; if ($D['dokumentumMegjegyzes']!='') echo '('.$D['dokumentumMegjegyzes'].')'; -- cgit v1.2.3