Mercurial Hosting > luan
comparison web/src/luan/modules/web/run.luan @ 391:2f5cc9c2cbf0
replace Html.simply_html_page with simply_html_head and simply_html_body_bottom
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 24 Apr 2015 14:05:52 -0600 |
parents | 612a283b3d14 |
children |
comparison
equal
deleted
inserted
replaced
390:bfbbce690bba | 391:2f5cc9c2cbf0 |
---|---|
21 print(i,line) | 21 print(i,line) |
22 i = i + 1 | 22 i = i + 1 |
23 end | 23 end |
24 end | 24 end |
25 | 25 |
26 local function form() | 26 local function form() %> |
27 Html.simply_html_page{ | 27 <html> |
28 head = function() %> | 28 <head> |
29 <title>Run Luan Code</title> | 29 <% Html.simply_html_head() %> |
30 <% end; | 30 <title>Run Luan Code</title> |
31 body = function() %> | 31 </head> |
32 <center margin-top=10> | 32 <body> |
33 <h3>Run Luan Code</h3> | 33 <center margin-top=10> |
34 <h3>Run Luan Code</h3> | |
35 </center> | |
36 <form name="form0" method="post"> | |
37 <input type="hidden" name="content_type" value="text/plain" /> | |
38 <center> | |
39 <textarea name="code" rows="20" cols="90" wrap="off" autofocus></textarea> | |
34 </center> | 40 </center> |
35 <form name="form0" method="post"> | 41 <center margin-top=5> |
36 <input type="hidden" name="content_type" value="text/plain" /> | 42 <input type="submit" value="Execute Luan Code" textcolor="white" bgcolor="#337ab7"/> |
37 <center> | 43 </center> |
38 <textarea name="code" rows="20" cols="90" wrap="off" autofocus></textarea> | 44 </form> |
39 </center> | 45 <% Html.simply_html_body_bottom() %> |
40 <center margin-top=5> | 46 </body> |
41 <input type="submit" value="Execute Luan Code" textcolor="white" bgcolor="#337ab7"/> | 47 </html> |
42 </center> | 48 <% end |
43 </form> | |
44 <% end; | |
45 } | |
46 end | |
47 | 49 |
48 function service() | 50 function service() |
49 Io.stdout = Http.response.text_writer() | 51 Io.stdout = Http.response.text_writer() |
50 local code = Http.request.parameters.code | 52 local code = Http.request.parameters.code |
51 if code == nil then | 53 if code == nil then |