CMS for the late garbage.fm
at main 92 lines 2.6 kB view raw
1<p> 2<div style="float: right;"> 3 <a href="#" onclick="toggle_notes_updating(); return false;" 4 id="notes_status">Start auto-refreshing other notes</a> 5</div> 6<h3>Upcoming Show Notes/Scratch</h3> 7 8<div class="box"> 9 <? $form->form_tag(ADMIN_ROOT_URL . "update_notes", array(), 10 function($f) use ($C) { ?> 11 <div class="boxline"> 12 <?= $f->label_tag("private_notes", "Private:", 13 array("class" => "required")); ?> 14 <?= $f->text_area_tag("private_notes", $C->user->private_notes, 15 array("class" => "variable", 16 "style" => "width: 75%; line-height: 1.3em; height: " . 17 ((max(substr_count($C->user->private_notes, 18 "\n"), 8) * 1.5) + 2) . 19 "em; font-size: 9pt;")); ?> 20 <br> 21 </div> 22 <div class="boxline"> 23 <?= $f->label_tag("upcoming_notes", "Shared:", 24 array("class" => "required")); ?> 25 <?= $f->text_area_tag("upcoming_notes", $C->user->upcoming_notes, 26 array("class" => "variable", 27 "style" => "width: 75%; line-height: 1.3em; height: " . 28 ((max(substr_count($C->user->upcoming_notes, 29 "\n"), 8) * 1.5) + 2) . 30 "em; font-size: 9pt;")); ?> 31 <br> 32 <?= $f->submit_tag("Save"); ?> 33 </div> 34 <? }); ?> 35 36 <div id="other_notes"> 37 <?= $C->render(array("partial" => "notes")); ?> 38 </div> 39</div> 40 41<script> 42 var updater; 43 function toggle_notes_updating() { 44 if (updater) { 45 updater.stop(); 46 updater = null; 47 $("notes_status").innerHTML = 48 $("notes_status").innerHTML.replace(/Stop/, "Start"); 49 } 50 else { 51 updater = new Ajax.PeriodicalUpdater("other_notes", 52 "<?= ADMIN_ROOT_URL ?>other_notes", { 53 method: "get", 54 frequency: 2, 55 }); 56 $("notes_status").innerHTML = 57 $("notes_status").innerHTML.replace(/Start/, "Stop"); 58 } 59 } 60 61 <? if (date("D") == "Thu" && date("G") >= 18 && date("G") <= 21) { ?> 62 toggle_notes_updating(); 63 <? } ?> 64</script> 65 66<p> 67<h3>Show Prompts</h3> 68</p> 69 70<div class="box"> 71<?= nl2br(h(Settings::fetch()->replaced_prompts)); ?> 72</div> 73 74<h3>Past Episodes (<a href="<?= ADMIN_ROOT_URL ?>episodes/build">Create New</a>)</h3> 75 76<ul> 77<? foreach ($C->episodes as $episode) { ?> 78 <li><a href="<?= ADMIN_ROOT_URL ?>episodes/edit/<?= $episode->episode ?>"><?= 79 $episode->episode ?>: <?= h($episode->title) ?></a> 80 (<?= $episode->air_date->format("Y-m-d") ?>) 81 <? if ($episode->is_pending) { ?> 82 (<strong>PENDING</strong>) 83 <? } ?> 84<? } ?> 85</ul> 86 87 88<h3>Episode Download Statistics</h3> 89 90<iframe style="margin-left: 1em; margin-right: 3em; width: 95%; height: 200px; 91 border: 0; overflow: hidden;" 92 src="https://countinual.com/jcs/counters/garbage.downloads?embed=1"></iframe>