Warning: session_start(): open(/var/lib/php/sessions/sess_jpoln8ect7dbn9kkfitq0jc7f0, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static File dir;
p {
dir = javaxDataDir("Static Web Pages");
}
html {
uri = dropSlashPrefix(uri);
if (eq(uri, "upload")) {
S html = params.get('html);
S title = dropAllTags(html);
S name = uniqueFileNameUsingMD5_80_v2(title, md5(html)) + ".html";
saveTextFile(newFile(dir, name), html);
ret "Saved as: " + ahref(rawSelfLink(urlencode(name)), name);
}
if (empty(uri)) ret "Static pages bot";
S name = urldecode(uri);
if (!isProperFileName_allowSpaces(name)) ret subBot_serve404("Bad chars");
File f = newFile(dir, name);
if (!fileExists(f)) ret subBot_serve404();
ret loadTextFile(f);
}