Radio-dodsorfas/web/admin.php

53 lines
1.3 KiB
PHP

<html>
<head>
<style>
html { background: #505; color: white; }
</style>
</head>
<body>
<form method="GET">
<input type="hidden" name="auth" value="<?php echo $_GET['auth'] ?>" />
<input type="submit" name="action" value="NEXT" />
<input type="submit" name="action" value="INFO" />
<input type="submit" name="action" value="REFRESH" />
</form>
<?php
include('functions.php');
if ($_REQUEST['action']) {
echo '<pre>';
switch ($_REQUEST['action']) {
case 'NEXT':
echo telnet_send("dodsorfas(dot)main.skip");
break;
case 'INFO':
cool_print(get_infos(), 'debug');
break;
case 'DIRE':
echo "TODO";
break;
case 'REQUEST':
echo "TODO";
break;
case 'REFRESH':
break;
default:
print_r($_REQUEST);
print_r($_ENV);
break;
}
echo '</pre>';
}
?>
<table border="1">
<thead>
<th>Title</th>
</thead>
<?php foreach (get_metadata() as $song) { ?>
<tr>
<td><?php print($song['right_title']);?>&nbsp;</td>
</tr>
<?php } ?>
</table>
</body>
</html>