PageRenderTime 46ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/modules/tv/tmpl/lite/schedules_manual.php

https://github.com/fracmak/mythweb
PHP | 198 lines | 161 code | 23 blank | 14 comment | 56 complexity | fa2b3a982c6bd3ef63fd316aecd3b7f0 MD5 | raw file
  1. <?php
  2. /**
  3. * Schedule a custom recording by manually specifying starttime and length
  4. *
  5. * @license GPL
  6. *
  7. * @package MythWeb
  8. * @subpackage TV
  9. *
  10. /**/
  11. // Set the desired page title
  12. $page_title = 'MythWeb - '.t('Schedule Manually');
  13. // Custom headers
  14. $headers[] = '<link rel="stylesheet" type="text/css" href="'.skin_url.'/tv_schedules_manual.css" />';
  15. // Print the page header
  16. require 'modules/_shared/tmpl/'.tmpl.'/header.php';
  17. // Print the page contents
  18. ?>
  19. <div id="recording_info" class="command command_border_l command_border_t command_border_b command_border_r clearfix">
  20. <form name="schedule_manually" method="post" action="<?php echo root_url ?>tv/schedules/manual<?php if ($schedule->recordid) echo '/'.urlencode($schedule->recordid) ?>">
  21. <?php if ($schedule->type != rectype_override && $schedule->type != rectype_dontrec) { ?>
  22. <div id="schedule_options">
  23. <h3><?php echo t('Schedule Options') ?>:</h3>
  24. <ul>
  25. <?php if ($schedule->recordid) { ?>
  26. <li><input type="radio" class="radio" name="record" value="0" id="record_never" />
  27. <label for="record_never"><?php echo t('Cancel this schedule.') ?></label></li>
  28. <?php } ?>
  29. <li><input type="radio" class="radio" name="record" value="<?php echo rectype_once ?>" id="record_once"<?php
  30. echo $schedule->type == rectype_once ? ' CHECKED' : '' ?> />
  31. <label for="record_once"><?php echo t('rectype-long: once') ?></label></li>
  32. <li><input type="radio" class="radio" name="record" value="<?php echo rectype_daily ?>" id="record_daily"<?php
  33. echo $schedule->type == rectype_daily ? ' CHECKED' : '' ?> />
  34. <label for="record_daily"><?php echo t('rectype-long: daily') ?></label></li>
  35. <li><input type="radio" class="radio" name="record" value="<?php echo rectype_weekly ?>" id="record_weekly"<?php
  36. echo $schedule->type == rectype_weekly ? ' CHECKED' : '' ?> />
  37. <label for="record_weekly"><?php echo t('rectype-long: weekly') ?></label></li>
  38. </ul>
  39. </div>
  40. <?php
  41. }
  42. if ($schedule->recordid) {
  43. ?>
  44. <div id="schedule_override">
  45. <h3><?php echo t('Schedule Override') ?>:</h3>
  46. <ul>
  47. <?php if ($schedule->type == rectype_override || $schedule->type == rectype_dontrec) { ?>
  48. <li><input type="radio" class="radio" name="record" value="0" id="schedule_default"<?php
  49. if ($schedule->type != rectype_override && $schedule->type != rectype_dontrec) echo ' CHECKED' ?> />
  50. <label for="schedule_default"><?php echo t('Schedule normally.') ?></label></li>
  51. <?php } ?>
  52. <li><input type="radio" class="radio" name="record" value="<?php echo rectype_override ?>" id="record_override"<?php
  53. if ($schedule->type == rectype_override) echo ' CHECKED' ?> />
  54. <label for="record_override"><?php echo t('rectype-long: override') ?></label></li>
  55. <li><input type="radio" class="radio" name="record" value="<?php echo rectype_dontrec ?>" id="record_dontrec"<?php
  56. if ($schedule->type == rectype_dontrec) echo ' CHECKED' ?> />
  57. <label for="record_dontrec"><?php echo t('rectype-long: dontrec') ?></label></li>
  58. </ul>
  59. </div>
  60. <?php } ?>
  61. <div id="recording_options">
  62. <h3><?php echo t('Recording Options') ?>:</h3>
  63. <dl>
  64. <dt><?php echo t('Channel') ?>:&nbsp;</dt>
  65. <dd><?php channel_select($schedule->chanid) ?></dd>
  66. <dt><?php echo t('Start Date') ?>:&nbsp;</dt>
  67. <dd><input type="text" name="startdate" size="10" maxlength="10" value="<?php echo date("Y-m-d", $schedule->starttime) ?>"></dd>
  68. <dt><?php echo t('Start Time') ?>:&nbsp;</dt>
  69. <dd><input type="text" name="starttime" size="10" maxlength="8" value="<?php echo date("H:i:00", $schedule->starttime) ?>"></dd>
  70. <dt><?php echo t('Length (min)') ?>:&nbsp;</dt>
  71. <dd><input type="text" name="length" value="<?php echo $schedule->length ?>" size="10" maxlength="4"></dd>
  72. <dt><?php echo t('Title') ?>:&nbsp;</dt>
  73. <dd><input type="text" name="title" value="<?php echo $schedule->title ?>" size="30"></dd>
  74. <dt><?php echo t('Subtitle') ?>:&nbsp;</dt>
  75. <dd><input type="text" name="subtitle" value="<?php echo $schedule->subtitle ?>" size="30"></dd>
  76. </dl>
  77. </div>
  78. <div id="advanced_options">
  79. <h3><?php echo t('Advanced Options') ?>:</h3>
  80. <dl class="clearfix">
  81. <dt><?php echo t('Recording Profile') ?>:</dt>
  82. <dd><?php profile_select($schedule->profile) ?></dd>
  83. <dt><?php echo t('Transcoder') ?>:</dt>
  84. <dd><?php transcoder_select($schedule->transcoder) ?></dd>
  85. <dt><?php echo t('Recording Group') ?>:</dt>
  86. <dd><?php recgroup_select($schedule->recgroup) ?></dd>
  87. <dt><?php echo t('Storage Group') ?>:</dt>
  88. <dd><?php storagegroup_select($schedule->storagegroup) ?></dd>
  89. <dt><?php echo t('Recording Priority') ?>:</dt>
  90. <dd><select name="recpriority"><?php
  91. for ($i=99; $i>=-99; --$i) {
  92. echo "<option value=\"$i\"";
  93. if ($schedule->recpriority == $i)
  94. echo ' SELECTED';
  95. echo ">$i</option>";
  96. }
  97. ?></select></dd>
  98. <dt><?php echo t('Check for duplicates in') ?>:</dt>
  99. <dd><select name="dupin"><?php
  100. echo '<option value="1"';
  101. if ($schedule->dupin == 1)
  102. echo ' SELECTED';
  103. echo '>' . t('Current recordings') . '</option>';
  104. echo '<option value="2"';
  105. if ($schedule->dupin == 2)
  106. echo ' SELECTED';
  107. echo '>' . t('Previous recordings') . '</option>';
  108. echo '<option value="4"';
  109. if ($schedule->dupin == 4)
  110. echo ' SELECTED';
  111. echo '>' . t('Only New Episodes') . '</option>';
  112. echo '<option value="15"';
  113. if ($schedule->dupin == 15 || $schedule->dupin == 0)
  114. echo ' SELECTED';
  115. echo '>' . t('All recordings') . '</option>';
  116. ?></select></dd>
  117. <dt><?php echo t('Duplicate Check method') ?>:</dt>
  118. <dd><select name="dupmethod"><?php
  119. echo '<option value="1"';
  120. if ($schedule->dupmethod == 1)
  121. echo ' SELECTED';
  122. echo '>' . t('None') . '</option>';
  123. echo '<option value="2"';
  124. if ($schedule->dupmethod == 2)
  125. echo ' SELECTED';
  126. echo '>' . t('Subtitle') . '</option>';
  127. echo '<option value="4"';
  128. if ($schedule->dupmethod == 4)
  129. echo ' SELECTED';
  130. echo '>' . t('Description') . '</option>';
  131. echo '<option value="6"';
  132. if ($schedule->dupmethod == 6 || $schedule->dupmethod == 0)
  133. echo ' SELECTED';
  134. echo '>'.t('Subtitle and Description').'</option>';
  135. echo '<option value="8"';
  136. if ($schedule->dupmethod == 8)
  137. echo ' SELECTED';
  138. echo '>'.t('Subtitle then Description').'</option>';
  139. ?></select></dd>
  140. <dt><?php echo t('Look up Metadata') ?>:</dt>
  141. <dd><input type="checkbox" class="radio" name="autometadata"<?php if ($schedule->autometadata) echo ' CHECKED' ?> value="1" /></dd>
  142. <dt><?php echo t('Auto-flag commercials') ?>:</dt>
  143. <dd><input type="checkbox" class="radio" name="autocommflag"<?php if ($schedule->autocommflag) echo ' CHECKED' ?> value="1" /></dd>
  144. <dt><?php echo t('Auto-transcode') ?>:</dt>
  145. <dd><input type="checkbox" class="radio" name="autotranscode"<?php if ($schedule->autotranscode) echo ' CHECKED' ?> value="1" /></dd>
  146. <dt><?php echo get_backend_setting('UserJobDesc1') ?>:</dt>
  147. <dd><input type="checkbox" class="radio" name="autouserjob1"<?php if ($schedule->autouserjob1) echo ' CHECKED' ?> value="1" /></dd>
  148. <dt><?php echo get_backend_setting('UserJobDesc2') ?>:</dt>
  149. <dd><input type="checkbox" class="radio" name="autouserjob2"<?php if ($schedule->autouserjob2) echo ' CHECKED' ?> value="1" /></dd>
  150. <dt><?php echo get_backend_setting('UserJobDesc3') ?>:</dt>
  151. <dd><input type="checkbox" class="radio" name="autouserjob3"<?php if ($schedule->autouserjob3) echo ' CHECKED' ?> value="1" /></dd>
  152. <dt><?php echo get_backend_setting('UserJobDesc4') ?>:</dt>
  153. <dd><input type="checkbox" class="radio" name="autouserjob4"<?php if ($schedule->autouserjob4) echo ' CHECKED' ?> value="1" /></dd>
  154. <dt><?php echo t('Auto-expire recordings') ?>:</dt>
  155. <dd><input type="checkbox" class="radio" name="autoexpire"<?php if ($schedule->autoexpire) echo ' CHECKED' ?> value="1" /></dd>
  156. <dt><?php echo t('Record new and expire old') ?>:</dt>
  157. <dd><input type="checkbox" class="radio" name="maxnewest"<?php if ($schedule->maxnewest) echo ' CHECKED' ?> value="1" /></dd>
  158. <dt><?php echo t('No. of recordings to keep') ?>:</dt>
  159. <dd><input type="input" class="quantity" name="maxepisodes" value="<?php echo html_entities($schedule->maxepisodes) ?>" /></dd>
  160. <dt><?php echo t('Start Early') ?>:</dt>
  161. <dd><input type="input" class="quantity" name="startoffset" value="<?php echo html_entities($schedule->startoffset) ?>" />
  162. <?php echo t('minutes') ?></dd>
  163. <dt><?php echo t('End Late') ?>:</dt>
  164. <dd><input type="input" class="quantity" name="endoffset" value="<?php echo html_entities($schedule->endoffset) ?>" />
  165. <?php echo t('minutes') ?></dd>
  166. </dl>
  167. <p align="center">
  168. <input type="submit" class="submit" name="save" value="<?php echo $schedule->recordid ? t('Save Schedule') : t('Create Schedule') ?>">
  169. </p>
  170. </div>
  171. </form>
  172. </div>
  173. <?php
  174. // Print the page footer
  175. require 'modules/_shared/tmpl/'.tmpl.'/footer.php';