} } } } } } } } } } } else { setcookie('token', 'Time out', time() - 3600); } //Download URL pattern: controller.php?operation=download&fileName=??? if ('download' == @$_GET['operation']) { fileDownload($_GET['fileName'], getCurrentPath()); //Upload URL pattern: controller.php?operation=upload } else { if ('upload' == @$_GET['operation']) { fileUpload(getCurrentPath()); } } // Button click action /** * Go to a assigned path, and send the array of file objects with JSON format to client. * @param unknown_type $path */ function gotoPath($path) { setCurrentPath($path); $file = @scandir($path);
function ghostReplayDownload($service_id, $replay) { global $config; //get the identifier $id = stripAlphaNumeric(getServiceParam($service_id, "id")); if ($id === false) { return; } //escape the replay $replay = escapeFile(baseName($replay)); $target = $config['ghost_path'] . $id . "/replays/" . $replay; fileDownload($target); }