function getFilenameFromVersion($v)
{
    return getFirmVersion($v) . "_" . getRegion($v) . "_" . getMenuVersion($v) . "_" . getMsetVersion($v);
}
Beispiel #2
0
function getVersion($version)
{
    return getFirmVersion($version) . "_" . getRegion($version) . "_" . getMenuVersion($version) . "_" . getMsetVersion($version);
}
Beispiel #3
0
                        }
                    }
                }
            }
        }
    }
}
function getMsetVersion($v)
{
    if ($v[0] == 9 and $v[1] < 6) {
        return "8203";
    } else {
        return "9221";
    }
}
$version = array(0 => $_GET['zero'], 1 => $_GET['one'], 2 => $_GET['two'], 3 => $_GET['three'], 4 => $_GET['four'], 5 => $_GET['five']);
$filename = "./unsupported.png";
// check that version is valid-ish
if (is_numeric($version[0]) && is_numeric($version[1]) && is_numeric($version[2]) && is_numeric($version[3])) {
    $filename = "./q/" . getFirmVersion($version) . "_" . getRegion($version) . "_" . getMenuVersion($version) . "_" . getMsetVersion($version) . ".png";
}
if (!file_exists($filename)) {
    $filename = "./unsupported.png";
}
$fp = fopen($filename, 'rb');
// // send the right headers
header("Content-Type: image/png");
header("Content-Length: " . filesize($filename));
// dump the picture and stop the script
fpassthru($fp);
exit;