#!/usr/pkg/bin/perl
# $Id: tdf_editor.cgi,v 1.8 2000/10/18 16:51:42 tom Exp $
################################################################
use lib qw(../lib);

use CGI::QueryString;
use CGI::Tools;

use TDS;
use TDS::Admin::TdfEditor;
use TDS::Admin::Authorize;

################################################################
my $ed = new TDS::Admin::TdfEditor;
$ed->date->Set(param('year'), param('month'), param('day'))
    if param('year') && param('month') && param('day');

TDS::Admin::Authorize->PrintHTTPHeader();

my $command = param('command');
if ($command =~ /save/i){
    $ed->Write(param('body'));
} else {
    $ed->ShowForm;
}

