/
detail.php
786 lines (746 loc) · 40.2 KB
/
detail.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
<?php
/**
* This displays details about a program, as well as provides recording
* commands.
*
* @license GPL
*
* @package MythWeb
* @subpackage TV
*
/**/
// Set the desired page title
$page_title = 'MythWeb - '.t('Program Detail').": $schedule->title";
// Custom headers
$headers[] = '<link rel="stylesheet" type="text/css" href="'.skin_url.'/tv_schedule.css">';
$headers[] = '<link rel="stylesheet" type="text/css" href="'.skin_url.'/tv_detail.css">';
$headers[] = '<script type="text/javascript" src="'.root_url.'js/flowplayer-3.1.1.min.js"></script>';
// Print the page header
require 'modules/_shared/tmpl/'.tmpl.'/header.php';
if ($program && $program->filename) {
$flv_w = setting('WebFLV_w');
$flv_h = intVal($flv_w / $program->getAspect()) + 25; // +25px for the playback controls
}
/*
* Print the page contents:
* I really hate tables, but this layout just doesn't work right with pure-css,
* considering that different languages and setups will all have varied widths
* that make it too hard to lay out. In its defense, it *is* somewhat tabular.
/*/
?>
<script type="text/javascript">
<!--
// Keep track of the autoexpire flag
var autoexpire = <?php echo $program->auto_expire ? 1 : 0 ?>;
// Set the autoexpire flag
function set_autoexpire() {
var r = new Ajax.Request('<?php echo root_url ?>tv/detail/<?php echo $program->chanid, '/', $program->recstartts ?>',
{
parameters: 'toggle_autoexpire='+(1 - autoexpire),
asynchronous: false
});
if (r.transport.responseText == 'success') {
// Update to the new value
autoexpire = 1 - autoexpire;
// Fix the images
$('autoexpire').src = '<?php echo skin_url, '/img/flags/' ?>'
+ (autoexpire
? ''
: 'no_')
+ 'autoexpire.png';
if (autoexpire)
$('autoexpire').title = '<?php echo addslashes(t('Click to disable Auto Expire')) ?>';
else
$('autoexpire').title = '<?php echo addslashes(t('Click to enable Auto Expire')) ?>';
}
else if (r.transport.responseText) {
alert('Error: '+r.transport.responseText);
}
}
function confirm_delete(forget_old) {
if (confirm("<?php echo str_replace('"', '\\"',
t('Are you sure you want to delete the following show?')
.'\n\n '
.$program->title
.($program->subtitle
? ': '.$program->subtitle
: '')) ?>")) {
location.href = '<?php echo root_url ?>tv/recorded?delete=yes&chanid=<?php
echo $program->chanid
?>&starttime=<?php echo $program->recstartts ?>'
+(forget_old
? '&forget_old=yes'
: '');
}
}
function openFlashPlayerInNewWindow() {
player = window.open('', 'Flash Player', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=<?php echo $flv_w; ?>,height=<?php echo $flv_h; ?>,left=20,top=20');
player.document.write('<html><body style="background-color: black; margin: 0px; padding: 0px;">'+$$('.x-pixmap')[0].textContent+'</body></html>');
}
function watchShow(host, chanid, starttime) {
new Ajax.Request('<?php echo root_url;?>remote/play_program_on_frontend', {
method: 'get',
parameters: {exit: 1,
host: host,
chanid: chanid,
starttime: starttime,
}
}
);
}
// -->
</script>
<div id="content">
<div id="contentBlock">
<div id="div-x-info">
<table id="x-info" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<?php if ($channel) { ?>
<td class="x-channel">
<a href="<?php echo root_url ?>tv/channel/<?php echo $channel->chanid, '/', $program->starttime ?>"
title="<?php
echo t('Details for: $1',
html_entities($channel->name))
?>">
<?php if ($_SESSION["show_channel_icons"] == true && !empty($channel->icon)) { ?>
<img src="<?php echo $channel->icon ?>">
<?php } ?>
<br>
<?php echo ($_SESSION["prefer_channum"] ? $channel->callsign : $channel->channum), "\n" ?>
</a>
</td>
<?php } ?>
<td id="x-title"<?php
if (!$channel)
echo ' colspan="2"';
if ($program && $program->css_class)
echo ' class="', $program->css_class, '"';
?>>
<a href="<?php echo root_url ?>tv/search/<?php echo str_replace('%2F', '/', rawurlencode('^'.$schedule->title.'$')) ?>?field=title"><?php
echo $schedule->title;
if ($schedule->subtitle)
echo ':<br>', $schedule->subtitle;
?></a>
<div id="x-time"><?php
echo strftime('%a, %b %e', $schedule->starttime);
echo ', '
.t('$1 to $2', strftime($_SESSION['time_format'], $schedule->starttime),
strftime($_SESSION['time_format'], $schedule->endtime));
if ($program)
echo ' ('.tn('$1 min', '$1 mins', intval($program->length/60)).')';
echo "<br>\n";
?></div>
</td>
</tr><?php
if (!empty($schedule->fancy_description)) {
?><tr>
<td id="x-description" colspan="2">
<?php echo nl2br($schedule->fancy_description) ?>
</td>
</tr><?php
}
if ($program) {
?><tr id="x-progflags">
<td colspan="2"><?php
// Auto expire is interactive for recordings
if ($program->filename) {
echo '<a onclick="set_autoexpire()">',
'<img id="autoexpire" src="', skin_url, '/img/flags/';
if ($program->auto_expire)
echo 'autoexpire.png" title="', t('Click to disable Auto Expire'), '"';
else
echo 'no_autoexpire.png" title="', t('Click to enable Auto Expire'), '"';
echo '></a>';
}
elseif ($program->auto_expire) {
echo '<img src="', skin_url, '/img/flags/autoexpire.png" title="', t('Auto Expire'), '">';
}
// The rest of the flags are just for display
if ($program->closecaptioned)
echo '<img src="'.skin_url.'/img/flags/cc.png" title="'.t('Closed Captioning').'">';
if ($program->stereo)
echo '<img src="'.skin_url.'/img/flags/stereo.png" title="'.t('Stereo').'">';
if ($program->hdtv)
echo '<img src="'.skin_url.'/img/flags/hd.png" title="'.t('HD').'">';
if ($program->has_commflag)
echo '<img src="'.skin_url.'/img/flags/commflagged.png" title="'.t('Commercials Flagged').'">';
if ($program->has_cutlist)
echo '<img src="'.skin_url.'/img/flags/cutlist.png" title="'.t('Has Cutlist').'">';
if ($program->bookmark)
echo '<img src="'.skin_url.'/img/flags/bookmark.png" title="'.t('has Bookmark').'">';
if ($program->is_watched)
echo '<img src="'.skin_url.'/img/flags/watched.png" title="'.t('Watched').'">';
// Report transcoded status for recordings
if ($program->filename) {
if ($program->is_transcoded)
echo t(' TRANSCODED');
}
?></td>
</tr><?php
if (strlen($program->category)) {
?><tr class="x-extras">
<th><?php echo t('Category') ?>:</th>
<td><?php echo $program->category ?></td>
</tr><?php
}
if (strlen($program->category_type)) {
?><tr class="x-extras">
<th><?php echo t('Type') ?>:</th>
<td><?php echo $program->category_type;
if ($program->seriesid)
echo ' (', $program->seriesid, ')' ?></td>
</tr><?php
}
if (strlen($program->syndicatedepisodenumber) > 0) {
?><tr class="x-extras">
<th><?php echo t('Episode Number') ?>:</th>
<td><?php echo $program->syndicatedepisodenumber ?></td>
</tr><?php
}
if (strlen($program->airdate)) {
?><tr class="x-extras">
<th><?php echo t('Original Airdate') ?>:</th>
<td><?php echo $program->airdate ?></td>
</tr><?php
}
if (strlen($program->programid) > 0) {
?><tr class="x-extras">
<th><?php echo t('Program ID') ?>:</th>
<td><?php echo $program->programid ?></td>
</tr><?php
}
if ($program->get_credits('host', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Hosted by') ?>:</th>
<td><?php echo $program->get_credits('host', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('presenter', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Presented by') ?>:</th>
<td><?php echo $program->get_credits('presenter', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('actor', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Cast') ?>:</th>
<td><?php echo $program->get_credits('actor', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('guest_star', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Guest Starring') ?>:</th>
<td><?php echo $program->get_credits('guest_star', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('director', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Directed by') ?>:</th>
<td><?php echo $program->get_credits('director', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('producer', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Produced by') ?>:</th>
<td><?php echo $program->get_credits('producer', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('executive_producer', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Exec. Producer') ?>:</th>
<td><?php echo $program->get_credits('executive_producer', TRUE) ?></td>
</tr><?php
}
if ($program->get_credits('writer', TRUE)) {
?><tr class="x-extras">
<th><?php echo t('Written by') ?>:</th>
<td><?php echo $program->get_credits('writer', TRUE) ?></td>
</tr><?php
}
if (strlen($program->starstring) > 0) {
?><tr class="x-extras">
<th><?php echo t('Guide rating') ?>:</th>
<td><?php echo $program->starstring ?></td>
</tr><?php
}
?><tr class="x-extras">
<th><?php echo t('Length') ?>:</th>
<td><?php echo nice_length($program->length) ?></td>
</tr><?php
if ($program->filename) {
?><tr class="x-extras">
<th><?php echo t('File Size') ?>:</th>
<td><?php echo nice_filesize($program->filesize) ?></td>
</tr><?php
}
if (strlen($program->recgroup)) {
?><tr class="x-extras">
<th><?php echo t('Recording Group') ?>:</th>
<td><?php echo $program->recgroup ?></td>
</tr><?php
}
if (strlen($program->playgroup)) {
?><tr class="x-extras">
<th><?php echo t('Playback Group') ?>:</th>
<td><?php echo $program->playgroup ?></td>
</tr><?php
}
}
// Can we perform an accurate duplicate check?
$can_dupcheck = preg_match('/\S/', $program->title)
&& preg_match('/\S/', $program->programid.$program->subtitle.$program->description);
if (!empty($program->recstatus) || $can_dupcheck) {
?><tr id="x-status">
<th><?php echo t('MythTV Status') ?>:</th>
<td><?php
if (!empty($program->recstatus)) {
echo $GLOBALS['RecStatus_Reasons'][$program->recstatus], '<br>';
if ($can_dupcheck && in_array($program->recstatus, array('Recorded', 'NeverRecord', 'PreviousRecording'))) {
echo '<a href="'.root_url.'tv/detail/'.$program->chanid
.'/'.$program->starttime.'?forget_old=yes"'
.'title="'.html_entities(t('info:forget old')).'">'
.t('Forget Old').'</a>';
}
}
if ($can_dupcheck && !in_array($program->recstatus, array('Recorded', 'NeverRecord'))) {
echo '<a href="'.root_url.'tv/detail/'.$program->chanid
.'/'.$program->starttime.'?never_record=yes"'
.'title="'.html_entities(t('info:never record')).'">'
.t('Never Record').'</a>';
}
if ($program->filename && $program->can_delete) {
echo '<a onclick="javascript:confirm_delete(false)"',
' title="',html_entities(t('Delete $1',
$program->title
.($show->subtitle
? ': '.$show->subtitle
: '')
)).'">',
t('Delete'), '</a>',
'<a onclick="javascript:confirm_delete(true)"',
' title="',html_entities(t('Delete and rerecord $1',
$program->title
.($show->subtitle
? ': '.$show->subtitle
: '')
)).'">',
t('Delete + Rerecord'), '</a>';
}
?></td>
</tr><?php
}
if (count($conflicting_shows)) {
?><tr id="x-conflicts">
<th><?php echo t('Possible conflicts') ?>:<br><br>
<div style="text-align: left;">
<?php echo t('Filters'); ?><br>
<form id="change_display" name="change_display" action="<?php echo root_url; ?>tv/detail<?php if ($_GET['recordid'])
echo '?recordid='.urlencode($_GET['recordid']);
else
echo '/'.urlencode($_GET['chanid']).'/'.urlencode($_GET['starttime']) ?>" method="post">
<input type="hidden" name="change_display" value="1">
<label for="CurrentRecording"><input type="checkbox" id="CurrentRecording" name="CurrentRecording" onclick="$('change_display').submit()" <?php if ($_SESSION['recording_details']['show_CurrentRecording']) echo "CHECKED"; ?>> <?php echo t('Current Recording'); ?></label><br>
<label for="EarlierShowing"><input type="checkbox" id="EarlierShowing" name="EarlierShowing" onclick="$('change_display').submit()" <?php if ($_SESSION['recording_details']['show_EarlierShowing']) echo "CHECKED"; ?>> <?php echo t('Earlier Showing'); ?></label><br>
<label for="PreviousRecording"><input type="checkbox" id="PreviousRecording" name="PreviousRecording" onclick="$('change_display').submit()" <?php if ($_SESSION['recording_details']['show_PreviousRecording']) echo "CHECKED"; ?>> <?php echo t('Previous Recording'); ?></label><br>
<label for="WillRecord"><input type="checkbox" id="WillRecord" name="WillRecord" onclick="$('change_display').submit()" <?php if ($_SESSION['recording_details']['show_WillRecord']) echo "CHECKED"; ?>> <?php echo t('Will Record'); ?></label><br>
<label for="Conflict"><input type="checkbox" id="Conflict" name="Conflict" onclick="$('change_display').submit()" <?php if ($_SESSION['recording_details']['show_Conflict']) echo "CHECKED"; ?>> <?php echo t('Conflicts'); ?></label><br>
</div>
</form>
</th>
<td><?php
// A program id counter for popup info
$program_id_counter = 0;
foreach ($conflicting_shows as $show) {
if (!isset($_SESSION['recording_details']['show_'.$show->recstatus]))
continue;
$program_id_counter++;
// Print the link to edit this scheduled recording
echo '<a class="', $show->css_class,
'" title="', html_entities(t('$1 to $2',
strftime($_SESSION['time_format'], $show->starttime),
strftime($_SESSION['time_format'], $show->endtime))
.', '.($_SESSION["prefer_channum"] ? $show->channel->channum : $show->channel->callsign)
.' - '.$show->channel->name).'"';
if ($_SESSION["show_popup_info"])
echo show_popup("program_$program_id_counter", $show->details_list(), NULL, 'popup');
echo ' href="'.root_url.'tv/detail/'.$show->chanid.'/'.$show->starttime.'">'
.$show->title
.(preg_match('/\\w/', $show->subtitle) ? ": $show->subtitle" : '')
.'</a>';
}
?></td>
</tr><?php
}
?><tr class="x-links">
<th><?php echo t('More') ?>:</th>
<td>
<?php if ($schedule->title) { ?>
<a href="http://www.themoviedb.org/search/movies?search%5btext%5d=<?php echo urlencode($schedule->title) ?>"><?php echo t('Search $1', 'themoviedb') ?></a>
<a href="http://www.imdb.com/search/title?title=<?php echo urlencode($schedule->title) ?>"><?php echo t('Search $1', 'IMDB') ?></a>
<a href="http://www.thetvdb.com/?string=<?php echo urlencode($schedule->title) ?>&searchseriesid=&tab=listseries&function=Search"><?php echo t('Search $1', 'TheTVDB') ?></a>
<a href="http://www.tv.com/search.php?type=11&stype=all&qs=<?php echo urlencode($schedule->title) ?>"><?php echo t('Search $1', 'TV.com') ?></a>
<a href="http://www.google.com/search?q=<?php echo urlencode($schedule->title) ?>"><?php echo t('Search $1', 'Google') ?></a>
<a href="<?php echo root_url ?>tv/search/<?php echo str_replace('%2F', '/', rawurlencode('^'.$schedule->title.'$')) ?>?field=title"><?php
if ($_GET['recordid'])
echo t('Find showings of this program');
else
echo t('Find other showings of this program');
?></a>
<?php }
if ($_GET['recordid']) {
echo '<a href="', root_url, 'tv/schedules">',
t('Back to the recording schedules'),
'</a>';
echo '<a href="', root_url, 'tv/list?time=', $_SESSION['list_time'], '">',
t('Back to the program listing'),
'</a>';
}
else {
if ($program->endtime > time()) {
echo '<a href="', root_url, 'tv/list?time=', $program->starttime, '">',
t('What else is on at this time?'),
'</a>';
}
if ($program->filename) {
echo '<a href="', root_url, 'tv/recorded">',
t('Back to the recorded programs'),
'</a>';
}
else {
echo '<a href="', root_url, 'tv/list?time=', $_SESSION['list_time'], '">',
t('Back to the program listing'),
'</a>';
}
} ?>
</td>
</tr>
</table>
</div>
<?php if (!$program || !$program->filename || ($program->filename && $program->recendts > time())) { ?>
<div id="schedule">
<form name="program_detail" method="post" action="<?php echo root_url ?>tv/detail<?php
if ($_GET['recordid'])
echo '?recordid='.urlencode($_GET['recordid']);
else
echo '/'.urlencode($_GET['chanid']).'/'.urlencode($_GET['starttime'])
?>">
<?php if (!$schedule || $schedule->type != rectype_override && $schedule->type != rectype_dontrec) { ?>
<div class="x-options">
<h3><?php echo t('Schedule Options') ?>:</h3>
<?php
if ($program && $schedule) {
echo '(<a href="'.root_url.'tv/';
// Link to different places for different kinds of schedules
if ($schedule->search) {
echo 'schedules/',
($schedule->search == searchtype_manual) ? 'manual'
: 'custom',
'/', $schedule->recordid;
}
else
echo 'detail?recordid='.$schedule->recordid;
echo '">'.t('View').'</a>)';
}
?>
<ul>
<li><input type="radio" class="radio" name="record" value="0" id="record_never"<?php
if (!$schedule->recordid || $schedule->search) echo ' CHECKED' ?> />
<label for="record_never"><?php
if ($schedule->search) {
echo t('Schedule via $1.',
'<a href='.root_url.'tv/schedules/'
.($schedule->search == searchtype_manual
? 'manual'
: 'custom'
)
.'/'.$schedule->recordid.'>'
.$schedule->search_title.'</a>');
}
elseif ($schedule->recordid)
echo t('Cancel this schedule.');
else
echo t('Don\'t record this program.');
?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_once ?>" id="record_once"<?php
echo $schedule->type == rectype_once ? ' CHECKED' : '' ?> />
<label for="record_once"><?php echo t('rectype-long: once') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_daily ?>" id="record_daily"<?php
echo $schedule->type == rectype_daily ? ' CHECKED' : '' ?> />
<label for="record_daily"><?php echo t('rectype-long: daily') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_weekly ?>" id="record_weekly"<?php
echo $schedule->type == rectype_weekly ? ' CHECKED' : '' ?> />
<label for="record_weekly"><?php echo t('rectype-long: weekly') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_findone ?>" id="record_findone"<?php
echo $schedule->type == rectype_findone ? ' CHECKED' : '' ?> />
<label for="record_findone"><?php echo t('rectype-long: findone') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_finddaily ?>" id="record_finddaily"<?php
echo $schedule->type == rectype_finddaily ? ' CHECKED' : '' ?> />
<label for="record_finddaily"><?php echo t('rectype-long: finddaily') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_findweekly ?>" id="record_findweekly"<?php
echo $schedule->type == rectype_findweekly ? ' CHECKED' : '' ?> />
<label for="record_findweekly"><?php echo t('rectype-long: findweekly') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_channel ?>" id="record_channel"<?php
echo $schedule->type == rectype_channel ? ' CHECKED' : '' ?> />
<label for="record_channel"><?php echo t('rectype-long: channel', $channel->callsign) ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_always ?>" id="record_always"<?php
echo $schedule->type == rectype_always ? ' CHECKED' : '' ?> />
<label for="record_always"><?php echo t('rectype-long: always') ?></label></li>
</ul>
</div>
<?php
}
if ($schedule && $schedule->type != rectype_once && ($schedule->search || $schedule->type)) {
?>
<div class="x-options">
<h3><?php echo t('Schedule Override') ?>:</h3>
<ul>
<?php if ($schedule->type == rectype_override || $schedule->type == rectype_dontrec) { ?>
<li><input type="radio" class="radio" name="record" value="0" id="schedule_default"<?php
if ($schedule->type != rectype_override && $schedule->type != rectype_dontrec) echo ' CHECKED' ?> />
<label for="schedule_default"><?php
echo t('Schedule normally.') ?></label></li>
<?php } ?>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_override ?>" id="record_override"<?php
if ($schedule->type == rectype_override) echo ' CHECKED' ?> />
<label for="record_override"><?php
echo t('rectype-long: override') ?></label></li>
<li><input type="radio" class="radio" name="record" value="<?php echo rectype_dontrec ?>" id="record_dontrec"<?php
if ($schedule->type == rectype_dontrec) echo ' CHECKED' ?> />
<label for="record_dontrec"><?php
echo t('rectype-long: dontrec') ?></label></li>
</ul>
</div>
<?php } ?>
<div class="x-options">
<?php require_once tmpl_dir.'_advanced_options.php' ?>
</div>
<div id="x-schedule_submit">
<input type="submit" class="submit" name="save" value="<?php echo t('Update Recording Settings') ?>">
</div>
</form>
</div>
<?php
}
if ($program && $program->filename) {
?>
<div id="x-downloads">
<div class="x-pixmap">
<?php if (setting('WebFLV_on')) { ?>
<?php if (file_exists('modules/tv/flowplayer-3.1.1.swf')) { ?>
<!-- this A tag is where your Flowplayer will be placed. it can be anywhere -->
<a href=""
style="display:block;width:<?php echo $flv_w ?>px;height:<?php echo $flv_h ?>px"
id="player">
</a>
<!-- this will install flowplayer inside previous A- tag. -->
<script>
flowplayer(
"player",
"<?php echo root_url ?>tv/flowplayer-3.1.1.swf", {
playlist: [
// this first PNG clip works as a splash image
{
url: '<?php echo $program->thumb_url($flv_w,0) ?>',
scaling: 'orig'
},
// Then we have the video
{
url: "<?php echo video_url($program, 'flv'); ?>",
duration: <?php echo $program->length ?>,
autoPlay: false,
scaling: 'fit',
// Would be nice to auto-buffer, but we don't want to
// waste bandwidth and CPU on the remote machine.
autoBuffering: false
}
]}
);
</script>
<?php } elseif (file_exists('modules/tv/MFPlayer.swf')) { ?>
<script langfuage="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
if ( hasProductInstall && !hasRequestedVersion ) {
// MMdoctitle is the stored document.title value used by
// the installation process to close the window that
// started the process. This is necessary in order to
// close browser windows that are still utilizing the
// older version of the player after installation has
// completed
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if
// installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
var MMdoctitle = document.title;
document.title = document.title.slice(0, 47)
+" - Flash Player Installation";
AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL
+'&MMplayerType='+MMPlayerType
+'&MMdoctitle='+MMdoctitle,
"width", "<?php echo $flv_w ?>",
"height", "<?php echo $flv_h ?>",
"align", "middle",
"id", "MFPlayer",
"quality", "high",
"bgcolor", "#869ca7",
"name", "MFPlayer",
"allowScriptAccess","sameDomain",
"movie", "<?php echo root_url; ?>tv/playerProductInstall",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// If we've detected an acceptable version, embed
// the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "MFPlayer",
"width", "<?php echo $flv_w ?>",
"height", "<?php echo $flv_h ?>",
"align", "middle",
"id", "MFPlayer",
"quality", "high",
"bgcolor", "#869ca7",
"name", "MFPlayer",
"flashvars",'file=<?php echo video_url($program, 'flv');
?>&still=<?php echo $program->thumb_url($flv_w,$flv_h);
?>&totalTime=<?php echo $program->length;
?>&width=<?php echo $flv_w;
?>&height=<?php echo $flv_h;
?>&styles=<?php echo root_url ?>tv/MFPlayer_styles.swf',
"allowScriptAccess","sameDomain",
"allowFullScreen", "true",
"movie", "<?php echo root_url; ?>tv/MFPlayer",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else { // flash is too old or we can't detect the plugin
document.write('<img src="<?php echo $program->thumb_url($flv_w,0) ?>"'
+' width="<?php echo $flv_w ?>"><br>'
+'Web-based video playback requires the '
+'<a href=http://www.adobe.com/go/getflash/>Adobe Flash Player</a>.'
);
}
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="MFPlayer" width="<?php echo $flv_w ?>" height="<?php echo $flv_h ?>"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="<?php echo root_url; ?>tv/MFPlayer.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name="FlashVars" value="file=<?php echo video_url($program, 'flv');
?>&still=<?php echo $program->thumb_url($flv_w,$flv_h);
?>&totalTime=<?php echo $program->length;
?>&width=<?php echo $flv_w;
?>&height=<?php echo $flv_h;
?>&styles=<?php echo root_url ?>tv/MFPlayer_styles.swf"
>
<embed src="<?php echo root_url; ?>tv/MFPlayer.swf" quality="high" bgcolor="#869ca7"
width="<?php echo $flv_w ?>" height="<?php echo $flv_h ?>" name="MFPlayer" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
allowFullScreen="true"
FlashVars="file=<?php echo video_url($program, 'flv');
?>&still=<?php echo $program->thumb_url($flv_w,0);
?>&totalTime=<?php echo $program->length;
?>&width=<?php echo $flv_w;
?>&height=<?php echo $flv_h;
?>&styles=<?php echo root_url ?>tv/MFPlayer_styles.swf"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</noscript>
<?php } ?>
<?php } else { ?>
<a href="<?php echo $program->url ?>" title="<?php echo t('Direct Download') ?>"
><img src="<?php echo $program->thumb_url($flv_w,0) ?>" width="<?php echo $flv_w ?>"></a>
<?php } ?></td>
</div>
<div class="x-links">
<a href="<?php echo video_url($program, 'asx') ?>" title="<?php echo t('ASX Stream') ?>"
><img src="<?php echo skin_url ?>/img/play_sm.png">
<?php echo t('ASX Stream') ?></a>
<a href="<?php echo $program->url ?>" title="<?php echo t('Direct Download') ?>"
><img src="<?php echo skin_url ?>/img/video_sm.png">
<?php echo t('Direct Download') ?></a>
<?php if (setting('WebFLV_on') && file_exists('modules/tv/MFPlayer.swf')) { ?>
<a onclick="openFlashPlayerInNewWindow(); return false;" title="<?php echo t('Pop-out player'); ?>">
<?php echo t('Pop-out player'); ?>
</a>
<?php } ?>
</div>
<div class="x-jobs">
<?php
if (count($program->jobs_possible)) {
echo t('Queue a job'), ':',
' <ul class="x-queue">';
foreach ($program->jobs_possible as $id => $job) {
echo ' <li>',
'<a href="',
root_url, 'tv/detail/', $program->chanid, '/', $program->recstartts,
'?job=', $id,
'">', $job, "</a></li>";
}
echo ' </ul>';
}
if (count($program->jobs['queue'])) {
echo t('Queued jobs'), ':',
' <ul class="-queued">';
foreach ($program->jobs['queue'] as $job) {
echo ' <li>',
$Jobs[$job['type']],
' (', $Job_Status[$job['status']],
': ', strftime($_SESSION['date_listing_key'], $job['statustime']),
')<br>',
html_entities($job['comment']),
'</li>';
}
echo ' </ul>';
}
if (count($program->jobs['done'])) {
echo t('Recently completed jobs'), ':',
' <ul class="-done">';
foreach ($program->jobs['done'] as $job) {
echo ' <li>',
$Jobs[$job['type']],
' (', $Job_Status[$job['status']],
': ', strftime($_SESSION['date_listing_key'], $job['statustime']),
')<br>',
html_entities($job['comment']),
'</li>';
}
echo ' </ul>';
}
?>
</div>
<?php
$frontends = MythFrontend::findFrontends();
if (is_array($frontends)) {
echo '<div class="x-frontends">'.t('Play Recording on Frontend').':<ul>';
foreach ($frontends as $frontend)
echo '<li><a onclick="watchShow(\''.urlencode($frontend->getHost()).'\', \''.urlencode($program->chanid).'\', \''.urlencode($program->recstartts).'\');">'.$frontend->getHost().'</a><br>';
echo '</ul></div>';
}
?>
</div>
<?php
}
?>
</div>
</div>
<?php
// Print the page footer
require 'modules/_shared/tmpl/'.tmpl.'/footer.php';