From 43de9af71f7f4ca5731b94a06d688ae8412ba427 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Fri, 6 Jul 2018 11:14:41 +0200 Subject: 2018/Feb/28 -i állapot hozzáadva, mint a módosítások kiindulási állapota --- .../module-naplo/html/haladasi/haladasi.phtml | 457 +++++++++++++++++++++ .../module-naplo/html/orarend/orarend.phtml | 198 +++++++++ 2 files changed, 655 insertions(+) create mode 100644 mayor-orig/www/skin/vakbarat/module-naplo/html/haladasi/haladasi.phtml create mode 100644 mayor-orig/www/skin/vakbarat/module-naplo/html/orarend/orarend.phtml (limited to 'mayor-orig/www/skin/vakbarat/module-naplo/html') diff --git a/mayor-orig/www/skin/vakbarat/module-naplo/html/haladasi/haladasi.phtml b/mayor-orig/www/skin/vakbarat/module-naplo/html/haladasi/haladasi.phtml new file mode 100644 index 00000000..5800afb9 --- /dev/null +++ b/mayor-orig/www/skin/vakbarat/module-naplo/html/haladasi/haladasi.phtml @@ -0,0 +1,457 @@ + +
X'._TANMENET_RESZLETEI.'
'; + formBegin(array('action'=>href('index.php?page=naplo&sub=tanmenet&f=tanmenetInfo'), 'class'=>"onSubmitUpdate", 'id'=>"inform")); + echo ''."\n"; + formEnd(); + echo ''."\n"; + + // tankör haladási + echo ''."\n"; + + + if ($ADAT['title']=='') return; + + $FORM = array('action'=>href('index.php?page=naplo&sub=haladasi&f=haladasi'), 'name'=>'haladasiOrabeiras', 'class'=>''); + formBegin($FORM); + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + if ($tankorId != '') echo ''."\n"; + + if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo ''."\n"; + echo ' '._IDOSZAK.': '.str_replace('-','.',_SHOW_DAYS_FROM) . '. - '. str_replace('-','.', _SHOW_DAYS_TO) .'. '."\n"; + if (_SHOW_DAYS_TO < date('Y-m-d')) echo ''."\n"; + echo '
'; + + // ------------------------------- + $toTime = strtotime(_SHOW_DAYS_TO); + $fromTime = strtotime(_SHOW_DAYS_FROM); + + if ($order == 'ASC') { + for ($time = $fromTime; $time <= $toTime; $time = strtotime('1 day',$time)) { + + $dt = date('Y-m-d',$time); + $count = count($data[$dt]); + if ($tankorId == '') { + putNap($dt, $data[$dt], $data['napok'][$dt], $data['dolgozatok'], $ADAT['tanitasiNap'][$dt]); + } elseif ($count > 0) { + putTankorNap($dt, $data[$dt], $data['dolgozatok'], $order); + } // kirakjuk-e a napot + + } // for $dt + } else { + for ($time = $toTime; $time >= $fromTime; $time = strtotime('-1 day',$time)) { + + $dt = date('Y-m-d',$time); + $count = count($data[$dt]); + if ($tankorId == '') { + putNap($dt, $data[$dt], $data['napok'][$dt], $data['dolgozatok'], $ADAT['tanitasiNap'][$dt]); + } elseif ($count > 0) { + putTankorNap($dt, $data[$dt], $data['dolgozatok'], $order); + } // kirakjuk-e a napot + + } // for $dt + } + // --------------------------------- + + formEnd(); + + } + + + function putNap($dt, $dNap, $napInfos, $doga, $napInfo2) { + + global $aHetNapjai,$ADAT; + + $time = strtotime($dt); + $count = count($dNap); + + $tipus = $orarendiHet = $megjegyzes = array(); + if (is_array($napInfos)) foreach ($napInfos as $ni) { + if (!in_array($ni['tipus'], $tipus)) $tipus[] = $ni['tipus']; + if ($ni['orarendiHet'] != 0 && !in_array($ni['orarendiHet'], $orarendiHet)) $orarendiHet[] = $ni['orarendiHet']; + if ($ni['megjegyzes'] != '' && !in_array($ni['megjegyzes'], $megjegyzes)) $megjegyzes[] = $ni['megjegyzes']; + } + $tanitasiNap = false; + if (in_array('tanítási nap', $tipus) || in_array('speciális tanítási nap', $tipus)) { + $tanitasiNap = true; + } + + + echo '

'; + echo str_replace('-','.',$dt) .'. '. $aHetNapjai[date('w',$time)-1]; + if ($napInfo2['napszam']!='' || $napInfo['orarendiHet'] != 0) echo ' ('; + if ($tanitasiNap) { + echo $napInfo2['napszam'] . '. ' . _TANITASI_NAP; + if ($napInfo['orarendiHet'] != 0) echo '/'; + } + if (count($orarendiHet) > 0) echo ' - '.implode('./',$orarendiHet).'. '._HET; + if (count($megjegyzes) > 0) echo ' - '.implode('/', $megjegyzes); + if ($napInfo2['napszam']!='' || $napInfo['orarendiHet'] != 0) echo ')'; + echo '

'; + + putHaladasiDolgozat($dt,$doga); + + $o = 0; + $_UJORA = array(); + if ($count > 0) { + for ($i=0; $i<$count; $i++) { + while ($o < $dNap[$i]['ora']) { + if (__PLUSZBEIRHAT===true) $_UJORA[] = array('dt'=>$dt, 'ora'=>intval($o)); + $o++; + } + $o=$dNap[$i]['ora']+1; + putOra($dNap[$i]); + } // órák kiírása + for($j=$dNap[$i-1]['ora']+1; $j<=$ADAT['maxOra']; $j++) { + if (__PLUSZBEIRHAT===true) $_UJORA[] =array('dt'=>$dt, 'ora'=>$j); + } + } else { + echo _NINCS_ORAJA.'
'; + for($j=1; $j<=$ADAT['maxOra']; $j++) { + if (__PLUSZBEIRHAT===true) $_UJORA[] = array('dt'=>$dt, 'ora'=>$j); + } + } + echo '

'._PLUSZ_FELADATOK.'

'; + echo '