ev/rwd.rb in rwdtinker-1.67 vs ev/rwd.rb in rwdtinker-1.68

- old
+ new

@@ -13,10 +13,11 @@ $".push "win32ole.so" $".push "win32/registry.rb" end $rwd_exit = ARGV.include?("--rwd-exit") # Hack ??? +$rwd_exit = true if defined?(REQUIRE2LIB) $rwd_debug = ($rwd_debug or $DEBUG or false) $rwd_border = ($rwd_border or 0) $rwd_dir = Dir.pwd $rwd_files = File.expand_path("rwd_files", Dir.pwd) $rwd_html = {} @@ -25,14 +26,16 @@ arg =~ /^--rwd-/ end RWDEmptyline = "..." +#module RWD + rcfile = nil -s = ENV["HOME"] ; s = s + "/.rwdrc" if not s.nil? ; rcfile = s if (not s.nil? and rcfile.nil? and File.file?(s)) -s = ENV["USERPROFILE"] ; s = s + "/rwd.cfg" if not s.nil? ; rcfile = s if (not s.nil? and rcfile.nil? and File.file?(s)) -s = ENV["windir"] ; s = s + "/rwd.cfg" if not s.nil? ; rcfile = s if (not s.nil? and rcfile.nil? and File.file?(s)) +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)) +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)) +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)) AL = "align='left'" AC = "align='center'" AR = "align='right'" VA = "valign='middle'" @@ -49,13 +52,13 @@ ENV["RWDBROWSER"] = (ENV["RWDBROWSER"] or defaultbrowser) or puts "No browser found." ENV["RWDPORTS"] = (ENV["RWDPORTS"] or "7701-7709") ENV["RWDTHEME"] = (ENV["RWDTHEME"] or "DEFAULT") -trap("INT") {puts "Terminating..." ; exit} +#trap("INT") {puts "Terminating..." ; exit} -$SAFE = 2 +$SAFE = 0 class IE def initialize(url) @ie = WIN32OLE.new("InternetExplorer.Application") @ev = WIN32OLE_EVENT.new(@ie, "DWebBrowserEvents2") @@ -91,11 +94,11 @@ a = self else a = [emptyline].concat(self) end - a.numsort.collect{|s| "<option>#{s.to_html}</option>" }.join("\n") + a.numsort.collect{|s| "<option>#{s.to_s.to_html}</option>" }.join("\n") end def rwd_method(method) res = "" @@ -107,21 +110,36 @@ end return res end - def rwd_row(key=nil, value=nil) + def rwd_row(key=nil, value=nil, bold=false) res = "" res = res + "<row valign='top'>" res = res + "<radio name='#{key.to_html}' value='#{value.to_html}'/>" unless key.nil? - res = res + self.collect{|s| "<p align='left'>#{s.to_html}</p>"}.join("") + 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("") res = res + "</row>" return res end + def rwd_table(headers=nil, highlightrows=[]) + res = "" + + highlightrows = [highlightrows].flatten + + n = -1 + + res = res + "<table>" + res = res + headers.rwd_row(nil, nil, true) unless headers.nil? + res = res + self.collect{|a| a.rwd_row(nil, nil, highlightrows.include?(n+=1))}.join("") + res = res + "</table>" + + return res + end + def rwd_headers(emptyfield=false) res = "" res = res + "<row>" res = res + "<p/>" if emptyfield @@ -129,11 +147,11 @@ res = res + "</row>" return res end - def rwd_form(prefix, values, twoparts=0, options={}) + def rwd_form(prefix, values=[], twoparts=0, options={}) res = [] res << "<table>" self.each_index do |n| name = "#{prefix.to_html}#{self[n].downcase.to_html}" @@ -149,11 +167,11 @@ res << "</select>" else s = "" s << "<text name='#{name}'" - s << " value='#{values[n].to_html}'" if n < values.length + s << " value='#{values[n].to_s.to_html}'" if n < values.length s << "/>" res << s end @@ -264,12 +282,12 @@ args["nohelpbutton"] = (not help) template = $rwd_html_1 template = $rwd_html_PDA_1 if pda - res <<(template(template, args)) - when "p" then res << "<p #{align} > " + res << (template(template, args)) + when "p" then res << "<p #{align}>" when "pre" then res << "<pre #{align}>" when "big" then res << "<p #{align}><big>" when "small" then res << "<p #{align}><small>" when "list" then res << "<ul #{align}>" when "item" then res << "<li #{align}>" @@ -306,14 +324,14 @@ when "table" then res << "<table #{AC} border='#{$rwd_border}' cellspacing='#{cellspacing}' cellpadding='0'>" when "row" then res << "<tr #{align} #{valign}>" when "hidden" then res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='hidden'>" when "text" maxlength = "" - maxlength = "maxlength='%s'" % @args["maxlength"] if @args.include?("maxlength") + maxlength = "maxlength='%s'" % @args["maxlength"] if @args.include?("maxlength") size = "" - size = "size='%s'" % @args["size"] if @args.include?("size") - size = "size='%s'" % 10 if pda + size = "size='%s'" % @args["size"] if @args.include?("size") + size = "size='%s'" % 10 if pda res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='text' #{maxlength} #{size}>" oneormorefields << "true" when "textarea" res << "<p #{align}><textarea name='#{@args["name"]}' rows='25' cols='80'>#{value2.crlf}</textarea>" oneormorefields << "true" @@ -339,11 +357,11 @@ else res << "<p #{align}><input name='#{@args["name"]}' value='#{value1}' type='radio'>" end oneormorefields << "true" when "select" - res << "<select #{align} name='#{@args["name"]}' width='#{@args["width"]}'>" + res << "<select #{align} name='#{@args["name"]}' width='#{@args["width"]} size='#{@args["size"]}'>" # ??? Misschien nog iets met 'multiple'? name = @args["name"] $select = varshtml[name] oneormorefields << "true" when "option" if $select == @children[0].text @@ -479,11 +497,11 @@ args["nohelpbutton"] = (not help) template = $rwd_html_2 template = $rwd_html_PDA_2 if pda - res <<(template(template, args)) + res << (template(template, args)) when "p" then res << "</p>" when "pre" then res << "</pre>" when "big" then res << "</big></p>" when "small" then res << "</small></p>" when "list" then res << "</ul>" @@ -554,14 +572,19 @@ vars.each do |k, v| a[k.upcase] = v end logo = nil - logo = File.expand_path(vars["logo"], $rwd_files) if vars.include?("logo") - logo = nil unless logo.nil? or File.file?(logo) + logo = File.expand_path(vars["logo"], $rwd_files) if vars.include?("logo") + logo = nil unless logo.nil? or File.file?(logo) + watermark = nil + watermark = File.expand_path(vars["watermark"], $rwd_files) if vars.include?("watermark") + watermark = nil unless watermark.nil? or File.file?(watermark) + a["LOGO"] = "" unless not logo.nil? + a["WATERMARK"] = "" unless not watermark.nil? a["HELPBUTTON"] = (not (vars["nohelpbutton"])) a["BACKBUTTONS"] = (not (vars["nobackbuttons"])) a["BACKBUTTONS"] = (not (vars["nobackbuttons"])) a["CLOSEBUTTON"] = (not (vars["noclosebutton"])) @@ -618,14 +641,16 @@ @@helpwindows[rwd] = {} tree = XML.new(rwd) tree.parse(OpenTag, "window") do |type, obj| + $rwd_appvars.each{|k, v| obj.args[k] = v} @@windows[rwd][obj.args["name"]] = obj.to_h end tree.parse(OpenTag, "helpwindow") do |type, obj| + $rwd_appvars.each{|k, v| obj.args[k] = v} @@helpwindows[rwd][obj.args["name"]] = obj.to_h end end @rwd = (@@windows[rwd][window] or "").dup @@ -637,10 +662,12 @@ varsstring = Hash.new oneormorefields = "" firstaction = "" html = [] + vars = vars.deep_dup + vars.each do |key, value| if not key.empty? if value.respond_to? "to_s" @rwd.gsub!(/%%#{key}%%/, value.to_s) @rwd.gsub!(/%#{key}%/, value.to_s.to_html) @@ -729,21 +756,29 @@ end end class RWDDone < RWDWindow def initialize(exitbrowser) - super("<window title='RWD Message' nobackbuttons noclosebutton><p>Done.</p><horizontal><close/>#{exitbrowser ? "" : "<button caption='Again'/>"}</horizontal>#{exitbrowser ? "<closewindow/>" : ""}</window>") + 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>") end end class RWDialog def initialize(xml) @rwd_xml = xml @rwd_exitbrowser = false @rwd_history = [] @rwd_ignore_vars = [] @rwd_call_after_back = [] + @rwd_time = Time.now + + $rwd_appvars = {} if $rwd_appvars.nil? + XML.new(xml).parse(OpenTag, "application") do |type, obj| + obj.args.deep_dup.each do |k, v| + $rwd_appvars[k] = v + end + end end def self.file(rwdfile, *args) new(File.new(rwdfile).readlines, *args) end @@ -763,24 +798,29 @@ raise "No free TCP port." if port.nil? port = port.to_i @rwd_server = RWDServer.new(self, port, io, auth, realm) + + self end def render(res, path, post, download, downloadfile, pda, sessionid) + # Avoid a timeout. + @rwd_time = Time.now + # Initialize some vars. vars = Hash.new if vars.nil? @rwd_switches = Hash.new if @rwd_switches.nil? done = false help = false back = false tab = "" - @rwd_msgtype = nil + @rwd_msgtype = nil if @rwd_progress_thread.nil? @rwd_download = nil @rwd_download_file = nil # Switches are used for checkboxes. @@ -817,10 +857,12 @@ @rwd_progress_thread.kill unless @rwd_progress_thread.nil? @rwd_progress_thread = nil @rwd_action = "rwd_back" end + @rwd_history = [["main", [], "main", ""]] if @rwd_history.empty? + if @rwd_action =~ /^rwd_tab_/ @rwd_tab = @rwd_action.sub(/^rwd_tab_/, "") @rwd_history[-1][3] = @rwd_tab else case @rwd_action @@ -838,10 +880,11 @@ @rwd_window = nil @rwd_tab = nil @rwd_history = [] when "rwd_quit" done = true + else end # History stuff @rwd_history = @rwd_history[-100..-1] if @rwd_history.length >= 100 @@ -881,10 +924,19 @@ @rwd_history = [["main", [], "main", ""]] if @rwd_history.empty? a = [@rwd_action, @rwd_args, @rwd_window, @rwd_tab] @rwd_history.push a if (@rwd_history[-1] != a or not @rwd_msgtype.nil?) + + if @rwd_window == "rwd_back" + @rwd_history.pop + @rwd_history.pop + @rwd_action = (@rwd_history[-1] or [nil, nil, nil])[0] + @rwd_args = (@rwd_history[-1] or [nil, nil, nil])[1] + @rwd_window = (@rwd_history[-1] or [nil, nil, nil])[2] + @rwd_tab = (@rwd_history[-1] or [nil, nil, nil])[3] + end end end # Copy vars from instance to window. @@ -909,16 +961,17 @@ puts "Download: #{@rwd_window}" if $rwd_debug download << @rwd_download downloadfile << @rwd_download_file else - if not @rwd_msgtype.nil? - res << RWDMessage.new(@rwd_msg).render(pda) if @rwd_msgtype == "message" - res << RWDError.new(@rwd_msg).render(pda) if @rwd_msgtype == "error" + if not @rwd_progress_thread.nil? + res << RWDProgressBar.new(@rwd_progress_refresh, @rwd_progress_progress).render(pda, @rwd_refresh_action) else - if not @rwd_progress_thread.nil? - res << RWDProgressBar.new(@rwd_progress_refresh, @rwd_progress_progress).render(pda, @rwd_refresh_action) + if not @rwd_msgtype.nil? + res << RWDMessage.new(@rwd_msg).render(pda) if @rwd_msgtype == "message" + res << RWDError.new(@rwd_msg).render(pda) if @rwd_msgtype == "error" + res << @rwd_msg if @rwd_msgtype == "text" else puts "Window: #{@rwd_window}" if $rwd_debug puts "Tab: #{@rwd_tab}" if $rwd_debug res << RWDWindow.new(@rwd_xml, @rwd_window).render(pda, @rwd_refresh_action, vars, @rwd_switches, help, @rwd_tab) @@ -942,10 +995,15 @@ def error(msg, &block) @rwd_msg = msg @rwd_msgtype = "error" end + def text(msg) + @rwd_msg = "<html><body><pre>#{msg}</pre></body></html>" + @rwd_msgtype = "text" + end + def progressbar(refresh, *progress) @rwd_progress_refresh = (refresh or 1) @rwd_progress_progress = [] while not progress.empty? @@ -982,10 +1040,27 @@ end def exitbrowser @rwd_exitbrowser = true end + + def timeout(timeout, interval=1) + @rwd_timeout = timeout + + unless @rwd_timeout_thread + @rwd_timeout_thread = + Thread.new do + loop do + if Time.now - @rwd_time > @rwd_timeout + $stderr.puts "Exiting due to timeout (#{@rwd_timeout} seconds)." + exit 1 + end + sleep interval + end + end + end + end end class RWDLogin < RWDialog def initialize(realm) 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>") @@ -1038,11 +1113,11 @@ def include?(sessionid) @sessions.include?(sessionid) end end -class Session < Hash +class RWDSession < Hash attr_reader :sessionid attr_reader :lastaccess attr_reader :authenticated attr_writer :authenticated @@ -1053,13 +1128,11 @@ end def touch @lastaccess = Time.now end -end -class RWDSession < Session def render(res, path, post, download, downloadfile, pda) done = self["object"].render(res, path, post, download, downloadfile, pda, @sessionid) res.gsub!(/\$RWD_SESSION\$/, done ? "" : "#{@sessionid}") @@ -1091,22 +1164,17 @@ #@ie = IE.new("http://localhost:#{port}/") #else browser = ENV["RWDBROWSER"].dup url = "http://localhost:%s/" % [port] - if cygwin? - browser.gsub!(/\\/, "/") - browser.gsub!(/ /, "\\ ") - end - re = /[$%]1\b/ command = "%s \"%s\"" % [browser, url] command = browser.gsub(re, url) if browser =~ re command.gsub!(/%port%/, port.to_s) - system(command) or puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}" + system(command) or $stderr.puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}" #end puts "The browser has terminated." end end @@ -1118,12 +1186,14 @@ portio = [port, io] unless io.nil? threadlimiter = ThreadLimiter.new(1) HTTPServer.serve(portio, (not auth.nil?)) do |req, resp| threadlimiter.wait do - - vars = req.vars.dup + vars = {} + req.vars.each do |k, v| + vars[k] = v.join("\t") + end pad = (req.request.path or "/") if auth.kind_of? String file = "#{home}/#{auth}" auths = {} @@ -1150,11 +1220,11 @@ else session["object"] = @object.clone end if oldsessionid.nil? or oldsessionid.empty? - if not auth.nil? and not auth.empty? and not session.authenticated and pad != "/rwd_pixel.gif" + if not auth.nil? and not auth.empty? and not session.authenticated and pad !~ /^\/rwd_/ # Check authentication us = vars["rwd_a"] pa = vars["rwd_b"] @@ -1288,10 +1358,14 @@ <link rel='shortcut icon' href='%LOGO%'> <style type='text/css'> <!-- + body { + background : url(%WATERMARK%) white center center no-repeat fixed; + } + a { text-decoration : none; } a:hover { @@ -1378,63 +1452,63 @@ <td align='center'> <table align='center' border='0' cellspacing='0' cellpadding='0'> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> @@ -1519,63 +1593,63 @@ <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='#EEEEEE'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> <tr align='center'> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> <td align='center' bgcolor='black'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> - <td align='center' bgcolor='white'><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> + <td align='center' ><img src='rwd_pixel.gif' height='1' width='1'></td> </tr> </table> </td> @@ -1600,10 +1674,14 @@ <link rel='shortcut icon' href='%LOGO%'> <style type='text/css'> <!-- + body { + background : url(%WATERMARK%) white center center no-repeat fixed; + } + a { text-decoration : none; } a:hover { @@ -1822,28 +1900,23 @@ </body> </html> " $rwd_pixel = " -R0lGODlhAQABAOcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoK -CgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZ -GRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMjIyQkJCUlJSYmJicnJygo -KCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0NDU1NTY2Njc3 -Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZG -RkdHR0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVV -VVZWVldXV1hYWFlZWVpaWltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2Rk -ZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1tbW5ubm9vb3BwcHFxcXJycnNz -c3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CAgIGBgYKC -goODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGR -kZKSkpOTk5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6Cg -oKGhoaKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+v -r7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5ubq6uru7u7y8vL29vb6+ -vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zMzM3N -zc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc -3N3d3d7e3t/f3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr -6+zs7O3t7e7u7u/v7/Dw8PHx8fLy8vPz8/T09PX19fb29vf39/j4+Pn5+fr6 -+vv7+/z8/P39/f7+/v///yH+FUNyZWF0ZWQgd2l0aCBUaGUgR0lNUAAh+QQB -CgD/ACwAAAAAAQABAAAIBAD/BQQAOw== +R0lGODlhAQABAMIAAAAAAP///+7u7kREiP///////////////yH5BAEKAAMA +LAAAAAABAAEAAAMCOAkAOw== ".unpack("m").shift +$rwd_logo = " +R0lGODlhEAAQAMIAAAAAAP///+7u7kREiP///////////////yH5BAEKAAQA +LAAAAAAQABAAAANCSErQ/k21QKulrIrNu8heuAGUcJ0BuQVD676DasK0zNKv +jefB+oo6l6AxBAx7M2HRePQph5xga0RsJqfELPI2DSUAADs= +".unpack("m").shift + + $rwd_html_1, $rwd_html_2 = $rwd_html[ENV["RWDTHEME"]].split(/^\s*%BODY%\s*\r*$/) $rwd_html_PDA_1, $rwd_html_PDA_2 = $rwd_html["PDA"].split(/^\s*%BODY%\s*\r*$/) + +#end +# +#class RWDialog < RWD::RWDialog +#end