File: env.cgi

package info (click to toggle)
newlisp 10.7.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 6,248 kB
  • sloc: ansic: 33,280; lisp: 4,181; sh: 609; makefile: 215
file content (25 lines) | stat: -rwxr-xr-x 554 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/env newlisp
#

;;
;; prints the environment
;;
(print "Content-Type: text/html\r\n\r\n")
(print "<html>")

(print [text]
<A HREF="http://newlisp.org">Home</A>&nbsp;|
<A HREF="http:syntax.cgi?environment.txt">Source</A> 
[/text])

(println "<h2>" (date) "</h2>")
(println "<table border=1>")
(dolist (e (sort (env)))
  (if (and (!= (e 0) "HTTP_COOKIE") (!= (e 0) "UNIQUE_ID"))
      (println "<tr><td>" (e 0) "</td><td>" (e 1) "</td></tr>\n")
    )
)
(print "<h4>CGI by newLISP v" (sys-info -2)" on " ostype "<h4>")
(println "</html>")
(exit)