aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-naplo/www')
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/dokumentum/dokumentum.php13
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/tanar.php18
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/admin/debug-pre.php2
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum-pre.php12
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/dokumentum/dokumentum.php1
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap-pre.php5
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/szulinap.php13
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/dokumentum/dokumentum.css12
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/dokumentum/dokumentum.phtml42
9 files changed, 93 insertions, 25 deletions
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<count($R); $i++) {
// $q2 = "SELECT osztalyId
// $R[$i]['osztalya'] =
@@ -193,4 +193,20 @@
}
*/
+ function getTanarBySzulDt($md)
+ {
+
+ $lr = db_connect('naplo_intezmeny');
+ if ($md == '') $md = date('m-d');
+ $q = "SELECT tanarId FROM tanar WHERE szuletesiIdo like '%s' AND kiDt is NULL";
+ $tanarIds = db_query($q, array('lr'=>$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<count($_ids); $i++) {
+ $DATA = array(
+ 'dokumentumId' => ($_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 '</li>';
}
+
+ for ($i=0; $i<count($ADAT['heti'][$n]['tanarok']); $i++) {
+ $_D = $ADAT['heti'][$n]['tanarok'][$i];
+ $_tanarId= $_D['tanarId'];
+ if (is_array($_D)) {
+ echo '<li class="tanarAdat tanarNev" data-tanarid="'.$_tanarId.'">';
+ echo $_D['tanarNev'].' (tanár)';
+ echo '</li>';
+ }
+ }
echo '</ul>';
}
@@ -59,10 +69,11 @@
if ($szulinapos) echo _HAPPYBIRTHDAY;
+ if ($skin=='ajax') {
echo '<a href="'.href('index.php?page=naplo&f=szulinap').'" class="btn_szulinap">';
echo '<button><span class="icon-th-list" style="font-size:8px; color:#888"></span> Születésnaposok</button>';
echo '</a>';
-
+ }
if ($skin!='ajax') echo '</div>';
/*
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 '<input type="hidden" name="action" value="addDokumentum">';
- echo '<table align="center" class="dokumentumLista">';
+ echo '<table align="center" class="dokumentumLista admin">';
echo '<tr><th colspan="2">';
echo 'Új dokumentum</th><td></tr>';
echo '<tr>';
@@ -21,7 +21,11 @@
echo '</tr>';
echo '<tr>';
echo '<th>Url:</th>';
- echo '<td><input type="text" id="frm_dokumentumUrl" name="dokumentumUrl" placeholder="https://mayor.edu.hu/doksi/meno_tanmenet.pdf" size="100" /></td>';
+ echo '<td>';
+ // echo $INTEZMENY['honlap'];
+ echo '<input type="text" id="frm_dokumentumUrl" name="dokumentumUrl" placeholder="https://kanizsay.edu.hu/doksi/meno_tanmenet.pdf" size="100" />';
+ echo '<div class="dokumentumUrl_pl" style="display:none">pálda: https://mayor.edu.hu/dokumentumok/2021/meno_tanmenet.pdf</div>';
+ echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<th>Megjegyzés a link mögött:</th>';
@@ -54,10 +58,10 @@
if ($admin===true) {
formBegin();
- echo '<input type="hidden" name="action" value="delDokumentum">';
+ echo '<input type="hidden" name="action" value="delModDokumentum">';
}
echo '<h1 class="dokumentumLista">Adminisztráció</h1>';
- echo '<table class="dokumentumLista" align="center" cellspacing="1">';
+ echo '<table class="dokumentumLista admin" align="center" cellspacing="1">';
// echo '<thead><tr><th colspan="2">'.'</th></tr></thead>';
if ($admin===true) {
echo '<tfoot><tr><th colspan="6" style="text-align:right">';
@@ -70,6 +74,7 @@
echo '<tr>';
echo '<th>';
echo $D['dokumentumId'];
+ echo '<input type="hidden" name="dokumentumId[]" value="'.$D['dokumentumId'].'" />';
echo '</th>';
echo '<td>';
echo $D['dokumentumDt'];
@@ -94,8 +99,8 @@
if ($admin===true) {
echo '<th>'.$D['dokumentumTipus'].'</th>';
echo '<th>'.$D['dokumentumPolicy'].'</th>';
- echo '<th>'.$D['dokumentumSorrend'].'</th>';
- echo '<td><input type="checkbox" name="dokumentumId[]" value="'.$D['dokumentumId'].'" /></td>';
+ echo '<th><input type="text" name="sorrend_'.$D['dokumentumId'].'" value="'.$D['dokumentumSorrend'].'" size="3" style="text-align:center" />'.'</th>';
+ echo '<td><input type="checkbox" name="delDokumentumId[]" value="'.$D['dokumentumId'].'" /></td>';
}
echo '</tr>';
}
@@ -109,28 +114,33 @@
function putDokumentumLista($ADAT, $admin=false) {
+
global $policy;
+ $genOn = false;
echo '<h1 class="dokumentumLista">Dokumentumok</h1>';
echo '<table class="dokumentumLista" align="center" cellspacing="1">';
echo '<tbody>';
if (is_array($ADAT)) foreach($ADAT as $tipus=>$DAT)
if (is_array($DAT)) foreach($DAT as $tanev=>$AT) {
- echo '<tr>';
- echo '<th colspan="2">';
- if ($tipus=='general') echo 'Általános dokumentumok';
- else echo $tanev.'/'.($tanev+1);
+ if ($genOn==false || $tipus!='general') {
+ echo '<tr>';
+ echo '<th colspan="2">';
+ if ($tipus=='general') {
+ echo 'Általános dokumentumok';
+ $genOn=true;
+ } else echo $tanev.'/'.($tanev+1);
echo '</th>';
- echo '</tr>';
+ echo '</tr>';
+ }
for ($i=0; $i<count($AT); $i++) {
$D = $AT[$i];
if ($policy=='public' && $D['dokumentumPolicy']!='public') continue;
echo '<tr class="'.$D['dokumentumTipus'].' '.$D['dokumentumPolicy'].'">';
- echo '<th>';
- echo $D['dokumentumLeiras'];
- echo '</th>';
+ echo '<th style="font-size:x-small; background-color:#fff; font-weight:normal; color: #888;"><span class="tanev tanev'.($D['dokumentumTanev']%2).'">'.$D['dokumentumTanev'].'/'.($D['dokumentumTanev']+1).'</span></th>';
echo '<td>';
- echo '<a href="'.($D['dokumentumUrl']).'" target="_blank">';
- echo htmlspecialchars($D['dokumentumRovidLeiras']);
+ echo '<a href="'.($D['dokumentumUrl']).'" target="_blank" title="'.htmlspecialchars($D['dokumentumRovidLeiras']).'">';
+ if ($D['dokumentumLeiras']!='') echo htmlspecialchars($D['dokumentumLeiras']);
+ // if ($D['dokumentumRovidLeiras']!='') echo htmlspecialchars($D['dokumentumRovidLeiras']);
// echo '<span class="icon-download"></span> ';
echo '</a>';
if ($D['dokumentumMegjegyzes']!='') echo '<span class="dokumentumMegjegyzes">('.$D['dokumentumMegjegyzes'].')</span>';