1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
# 27jan12abu
# (c) Software Lab. Alexander Burger
(allowed ("app/")
"!start" "!stop" "@lib.css" "!psh" )
(load "@lib/http.l" "@lib/xhtml.l" "@lib/form.l" "@lib/ps.l" "@lib/adm.l")
(setq
*Scl 2
*Css "@lib.css"
*Blob "blob/app/" )
(load "app/er.l" "app/lib.l" "app/gui.l")
(permission
Customer ,"Customer"
Item ,"Item"
Order ,"Order"
Report ,"Report"
RoleAdmin ,"Role Administration"
UserAdmin ,"User Administration"
Password ,"Password"
Delete ,"Delete" )
(de *Locales
("English" NIL)
("English (US)" "US")
("English (UK)" "UK")
("Español (AR)" "AR" . "ar")
("Español (ES)" "ES" . "es")
("Deutsch (DE)" "DE" . "de")
("Deutsch (CH)" "CH" . "ch")
("Norsk" "NO" . "no")
("Русский" "RU" . "ru")
("日本語" "JP" . "jp") )
# Entry point
(de main ()
(call 'mkdir "-p" "db/app/" *Blob)
(pool "db/app/" *Dbs)
(unless (seq *DB)
(load "app/init.l") ) )
(de go ()
(pw 12)
(task (port 4040) # Set up query server in the background
(let? Sock (accept @)
(unless (fork) # Child process
(in Sock
(while (rd)
(sync)
(tell)
(out Sock
(pr (eval @)) ) ) )
(bye) )
(close Sock) ) )
(forked)
(rollback)
(server 8080 "!start") )
# vi:et:ts=3:sw=3
|