Ticket #476: mythweb-0.18-fixes.diff
File mythweb-0.18-fixes.diff, 15.7 KB (added by , 19 years ago) |
---|
-
mythweb/themes/wap/program_detail.php
10 10 #class theme_program_detail extends Theme { 11 11 class Theme_program_detail extends Theme { 12 12 13 function print_page( ) {14 global $this_channel, $this_program;13 function print_page(&$this_program, &$schedule, &$this_channel) { 14 // global $this_channel, $this_program; 15 15 // Print the main page header 16 16 parent::print_header("MythWeb - Program Detail: $this_program->title"); 17 17 // Print the page contents … … 21 21 <?=prefer_channum ? $this_channel->callsign : $this_channel->channum?></a><br> 22 22 23 23 <?=$this_program->title?><BR> 24 <?=date('D m/d/y', $ $this_program->starttime)?><br>25 <?=date('g:i A', $ this_program->starttime)?> to <?=date('g:i A', $this_program->endtime)?> (<?=(int)($this_program->length/60)?> minutes)<BR>24 <?=date('D m/d/y', $schedule->starttime)?><br> 25 <?=date('g:i A', $schedule->starttime)?> to <?=date('g:i A', $schedule->endtime)?> (<?=(int)($this_program->length/60)?> minutes)<BR> 26 26 <? 27 27 if ($this_program->previouslyshown) 28 28 echo '(Rerun) '; … … 51 51 ?><br> 52 52 <? } ?> 53 53 54 <form action="program_detail.php" method="get" name="record_settings"> 55 <input type="hidden" name="chanid" value="<?=$_GET['chanid']?>"> 56 <input type="hidden" name="starttime" value="<?=$_GET['starttime']?>"> 54 <form name="program_detail" method="post" action="program_detail.php?<?php 55 if ($_GET['recordid']) 56 echo 'recordid='.urlencode($_GET['recordid']); 57 else 58 echo 'chanid='.urlencode($_GET['chanid']).'&starttime='.urlencode($_GET['starttime']) 59 ?>"> 60 57 61 <br> 58 62 <center>Recording Options:</center> 59 <input type="radio" class="radio" name="record" value=" never" id="record_never"<?=60 $ this_program->will_record ? '' : ' CHECKED'?>></input>63 <input type="radio" class="radio" name="record" value="0" id="record_never"<?= 64 $schedule->recordid ? '' : ' CHECKED'?>></input> 61 65 <a>Don't record</a><br> 62 <input type="radio" class="radio" name="record" value="once" id="record_once"<?= 63 $this_program->record_once ? ' CHECKED' : ''?>></input> 64 <a>Record showing</a><br> 65 <input type="radio" class="radio" name="record" value="daily" id="record_daily"<?= 66 $this_program->record_daily ? ' CHECKED' : ''?>></input> 66 <input type="radio" class="radio" name="record" value="<?php echo rectype_once ?>" id="record_once"<?= 67 $schedule->type == rectype_once ? ' CHECKED' : ''?>></input> 68 <a>Record this showing</a><br> 69 <input type="radio" class="radio" name="record" value="<?php echo rectype_findone ?>" id="record_once"<?= 70 $schedule->type == rectype_findone ? ' CHECKED' : ''?>></input> 71 <a>Record one showing</a><br> 72 <input type="radio" class="radio" name="record" value="<?php echo rectype_daily ?>" id="record_daily"<?= 73 $schedule->type == rectype_daily ? ' CHECKED' : ''?>></input> 67 74 <a>Record every day</a> at this time<br> 68 <input type="radio" class="radio" name="record" value=" weekly" id="record_weekly"<?=69 $ this_program->record_weekly ? ' CHECKED' : ''?>></input>75 <input type="radio" class="radio" name="record" value="<?php echo rectype_weekly ?>" id="record_weekly"<?= 76 $schedule->type == rectype_weekly ? ' CHECKED' : ''?>></input> 70 77 <a>Record every week</a> at this time<br> 71 <input type="radio" class="radio" name="record" value=" channel" id="record_channel"<?=72 $ this_program->record_channel ? ' CHECKED' : ''?>></input>78 <input type="radio" class="radio" name="record" value="<?php echo rectype_channel ?>" id="record_channel"<?= 79 $schedule->type == rectype_channel ? ' CHECKED' : ''?>></input> 73 80 <a>Always record on this channel</a><br> 74 <input type="radio" class="radio" name="record" value=" always" id="record_always"<?=75 $ this_program->record_always ? ' CHECKED' : ''?>></input>81 <input type="radio" class="radio" name="record" value="<?php echo rectype_always ?>" id="record_always"<?= 82 $schedule->type == rectype_always ? ' CHECKED' : ''?>></input> 76 83 <a>Always record on any channel</a><br> 77 84 <br> 78 85 Recording Profile<br> 79 <select name="profile"> 80 <?php 81 82 global $Profiles; 83 foreach($Profiles as $profile) { 84 echo '<option value="'.htmlentities($profile['id']).'"'; 85 if ($this_program->profile == $profile['id']) 86 echo ' SELECTED'; 87 echo '>'.htmlentities($profile['name']).'</option>'; 88 } 89 ?></select><br> 90 Rank<br> 91 <select name="rank"> 92 <?php 93 for($rankcount=-10;$rankcount<=10;++$rankcount) { 94 echo '<option value="'.htmlentities($rankcount).'"'; 95 if ($this_program->rank == $rankcount) 96 echo ' SELECTED'; 97 echo '>'.htmlentities($rankcount).'</option>'; 98 } 99 ?></select><br> 100 <input type="checkbox" class="radio" name="recorddups"<?php if ($this_program->recorddups) echo ' CHECKED' ?>> 101 Record Dupes? <br> 86 <?php profile_select($schedule->profile) ?><br> 87 Priority<br> 88 <select name="recpriority"><?php 89 for ($i=99; $i>=-99; --$i) { 90 echo "<option value=\"$i\""; 91 if ($schedule->recpriority == $i) 92 echo ' SELECTED'; 93 echo ">$i</option>"; 94 } 95 ?></select><br> 102 96 <input type="checkbox" class="radio" name="autoexpire" <?php if ($this_program->autoexpire) echo "CHECKED" ?>> 103 97 Auto-expire? <br> 104 98 No of recordings to keep?<br><input type="input" name="maxepisodes" size="1" value="<?php echo htmlentities($this_program->maxepisodes) ?>"><br> … … 117 111 118 112 } 119 113 120 ?> 121 No newline at end of file 114 ?> -
mythweb/themes/wap/scheduled_recordings.php
14 14 // Print the main page header 15 15 parent::print_header('MythWeb - Scheduled Recordings'); 16 16 // Print the page contents 17 global $ All_Shows;17 global $all_shows; 18 18 19 19 20 20 /* <a href="scheduled_recordings.php?sortby=title">show</a><br> … … 24 24 */ 25 25 26 26 $row = 0; 27 foreach ($ All_Shows as $show) {27 foreach ($all_shows as $show) { 28 28 // Reset the command variable 29 29 $command = ''; 30 30 // Which class does this show fall into? 31 if ($show-> duplicate == 1) {31 if ($show->recstatus == 'PreviousRecording' || $show->recstatus == 'CurrentRecording') { 32 32 $class = 'duplicate'; 33 $command = '<a href="scheduled_recordings.php?re record=yes&title='.urlencode($show->title).'&subtitle='.urlencode($show->subtitle).'&description='.urlencode($show->description).'">Rerecord</a>';33 $command = '<a href="scheduled_recordings.php?record=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'">Re-record</a>'; 34 34 } 35 elseif ($show-> conflicting == 1) {35 elseif ($show->recstatus == 'Conflict' || $show->recstatus == 'Overlap') { 36 36 $class = 'conflict'; 37 $command = '<a href="scheduled_recordings.php?record=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.' &endtime='.$show->endtime.'">Record</a>';37 $command = '<a href="scheduled_recordings.php?record=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'">Record</a>'; 38 38 } 39 elseif ($show->recording == 0) { 39 elseif ($show->recstatus == 'WillRecord') { 40 $class = 'scheduled'; 41 $command = '<a href="scheduled_recordings.php?suppress=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'">Don\'t Record</a>'; 42 } 43 elseif ($show->recstatus == 'ForceRecord') { 44 $class = 'scheduled'; 45 $command = '<a href="scheduled_recordings.php?default=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'">Remove Record</a>'; 46 } 47 elseif ($show->recstatus == 'ManualOverride' || $show->recstatus == 'Cancelled') { 40 48 $class = 'deactivated'; 41 $command = '<a href="scheduled_recordings.php? activate=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'&endtime='.$show->endtime.'">Activate</a>';49 $command = '<a href="scheduled_recordings.php?default=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'">Remove Block</a>'; 42 50 } 51 elseif ($show->recstatus == 'LaterShowing' || $show->recstatus == 'EarlierShowing' ) { 52 $class = 'deactivated'; 53 $command = '<a href="scheduled_recordings.php?record=yes&chanid='.$show->chanid.'&starttime='.$show->starttime.'">Activate</a>'; 54 } 43 55 else { 44 56 $class = 'scheduled'; 45 57 #$command = 'Don\'t Record'; 46 $command = ' ';58 $command = 'Unknown '.$show->recstatus; 47 59 } 48 60 49 61 // Print the content … … 77 89 78 90 } 79 91 80 ?> 81 No newline at end of file 92 ?> -
mythweb/themes/wap/program_listing.php
26 26 Currently Browsing<br><?=date('D m/d/y', $start_time)?><br> 27 27 <?=date('g:i A', $start_time)?><br> 28 28 Jump to<br> 29 <select name="hour"><? 30 for ($h=0;$h<24;$h++) { 31 echo "<option value=\"$h\""; 32 if ($h == date('H', $start_time)) 33 echo ' SELECTED'; 34 echo ">$h:00</option>"; 29 <select name="daytime"><? 30 $day=getdate($start_time); 31 $start=$start_time - $day['hours'] * 60 * 60 - $day['minutes'] * 60; 32 for ($t=0;$t<48;$t++) { 33 //echo "<option value=\"".($start + $t * 30 * 60)."\""; 34 echo "<option value=\"".date('Hi',$start + $t * 30 * 60)."\""; 35 if ($start+$t*30*60 <= $start_time && $start+($t+1)*30*60 > $start_time ) 36 echo ' SELECTED'; 37 echo '>'.date('g:i A',$start+$t*30*60).'</option>'; 35 38 } 36 39 ?></select><br> 37 40 <select name="date"><? … … 104 107 function print_channel($channel, $start_time, $end_time) { 105 108 ?> 106 109 <a href="channel_detail.php?chanid=<?=$channel->chanid?>&time=<?=$start_time?>"> 107 <?=prefer_channum ? $channel->channum : $channel->callsign?> 108 <?=prefer_channum ? $channel->callsign : $channel->channum?></a><br> 110 <?=prefer_channum ? $channel->channum : $chann->callsign?> 111 <?=prefer_channum ? $channel->callsign : $channel->channum?> </a> 112 <a href="program_detail.php?chanid=<?=$channel->chanid?>&starttime=<?=$channel->programs[0]->starttime?>"><?=$channel->programs[0]->title?></a><br> 109 113 <? 110 114 } 111 115 116 112 117 } 113 118 114 119 ?> -
mythweb/themes/wap/recorded_programs.php
50 50 echo nice_length($show->length)." ".nice_filesize($show->filesize)."<br>"; 51 51 52 52 if ($show->endtime > time()) { ?> 53 <font color="#FF0000">currently recording</font><br> 54 <?php } else { ?> 55 <b></b><a id="delete_<?php echo $row?>" href="recorded_programs.php?delete=yes&file=<?php echo urlencode($show->filename)?>">Delete</a></b><br> 56 <?php } 53 <font color="#FF0000">currently recording - </font> 54 <?php } ?> 55 <b></b><a id="delete_<?php echo $row?>" href="recorded_programs.php?delete=yes&file=<?php echo urlencode($show->filename)?>">Delete </a></b> 56 <b></b><a id="delete_<?php echo $row?>" href="recorded_programs.php?delete=yes&file=<?php echo urlencode($show->filename)?>&forget_old">Rerecord</a></b><br> 57 <?php 57 58 echo "<br>"; 58 59 59 60 $row++; … … 69 70 70 71 } 71 72 72 ?> 73 No newline at end of file 73 ?> -
mythweb/themes/wap/theme.php
40 40 <a href="program_listing.php">Listings</a><br> 41 41 <a href="scheduled_recordings.php">Scheduled</a><br> 42 42 <a href="recorded_programs.php">Recorded</a><br> 43 <a href="status.php">Backend Status</a><br> 43 44 <?php 44 45 } 45 46 -
mythweb/themes/wap/status.php
1 <?php 2 /*** ***\ 3 status.php Last Updated: 2005.02.06 (xris) 4 5 This file defines a theme class for the backend status section. 6 It must define one method. documentation will be added someday. 7 \*** ***/ 8 9 class Theme_status extends Theme { 10 11 function print_page(&$content, $title) { 12 // Load this page's custom stylesheet 13 $this->headers[] = '<link rel="stylesheet" type="text/css" href="'.theme_dir.'status.css" />'; 14 // Print the main page header 15 parent::print_header($title); 16 // Print the page contents 17 echo "<div id=\"content_wrapper\">\n" 18 .$content 19 ."\n</div>"; 20 // Print the main page footer 21 parent::print_footer(); 22 } 23 24 } 25 26 ?> -
mythweb/program_listing.php
17 17 // Were we passed a timestamp? This is going to be the most common occurrence 18 18 if ($_GET['time']) 19 19 $list_starttime = (int)$_GET['time']; 20 elseif(isset($_GET['daytime'])) 21 $list_starttime = unixtime(sprintf('%08d%04d00', $_GET['date'], $_GET['daytime'])); 20 22 // Did we get passed a date (and probably an hour, too)? 21 23 elseif(isset($_GET['date'])) 22 24 $list_starttime = unixtime(sprintf('%08d%02d0000', $_GET['date'], $_GET['hour'])); -
mythweb/includes/init.php
107 107 define('Theme', 'wml'); 108 108 } 109 109 } 110 elseif (strpos($_SERVER['HTTP_USER_AGENT'],"Blazer") !== false) // The browser is MythPhone 111 define('Theme', 'wap'); 110 112 elseif (strpos($_SERVER['HTTP_USER_AGENT'],"MythPhone") !== false) // The browser is MythPhone 111 113 define('Theme', 'vxml'); 112 114 // Load the theme from session data?