echo trackToFlash($_REQUEST['id']);
	exit();
}
*/
if ($_REQUEST['cache'] == 'clear') {
    if (file_exists("tracks/previews/small" . $_REQUEST['id'] . ".gif")) {
        unlink("tracks/previews/small" . $_REQUEST['id'] . ".gif");
    }
    if (file_exists("tracks/previews/big" . $_REQUEST['id'] . ".gif")) {
        unlink("tracks/previews/big" . $_REQUEST['id'] . ".gif");
    }
    header("Location: track.php?id=" . $_REQUEST['id']);
    exit;
}
if ($_REQUEST['download'] == 'true') {
    mergeTracks($_SESSION['user'], $_REQUEST['id'] . chr(9));
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename="savedLines.sol"');
    header('Content-Transfer-Encoding: binary');
    header('Content-Length: ' . filesize("tracks/managers/" . $_SESSION['user'] . ".sol"));
    readfile("tracks/managers/" . $_SESSION['user'] . ".sol");
    exit;
}
if (is_numeric($_POST['deleteComment'])) {
    $contents = explode("\r\n", file_get_contents("tracks/comments/" . $_REQUEST['id'] . ".comments"));
    $num = (int) $_POST['deleteComment'] - 1 + 3;
    $new = array();
    $cInfo = 3;
    if (count($contents) <= $cInfo + 1) {
        if (file_exists("tracks/comments/" . $_REQUEST['id'] . ".comments")) {
            unlink("tracks/comments/" . $_REQUEST['id'] . ".comments");
}
if ($_REQUEST['downloadTracks'] == true) {
    $file = fopen("tracks/managers/" . $_SESSION['user'] . ".manager", "r");
    $ids = fread($file, filesize("tracks/managers/" . $_SESSION['user'] . ".manager"));
    fclose($file);
    $ids = explode("\r\n", $ids);
    foreach ($ids as $id) {
        if (!empty($id)) {
            if (checkUserInfo("downloaded", $id) == false) {
                setUserInfo("downloaded", $id);
                setInfo($id, "downloads", strval(intval(getInfo($id, "downloads")) + 1));
            }
        }
    }
    $ids = implode(chr(9), $ids);
    mergeTracks($_SESSION['user'], $ids);
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename="savedLines.sol"');
    header('Content-Transfer-Encoding: binary');
    header('Content-Length: ' . filesize("tracks/managers/" . $_SESSION['user'] . ".sol"));
    readfile("tracks/managers/" . $_SESSION['user'] . ".sol");
    exit;
}
if ($_REQUEST['rename'] == 'yes') {
    $newmanager = '';
    $file = fopen("tracks/managers/" . $_SESSION['user'] . ".manager", "r");
    $tracks = fread($file, filesize("tracks/managers/" . $_SESSION['user'] . ".manager"));
    fclose($file);
    $tracks = explode("\r\n", $tracks);
    for ($i = 0; $i < count($tracks) - 1; $i++) {
        setInfo($tracks[$i], "label", $_REQUEST['rename' . $tracks[$i]]);