Browse Source

Updates

master
Matthew Raymer 4 months ago
parent
commit
dc3bd7f715
  1. 2
      README.md
  2. 355
      survey-nginx/cgi-bin/login.pl
  3. 329
      survey-nginx/cgi-bin/sadmin.pl
  4. 0
      survey-nginx/cgi-bin/sdbtxt/de
  5. 0
      survey-nginx/cgi-bin/sdbtxt/en
  6. 0
      survey-nginx/cgi-bin/sdbtxt/es
  7. 0
      survey-nginx/cgi-bin/sdbtxt/fr
  8. 0
      survey-nginx/cgi-bin/sdbtxt/it
  9. 5
      survey-nginx/cgi-bin/sitecfg.pl
  10. 4554
      survey-nginx/cgi-bin/smilib.pl
  11. 154
      survey-nginx/cgi-bin/test.pl
  12. 9
      survey-nginx/fcgiwrap
  13. 0
      survey-nginx/htdocs/ATI/index.htm
  14. 0
      survey-nginx/htdocs/CISC/index.htm
  15. 0
      survey-nginx/htdocs/COMUG/index.htm
  16. 0
      survey-nginx/htdocs/COMUG/index.html
  17. 0
      survey-nginx/htdocs/Jane's Testing Center/index.htm
  18. 0
      survey-nginx/htdocs/absi/index.htm
  19. 0
      survey-nginx/htdocs/acts1/index.htm
  20. 0
      survey-nginx/htdocs/acts1/index.html.bak
  21. 0
      survey-nginx/htdocs/aig/docs/AD&D200kBrochureAG3360.pdf
  22. 0
      survey-nginx/htdocs/aig/index.htm
  23. 0
      survey-nginx/htdocs/ainav/index.htm
  24. 0
      survey-nginx/htdocs/aiper/index.htm
  25. 0
      survey-nginx/htdocs/alliant.edu/index.htm
  26. 0
      survey-nginx/htdocs/alliant.edu/index.html.old
  27. 0
      survey-nginx/htdocs/ati/index.htm
  28. 0
      survey-nginx/htdocs/avw/navy/go/.config.php.swm
  29. 0
      survey-nginx/htdocs/avw/navy/go/.config.php.swn
  30. 0
      survey-nginx/htdocs/avw/navy/go/.config.php.swo
  31. 0
      survey-nginx/htdocs/avw/navy/go/CHANGELOG
  32. 0
      survey-nginx/htdocs/avw/navy/go/DEVELOPERS
  33. 0
      survey-nginx/htdocs/avw/navy/go/FAQ
  34. 0
      survey-nginx/htdocs/avw/navy/go/Group-Office.php
  35. 0
      survey-nginx/htdocs/avw/navy/go/LICENSE.GPL
  36. 0
      survey-nginx/htdocs/avw/navy/go/README
  37. 0
      survey-nginx/htdocs/avw/navy/go/README.ldap
  38. 0
      survey-nginx/htdocs/avw/navy/go/RELEASE
  39. 0
      survey-nginx/htdocs/avw/navy/go/TODO
  40. 0
      survey-nginx/htdocs/avw/navy/go/TRANSLATORS
  41. 0
      survey-nginx/htdocs/avw/navy/go/about.php
  42. 0
      survey-nginx/htdocs/avw/navy/go/admin.php
  43. 0
      survey-nginx/htdocs/avw/navy/go/auth_sources.dist
  44. 0
      survey-nginx/htdocs/avw/navy/go/avw_session.php
  45. 0
      survey-nginx/htdocs/avw/navy/go/checker.php
  46. 0
      survey-nginx/htdocs/avw/navy/go/classes/admin.class.inc
  47. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/base.groups.class.inc
  48. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/base.security.class.inc
  49. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/base.users.class.inc
  50. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls.class.inc
  51. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/acl.class.inc
  52. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/acl.wh.class.inc
  53. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/button.class.inc
  54. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/checkbox.class.inc
  55. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/color_selector.class.inc
  56. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/datagrid.class.inc
  57. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/date_picker.class.inc
  58. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/dbrecord.class.inc
  59. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/dropbox.class.inc
  60. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/htmlarea.class.inc
  61. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/overlib.class.inc
  62. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/radio_list.class.inc
  63. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/select.class.inc
  64. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/statusbar.class.inc
  65. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/tabtable.class.inc
  66. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/testButton.php
  67. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/controls/treeview.class.inc
  68. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/crypto.class.inc
  69. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/email.auth.class.inc
  70. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/language.class.inc
  71. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/ldap.auth.class.inc
  72. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/ldap.groups.class.inc
  73. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/ldap.security.class.inc
  74. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/ldap.users.class.inc
  75. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/modules.class.inc
  76. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/passwd.groups.class.inc
  77. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/passwd.security.class.inc
  78. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/passwd.users.class.inc
  79. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/sql.auth.class.inc
  80. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/sql.groups.class.inc
  81. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/sql.security.class.inc
  82. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/sql.users.class.inc
  83. 0
      survey-nginx/htdocs/avw/navy/go/classes/base/theme.class.inc
  84. 0
      survey-nginx/htdocs/avw/navy/go/classes/dav.class.inc
  85. 0
      survey-nginx/htdocs/avw/navy/go/classes/filesystem.class.inc
  86. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/faq.css
  87. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/faq.htm
  88. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/courier.php
  89. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helvetica.php
  90. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helveticab.php
  91. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helveticabi.php
  92. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helveticai.php
  93. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1250.map
  94. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1251.map
  95. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1252.map
  96. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1253.map
  97. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1254.map
  98. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1255.map
  99. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1257.map
  100. 0
      survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1258.map

2
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 ssh actswac@104.238.116.218
Qbttxpsea1!
- Find names of software packages in the official CentOS repositories. - Find names of software packages in the official CentOS repositories.
Sample commands Sample commands

