fun main _ =
let
- val db = C.conn "dbname='hcoop_hcoop'"
+ val db = C.conn "dbname='hcoop_hcoop' host='postgres'"
fun allEmails () =
let
| s _ = raise Fail "Bad allEmails row"
in
C.map db s
- "SELECT v FROM Contact JOIN ContactKind ON knd = ContactKind.id AND ContactKind.name = 'Non-hcoop e-mail' ORDER BY v"
+ "SELECT v FROM Contact JOIN ContactKind ON knd = ContactKind.id AND ContactKind.name = 'Non-HCoop e-mail' ORDER BY v"
end
fun kindRow [id, name, url, urlPrefix, urlPostfix] =
print "</ol>\n\n"
end
+
+ fun peer1 () =
+ let
+ val inf = TextIO.openIn "/afs/hcoop.net/user/h/hc/hcoop/contact/peer1.html"
+
+ fun loop () =
+ case TextIO.inputLine inf of
+ NONE => ()
+ | SOME line => (print line;
+ loop ())
+ in
+ loop ();
+ TextIO.closeIn inf
+ end
in
print "<html><head><title>HCoop Emergency Contact Information</title></head><body><h1>HCoop Emergency Contact Information</h1>\n";
- print "<h2><a href=\"mailto:";
+ print "<h2><a href=\"mailto:?Bcc=";
print (String.concatWith "," (allEmails ()));
print "\">E-mail everyone (off-HCoop addresses)</a></h2>\n\n";
app doOne kinds;
+
+ print "<h2>Peer 1 phone numbers</h2>\n\n";
+ peer1 ();
+
print "</body></html>\n";
C.close db;
OS.Process.success