| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?
- # Include the TV functions
- require_once 'includes/main.php';
- # Send our headers early
- header('Content-type: text/html; charset=utf-8');
- # Did the user request a specific show?
- $show = false;
- if (isset($_REQUEST['show'])) {
- # This is not a great filter, but it should make the string safe for use as a quoted path
- $show = preg_replace('/[\0\n\r]/', '', $_REQUEST['show']);
- $show = basename($show);
- }
- #=========================================================================================
- # Generic XHTML 1.1 header
- print <<<ENDOLA
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
- "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
- <title>UberZach TV</title>
- </head>
- <body>
- ENDOLA;
- if ($show === false) {
- printAllShows();
- } else {
- printShow($show);
- }
- # Generic XHTML 1.1 footer
- print <<<ENDOLA
- </body>
- </html>
- ENDOLA;
- ?>
|