• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisiond8dfab692894eb010ed2c66a164ba30943aa3688 (tree)
Time2015-01-08 10:31:56
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Modify: Summarize 2 CGI Files.
modified: SampleCode/PIONE/Advanced3/Annotation.pione
renamed: SampleCode/PIONE/Advanced3/bin/Finish.cgi -> SampleCode/PIONE/Advanced3/bin/Result.cgi
deleted: SampleCode/PIONE/Advanced3/bin/Retry.cgi
modified: SampleCode/PIONE/Advanced3/etc/index2.html

Change Summary

Incremental Difference

--- a/SampleCode/PIONE/Advanced3/Annotation.pione
+++ b/SampleCode/PIONE/Advanced3/Annotation.pione
@@ -1,3 +1,3 @@
11 .@ PackageName :: "Ref3DtoRef2D"
22 .@ Editor :: "Kinoshita"
3-.@ Tag :: "v0.1.0"
3+.@ Tag :: "v0.1.1"
--- a/SampleCode/PIONE/Advanced3/bin/Finish.cgi
+++ b/SampleCode/PIONE/Advanced3/bin/Result.cgi
@@ -9,12 +9,15 @@ strHTML = ""
99 strHTML += "<!DOCTYPE html>"
1010 strHTML += "<html>"
1111 strHTML += "<head>"
12-strHTML += "<title>Finish</title>"
12+strHTML += "<title>Result</title>"
1313 ### Auto Close
1414 strHTML += '<meta http-equiv="REFRESH" content="0;URL=?pione-action=finish">'
1515
1616 # Main Process
17-command = "touch Finish!Flag"
17+## Query to Parameters
18+Result = cgi['Result']
19+
20+command = "touch " + Result + "!Flag"
1821 system(command)
1922
2023 strHTML += "</head>"
--- a/SampleCode/PIONE/Advanced3/bin/Retry.cgi
+++ /dev/null
@@ -1,26 +0,0 @@
1-#!/usr/bin/env ruby
2-
3-require 'cgi'
4-
5-cgi = CGI.new
6-
7-### Header
8-strHTML = ""
9-strHTML += "<!DOCTYPE html>"
10-strHTML += "<html>"
11-strHTML += "<head>"
12-strHTML += "<title>Retry</title>"
13-### Auto Close
14-strHTML += '<meta http-equiv="REFRESH" content="0;URL=?pione-action=finish">'
15-
16-# Main Process
17-command = "touch Start!Flag"
18-system(command)
19-
20-strHTML += "</head>"
21-strHTML += "</html>"
22-
23-# Output as html
24-cgi.out(type: "text/html") do
25- strHTML
26-end
--- a/SampleCode/PIONE/Advanced3/etc/index2.html
+++ b/SampleCode/PIONE/Advanced3/etc/index2.html
@@ -7,7 +7,13 @@
77 <body>
88 <img src="Ref3DtoRef2D.gif"><br>
99 <br>
10- <a href="Finish.cgi">決定</a><br>
11- <a href="Retry.cgi">やり直し</a>
10+ <form action="Result.cgi" method="post" enctype="multipart/form-data">
11+ <button type="submit">決定</button><br>
12+ <input type="hidden" name="Result" value="Finish"/>
13+ </form>
14+ <form action="Result.cgi" method="post" enctype="multipart/form-data">
15+ <button type="submit">やり直し</button><br>
16+ <input type="hidden" name="Result" value="Start"/>
17+ </form>
1218 </body>
1319 </html>
\ No newline at end of file
Show on old repository browser