Ticket #5620: header.php

File header.php, 8.1 KB (added by elkin@…, 12 years ago)

header enabling any sized icons

Line 
1<?php
2/**
3 * This header file is shared by all MythWeb modules.
4 *
5 * @url         $URL: http://svn.mythtv.org/svn/branches/release-0-21-fixes/mythplugins/mythweb/modules/_shared/tmpl/default/header.php $
6 * @date        $Date: 2008-03-08 22:09:11 +0100 (Sa, 08 MÀr 2008) $
7 * @version     $Revision: 16467 $
8 * @author      $Author: xris $
9 * @license     GPL
10 *
11 * @package     MythWeb
12 *
13/**/
14
15// UTF-8 content
16    header("Content-Type: text/html; charset=utf-8");
17
18// Globals
19    global $Modules, $headers, $page_title;
20
21// Create the category legend popup and stick it at the end of the document for now.
22    global $Categories;
23    if (!empty($Categories)) {
24        $legend = <<<EOF
25<table width="400" style="background-color: #003060;" border="1" cellpadding="0" cellspacing="0">
26<tr>
27    <td><table width="400" style="background-color: #003060;" class="small" cellpadding="5" cellspacing="5">
28        <tr>
29EOF;
30        $legend .= "\t\t\t<td colspan=\"3\">".t('Category Legend').':</td>';
31        $count = 0;
32        foreach ($Categories as $cat => $details) {
33            if ($count++ % 3 == 0)
34                $legend .= "\n\t\t</tr><tr>\n";
35            $legend .= "\t\t\t<td class=\"cat_$cat\" align=\"center\"><b>".html_entities($details[0])."</b></td>\n";
36        }
37        $legend .= <<<EOF
38        </tr>
39        </table></td>
40</tr>
41</table>
42EOF;
43    }
44
45?>
46<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
47<html>
48<head>
49    <title><?php echo html_entities($page_title) ?></title>
50
51    <link rel="icon"          href="<?php echo skin_url ?>img/favicon.ico" type="image/x-icon">
52    <link rel="shortcut icon" href="<?php echo skin_url ?>img/favicon.ico" type="image/x-icon">
53
54    <link type="application/opensearchdescription+xml" rel="search" href="<?php echo root ?>tv/opensearch?type=xml" title="MythTV">
55
56    <meta http-equiv="content-type" content="text/html; charset=utf-8">
57
58    <script type="text/javascript" src="<?php echo root ?>js/prototype.js"></script>
59    <script type="text/javascript" src="<?php echo root ?>js/prototip/prototip.js"></script>
60    <link rel="stylesheet" type="text/css" href="<?php echo root; ?>js/prototip/prototip.css">
61
62    <script type="text/javascript" src="<?php echo root ?>js/utils.js"></script>
63    <script type="text/javascript" src="<?php echo root ?>js/AC_OETags.js"></script>
64
65    <script type="text/javascript">
66        <!--
67        // -----------------------------------------------------------------------------
68        // Globals
69        // Major version of Flash required
70        var requiredMajorVersion = 9;
71        // Minor version of Flash required
72        var requiredMinorVersion = 0;
73        // Minor version of Flash required
74        var requiredRevision = 0;
75        // -----------------------------------------------------------------------------
76        // -->
77    </script>
78
79    <link rel="stylesheet" type="text/css" href="<?php echo skin_url ?>/style.css">
80    <link rel="stylesheet" type="text/css" href="<?php echo skin_url ?>/header.css">
81    <link rel="stylesheet" type="text/css" href="<?php echo skin_url ?>/menus.css">
82    <link rel="stylesheet" type="text/css" href="<?php echo skin_url ?>/programming.css">
83
84<?php
85    if (!empty($headers) && is_array($headers))
86        echo '    ', implode("\n    ", $headers), "\n";
87?>
88
89</head>
90
91<body>
92
93<div id="page_header" class="clearfix">
94    <div id="logo_box">
95        <a id="mythtv_logo" href="<?php echo root ?>">
96        <img src="<?php echo skin_url ?>img/mythtv-logo.png" alt="MythTV" class="alpha_png">
97        </a>
98    </div>
99    <div id="sections">
100        <a id="tv_link"<?php if ($Path[0] == 'tv') echo ' class="current_section"' ?> href="<?php echo root ?>tv" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('TV functions, including recorded programs.')) ?>')" onmouseout="return help_text()">
101            <img src="<?php echo skin_url ?>img/tv.png" class="alpha_png" alt="MythTV">
102        </a>
103<?php if ($Modules['music']) { ?>
104        <a id="music_link"<?php if ($Path[0] == 'music') echo ' class="current_section"' ?> href="<?php echo root ?>music" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('MythMusic on the web.')) ?>')" onmouseout="return help_text()">
105            <img src="<?php echo skin_url ?>img/music.png" class="alpha_png" alt="MythMusic">
106        </a>
107<?php
108      }
109      if ($Modules['video']) {
110?>
111        <a id="video_link"<?php if ($Path[0] == 'video') echo ' class="current_section"' ?> href="<?php echo root ?>video" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('MythVideo on the web.')) ?>')" onmouseout="return help_text()">
112            <img src="<?php echo skin_url ?>img/video.png" class="alpha_png" alt="MythVideo">
113        </a>
114<?php
115      }
116      if ($Modules['weather']) {
117?>
118        <a id="weather_link"<?php if ($Path[0] == 'weather') echo ' class="current_section"' ?> href="<?php echo root ?>weather" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('MythWeb Weather.')) ?>')" onmouseout="return help_text()">
119            <img src="<?php echo skin_url ?>img/weather.png"  class="alpha_png" alt="MythWeather">
120        </a>
121<?php
122      }
123?>
124        <a id="settings_link"<?php if ($Path[0] == 'settings') echo ' class="current_section"' ?> href="<?php echo root ?>settings" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('Edit MythWeb and some MythTV settings.')) ?>')" onmouseout="return help_text()">
125            <img src="<?php echo skin_url ?>img/settings.png" class="alpha_png" alt="<?php echo t('Settings') ?>">
126        </a>
127    </div>
128    <div id="extra_header">
129        <div id="help_wrapper">
130            <div id="help_box">
131                <div id="help_text_default">
132                MythWeb: <?php echo strftime($_SESSION['date_statusbar'], time()) ?>
133                </div>
134                <div id="help_text">
135                </div>
136            </div>
137        </div>
138        <div id="search">
139            <form action="<?php echo root ?>tv/search" method="get">
140                <div id="simple_search">
141                    <input type="hidden" name="type" value="q">
142                    <input id="search_text" type="text" name="s" size="15" value="<?php echo html_entities($_SESSION['search']['s']) ?>">
143                    <input id="search_submit" type="submit" class="submit" name="search" value="<?php echo t('Search') ?>">
144                    (<a href="<?php echo root ?>tv/search"><?php echo t('Advanced') ?></a>)
145                </div>
146            </form>
147        </div>
148    </div>
149</div>
150
151
152<table width="100%" border="0" cellspacing="2" cellpadding="0">
153<tr>
154
155    <td colspan="2" class="menu menu_border_t menu_border_b"><table class="body" width="100%" border="0" cellspacing="2" cellpadding="2">
156        <tr>
157            <td><div id="command_choices">
158                    <a href="<?php echo root ?>" <?php
159                        echo show_popup('category_legend',$legend)
160                        ?>>MythTV:</a> &nbsp; &nbsp;
161                    <a href="<?php echo root ?>tv/list"><?php echo t('Listings') ?></a>
162                    &nbsp; | &nbsp;
163                    <a href="<?php echo root ?>tv/searches"><?php echo t('Searches') ?></a>
164                    &nbsp; | &nbsp;
165                    <a href="<?php  echo root ?>tv/schedules"><?php echo t('Recording Schedules') ?></a>
166                    (<a href="<?php echo root ?>tv/schedules/manual"><?php echo t('Manual') ?></a>,
167                    <a href="<?php  echo root ?>tv/schedules/custom"><?php echo t('Custom') ?></a>)
168                    &nbsp; | &nbsp;
169                    <a href="<?php echo root ?>tv/upcoming"><?php echo t('Upcoming Recordings') ?></a>
170                    &nbsp; | &nbsp;
171                    <a href="<?php echo root ?>tv/recorded"><?php echo t('Recorded Programs') ?></a>
172                    &nbsp; | &nbsp;
173                    <a href="<?php echo root ?>status"><?php echo t('Backend Status') ?></a>
174<?php if ($Modules['backend_log']) { ?>
175                    &nbsp; | &nbsp;
176                    <a href="<?php echo root ?>backend_log"><?php echo t('Backend Logs') ?></a>
177<?php } ?>
178                </div></td>
179        </tr>
180        </table></td>
181
182</tr>
183</table>
184
185<?php
186// Errors go here
187    display_errors();