Warning: session_start(): open(/var/lib/php/sessions/sess_f0pb4sfocs1h8mafbv3o1jjo3e, 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
concept Rule > ConceptWithGlobalID {
S text;
S page; // markDown
}
p { dbIndexing(Rule, 'globalID); }
html {
uri = dropSlashPrefix(uri);
if (eqic(uri, "admin")) {
try object checkWebAuthed(params);
ret new HCRUD(rawLink("admin"), new HCRUD_Concepts(Rule)
.addRenderer('text, new HCrud_Data.TextArea(80, 10)
).renderPage(params);
}
if (empty(uri))
ret htitle_h1("Rules") + ul_noEncode(map(list(Rule), r -> ahref(rawLink(r.globalIDStr()), htmlEncode2(or2(r.text, "unnamed")))));
if (possibleGlobalID(uri)) {
Rule r = conceptWhere(Rule, globalID := GlobalID(uri));
if (r == null) ret subBot_serve404("Rule not found");
ret htitle_h1(r.text) + markDownToHTML(r.page);
}
ret subBot_serve404();
}