diff --git a/README.md b/README.md
index 55ae45a95..f652cc646 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,8 @@ The following is a first list of the stuff we should know how to do.
ssh actswac@104.238.116.218
+Qbttxpsea1!
+
- Find names of software packages in the official CentOS repositories.
Sample commands
diff --git a/survey-nginx/cgi-bin/login.pl b/survey-nginx/cgi-bin/login.pl
index 0e7a4d367..8cce178d0 100755
--- a/survey-nginx/cgi-bin/login.pl
+++ b/survey-nginx/cgi-bin/login.pl
@@ -11,215 +11,220 @@ require 'testlib.pl';
&traceoutput("login.pl"); # TRACE IF ACTIVE
&app_initialize;
-$SESSION{'temptime'} = time();
+$SESSION{'temptime'} = time();
$SESSION{'clid'} = $FORM{'clid'};
$SESSION{'lang'} = $FORM{'lang'};
+
&get_client_configuration();
&traceoutput("login.pl:$FORM{'clid'}:$FORM{'uid'}:$FORM{'pwd'}"); # TRACE IF ACTIVE
&setbrowsertype();
## DED Patch for secure_html/tests dir permission problem 2006/10/11
if (! -x $testroot) {
- print STDERR "PERMS: $testroot is not X\n";
- chmod(0777, $testroot);
+ print STDERR "PERMS: $testroot is not X\n";
+ chmod(0777, $testroot);
}
if ($FORM{'selfregister'} eq "Y") {
- unless ($SESSION{'clid'}) {
- warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
- &show_illegal_access_warning("user");
- exit();
- }
- &get_client_profile($SESSION{'clid'});
- unless (%CLIENT) {
- warn "ERROR: Invalid Client ID $FORM{'clid'} " ;
- &show_illegal_access_warning("user");
- exit();
- }
- $CANDIDATE{'new'}="Y";
- print "Content-Type: text/html\n\n";
- &show_template("regsas");
+ unless ($SESSION{'clid'}) {
+ warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
+ print STDERR "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
+# &show_illegal_access_warning("user");
+ exit();
+ }
+ &get_client_profile($SESSION{'clid'});
+ unless (%CLIENT) {
+ warn "ERROR: Invalid Client ID $FORM{'clid'} " ;
+ print STDERR "ERROR: Invalid Client ID $FORM{'clid'} " ;
+# &show_illegal_access_warning("user");
+ exit();
+ }
+ $CANDIDATE{'new'}="Y";
+ print "Content-Type: text/html\n\n";
+ &show_template("regsas");
} elsif (&verifyaccess) {
- &init_session;
- &LanguageSupportInit();
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "1");
- $FORM{'notice'} = $SYSTEM{'message'};
+ &init_session;
+ &LanguageSupportInit();
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "1");
+ $FORM{'notice'} = $SYSTEM{'message'};
- ### For redirect to regcnd & regsas
- $vars{'tid'} = $SESSION{'tid'};
- $vars{'lang'} = $SESSION{'lang'};
- $vars{'testid'} = $FORM{'testid'} if ($FORM{'testid'}) ;
- $vars{'badid'} = $FORM{'badid'} unless !(defined($FORM{'badid'})); #This is used if badid is passed from regsas for autorefresh location trick
- $vars{'direction'} = $FORM{'direction'} unless !(defined($FORM{'direction'}));
- unless ($SESSION{'clid'}) {
- warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
- &show_illegal_access_warning("user");
- exit();
- }
- &get_client_profile($SESSION{'clid'});
- unless (%CLIENT || $SESSION{'clid'} eq 'std') {
- warn "ERROR: Invalid Client ID $FORM{'clid'} " ;
- &show_illegal_access_warning("user");
- exit();
- }
- if ($SESSION{'taclid'} ne '') {
+ ### For redirect to regcnd & regsas
+ $vars{'tid'} = $SESSION{'tid'};
+ $vars{'lang'} = $SESSION{'lang'};
+ $vars{'testid'} = $FORM{'testid'} if ($FORM{'testid'}) ;
+ $vars{'badid'} = $FORM{'badid'} unless !(defined($FORM{'badid'})); #This is used if badid is passed from regsas for autorefresh location trick
+ $vars{'direction'} = $FORM{'direction'} unless !(defined($FORM{'direction'}));
+ unless ($SESSION{'clid'}) {
+ warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
+ print STDERR "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
+# &show_illegal_access_warning("user");
+ exit();
+ }
+ &get_client_profile($SESSION{'clid'});
+ unless (%CLIENT || $SESSION{'clid'} eq 'std') {
+ warn "ERROR: Invalid Client ID $FORM{'clid'} " ;
+ print STDERR "ERROR: Invalid Client ID $FORM{'clid'} " ;
+# &show_illegal_access_warning("user");
+ exit();
+ }
+ if ($SESSION{'taclid'} ne '') {
+ print "Content-Type: text/html\n\n";
+ my $opts = { restrict_to_availability_window => 1 };
+ &set_session($SESSION{'tid'},'taclauthtests',$SESSION{'taclauthtests'});
+ &set_session($SESSION{'tid'},'uid',$SESSION{'taclid'});
+ if ($FORM{'pwd'} eq '_____') {
+ &get_tacl_profile("regauto");
+ ®dusr("regauto");
+ } else {
+ &get_tacl_profile();
+ ®dusr("regtacl");
+ }
+ } elsif ($FORM{'sas'} ne '') {
+ ## ^ support for wilcard login
+ # register an account to the candidate
+ my $opts = { restrict_to_availability_window => 1 };
+ unless ($SESSION{'uid'}) {
+ warn "ERROR: Empty Candidate ID in Session data " ;
+ }
+ &get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'}, $opts);
+ #®dusr("regsas");
+ &redirect("regsas", \%vars);
+ } else {
+ if ($FORM{'sadm'} ne '') {
+ print "Content-Type: text/html\n\n";
+ if ($SESSION{'uac'} eq 'gadmin') {
+ # Site administration
+ $CLIENT{'active'} = "X";
+ $CLIENT{'logo'} = "\n";
+ $CLIENT{'clorg'} = "ACTS Corporation";
+ ®dusr("frsadmin");
+ } elsif ($SESSION{'uac'} =~ /txlatr./ ) {
+ ($FORM{'uac'},$FORM{'lang'}) = split(/\./, $SESSION{'uac'});
+ $CLIENT{'active'} = "X";
+ $CLIENT{'logo'} = "\n";
+ $CLIENT{'clorg'} = "ACTS Corporation";
+ print "\n";
+ print "
\n";
+ print "\n";
+ print "\n";
+ print "\n";
+ print "\n";
+ print "\n";
+ } elsif ($SESSION{'uac'} eq 'madmin') {
+ # Multiple-client admin
+ ®dusr("madmin");
+ } else {
+ # Client Test Administration
+ &get_client_profile($SESSION{'clid'});
+ ®dusr("frsadmin");
+ }
+ } else {
+ if ($FORM{'tadm'} ne '') {
print "Content-Type: text/html\n\n";
- my $opts = { restrict_to_availability_window => 1 };
- &set_session($SESSION{'tid'},'taclauthtests',$SESSION{'taclauthtests'});
- &set_session($SESSION{'tid'},'uid',$SESSION{'taclid'});
- if ($FORM{'pwd'} eq '_____') {
- &get_tacl_profile("regauto");
- ®dusr("regauto");
+ if ($SESSION{'uac'} eq 'madmin') {
+ # Multiple-client admin
+ ®dusr("madmin");
} else {
- &get_tacl_profile();
- ®dusr("regtacl");
+ # Client Test Administration
+ &get_client_profile($SESSION{'clid'});
+ ®dusr("frsadmin");
}
- } elsif ($FORM{'sas'} ne '') {
-## ^ support for wilcard login
- # register an account to the candidate
- my $opts = { restrict_to_availability_window => 1 };
- unless ($SESSION{'uid'}) {
- warn "ERROR: Empty Candidate ID in Session data " ;
- }
- &get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'}, $opts);
- #®dusr("regsas");
- &redirect("regsas", \%vars);
- } else {
- if ($FORM{'sadm'} ne '') {
- print "Content-Type: text/html\n\n";
- if ($SESSION{'uac'} eq 'gadmin') {
- # Site administration
- $CLIENT{'active'} = "X";
- $CLIENT{'logo'} = "\n";
- $CLIENT{'clorg'} = "ACTS Corporation";
- ®dusr("frsadmin");
- } elsif ($SESSION{'uac'} =~ /txlatr./ ) {
- ($FORM{'uac'},$FORM{'lang'}) = split(/\./, $SESSION{'uac'});
- $CLIENT{'active'} = "X";
- $CLIENT{'logo'} = "\n";
- $CLIENT{'clorg'} = "ACTS Corporation";
- print "\n";
- print "\n";
- print "\n";
- print "\n";
- print "\n";
- print "\n";
- print "\n";
- } elsif ($SESSION{'uac'} eq 'madmin') {
- # Multiple-client admin
- ®dusr("madmin");
- } else {
- # Client Test Administration
- &get_client_profile($SESSION{'clid'});
- ®dusr("frsadmin");
- }
+ } else {
+ if (&checkinprogress($SESSION{'clid'}, $FORM{'uid'}) ) {
+ # resume test at point of pause
+ &resumetest;
} else {
- if ($FORM{'tadm'} ne '') {
- print "Content-Type: text/html\n\n";
- if ($SESSION{'uac'} eq 'madmin') {
- # Multiple-client admin
- ®dusr("madmin");
- } else {
- # Client Test Administration
- &get_client_profile($SESSION{'clid'});
- ®dusr("frsadmin");
- }
+ if ($FORM{'cnd'} ne '') {
+ &get_client_profile($SESSION{'clid'});
+ my $opts = { restrict_to_availability_window => 1 };
+ &get_candidate_profile($SESSION{'clid'}, $FORM{'uid'}, $opts);
+ #print STDERR "clid: $SESSION{'clid'}, uid: $FORM{'uid'}, opts: $opts\n";
+ if ($CANDIDATE{'grpowner'} eq 'Y') {
+ print "Content-Type: text/html\n\n";
+ &show_template("frcnd");
+ } elsif ($CANDIDATE{'registrar'} eq 'Y') {
+ print "Content-Type: text/html\n\n";
+ &show_template("frcnd");
} else {
- if (&checkinprogress($SESSION{'clid'}, $FORM{'uid'}) ) {
- # resume test at point of pause
- &resumetest;
- } else {
- if ($FORM{'cnd'} ne '') {
- &get_client_profile($SESSION{'clid'});
- my $opts = { restrict_to_availability_window => 1 };
- &get_candidate_profile($SESSION{'clid'}, $FORM{'uid'}, $opts);
- #print STDERR "clid: $SESSION{'clid'}, uid: $FORM{'uid'}, opts: $opts\n";
- if ($CANDIDATE{'grpowner'} eq 'Y') {
- print "Content-Type: text/html\n\n";
- &show_template("frcnd");
- } elsif ($CANDIDATE{'registrar'} eq 'Y') {
- print "Content-Type: text/html\n\n";
- &show_template("frcnd");
- } else {
- &redirect("regcnd", \%vars);
- }
- } else {
- &get_candidate_profile($SESSION{'clid'}, $FORM{'uid'});
- #®dusr("regsas");
- &redirect("regsas", \%vars);
- }
- }
+ &redirect("regcnd", \%vars);
}
+ } else {
+ &get_candidate_profile($SESSION{'clid'}, $FORM{'uid'});
+ #®dusr("regsas");
+ &redirect("regsas", \%vars);
+ }
}
+ }
}
+ }
} else {
- # Load Index.html
- print "Content-Type: text/html\n\n";
- if ($FORM{'home'} eq 'client') {
- &get_client_profile($FORM{'clid'});
- @lines = &get_template("cindex");
+ # Load Index.html
+ print "Content-Type: text/html\n\n";
+ if ($FORM{'home'} eq 'client') {
+ &get_client_profile($FORM{'clid'});
+ @lines = &get_template("cindex");
+ } else {
+ @lines = &get_template("shome");
+ }
+ if ($ipfilter ne '') {
+ if ($ipfilter =~ /$ENV{'REMOTE_ADDR'}/ ) {
+ # ip blocked
+ if ($FORM{'sas'} eq '') {
+ # uid or password were incorrect
+ $SYSTEM{'message'} = "";
+ } else {
+ # uid is used
+ $SYSTEM{'message'} = "";
+ }
} else {
- @lines = &get_template("shome");
+ &logger::loginfo("Incorrect passwd 4");
+ $SYSTEM{'message'} = "";
}
- if ($ipfilter ne '') {
- if ($ipfilter =~ /$ENV{'REMOTE_ADDR'}/ ) {
- # ip blocked
- if ($FORM{'sas'} eq '') {
- # uid or password were incorrect
- $SYSTEM{'message'} = "";
- } else {
- # uid is used
- $SYSTEM{'message'} = "";
- }
+ } else {
+ if ($SYSTEM{'IP_ACCESS_FILTER'} ne '') {
+ if ($SYSTEM{'IP_ACCESS_FILTER'} =~ /$ENV{'REMOTE_ADDR'}/ ) {
+ if ($FORM{'sas'} eq '') {
+ # uid or password were incorrect
+ &logger::loginfo("Incorrect passwd 3");
+ $SYSTEM{'message'} = "";
} else {
- &logger::loginfo("Incorrect passwd 4");
- $SYSTEM{'message'} = "";
+ # uid is used
+ $SYSTEM{'message'} = "";
}
+ } else {
+ &logger::loginfo("Incorrect passwd 2");
+ $SYSTEM{'message'} = "";
+ }
} else {
- if ($SYSTEM{'IP_ACCESS_FILTER'} ne '') {
- if ($SYSTEM{'IP_ACCESS_FILTER'} =~ /$ENV{'REMOTE_ADDR'}/ ) {
- if ($FORM{'sas'} eq '') {
- # uid or password were incorrect
- &logger::loginfo("Incorrect passwd 3");
- $SYSTEM{'message'} = "";
- } else {
- # uid is used
- $SYSTEM{'message'} = "";
- }
- } else {
- &logger::loginfo("Incorrect passwd 2");
- $SYSTEM{'message'} = "";
- }
- } else {
- if ($FORM{'sas'} eq '') {
- # uid or password were incorrect
- &logger::loginfo("Incorrect passwd 1");
- $SYSTEM{'message'} = "";
- } else {
- # uid is used
- $SYSTEM{'message'} = "";
- }
- }
- }
- foreach $line (@lines) {
- $line = &xlatline($line);
+ if ($FORM{'sas'} eq '') {
+ # uid or password were incorrect
+ &logger::loginfo("Incorrect passwd 1");
+ $SYSTEM{'message'} = "";
+ } else {
+ # uid is used
+ $SYSTEM{'message'} = "";
+ }
}
+ }
+ foreach $line (@lines) {
+ $line = &xlatline($line);
+ }
}
sub resumetest {
- print "RESUMING TEST
\n";
- print "
\n";
- print "
\n";
- print "
\n";
- print "
\n";
+ print "RESUMING TEST
\n";
+ print "
\n";
+ print "
\n";
+ print "
\n";
+ print "
\n";
}
sub test {
- print "
\n";
- print "
\n";
- print "
\n";
- print "
\n";
- &showenv;
+ print "
\n";
+ print "
\n";
+ print "
\n";
+ print "
\n";
+ &showenv;
}
diff --git a/survey-nginx/cgi-bin/sadmin.pl b/survey-nginx/cgi-bin/sadmin.pl
index 434a66780..87d9e9891 100755
--- a/survey-nginx/cgi-bin/sadmin.pl
+++ b/survey-nginx/cgi-bin/sadmin.pl
@@ -4,7 +4,15 @@
#
# Source File: sadmin.pl
+#use strict;
+use warnings;
+use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
+
+#warningsToBrowser(1);
+#fatalsToBrowser(1);
+
# Get config
+
require 'sitecfg.pl';
require 'testlib.pl';
@@ -12,120 +20,121 @@ require 'testlib.pl';
print "Content-Type: text/html\n\n";
-if (&get_session($FORM{'tid'})) {
- &LanguageSupportInit();
- unless ($SESSION{'clid'}) {
- warn "ERROR: Empty Client ID in Session data for Session ID $FORM{'tid'} " ;
- &show_illegal_access_warning("user");
- exit();
- }
- if ($SESSION{'clid'} ne 'std') {
- &get_client_profile($SESSION{'clid'});
- unless (%CLIENT) {
- warn "ERROR: Invalid Client ID $SESSION{'clid'} in Session ID $FORM{'tid'} " ;
- &show_illegal_access_warning("user");
- exit();
+#print $logroot;
+my $tid = $FORM{'tid'};
+
+if (&get_session($tid)) {
+ &LanguageSupportInit();
+ unless ($SESSION{'clid'}) {
+ warn "ERROR: Empty Client ID in Session data for Session ID $FORM{'tid'} " ;
+ #&show_illegal_access_warning("user");
+ exit();
+ }
+ if ($SESSION{'clid'} ne 'std') {
+ &get_client_profile($SESSION{'clid'});
+ unless (%CLIENT) {
+ warn "ERROR: Invalid Client ID $SESSION{'clid'} in Session ID $FORM{'tid'} " ;
+ #&show_illegal_access_warning("user");
+ exit();
}
- if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'madmin') {
- $FORM{'pageid'} = "Group";
- $FORM{'PAGEID'} = "GROUP";
- $mainttmplt = "frgrpadmin";
- } else {
- &get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'});
- unless (%CANDIDATE) {
+ if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'madmin') {
+ $FORM{'pageid'} = "Group";
+ $FORM{'PAGEID'} = "GROUP";
+ $mainttmplt = "frgrpadmin";
+ } else {
+ &get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'});
+ unless (%CANDIDATE) {
warn "ERROR: Invalid Candidate ID $SESSION{'uid'} for Client $SESSION{'clid'} in Session ID $FORM{'tid'} " ;
- &show_illegal_access_warning("user");
+ #&show_illegal_access_warning("user");
exit();
- }
- $FORM{'pageid'} = "Gradebook";
- $FORM{'PAGEID'} = "GRADEBOOK";
- $mainttmplt = "frgradebooks";
- }
+ }
+ $FORM{'pageid'} = "Gradebook";
+ $FORM{'PAGEID'} = "GRADEBOOK";
+ $mainttmplt = "frgradebooks";
}
+ }
- my @tempacl = &popEmlAcl($SESSION{'clid'});
- foreach (@tempacl) {
- $CLIENT{'emlaclstr'} .= "$_,";
- }
- $CLIENT{'emlaclstr'} =~ s/@//g;
- $CLIENT{'emlaclstr'} =~ s/,$//g;
-
+ my @tempacl = &popEmlAcl($SESSION{'clid'});
+ foreach (@tempacl) {
+ $CLIENT{'emlaclstr'} .= "$_,";
+ }
+ $CLIENT{'emlaclstr'} =~ s/@//g;
+ $CLIENT{'emlaclstr'} =~ s/,$//g;
-
- if ($FORM{'idx'} eq '1') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/I");
- if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'gadmin' || $SESSION{'uac'} eq 'madmin') {
- &show_template("sadminidx");
- } else {
- &show_template("cndidx");
- }
- } elsif ($FORM{'dtl'} eq '0') {
- print "\n$xlatphrase[539]
$xlatphrase[540]\n";
- } elsif ($FORM{'dtl'} eq '1') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CM");
- if ($SESSION{'uac'} eq 'gadmin') {
- &show_admin_request("maintclient");
- } else {
- $FORM{'dbop'} = 'ccupd';
- &show_admin_request("cdef");
- }
- } elsif ($FORM{'dtl'} eq '12') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TR");
- &show_admin_request("treplicaframe");
- } elsif ($FORM{'dtl'} eq '13') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TO");
- &show_admin_request("tocrinpframe");
- } elsif ($FORM{'dtl'} eq '2') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TM");
- $TEST{'id'} = $FORM{'tstid'};
- &show_admin_request("tdefframe");
- } elsif ($FORM{'dtl'} eq '21') {
- if ($SESSION{'uac'} eq 'cnd') {
- $CANDIDATE{'ownedtests'} = &get_group_tests($SESSION{'clid'}, $SESSION{'uid'}, 0);
- }
- &show_admin_request("mainttest");
- } elsif ($FORM{'dtl'} eq '99') {
- &show_template("selectpg");
- } elsif ($FORM{'dtl'} eq '3') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/R");
- &show_admin_request("maintreport");
- } elsif ($FORM{'dtl'} eq '4') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DL");
- &show_admin_downloads;
- } elsif ($FORM{'dtl'} eq '5') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DB");
- &show_admin_request("maintdb");
- } elsif ($FORM{'dtl'} eq '6') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CF");
- # set FORM.colors
- $trash = join( $pathsep, $dataroot, "config.$SESSION{'clid'}");
- $omsg = "";
- open( CFGFILE, "<$trash" ) or $omsg="not found";
- if ($omsg eq 'not found') {
- $trash = join( $pathsep, $dataroot, "config.std");
- open( CFGFILE, "<$trash" ) or return;
- }
- @cfgentries = ;
- close CFGFILE;
- $langdef = "enu";
- $FORM{'colors'} = "";
- for (0 .. $#cfgentries) {
- chop ($cfgentries[$_]);
- ($entrykey,$entryvalue) = split(/=/, $cfgentries[$_]);
- if ($entrykey eq 'DEFAULTLANG') {
- $langdef = $entryvalue;
- $langselfr = ($langdef eq 'fr') ? " SELECTED" : "";
- $langselsp = ($langdef eq 'sp') ? " SELECTED" : "";
- $langseldeu = ($langdef eq 'deu') ? " SELECTED" : "";
- $langselenu = ($langdef eq 'enu') ? " SELECTED" : "";
- $langselena = ($langdef eq 'ena') ? " SELECTED" : "";
- $langseleuv = ($langdef eq 'euv') ? " SELECTED" : "";
- $langselcyr = ($langdef eq 'cyr') ? " SELECTED" : "";
- $langselmy = ($langdef eq 'my') ? " SELECTED" : "";
- $langselkor = ($langdef eq 'kor') ? " SELECTED" : "";
- $langselafr = ($langdef eq 'afr') ? " SELECTED" : "";
- $langselhin = ($langdef eq 'hin') ? " SELECTED" : "";
- $colortag = "
+ if ($FORM{'idx'} eq '1') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/I");
+ if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'gadmin' || $SESSION{'uac'} eq 'madmin') {
+ &show_template("sadminidx");
+ } else {
+ &show_template("cndidx");
+ }
+ } elsif ($FORM{'dtl'} eq '0') {
+ print "\n$xlatphrase[539]
$xlatphrase[540]\n";
+ } elsif ($FORM{'dtl'} eq '1') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CM");
+ if ($SESSION{'uac'} eq 'gadmin') {
+ &show_admin_request("maintclient");
+ } else {
+ $FORM{'dbop'} = 'ccupd';
+ &show_admin_request("cdef");
+ }
+ } elsif ($FORM{'dtl'} eq '12') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TR");
+ &show_admin_request("treplicaframe");
+ } elsif ($FORM{'dtl'} eq '13') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TO");
+ &show_admin_request("tocrinpframe");
+ } elsif ($FORM{'dtl'} eq '2') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TM");
+ $TEST{'id'} = $FORM{'tstid'};
+ &show_admin_request("tdefframe");
+ } elsif ($FORM{'dtl'} eq '21') {
+ if ($SESSION{'uac'} eq 'cnd') {
+ $CANDIDATE{'ownedtests'} = &get_group_tests($SESSION{'clid'}, $SESSION{'uid'}, 0);
+ }
+ &show_admin_request("mainttest");
+ } elsif ($FORM{'dtl'} eq '99') {
+ &show_template("selectpg");
+ } elsif ($FORM{'dtl'} eq '3') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/R");
+ &show_admin_request("maintreport");
+ } elsif ($FORM{'dtl'} eq '4') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DL");
+ &show_admin_downloads;
+ } elsif ($FORM{'dtl'} eq '5') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DB");
+ &show_admin_request("maintdb");
+ } elsif ($FORM{'dtl'} eq '6') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CF");
+ # set FORM.colors
+ $trash = join( $pathsep, $dataroot, "config.$SESSION{'clid'}");
+ $omsg = "";
+ open( CFGFILE, "<$trash" ) or $omsg="not found";
+ if ($omsg eq 'not found') {
+ $trash = join( $pathsep, $dataroot, "config.std");
+ open( CFGFILE, "<$trash" ) or return;
+ }
+ @cfgentries = ;
+ close CFGFILE;
+ $langdef = "enu";
+ $FORM{'colors'} = "";
+ for (0 .. $#cfgentries) {
+ chop ($cfgentries[$_]);
+ ($entrykey,$entryvalue) = split(/=/, $cfgentries[$_]);
+ if ($entrykey eq 'DEFAULTLANG') {
+ $langdef = $entryvalue;
+ $langselfr = ($langdef eq 'fr') ? " SELECTED" : "";
+ $langselsp = ($langdef eq 'sp') ? " SELECTED" : "";
+ $langseldeu = ($langdef eq 'deu') ? " SELECTED" : "";
+ $langselenu = ($langdef eq 'enu') ? " SELECTED" : "";
+ $langselena = ($langdef eq 'ena') ? " SELECTED" : "";
+ $langseleuv = ($langdef eq 'euv') ? " SELECTED" : "";
+ $langselcyr = ($langdef eq 'cyr') ? " SELECTED" : "";
+ $langselmy = ($langdef eq 'my') ? " SELECTED" : "";
+ $langselkor = ($langdef eq 'kor') ? " SELECTED" : "";
+ $langselafr = ($langdef eq 'afr') ? " SELECTED" : "";
+ $langselhin = ($langdef eq 'hin') ? " SELECTED" : "";
+ $colortag = "
$xlatphrase[541]\ \;
|
@@ -145,9 +154,9 @@ if (&get_session($FORM{'tid'})) {
\n";
- $FORM{'language'} = join('', $colortag, $FORM{'language'});
- } elsif ($entrykey eq 'IP_ACCESS_FILTER') {
- $FORM{'language'} = "
+ $FORM{'language'} = join('', $colortag, $FORM{'language'});
+ } elsif ($entrykey eq 'IP_ACCESS_FILTER') {
+ $FORM{'language'} = "
$xlatphrase[385]\ \;
|
@@ -155,63 +164,63 @@ if (&get_session($FORM{'tid'})) {
\n";
- } else {
- if ($entrykey eq 'BACKGROUND') {
- $colortag = "
+ } else {
+ if ($entrykey eq 'BACKGROUND') {
+ $colortag = "
$entrykey:\ \; |
|
\n";
- } else {
- if (($entrykey =~ /COLOR/)
- || ($entrykey =~ 'LINK')
- || ($entrykey =~ 'ALINK')
- || ($entrykey =~ 'VLINK')
- || ($entrykey eq 'TEXT') ) {
- $gotfocus = "onFocus=\"return tGotFocus(this)\"";
- } else {
- $gotfocus = "";
- }
- $colortag = "
+ } else {
+ if (($entrykey =~ /COLOR/)
+ || ($entrykey =~ 'LINK')
+ || ($entrykey =~ 'ALINK')
+ || ($entrykey =~ 'VLINK')
+ || ($entrykey eq 'TEXT') ) {
+ $gotfocus = "onFocus=\"return tGotFocus(this)\"";
+ } else {
+ $gotfocus = "";
+ }
+ $colortag = "
$entrykey:\ \; |
|
\n";
- }
- $FORM{'colors'} = join('', $FORM{'colors'}, $colortag);
- }
}
- &show_admin_request("maintcfg");
- } elsif ($FORM{'dtl'} eq '7') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/GP");
- &show_admin_request($mainttmplt);
- } elsif ($FORM{'dtl'} eq '8') {
-#Begin filtering
- $filterbydate = $FORM{'filterbydate'};
- $day_filter = $FORM{'day_filter'};
- $date_filter = $FORM{'date_filter'};
- $cnd1_filter = $FORM{'cnd1'};
- $cnd2_filter = $FORM{'cnd2'};
- $cnd3_filter = $FORM{'cnd3'};
- $cnd4_filter = $FORM{'cnd4'};
-#End filtering
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CC");
- &show_admin_request("maintcnd");
- } elsif ($FORM{'dtl'} eq '9') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/RG");
- &show_admin_request("regcnd");
- } elsif ($FORM{'dtl'} eq '10') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/IM");
- &show_admin_request("upimport");
- } elsif ($FORM{'dtl'} eq '11') {
- &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/LC");
- &show_admin_request("frlicadmin");
- } elsif ($FORM{'dbop'} ne '') {
- &show_dbop_response;
- } else {
- &show_illegal_access_warning;
+ $FORM{'colors'} = join('', $FORM{'colors'}, $colortag);
+ }
}
+ &show_admin_request("maintcfg");
+ } elsif ($FORM{'dtl'} eq '7') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/GP");
+ &show_admin_request($mainttmplt);
+ } elsif ($FORM{'dtl'} eq '8') {
+ #Begin filtering
+ $filterbydate = $FORM{'filterbydate'};
+ $day_filter = $FORM{'day_filter'};
+ $date_filter = $FORM{'date_filter'};
+ $cnd1_filter = $FORM{'cnd1'};
+ $cnd2_filter = $FORM{'cnd2'};
+ $cnd3_filter = $FORM{'cnd3'};
+ $cnd4_filter = $FORM{'cnd4'};
+ #End filtering
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CC");
+ &show_admin_request("maintcnd");
+ } elsif ($FORM{'dtl'} eq '9') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/RG");
+ &show_admin_request("regcnd");
+ } elsif ($FORM{'dtl'} eq '10') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/IM");
+ &show_admin_request("upimport");
+ } elsif ($FORM{'dtl'} eq '11') {
+ &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/LC");
+ &show_admin_request("frlicadmin");
+ } elsif ($FORM{'dbop'} ne '') {
+ &show_dbop_response;
+ } else {
+ #&show_illegal_access_warning("else1");
+ }
} else {
- &logger::logerr("Unable to get session with &get_session($FORM{'tid'})");
- &show_illegal_access_warning;
+ &logger::logerr("Unable to get session with &get_session($FORM{'tid'})");
+ &show_illegal_access_warning("else2");
}
sub show_license_request {
@@ -479,5 +488,5 @@ window.onmouseup=right;
}
sub close_results {
- print "