#!/usr/bin/perl

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

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

# this program invokes &draw_ws to return the HTML for the page
# corresponding to the given working set
# 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';
umask 000;

require CGI;

$input= new CGI;

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

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

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

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

&draw_ws($state,$ws);

1;
