Mail.mwrite (mail, "To: ");
Mail.mwrite (mail, #email entry);
Mail.mwrite (mail, "\n");
- Mail.mwrite (mail, Util.readFile "/home/hcoop/portal/welcome.txt");
+ Mail.mwrite (mail, Util.readFile (Config.staticFilesRoot ^ "welcome.txt"));
Mail.mwrite (mail, msg);
OS.Process.isSuccess (Mail.mclose mail)
end
fun preAdd app =
- ignore (C.dml (getDb ()) ($`UPDATE MemberApp
- SET status = 5
- WHERE id = ^(C.intToSql app)`))
-
-fun add app =
let
val _ = C.dml (getDb ()) ($`UPDATE MemberApp
- SET status = 4
+ SET status = 5
WHERE id = ^(C.intToSql app)`)
val app = lookupApp app
+ in
+ ()
+ end
- val outf = TextIO.openOut (Config.passwordFiles ^ #name app)
+fun add app =
+ let
+ val appR = lookupApp app
in
- TextIO.output (outf, #unix_passwd app);
- TextIO.output1 (outf, #"\n");
- TextIO.closeOut outf
+ ignore (C.dml (getDb ()) ($`UPDATE MemberApp
+ SET status = 4
+ WHERE id = ^(C.intToSql app)`))
end
fun welcome app =
Mail.mwrite (mail, "To: ");
Mail.mwrite (mail, #email app);
Mail.mwrite (mail, "\n");
- Mail.mwrite (mail, Util.readFile "/home/hcoop/portal/paid.txt");
+ Mail.mwrite (mail, Util.readFile (Config.staticFilesRoot ^ "paid.txt"));
ignore (Mail.mclose mail)
end
before TextIO.closeIn inf
end
-fun readTosBody () = readFile "/home/hcoop/public_html/tos.body.html"
-fun readTosAgree () = readFile "/home/hcoop/public_html/tos.agree.html"
-fun readTosMinorAgree () = readFile "/home/hcoop/public_html/tos.agree.minor.html"
+fun readTosBody () = readFile (Config.staticFilesRoot ^ "tos.body.html")
+fun readTosAgree () = readFile (Config.staticFilesRoot ^ "tos.agree.html")
+fun readTosMinorAgree () = readFile (Config.staticFilesRoot ^ "tos.agree.minor.html")
fun searchPaypal paypal =
C.map (getDb ()) mkAppRow ($`SELECT id, name, rname, gname, email, forward, uses, other, passwd, status, applied, ipaddr, confirmed, decided,