require_once __DIR__ . '/../src/header.php';
if (strtolower($fullUri) == '/setupapp/radio567/asp/browsexpa/loginxml.asp?token=0'
- || $fullUri == '/RadioNativeLogin.phpb'
+ || $fullUri == '/RadioNativeLogin.php'
) {
//initial login for "internet radio", podcasts and "my noxon"
header('Content-type: text/html');
$entries = glob(str_replace('//', '/', $varDir . rtrim($path, '/') . '/*'));
$count = 0;
+ $noCache = false;
foreach ($entries as $entry) {
$urlPath = pathEncode(substr($entry, strlen($varDir)));
$ext = pathinfo($entry, PATHINFO_EXTENSION);
//plain text file
++$count;
$listItems[] = getDirItem(basename($titleBase, '.' . $ext), $urlPath);
+ } else if (basename($entry) == 'nocache') {
+ $noCache = true;
}
}
if (!$count) {
$listItems[] = getMessageItem('No files or folders');
}
- sendListItems($listItems, buildPreviousItem($path), $enablePaging);
+ sendListItems(
+ $listItems, buildPreviousItem($path),
+ $enablePaging, $noCache
+ );
}
function sendScript($path)
sendListItems(array(getMessageItem($msg)));
}
-function sendListItems($listItems, $previous = null, $enablePaging = true)
-{
+function sendListItems(
+ $listItems, $previous = null, $enablePaging = true, $noCache = false
+) {
$startitems = 1;
$enditems = 100000;
if (isset($_GET['startitems'])) {
$xml = '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
$xml .= '<?xml-stylesheet type="text/xsl" href="/html.xsl"?>' . "\n";
$xml .= '<ListOfItems>' . "\n";
+ if ($noCache) {
+ $xml .= "<NoCache>1</NoCache>\n";
+ }
$xml .= '<ItemCount>' . $itemCount . '</ItemCount>' . "\n";
$xml .= $previous;