rwdeliza 0.03

Sign up to get free protection for your applications and to get access to all the features.
Files changed (222) hide show
  1. data/ElizaData/database/db.1 +7015 -0
  2. data/ElizaData/database/db.10 +7001 -0
  3. data/ElizaData/database/db.11 +7001 -0
  4. data/ElizaData/database/db.12 +7003 -0
  5. data/ElizaData/database/db.13 +7003 -0
  6. data/ElizaData/database/db.14 +7008 -0
  7. data/ElizaData/database/db.15 +7001 -0
  8. data/ElizaData/database/db.16 +7001 -0
  9. data/ElizaData/database/db.17 +7001 -0
  10. data/ElizaData/database/db.18 +7001 -0
  11. data/ElizaData/database/db.19 +7001 -0
  12. data/ElizaData/database/db.2 +7001 -0
  13. data/ElizaData/database/db.20 +5467 -0
  14. data/ElizaData/database/db.3 +7001 -0
  15. data/ElizaData/database/db.4 +7001 -0
  16. data/ElizaData/database/db.5 +7001 -0
  17. data/ElizaData/database/db.6 +7001 -0
  18. data/ElizaData/database/db.7 +7001 -0
  19. data/ElizaData/database/db.8 +7001 -0
  20. data/ElizaData/database/db.9 +7001 -0
  21. data/ElizaData/responses/hello.res +1 -0
  22. data/ElizaData/responses/i_agree.res +1 -0
  23. data/ElizaData/responses/i_am_listening_to_you.res +1 -0
  24. data/ElizaData/responses/please_explain.res +1 -0
  25. data/ElizaData/responses/thank_you.res +1 -0
  26. data/ElizaData/tiny.dict +211 -0
  27. data/ElizaData/words/adjectives1.words +906 -0
  28. data/ElizaData/words/adjectives2w.words +1 -0
  29. data/ElizaData/words/noun0.words +15 -0
  30. data/ElizaData/words/noun1.words +1391 -0
  31. data/ElizaData/words/noun2.words +1924 -0
  32. data/ElizaData/words/noun4.words +330 -0
  33. data/ElizaData/words/pronoun1.words +6 -0
  34. data/ElizaData/words/verb4.words +350 -0
  35. data/ElizaData/words/verb42.words +391 -0
  36. data/ElizaData/words/verb42w.words +1 -0
  37. data/ElizaData/words/verb43.words +402 -0
  38. data/ElizaData/words/verb43w.words +1 -0
  39. data/ElizaData/words/verb45.words +452 -0
  40. data/ElizaData/words/verb4w.words +1 -0
  41. data/ElizaData/words/verb5.words +13 -0
  42. data/ElizaData/words/verb61.words +35 -0
  43. data/ElizaData/words/verb62.words +41 -0
  44. data/ElizaData/words/verb83.words +17 -0
  45. data/Readme.txt +462 -0
  46. data/bin/rwdeliza +19 -0
  47. data/code/01rwdcore/01rwdcore.rb +29 -0
  48. data/code/01rwdcore/02helptexthashbegin.rb +4 -0
  49. data/code/01rwdcore/03helptexthash.rb +23 -0
  50. data/code/01rwdcore/04helptextend.rb +6 -0
  51. data/code/01rwdcore/jumplinkcommand.rb +26 -0
  52. data/code/01rwdcore/openhelpwindow.rb +31 -0
  53. data/code/01rwdcore/returntomain.rb +10 -0
  54. data/code/01rwdcore/rundocuments.rb +10 -0
  55. data/code/01rwdcore/runeditconfiguration.rb +10 -0
  56. data/code/01rwdcore/runhelpabout.rb +10 -0
  57. data/code/01rwdcore/runopentinkerdocument.rb +7 -0
  58. data/code/01rwdcore/rwdtinkerversion.rb +22 -0
  59. data/code/01rwdcore/rwdwindowreturn.rb +9 -0
  60. data/code/01rwdcore/selectiontab.rb +9 -0
  61. data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
  62. data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
  63. data/code/01rwdcore/test_cases.rb +109 -0
  64. data/code/01rwdcore/test_harness.rb +13 -0
  65. data/code/01rwdcore/uploadreturns.rb +62 -0
  66. data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
  67. data/code/superant.com.rwdeliza/0uninstallapplet.rb +10 -0
  68. data/code/superant.com.rwdeliza/eliza01.rb +45 -0
  69. data/code/superant.com.rwdeliza/helptexthashrwdeliza.rb +39 -0
  70. data/code/superant.com.rwdeliza/openhelpwindowrwdeliza.rb +23 -0
  71. data/code/superant.com.rwdeliza/runrwdshellwindow.rb +12 -0
  72. data/code/superant.com.rwdeliza/rwdtinkerversion.rb +10 -0
  73. data/code/superant.com.rwdeliza/tagsentence.rb +39 -0
  74. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
  75. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
  76. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
  77. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +34 -0
  78. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
  79. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  80. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +53 -0
  81. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
  82. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +27 -0
  83. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +22 -0
  84. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
  85. data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
  86. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
  87. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +38 -0
  88. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  89. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
  90. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
  91. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
  92. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
  93. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
  94. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
  95. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
  96. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
  97. data/code/superant.com.words/dictlookup.rb +20 -0
  98. data/code/superant.com.words/runfortunewindow.rb +14 -0
  99. data/code/superant.com.words/runrwdwordsbackwindow.rb +10 -0
  100. data/code/superant.com.words/runrwdwordsversion.rb +14 -0
  101. data/code/superant.com.words/rwdtinkerversion.rb +10 -0
  102. data/code/zz0applicationend/zz0end.rb +4 -0
  103. data/configuration/language.dist +8 -0
  104. data/configuration/rwdapplicationidentity.dist +3 -0
  105. data/configuration/rwdtinker.dist +18 -0
  106. data/configuration/rwdweliza-0.03.dist +31 -0
  107. data/configuration/tinkerwin2variables.dist +17 -0
  108. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  109. data/gui/frontwindow0/cc0openphoto.rwd +22 -0
  110. data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
  111. data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
  112. data/gui/frontwindowselections/wwselectionend.rwd +3 -0
  113. data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
  114. data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
  115. data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
  116. data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
  117. data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
  118. data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
  119. data/gui/helpaboutzend/helpscreenend.rwd +3 -0
  120. data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
  121. data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
  122. data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
  123. data/gui/tinkerbackwindows/superant.com.refreshwindow/fortunerefreshwindowtwo.rwd +9 -0
  124. data/gui/tinkerbackwindows/superant.com.rwdeliza/1appname.rwd +5 -0
  125. data/gui/tinkerbackwindows/superant.com.rwdeliza/1eliza.rwd +21 -0
  126. data/gui/tinkerbackwindows/superant.com.rwdeliza/4sentance.rwd +21 -0
  127. data/gui/tinkerbackwindows/superant.com.rwdeliza/98jumplinkcommands.rwd +17 -0
  128. data/gui/tinkerbackwindows/superant.com.rwdeliza/zbackend.rwd +6 -0
  129. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/1appname.rwd +5 -0
  130. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/20downloadftp.rwd +45 -0
  131. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/67viewconfiguration.rwd +29 -0
  132. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/70rwddiagnostics.rwd +16 -0
  133. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/m01menubegin.rwd +18 -0
  134. data/gui/tinkerbackwindows/superant.com.rwdschedulebackwindow/zvbackend.rwd +6 -0
  135. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
  136. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
  137. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  138. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
  139. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
  140. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
  141. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
  142. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
  143. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
  144. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
  145. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
  146. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
  147. data/gui/tinkerbackwindows/superant.com.words/1appname.rwd +4 -0
  148. data/gui/tinkerbackwindows/superant.com.words/1dictionary.rwd +19 -0
  149. data/gui/tinkerbackwindows/superant.com.words/3rwdfortune.rwd +14 -0
  150. data/gui/tinkerbackwindows/superant.com.words/77jumplinkcommands.rwd +17 -0
  151. data/gui/tinkerbackwindows/superant.com.words/z9end.rwd +6 -0
  152. data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
  153. data/init.rb +277 -0
  154. data/installed/rwdweliza-0.03.inf +24 -0
  155. data/installed/temp.rb +1 -0
  156. data/lang/en/rwdcore/languagefile.rb +58 -0
  157. data/lang/es/rwdcore/languagefile-es.rb +62 -0
  158. data/lang/fr/rwdcore/languagefile.rb +64 -0
  159. data/lang/jp/rwdcore/languagefile.rb +72 -0
  160. data/lang/nl/rwdcore/languagefile.rb +75 -0
  161. data/lib/dict.rb +438 -0
  162. data/lib/druida.rb +499 -0
  163. data/lib/hashslice.rb +71 -0
  164. data/lib/linguistics.rb +360 -0
  165. data/lib/linguistics/en.rb +1601 -0
  166. data/lib/linguistics/en/infinitive.rb +1148 -0
  167. data/lib/linguistics/en/linkparser.rb +142 -0
  168. data/lib/linguistics/en/wordnet.rb +253 -0
  169. data/lib/linguistics/iso639.rb +456 -0
  170. data/lib/linkparser.rb +461 -0
  171. data/lib/linkparser/connection.rb +81 -0
  172. data/lib/linkparser/connector.rb +201 -0
  173. data/lib/linkparser/definition.rb +225 -0
  174. data/lib/linkparser/dictionary.rb +208 -0
  175. data/lib/linkparser/linkage.rb +185 -0
  176. data/lib/linkparser/log.rb +39 -0
  177. data/lib/linkparser/sentence.rb +79 -0
  178. data/lib/linkparser/utils.rb +540 -0
  179. data/lib/linkparser/word.rb +92 -0
  180. data/lib/rconftool.rb +380 -0
  181. data/lib/rwd/browser.rb +123 -0
  182. data/lib/rwd/ftools.rb +174 -0
  183. data/lib/rwd/mime.rb +328 -0
  184. data/lib/rwd/net.rb +866 -0
  185. data/lib/rwd/ruby.rb +889 -0
  186. data/lib/rwd/rwd.rb +1942 -0
  187. data/lib/rwd/sgml.rb +236 -0
  188. data/lib/rwd/thread.rb +63 -0
  189. data/lib/rwd/tree.rb +371 -0
  190. data/lib/rwd/xml.rb +101 -0
  191. data/lib/zip/ioextras.rb +114 -0
  192. data/lib/zip/stdrubyext.rb +111 -0
  193. data/lib/zip/tempfile_bugfixed.rb +195 -0
  194. data/lib/zip/zip.rb +1378 -0
  195. data/lib/zip/zipfilesystem.rb +558 -0
  196. data/lib/zip/ziprequire.rb +61 -0
  197. data/rwd_files/HowTo_Eliza.txt +195 -0
  198. data/rwd_files/HowTo_Tinker.txt +471 -0
  199. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  200. data/rwd_files/Readme.txt +57 -0
  201. data/rwd_files/RubyWebDialogs.html +6 -0
  202. data/rwd_files/favicon.ico +0 -0
  203. data/rwd_files/rdoc-style.css +175 -0
  204. data/rwd_files/rwdapplications.html +54 -0
  205. data/rwd_files/tinker.png +0 -0
  206. data/rwdconfig.dist +21 -0
  207. data/rwdeliza.rb +1 -0
  208. data/tests/RubyGauge.rb +179 -0
  209. data/tests/checkdepends.sh +4 -0
  210. data/tests/cleancnf.sh +6 -0
  211. data/tests/makedist-rwdweliza.rb +56 -0
  212. data/tests/makedist.rb +66 -0
  213. data/tests/rdep.rb +354 -0
  214. data/tests/totranslate.lang +93 -0
  215. data/zips/rwdwaddresses-1.05.zip +0 -0
  216. data/zips/rwdwcalc-0.61.zip +0 -0
  217. data/zips/rwdwgutenberg-0.09.zip +0 -0
  218. data/zips/rwdwschedule-1.04.zip +0 -0
  219. data/zips/rwdwshell-1.04.zip +0 -0
  220. data/zips/temp.rb +1 -0
  221. data/zips/wrubyslippers-1.06.zip +0 -0
  222. metadata +282 -0
