#!/usr/pkg/bin/perl
#$Id: add_author_id.cgi,v 1.8 2000/11/28 20:06:30 tom Exp $
################################################################

use strict;
use lib qw(../lib);

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

use TDS;
use TDS::Admin::Authorize;
use TDS::Admin::AuthorID;

################################################################

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

#unless ($TDS::Admin::Authorize::EnablePassword_wo_AuthorizedID){
#    print "\$EnablePassword_wo_AuthorizedID is off";
#    exit;
#}

my $author_id = new TDS::Admin::AuthorID;
if (param('command') eq 'save'){
    my $id = $TDS::Status->id->GetID;
    $author_id->Add($id);

    # show result
    print "$id is added";
    print qq(<hr><a href="./">admin</a>);
} else {
    print $author_id->AsForm;
}
