PageRenderTime 34ms CodeModel.GetById 37ms RepoModel.GetById 1ms app.codeStats 0ms

/admin/models/shows/views/edit.php

https://github.com/laanlabs/snackfeed.com
PHP | 192 lines | 180 code | 12 blank | 0 comment | 19 complexity | bfc64760b5bec24cf0516a1ea2dbc082 MD5 | raw file
  1. <table id="formTable" >
  2. <form enctype="multipart/form-data" action="/?a=shows.submit" method="post" name="form_edit" >
  3. <input type="hidden" name="_show_id" value="<?= $_show_id ?>" />
  4. <tr>
  5. <td class="fTitle">ID:</td>
  6. <td><?= $_show_id ?></td>
  7. </tr>
  8. <tr>
  9. <td class="fTitle"> Type:</td>
  10. <td>
  11. <select name="_show_type_id" >
  12. <? foreach ($q4 as $r) { ?>
  13. <option value="<?= $r['show_type_id'] ?>" <? if ($_show_type_id == $r['show_type_id']) {echo 'SELECTED';} ?> ><?= $r['show_type_name'] ?></option>
  14. <? } ?>
  15. </select>
  16. </td>
  17. </tr>
  18. <tr>
  19. <td class="fTitle"> Title:</td>
  20. <td><input type="text" name="_title" value="<?= $_title ?>" size="50" max="150" class="cell" /></td>
  21. </tr>
  22. <tr>
  23. <td class="fTitle"> Detail:</td>
  24. <td><textarea name="_detail" cols="55" rows="3" class="cell"><?= $_detail ?></textarea></td>
  25. </tr>
  26. <tr>
  27. <td class="fTitle">Tags:</td>
  28. <td><textarea name="_tags" cols="55" rows="3" class="cell"><?= $_tags ?></textarea></td>
  29. </tr>
  30. <tr>
  31. <td class="fTitle">Thumb:</td>
  32. <td><img src="<?= PUBLIC_URL . $_thumb ?>" ><br/>
  33. <input type="text" name="_thumb" value="<?= $_thumb ?>" size="50" max="150" class="cell" /><br/>
  34. UPLOAD:<input name="file" type="file" /></td>
  35. </tr>
  36. <tr>
  37. <td class="fTitle">Title Prefix:</td>
  38. <td><input type="text" name="_title_prefix" value="<?= $_title_prefix ?>" size="50" max="150" class="cell" /></td>
  39. </tr>
  40. <tr>
  41. <td class="fTitle">Video Type IDs:</td>
  42. <td><input type="text" name="_video_type_ids" value="<?= $_video_type_ids ?>" size="50" max="150" class="cell" /></td>
  43. </tr>
  44. <tr>
  45. <td class="fTitle">Date Air Start:</td>
  46. <td><input type="text" name="_date_air_start" value="<?= $_date_air_start ?>" size="50" max="150" class="cell" /></td>
  47. </tr>
  48. <tr>
  49. <td class="fTitle">Date Air End:</td>
  50. <td><input type="text" name="_date_air_end" value="<?= $_date_air_end ?>" size="50" max="150" class="cell" /></td>
  51. </tr>
  52. <tr>
  53. <td class="fTitle">Air Status:</td>
  54. <td>
  55. <select name="_air_status_id" >
  56. <? foreach ($q2 as $r) { ?>
  57. <option value="<?= $r['air_status_id'] ?>" <? if ($_air_status_id== $r['air_status_id']) {echo 'SELECTED';} ?> ><?= $r['air_status'] ?></option>
  58. <? } ?>
  59. </select>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="fTitle">Source:</td>
  64. <td>
  65. <select name="_source_id" >
  66. <option value="0">none</option>
  67. <? foreach ($q1 as $r) { ?>
  68. <option value="<?= $r['source_id'] ?>" <? if ($_source_id == $r['source_id']) {echo 'SELECTED';} ?> ><?= $r['name'] ?></option>
  69. <? } ?>
  70. </select>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td class="fTitle">Source Params:</td>
  75. <td><input type="text" name="_source_params" value="<?= $_source_params ?>" size="50" max="150" class="cell" /></td>
  76. </tr>
  77. <tr>
  78. <td class="fTitle">Source Params 2:</td>
  79. <td><input type="text" name="_source_params_2" value="<?= $_source_params_2 ?>" size="50" max="150" class="cell" /></td>
  80. </tr>
  81. <tr>
  82. <td class="fTitle">Source Params 3:</td>
  83. <td><input type="text" name="_source_params_3" value="<?= $_source_params_3 ?>" size="50" max="150" class="cell" /></td>
  84. </tr>
  85. <tr>
  86. <td class="fTitle">Source Params 4:</td>
  87. <td><input type="text" name="_source_params_4" value="<?= $_source_params_4 ?>" size="50" max="150" class="cell" /></td>
  88. </tr>
  89. <tr>
  90. <td class="fTitle">Process Show:</td>
  91. <td>
  92. <select name="_show_process_type_id" >
  93. <? foreach ($q3 as $r) { ?>
  94. <option value="<?= $r['show_process_type_id'] ?>" <? if ($_show_process_type_id== $r['show_process_type_id']) {echo 'SELECTED';} ?> ><?= $r['show_process_type'] ?></option>
  95. <? } ?>
  96. </select>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td class="fTitle">Process Days:</td>
  101. <td>
  102. <? for ( $i = 0; $i <= 6; $i ++) { ?>
  103. <input type="checkbox" name="_show_process_days[]" <? if (substr_count($_show_process_days, $i) > 0) echo 'CHECKED' ?> value="<?= $i ?>" ><?= $days[$i] ?>&nbsp;&nbsp;
  104. <? } ?>
  105. </td>
  106. </tr>
  107. <tr>
  108. <td class="fTitle">Process Start Hour:</td>
  109. <td>
  110. <select name="_show_process_hour_base" >
  111. <? for ( $i = 0; $i <= 23; $i ++) { ?>
  112. <option value="<?= $i ?>" <? if ($_show_process_hour_base== $i) {echo 'SELECTED';} ?> ><?= $i ?>:00 </option>
  113. <? } ?>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td class="fTitle">Process Interval:</td>
  118. <td>
  119. <select name="_show_process_hour_interval" >
  120. <option value="-1">No Daily Repeat</option>
  121. <? for ( $i = 1; $i <= 12; $i ++) { ?>
  122. <option value="<?= $i ?>" <? if ($_show_process_hour_interval== $i) {echo 'SELECTED';} ?> >Each <?= $i ?> Hour(s) </option>
  123. <? } ?>
  124. </td>
  125. </tr>
  126. <tr>
  127. <td class="fTitle">Process Retry:</td>
  128. <td>
  129. <select name="_show_process_hour_retry" >
  130. <option value="-1">No Retry</option>
  131. <? for ( $i = 1; $i <= 12; $i ++) { ?>
  132. <option value="<?= $i ?>" <? if ($_show_process_hour_retry== $i) {echo 'SELECTED';} ?> >Each <?= $i ?> Hour(s) </option>
  133. <? } ?>
  134. </td>
  135. </tr>
  136. <tr>
  137. <td class="fTitle">Clear on Process:</td>
  138. <td>
  139. <select name="_show_process_clear" >
  140. <? for ( $i = 0; $i <= 1; $i ++) { ?>
  141. <option value="<?= $i ?>" <? if ($_show_process_clear== $i) {echo 'SELECTED';} ?> ><?= $i ?> </option>
  142. <? } ?>
  143. </td>
  144. </tr>
  145. <tr>
  146. <td class="fTitle">Process date last:</td>
  147. <td><input type="text" name="_process_date_last" value="<?= $_process_date_last ?>" size="50" max="150" class="cell" /></td>
  148. </tr>
  149. <tr>
  150. <td class="fTitle">Process date next:</td>
  151. <td><input type="text" name="_process_date_next" value="<?= $_process_date_next ?>" size="50" max="150" class="cell" /></td>
  152. </tr>
  153. <tr>
  154. <td class="fTitle">Popularity:</td>
  155. <td><input type="text" name="_popularity" value="<?= $_popularity ?>" size="50" max="150" class="cell" /></td>
  156. </tr>
  157. <tr>
  158. <td class="fTitle">Status:</td>
  159. <td>
  160. <select name="_status" >
  161. <option value="1" <?php if ($_status==1) {echo 'SELECTED';} ?> >Active</option>
  162. <option value="2" <?php if ($_status==2) {echo 'SELECTED';} ?>>Pending</option>
  163. <option value="0" <?php if ($_status==0) {echo 'SELECTED';} ?>>Inactive</option>
  164. </select>
  165. </td>
  166. </tr>
  167. <tr>
  168. <td class="fTitle">Order By:</td>
  169. <td><input type="text" name="_order_by" value="<?= $_order_by ?>" size="50" max="150" class="cell" /></td>
  170. </tr>
  171. </tbody>
  172. <tfoot>
  173. <tr>
  174. <td colspan="2">
  175. <a id="bSubmit" href="javascript:document.form_edit.submit()">save</a>
  176. </td>
  177. </tr>
  178. </tfoot>
  179. </form>
  180. </table>