@@ -0,0 +1,1942 @@
1
+ require "lib/rwd/ruby"
2
+ require "lib/rwd/xml"
3
+ require "lib/rwd/net"
4
+ require "lib/rwd/browser"
5
+ require "lib/rwd/thread"
6
+ require "md5"
7
+ require "rbconfig"
8
+
9
+ begin
10
+ require "win32ole"
11
+ require "win32/registry"
12
+ rescue LoadError
13
+ $".push "win32ole.so"
14
+ $".push "win32/registry.rb"
15
+ end
16
+
17
+ $rwd_exit = ARGV.include?("--rwd-exit") # Hack ???
18
+ $rwd_exit = true if defined?(REQUIRE2LIB)
19
+ $rwd_debug = ($rwd_debug or $DEBUG or false)
20
+ $rwd_border = ($rwd_border or 0)
21
+ $rwd_dir = Dir.pwd
22
+ $rwd_files = File.expand_path("rwd_files", Dir.pwd)
23
+ $rwd_html = {}
24
+
25
+ ARGV.delete_if do |arg|
26
+ arg =~ /^--rwd-/
27
+ end
28
+
29
+ RWDEmptyline = "..."
30
+
31
+ #module RWD
32
+
33
+ rcfile = nil
34
+ s = ENV["HOME"] ; s = File.expand_path(".rwdrc", s) unless s.nil? ; rcfile = s if (not s.nil? and rcfile.nil? and File.file?(s))
35
+ s = ENV["USERPROFILE"] ; s = File.expand_path("rwd.cfg", s) unless s.nil? ; rcfile = s if (not s.nil? and rcfile.nil? and File.file?(s))
36
+ s = ENV["windir"] ; s = File.expand_path("rwd.cfg", s) unless s.nil? ; rcfile = s if (not s.nil? and rcfile.nil? and File.file?(s))
37
+
38
+ AL = "align='left'"
39
+ AC = "align='center'"
40
+ AR = "align='right'"
41
+ VA = "valign='middle'"
42
+
43
+ Format = "\n<!-- %-10s %-10s -->\t"
44
+
45
+ unless rcfile.nil?
46
+ puts "Reading #{rcfile} ..."
47
+
48
+ Hash.file(rcfile).each do |k, v|
49
+ ENV[k] = v unless ENV.include?(k)
50
+ end
51
+ end
52
+
53
+ ENV["RWDBROWSER"] = (ENV["RWDBROWSER"] or defaultbrowser) or puts "No browser found."
54
+ ENV["RWDPORTS"] = (ENV["RWDPORTS"] or "7701-7709")
55
+ ENV["RWDTHEME"] = (ENV["RWDTHEME"] or "DEFAULT")
56
+
57
+ #trap("INT") {puts "Terminating..." ; exit}
58
+
59
+ $SAFE = 0
60
+
61
+ class IE
62
+ def initialize(url)
63
+ @ie = WIN32OLE.new("InternetExplorer.Application")
64
+ @ev = WIN32OLE_EVENT.new(@ie, "DWebBrowserEvents2")
65
+
66
+ @ie.navigate(url)
67
+
68
+ @ie.menubar = false
69
+ @ie.toolbar = false
70
+ @ie.addressbar = false
71
+ @ie.statusbar = false
72
+
73
+ @ie.visible = true
74
+
75
+ at_exit do
76
+ @ie.visible = false
77
+ end
78
+
79
+ @ev.on_event("OnQuit") do
80
+ Thread.main.exit
81
+ end
82
+
83
+ Thread.new do
84
+ loop do
85
+ WIN32OLE_EVENT.message_loop
86
+ end
87
+ end
88
+ end
89
+ end
90
+
91
+ class Array
92
+ def rwd_options(emptyline=nil)
93
+ if emptyline.nil?
94
+ a = self
95
+ else
96
+ a = [emptyline].concat(self)
97
+ end
98
+
99
+ a.numsort.collect{|s| "<option>#{s.to_s.to_html}</option>" }.join("\n")
100
+ end
101
+
102
+ def rwd_method(method)
103
+ res = ""
104
+
105
+ self.each do |s|
106
+ s = s.join("/") if s.kind_of?(Array)
107
+ s2 = s.dup
108
+ s2[0..0] = s2[0..0].upcase
109
+ res = res + "<p align='left'><a action='#{method}/#{s.to_html}'>#{s2.to_html}</a></p>"
110
+ end
111
+
112
+ return res
113
+ end
114
+
115
+ def rwd_row(key=nil, value=nil, bold=false)
116
+ res = ""
117
+
118
+ res = res + "<row valign='top'>"
119
+ res = res + "<radio name='#{key.to_html}' value='#{value.to_html}'/>" unless key.nil?
120
+ res = res + self.collect{|s| "<p align='#{(s.kind_of?(Numeric) or s =~ /^\d+\.\d+$/) ? "right" : "left"}'>#{"<b>" if bold}#{s.to_s.to_html}#{"</b>" if bold}</p>"}.join("")
121
+ res = res + "</row>"
122
+
123
+ return res
124
+ end
125
+
126
+ def rwd_table(headers=nil, highlightrows=[])
127
+ res = ""
128
+
129
+ highlightrows = [highlightrows].flatten
130
+
131
+ n = -1
132
+
133
+ res = res + "<table>"
134
+ res = res + headers.rwd_row(nil, nil, true) unless headers.nil?
135
+ res = res + self.collect{|a| a.rwd_row(nil, nil, highlightrows.include?(n+=1))}.join("")
136
+ res = res + "</table>"
137
+
138
+ return res
139
+ end
140
+
141
+ def rwd_headers(emptyfield=false)
142
+ res = ""
143
+
144
+ res = res + "<row>"
145
+ res = res + "<p/>" if emptyfield
146
+ res = res + self.collect{|s| "<p align='left'><b>#{s.to_html}</b></p>" }.join("")
147
+ res = res + "</row>"
148
+
149
+ return res
150
+ end
151
+
152
+ def rwd_form(prefix, values=[], twoparts=0, options={})
153
+ res = []
154
+
155
+ res << "<table>"
156
+ self.each_index do |n|
157
+ name = "#{prefix.to_html}#{self[n].downcase.to_html}"
158
+
159
+ res << "<row>"
160
+ res << "<p align='right'>"
161
+ res << "#{self[n].to_html}:"
162
+ res << "</p>"
163
+
164
+ if options.keys.include?(self[n])
165
+ res << "<select name='#{name}'>"
166
+ res << options[self[n]].rwd_options(RWDEmptyline)
167
+ res << "</select>"
168
+ else
169
+ s = ""
170
+
171
+ s << "<text name='#{name}'"
172
+ s << " value='#{values[n].to_s.to_html}'" if n < values.length
173
+ s << "/>"
174
+
175
+ res << s
176
+ end
177
+
178
+ res << "</row>"
179
+
180
+ if twoparts > 0 and n == twoparts-1
181
+ res << "<row><empty/></row>"
182
+ end
183
+ end
184
+ res << "</table>"
185
+
186
+ return res.join("\n")
187
+ end
188
+ end
189
+
190
+ class Hash
191
+ def rwd_table(field=nil, joinwith=nil, headers=nil)
192
+ res = []
193
+
194
+ res << "<table>"
195
+ res << headers.rwd_headers((not field.nil?)) if not headers.nil?
196
+ self.keys.numsort.each do |key|
197
+ key2 = key
198
+ value2 = self[key]
199
+
200
+ key2 = key2.join(joinwith) if key2.kind_of?(Array)
201
+ value2 = [value2] if value2.kind_of?(String)
202
+
203
+ res << value2.rwd_row(field, key2)
204
+ end
205
+ res << "</table>"
206
+
207
+ res.join("\n")
208
+ end
209
+ end
210
+
211
+ class EVTable
212
+ def rwd_table(field=nil, joinwith=@sep)
213
+ super(field, joinwith, @headers)
214
+ end
215
+
216
+ def rwd_form(prefix="", key=nil, twoparts=false)
217
+ values = self[key] if not key.nil?
218
+ values = [] if values.nil?
219
+ options = {}
220
+
221
+ if File.file?(oldlocation("constraints.tsv"))
222
+ table = File.basename(@file).gsub(/\.tsv$/, "")
223
+
224
+ TSVFile.new(oldlocation("constraints.tsv")).subset(["Table", "Constraint"], [table, "key"], ["Column", "Value"]).values.each do |column, table2|
225
+ options[column] = TSVFile.new(oldlocation("#{table2}.tsv")).keys.collect{|a| a.join("\t")}
226
+ end
227
+ end
228
+
229
+ @headers.rwd_form(prefix, values, twoparts ? @key : 0, options)
230
+ end
231
+
232
+ def rwd_metadata
233
+ res = []
234
+
235
+ res << "<table>"
236
+ res << "<row>"
237
+ res << " <empty/>"
238
+ res << " <text name='header_new' value=''/>"
239
+ res << "</row>"
240
+ @headers.each_index do |n|
241
+ res << "<row>"
242
+ res << " <text name='header_#{n}_old' value='#{@headers[n]}'/>"
243
+ res << " <text name='header_#{n}_new' value=''/>"
244
+ res << "</row>"
245
+ end
246
+ res << "</table>"
247
+
248
+ return res.join("\n")
249
+ end
250
+ end
251
+
252
+ class OpenTag
253
+ def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
254
+ bef = before[-1]
255
+ res << Format % ["Before", @subtype] if ($rwd_debug and not bef.nil?)
256
+ res << bef if not bef.nil?
257
+
258
+ res << Format % ["Pre", @subtype] if $rwd_debug
259
+
260
+ align = AC
261
+ align = "align='#{@args["align"]}'" if @args.include?("align")
262
+
263
+ valign = VA
264
+ valign = "valign='#{@args["valign"]}'" if @args.include?("valign")
265
+
266
+ value1 = ""
267
+ value1 = varshtml[@args["name"]] if varshtml.include?(@args["name"])
268
+ value1 = @args["value"] if @args.include?("value")
269
+
270
+ value2 = ""
271
+ value2 = varsstring[@args["name"]] if varsstring.include?(@args["name"])
272
+ value2 = @args["value"] if @args.include?("value")
273
+
274
+ cellspacing = 3
275
+ cellspacing = 0 if pda
276
+
277
+ case @subtype
278
+ when "application"
279
+ when "window", "helpwindow"
280
+ args = @args.deep_dup
281
+
282
+ args["nohelpbutton"] = (not help)
283
+
284
+ template = $rwd_html_1
285
+ template = $rwd_html_PDA_1 if pda
286
+
287
+ res << (template(template, args))
288
+ when "p" then res << "<p #{align}>"
289
+ when "pre" then res << "<pre #{align}>"
290
+ when "big" then res << "<p #{align}><big>"
291
+ when "small" then res << "<p #{align}><small>"
292
+ when "list" then res << "<ul #{align}>"
293
+ when "item" then res << "<li #{align}>"
294
+ when "empty" then res << "<p><br>"
295
+ when "image"
296
+ width = "width='#{@args["width"]}" if @args.include?("width")
297
+ height = "height='#{@args["height"]}'" if @args.include?("height")
298
+
299
+ res << "<img src='#{@args["src"]}' alt='#{@args["alt"]}' #{width} #{height}>"
300
+ when "progressbar"
301
+ width = 200
302
+
303
+ res << "<table>"
304
+ res << " <tr>"
305
+ res << " <td colspan='2'><img src='rwd_pixel.gif' height='1' width='#{width+5}'></td>"
306
+ res << " </tr>"
307
+ res << " <tr>"
308
+ res << " <td bgcolor='#DDDDDD'><img src='rwd_pixel.gif' height='10' width='#{(width*@args["value"].to_f).to_i}'></td>"
309
+ res << " <td bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='10' width='#{(width*(1.0-@args["value"].to_f)).to_i}'></td>"
310
+ res << " </tr>"
311
+ res << "</table>"
312
+ when "br" then res << "<br>"
313
+ when "hr" then res << "<hr>"
314
+ when "b" then res << "<b>"
315
+ when "i" then res << "<i>"
316
+ when "a"
317
+ if @args.include?("href")
318
+ res << "<a href='#{@args["href"]}' target='#{@args["target"] or "_blank"}'>"
319
+ else
320
+ res << "<a href='javascript:document.bodyform.rwd_action.value=\"#{@args["action"]}\";document.bodyform.submit();'>"
321
+ end
322
+ when "vertical" then res << "<table #{AC} border='#{$rwd_border}' cellspacing='#{cellspacing}' cellpadding='0'>"
323
+ when "horizontal" then res << "<table #{AC} border='#{$rwd_border}' cellspacing='#{cellspacing}' cellpadding='0'><tr #{align} #{valign}>"
324
+ when "table" then res << "<table #{AC} border='#{$rwd_border}' cellspacing='#{cellspacing}' cellpadding='0'>"
325
+ when "row" then res << "<tr #{align} #{valign}>"
326
+ when "hidden" then res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='hidden'>"
327
+ when "text"
328
+ maxlength = ""
329
+ maxlength = "maxlength='%s'" % @args["maxlength"] if @args.include?("maxlength")
330
+ size = ""
331
+ size = "size='%s'" % @args["size"] if @args.include?("size")
332
+ size = "size='%s'" % 10 if pda
333
+ res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='text' #{maxlength} #{size}>"
334
+ oneormorefields << "true"
335
+ when "textarea"
336
+ res << "<p #{align}><textarea name='#{@args["name"]}' rows='25' cols='80'>#{value2.crlf}</textarea>"
337
+ oneormorefields << "true"
338
+ when "password"
339
+ maxlength = ""
340
+ maxlength = "maxlength='%s'" % @args["maxlength"] if @args.include?("maxlength")
341
+ size = ""
342
+ size = "size='%s'" % 10 if pda
343
+ res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='password' #{maxlength} #{size}>"
344
+ oneormorefields << "true"
345
+ when "checkbox"
346
+ if varshtml[@args["name"]] == "on"
347
+ switches[@args["name"]] = true
348
+ res << "<p #{align}><input name='#{@args["name"]}' checked='on' type='checkbox'>"
349
+ else
350
+ switches[@args["name"]] = false
351
+ res << "<p #{align}><input name='#{@args["name"]}' type='checkbox'>"
352
+ end
353
+ oneormorefields << "true"
354
+ when "radio"
355
+ if varshtml[@args["name"]] == value1 # ??? 1 or 2?
356
+ res << "<p #{align}><input name='#{@args["name"]}' checked='on' value='#{value1}' type='radio'>"
357
+ else
358
+ res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='radio'>"
359
+ end
360
+ oneormorefields << "true"
361
+ when "select"
362
+ res << "<select #{align} name='#{@args["name"]}' width='#{@args["width"]} size='#{@args["size"]}'>" # ??? Misschien nog iets met 'multiple'?
363
+ name = @args["name"]
364
+ $select = varshtml[name]
365
+ oneormorefields << "true"
366
+ when "option"
367
+ if $select == @children[0].text
368
+ res << "<option selected='true'>"
369
+ else
370
+ res << "<option>"
371
+ end
372
+ when "button"
373
+ res << "<input type='submit' value='#{@args["caption"]}' onclick='document.bodyform.rwd_action.value=\"#{@args["action"]}\";'>"
374
+ firstaction << @args["action"] if (firstaction.empty? and @args.include?("action"))
375
+ oneormorefields << "true"
376
+ when "back"
377
+ res << "<input type='submit' value='Back' onclick='document.bodyform.rwd_action.value=\"rwd_back\";'>"
378
+ firstaction << "rwd_back" if firstaction.empty?
379
+ oneormorefields << "true"
380
+ when "cancel"
381
+ res << "<input type='submit' value='Cancel' onclick='document.bodyform.rwd_action.value=\"rwd_cancel\";'>"
382
+ firstaction << "rwd_cancel" if firstaction.empty?
383
+ oneormorefields << "true"
384
+ when "help"
385
+ res << "<input type='submit' value='Help' onclick='document.bodyform.rwd_action.value=\"rwd_help\";'>"
386
+ firstaction << "rwd_help" if firstaction.empty?
387
+ oneormorefields << "true"
388
+ when "quit"
389
+ res << "<input type='submit' value='Quit' onclick='document.bodyform.rwd_action.value=\"rwd_quit\";'>"
390
+ firstaction << "rwd_quit" if firstaction.empty?
391
+ oneormorefields << "true"
392
+ when "close"
393
+ res << "<input type='submit' value='Close' onclick='window.close();'>"
394
+ firstaction << "rwd_quit" if firstaction.empty?
395
+ oneormorefields << "true"
396
+ when "main"
397
+ res << "<input type='submit' value='Main' onclick='document.bodyform.rwd_action.value=\"rwd_main\";'>"
398
+ firstaction << "rwd_main" if firstaction.empty?
399
+ oneormorefields << "true"
400
+ when "reset"
401
+ res << "<input type='reset' value='Reset'>"
402
+ firstaction << "rwd_quit" if firstaction.empty? # ???
403
+ oneormorefields << "true"
404
+ when "closewindow"
405
+ #res << "<script type='text/javascript'>\n" # ???
406
+ #res << "<!--\n"
407
+ #res << " window.close();\n"
408
+ #res << "//-->\n"
409
+ #res << "</script>"
410
+ when "tabs"
411
+ res << "<table #{AC} border='#{$rwd_border}' cellspacing='0' cellpadding='0'>"
412
+ res << " <tr #{AL}>"
413
+ res << " <td #{AL} class='tabs'>"
414
+ res << " <table #{AL} border='#{$rwd_border}' cellspacing='0' cellpadding='0'>"
415
+ res << " <tr #{AL}>"
416
+ #res << " <td class='notab'>&nbsp;</td>"
417
+ tabs.each do |obj|
418
+ name = obj.args["name"]
419
+ caption = obj.args["caption"]
420
+
421
+ res << "<td #{AL} class='notab'>&nbsp;</td>" unless obj == tabs[0]
422
+
423
+ if name == tab
424
+ res << "<td #{AC} class='activetab'><tt>&nbsp;#{caption}&nbsp;</tt></td>"
425
+ else
426
+ res << "<td #{AC} class='passivetab'><a href='javascript:document.bodyform.rwd_action.value=\"rwd_tab_#{name}\";document.bodyform.submit();'><tt>&nbsp;#{caption}&nbsp;</tt></a></td>"
427
+ end
428
+ end
429
+ res << " <td class='notab' width='100%'>&nbsp;</td>"
430
+ res << " </tr>"
431
+ res << " </table>"
432
+ res << " </td>"
433
+ res << " </tr>"
434
+ res << " <tr #{align}>"
435
+ res << " <td #{align} class='tabblad'>"
436
+ when "tab"
437
+ res << "<table #{AC} border='#{$rwd_border}' cellspacing='3' cellpadding='0'>"
438
+ when "panel"
439
+ level = (@args["level"] or "normal")
440
+ res << "<table #{AC} border='#{$rwd_border}' cellspacing='0' cellpadding='0'>"
441
+ res << " <tr #{align}>"
442
+ res << " <td #{align} class='panel1'>" if level == "normal"
443
+ res << " <td #{align} class='panel1high'>" if level == "high"
444
+ res << " <td #{align} class='panel1low'>" if level == "low"
445
+ res << " <table #{AC} border='#{$rwd_border}' cellspacing='0' cellpadding='0'>"
446
+ res << " <tr #{align}>"
447
+ res << " <td #{align} class='panel2'>" if level == "normal"
448
+ res << " <td #{align} class='panel2high'>" if level == "high"
449
+ res << " <td #{align} class='panel2low'>" if level == "low"
450
+ res << " <table #{AC} border='#{$rwd_border}' cellspacing='3' cellpadding='0'>"
451
+ else
452
+ puts "<#{@subtype}>"
453
+ res << "&lt;#{@subtype}&gt;"
454
+ end
455
+
456
+ bef = nil
457
+ aft = nil
458
+
459
+ case @subtype
460
+ when "vertical", "window", "helpwindow", "tab", "panel"
461
+ res << Format % ["AftPre", @subtype] if $rwd_debug
462
+ if @args.include?("spacing")
463
+ s = "<tr><td>&nbsp;</td></tr>" * (@args["spacing"].to_i)
464
+ else
465
+ s = ""
466
+ end
467
+ bef = "#{s}<tr #{align} #{valign}><td #{align}>"
468
+ aft = "</td></tr>"
469
+ when "horizontal", "row"
470
+ res << Format % ["AftPre", @subtype] if $rwd_debug
471
+ bef = "<td #{align}>"
472
+ aft = "</td>"
473
+ end
474
+
475
+ before.push(bef)
476
+ after.push(aft)
477
+ end
478
+
479
+ def postchildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
480
+ case @subtype
481
+ when "vertical", "window", "helpwindow", "tab", "panel"
482
+ res << Format % ["BefPost", @subtype] if $rwd_debug
483
+ if @args.include?("spacing")
484
+ res << "<tr><td>&nbsp;</td></tr>" * (@args["spacing"].to_i)
485
+ end
486
+ when "horizontal", "row"
487
+ res << Format % ["BefPost", @subtype] if $rwd_debug
488
+ end
489
+
490
+ res << Format % ["Post", @subtype] if $rwd_debug
491
+
492
+ case @subtype
493
+ when "application"
494
+ when "window", "helpwindow"
495
+ args = @args.deep_dup
496
+
497
+ args["nohelpbutton"] = (not help)
498
+
499
+ template = $rwd_html_2
500
+ template = $rwd_html_PDA_2 if pda
501
+
502
+ res << (template(template, args))
503
+ when "p" then res << "</p>"
504
+ when "pre" then res << "</pre>"
505
+ when "big" then res << "</big></p>"
506
+ when "small" then res << "</small></p>"
507
+ when "list" then res << "</ul>"
508
+ when "item" then res << "</li>"
509
+ when "empty" then res << "</p>"
510
+ when "image" then res << ""
511
+ when "progressbar" then res << ""
512
+ when "br" then res << ""
513
+ when "hr" then res << ""
514
+ when "b" then res << "</b>"
515
+ when "i" then res << "</i>"
516
+ when "a" then res << "</a>"
517
+ when "vertical" then res << "</table>"
518
+ when "horizontal" then res << "</tr></table>"
519
+ when "table" then res << "</table>"
520
+ when "row" then res << "</tr>"
521
+ when "hidden" then res << "</p>"
522
+ when "text" then res << "</p>"
523
+ when "textarea" then res << "</p>"
524
+ when "password" then res << "</p>"
525
+ when "checkbox" then res << "</p>"
526
+ when "radio" then res << "</p>"
527
+ when "select"
528
+ res << "</select>"
529
+ $select = nil
530
+ when "option" then res << "</option>"
531
+ when "button" then res << ""
532
+ when "back" then res << ""
533
+ when "cancel" then res << ""
534
+ when "help" then res << ""
535
+ when "quit" then res << ""
536
+ when "close" then res << ""
537
+ when "main" then res << ""
538
+ when "reset" then res << ""
539
+ when "closewindow" then res << ""
540
+ when "tabs"
541
+ res << " </td>"
542
+ res << " </tr>"
543
+ res << "</table>"
544
+ when "tab"
545
+ res << "</table>"
546
+ when "panel"
547
+ res << " </table>"
548
+ res << " </td>"
549
+ res << " </tr>"
550
+ res << " </table>"
551
+ res << " </td>"
552
+ res << " </tr>"
553
+ res << "</table>"
554
+ else
555
+ puts "</#{@subtype}>"
556
+ res << "&lt;/#{@subtype}&gt;"
557
+ end
558
+
559
+ before.pop
560
+ after.pop
561
+
562
+ aft = after[-1]
563
+ res << Format % ["After", @subtype] if ($rwd_debug and not aft.nil?)
564
+ res << aft if not aft.nil?
565
+ end
566
+
567
+ def template(html, vars)
568
+ res = []
569
+
570
+ a = {}
571
+
572
+ vars.each do |k, v|
573
+ a[k.upcase] = v
574
+ end
575
+
576
+ logo = nil
577
+ logo = File.expand_path(vars["logo"], $rwd_files) if vars.include?("logo")
578
+ logo = nil unless logo.nil? or File.file?(logo)
579
+
580
+ watermark = nil
581
+ watermark = File.expand_path(vars["watermark"], $rwd_files) if vars.include?("watermark")
582
+ watermark = nil unless watermark.nil? or File.file?(watermark)
583
+
584
+ a["LOGO"] = "" unless not logo.nil?
585
+ a["WATERMARK"] = "" unless not watermark.nil?
586
+
587
+ a["HELPBUTTON"] = (not (vars["nohelpbutton"]))
588
+ a["BACKBUTTONS"] = (not (vars["nobackbuttons"]))
589
+ a["BACKBUTTONS"] = (not (vars["nobackbuttons"]))
590
+ a["CLOSEBUTTON"] = (not (vars["noclosebutton"]))
591
+
592
+ if a.include?("WIDTH")
593
+ a["WIDTH1"] = "width='#{a["WIDTH"]}'"
594
+ a["WIDTH2"] = a["WIDTH"]
595
+ else
596
+ a["WIDTH1"] = " "
597
+ a["WIDTH2"] = "1"
598
+ end
599
+
600
+ html.split(/\r*\n/).each do |line|
601
+ if line =~ /%[A-Z0-9]+%/
602
+ a.each do |k, v|
603
+ v = false if (v.kind_of?(String) and v.empty?)
604
+
605
+ if line.include?("%#{k}%")
606
+ line.gsub!("%#{k}%", "#{v}") if v
607
+ end
608
+ end
609
+
610
+ line = "<!-- #{line.scan(/%[A-Z0-9]+%/).join(" ")} -->" if line =~ /%[A-Z0-9]+%/
611
+ end
612
+
613
+ res << line
614
+ end
615
+
616
+ res.join("\n")
617
+ end
618
+ end
619
+
620
+ class Text
621
+ def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda)
622
+ if not @text.scan(/[^ \t\r\n]/).empty?
623
+ res << Format % ["Text", ""] if $rwd_debug
624
+ res << "#{@text}"
625
+ end
626
+ end
627
+ end
628
+
629
+ class RWDTree < XML
630
+ end
631
+
632
+ class RWDWindow
633
+ @@windows = {} # Kind of caching.
634
+ @@helpwindows = {} # Kind of caching.
635
+
636
+ def initialize(rwd, window=nil)
637
+ rwd = rwd.join("\n") if rwd.kind_of?(Array)
638
+
639
+ if @@windows[rwd].nil?
640
+ @@windows[rwd] = {}
641
+ @@helpwindows[rwd] = {}
642
+
643
+ tree = XML.new(rwd)
644
+
645
+ tree.parse(OpenTag, "window") do |type, obj|
646
+ $rwd_appvars.each{|k, v| obj.args[k] = v}
647
+ @@windows[rwd][obj.args["name"]] = obj.to_h
648
+ end
649
+
650
+ tree.parse(OpenTag, "helpwindow") do |type, obj|
651
+ $rwd_appvars.each{|k, v| obj.args[k] = v}
652
+ @@helpwindows[rwd][obj.args["name"]] = obj.to_h
653
+ end
654
+ end
655
+
656
+ @rwd = (@@windows[rwd][window] or "").dup
657
+ @helprwd = (@@helpwindows[rwd][window] or "").dup
658
+ end
659
+
660
+ def render(pda, action=nil, vars=Hash.new, switches=Hash.new, help=false, tab="")
661
+ varshtml = Hash.new
662
+ varsstring = Hash.new
663
+ oneormorefields = ""
664
+ firstaction = ""
665
+ html = []
666
+
667
+ vars = vars.deep_dup
668
+
669
+ begin # error wrap
670
+
671
+ vars.each do |key, value|
672
+ if not key.empty?
673
+ if value.respond_to? "to_s"
674
+ @rwd.gsub!(/%%#{key}%%/, value.to_s)
675
+ @rwd.gsub!(/%#{key}%/, value.to_s.to_html)
676
+
677
+ @helprwd.gsub!(/%%#{key}%%/, value.to_s)
678
+ @helprwd.gsub!(/%#{key}%/, value.to_s.to_html)
679
+
680
+ varshtml[key] = value.to_s.to_html
681
+ varsstring[key] = value.to_s
682
+ end
683
+ end
684
+ end
685
+
686
+ windowobject = RWDTree.new(@rwd).children.dup.delete_if{|obj| obj.subtype != "window"}[0]
687
+ helpobject = RWDTree.new(@helprwd).children.dup.delete_if{|obj| obj.subtype != "helpwindow"}[0]
688
+
689
+ tabsobj = windowobject.children.dup.delete_if{|obj| obj.subtype != "tabs"}[0]
690
+
691
+ if not tabsobj.nil?
692
+ tabs = tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")}
693
+
694
+ if tab.empty?
695
+ tab = tabs[0].args["name"]
696
+ end
697
+
698
+ tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab}
699
+ end
700
+
701
+ if help
702
+ helpobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, false, oneormorefields, firstaction, tabs, tab, pda)
703
+ else
704
+ windowobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, (not @helprwd.empty?), oneormorefields, firstaction, tabs, tab, pda)
705
+ end
706
+
707
+ html = html.join("") # ???
708
+
709
+ html.gsub!(/%%*[[:alnum:]_\-]+%%*/, "") if not $rwd_debug
710
+ html.gsub!(/%%/, "%")
711
+ html.gsub!(/\n\n*/, "\n")
712
+
713
+ if oneormorefields.empty?
714
+ focus = ""
715
+ else
716
+ focus = "document.bodyform.elements[0].focus();"
717
+ end
718
+
719
+ firstaction = action if windowobject.args.keys.include?("refresh") unless action.nil?
720
+
721
+ html.gsub!(/\$RWD_FIRSTACTION\$/ , firstaction)
722
+ html.gsub!(/\$RWD_FOCUS\$/ , focus)
723
+
724
+ html
725
+ end
726
+
727
+ rescue
728
+ if $DEBUG
729
+ $stderr.puts "error in RWDWindow - render method"
730
+ end
731
+ end
732
+ end
733
+
734
+ class RWDMessage < RWDWindow
735
+ def initialize(msg)
736
+ super("<window title='RWD Message' nobackbuttons noclosebutton><p>#{msg}</p><back/></window>")
737
+ end
738
+ end
739
+
740
+ class RWDError < RWDWindow
741
+ def initialize(msg)
742
+ super("<window title='RWD Error' nobackbuttons noclosebutton><p><b>Error:</b> #{msg}</p><back/></window>")
743
+ end
744
+ end
745
+
746
+ class RWDProgressBar < RWDWindow
747
+ def initialize(refresh, progress)
748
+ s = ""
749
+ s << "<window title='RWD Progress' nobackbuttons noclosebutton refresh='#{refresh}'>"
750
+ if progress.length == 1
751
+ progress.each do |caption, value|
752
+ s << "<p>#{caption}</p><progressbar value='#{value}'/><p>#{(100*value).to_i}%%</p>"
753
+ end
754
+ else
755
+ s << "<table>"
756
+ progress.each do |caption, value|
757
+ s << "<row><p align='left'>#{caption}</p><progressbar value='#{value}'/><p align='right'>#{(100*value).to_i}%%</p></row>"
758
+ end
759
+ s << "</table>"
760
+ end
761
+ s << "<cancel/>"
762
+ s << "</window>"
763
+ super(s)
764
+ end
765
+ end
766
+
767
+ class RWDDone < RWDWindow
768
+ def initialize(exitbrowser)
769
+ super("<window title='RWD Message' nobackbuttons noclosebutton><p>Done.</p><i>(Some browsers don't close,<br>because of security reasons.)</i><horizontal><close/>#{exitbrowser ? "" : "<button caption='Again'/>"}</horizontal>#{exitbrowser ? "<closewindow/>" : ""}</window>")
770
+ end
771
+ end
772
+
773
+ class RWDialog
774
+
775
+ def initialize(xml)
776
+ @rwd_xml = $rwd_gui_tinker
777
+ # change from default ev - was xml
778
+ @rwd_exitbrowser = false
779
+ @rwd_history = []
780
+ @rwd_ignore_vars = []
781
+ @rwd_call_after_back = []
782
+ @rwd_time = Time.now
783
+
784
+ $rwd_appvars = {} if $rwd_appvars.nil?
785
+ XML.new(xml).parse(OpenTag, "application") do |type, obj|
786
+ obj.args.deep_dup.each do |k, v|
787
+ $rwd_appvars[k] = v
788
+ end
789
+ end
790
+ end
791
+
792
+ def self.file(rwdfile, *args)
793
+ new(File.new(rwdfile).readlines, *args)
794
+ end
795
+
796
+ def serve(port=nil, auth=nil, realm=self.class.to_s)
797
+ exit if $rwd_exit
798
+
799
+ raise "RWD is not initialized." if @rwd_xml.nil?
800
+
801
+ low, high = ENV["RWDPORTS"].split(/[^\d+]/)
802
+ high = low if high.nil?
803
+ low, high = low.to_i, high.to_i
804
+
805
+ io = nil
806
+
807
+ port, io = TCPServer.freeport(low, high, (not auth.nil?)) if port.nil?
808
+ raise "No free TCP port." if port.nil?
809
+
810
+ port = port.to_i
811
+
812
+ @rwd_server = RWDServer.new(self, port, io, auth, realm)
813
+
814
+ self
815
+ end
816
+
817
+ def render(res, path, post, download, downloadfile, pda, sessionid)
818
+ # Avoid a timeout.
819
+
820
+ @rwd_time = Time.now
821
+
822
+ # Initialize some vars.
823
+
824
+ vars = Hash.new if vars.nil?
825
+ @rwd_switches = Hash.new if @rwd_switches.nil?
826
+
827
+ done = false
828
+ help = false
829
+ back = false
830
+ tab = ""
831
+ @rwd_progress_thread = nil
832
+ @rwd_msgtype = nil if @rwd_progress_thread.nil?
833
+ @rwd_download = nil
834
+ @rwd_download_file = nil
835
+
836
+ # Switches are used for checkboxes.
837
+
838
+ @rwd_switches.each do |key, value|
839
+ vars[key] = "off"
840
+ end
841
+
842
+ @rwd_switches = Hash.new
843
+
844
+ # Copy the vars from the window to vars. vars wil later on be copied to instance variables.
845
+
846
+ post.sort.each do |key, value|
847
+ puts "Post: #{key} -> #{value.from_html.inspect}" if $rwd_debug
848
+
849
+ vars[key] = value.from_html
850
+ end
851
+
852
+ # Stack handling for rwd_action, rwd_window and rwd_tab.
853
+
854
+ @rwd_action = vars["rwd_action"] if vars.include?("rwd_action")
855
+ @rwd_action, @rwd_args = @rwd_action.split(/\//, 2) unless @rwd_action.nil?
856
+ @rwd_action, rest = @rwd_action.split(/\?/) unless @rwd_action.nil?
857
+
858
+ @rwd_refresh_action = (@rwd_action or @rwd_refresh_action or "main")
859
+
860
+ unless rest.nil?
861
+ rest.each do |s|
862
+ k, v = s.split(/=/, 2)
863
+ vars[k] = v
864
+ end
865
+ end
866
+
867
+ if @rwd_action == "rwd_cancel"
868
+ @rwd_progress_thread.kill unless @rwd_progress_thread.nil?
869
+ @rwd_progress_thread = nil
870
+ @rwd_action = "rwd_back"
871
+ end
872
+
873
+ @rwd_history = [["main", [], "main", ""]] if @rwd_history.empty?
874
+
875
+ if @rwd_action =~ /^rwd_tab_/
876
+ @rwd_tab = @rwd_action.sub(/^rwd_tab_/, "")
877
+ @rwd_history[-1][3] = @rwd_tab
878
+ else
879
+ case @rwd_action
880
+ when "rwd_back"
881
+ @rwd_history.pop
882
+ @rwd_action = (@rwd_history[-1] or [nil, nil, nil])[0]
883
+ @rwd_args = (@rwd_history[-1] or [nil, nil, nil])[1]
884
+ @rwd_window = (@rwd_history[-1] or [nil, nil, nil])[2]
885
+ @rwd_tab = (@rwd_history[-1] or [nil, nil, nil])[3]
886
+ back = true
887
+ when "rwd_help"
888
+ help = true
889
+ when "rwd_main"
890
+ @rwd_action = nil
891
+ @rwd_window = nil
892
+ @rwd_tab = nil
893
+ @rwd_history = []
894
+ when "rwd_quit"
895
+ done = true
896
+ else
897
+ end
898
+
899
+ # History stuff
900
+
901
+ @rwd_history = @rwd_history[-100..-1] if @rwd_history.length >= 100
902
+ @rwd_action = "main" if @rwd_action.nil?
903
+ @rwd_action = "main" if @rwd_action.empty?
904
+ @rwd_window = "main" if @rwd_window.nil?
905
+ @rwd_window = "main" if @rwd_window.empty?
906
+ @rwd_tab = "" if @rwd_tab.nil?
907
+ @rwd_args = [] if @rwd_args.nil?
908
+ @rwd_args = [] if @rwd_action == "main"
909
+
910
+ vars["rwd_action"] = @rwd_action
911
+ vars["rwd_window"] = @rwd_window
912
+ vars["rwd_tab"] = @rwd_tab
913
+
914
+ # Copy vars from window to instance.
915
+
916
+ vars.each do |k, v|
917
+ instance_eval "@#{k} = vars['#{k}']" if ((not k.empty?) and k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}"))
918
+ end
919
+
920
+ # Callback.
921
+
922
+ if (not back) or @rwd_call_after_back.include?(@rwd_action)
923
+ unless @rwd_action =~ /^rwd_/
924
+ puts "Method: #{@rwd_action}(#{@rwd_args.join(", ")})" if $rwd_debug
925
+ if methods.include?(@rwd_action)
926
+ method(@rwd_action).call(*@rwd_args)
927
+ else
928
+ puts "Method '%s' is not defined." % @rwd_action
929
+ end
930
+ end
931
+
932
+ # History stuff
933
+
934
+ @rwd_history = [["main", [], "main", ""]] if @rwd_action == "main"
935
+ @rwd_history = [["main", [], "main", ""]] if @rwd_history.empty?
936
+
937
+ a = [@rwd_action, @rwd_args, @rwd_window, @rwd_tab]
938
+
939
+ @rwd_history.push a if (@rwd_history[-1] != a or not @rwd_msgtype.nil?)
940
+
941
+ if @rwd_window == "rwd_back"
942
+ @rwd_history.pop
943
+ @rwd_history.pop
944
+ @rwd_action = (@rwd_history[-1] or [nil, nil, nil])[0]
945
+ @rwd_args = (@rwd_history[-1] or [nil, nil, nil])[1]
946
+ @rwd_window = (@rwd_history[-1] or [nil, nil, nil])[2]
947
+ @rwd_tab = (@rwd_history[-1] or [nil, nil, nil])[3]
948
+ end
949
+ end
950
+ end
951
+
952
+ # Copy vars from instance to window.
953
+
954
+ instance_variables.each do |k|
955
+ k.sub!(/^@/, "")
956
+ instance_eval "vars['#{k}'] = @#{k}.to_s" if (k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}"))
957
+ end
958
+
959
+ # just ignore.
960
+
961
+ vars.sort.each do |key, value|
962
+ puts "Pre: #{key} -> #{value.inspect}" if $rwd_debug
963
+ end
964
+
965
+
966
+ # Answer to browser.
967
+
968
+ if done
969
+ res << RWDDone.new(@rwd_exitbrowser).render(pda)
970
+ else
971
+ if not @rwd_download.nil?
972
+ puts "Download: #{@rwd_window}" if $rwd_debug
973
+
974
+ download << @rwd_download
975
+ downloadfile << @rwd_download_file
976
+ else
977
+ if not @rwd_progress_thread.nil?
978
+ res << RWDProgressBar.new(@rwd_progress_refresh, @rwd_progress_progress).render(pda, @rwd_refresh_action)
979
+ else
980
+ if not @rwd_msgtype.nil?
981
+ res << RWDMessage.new(@rwd_msg).render(pda) if @rwd_msgtype == "message"
982
+ res << RWDError.new(@rwd_msg).render(pda) if @rwd_msgtype == "error"
983
+ res << @rwd_msg if @rwd_msgtype == "text"
984
+ else
985
+ puts "Window: #{@rwd_window}" if $rwd_debug
986
+ puts "Tab: #{@rwd_tab}" if $rwd_debug
987
+
988
+ begin # error block
989
+ if @rwd_window.empty?
990
+ @rwd_window = "main"
991
+ end
992
+ res << RWDWindow.new($rwd_gui_tinker, @rwd_window).render(pda, @rwd_refresh_action, vars, @rwd_switches, help, @rwd_tab)
993
+ rescue
994
+ if $DEBUG
995
+ $stderr.puts "error in render"
996
+ end
997
+ end
998
+ end
999
+ end
1000
+ end
1001
+ end
1002
+
1003
+ return done
1004
+ end
1005
+
1006
+ def samewindow?
1007
+ @rwd_history[-1][2] == @rwd_window
1008
+ end
1009
+
1010
+ def message(msg, &block)
1011
+ @rwd_msg = msg
1012
+ @rwd_msgtype = "message"
1013
+ end
1014
+
1015
+ def error(msg, &block)
1016
+ @rwd_msg = msg
1017
+ @rwd_msgtype = "error"
1018
+ end
1019
+
1020
+ def text(msg)
1021
+ @rwd_msg = "<html><body><pre>#{msg}</pre></body></html>"
1022
+ @rwd_msgtype = "text"
1023
+ end
1024
+
1025
+ def progressbar(refresh, *progress)
1026
+ @rwd_progress_refresh = (refresh or 1)
1027
+ @rwd_progress_progress = []
1028
+
1029
+ while not progress.empty?
1030
+ s = (progress.shift or "")
1031
+ if s.kind_of?(Array)
1032
+ caption, value = s
1033
+ value = (value or 0.0).to_f
1034
+ else
1035
+ caption = s
1036
+ value = (progress.shift or 0.0).to_f
1037
+ end
1038
+
1039
+ @rwd_progress_progress << [caption, value]
1040
+ end
1041
+
1042
+ if @rwd_progress_thread.nil?
1043
+ @rwd_progress_progress.each do |a|
1044
+ a[1] = 0.0
1045
+ end
1046
+
1047
+ @rwd_progress_thread =
1048
+ Thread.new do
1049
+ yield
1050
+ end
1051
+ Thread.pass
1052
+ end
1053
+
1054
+ @rwd_progress_thread = nil unless @rwd_progress_thread.alive?
1055
+ end
1056
+
1057
+ def download(data, filename="")
1058
+ @rwd_download = data
1059
+ @rwd_download_file = filename
1060
+ end
1061
+
1062
+ def exitbrowser
1063
+ @rwd_exitbrowser = true
1064
+ end
1065
+
1066
+ def timeout(timeout, interval=1)
1067
+ @rwd_timeout = timeout
1068
+
1069
+ unless @rwd_timeout_thread
1070
+ @rwd_timeout_thread =
1071
+ Thread.new do
1072
+ loop do
1073
+ if Time.now - @rwd_time > @rwd_timeout
1074
+ $stderr.puts "Exiting due to timeout (#{@rwd_timeout} seconds)."
1075
+ exit 1
1076
+ end
1077
+ sleep interval
1078
+ end
1079
+ end
1080
+ end
1081
+ end
1082
+ end
1083
+
1084
+ class RWDLogin < RWDialog
1085
+ def initialize(realm)
1086
+ super("<window name='main' title='RWD Login for #{realm}' nobackbuttons noclosebutton><table><row><p align='right'>Username:</p><text name='rwd_a'/></row><row><p align='right'>Password:</p><password name='rwd_b'/></row></table><button caption='Login'/></window>")
1087
+ end
1088
+ end
1089
+
1090
+ class RWDTimeOut < RWDialog
1091
+ def initialize
1092
+ super("<window name='main' title='RWD Error' nobackbuttons noclosebutton><p><b>Error:</b> Session has expired.</p><button caption='New session'/></window>")
1093
+ end
1094
+ end
1095
+
1096
+ class SessionCleanup
1097
+ def initialize(sessions, interval, timeout)
1098
+ every(interval) do
1099
+ sessions.delete_if do |id, session|
1100
+ time = Time.now.to_i - session.lastaccess.to_i
1101
+
1102
+ puts "Session %s deleted" % id if time > timeout
1103
+
1104
+ time > timeout
1105
+ end
1106
+ end
1107
+ end
1108
+ end
1109
+
1110
+ class Sessions
1111
+ def initialize(rack, cleanup)
1112
+ @rack = rack.to_s
1113
+ @cleanup = SessionCleanup.new(self, 3600, 24*3600) if cleanup
1114
+ @sessions = {}
1115
+ end
1116
+
1117
+ def [](sessionid)
1118
+ @sessions[sessionid]
1119
+ end
1120
+
1121
+ def []=(sessionid, value)
1122
+ @sessions[sessionid] = value
1123
+ end
1124
+
1125
+ def delete(sessionid)
1126
+ @sessions.delete(sessionid)
1127
+ end
1128
+
1129
+ def delete_if(&block)
1130
+ @sessions.delete_if{|k, v| block.call(k, v)}
1131
+ end
1132
+
1133
+ def include?(sessionid)
1134
+ @sessions.include?(sessionid)
1135
+ end
1136
+ end
1137
+
1138
+ class RWDSession < Hash
1139
+ attr_reader :sessionid
1140
+ attr_reader :lastaccess
1141
+ attr_reader :authenticated
1142
+ attr_writer :authenticated
1143
+
1144
+ def initialize(sessionid=nil)
1145
+ @sessionid = sessionid
1146
+ @lastaccess = Time.now
1147
+ @authenticated = false
1148
+ end
1149
+
1150
+ def touch
1151
+ @lastaccess = Time.now
1152
+ end
1153
+
1154
+ def render(res, path, post, download, downloadfile, pda)
1155
+ done = self["object"].render(res, path, post, download, downloadfile, pda, @sessionid)
1156
+
1157
+ res.gsub!(/\$RWD_SESSION\$/, done ? "" : "#{@sessionid}")
1158
+
1159
+ return done
1160
+ end
1161
+ end
1162
+
1163
+ class RWDServer
1164
+ def initialize(obj, port, io, auth, realm)
1165
+ @object = obj
1166
+ @localbrowsing = false
1167
+ @browserstarted = false
1168
+ @sessions = Sessions.new(obj.class, (not auth.nil?))
1169
+
1170
+ if auth.nil?
1171
+ @localbrowsing = true
1172
+
1173
+ if ENV.include?("RWDBROWSER") and not ENV["RWDBROWSER"].nil? and not ENV["RWDBROWSER"].empty?
1174
+ @browserstarted = true
1175
+ @object.exitbrowser
1176
+
1177
+ # Start browser.
1178
+
1179
+ @browserthread =
1180
+ Thread.new do
1181
+ puts "Starting the browser..."
1182
+
1183
+ #if ENV["RWDBROWSER"].downcase =~ /iexplore/ # ???
1184
+ #@ie = IE.new("http://localhost:#{port}/")
1185
+ #else
1186
+ browser = ENV["RWDBROWSER"].dup
1187
+ url = "http://localhost:%s/" % [port]
1188
+
1189
+ re = /[$%]1\b/
1190
+ command = "%s \"%s\"" % [browser, url]
1191
+ command = browser.gsub(re, url) if browser =~ re
1192
+
1193
+ command.gsub!(/%port%/, port.to_s)
1194
+
1195
+ system(command) or $stderr.puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
1196
+ #end
1197
+
1198
+ puts "The browser has terminated."
1199
+ end
1200
+ end
1201
+ end
1202
+
1203
+ # Start server.
1204
+
1205
+ portio = port
1206
+ portio = [port, io] unless io.nil?
1207
+ threadlimiter = ThreadLimiter.new(1)
1208
+
1209
+ HTTPServer.serve(portio, (not auth.nil?)) do |req, resp|
1210
+ threadlimiter.wait do
1211
+ vars = {}
1212
+ req.vars.each do |k, v|
1213
+ vars[k] = v.join("\t")
1214
+ end
1215
+ pad = (req.request.path or "/")
1216
+
1217
+ if auth.kind_of? String
1218
+ file = "#{home}/#{auth}"
1219
+ auths = {}
1220
+ auths = Hash.file(file) if File.file?(file)
1221
+ else
1222
+ auths = auth
1223
+ end
1224
+
1225
+ #oldsessionid = vars["rwd_session"]
1226
+ oldsessionid = req.cookies["sessionid"]
1227
+
1228
+ # Retrieve session.
1229
+
1230
+ session = @sessions[oldsessionid]
1231
+
1232
+ # Eventually create new session.
1233
+
1234
+ if session.nil?
1235
+ sessionid = MD5.new(req.peeraddr[3].to_s + @object.inspect.to_s + ("%1.6f" % Time.now.to_f)).to_s while (sessionid == nil or @sessions.include?(sessionid))
1236
+ session = RWDSession.new(sessionid)
1237
+
1238
+ if auth.nil?
1239
+ session["object"] = @object
1240
+ else
1241
+ session["object"] = @object.clone
1242
+ end
1243
+
1244
+ if oldsessionid.nil? or oldsessionid.empty?
1245
+ if not auth.nil? and not auth.empty? and not session.authenticated and pad !~ /^\/rwd_/
1246
+
1247
+ # Check authentication
1248
+
1249
+ us = vars["rwd_a"]
1250
+ pa = vars["rwd_b"]
1251
+
1252
+ if us.nil? or pa.nil? or auths[us] != pa
1253
+ session = RWDSession.new
1254
+ session["object"] = RWDLogin.new(realm)
1255
+ pad = "/"
1256
+ else
1257
+ session.authenticated = true
1258
+ @sessions[session.sessionid] = session
1259
+ end
1260
+ else
1261
+ session.authenticated = true
1262
+ @sessions[session.sessionid] = session
1263
+ end
1264
+ else
1265
+ session = RWDSession.new
1266
+ session["object"] = RWDTimeOut.new
1267
+ end
1268
+
1269
+ vars = {}
1270
+ end
1271
+
1272
+ # Avoid timeout.
1273
+
1274
+ session.touch
1275
+
1276
+ if pad == "/"
1277
+
1278
+ # Serve methods/callbacks.
1279
+
1280
+ # Build new page.
1281
+
1282
+ download = ""
1283
+ downloadfile = ""
1284
+ res = ""
1285
+
1286
+ done = session.render(res, pad, vars, download, downloadfile, req.pda?)
1287
+
1288
+ begin
1289
+ if download.empty?
1290
+ resp["Content-Type"] = "text/html"
1291
+ if done
1292
+ resp.cookies["sessionid"] = ""
1293
+ else
1294
+ resp.cookies["sessionid"] = session.sessionid
1295
+ end
1296
+
1297
+ resp << res
1298
+ else
1299
+ resp["Content-Type"] = "application/octet-stream"
1300
+ resp["Content-Disposition"] = "attachment;"
1301
+ resp["Content-Disposition"] = "attachment; filename=%s" % downloadfile unless downloadfile.empty?
1302
+
1303
+ resp << download
1304
+ end
1305
+ rescue
1306
+ puts "Sending response to browser failed."
1307
+
1308
+ @sessions.delete(session.sessionid)
1309
+ end
1310
+
1311
+ # Eventually delete this session.
1312
+
1313
+ if done
1314
+ @sessions.delete(session.sessionid)
1315
+
1316
+ if @localbrowsing
1317
+ resp.stop
1318
+
1319
+ if @browserstarted and not @browserthread.nil? and @browserthread.alive?
1320
+ resp.stop do
1321
+ puts "Waiting for the browser to terminate..."
1322
+
1323
+ @browserthread.join
1324
+ end
1325
+ end
1326
+ end
1327
+ end
1328
+
1329
+ else
1330
+
1331
+ # Serve files.
1332
+
1333
+ if pad == "/rwd_pixel.gif"
1334
+ resp["Cache-Control"] = "max-age=86400"
1335
+ resp["Content-Type"] = "image/gif"
1336
+ resp << $rwd_pixel
1337
+ else
1338
+ if session.authenticated
1339
+ pwd = Dir.pwd
1340
+ file = File.expand_path(pad.gsub(/^\/*/, ""), $rwd_files)
1341
+
1342
+ if not file.index(pwd) == 0
1343
+ resp["Content-Type"] = "text/html"
1344
+ resp.response = "HTTP/1.0 400 BAD REQUEST"
1345
+ resp << "<html><body><p><b>Bad Request.</b> (<tt>#{pad}</tt>)</p></body></html>"
1346
+ elsif File.file?(file)
1347
+ resp << File.new(file, "rb").read rescue nil
1348
+ else
1349
+ resp["Content-Type"] = "text/html"
1350
+ resp.response = "HTTP/1.0 404 NOT FOUND"
1351
+ resp << "<html><body><p><b>Not found.</b> (<tt>#{pad}</tt>)</p></body></html>"
1352
+ end
1353
+ else
1354
+ resp["Content-Type"] = "text/html"
1355
+ resp.response = "HTTP/1.0 ??? NOT AUTHORIZED"
1356
+ resp << "<html><body><p><b>Not Authorized.</b></p></body></html>"
1357
+ end
1358
+ end
1359
+
1360
+ end
1361
+
1362
+ end
1363
+ end
1364
+ end
1365
+ end
1366
+
1367
+ $rwd_html["DEFAULT"] = "
1368
+ <!-- Generated by RubyWebDialog. -->
1369
+ <!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
1370
+ <html>
1371
+ <head>
1372
+ <title>%TITLE%</title>
1373
+
1374
+ <meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
1375
+ <meta http-equiv='Content-Style-Type' content='text/html ; charset=UTF-8'>
1376
+ <meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
1377
+
1378
+ <link rel='shortcut icon' href='%LOGO%'>
1379
+
1380
+ <style type='text/css'>
1381
+ <!--
1382
+
1383
+ body {
1384
+ background : url(%WATERMARK%) white center center no-repeat fixed;
1385
+ }
1386
+
1387
+ a {
1388
+ text-decoration : none;
1389
+ }
1390
+
1391
+ a:hover {
1392
+ background : #AAAAAA;
1393
+ }
1394
+
1395
+ td.panel1 {
1396
+ border-color : #888888 #EEEEEE #EEEEEE #888888;
1397
+ border-width : 1pt;
1398
+ border-style : solid solid solid solid;
1399
+ }
1400
+
1401
+ td.panel2 {
1402
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1403
+ border-width : 1pt;
1404
+ border-style : solid solid solid solid;
1405
+ }
1406
+
1407
+ td.panel1high {
1408
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1409
+ border-width : 1pt;
1410
+ border-style : solid solid solid solid;
1411
+ }
1412
+
1413
+ td.panel2high {
1414
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1415
+ border-width : 1pt;
1416
+ border-style : none none none none;
1417
+ }
1418
+
1419
+ td.panel1low {
1420
+ border-color : #888888 #EEEEEE #EEEEEE #888888;
1421
+ border-width : 1pt;
1422
+ border-style : solid solid solid solid;
1423
+ }
1424
+
1425
+ td.panel2low {
1426
+ border-color : #888888 #EEEEEE #EEEEEE #888888;
1427
+ border-width : 1pt;
1428
+ border-style : none none none none;
1429
+ }
1430
+
1431
+ td.tabblad {
1432
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1433
+ border-width : 1pt;
1434
+ border-style : none solid solid solid;
1435
+ }
1436
+
1437
+ td.passivetab {
1438
+ background-color : #BBBBBB;
1439
+ border-color : #DDDDDD #DDDDDD #EEEEEE #DDDDDD;
1440
+ border-width : 1pt;
1441
+ border-style : solid solid solid solid;
1442
+ }
1443
+
1444
+ td.activetab {
1445
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1446
+ border-width : 1pt;
1447
+ border-style : solid solid none solid;
1448
+ }
1449
+
1450
+ td.notab {
1451
+ border-color : #EEEEEE #EEEEEE #EEEEEE #EEEEEE;
1452
+ border-width : 1pt;
1453
+ border-style : none none solid none;
1454
+ }
1455
+
1456
+ //-->
1457
+ </style>
1458
+
1459
+ <script type='text/javascript'>
1460
+ <!--
1461
+ function BodyGo() {
1462
+ $RWD_FOCUS$
1463
+ }
1464
+ //-->
1465
+ </script>
1466
+ </head>
1467
+
1468
+ <body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
1469
+ <form name='bodyform' action='/' method='post'>
1470
+ <table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
1471
+ <tr align='center' valign='middle'>
1472
+ <td align='center'>
1473
+
1474
+ <table align='center' border='0' cellspacing='0' cellpadding='0'>
1475
+
1476
+ <tr align='center'>
1477
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1478
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1479
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1480
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1481
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1482
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1483
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1484
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1485
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1486
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1487
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1488
+ </tr>
1489
+
1490
+ <tr align='center'>
1491
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1492
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1493
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1494
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1495
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1496
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1497
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1498
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1499
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1500
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1501
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1502
+ </tr>
1503
+
1504
+ <tr align='center'>
1505
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1506
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1507
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1508
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1509
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1510
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1511
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1512
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1513
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1514
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1515
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1516
+ </tr>
1517
+
1518
+ <tr align='center'>
1519
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1520
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1521
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1522
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1523
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1524
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1525
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1526
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1527
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1528
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1529
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1530
+ </tr>
1531
+
1532
+ <tr align='center'>
1533
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1534
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1535
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1536
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1537
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1538
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1539
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1540
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1541
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1542
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1543
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1544
+ </tr>
1545
+
1546
+ <tr align='center'>
1547
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1548
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1549
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1550
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1551
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1552
+
1553
+ <td align='center'>
1554
+
1555
+ <table align='center' border='0' cellspacing='0' cellpadding='0' %WIDTH1%>
1556
+ <tr align='center'>
1557
+ <td align='center' bgcolor='#444488'>
1558
+
1559
+ <table align='left' border='0' cellspacing='1' cellpadding='0'>
1560
+ <tr align='center'>
1561
+ <td align='border'><img src='%LOGO%' width='14' height='14'></td>
1562
+ <td align='center'><b><small><font color='#FFFFFF'>&nbsp;%TITLE%&nbsp;</font></small></b></td>
1563
+ </tr>
1564
+ </table>
1565
+
1566
+ <table align='right' border='0' cellspacing='1' cellpadding='0'>
1567
+ <tr align='center'>
1568
+ <!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'>&nbsp;?&nbsp;</a></small></b></td>
1569
+ <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'>&nbsp;&lt;&lt;&nbsp;</a></small></b></td>
1570
+ <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'>&nbsp;&lt;&nbsp;</a></small></b></td>
1571
+ <!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'>&nbsp;X&nbsp;</a></small></b></td>
1572
+ </tr>
1573
+ </table>
1574
+
1575
+ </td>
1576
+ </tr>
1577
+
1578
+ <tr align='center'>
1579
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='%WIDTH2%'></td>
1580
+ </tr>
1581
+
1582
+ <tr align='center'>
1583
+ <td align='center' bgcolor='#CCCCCC'>
1584
+ <table align='center' border='0' cellspacing='3' cellpadding='0'>
1585
+ %BODY%
1586
+ </table>
1587
+
1588
+ <input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
1589
+ <input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
1590
+ </td>
1591
+ </tr>
1592
+ </table>
1593
+
1594
+ </td>
1595
+
1596
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1597
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1598
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1599
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1600
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1601
+ </tr>
1602
+
1603
+ <tr align='center'>
1604
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1605
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1606
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1607
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1608
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1609
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1610
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1611
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1612
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1613
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1614
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1615
+ </tr>
1616
+
1617
+ <tr align='center'>
1618
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1619
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1620
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1621
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1622
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1623
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1624
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1625
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1626
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1627
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1628
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1629
+ </tr>
1630
+
1631
+ <tr align='center'>
1632
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1633
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1634
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1635
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1636
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1637
+ <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td>
1638
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1639
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1640
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1641
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1642
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1643
+ </tr>
1644
+
1645
+ <tr align='center'>
1646
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1647
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1648
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1649
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1650
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1651
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1652
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td>
1653
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1654
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1655
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1656
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1657
+ </tr>
1658
+
1659
+ <tr align='center'>
1660
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1661
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1662
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1663
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1664
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1665
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1666
+ <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td>
1667
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1668
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1669
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1670
+ <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td>
1671
+ </tr>
1672
+
1673
+ </table>
1674
+
1675
+ </td>
1676
+ </tr>
1677
+ </table>
1678
+ </form>
1679
+ </body>
1680
+ </html>
1681
+ "
1682
+
1683
+ $rwd_html["WINDOWSLOOKALIKE"] = "
1684
+ <!-- Generated by RubyWebDialog. -->
1685
+ <!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
1686
+ <html>
1687
+ <head>
1688
+ <title>%TITLE%</title>
1689
+
1690
+ <meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
1691
+ <meta http-equiv='Content-Style-Type' content='text/css; charset=UTF-8' >
1692
+ <meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
1693
+
1694
+ <link rel='shortcut icon' href='%LOGO%'>
1695
+
1696
+ <style type='text/css'>
1697
+ <!--
1698
+
1699
+ body {
1700
+ background : url(%WATERMARK%) white center center no-repeat fixed;
1701
+ }
1702
+
1703
+ a {
1704
+ text-decoration : none;
1705
+ }
1706
+
1707
+ a:hover {
1708
+ background : #AAAAAA;
1709
+ }
1710
+
1711
+ td.window {
1712
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1713
+ border-width : 3pt;
1714
+ border-style : solid solid solid solid;
1715
+ }
1716
+
1717
+ td.panel1 {
1718
+ border-color : #888888 #EEEEEE #EEEEEE #888888;
1719
+ border-width : 1pt;
1720
+ border-style : solid solid solid solid;
1721
+ }
1722
+
1723
+ td.panel2 {
1724
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1725
+ border-width : 1pt;
1726
+ border-style : solid solid solid solid;
1727
+ }
1728
+
1729
+ td.panel1high {
1730
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1731
+ border-width : 1pt;
1732
+ border-style : solid solid solid solid;
1733
+ }
1734
+
1735
+ td.panel2high {
1736
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1737
+ border-width : 1pt;
1738
+ border-style : none none none none;
1739
+ }
1740
+
1741
+ td.panel1low {
1742
+ border-color : #888888 #EEEEEE #EEEEEE #888888;
1743
+ border-width : 1pt;
1744
+ border-style : solid solid solid solid;
1745
+ }
1746
+
1747
+ td.panel2low {
1748
+ border-color : #888888 #EEEEEE #EEEEEE #888888;
1749
+ border-width : 1pt;
1750
+ border-style : none none none none;
1751
+ }
1752
+
1753
+ td.tabblad {
1754
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1755
+ border-width : 1pt;
1756
+ border-style : none solid solid solid;
1757
+ }
1758
+
1759
+ td.passivetab {
1760
+ background-color : #BBBBBB;
1761
+ border-color : #DDDDDD #DDDDDD #EEEEEE #DDDDDD;
1762
+ border-width : 1pt;
1763
+ border-style : solid solid solid solid;
1764
+ }
1765
+
1766
+ td.activetab {
1767
+ border-color : #EEEEEE #888888 #888888 #EEEEEE;
1768
+ border-width : 1pt;
1769
+ border-style : solid solid none solid;
1770
+ }
1771
+
1772
+ td.notab {
1773
+ border-color : #EEEEEE #EEEEEE #EEEEEE #EEEEEE;
1774
+ border-width : 1pt;
1775
+ border-style : none none solid none;
1776
+ }
1777
+
1778
+ //-->
1779
+ </style>
1780
+
1781
+ <script type='text/javascript'>
1782
+ <!--
1783
+ function BodyGo() {
1784
+ $RWD_FOCUS$
1785
+ }
1786
+ //-->
1787
+ </script>
1788
+ </head>
1789
+
1790
+ <body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
1791
+ <form name='bodyform' action='/' method='post'>
1792
+ <table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
1793
+ <tr align='center' valign='middle'>
1794
+ <td align='center'>
1795
+
1796
+ <table align='center' border='0' cellspacing='0' cellpadding='0'>
1797
+
1798
+ <tr align='center'>
1799
+ <td align='center' class='window'>
1800
+
1801
+ <table align='center' border='0' cellspacing='0' cellpadding='0' %WIDTH1%>
1802
+ <tr align='center'>
1803
+ <td align='center' bgcolor='#444488'>
1804
+
1805
+ <table align='left' border='0' cellspacing='1' cellpadding='0'>
1806
+ <tr align='center'>
1807
+ <td align='border'><img src='%LOGO%' width='14' height='14'></td>
1808
+ <td align='center'><b><small><font color='#FFFFFF'>&nbsp;%TITLE%&nbsp;</font></small></b></td>
1809
+ </tr>
1810
+ </table>
1811
+
1812
+ <table align='right' border='0' cellspacing='1' cellpadding='0'>
1813
+ <tr align='center'>
1814
+ <!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'>&nbsp;?&nbsp;</a></small></b></td>
1815
+ <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'>&nbsp;&lt;&lt;&nbsp;</a></small></b></td>
1816
+ <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'>&nbsp;&lt;&nbsp;</a></small></b></td>
1817
+ <!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'>&nbsp;X&nbsp;</a></small></b></td>
1818
+ </tr>
1819
+ </table>
1820
+
1821
+ </td>
1822
+ </tr>
1823
+
1824
+ <tr align='center'>
1825
+ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='%WIDTH2%'></td>
1826
+ </tr>
1827
+
1828
+ <tr align='center'>
1829
+ <td align='center' bgcolor='#CCCCCC'>
1830
+ <table align='center' border='0' cellspacing='3' cellpadding='0'>
1831
+ %BODY%
1832
+ </table>
1833
+
1834
+ <input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
1835
+ <input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
1836
+ </td>
1837
+ </tr>
1838
+ </table>
1839
+
1840
+ </td>
1841
+ </tr>
1842
+
1843
+ </table>
1844
+
1845
+ </td>
1846
+ </tr>
1847
+ </table>
1848
+ </form>
1849
+ </body>
1850
+ </html>
1851
+ "
1852
+
1853
+ $rwd_html["PDA"] = "
1854
+ <!-- Generated by RubyWebDialog. -->
1855
+ <!-- For more information, please contact Erik Veenstra <rwd@erikveen.dds.nl>. -->
1856
+ <html>
1857
+ <head>
1858
+ <title>%TITLE%</title>
1859
+
1860
+ <meta http-equiv='Content-Type' content='text/html; charset=%CHARSET%'>
1861
+ <meta http-equiv='Refresh' content='%REFRESH%, javascript:document.bodyform.submit();'>
1862
+
1863
+ <link rel='shortcut icon' href='%LOGO%'>
1864
+
1865
+ <script type='text/javascript'>
1866
+ <!--
1867
+ function BodyGo() {
1868
+ $RWD_FOCUS$
1869
+ }
1870
+ //-->
1871
+ </script>
1872
+ </head>
1873
+
1874
+ <body bgcolor='white' onload='BodyGo()' link='#000000' vlink='#000000' alink='#000000'>
1875
+ <form name='bodyform' action='/' method='post'>
1876
+ <table align='center' border='0' cellspacing='0' cellpadding='0' width='100%' height='100%'>
1877
+
1878
+ <tr align='center'>
1879
+ <td align='center' bgcolor='#444488'>
1880
+
1881
+ <table align='left' border='0' cellspacing='1' cellpadding='0'>
1882
+ <tr align='center'>
1883
+ <td align='border'><img src='%LOGO%' width='14' height='14'></td>
1884
+ <td align='center'><b><small><font color='#FFFFFF'>&nbsp;%TITLE%&nbsp;</font></small></b></td>
1885
+ </tr>
1886
+ </table>
1887
+
1888
+ <table align='right' border='0' cellspacing='1' cellpadding='0'>
1889
+ <tr align='center'>
1890
+ <!-- %HELPBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_help\";document.bodyform.submit();'>&nbsp;?&nbsp;</a></small></b></td>
1891
+ <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_main\";document.bodyform.submit();'>&nbsp;&lt;&lt;&nbsp;</a></small></b></td>
1892
+ <!-- %BACKBUTTONS% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_back\";document.bodyform.submit();'>&nbsp;&lt;&nbsp;</a></small></b></td>
1893
+ <!-- %CLOSEBUTTON% --><td align='center' bgcolor='#EEEEEE'><b><small><a href='javascript:document.bodyform.rwd_action.value=\"rwd_quit\";document.bodyform.submit();'>&nbsp;X&nbsp;</a></small></b></td>
1894
+ </tr>
1895
+ </table>
1896
+
1897
+ </td>
1898
+ </tr>
1899
+
1900
+ <!--
1901
+ <tr align='center'>
1902
+ <td align='center' bgcolor='#FFFFFF'>&nbsp;</td>
1903
+ </tr>
1904
+ -->
1905
+
1906
+ <tr align='center'>
1907
+ <td align='center' bgcolor='#FFFFFF'>
1908
+
1909
+ <table align='center' border='0' cellspacing='0' cellpadding='0'>
1910
+ %BODY%
1911
+ </table>
1912
+
1913
+ <input name='rwd_action' value='$RWD_FIRSTACTION$' type='hidden'>
1914
+ <input name='rwd_session' value='$RWD_SESSION$' type='hidden'>
1915
+ </td>
1916
+ </tr>
1917
+
1918
+ </table>
1919
+ </form>
1920
+ </body>
1921
+ </html>
1922
+ "
1923
+
1924
+ $rwd_pixel = "
1925
+ R0lGODlhAQABAMIAAAAAAP///+7u7kREiP///////////////yH5BAEKAAMA
1926
+ LAAAAAABAAEAAAMCOAkAOw==
1927
+ ".unpack("m").shift
1928
+
1929
+ $rwd_logo = "
1930
+ R0lGODlhEAAQAMIAAAAAAP///+7u7kREiP///////////////yH5BAEKAAQA
1931
+ LAAAAAAQABAAAANCSErQ/k21QKulrIrNu8heuAGUcJ0BuQVD676DasK0zNKv
1932
+ jefB+oo6l6AxBAx7M2HRePQph5xga0RsJqfELPI2DSUAADs=
1933
+ ".unpack("m").shift
1934
+
1935
+
1936
+ $rwd_html_1, $rwd_html_2 = $rwd_html[ENV["RWDTHEME"]].split(/^\s*%BODY%\s*\r*$/)
1937
+ $rwd_html_PDA_1, $rwd_html_PDA_2 = $rwd_html["PDA"].split(/^\s*%BODY%\s*\r*$/)
1938
+
1939
+ #end
1940
+ #
1941
+ #class RWDialog < RWD::RWDialog
1942
+ #end