You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

63 lines
1.3 KiB

#!/usr/bin/perl
#
# $Id: dbupdate.pl,v 1.3 2006/01/23 21:39:30 ddoughty Exp $
#
# Source File: ddl.pl
# Get config
require 'sitecfg.pl';
&app_initialize;
print "Content-Type: text/html\n\n";
if (&get_session($FORM{'tid'})) {
&LanguageSupportInit();
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "3", "DDL $FORM{'dbfilepath'}");
print "<HTML>
<HEAD>
<SCRIPT language=\"JavaScript\" src=\"$cgiroot/ddl.js\">
</SCRIPT>
</HEAD>
<BODY onLoad=\"wdw_onLoad()\">
";
if ($SESSION{'uac'} ne 'gadmin') {
print "<CENTER>\n";
print "You do not have privileges to make Database Structure Changes.\n";
print "</CENTER>\n";
} else {
if ($FORM{'floctn'} eq 'dataroot') {
@frecs = &get_data($FORM{'dbfilepath'});
} elsif ($FORM{'floctn'} eq 'questionroot') {
($fnm, $fxt) = split(/\./, $FORM{'dbfilepath'});
@frecs = &get_question_list($fnm, $fxt);
} else {
@frecs = ();
}
$nfrecs = $#frecs;
if ($nfrecs == -1) {
print "<CENTER>\n";
print "$FORM{'dbfilepath'} does not exist.\n";
print "</CENTER>\n";
} else {
@flds = split(/&/,$frecs[0]);
$nrows = $nflds + 10;
$ncols = 2;
&process_files;
}
}
print "</BODY>\n";
print "</HTML>\n";
}
sub process_files {
if ($FORM{'dbrelated'} ne '') {
@rfiles = split(/\;/, $FORM{'dbrelated'});
}
print "
<CENTER>
<B>File processing completed.</B>
</CENTER>
";
}