Beispiel #1
0
function insertStandaloneFileByServerId($fname, $sid, $content)
{
    global $db, $dbprefix;
    initDbIfNeeded();
    $stmt = $db->prepare('INSERT INTO ' . $dbprefix . 'StandaloneFiles (Content,FileName,ServerID) VALUES (?,?,?);');
    $stmt->bind_param('ssi', $content, $fname, $sid);
    $res = $stmt->execute();
    $stmt->close();
    return $res;
}
Beispiel #2
0
}
$path = $_REQUEST['marker'];
if (!isset($path) || strstr($path, "..")) {
    header('HTTP/1.0 500 Error');
    echo "<h1>500 Error</h1>";
    echo "Bad marker: " . $path;
    exit;
}
$parts = explode("/", $path);
if ($parts[0] != "faces" && $parts[0] != "_markers_") {
    header('HTTP/1.0 500 Error');
    echo "<h1>500 Error</h1>";
    echo "Bad marker: " . $path;
    exit;
}
initDbIfNeeded();
if ($parts[0] == "faces") {
    if (count($parts) != 3) {
        header('HTTP/1.0 500 Error');
        echo "<h1>500 Error</h1>";
        echo "Bad face: " . $path;
        cleanupDb();
        exit;
    }
    $ft = 0;
    if ($parts[1] == "8x8") {
        $ft = 0;
    } else {
        if ($parts[1] == '16x16') {
            $ft = 1;
        } else {