355
survey-nginx/cgi-bin/login.pl

@ -11,215 +11,220 @@ require 'testlib.pl';
&traceoutput("login.pl"); # TRACE IF ACTIVE &traceoutput("login.pl"); # TRACE IF ACTIVE
&app_initialize; &app_initialize;
$SESSION{'temptime'} = time();
$SESSION{'temptime'} = time();
$SESSION{'clid'} = $FORM{'clid'}; $SESSION{'clid'} = $FORM{'clid'};
$SESSION{'lang'} = $FORM{'lang'}; $SESSION{'lang'} = $FORM{'lang'};
&get_client_configuration(); &get_client_configuration();
&traceoutput("login.pl:$FORM{'clid'}:$FORM{'uid'}:$FORM{'pwd'}"); # TRACE IF ACTIVE &traceoutput("login.pl:$FORM{'clid'}:$FORM{'uid'}:$FORM{'pwd'}"); # TRACE IF ACTIVE
&setbrowsertype(); &setbrowsertype();
## DED Patch for secure_html/tests dir permission problem 2006/10/11 ## DED Patch for secure_html/tests dir permission problem 2006/10/11
if (! -x $testroot) { if (! -x $testroot) {
print STDERR "PERMS: $testroot is not X\n"; print STDERR "PERMS: $testroot is not X\n";
chmod(0777, $testroot); chmod(0777, $testroot);
} }
if ($FORM{'selfregister'} eq "Y") { if ($FORM{'selfregister'} eq "Y") {
unless ($SESSION{'clid'}) { unless ($SESSION{'clid'}) {
warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ; warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
&show_illegal_access_warning("user"); print STDERR "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
exit(); # &show_illegal_access_warning("user");
} exit();
&get_client_profile($SESSION{'clid'}); }
unless (%CLIENT) { &get_client_profile($SESSION{'clid'});
warn "ERROR: Invalid Client ID $FORM{'clid'} " ; unless (%CLIENT) {
&show_illegal_access_warning("user"); warn "ERROR: Invalid Client ID $FORM{'clid'} " ;
exit(); print STDERR "ERROR: Invalid Client ID $FORM{'clid'} " ;
} # &show_illegal_access_warning("user");
$CANDIDATE{'new'}="Y"; exit();
print "Content-Type: text/html\n\n"; }
&show_template("regsas"); $CANDIDATE{'new'}="Y";
print "Content-Type: text/html\n\n";
&show_template("regsas");
} elsif (&verifyaccess) { } elsif (&verifyaccess) {
&init_session; &init_session;
&LanguageSupportInit(); &LanguageSupportInit();
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "1"); &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "1");
$FORM{'notice'} = $SYSTEM{'message'}; $FORM{'notice'} = $SYSTEM{'message'};
### For redirect to regcnd & regsas ### For redirect to regcnd & regsas
$vars{'tid'} = $SESSION{'tid'}; $vars{'tid'} = $SESSION{'tid'};
$vars{'lang'} = $SESSION{'lang'}; $vars{'lang'} = $SESSION{'lang'};
$vars{'testid'} = $FORM{'testid'} if ($FORM{'testid'}) ; $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{'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'})); $vars{'direction'} = $FORM{'direction'} unless !(defined($FORM{'direction'}));
unless ($SESSION{'clid'}) { unless ($SESSION{'clid'}) {
warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ; warn "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
&show_illegal_access_warning("user"); print STDERR "ERROR: Empty Client ID in Form $FORM{'clid'} " ;
exit(); # &show_illegal_access_warning("user");
} exit();
&get_client_profile($SESSION{'clid'}); }
unless (%CLIENT || $SESSION{'clid'} eq 'std') { &get_client_profile($SESSION{'clid'});
warn "ERROR: Invalid Client ID $FORM{'clid'} " ; unless (%CLIENT || $SESSION{'clid'} eq 'std') {
&show_illegal_access_warning("user"); warn "ERROR: Invalid Client ID $FORM{'clid'} " ;
exit(); print STDERR "ERROR: Invalid Client ID $FORM{'clid'} " ;
} # &show_illegal_access_warning("user");
if ($SESSION{'taclid'} ne '') { 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");
&regdusr("regauto");
} else {
&get_tacl_profile();
&regdusr("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);
#&regdusr("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'} = "<IMG SRC=\"$PATHS{'graphroot'}/logo.gif\" BORDER=0>\n";
$CLIENT{'clorg'} = "ACTS Corporation";
&regdusr("frsadmin");
} elsif ($SESSION{'uac'} =~ /txlatr./ ) {
($FORM{'uac'},$FORM{'lang'}) = split(/\./, $SESSION{'uac'});
$CLIENT{'active'} = "X";
$CLIENT{'logo'} = "<IMG SRC=\"$PATHS{'graphroot'}/logo.gif\" BORDER=0>\n";
$CLIENT{'clorg'} = "ACTS Corporation";
print "<HTML>\n";
print "<HEAD>\n";
print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=$PATHS{'cgiroot'}/Interpreter.pl?tid=$SESSION{'tid'}&lang=$FORM{'lang'}\">\n";
print "</HEAD>\n";
print "<BODY>\n";
print "</BODY>\n";
print "</HTML>\n";
} elsif ($SESSION{'uac'} eq 'madmin') {
# Multiple-client admin
&regdusr("madmin");
} else {
# Client Test Administration
&get_client_profile($SESSION{'clid'});
&regdusr("frsadmin");
}
} else {
if ($FORM{'tadm'} ne '') {
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
my $opts = { restrict_to_availability_window => 1 }; if ($SESSION{'uac'} eq 'madmin') {
&set_session($SESSION{'tid'},'taclauthtests',$SESSION{'taclauthtests'}); # Multiple-client admin
&set_session($SESSION{'tid'},'uid',$SESSION{'taclid'}); &regdusr("madmin");
if ($FORM{'pwd'} eq '_____') {
&get_tacl_profile("regauto");
&regdusr("regauto");
} else { } else {
&get_tacl_profile(); # Client Test Administration
&regdusr("regtacl"); &get_client_profile($SESSION{'clid'});
&regdusr("frsadmin");
} }
} elsif ($FORM{'sas'} ne '') { } else {
## ^ support for wilcard login if (&checkinprogress($SESSION{'clid'}, $FORM{'uid'}) ) {
# register an account to the candidate # resume test at point of pause
my $opts = { restrict_to_availability_window => 1 }; &resumetest;
unless ($SESSION{'uid'}) {
warn "ERROR: Empty Candidate ID in Session data " ;
}
&get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'}, $opts);
#&regdusr("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'} = "<IMG SRC=\"$PATHS{'graphroot'}/logo.gif\" BORDER=0>\n";
$CLIENT{'clorg'} = "ACTS Corporation";
&regdusr("frsadmin");
} elsif ($SESSION{'uac'} =~ /txlatr./ ) {
($FORM{'uac'},$FORM{'lang'}) = split(/\./, $SESSION{'uac'});
$CLIENT{'active'} = "X";
$CLIENT{'logo'} = "<IMG SRC=\"$PATHS{'graphroot'}/logo.gif\" BORDER=0>\n";
$CLIENT{'clorg'} = "ACTS Corporation";
print "<HTML>\n";
print "<HEAD>\n";
print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0; URL=$PATHS{'cgiroot'}/Interpreter.pl?tid=$SESSION{'tid'}&lang=$FORM{'lang'}\">\n";
print "</HEAD>\n";
print "<BODY>\n";
print "</BODY>\n";
print "</HTML>\n";
} elsif ($SESSION{'uac'} eq 'madmin') {
# Multiple-client admin
&regdusr("madmin");
} else {
# Client Test Administration
&get_client_profile($SESSION{'clid'});
&regdusr("frsadmin");
}
} else { } else {
if ($FORM{'tadm'} ne '') { if ($FORM{'cnd'} ne '') {
print "Content-Type: text/html\n\n"; &get_client_profile($SESSION{'clid'});
if ($SESSION{'uac'} eq 'madmin') { my $opts = { restrict_to_availability_window => 1 };
# Multiple-client admin &get_candidate_profile($SESSION{'clid'}, $FORM{'uid'}, $opts);
&regdusr("madmin"); #print STDERR "clid: $SESSION{'clid'}, uid: $FORM{'uid'}, opts: $opts\n";
} else { if ($CANDIDATE{'grpowner'} eq 'Y') {
# Client Test Administration print "Content-Type: text/html\n\n";
&get_client_profile($SESSION{'clid'}); &show_template("frcnd");
&regdusr("frsadmin"); } elsif ($CANDIDATE{'registrar'} eq 'Y') {
} print "Content-Type: text/html\n\n";
&show_template("frcnd");
} else { } else {
if (&checkinprogress($SESSION{'clid'}, $FORM{'uid'}) ) { &redirect("regcnd", \%vars);
# 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'});
#&regdusr("regsas");
&redirect("regsas", \%vars);
}
}
} }
} else {
&get_candidate_profile($SESSION{'clid'}, $FORM{'uid'});
#&regdusr("regsas");
&redirect("regsas", \%vars);
}
} }
}
} }
}
} else { } else {
# Load Index.html # Load Index.html
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
if ($FORM{'home'} eq 'client') { if ($FORM{'home'} eq 'client') {
&get_client_profile($FORM{'clid'}); &get_client_profile($FORM{'clid'});
@lines = &get_template("cindex"); @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'} = "<IMG SRC=\"$graphroot/msgbpw.gif\" ALT=\"System Maintenance In Progress.\" BORDER=0>";
} else {
# uid is used
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgidu.gif\" ALT=\"Requested Login ID is not available.\" BORDER=0>";
}
} else { } else {
@lines = &get_template("shome"); &logger::loginfo("Incorrect passwd 4");
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgipb.gif\" ALT=\"Incorrect Password.\" BORDER=0>";
} }
if ($ipfilter ne '') { } else {
if ($ipfilter =~ /$ENV{'REMOTE_ADDR'}/ ) { if ($SYSTEM{'IP_ACCESS_FILTER'} ne '') {
# ip blocked if ($SYSTEM{'IP_ACCESS_FILTER'} =~ /$ENV{'REMOTE_ADDR'}/ ) {
if ($FORM{'sas'} eq '') { if ($FORM{'sas'} eq '') {
# uid or password were incorrect # uid or password were incorrect
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgbpw.gif\" ALT=\"System Maintenance In Progress.\" BORDER=0>"; &logger::loginfo("Incorrect passwd 3");
} else { $SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgbpw.gif\" ALT=\"Incorrect Password.\" BORDER=0>";
# uid is used
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgidu.gif\" ALT=\"Requested Login ID is not available.\" BORDER=0>";
}
} else { } else {
&logger::loginfo("Incorrect passwd 4"); # uid is used
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgipb.gif\" ALT=\"Incorrect Password.\" BORDER=0>"; $SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgidu.gif\" ALT=\"Requested Login ID is not available.\" BORDER=0>";
} }
} else {
&logger::loginfo("Incorrect passwd 2");
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgipb.gif\" ALT=\"Incorrect Password.\" BORDER=0>";
}
} else { } else {
if ($SYSTEM{'IP_ACCESS_FILTER'} ne '') { if ($FORM{'sas'} eq '') {
if ($SYSTEM{'IP_ACCESS_FILTER'} =~ /$ENV{'REMOTE_ADDR'}/ ) { # uid or password were incorrect
if ($FORM{'sas'} eq '') { &logger::loginfo("Incorrect passwd 1");
# uid or password were incorrect $SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgbpw.gif\" ALT=\"Incorrect Password.\" BORDER=0>";
&logger::loginfo("Incorrect passwd 3"); } else {
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgbpw.gif\" ALT=\"Incorrect Password.\" BORDER=0>"; # uid is used
} else { $SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgidu.gif\" ALT=\"Requested Login ID is not available.\" BORDER=0>";
# uid is used }
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgidu.gif\" ALT=\"Requested Login ID is not available.\" BORDER=0>";
}
} else {
&logger::loginfo("Incorrect passwd 2");
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgipb.gif\" ALT=\"Incorrect Password.\" BORDER=0>";
}
} else {
if ($FORM{'sas'} eq '') {
# uid or password were incorrect
&logger::loginfo("Incorrect passwd 1");
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgbpw.gif\" ALT=\"Incorrect Password.\" BORDER=0>";
} else {
# uid is used
$SYSTEM{'message'} = "<IMG SRC=\"$graphroot/msgidu.gif\" ALT=\"Requested Login ID is not available.\" BORDER=0>";
}
}
}
foreach $line (@lines) {
$line = &xlatline($line);
} }
}
foreach $line (@lines) {
$line = &xlatline($line);
}
} }
sub resumetest { sub resumetest {
print "RESUMING TEST<BR>\n"; print "RESUMING TEST<BR>\n";
print "<INPUT TYPE=TEXT NAME=\"tid\" VALUE=\"$FORM{'tid'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"tid\" VALUE=\"$FORM{'tid'}\"><BR>\n";
print "<INPUT TYPE=TEXT NAME=\"uid\" VALUE=\"$FORM{'uid'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"uid\" VALUE=\"$FORM{'uid'}\"><BR>\n";
print "<INPUT TYPE=TEXT NAME=\"pwd\" VALUE=\"$FORM{'pwd'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"pwd\" VALUE=\"$FORM{'pwd'}\"><BR>\n";
print "<INPUT TYPE=TEXT NAME=\"uac\" VALUE=\"$FORM{'uac'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"uac\" VALUE=\"$FORM{'uac'}\"><BR>\n";
} }
sub test { sub test {
print "<INPUT TYPE=TEXT NAME=\"tid\" VALUE=\"$FORM{'tid'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"tid\" VALUE=\"$FORM{'tid'}\"><BR>\n";
print "<INPUT TYPE=TEXT NAME=\"uid\" VALUE=\"$FORM{'uid'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"uid\" VALUE=\"$FORM{'uid'}\"><BR>\n";
print "<INPUT TYPE=TEXT NAME=\"pwd\" VALUE=\"$FORM{'pwd'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"pwd\" VALUE=\"$FORM{'pwd'}\"><BR>\n";
print "<INPUT TYPE=TEXT NAME=\"uac\" VALUE=\"$FORM{'uac'}\"><BR>\n"; print "<INPUT TYPE=TEXT NAME=\"uac\" VALUE=\"$FORM{'uac'}\"><BR>\n";
&showenv; &showenv;
} }

