!7 p { ai_spec_init(); } html { bool authed = creatorAuthed(); S _topic = params.get("topic"); if (empty(_topic)) _topic = ai_randomString(); else { for (S key : keysStartingWith2(params, "cat-")) { S value = params.get(key); continue if empty(value); S verb = ai_matrix_answerToVerb(value); continue if empty(verb); S cat = urldecode(dropPrefix("cat-", key)); temp tempSetThreadLocal(ai_postTriple_verified, authed); post(_topic, verb, cat); } } fS topic = _topic; final L answers = concatLists(ll(""), ai_matrix_standardAnswers()); Set options = ai_matrix_categoriesForTopic(topic); options.addAll(ai_matrix_standardCategories()); ret htitle_htmlencode("Matrix: " + topic) + hcenter( p(b(hfontsize(20, topic)), style := "margin-top: 3em") + hpostform(hhidden(+topic) + hsubmit("Save answers") + "

" + htable_noEncode( map(options, func(S cat) -> Map { S userAnswer = null; ret litorderedmap( "Statement", b(htmlencode2(topic)) + " is " + htmlencode2(cat), "Computer Answer", htmlEncode(ai_matrixGet(topic, cat)), "Your Answer", hselect_list(answers, userAnswer, name := "cat-" + urlencode(cat)) //hcheckbox(urlencode(s), tossCoin()) ); } )), action := smartBotRealURL() + "/dyn/" + psI(programID()) + "?topic=" + urlencode(topic))) + p(authed ? "Authed" : "Not authed"); }