#!/usr/bin/perl

# $Id: new_ws.pl,v 1.3 1996/01/17 05:05:35 hoagland Exp $

# new_ws.pl, by Jim Hoagland (hoagland@cs) 1/96

# this program creates a new (empty) working set then invokes &draw_ws to
# return the HTML for the page.
# Input is CGI, a field on a form,  Output is eventually HTML to STDOUT.

require '/pkg/www/arpa/secret/cgi-bin/gui-helper.pl';
require '/pkg/www/arpa/secret/cgi-bin/draw_ws.pl';

require CGI;

$input= new CGI;

foreach (@ARGV) {  # simulate field input
  $input->param(split('=',$_,2));
}

$state= State->new(&get_statefile);

#-------------

$new_ws= $input->param('name');
$state->set_set($new_ws);
$state->{'last_ws'}= $new_ws;
$state->store;

&draw_ws($state,$new_ws);
1;
