view pseudo.php @ 514:46b16d47c923 Dev_main

Small MUSHRA bug fix. Playback was blocked from ever happening due to play getting called twice.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Mon, 15 Feb 2016 12:52:55 +0000
parents 1fc9f982b778
children
line wrap: on
line source
<?php
    header('Access-Control-Allow-Origin: *');
	header("Content-type: text/xml");
    $files = glob('saves/' . '*.xml');
    $numsaves = 0;
    if ( $files !== false )
    {
        $numsaves = count( $files );
    }

    $files = glob('pseudo/' . '*.xml');
    $numtests = 0;
    if ( $numtests !== false )
    {
        $numtests = count( $files );
    }

    $testID = ($numsaves % $numtests)-1;

	readfile($files[$testID]);
?>