1 | <?php |
---|
2 | /** |
---|
3 | * Print the program list data only |
---|
4 | * |
---|
5 | * @url $URL: http://svn.mythtv.org/svn/branches/release-0-21-fixes/mythplugins/mythweb/modules/tv/tmpl/default/list_data.php $ |
---|
6 | * @date $Date: 2008-02-22 15:37:25 -0600 (Fri, 22 Feb 2008) $ |
---|
7 | * @version $Revision: 16203 $ |
---|
8 | * @author $Author: xris $ |
---|
9 | * @license GPL |
---|
10 | * |
---|
11 | * @package MythWeb |
---|
12 | * @subpackage TV |
---|
13 | * |
---|
14 | /**/ |
---|
15 | |
---|
16 | // UTF-8 content |
---|
17 | @header("Content-Type: text/html; charset=utf-8"); |
---|
18 | ?> |
---|
19 | |
---|
20 | <div id="list_head" class="clearfix"> |
---|
21 | <form class="form" id="program_listing" action="<?php echo root ?>tv/list" method="get"> |
---|
22 | <div id="x_current_time"><?php |
---|
23 | echo t('Currently Browsing: $1', strftime($_SESSION['date_statusbar'], $list_starttime)) |
---|
24 | ?></div> |
---|
25 | <table id="x-jumpto" class="commandbox commands" border="0" cellspacing="0" cellpadding="0"> |
---|
26 | <tr> |
---|
27 | <td class="x-jumpto"><?php echo t('Jump To') ?>:</td> |
---|
28 | <td class="x-hour"><?php hour_select('id="hour_select" onchange="list_update($(\'hour_select\')[$(\'hour_select\').selectedIndex].value);"') ?></td> |
---|
29 | <td class="x-day"> |
---|
30 | <a class="link" onclick="list_update(<?php echo $list_starttime - (24 * 60 * 60); ?>);"> |
---|
31 | <img src="<?php echo skin_url ?>img/left.gif" alt="<?php echo t('left'); ?>"> |
---|
32 | </a> |
---|
33 | <?php date_select('id="date_select" onchange="list_update($(\'date_select\')[$(\'date_select\').selectedIndex].value);"') ?> |
---|
34 | <a class="link" onclick="list_update(<?php echo $list_starttime + (24 * 60 * 60); ?>);"> |
---|
35 | <img src="<?php echo skin_url ?>img/right.gif" alt="<?php echo t('right'); ?>"> |
---|
36 | </a> |
---|
37 | </td> |
---|
38 | </tr> |
---|
39 | </table> |
---|
40 | </form> |
---|
41 | </div> |
---|
42 | |
---|
43 | <table width="100%" border="0" cellpadding="4" cellspacing="2" class="list small"> |
---|
44 | <?php |
---|
45 | |
---|
46 | $timeslot_anchor = 0; |
---|
47 | $channel_count = 0; |
---|
48 | $displayed_channels = array(); |
---|
49 | |
---|
50 | // Go through each channel and load/print its info - use references to avoid "copy" overhead |
---|
51 | foreach ($Callsigns as $chanid) { |
---|
52 | $channel = $Channels[$chanid]; |
---|
53 | // Ignore channels with no number |
---|
54 | if (strlen($channel->channum) < 1) |
---|
55 | continue; |
---|
56 | // Ignore invisible channels |
---|
57 | if ($channel->visible == 0) { |
---|
58 | continue; |
---|
59 | } |
---|
60 | // Skip already-displayed channels |
---|
61 | //tct if ($displayed_channels[$channel->channum]) |
---|
62 | //tct continue; |
---|
63 | $displayed_channels[$channel->channum] = 1; |
---|
64 | // Display the timeslot bar? |
---|
65 | if ($channel_count % timeslotbar_skip == 0) { |
---|
66 | // Update the timeslot anchor |
---|
67 | $timeslot_anchor++; |
---|
68 | ?><tr> |
---|
69 | <td class="menu" align="right"><a class="link" onclick="list_update(<?php echo $list_starttime - (timeslot_size * num_time_slots); ?>);" name="anchor<?php echo $timeslot_anchor ?>"><img src="<?php echo skin_url ?>img/left.gif" alt="left"></a></td> |
---|
70 | <?php |
---|
71 | $block_count = 0; |
---|
72 | foreach ($Timeslots as $time) { |
---|
73 | if ($block_count++ % timeslot_blocks) |
---|
74 | continue; |
---|
75 | ?> |
---|
76 | <td class="menu nowrap" colspan="<?php echo timeslot_blocks ?>" style="width: <?php echo intVal(timeslot_blocks * 94 / num_time_slots) ?>%" align="center"><a class="link" onclick="list_update(<?php echo $time; ?>);"><?php echo strftime($_SESSION['time_format'], $time) ?></a></td> |
---|
77 | <?php |
---|
78 | } |
---|
79 | ?> |
---|
80 | <td class="menu nowrap"><a class="link" onclick="list_update(<?php echo $list_starttime + (timeslot_size * num_time_slots); ?>);"><img src="<?php echo skin_url ?>img/right.gif" alt="right"></a></td> |
---|
81 | </tr><?php |
---|
82 | } |
---|
83 | // Count this channel |
---|
84 | $channel_count++; |
---|
85 | // Print the data |
---|
86 | ?><tr> |
---|
87 | <td class="x-channel"> |
---|
88 | <a href="<?php echo root ?>tv/channel/<?php echo $channel->chanid, '/', $list_starttime ?>" |
---|
89 | title="<?php |
---|
90 | echo t('Details for: $1', |
---|
91 | html_entities($channel->name)) |
---|
92 | ?>"> |
---|
93 | <?php if ($_SESSION["show_channel_icons"] == true && !empty($channel->icon)) { ?> |
---|
94 | <img src="<?php echo $channel->icon ?>" height="30" width="30"> |
---|
95 | <?php } ?> |
---|
96 | <span class="x-preferred"><?php echo ($_SESSION["prefer_channum"] ? $channel->channum : $channel->callsign) ?></span><br> |
---|
97 | <?php echo ($_SESSION["prefer_channum"] ? $channel->callsign : $channel->channum), "\n" ?> |
---|
98 | </a> |
---|
99 | </td> |
---|
100 | <?php |
---|
101 | // Let the channel object figure out how to display its programs |
---|
102 | $channel->display_programs($list_starttime, $list_endtime); |
---|
103 | ?> |
---|
104 | <td> </td> |
---|
105 | </tr><?php |
---|
106 | } |
---|
107 | ?> |
---|
108 | </table> |
---|