#!/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 " "; if ($SESSION{'uac'} ne 'gadmin') { print "
\n"; print "You do not have privileges to make Database Structure Changes.\n"; print "
\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 "
\n"; print "$FORM{'dbfilepath'} does not exist.\n"; print "
\n"; } else { @flds = split(/&/,$frecs[0]); $nrows = $nflds + 10; $ncols = 2; &process_files; } } print "\n"; print "\n"; } sub process_files { if ($FORM{'dbrelated'} ne '') { @rfiles = split(/\;/, $FORM{'dbrelated'}); } print "
File processing completed.
"; }