#!/usr/bin/ruby -w require 'cgi' cgi = CGI.new $hash = cgi.params $mode = $hash.has_key?('mode') ? $hash['mode'][0] : "f" $hash.update({'mode' => [$mode]}) $options = $hash.has_key?('options') ? $hash['options'][0].split : ["sc","u"] $hash.update({'options' => [$options]}) $hash.update({'prec' => ['s']}) $hash.update({'lpo_p' => ['s']}) $hash.update({'pc' => ['p1']}) $verbose = $options.include?("v") $tmp_dir = "/tmp" $process = $$ $url = "http://cl2-informatik.uibk.ac.at/ttt/" #$url = "http://127.0.0.1/cgi-bin/" def trigger(action, string) # < pc + [value]})) end def add_prec(hash,prec,value) make(hash.update({'prec' => prec + [value]})) end def add_order(hash,order,value) make(hash.update({'order' => order + [value]})) end def add_option(hash,options,value) make(hash.update({'options' => options + [value]})) end def put(hash,key,value) make(hash.update({key => [value]})) end def delete(hash,order,value) make(hash.update({'order' => order - [value]})) end def delete_pc(hash,pc,value) make(hash.update({'pc' => pc - [value]})) end def delete_prec(hash,prec,value) make(hash.update({'prec' => prec - [value]})) end def delete_option(hash,options,value) make(hash.update({'options' => options - [value]})) end def delete_options(hash,options,values) make(hash.update({'options' => options - values})) end def check(parameter,string) (parameter == string) ? "checked" : "" end def selected(bool) bool ? "selected" : "" end def checked(bool) bool ? "checked" : "" end def unchecked(bool) bool ? "" : "checked" end def radio_tag(name, value) "" end def option_tag(name, value, label) "