require "lib/rwd/ruby" require "lib/rwd/xml" require "lib/rwd/net" require "lib/rwd/browser" require "lib/rwd/thread" require "md5" require "rbconfig" begin require "win32ole" require "win32/registry" rescue LoadError $".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 = {} ARGV.delete_if do |arg| arg =~ /^--rwd-/ end RWDEmptyline = "..." #module RWD rcfile = nil 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'" Format = "\n\t" unless rcfile.nil? puts "Reading #{rcfile} ..." Hash.file(rcfile).each do |k, v| ENV[k] = v unless ENV.include?(k) end end if ENV["RWDTHEME"] if ENV["RWDTHEME"] = "PDA" load 'lib/rwdthemes/default.rwd' end if ENV["RWDTHEME"] = "DEFAULT" $rwdtinkerlog.info "rwd: loading theme DEFAULT" load 'lib/rwdthemes/default.rwd' end if ENV["RWDTHEME"] = "WINDOWSLOOKALIKE" load 'lib/rwdthemes/windowslike.rwd' end else load 'lib/rwdthemes/default.rwd' end 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} $SAFE = 0 class IE def initialize(url) @ie = WIN32OLE.new("InternetExplorer.Application") @ev = WIN32OLE_EVENT.new(@ie, "DWebBrowserEvents2") @ie.navigate(url) @ie.menubar = false @ie.toolbar = false @ie.addressbar = false @ie.statusbar = false @ie.visible = true at_exit do @ie.visible = false end @ev.on_event("OnQuit") do Thread.main.exit end Thread.new do loop do WIN32OLE_EVENT.message_loop end end end end class Array def rwd_options(emptyline=nil) if emptyline.nil? a = self else a = [emptyline].concat(self) end a.numsort.collect{|s| "" }.join("\n") end def rwd_method(method) res = "" self.each do |s| s = s.join("/") if s.kind_of?(Array) s2 = s.dup s2[0..0] = s2[0..0].upcase res = res + "
" end return res end def rwd_row(key=nil, value=nil, bold=false) res = "" res = res + "#{"" if bold}#{s.to_s.to_html}#{"" if bold}
"}.join("") res = res + "#{s.to_html}
" }.join("") res = res + "" when "pre" then res << "
" when "big" then res << "" when "small" then res << "
" when "list" then res << "
" when "item" then res << "
- " when "empty" then res << "
" when "image" width = "width='#{@args["width"]}" if @args.include?("width") height = "height='#{@args["height"]}'" if @args.include?("height") res << "" when "progressbar" width = 200 res << "" res << "
" when "br" then res << "" res << " " res << "" res << " " res << " " res << "" res << " " res << "
" when "hr" then res << "
" when "b" then res << "" when "i" then res << "" when "a" if @args.include?("href") res << "" else res << "" end when "vertical" then res << "" when "horizontal" then res << "
" else puts "#{@subtype}>" res << "</#{@subtype}>" end before.pop after.pop aft = after[-1] res << Format % ["After", @subtype] if ($rwd_debug and not aft.nil?) res << aft if not aft.nil? end def template(html, vars) res = [] a = {} 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) 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"])) if a.include?("WIDTH") a["WIDTH1"] = "width='#{a["WIDTH"]}'" a["WIDTH2"] = a["WIDTH"] else a["WIDTH1"] = " " a["WIDTH2"] = "1" end html.split(/\r*\n/).each do |line| if line =~ /%[A-Z0-9]+%/ a.each do |k, v| v = false if (v.kind_of?(String) and v.empty?) if line.include?("%#{k}%") line.gsub!("%#{k}%", "#{v}") if v end end line = "" if line =~ /%[A-Z0-9]+%/ end res << line end res.join("\n") end end class Text def prechildren(res, before, after, varshtml, varsstring, switches, help, oneormorefields, firstaction, tabs, tab, pda=false) if not @text.scan(/[^ \t\r\n]/).empty? res << Format % ["Text", ""] if $rwd_debug res << "#{@text}" end end end class RWDTree < XML end class RWDWindow @@windows = {} # Kind of caching. @@helpwindows = {} # Kind of caching. def initialize(rwd, window=nil) rwd = rwd.join("\n") if rwd.kind_of?(Array) if @@windows[rwd].nil? @@windows[rwd] = {} @@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 @helprwd = (@@helpwindows[rwd][window] or "").dup end def render(pda, action=nil, vars=Hash.new, switches=Hash.new, help=false, tab="") varshtml = Hash.new varsstring = Hash.new oneormorefields = "" firstaction = "" html = [] vars = vars.deep_dup begin # error wrap 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) @helprwd.gsub!(/%%#{key}%%/, value.to_s) @helprwd.gsub!(/%#{key}%/, value.to_s.to_html) varshtml[key] = value.to_s.to_html varsstring[key] = value.to_s end end end windowobject = RWDTree.new(@rwd).children.dup.delete_if{|obj| obj.subtype != "window"}[0] helpobject = RWDTree.new(@helprwd).children.dup.delete_if{|obj| obj.subtype != "helpwindow"}[0] tabsobj = windowobject.children.dup.delete_if{|obj| obj.subtype != "tabs"}[0] if not tabsobj.nil? tabs = tabsobj.children.dup.delete_if{|obj| (not obj.kind_of?(OpenTag)) or (obj.subtype != "tab")} if tab.empty? tab = tabs[0].args["name"] end tabsobj.children.delete_if{|obj| (obj.kind_of?(OpenTag)) and (obj.subtype == "tab") and obj.args["name"] != tab} end if help helpobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, false, oneormorefields, firstaction, tabs, tab, pda) else windowobject.parsetree("prechildren", "postchildren", html, [""], [""], varshtml, varsstring, switches, (not @helprwd.empty?), oneormorefields, firstaction, tabs, tab, pda) end html = html.join("") # ??? html.gsub!(/%%*[[:alnum:]_\-]+%%*/, "") if not $rwd_debug html.gsub!(/%%/, "%") html.gsub!(/\n\n*/, "\n") if oneormorefields.empty? focus = "" else focus = "document.bodyform.elements[0].focus();" end firstaction = action if windowobject.args.keys.include?("refresh") unless action.nil? html.gsub!(/\$RWD_FIRSTACTION\$/ , firstaction) html.gsub!(/\$RWD_FOCUS\$/ , focus) html end rescue $rwdtinkerlog.error "error in RWDWindow - render method" end end class RWDMessage < RWDWindow def initialize(msg) super("" res << " " res << " " res << "
" when "table" then res << " " res << "" when "row" then res << "
" res << " " res << "" when "hidden" then res << " " when "text" 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 res << "
" oneormorefields << "true" when "textarea" res << "
" oneormorefields << "true" when "password" maxlength = "" maxlength = "maxlength='%s'" % @args["maxlength"] if @args.include?("maxlength") size = "" size = "size='%s'" % 10 if pda res << "
" oneormorefields << "true" when "checkbox" if varshtml[@args["name"]] == "on" switches[@args["name"]] = true res << "
" else switches[@args["name"]] = false res << "
" end oneormorefields << "true" when "radio" if varshtml[@args["name"]] == value1 # ??? 1 or 2? res << "
" else res << "
" end oneormorefields << "true" when "select" res << "
") end end class RWDError < RWDWindow def initialize(msg) super(" #{msg}
") end end class RWDProgressBar < RWDWindow def initialize(refresh, progress) s = "" s << " Error: #{msg}
" if progress.length == 1 progress.each do |caption, value| s << " " super(s) end end class RWDDone < RWDWindow def initialize(exitbrowser) super("#{caption}
#{(100*value).to_i}%%
" end else s << "" progress.each do |caption, value| s << "
" end s << "" end s << "
#{caption}
#{(100*value).to_i}%%
" s << " ") end end class RWDialog def initialize(xml) @rwd_xml = $rwd_gui_tinker # change from default ev - was 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 def serve(port=nil, auth=nil, realm=self.class.to_s) exit if $rwd_exit raise "RWD is not initialized." if @rwd_xml.nil? low, high = ENV["RWDPORTS"].split(/[^\d+]/) high = low if high.nil? low, high = low.to_i, high.to_i io = nil port, io = TCPServer.freeport(low, high, (not auth.nil?)) if port.nil? 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_progress_thread = nil @rwd_msgtype = nil if @rwd_progress_thread.nil? @rwd_download = nil @rwd_download_file = nil # Switches are used for checkboxes. @rwd_switches.each do |key, value| vars[key] = "off" end @rwd_switches = Hash.new # Copy the vars from the window to vars. vars wil later on be copied to instance variables. post.sort.each do |key, value| puts "Post: #{key} -> #{value.from_html.inspect}" if $rwd_debug $rwdtinkerlog.info "Post: #{key} -> #{value.from_html.inspect}\n" vars[key] = value.from_html $rwdtinkerlog.info "rwd: #{value.from_html}\n" end # Stack handling for rwd_action, rwd_window and rwd_tab. @rwd_action = vars["rwd_action"] if vars.include?("rwd_action") @rwd_action, @rwd_args = @rwd_action.split(/\//, 2) unless @rwd_action.nil? @rwd_action, rest = @rwd_action.split(/\?/) unless @rwd_action.nil? @rwd_refresh_action = (@rwd_action or @rwd_refresh_action or "main") unless rest.nil? rest.each do |s| k, v = s.split(/=/, 2) vars[k] = v end end if @rwd_action == "rwd_cancel" @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 when "rwd_back" @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] back = true when "rwd_help" help = true when "rwd_main" @rwd_action = nil @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 @rwd_action = "main" if @rwd_action.nil? @rwd_action = "main" if @rwd_action.empty? @rwd_window = "main" if @rwd_window.nil? @rwd_window = "main" if @rwd_window.empty? @rwd_tab = "" if @rwd_tab.nil? @rwd_args = [] if @rwd_args.nil? @rwd_args = [] if @rwd_action == "main" vars["rwd_action"] = @rwd_action vars["rwd_window"] = @rwd_window vars["rwd_tab"] = @rwd_tab # Copy vars from window to instance. vars.each do |k, v| $rwdtinkerlog.info "rwd: Post: #{k} -> #{v}\n" if ((not k.empty?) and k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}")) instance_eval "@#{k} = ''" instance_variable_set("@#{k}", vars.fetch("#{k}")) $rwdtinkerlog.info "rwd: Post: #{k} -> #{v}\n" end end # Callback. if (not back) or @rwd_call_after_back.include?(@rwd_action) unless @rwd_action =~ /^rwd_/ $rwdtinkerlog.debug "Method: #{@rwd_action}(#{@rwd_args})" if methods.include?(@rwd_action) method(@rwd_action).call(*@rwd_args) else puts "Method '%s' is not defined." % @rwd_action end end # History stuff @rwd_history = [["main", [], "main", ""]] if @rwd_action == "main" @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. instance_variables.each do |k| k.sub!(/^@/, "") instance_eval "vars['#{k}'] = @#{k}.to_s" if (k.scan(/^rwd_/).empty? and not @rwd_ignore_vars.include?("@#{k}")) end # just ignore. vars.sort.each do |key, value| puts "Pre: #{key} -> #{value.inspect}" if $rwd_debug end # Answer to browser. if done res << RWDDone.new(@rwd_exitbrowser).render(pda) else if not @rwd_download.nil? puts "Download: #{@rwd_window}" if $rwd_debug download << @rwd_download downloadfile << @rwd_download_file else if not @rwd_progress_thread.nil? res << RWDProgressBar.new(@rwd_progress_refresh, @rwd_progress_progress).render(pda, @rwd_refresh_action) 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" res << @rwd_msg if @rwd_msgtype == "text" else puts "Window: #{@rwd_window}" if $rwd_debug puts "Tab: #{@rwd_tab}" if $rwd_debug begin # error block if @rwd_window.empty? @rwd_window = "main" end res << RWDWindow.new($rwd_gui_tinker, @rwd_window).render(pda, @rwd_refresh_action, vars, @rwd_switches, help, @rwd_tab) rescue $rwdtinkerlog.error "rwd: error in render" end end end end end return done end def samewindow? @rwd_history[-1][2] == @rwd_window end def message(msg, &block) @rwd_msg = msg @rwd_msgtype = "message" end def error(msg, &block) @rwd_msg = msg @rwd_msgtype = "error" end def text(msg) @rwd_msg = " Done.
(Some browsers don't close,
because of security reasons.)#{exitbrowser ? " #{exitbrowser ? "" : ""} " : ""} #{msg}" @rwd_msgtype = "text" end def progressbar(refresh, *progress) @rwd_progress_refresh = (refresh or 1) @rwd_progress_progress = [] while not progress.empty? s = (progress.shift or "") if s.kind_of?(Array) caption, value = s value = (value or 0.0).to_f else caption = s value = (progress.shift or 0.0).to_f end @rwd_progress_progress << [caption, value] end if @rwd_progress_thread.nil? @rwd_progress_progress.each do |a| a[1] = 0.0 end @rwd_progress_thread = Thread.new do yield end Thread.pass end @rwd_progress_thread = nil unless @rwd_progress_thread.alive? end def download(data, filename="") @rwd_download = data @rwd_download_file = filename 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 $rwdtinkerlog.info "rwd: Exiting due to timeout (#{@rwd_timeout} seconds)." exit 1 end sleep interval end end end end end class RWDLogin < RWDialog def initialize(realm) super("") end end class RWDTimeOut < RWDialog def initialize super("
|
Username:
|
Password:
") end end class SessionCleanup def initialize(sessions, interval, timeout) every(interval) do sessions.delete_if do |id, session| time = Time.now.to_i - session.lastaccess.to_i puts "Session %s deleted" % id if time > timeout time > timeout end end end end class Sessions def initialize(rack, cleanup) @rack = rack.to_s @cleanup = SessionCleanup.new(self, 3600, 24*3600) if cleanup @sessions = {} end def [](sessionid) @sessions[sessionid] end def []=(sessionid, value) @sessions[sessionid] = value end def delete(sessionid) @sessions.delete(sessionid) end def delete_if(&block) @sessions.delete_if{|k, v| block.call(k, v)} end def include?(sessionid) @sessions.include?(sessionid) end end class RWDSession < Hash attr_reader :sessionid attr_reader :lastaccess attr_reader :authenticated attr_writer :authenticated def initialize(sessionid=nil) @sessionid = sessionid @lastaccess = Time.now @authenticated = false end def touch @lastaccess = Time.now end def render(res, path, post, download, downloadfile, pda=false) done = self["object"].render(res, path, post, download, downloadfile, pda, @sessionid) res.gsub!(/\$RWD_SESSION\$/, done ? "" : "#{@sessionid}") return done end end class RWDServer def initialize(obj, port, io, auth, realm) @object = obj @localbrowsing = false @browserstarted = false @sessions = Sessions.new(obj.class, (not auth.nil?)) if auth.nil? @localbrowsing = true if ENV.include?("RWDBROWSER") and not ENV["RWDBROWSER"].nil? and not ENV["RWDBROWSER"].empty? @browserstarted = true @object.exitbrowser # Start browser. @browserthread = Thread.new do $rwdtinkerlog.warn "rwd: Starting the browser..." #if ENV["RWDBROWSER"].downcase =~ /iexplore/ # ??? #@ie = IE.new("http://localhost:#{port}/") #else browser = ENV["RWDBROWSER"].dup url = "http://localhost:%s/" % [port] 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 $rwdtinkerlog.error "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}" #end puts "The browser has terminated." end end end # Start server. portio = port 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.each do |k, v| vars[k] = v.join("\t") end pad = (req.request.path or "/") if auth.kind_of? String file = "#{home}/#{auth}" auths = {} auths = Hash.file(file) if File.file?(file) else auths = auth end #oldsessionid = vars["rwd_session"] oldsessionid = req.cookies["sessionid"] # Retrieve session. session = @sessions[oldsessionid] # Eventually create new session. if session.nil? 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)) session = RWDSession.new(sessionid) if auth.nil? session["object"] = @object 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_/ # Check authentication us = vars["rwd_a"] pa = vars["rwd_b"] if us.nil? or pa.nil? or auths[us] != pa session = RWDSession.new session["object"] = RWDLogin.new(realm) pad = "/" else session.authenticated = true @sessions[session.sessionid] = session end else session.authenticated = true @sessions[session.sessionid] = session end else session = RWDSession.new session["object"] = RWDTimeOut.new end vars = {} end # Avoid timeout. session.touch if pad == "/" # Serve methods/callbacks. # Build new page. download = "" downloadfile = "" res = "" done = session.render(res, pad, vars, download, downloadfile, req.pda?) begin if download.empty? resp["Content-Type"] = "text/html" if done resp.cookies["sessionid"] = "" else resp.cookies["sessionid"] = session.sessionid end resp << res else resp["Content-Type"] = "application/octet-stream" resp["Content-Disposition"] = "attachment;" resp["Content-Disposition"] = "attachment; filename=%s" % downloadfile unless downloadfile.empty? resp << download end rescue $rwdtinkerlog.error "rwd: Sending response to browser failed." @sessions.delete(session.sessionid) end # Eventually delete this session. if done @sessions.delete(session.sessionid) if @localbrowsing resp.stop if @browserstarted and not @browserthread.nil? and @browserthread.alive? resp.stop do $rwdtinkerlog.warn "rwd: Waiting for the browser to terminate..." @browserthread.join end end end end else # Serve files. if pad == "/rwd_pixel.gif" resp["Cache-Control"] = "max-age=86400" resp["Content-Type"] = "image/gif" resp << $rwd_pixel else if session.authenticated pwd = Dir.pwd file = File.expand_path(pad.gsub(/^\/*/, ""), $rwd_files) if not file.index(pwd) == 0 resp["Content-Type"] = "text/html" resp.response = "HTTP/1.0 400 BAD REQUEST" resp << " Error: Session has expired.
Bad Request. (#{pad})
" elsif File.file?(file) resp << File.new(file, "rb").read rescue nil else resp["Content-Type"] = "text/html" resp.response = "HTTP/1.0 404 NOT FOUND" resp << "Not found. (#{pad})
" end else resp["Content-Type"] = "text/html" resp.response = "HTTP/1.0 ??? NOT AUTHORIZED" resp << "Not Authorized.
" end end end end end end end $rwd_pixel = " 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*$/) #if ENV["RWDTHEME"] == "PDA" #$rwd_html_PDA_1, $rwd_html_PDA_2 = $rwd_html["PDA"].split(/^\s*%BODY%\s*\r*$/) #end #end # #class RWDialog < RWD::RWDialog #end