-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchecktrust.lsp.template
executable file
·49 lines (49 loc) · 1.32 KB
/
checktrust.lsp.template
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
#!___NEWLISPPATH___
(load "___CGIBINPATH___/wot.lsp")
;(set (quote applicantemail) (main-args 2))
(if (= (env "REQUEST_METHOD") "POST")
(begin
(print "Content-type: text/html\n\n")
(set (quote applicantemail) (CGI:get "applicantemail"))
)
(begin
(set (quote applicantemail) (main-args 2))
)
)
(wot:checkemailaddress applicantemail)
(if (= "'" (first applicantemail)) (set (quote applicantemail) (rest applicantemail)))
(if (= "'" (last applicantemail))
(begin
(reverse applicantemail)
(set (quote applicantemail) (rest applicantemail))
(reverse applicantemail)
)
)
(if (= (env "REQUEST_METHOD") "POST")
(print "<pre>")
)
(set (quote returnlist) (catch (wot:checktrust applicantemail)))
(if (!= (nth 0 returnlist) nil)
(begin
(set (quote outputtext) (join (nth 1 returnlist) "\n"))
(if (= (env "REQUEST_METHOD") "POST")
(begin
(set (quote outputtext) (replace "<" outputtext "<"))
(set (quote outputtext) (replace ">" outputtext ">"))
)
)
(print applicantemail " applicant trusted with sponsors:(" outputtext ")\n")
(if (= (env "REQUEST_METHOD") "POST")
(print "</pre>")
)
(exit 0)
)
(begin
(print applicantemail " applicant not trusted\n")
(if (= (env "REQUEST_METHOD") "POST")
(print "</pre>")
)
(exit 1)
)
)
(exit)