3 import CGI hiding (div, head, map, span)
10 testDB = createPGB "wave" "wiki" "wiki" "12wiki34db"
16 runWithHook [] (\(key:act) -> sp db key act ) $ sp db "MainPage" []
18 ps a = standardQuery "Hello" a
21 s <- io $ getCurrent db key
24 Just (x,_) -> return x
25 standardQuery key $ do
26 t <- p $ makeTextarea s' (attr_SS "rows" "10" ## attr_SS "cols" "75" ## attr_SS "colspan" "2")
28 a <- textInputField (fieldSIZE 20)
30 c <- textInputField (fieldSIZE 20)
31 --p $ submit (F2 t a) testing (attr "value" "Send")
32 p $ defaultSubmit (F3 t a c) (savePage db key) (attr "value" "Send")
33 --submit0 (sp db key []) (attr "value" "Send1")
36 s <- io $ getCurrent db key
37 standardQuery key $ showPage db key s
39 savePage db key (F3 t a c) = do
40 s <- io $ update db key fulltext author comment
41 standardQuery key $ do
42 text "Updated with revision: "
44 address (hlink (URL {unURL = ("wiki?"++key)}) (text "Back to keyword") )
50 showPage db key s = do
52 Nothing -> text "No text added for this keyword"
53 Just (full, date) -> do
55 p $ text $ "Last edited: "++date
60 submit0 (editPage db key) (attr "value" "Edit")
61 --address (hlink (URL {unURL = ("wiki?"++key++"+edit")}) (text "Edit this page") )