diff options
Diffstat (limited to 'invite_participants.rb')
-rwxr-xr-x | invite_participants.rb | 36 |
1 files changed, 6 insertions, 30 deletions
diff --git a/invite_participants.rb b/invite_participants.rb index 6c9204a..abb1ddc 100755 --- a/invite_participants.rb +++ b/invite_participants.rb @@ -19,47 +19,23 @@ # along with dudle. If not, see <http://www.gnu.org/licenses/>. # ############################################################################ -require "yaml" -require "cgi" - - if __FILE__ == $0 -$cgi = CGI.new - -olddir = File.expand_path(".") -Dir.chdir("..") -require "html" -load "config.rb" -require "poll" -Dir.chdir(olddir) - +load "../dudle.rb" -table = YAML::load_file("data.yaml") +$d = Dudle.new("Invite Participants") if $cgi.include?("add_participant") - table.add_participant("",$cgi["add_participant"],{}) + $d.table.add_participant("",$cgi["add_participant"],{}) end -$html = HTML.new("dudle - #{table.name} - Invite Participants") -$html.header["Cache-Control"] = "no-cache" -load "../charset.rb" -$html.add_css("../dudle.css") - -$html << "<body>" -$html << Dudle::tabs("Invite Participants") - -$html << <<TABLE - <div id='main'> - <h1>#{table.name}</h1> +$d << <<TABLE <h2>Invite Participants</h2> <form method='post' action=''> - #{table.to_html("","invite")} + #{$d.table.to_html("","invite")} </form> TABLE -$html << "</div></body>" - -$html.out($cgi) +$d.out($cgi) end |