#!/usr/local/bin/ruby require "cgi" require "nkf" require "pstore" require "config" $SAFE = 1 ENV['PATH'] = "/bin" def j2e(s) s ? NKF.nkf('-e -J -m0', s): nil end def e2j(s) s ? NKF.nkf('-j -E -m0', s): nil end def header_out(title) print < #{title}

#{title}

EOF end def footer_out() print <
Copyright © AMiRE 2005
EOF end def fstr(adata) return CGI.escapeHTML(adata.join("").strip) end def checked_mark(pos, data) if pos == data return "checked" else return "" end end def selected_mark(pos, data) if pos == data return "selected" else return "" end end def read_data(id) data = [] db = PStore.new(UPDATE_FILE) db.transaction { data = db[id] if db.root?(id) } return data if data != [] db = PStore.new(DATA_FILE) data = nil db.transaction { data = db[id] if db.root?(id) } return data end def edit_page(id, hdata) print < Author Information Edit Form (step 1)

Paper Title

Title*
SubTitle

Authors

Presenter* Title* First Name*
(Given Name)
Middle Initial Last Name*
(Family Name)
Affiliation*
(e.g., Company/University Name)
If number of authors is over ten, please input remaining authors' information into following field.

Keyword

Keyword 1*
Keyword 2
Keyword 3

Category and Session

Category*
Session Type* Ordinary Session   Organized Session  
OS Information OS ID:

OS Name:
If you select "Organized Session", please select the "OS ID" and enter the name of Organized Session.
These information are informed by Organizers.

Corresponding Person

Title*
First Name(Given Name)*
Middle Initial
Last Name(Family Name)* (Including Jr., III,, etc.)
Job Title*
(e.g., Manager, Associate, Professor, President, Student, etc.)
Affiliation*
(e.g., Company/University Name)
Address Line 1*
Address Line 2
City
State or Province
Country*
Zip/Postal Code
Phone Number*
+(country code)-(number possibly separated by -) (e.g., +81-123-45-6789)
Fax Number
+(country code)-(number possibly separated by -) (e.g., +81-123-45-6789)
Email Address*
Please input only ONE email address.

Message to the Program Committee

Copyright © 2005 AMiRE
EOF end def error_out() print "Content-Type: text/html\n\n" print "When you see this page, please send following messages to naniwa@rbt.his.fukui-u.ac.jp\n" print "

#{CGI.escapeHTML($!.inspect)}
\n" $@.each {|x| print CGI.escapeHTML(x), "
\n"} end # *** Check paperID*** def paperid_check(paperid) if (/^[0-9]{4}$/ =~ "#{paperid}") return true else return false end end # *** Check password of paperID *** def passwd_check(id, passwd) db=PStore.new(PASS_FILE) dbpasswd="" db.transaction { dbpasswd=db[id] if db[id] } if ((passwd == dbpasswd)&&(dbpasswd!="")&&(passwd!="")) return true else return false end end def query_id_passwd() print < Admin page

Author Information Edit

Please enter PaperID and Password:
  • PaperID:
  • Password:
Copyright © 2005 AMiRE
EOF end def id_error() header_out("PaperID Format Error") print "Please return the previous page pushing \"Back\" button of your internet browser.\n"; print "
    \n" print "
  • PaperID is incorrect. It must be 4 digits.
  • \n" print "
\n" footer_out() exit end def id_pass_error() header_out("PaperID/Password Error") print "Please return the previous page pushing \"Back\" button of your internet browser.\n"; print "
    \n" print "
  • PaperID and Password does not mutch.
  • \n" print "
\n" footer_out() exit end def file_error() header_out("File Error") print "Please return the previous page pushing \"Back\" button of your internet browser.\n"; print "
    \n" print "
  • Can not read author data.
  • \n" print "
\n" footer_out() exit end if __FILE__ == $0 begin cgi = CGI.new if ! cgi.has_key?("pass") query_id_passwd() else id = cgi.params["id"].first pass = cgi.params["pass"].first if ! paperid_check(id) id_error() elsif passwd_check(id, pass) data = read_data(id) if data == nil file_error() end edit_page(id, data) else id_pass_error() end end rescue StandardError error_out() rescue ScriptError error_out() end end