Mercurial > hg > lukkari
comparison index.php @ 147:f559f0161fd5
Use pageName variable.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Sep 2014 02:14:42 +0300 |
parents | c028506aa9cc |
children | b6eb02871dbf |
comparison
equal
deleted
inserted
replaced
146:1a5994671dcf | 147:f559f0161fd5 |
---|---|
6 // | 6 // |
7 // Include framework | 7 // Include framework |
8 require "mcommon.inc.php"; | 8 require "mcommon.inc.php"; |
9 | 9 |
10 // Default settings | 10 // Default settings |
11 $pageName = "OAMK Lukkari"; | |
11 $pageVersion = "2.3"; | 12 $pageVersion = "2.3"; |
12 $mobileMode = FALSE; | 13 $mobileMode = FALSE; |
13 $baseURI = "http://example.com/"; | 14 $baseURI = "http://example.com/"; |
14 | 15 |
15 $pageLanguages = array("fi", "en"); | 16 $pageLanguages = array("fi", "en"); |
47 "en" => "Last updated: <b>%1</b>.", | 48 "en" => "Last updated: <b>%1</b>.", |
48 "fi" => "Päivitetty: <b>%1</b>.", | 49 "fi" => "Päivitetty: <b>%1</b>.", |
49 ), | 50 ), |
50 | 51 |
51 "beta" => array( | 52 "beta" => array( |
52 "en" => " NOTICE! OAMK Lukkari v%1 is still under development. There may be bugs.", | 53 "en" => " NOTICE! %2 v%1 is still under development. There may be bugs.", |
53 "fi" => " HUOM! OAMK Lukkari v%1 on vielä kehityksen alla. Bugeja voi löytyä.", | 54 "fi" => " HUOM! %2 v%1 on vielä kehityksen alla. Bugeja voi löytyä.", |
54 ), | 55 ), |
55 | 56 |
56 "viikossa" => array( | 57 "viikossa" => array( |
57 "en" => "Total of <b>%1</b> hours in the week.", | 58 "en" => "Total of <b>%1</b> hours in the week.", |
58 "fi" => "Viikossa yhteensä <b>%1</b> tuntia.", | 59 "fi" => "Viikossa yhteensä <b>%1</b> tuntia.", |
498 require($dataFile); | 499 require($dataFile); |
499 $haveData = isset($classInfo); | 500 $haveData = isset($classInfo); |
500 } | 501 } |
501 | 502 |
502 | 503 |
503 // Set some variables | |
504 $pageTitle = $haveData ? $classID." / ".join("; ", $classInfo["info"]) : $classID; | |
505 | |
506 | |
507 // Create references to mobile device (Apple touch) icons | 504 // Create references to mobile device (Apple touch) icons |
508 $extra = ""; | 505 $extra = ""; |
509 foreach (array(57 => FALSE, 76 => TRUE, 114 => TRUE, 120 => TRUE, 152 => TRUE) as $iconSize => $addSize) | 506 foreach (array(57 => FALSE, 76 => TRUE, 114 => TRUE, 120 => TRUE, 152 => TRUE) as $iconSize => $addSize) |
510 { | 507 { |
511 $extra .= " <link rel=\"apple-touch-icon\" ". | 508 $extra .= " <link rel=\"apple-touch-icon\" ". |
513 "href=\"img/icon-".$iconSize."-precomposed.png\" />\n"; | 510 "href=\"img/icon-".$iconSize."-precomposed.png\" />\n"; |
514 } | 511 } |
515 | 512 |
516 | 513 |
517 // Start printing the page | 514 // Start printing the page |
518 cmPrintPageHeader($pageTitle, $extra); | 515 $pageTitle = $haveData ? $classID." / ".join("; ", $classInfo["info"]) : $classID; |
516 cmPrintPageHeader($pageTitle." - ".$pageName, $extra); | |
519 | 517 |
520 | 518 |
521 // Info box | 519 // Info box |
522 echo | 520 echo |
523 "<div id=\"infobox\">\n". | 521 "<div id=\"infobox\">\n". |
524 " <div id=\"ctitle\">OAMK Lukkari v".$pageVersion."</div>\n"; | 522 " <div id=\"ctitle\">".$pageName." v".$pageVersion."</div>\n"; |
525 | 523 |
526 if (!$mobileMode) | 524 if (!$mobileMode) |
527 { | 525 { |
528 echo | 526 echo |
529 " <div id=\"csssel\">".cmQM("Style").": "; | 527 " <div id=\"csssel\">".cmQM("Style").": "; |
625 echo | 623 echo |
626 "<div id=\"footer\">". | 624 "<div id=\"footer\">". |
627 cmQM("contact", "ccr @ IRCNet", "ccr (at) tnsp (dot) org"). | 625 cmQM("contact", "ccr @ IRCNet", "ccr (at) tnsp (dot) org"). |
628 " / ". | 626 " / ". |
629 cmQM("updated", strftime("%d.%m.%Y, %H:%M", $timestamp)). | 627 cmQM("updated", strftime("%d.%m.%Y, %H:%M", $timestamp)). |
630 //" <div style=\"color: red;\">".cmQM("beta", $pageVersion)."</div>\n". | 628 //" <div style=\"color: red;\">".cmQM("beta", $pageVersion, $pageName)."</div>\n". |
631 "</div>\n"; | 629 "</div>\n"; |
632 | 630 |
633 cmPrintPageFooter(); | 631 cmPrintPageFooter(); |
634 | 632 |
635 | 633 |