[UP] HHH_a, cgi can work perfect now, use escape and unescape lib
[archserver.git] / mail / postfix / cgi / post.lua
blob40bd10d209426fb2db1b4dc5bda58478810ac3b0
1 #!/usr/bin/lua
2 dofile "lib.inc";
3 local prog_arg = arg or {...}
4 function cb_head()
5 print([[<script type="text/javascript">
6 function init()
10 </script>]])
11 end
13 function cb_body()
14 --print("STDIN:" .. (io.read() or "NULL") .. "<br>");
15 --print("QUERY_STRING:" .. (os.getenv('QUERY_STRING') or "NULL") .. "<br>")
16 --print(unescape(os.getenv('QUERY_STRING')));
17 print("QUERY:")
18 table.foreach(QUERY(), print);
19 print("<br>READ:")
20 table.foreach(POST(), print);
21 --print("<br>ALL:")
22 --table.foreach(QP_ENV(), print);
23 end
26 as_head(cb_head, lang["postfix user management"]);
27 as_body(cb_body, "init();");