} } switch ($action) { case "get": Response::done(array('ep' => $Episode, 'epid' => $Episode->formatTitle(AS_ARRAY, 'id'), 'caneditid' => $Episode->getPostCount() === 0)); break; case "delete": if (!Permission::sufficient('staff')) { Response::fail(); } if (!$Database->whereEp($Episode)->delete('episodes')) { Response::dbError(); } Logs::action('episodes', array('action' => 'del', 'season' => $Episode->season, 'episode' => $Episode->episode, 'twoparter' => $Episode->twoparter, 'title' => $Episode->title, 'airs' => $Episode->airs)); $CGDb->where('name', "s{$Episode->season}e{$Episode->episode}")->delete('tags'); Response::success('Episode deleted successfuly', array('upcoming' => Episodes::getSidebarUpcoming(NOWRAP))); break; case "requests": case "reservations": $only = $action === 'requests' ? ONLY_REQUESTS : ONLY_RESERVATIONS; $posts = Posts::get($Episode, $only); switch ($only) { case ONLY_REQUESTS: $rendered = Posts::getRequestsSection($posts); break; case ONLY_RESERVATIONS: $rendered = Posts::getReservationsSection($posts); break; } Response::done(array('render' => $rendered)); break;
<?php } } if ($do === 'colorguide' && (!empty($Appearance) || !empty($Ponies)) && empty($Map)) { ?> <section id="hash-copy"> <h2>Color Guide</h2> <p>You can click any <?php echo $color; ?> ed square on this page to copy its HEX <?php echo $color; ?> code to your clipboard. Holding Shift while clicking will display a dialog with the RGB <?php echo $color; ?> values instead.</p> <button class='blue typcn typcn-refresh' id='toggle-copy-hash'>Checking…</button> </section> <?php } echo Episodes::getSidebarUpcoming(); } else { ?> <section class="login"> <h2>Welcome!</h2> <p>We're having some technical difficulties and signing in is not possible at the moment. Please check back later.</p> </section> <?php }