module LoginPage where

import FancyHtml

-- TODO - add some decent HTML
-- TODO - figure out if there is some templating mechanism in Haskell
loggedInPage sessId = header ++ "<h1>Encrypted messaging</h1> Login successful.<p><h2><a href=\"sent_messages.cgi?sessId=" ++ sessId ++ "\">Show sent messages</a></h2><p>or</p><p><h2>Send a new message</h2><p><form action=\"sendmessage.cgi\"><input type=hidden name=session_id value=" ++ sessId ++ "><table><tr><td>Recipient's subject:</td><td><input type=text name=recipient size=30> (you can use SQL wildcards, the first database entry will be used)</td></tr><tr><td>Message subject:</td><td><input type=text name=subject size=30></td></tr><tr><td valign=top>Message:</td><td><textarea name=message rows=5 cols=80></textarea></td></tr><tr><td></td><td><input type=submit value=Send!></td></tr></table></form><p><h2>Register (new) login key</h2><form action=\"registerkey.cgi\"><input type=hidden name=session_id value=" ++ sessId ++ ">Login public key for challenge-response login in OpenSSL PEM format (-----BEGIN PUBLIC KEY-----\\n$data\\n-----END PUBLIC KEY-----)<p><textarea name=key rows=8 cols=80></textarea><p><input type=submit value=Register></form>" ++ quote "We should sell bloat credits, the way the government sells pollution credits. Everybody's assigned a certain amount of bloat, and if they go over, they have to purchase bloat credits from some other group that's been more careful." "http://www.sysprog.net/quotes.html" " Bent Hagemark" ++ footer
