[843c58d] | 1 | <?php |
---|
| 2 | |
---|
| 3 | require_once 'locale.php'; |
---|
| 4 | |
---|
| 5 | function getMainPage($header, $content) { |
---|
| 6 | echo "<html><head>\n"; |
---|
| 7 | echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\">\n"; |
---|
| 8 | echo "<link type='text/css' href='css/utt.css' rel='stylesheet'>\n"; |
---|
| 9 | echo "<script type=\"text/javascript\" src=\"js/menu.js\"></script>\n"; |
---|
| 10 | if(isset($header)) { |
---|
| 11 | # jesli pominieto znacznik tytulu - dodajemy sami |
---|
| 12 | if (stristr($header, '<title>') === false) { |
---|
| 13 | echo '<title>'.DEFAULT_PAGE_TITLE."</title>\n"; |
---|
| 14 | } |
---|
| 15 | echo $header; |
---|
| 16 | } |
---|
| 17 | else { |
---|
| 18 | echo '<title>'.DEFAULT_PAGE_TITLE."</title>\n"; |
---|
| 19 | } |
---|
| 20 | echo "</head>\n"; |
---|
| 21 | echo "<body>\n"; |
---|
| 22 | echo "<table class=\"page_table\">\n"; |
---|
| 23 | echo "<tr>\n"; |
---|
| 24 | echo " <td class=\"page_title\" colspan=\"3\">".PAGE_HEADER."</td>\n"; |
---|
| 25 | echo "</tr>\n"; |
---|
| 26 | echo "<tr>\n"; |
---|
| 27 | echo " <td class=\"page_menu\">\n"; |
---|
| 28 | echo " <table class=\"main_menu\" align=\"center\" cellspacing=\"1\">\n"; |
---|
| 29 | $menu = array("index.php" => MENU_MAIN_PAGE, |
---|
| 30 | "help.php" => MENU_HELP, |
---|
| 31 | "licence.php" => MENU_LICENSE, |
---|
| 32 | "authors.php" => MENU_AUTHORS, |
---|
| 33 | "down.php" => MENU_DOWNLOADS); |
---|
| 34 | |
---|
| 35 | foreach($menu as $page=>$descr) { |
---|
| 36 | echo " <tr>\n"; |
---|
| 37 | echo " <td class=\"main_menu_cell\"\n"; |
---|
| 38 | echo " onMouseOver=\"return menu_select_element(this, true);\"\n"; |
---|
| 39 | echo " onMouseOut=\"return menu_select_element(this, false);\"\n"; |
---|
| 40 | echo " onClick=\"window.location='".$page."'; return true;\"\n"; |
---|
| 41 | echo " >\n"; |
---|
| 42 | echo $descr."\n"; |
---|
| 43 | echo " </td>\n"; |
---|
| 44 | echo " </tr>\n"; |
---|
| 45 | } |
---|
| 46 | echo " </table>\n"; |
---|
| 47 | echo " </td>\n"; |
---|
| 48 | echo " <td class=\"page_content\">\n"; |
---|
| 49 | echo $content; |
---|
| 50 | echo " </td>\n"; |
---|
| 51 | echo " <td class=\"page_left_margin\"> </td>\n"; |
---|
| 52 | echo " </tr>\n"; |
---|
| 53 | echo "</table>\n"; |
---|
| 54 | echo "</body></html>\n"; |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | ?> |
---|