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 --- mayor-orig/www/skin/ajax/base/html/alert.phtml | 25 ++++ mayor-orig/www/skin/ajax/base/html/base.phtml | 101 +++++++++++++ .../www/skin/ajax/module-naplo/css/naplo.css | 4 + .../skin/ajax/module-naplo/css/orarend/orarend.css | 68 +++++++++ .../ajax/module-naplo/html/admin/tanevek.phtml | 9 ++ .../www/skin/ajax/module-naplo/html/base.phtml | 6 + .../ajax/module-naplo/html/bejegyzesek/info.phtml | 11 ++ .../ajax/module-naplo/html/haladasi/haladasi.phtml | 162 +++++++++++++++++++++ .../ajax/module-naplo/html/hianyzas/info.phtml | 18 +++ .../module-naplo/html/hibabejelento/admin.phtml | 120 +++++++++++++++ .../ajax/module-naplo/html/orarend/orarend.phtml | 148 +++++++++++++++++++ 11 files changed, 672 insertions(+) create mode 100644 mayor-orig/www/skin/ajax/base/html/alert.phtml create mode 100644 mayor-orig/www/skin/ajax/base/html/base.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/css/naplo.css create mode 100644 mayor-orig/www/skin/ajax/module-naplo/css/orarend/orarend.css create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/admin/tanevek.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/base.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/bejegyzesek/info.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/haladasi/haladasi.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/hianyzas/info.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml create mode 100644 mayor-orig/www/skin/ajax/module-naplo/html/orarend/orarend.phtml (limited to 'mayor-orig/www/skin/ajax') diff --git a/mayor-orig/www/skin/ajax/base/html/alert.phtml b/mayor-orig/www/skin/ajax/base/html/alert.phtml new file mode 100644 index 00000000..e81b75ed --- /dev/null +++ b/mayor-orig/www/skin/ajax/base/html/alert.phtml @@ -0,0 +1,25 @@ + \ No newline at end of file diff --git a/mayor-orig/www/skin/ajax/base/html/base.phtml b/mayor-orig/www/skin/ajax/base/html/base.phtml new file mode 100644 index 00000000..cfa12036 --- /dev/null +++ b/mayor-orig/www/skin/ajax/base/html/base.phtml @@ -0,0 +1,101 @@ + base.php + putValidXHTML() +*/ + + + /* Egy JSON példa + echo '{ "action" : [ ' + .'{ "func" : "alert", "param" : [ "Helló", "World" ] }, ' + .'{ "func" : "update", "param" : [ { "id" : "updateForm", "content" : "Helló Update" } ]}, ' + .'{ "func" : "hide", "param" : [ "settings" ] },' + .'{ "func" : "show", "param" : [ "updateWindow" ] },' + .'{ "func" : "remove", "param" : [ "head" ] },' + .'{ "func" : "removeClass", "param" : [ { "id" : "jegy-1", "class" : "jegy1" } ] },' + .'{}],' + .' "name" : "Violet", "occupation" : "character" }'; + */ + + +// ------------------------------------------------------------------- +// html_base() : a html oldal szerkezete +// ------------------------------------------------------------------- + +function html_base($sessionID,$policy,$page,$sub,$f,$lang,$skin,$MENU) { + + global $_JSON; + + if ($_JSON['result'] === false) @header("HTTP/1.1 400 Bad Request"); + else @header("HTTP/1.1 200 OK"); + + @header('Content-type: application/json; charset=utf-8'); + @header("Etag: ".__SALTVALUE.'-'.__SALTNAME.'-'.$_SESSION['mayorToken']); // ajax request esetén innen tudható a _SALTVALUE + + _httpHeader(); + + if ( (!is_array($_JSON)?false:json_encode($_JSON)) === false) { + ob_start(); + define('_UNIQUE', uniqid()); + //echo '
'; + page($page,$sub,$f,$lang,$skin,$policy); + $_JSON['html'] = ob_get_contents(); + ob_end_clean(); + } + if (is_array($_SESSION['alert']) && count($_SESSION['alert'])>0) { + for($i=0; $i'.$aType.':'.$aCode.')'; + else $msg = $ALERT_MSG[$aCode]; + + // paraméter behelyettesítés + for($i = 0; $i < count($param); $i++) { + $_msg = $msg; + $msg = @str_replace("%$i%",''.($param[$i]).'',$msg); + if ($param[$i] != '' and $_msg == $msg) $pstr .= ''.($param[$i]).','; + } + if ($pstr != '') $msg .= ' (' . substr($pstr,0,-1) . ')'; + if (($aType == 'message') or ($aType == 'page')) { + $title = _ERROR; + $class = 'errorMsg'; + if ($aType == 'page') $showPage = false; + } else { + $title = _INFORMATION; + $class = 'infoMsg'; + } + $msg = ''.$title.': ' . $msg; + $showPage .= '
'.str_replace('***','
',$msg).'
'."\n"; + } + + return $showPage; + +} + +?> diff --git a/mayor-orig/www/skin/ajax/module-naplo/css/naplo.css b/mayor-orig/www/skin/ajax/module-naplo/css/naplo.css new file mode 100644 index 00000000..f8b97d3c --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/css/naplo.css @@ -0,0 +1,4 @@ + +div.beirasAdatok { font-size:large; margin:auto; width:90%; text-align: center; } +div.beirasAdatok a { text-decoration: none; color: inherit; } +div.beirasAdatok a:hover { text-decoration: none; color: #777777; } diff --git a/mayor-orig/www/skin/ajax/module-naplo/css/orarend/orarend.css b/mayor-orig/www/skin/ajax/module-naplo/css/orarend/orarend.css new file mode 100644 index 00000000..222664e5 --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/css/orarend/orarend.css @@ -0,0 +1,68 @@ + +table.orarend { + font-size:10px; +} +table.orarend tr th { + background-color: #eeeeee; + color: #999999; + border-width: 0px 0px 0px 0px; + width:1%; + height:30px; + font-weight: normal; + border-color: #ddd; + border-width: 0px 0px 1px 0px; + border-style: solid; + +} +table.orarend thead tr th { + background-color: #889999; + color: white; + height:1em; + +} +table.orarend thead tr th.spec { + background-color: red; +} + +table.orarend tr td { + text-align: center; + border-color: #ddd; + border-width: 0px 0px 1px 0px; + border-style: solid; + width:18%; +} + +div.unfinished { + background-color: yellow; +} + + table.orarend tbody tr td hr { width: 80% } + div.normál {} + div.plusz { + background-color: #eeccee; + } + div.elmarad { + color: white; + background-color: black; + } + div.elmarad_máskor { + color: white; + background-color: #555555; + } + div.normál_máskor { + color: white; + background-color: #776699; + } + div.felügyelet { + background-color: #bbaac0; + } + div.helyettesítés { + background-color: #ccffcc; + } + div.összevonás { + background-color: #aabbc0; + } + span.helyett { + color: gray; + text-decoration: line-through; + } diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/admin/tanevek.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/admin/tanevek.phtml new file mode 100644 index 00000000..9f32e72e --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/admin/tanevek.phtml @@ -0,0 +1,9 @@ + diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/base.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/base.phtml new file mode 100644 index 00000000..c3fe9d59 --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/base.phtml @@ -0,0 +1,6 @@ + diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/bejegyzesek/info.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/bejegyzesek/info.phtml new file mode 100644 index 00000000..94c12c57 --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/bejegyzesek/info.phtml @@ -0,0 +1,11 @@ +'; + echo _BEJEGYZESEK_SZAMA.': '; + if ($ADAT['db'] > 0) echo ''.$ADAT['db'].''; + else echo $ADAT['db']; + echo ''; + } + +?> diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/haladasi/haladasi.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/haladasi/haladasi.phtml new file mode 100644 index 00000000..1511b957 --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/haladasi/haladasi.phtml @@ -0,0 +1,162 @@ +'."\n"; + + echo ''."\n"; + + echo ''."\n"; + echo ''; + echo ''; + echo ''; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + + $toTime = strtotime(_SHOW_DAYS_TO); + $fromTime = strtotime(_SHOW_DAYS_FROM); + + for ($time = $toTime; $time >= $fromTime; $time = strtotime('-1 day',$time)) { + $dt = date('Y-m-d',$time); + $count = count($data[$dt]); + if ($count > 0) { +// echo ''; + putTankorNap($dt, $data[$dt], $data['dolgozatok'], $order); +// echo ''."\n"; + } + } + + echo '
'; + echo ''._TANAR.''._ORASZAM.''._TANANYAG.'
'; +// 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 '
'."\n"; + + } + + + + + function putTankorNap($dt, $dNap, $doga, $order) { + + $time = strtotime($dt); + $count = count($dNap); + +// if (date('w',$time) % 2 == 0) echo ''."\n"; +// else echo ''."\n"; + + putHaladasiDolgozat($dt,$doga); + + for ($i=0; $i<$count; $i++) { + putTankorOra($dNap[$count-$i-1]); + } // órák kiírása + +// echo ''."\n"; + + } + + + function putHaladasiDolgozat($dt,$doga) { + + for ($i=0;$i'; + echo ''; + $href = href('index.php?page=naplo&sub=osztalyozo&f=dolgozat&dolgozatId='.$did); +// echo ''; + echo _BEJELENTETT_DOLGOZAT . ': '. $doga[$did]['dolgozatNev']; + echo ' (' ; + for ($j=0;$j'; + echo ''; + echo ''."\n"; + } + + } + + + function putTankorOra($dOra) { + + global $aHetNapjai; + + $modosithatoOra = false; + + if (!in_array($dOra['tipus'],array('normál','normál máskor'))) { + $tipus = nagybetus(substr($dOra['tipus'],0,1)); + $tr_class = ' class="helyettesit"'; + } else { + $tipus = ''; + $tr_class = ''; + } + + echo ''; + + echo ''; + echo str_replace('-','.',$dOra['dt']) .'. '. $aHetNapjai[date('w',strtotime($dOra['dt']))-1].' '; + echo ''; + echo ''; + echo $dOra['ora'].'.'; + echo ''."\n"; + echo ''; + echo $tipus; +// echo $ADAT['terem'][$dOra['teremId']]['leiras']; + echo ''."\n"; + + + // ----- Tanör(ok) ------------------------------- + echo ''; + // Ha egy normál órának több tanára is van, és módosítható az óra, akkor lehet választani a tanárok közül + if (count($dOra['tanár']['id']) > 1 and $modosithatoOra) { + $_SEL = array($dOra['kiId'] => 'selected="selected" '); + echo ''; + } else { + echo $dOra['kiCn']; + } + echo ''."\n"; + + echo ''; + echo $dOra['oraszam']; + echo ''."\n"; + + echo ''.$dOra['leiras'].''."\n"; + + echo ''."\n"; + } + + function putHetesForm($ADAT) { } + +?> diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/hianyzas/info.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/hianyzas/info.phtml new file mode 100644 index 00000000..2d206723 --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/hianyzas/info.phtml @@ -0,0 +1,18 @@ + $D) { if ($dt!='') break; } + echo '
'; + if ($dt == date('Y-m-d')) { + echo _MA.' '._AZ_ORAK.' '.$D['oranHianyzasSzazalek'].'%-n '._VOLT_HIANYZO.'.
'; + echo _MA.' '.$D['hianyzokSulyozva'].' '._DIAK.' '._HIANYZIK.'.'; + } else { + list($ev,$ho,$nap) = explode('-',$dt); + echo decimal_to_roman($ho).'. '.$nap.'. napon '._AZ_ORAK.' '.$D['oranHianyzasSzazalek'].'%-n '._VOLT_HIANYZO.'.
'; + echo decimal_to_roman($ho).'. '.$nap.'. napon '.$D['hianyzokSulyozva'].' '._DIAK.' '._HIANYZOTT.'.'; + } + echo '
'; + //echo '
'._TOVABB.''; + } + +?> diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml new file mode 100644 index 00000000..c2d3b6a1 --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/hibabejelento/admin.phtml @@ -0,0 +1,120 @@ +'; + for ($i = 0; $i < count($ADAT['kerelmek']); $i++) { + + if ($ADAT['kerelmek'][$i]['lezarasDt']!="") $_class = ' style="color: #777777;"' ; + elseif ($ADAT['kerelmek'][$i]['jovahagyasDt']!="") $_class = ' style="background-color: rgb(200,255,200);"' ; + else $_class = ' style="color: black;"' ; + + if (__VEZETOSEG || __NAPLOADMIN) { + echo '
  • '.$ADAT['kerelmek'][$i]['userAccount'].' '.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).': '.$ADAT['kerelmek'][$i]['kategoria'].'
  • '; + } else { + echo '
  • '; + echo '
    '.$ADAT['kerelmek'][$i]['userAccount'].' '.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).': '.$ADAT['kerelmek'][$i]['kategoria'].'
    '; + echo '- '.htmlspecialchars($ADAT['kerelmek'][$i]['szoveg']); + if ($ADAT['kerelmek'][$i]['valasz']!='') + echo '
    - '.htmlspecialchars($ADAT['kerelmek'][$i]['valasz']).'
    '; + echo '
  • '; + } + } + echo ''; + + } + + function putKerelmekValasszal($ADAT) { + + $K = array('jh'=>0,'njh'=>0); + $MAX = 1; + $dbKerelem = count($ADAT['kerelmek']); + $show = false; + for ($i = 0; $i < count($ADAT['kerelmek']); $i++) { + if ($ADAT['kerelmek'][$i]['jovahagyasDt']!='') { + $K['jh']++; + // A kérelmek a rögzítés dátuma szerint rendezettek, nem a jóváhagyás dátuma szerint! + if (!isset($jdt) || strtotime($jdt) < strtotime($ADAT['kerelmek'][$i]['jovahagyasDt'])) $jdt = $ADAT['kerelmek'][$i]['jovahagyasDt']; + } else $K['njh']++; + $show = true; + } + if ($show) { +/* echo '
    '; + echo '
    Kérelmek
    '; + echo '
    '; + echo "Várakozó kérelmek száma: "; + echo $K['jh'] . ' + '. $K['njh']; + if ($jdt !='') echo "
    Utolsó jóváhagyás: ".$jdt; + echo '
    '; + if (__NAPLOADMIN===true || __VEZETOSEG===true) + echo '
    '.'tovább...'.'
    '; + echo '
    '; +*/ + } + + echo '
    '; + for ($i = 0; $i < $dbKerelem && $i<$MAX; $i++) { + $_link = href('index.php?page=naplo&sub=hibabejelento&f=admin&kerelemId='.$ADAT['kerelmek'][$i]['kerelemId']); + $_K = $ADAT['kerelmek'][$i]; + $kerelemId = $_K['kerelemId']; + $_napja = round(((strtotime(date('Y-m-d H:i:s')) - strtotime($_K['rogzitesDt']))/(24*60*60))); + if ($_napja>60) $_napjaBg = '#f00; outline: solid 2px orange;'; else if ($_napja>7) $_napjaBg = '#f44336; outline: solid 2px red; '; else $_napjaBg = '#aaa'; + if ($_K['lezarasDt']!='') { + $_color = "#888"; + $_class="icon-paper-clip-alt"; + } elseif ($_K['jovahagyasDt']!='') { + $_color = "#64ce64"; + $_class="icon-ok-sign"; + } else { + $_color="#ce6464"; + $_class="icon-question-sign"; + } + echo '
    '; + echo '
    '; + echo '
    '.superdate($ADAT['kerelmek'][$i]['rogzitesDt']).'
    '; + echo '
    '; + echo ''; + + echo ''; + echo ''; + echo $_napja; + echo ''; + echo htmlspecialchars($ADAT['kerelmek'][$i]['szoveg']); + echo ''; + echo '
    '; + echo '
    '.htmlspecialchars($ADAT['kerelmek'][$i]['valasz']).' '.$_K['jovahagyasAccount'].'
    '; + echo ''; + if (count($ADAT['valaszok'][$kerelemId])>0) { + $_V = $ADAT['valaszok'][$kerelemId]; + echo ''; + for ($j=0; $j'; + echo ''; + echo ''; + echo ''; + echo ''; + } + echo '
    '.superdate($_V[$j]['valaszDt']).''.$_V[$j]['userAccount'].''.supertext($_V[$j]['valasz']).'
    '; + } + echo '
    '; + } + echo '
    '; + + //if ($i!=$dbKerelem) + {echo ' + + '; + } + } + +?> diff --git a/mayor-orig/www/skin/ajax/module-naplo/html/orarend/orarend.phtml b/mayor-orig/www/skin/ajax/module-naplo/html/orarend/orarend.phtml new file mode 100644 index 00000000..cb12b8cf --- /dev/null +++ b/mayor-orig/www/skin/ajax/module-naplo/html/orarend/orarend.phtml @@ -0,0 +1,148 @@ +'."\n"; + echo ''."\n"; + for($ora=$ADAT['napiMinOra']; $ora<=$ADAT['napiMaxOra']; $ora++) { + echo ''; + echo ''.$ora.''; +// for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) { // FIXME (getMaxNap) + $nap=date('w',strtotime($ADAT['dt'])); + $dt = $ADAT['orarend']['napok'][$nap]['dt']; + echo ''; + $het = 0; + $ORARENDI = array(); + for($i=0; $i'; + $_ferohely = $ADAT['termek'][$_T['teremId']]['ferohely']; + $_letszam = $ADAT['tankorLetszamok'][$_T['tankorId']]; + if ($_T['tankorId']!='') { + echo ''; + echo $ADAT['tankorok'][$_T['tankorId']][0]['tankorNev']; + echo ''; + } else { + echo "$_targyjel : $_osztalyJel : "; + } + echo ', '; + echo ''.$ADAT['termek'][$_T['teremId']]['leiras'].''; + echo '
    '; + if ($_ORA['kit']!='') { + echo ''; + echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev']; + echo ''; + if ($_ORA['ki']!='') echo ' '.$ADAT['tanarok'][$_ORA['ki']]['tanarNev']; + } else { + echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev']; + } + + if (isset($_ORA['oo'])) echo ' °'; // else tervezett + if ($_tankorTipus=='délutáni') echo ' ¹'; + + echo ''; + if (count($T[$nap][$ora]['orak'])>$i+1) echo '
    '; + } + /* és ide jönnek a pluszok */ + $j=0; + if (is_array($ADAT['haladasi']['orak'][$dt][$ora])) foreach ($ADAT['haladasi']['orak'][$dt][$ora] as $_tankorId => $__T) { + if (!is_array($ORARENDI) || !in_array($_tankorId,$ORARENDI)) { + if ($j!=0) echo '
    '; $j++; + $_ORA = $ADAT['haladasi']['orak'][$dt][$ora]; + _putOra($_ORA,$_tankorId); + } + } + echo ''."\n"; + //} + echo ''."\n"; + } + echo ''; + echo ''."\n\n\n\n"; + + } else { + //putOrarendPlain($ADAT); + echo '
    '._NO_TIMETABLE.'
    '; + + } + + + } + + function putOrarendPlain($ADAT) { + if (is_array($ADAT['orarend']['orarendiOra'])) { + foreach($ADAT['orarend']['orarendiOra'] as $het => $T) { + echo ''."\n"; + echo ''; + for($ora=$ADAT['napiMinOra']; $ora<=$ADAT['napiMaxOra']; $ora++) { // FIXME (getMinOra, getMaxOra konstansok!???) + echo ''; + echo ''; + for ($nap=1; $nap<=$ADAT['hetiMaxNap']; $nap++) { // FIXME (getMaxNap) + echo ''."\n"; + } + echo ''."\n"; + } + echo '
    '.$het.'. heti órarend
    '.$ora.''; + $X = $ADAT['orarend']['orarendiOra'][$het][$nap][$ora]; + + for ($i=0; $i'; + echo $X[$i]['targyJel'].' : '; + echo $X[$i]['osztalyJel'].' : '; + echo $X[$i]['teremId']; + echo ''; + } + echo '
    '."\n\n\n\n"; + } + } + } + + function _putOra($ORA,$_tankorId) { + global $ADAT; + $_ORA = $ORA[$_tankorId]; + $_tipusClass = str_replace(' ','_',$_ORA['tipus']); + $_eredetClass = $_ORA['eredet']; + echo '
    '; + + if ($ADAT['tankorok'][$_ORA['tankorId']][0]['tankorNev']!='') { + echo ''; + echo $ADAT['tankorok'][$_ORA['tankorId']][0]['tankorNev']; + echo ''; + + echo ', '.$ADAT['termek'][$_ORA['teremId']]['leiras']; + echo '
    '; + } else { + echo $_ORA['tipus'].' '.$_ORA['eredet'].' ('.$_ORA['feladatTipusId'].')
    '; + } + + + echo ''; + echo $ADAT['tanarok'][$_T['tanarId']]['tanarNev']; + echo ''; + if ($_ORA['ki']!='') echo ' '.$ADAT['tanarok'][$_ORA['ki']]['tanarNev']; + + if (isset($_ORA['oo'])) echo ' °'; // else tervezett + + echo '
    '; + + } + + +?> -- cgit v1.2.3