329
survey-nginx/cgi-bin/sadmin.pl

@ -4,7 +4,15 @@
# #
# Source File: sadmin.pl # Source File: sadmin.pl
#use strict;
use warnings;
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
#warningsToBrowser(1);
#fatalsToBrowser(1);
# Get config # Get config
require 'sitecfg.pl'; require 'sitecfg.pl';
require 'testlib.pl'; require 'testlib.pl';
@ -12,120 +20,121 @@ require 'testlib.pl';
print "Content-Type: text/html\n\n"; print "Content-Type: text/html\n\n";
if (&get_session($FORM{'tid'})) { #print $logroot;
&LanguageSupportInit(); my $tid = $FORM{'tid'};
unless ($SESSION{'clid'}) {
warn "ERROR: Empty Client ID in Session data for Session ID $FORM{'tid'} " ; if (&get_session($tid)) {
&show_illegal_access_warning("user"); &LanguageSupportInit();
exit(); unless ($SESSION{'clid'}) {
} warn "ERROR: Empty Client ID in Session data for Session ID $FORM{'tid'} " ;
if ($SESSION{'clid'} ne 'std') { #&show_illegal_access_warning("user");
&get_client_profile($SESSION{'clid'}); exit();
unless (%CLIENT) { }
warn "ERROR: Invalid Client ID $SESSION{'clid'} in Session ID $FORM{'tid'} " ; if ($SESSION{'clid'} ne 'std') {
&show_illegal_access_warning("user"); &get_client_profile($SESSION{'clid'});
exit(); 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') { if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'madmin') {
$FORM{'pageid'} = "Group"; $FORM{'pageid'} = "Group";
$FORM{'PAGEID'} = "GROUP"; $FORM{'PAGEID'} = "GROUP";
$mainttmplt = "frgrpadmin"; $mainttmplt = "frgrpadmin";
} else { } else {
&get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'}); &get_candidate_profile($SESSION{'clid'}, $SESSION{'uid'});
unless (%CANDIDATE) { unless (%CANDIDATE) {
warn "ERROR: Invalid Candidate ID $SESSION{'uid'} for Client $SESSION{'clid'} in Session ID $FORM{'tid'} " ; 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(); exit();
} }
$FORM{'pageid'} = "Gradebook"; $FORM{'pageid'} = "Gradebook";
$FORM{'PAGEID'} = "GRADEBOOK"; $FORM{'PAGEID'} = "GRADEBOOK";
$mainttmplt = "frgradebooks"; $mainttmplt = "frgradebooks";
}
} }
}
my @tempacl = &popEmlAcl($SESSION{'clid'}); my @tempacl = &popEmlAcl($SESSION{'clid'});
foreach (@tempacl) { foreach (@tempacl) {
$CLIENT{'emlaclstr'} .= "$_,"; $CLIENT{'emlaclstr'} .= "$_,";
} }
$CLIENT{'emlaclstr'} =~ s/@//g; $CLIENT{'emlaclstr'} =~ s/@//g;
$CLIENT{'emlaclstr'} =~ s/,$//g; $CLIENT{'emlaclstr'} =~ s/,$//g;
if ($FORM{'idx'} eq '1') {
if ($FORM{'idx'} eq '1') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/I");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/I"); if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'gadmin' || $SESSION{'uac'} eq 'madmin') {
if ($SESSION{'uac'} eq 'admin' || $SESSION{'uac'} eq 'gadmin' || $SESSION{'uac'} eq 'madmin') { &show_template("sadminidx");
&show_template("sadminidx"); } else {
} else { &show_template("cndidx");
&show_template("cndidx"); }
} } elsif ($FORM{'dtl'} eq '0') {
} elsif ($FORM{'dtl'} eq '0') { print "<HTML>\n$xlatphrase[539]<BR>$xlatphrase[540]</HTML>\n";
print "<HTML>\n$xlatphrase[539]<BR>$xlatphrase[540]</HTML>\n"; } elsif ($FORM{'dtl'} eq '1') {
} elsif ($FORM{'dtl'} eq '1') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CM");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CM"); if ($SESSION{'uac'} eq 'gadmin') {
if ($SESSION{'uac'} eq 'gadmin') { &show_admin_request("maintclient");
&show_admin_request("maintclient"); } else {
} else { $FORM{'dbop'} = 'ccupd';
$FORM{'dbop'} = 'ccupd'; &show_admin_request("cdef");
&show_admin_request("cdef"); }
} } elsif ($FORM{'dtl'} eq '12') {
} elsif ($FORM{'dtl'} eq '12') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TR");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TR"); &show_admin_request("treplicaframe");
&show_admin_request("treplicaframe"); } elsif ($FORM{'dtl'} eq '13') {
} elsif ($FORM{'dtl'} eq '13') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TO");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TO"); &show_admin_request("tocrinpframe");
&show_admin_request("tocrinpframe"); } elsif ($FORM{'dtl'} eq '2') {
} elsif ($FORM{'dtl'} eq '2') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TM");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/TM"); $TEST{'id'} = $FORM{'tstid'};
$TEST{'id'} = $FORM{'tstid'}; &show_admin_request("tdefframe");
&show_admin_request("tdefframe"); } elsif ($FORM{'dtl'} eq '21') {
} elsif ($FORM{'dtl'} eq '21') { if ($SESSION{'uac'} eq 'cnd') {
if ($SESSION{'uac'} eq 'cnd') { $CANDIDATE{'ownedtests'} = &get_group_tests($SESSION{'clid'}, $SESSION{'uid'}, 0);
$CANDIDATE{'ownedtests'} = &get_group_tests($SESSION{'clid'}, $SESSION{'uid'}, 0); }
} &show_admin_request("mainttest");
&show_admin_request("mainttest"); } elsif ($FORM{'dtl'} eq '99') {
} elsif ($FORM{'dtl'} eq '99') { &show_template("selectpg");
&show_template("selectpg"); } elsif ($FORM{'dtl'} eq '3') {
} elsif ($FORM{'dtl'} eq '3') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/R");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/R"); &show_admin_request("maintreport");
&show_admin_request("maintreport"); } elsif ($FORM{'dtl'} eq '4') {
} elsif ($FORM{'dtl'} eq '4') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DL");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DL"); &show_admin_downloads;
&show_admin_downloads; } elsif ($FORM{'dtl'} eq '5') {
} elsif ($FORM{'dtl'} eq '5') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DB");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/DB"); &show_admin_request("maintdb");
&show_admin_request("maintdb"); } elsif ($FORM{'dtl'} eq '6') {
} elsif ($FORM{'dtl'} eq '6') { &log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CF");
&log_entry($SESSION{'clid'}, $SESSION{'uid'}, "2", "SA/CF"); # set FORM.colors
# set FORM.colors $trash = join( $pathsep, $dataroot, "config.$SESSION{'clid'}");
$trash = join( $pathsep, $dataroot, "config.$SESSION{'clid'}"); $omsg = "";
$omsg = ""; open( CFGFILE, "<$trash" ) or $omsg="not found";
open( CFGFILE, "<$trash" ) or $omsg="not found"; if ($omsg eq 'not found') {
if ($omsg eq 'not found') { $trash = join( $pathsep, $dataroot, "config.std");
$trash = join( $pathsep, $dataroot, "config.std"); open( CFGFILE, "<$trash" ) or return;
open( CFGFILE, "<$trash" ) or return; }
} @cfgentries = <CFGFILE>;
@cfgentries = <CFGFILE>; close CFGFILE;
close CFGFILE; $langdef = "enu";
$langdef = "enu"; $FORM{'colors'} = "";
$FORM{'colors'} = ""; for (0 .. $#cfgentries) {
for (0 .. $#cfgentries) { chop ($cfgentries[$_]);
chop ($cfgentries[$_]); ($entrykey,$entryvalue) = split(/=/, $cfgentries[$_]);
($entrykey,$entryvalue) = split(/=/, $cfgentries[$_]); if ($entrykey eq 'DEFAULTLANG') {
if ($entrykey eq 'DEFAULTLANG') { $langdef = $entryvalue;
$langdef = $entryvalue; $langselfr = ($langdef eq 'fr') ? " SELECTED" : "";
$langselfr = ($langdef eq 'fr') ? " SELECTED" : ""; $langselsp = ($langdef eq 'sp') ? " SELECTED" : "";
$langselsp = ($langdef eq 'sp') ? " SELECTED" : ""; $langseldeu = ($langdef eq 'deu') ? " SELECTED" : "";
$langseldeu = ($langdef eq 'deu') ? " SELECTED" : ""; $langselenu = ($langdef eq 'enu') ? " SELECTED" : "";
$langselenu = ($langdef eq 'enu') ? " SELECTED" : ""; $langselena = ($langdef eq 'ena') ? " SELECTED" : "";
$langselena = ($langdef eq 'ena') ? " SELECTED" : ""; $langseleuv = ($langdef eq 'euv') ? " SELECTED" : "";
$langseleuv = ($langdef eq 'euv') ? " SELECTED" : ""; $langselcyr = ($langdef eq 'cyr') ? " SELECTED" : "";
$langselcyr = ($langdef eq 'cyr') ? " SELECTED" : ""; $langselmy = ($langdef eq 'my') ? " SELECTED" : "";
$langselmy = ($langdef eq 'my') ? " SELECTED" : ""; $langselkor = ($langdef eq 'kor') ? " SELECTED" : "";
$langselkor = ($langdef eq 'kor') ? " SELECTED" : ""; $langselafr = ($langdef eq 'afr') ? " SELECTED" : "";
$langselafr = ($langdef eq 'afr') ? " SELECTED" : ""; $langselhin = ($langdef eq 'hin') ? " SELECTED" : "";
$langselhin = ($langdef eq 'hin') ? " SELECTED" : ""; $colortag = "<TR>
$colortag = "<TR>
<TD align=right> <TD align=right>
$xlatphrase[541]\&nbsp\; $xlatphrase[541]\&nbsp\;
</TD> </TD>
@ -145,9 +154,9 @@ if (&get_session($FORM{'tid'})) {
</SELECT> </SELECT>
</TD> </TD>
</TR>\n"; </TR>\n";
$FORM{'language'} = join('', $colortag, $FORM{'language'}); $FORM{'language'} = join('', $colortag, $FORM{'language'});
} elsif ($entrykey eq 'IP_ACCESS_FILTER') { } elsif ($entrykey eq 'IP_ACCESS_FILTER') {
$FORM{'language'} = " <TR> $FORM{'language'} = " <TR>
<TD align=right width=50\%> <TD align=right width=50\%>
$xlatphrase[385]\&nbsp\; $xlatphrase[385]\&nbsp\;
</TD> </TD>
@ -155,63 +164,63 @@ if (&get_session($FORM{'tid'})) {
<INPUT TYPE=TEXT NAME=\"C$entrykey\" VALUE=\"$entryvalue\" onChange=\"reset_autotimer()\"> <INPUT TYPE=TEXT NAME=\"C$entrykey\" VALUE=\"$entryvalue\" onChange=\"reset_autotimer()\">
</TD> </TD>
</TR>\n"; </TR>\n";
} else { } else {
if ($entrykey eq 'BACKGROUND') { if ($entrykey eq 'BACKGROUND') {
$colortag = " <TR> $colortag = " <TR>
<TD align=right><font size=1>$entrykey:\&nbsp\;</font></TD> <TD align=right><font size=1>$entrykey:\&nbsp\;</font></TD>
<TD align=left><INPUT TYPE=FILE NAME=\"C$entrykey\" VALUE=\"$entryvalue\" onChange=\"reset_autotimer()\"></TD> <TD align=left><INPUT TYPE=FILE NAME=\"C$entrykey\" VALUE=\"$entryvalue\" onChange=\"reset_autotimer()\"></TD>
</TR>\n"; </TR>\n";
} else { } else {
if (($entrykey =~ /COLOR/) if (($entrykey =~ /COLOR/)
|| ($entrykey =~ 'LINK') || ($entrykey =~ 'LINK')
|| ($entrykey =~ 'ALINK') || ($entrykey =~ 'ALINK')
|| ($entrykey =~ 'VLINK') || ($entrykey =~ 'VLINK')
|| ($entrykey eq 'TEXT') ) { || ($entrykey eq 'TEXT') ) {
$gotfocus = "onFocus=\"return tGotFocus(this)\""; $gotfocus = "onFocus=\"return tGotFocus(this)\"";
} else { } else {
$gotfocus = ""; $gotfocus = "";
} }
$colortag = " <TR> $colortag = " <TR>
<TD align=right nowrap><font size=1>$entrykey:\&nbsp\;</font></TD> <TD align=right nowrap><font size=1>$entrykey:\&nbsp\;</font></TD>
<TD align=left><INPUT TYPE=TEXT NAME=\"C$entrykey\" SIZE=8 MAXLENGTH=7 VALUE=\"$entryvalue\" $gotfocus onChange=\"reset_autotimer()\"></TD> <TD align=left><INPUT TYPE=TEXT NAME=\"C$entrykey\" SIZE=8 MAXLENGTH=7 VALUE=\"$entryvalue\" $gotfocus onChange=\"reset_autotimer()\"></TD>
</TR>\n"; </TR>\n";
}
$FORM{'colors'} = join('', $FORM{'colors'}, $colortag);
}
} }
&show_admin_request("maintcfg"); $FORM{'colors'} = join('', $FORM{'colors'}, $colortag);
} 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;
} }
&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 { } else {
&logger::logerr("Unable to get session with &get_session($FORM{'tid'})"); &logger::logerr("Unable to get session with &get_session($FORM{'tid'})");
&show_illegal_access_warning; &show_illegal_access_warning("else2");
} }
sub show_license_request { sub show_license_request {
@ -479,5 +488,5 @@ window.onmouseup=right;
} }
sub close_results { sub close_results {
print "</BODY>\n</HTML>\n"; print "<DIV>HERE</DIV></BODY>\n</HTML>\n";
} }

0
survey-nginx/cgi-bin/sdbtxt/de

0
survey-nginx/cgi-bin/sdbtxt/en

0
survey-nginx/cgi-bin/sdbtxt/es

0
survey-nginx/cgi-bin/sdbtxt/fr

0
survey-nginx/cgi-bin/sdbtxt/it

5
survey-nginx/cgi-bin/sitecfg.pl

@ -75,14 +75,15 @@ $fieldsep = ';';
$idmax = 1000; $idmax = 1000;
$hostid = 4; $hostid = 4;
require 'smilib.pl'; require 'smilib.pl';
require 'cybertestlib.pl'; require 'cybertestlib.pl';
require 'maillib.pl'; require 'maillib.pl';
# #
# THIS IS DEVELOPMENT SETTING *ONLY*! DO NOT COMMIT THIS CHANGE!! # THIS IS DEVELOPMENT SETTING *ONLY*! DO NOT COMMIT THIS CHANGE!!
# #
$docroot = $ENV{DOCUMENT_ROOT}; $docroot = $ENV{DOCUMENT_ROOT};
$docroot =~ s/\/htdocs\s*$//g; $docroot =~ s/\/htdocs\s*$//g;
$urlroot = "/cgi-bin"; $urlroot = "/cgi-bin";
@ -115,7 +116,7 @@ $PATHS{'pubroot'} = $pubroot;
$PATHS{'logroot'} = $logroot; $PATHS{'logroot'} = $logroot;
$PATHS{'dataroot'} = $dataroot; $PATHS{'dataroot'} = $dataroot;
$PATHS{'secroot'} = $secroot; $PATHS{'secroot'} = $secroot;
$PATHS{'logroot'} = $logroot; #$PATHS{'logroot'} = $logroot;
$PATHS{'resptmplt'} = $resptmplt; $PATHS{'resptmplt'} = $resptmplt;
$PATHS{'questionroot'} = $questionroot; $PATHS{'questionroot'} = $questionroot;
$PATHS{'testroot'} = $testroot; $PATHS{'testroot'} = $testroot;

4554
survey-nginx/cgi-bin/smilib.pl

File diff suppressed because it is too large

154
survey-nginx/cgi-bin/test.pl

@ -1,96 +1,70 @@
#!/usr/bin/perl #!/usr/bin/perl
#use strict;
#use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
require 'sitecfg.pl'; require 'sitecfg.pl';
require 'testlib.pl';
&traceoutput("visitor.pl:$ENV{'HTTP_REFERER'}"); # TRACE IF ACTIVE print "Content-type: text/plain\n\n";
&app_initialize; # Get user IDs
my $real_user_id = $<;
print "Content-Type: text/html\n\n"; my $effective_user_id = $>;
$mtime = time; # Get group IDs
$today = &format_date_time("yyyy-mm-dd hh:nn:ss GMT", "1", "-10000", $mtime); my $real_group_id = $(;
my $effective_group_id = $);
$stdvisitorlog = join($pathsep, $secroot, "visitsstd.dat");
$clidvisitorlog = join($pathsep, $secroot, "visits$FORM{'clid'}.dat"); # Get group names
$defaultvisitlog = join($pathsep, $secroot, "visits.dat"); my $real_group_name = getgrgid($real_group_id);
my $effective_group_name = getgrgid($effective_group_id);
$msg = "";
if (($FORM{'clid'} eq '') || ($FORM{'clid'} eq 'sacc') || ($FORM{'clid'} eq 'std')) { # Print user and group information
open(VSTLOG,"<$stdvisitorlog") or $msg="not found"; print "Real User ID: $real_user_id\n";
if ($msg eq "not found") { print "Effective User ID: $effective_user_id\n";
$makeok = &make_file($stdvisitorlog, $defaultvisitlog, 1); print "Real Group ID: $real_group_id ($real_group_name)\n";
$msg = ($makeok == 1) ? "" : "failed"; print "Effective Group ID: $effective_group_id ($effective_group_name)\n";
open(VSTLOG,"<$stdvisitorlog") or $msg="not found";
} my $cgi = CGI->new($ENV{'QUERY_STRING'});
if ($msg eq '') { my %FORM = $cgi->Vars;
@visits = <VSTLOG>;
close VSTLOG; my $session_id = $FORM{'tid'};
}
$litmplt = "shome"; my $s_id = "sess.$session_id";
} else { my $directory = join($pathsep, $logroot);
open(VSTLOG,"<$clidvisitorlog") or $msg="not found"; my $trash = join($pathsep, $directory, $s_id);
if ($msg eq "not found") {
$makeok = &make_file($clidvisitorlog, $stdvisitorlog, 1); if (-d $directory) {
$msg = ($makeok == 1) ? "" : "failed"; print "Directory '$directory' exists.\n";
open(VSTLOG,"<$clidvisitorlog") or $msg="not found";
} # Check if the directory is readable
if ($msg eq '') { if (-r $directory) {
@visits = <VSTLOG>; print "Directory '$directory' is readable.\n";
close VSTLOG; } else {
} print "Directory '$directory' is not readable.\n";
$litmplt = "cindex"; }
$SESSION{'clid'} = $FORM{'clid'};
&get_client_profile($FORM{'clid'}); # Check if the directory is writable
} if (-w $directory) {
print "Directory '$directory' is writable.\n";
} else {
print "Directory '$directory' is not writable.\n";
}
} else {
print "Directory '$directory' does not exist.\n";
}
if ($FORM{'lang'} eq '') { # eval {
$lastvisit = -1; # open (my $SESSFILE, '>', $trash) or die "Could not open file '$trash': $!";
for (1 .. $#visits) { # print $SESSFILE "This is a test.\n";
@entries = split(/&/, $visits[$_]); # close($SESSFILE) or die "Could not close file '$trash': $!";
if ($entries[1] eq $ENV{'REMOTE_ADDR'}) { # };
$lastvisit = $_;
}
}
if ($lastvisit == -1) {
@languages=split(/\,/,$ENV{'HTTP_ACCEPT_LANGUAGE'});
if ($languages[0] eq 'en') {$languages[0]="enu";}
if ($languages[0] eq 'en-us') {$languages[0]="enu";}
if ($languages[0] eq 'ar') {$languages[0]="arb";}
if ($LANGUAGE_ID{$languages[0]} ne '') {
$FORM{'lang'} = $languages[0];
}
} else {
@visitdata = split(/&/, $visits[$lastvisit]);
$idx = $#visitdata - 1;
$FORM{'lang'} = $visitdata[$idx];
@visitdata = ();
}
}
@visits = (); # if ($@) {
# print $@
&LanguageSupportInit(); # }
$visitrec = join('&',$today,$ENV{'REMOTE_ADDR'},$ENV{'REMOTE_PORT'},$ENV{'HTTP_ACCEPT_LANGUAGE'},$ENV{'HTTP_USER_AGENT'},$SESSION{'lang'},"");
if (($FORM{'clid'} eq '') || ($FORM{'clid'} eq 'sacc') || ($FORM{'clid'} eq 'std')) {
open(VSTLOG,">>$stdvisitorlog");
} else {
open(VSTLOG,">>$clidvisitorlog");
}
print VSTLOG "$visitrec\n";
close VSTLOG;
print "$litmplt\n";
print "--------------------------------------------------------------------------\n";
$SESSION{'browserapp'} = ($ENV{'HTTP_USER_AGENT'} =~ /MSIE/ ) ? "MSIE" : "NSNV";
&traceoutput("visitor.pl:$litmplt"); # TRACE IF ACTIVE
&show_template($litmplt);
print "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n";
print "Content-type: text/html\n\n"; #while (my ($key, $value) = each %FORM) {
print "<html><body><h1>Test CGI Script</h1></body></html>\n\n"; # print "$key: $value\n";
print "\n\n"; #}
print "$docroot\n";
print "$secroot\n";
print $resptmplt;
print "\n\n";

9
survey-nginx/fcgiwrap

@ -2,8 +2,13 @@
name="fcgiwrap" name="fcgiwrap"
description="Simple server for running CGI applications over FastCGI" description="Simple server for running CGI applications over FastCGI"
command="/usr/bin/spawn-fcgi" command="/usr/bin/spawn-fcgi"
command_args="-s /var/run/fcgiwrap.socket -u nobody -g nogroup -P /var/run/fcgiwrap.pid /usr/bin/fcgiwrap > /var/log/fcgiwrap.log 2>&1" command_user="nginx:nginx"
command_args="-s /var/run/fcgiwrap.socket -u nginx -g nginx -P /var/run/fcgiwrap.pid /usr/bin/fcgiwrap > /var/log/fcgiwrap.log 2>&1"
pidfile="/var/run/fcgiwrap.pid" pidfile="/var/run/fcgiwrap.pid"
depend() {
use net
after nginx
}

0
survey-nginx/htdocs/ATI/index.htm

0
survey-nginx/htdocs/CISC/index.htm

0
survey-nginx/htdocs/COMUG/index.htm

0
survey-nginx/htdocs/COMUG/index.html

0
survey-nginx/htdocs/Jane's Testing Center/index.htm

0
survey-nginx/htdocs/absi/index.htm

0
survey-nginx/htdocs/acts1/index.htm

0
survey-nginx/htdocs/acts1/index.html.bak

0
survey-nginx/htdocs/aig/docs/AD&D200kBrochureAG3360.pdf

0
survey-nginx/htdocs/aig/index.htm

0
survey-nginx/htdocs/ainav/index.htm

0
survey-nginx/htdocs/aiper/index.htm

0
survey-nginx/htdocs/alliant.edu/index.htm

0
survey-nginx/htdocs/alliant.edu/index.html.old

0
survey-nginx/htdocs/ati/index.htm

0
survey-nginx/htdocs/avw/navy/go/.config.php.swm

0
survey-nginx/htdocs/avw/navy/go/.config.php.swn

0
survey-nginx/htdocs/avw/navy/go/.config.php.swo

0
survey-nginx/htdocs/avw/navy/go/CHANGELOG

0
survey-nginx/htdocs/avw/navy/go/DEVELOPERS

0
survey-nginx/htdocs/avw/navy/go/FAQ

0
survey-nginx/htdocs/avw/navy/go/Group-Office.php

0
survey-nginx/htdocs/avw/navy/go/LICENSE.GPL

0
survey-nginx/htdocs/avw/navy/go/README

0
survey-nginx/htdocs/avw/navy/go/README.ldap

0
survey-nginx/htdocs/avw/navy/go/RELEASE

0
survey-nginx/htdocs/avw/navy/go/TODO

0
survey-nginx/htdocs/avw/navy/go/TRANSLATORS

0
survey-nginx/htdocs/avw/navy/go/about.php

0
survey-nginx/htdocs/avw/navy/go/admin.php

0
survey-nginx/htdocs/avw/navy/go/auth_sources.dist

0
survey-nginx/htdocs/avw/navy/go/avw_session.php

0
survey-nginx/htdocs/avw/navy/go/checker.php

0
survey-nginx/htdocs/avw/navy/go/classes/admin.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/base.groups.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/base.security.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/base.users.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/acl.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/acl.wh.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/button.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/checkbox.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/color_selector.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/datagrid.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/date_picker.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/dbrecord.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/dropbox.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/htmlarea.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/overlib.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/radio_list.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/select.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/statusbar.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/tabtable.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/testButton.php

0
survey-nginx/htdocs/avw/navy/go/classes/base/controls/treeview.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/crypto.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/email.auth.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/language.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/ldap.auth.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/ldap.groups.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/ldap.security.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/ldap.users.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/modules.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/passwd.groups.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/passwd.security.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/passwd.users.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/sql.auth.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/sql.groups.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/sql.security.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/sql.users.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/base/theme.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/dav.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/filesystem.class.inc

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/faq.css

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/faq.htm

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/courier.php

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helvetica.php

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helveticab.php

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helveticabi.php

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/helveticai.php

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1250.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1251.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1252.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1253.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1254.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1255.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1257.map

0
survey-nginx/htdocs/avw/navy/go/classes/fpdf/font/makefont/cp1258.map

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save