comparison index.php @ 45:d8a1e85b8dda

Change the visual style a tiny bit.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 Sep 2012 16:45:40 +0300
parents 57af36f0864e
children d41b51cd4ae5
comparison
equal deleted inserted replaced
44:57af36f0864e 45:d8a1e85b8dda
1 <?php 1 <?php
2 // 2 //
3 // Yes, this is horrible. :| 3 // Yes, this is horrible. :|
4 // 4 //
5 $pageCSS = array("http://tnsp.org/docs1.css", "luk.css"); 5 $pageCSS = array("luk.css");
6 $pageCharset = "utf-8"; 6 $pageCharset = "utf-8";
7 $internalCharset = "utf-8"; 7 $internalCharset = "utf-8";
8 $luokkaDefault = "TTE9SNO"; 8 $luokkaDefault = "TTE9SNO";
9 $classFile = "luokat.txt"; 9 $classFile = "luokat.txt";
10 $mapFile = "kartta.png"; 10 $mapFile = "kartta.png";
280 if ($day < 0) $day = 7; 280 if ($day < 0) $day = 7;
281 $hour = $aika["hours"] - 8; 281 $hour = $aika["hours"] - 8;
282 282
283 $out = "<div class=\"content\">\n"; 283 $out = "<div class=\"content\">\n";
284 284
285 if ($hour >= 0 && $day >= 0) 285 if ($hour >= 0 && $day >= 0 && $hour < sizeof($classHourTable))
286 { 286 {
287 $id = $classHourTable[$hour][$day]; 287 $id = $classHourTable[$hour][$day];
288 $out .= 288 $out .=
289 "<h2>".$dayNames[$day]." ".date("d.n.Y", $stamp)." - klo ".date("H:i", $stamp)."</h2>\n". 289 "<h2>".$dayNames[$day]." ".date("d.n.Y", $stamp)." - klo ".date("H:i", $stamp)."</h2>\n".
290 lukGetHourInfoData($id)."\n"; 290 lukGetHourInfoData($id)."\n";
418 418
419 echo 419 echo
420 "<form id=\"controls\" action=\"".$baseURI."\" method=\"get\"> 420 "<form id=\"controls\" action=\"".$baseURI."\" method=\"get\">
421 <table> 421 <table>
422 <tr> 422 <tr>
423 <td> 423 <th>
424 <select name=\"luokka\"> 424 <select name=\"luokka\">
425 "; 425 ";
426 426
427 foreach ($classes as $class) { 427 foreach ($classes as $class) {
428 echo " <option ".($luokka == $class ? "selected=\"selected\" " : "")."value=\"".$class."\">".lukChEntities($class)."</option>\n"; 428 echo " <option ".($luokka == $class ? "selected=\"selected\" " : "")."value=\"".$class."\">".lukChEntities($class)."</option>\n";
429 } 429 }
430 echo 430 echo
431 " </select> 431 " </select>
432 </td> 432 </th>
433 <td><input type=\"submit\" value=\" Vaihda \" /></td> 433 <th><input class=\"submit\" type=\"submit\" value=\" Vaihda \" /></th>
434 <td>[<a href=\"".$baseURI."?luokka=".$luokka; 434 <th><a href=\"".$baseURI."?luokka=".$luokka;
435 435
436 if ($miniMode) 436 if ($miniMode)
437 echo "\">Normaali"; 437 echo "\">Normaali";
438 else 438 else
439 echo "&amp;nyt\">Mini-info"; 439 echo "&amp;nyt\">Mini-info";
440 440
441 echo "</a>]</td> 441 echo "</a></th>
442 <td>[<a href=\"http://www.oamk.fi/tyojarjestykset/otek/luokat/OR_".$luokka.".htm\">Alkuperäinen</a>]</td> 442 <th><a href=\"http://www.oamk.fi/tyojarjestykset/otek/luokat/OR_".$luokka.".htm\">Alkuperäinen</a></th>
443 443
444 <td>[<a href=\"".$baseURI.($nextPeriod ? "" : "?next")."\">".($nextPeriod ? "Nykyinen" : "Seuraava")." periodi</a>]</td> 444 <th><a href=\"".$baseURI.($nextPeriod ? "" : "?next")."\">".($nextPeriod ? "Nykyinen" : "Seuraava")." periodi</a></th>
445 </tr> 445 </tr>
446 </table> 446 </table>
447 </form> 447 </form>
448 "; 448 ";
449 449