#!/usr/bin/perl

# ---------------------------------------------------------------------------
#     CIWWEB.PL
#
#      Ver: 8_4_8
# ---------------------------------------------------------------------------
# SSI Web - Web Surveying System
# Copyright Sawtooth Software, Inc. 1998-2015. All rights reserved.
# Orem, UT  USA  (801) 477-4700
# Any modification of this script will be considered violation of
# copyright (with the exception of the first line which can be
# modified to reflect the correct path to the Perl interpreter)
# Any use of this script or its code for purposes outside of
# the systems created by Sawtooth Software is prohibited.
# ---------------------------------------------------------------------------
 use strict; package ssiwebciw8_4_8; if (exists($ENV{'MOD_PERL'}) && defined($ENV{'MOD_PERL'})) { ssiwebciw8_4_8::_bgw(); } else { $SIG{"ALRM"} = \&ssiwebciw8_4_8::_bgx; eval { alarm (180); ssiwebciw8_4_8::_bgw(); alarm (0); }; if($@) { my $error_msg = $@; eval { if ($error_msg =~ m/Sawtooth Software process time out/i) { my $long_msg = "Process timed out."; authlib8_4_8::_bqa(312, $long_msg, $long_msg, $@, 0); } else { authlib8_4_8::_bqa(313, "", "", $error_msg, 0); } }; if($@) { die("Sawtooth Software Error."); } } } sub _bgw { my $__a = 0; my $__b = ""; my $__c = ""; my $__d = 0; my $__e = 0; my $__f = 0; my $__g = 0; my $__h = 0; my $__i = ""; my $__j = ""; my $__k = ""; my $__l = 1; my $__m = ""; my $__n = 1; my $__o = 0; my $__p = ""; my $__q = 0; my $__r = 0; my $__s = 0; my $__t = 0; my $__u = ""; my $__v = 0; my $__w =0; if ($ENV{'PERLXS'} =~ m/PerlIS/i) { print "HTTP/1.1 200 OK\n"; } if ((exists($ENV{'SCRIPT_FILENAME'}) || (defined ($ENV{'SCRIPT_FILENAME'})))) { $__k = $ENV{'SCRIPT_FILENAME'}; } if ($__k eq "") { $__k = $ENV{'PATH_TRANSLATED'}; $__k =~ tr[\\][/]; } $__k =~ s/(.+)\/.+$/$1/; unshift @INC, $__k; _bha("authlib8_4_8.pl", $__k); authlib8_4_8::_bmp(0); $authlib8_4_8::_bxv = $__k; _bha("ciwlib8_4_8.pl", $__k); ciwlib8_4_8::_bhc(); authlib8_4_8::_bnf(); authlib8_4_8::_bot(); if ($authlib8_4_8::_bzi{"hid_previous"} == 1) { $authlib8_4_8::_byl = 1; } elsif(exists $authlib8_4_8::_bzi{"sys_previous_button"} && $authlib8_4_8::_bzi{"sys_previous_button"} ne "") { $authlib8_4_8::_byl = 1; } if (keys(%authlib8_4_8::_bzi) == 1) { if (exists $authlib8_4_8::_bzi{"hid_s"}) { my $__x = $authlib8_4_8::_bzi{"hid_s"}; if ($__x ne "") { my $__y = 0; ($__u, $__r, $__i, $__s, $__y, $__v, $__w) = authlib8_4_8::_bnl($__x); $authlib8_4_8::_bzi{"hid_studyname"} = $__i; if($__y) { $authlib8_4_8::_bzi{"hid_test_mode"} = $__y; } $__q = 1; } } } $__j = authlib8_4_8::_bnt(0); if ((exists $authlib8_4_8::_bzi{"hid_bypass"}) && (defined $authlib8_4_8::_bzi{"hid_bypass"})) { authlib8_4_8::_bqa(101, "", "The \"hid_bypass\" method of logging into a survey has been removed. Please see the documentation for details on the current method.", ""); } if ((exists $authlib8_4_8::_bzi{"hid_pagenum"}) && (defined $authlib8_4_8::_bzi{"hid_pagenum"})) { $__e = $authlib8_4_8::_bzi{"hid_pagenum"}; } if ($__e == 1 || $__e == 0) { my $__z = ""; foreach $__z (keys %authlib8_4_8::_bzi) { $authlib8_4_8::_bws{uc($__z)} = $authlib8_4_8::_bzi{$__z}; } } if ((exists $authlib8_4_8::_bzi{"hid_studyname"}) && (defined $authlib8_4_8::_bzi{"hid_studyname"})) { $__i = $authlib8_4_8::_bzi{"hid_studyname"}; } elsif (exists $authlib8_4_8::_bws{"STUDYNAME"}) { $authlib8_4_8::_bzi{"hid_studyname"} = $authlib8_4_8::_bws{"STUDYNAME"}; $__i = $authlib8_4_8::_bzi{"hid_studyname"}; } else { if ($__i eq "") { $__i = authlib8_4_8::_bsm("hid_studyname"); if ($__i eq "") { $__i = authlib8_4_8::_bqb(); if ($__i eq "") { authlib8_4_8::_bqa(102, "", "Study name passed in is empty. Cannot find study name.", "", 1); } else { ciwlib8_4_8::_bhd(0, $__i); } } } } if ($__i =~ m/\W/g) { die(); } if (!exists $authlib8_4_8::_bzi{"hid_pagenum"} && !$__q) { if ($__e == 0 && !exists $authlib8_4_8::_bzi{"sys_input"}) { $__e = authlib8_4_8::_bsm("hid_pagenum"); if ($__e eq "") { ciwlib8_4_8::_bhd(1, $__i); } } } authlib8_4_8::_bnh($__i); authlib8_4_8::_bpv($__k); $authlib8_4_8::_byr = authlib8_4_8::_bob(); my($__cb, $__cc, $__cd) = authlib8_4_8::_bmq($authlib8_4_8::_byr); if (!$__cb) { authlib8_4_8::_bqa(199, "Log into the Admin Module for more information.", $__cc, $__cd); } if($__q) { if($__r) { my $__aa = ciwlib8_4_8::_bit($__r); if(exists $__aa->{"resp_num"}) { $authlib8_4_8::_bzi{"hid_respnum"} = $__aa->{"resp_num"}; } if(exists $__aa->{"last_question"}) { $__m = $__aa->{"last_question"}; } if ($__s) { $authlib8_4_8::_bzi{"hid_checksum"} = $__s; } else { $authlib8_4_8::_bzi{"hid_checksum"} = authlib8_4_8::_bnc("sys_CheckSum"); } if (exists $__aa->{"test_mode_settings"}) { $authlib8_4_8::_bzi{"hid_test_mode_settings"} = $__aa->{"test_mode_settings"}; } if ($__u == 0xFF01) { if ($__s != $__aa->{"checksum"} || $__v != $__aa->{"timestamp"} || $__w != $__aa->{"resp_num"} || $authlib8_4_8::_byz != $__aa->{"study_name"} || $authlib8_4_8::_bzi{"hid_test_mode"} != $__aa->{"test_mode"}) { my $__ab = "Expected_checksum=" . $__aa->{"checksum"} . ", actual_checksum=$__s"; $__ab .= ", expected_timestamp=" . $__aa->{"timestamp"} . ", actual_timestamp=$__v"; $__ab .= ", expected_respnum=" . $__aa->{"resp_num"} . ", actual_respnum=$__w"; $__ab .= ", expected_studyname=" . $__aa->{"study_name"} . ", actual_studyname=$__i"; $__ab .= ", version=$__u, id=$__r"; authlib8_4_8::_bqa(310, "URL values do not match expected values.", $__ab, ""); } } } $__n = 0; $__l = 0; $__e = -1; $__d = $authlib8_4_8::_bzi{"hid_respnum"}; } my $__ac = 0; ($__cb, $__cc, $__cd, $__ac) = authlib8_4_8::_boa(0); if (!$__cb) { authlib8_4_8::_bqa(204, "Log into the Admin Module for more information.", $__cc, $@); } if ($__j ne "") { authlib8_4_8::_bse(0, $__j); } if (exists $authlib8_4_8::_bzi{"hid_test_mode_settings"}) { if ($authlib8_4_8::_bzi{"hid_test_mode_settings"} eq "") { ciwlib8_4_8::_bjs(); } if ($authlib8_4_8::_bzi{"hid_test_mode_settings"} ne "") { ciwlib8_4_8::_bju(); } } if (exists $authlib8_4_8::_bzi{"hid_loadtest_mode"}) { $authlib8_4_8::_byb = $authlib8_4_8::_bzi{"hid_loadtest_mode"}; } authlib8_4_8::_bou(0, 1, ""); if ($authlib8_4_8::_bze->{"survey_paused"} == 1) { ciwlib8_4_8::_bif('_fm', 1); } if ($authlib8_4_8::_byl) { $__d = ciwlib8_4_8::_bia(); my @__ad = (); foreach my $__ae (grep(/hid_prev_/, (keys %authlib8_4_8::_bzi))) { my ($__ce,$__cf, $__by, $__cg) = split(",", $authlib8_4_8::_bzi{$__ae}); push(@__ad, [ $__cf, $__ce ]); delete $authlib8_4_8::_bzi{$__ae}; } @__ad = sort {$a->[1] <=> $b->[1]} @__ad; my @__af = reverse @{authlib8_4_8::_bof($__d)}; my @__ag = grep { $_->{"quest_version"} ne "0" } @__af; @__af = grep { $_->{"limbo"} == 0 } @__af; if ($__e > 1 && exists $authlib8_4_8::_bzi{"hid_pagetime"}) { my @__ah = (); ciwlib8_4_8::_bic(\@__ah, $__d, $__e, $authlib8_4_8::_bzi{"hid_pagetime"}); authlib8_4_8::_boc(\@__ah, $__d, 1, 1); authlib8_4_8::_bnu(\@__ah, $__d, 0); } if (@__af == 0 || @__ag == 0) { $__e = 0; } else { my $__ai = -1; my $__aj = 0; if ($__ag[0]->{"hop"} < $__ad[0]->[1]) { $__aj = $__ag[0]; $__ai = 0; } else { for (my $__ak = 0; $__ak < @__ag; $__ak++) { if ($__ag[$__ak]->{"hop"} <= $__ad[0]->[1]) { if ($__ak + 1 < @__ag) { $__aj = $__ag[$__ak + 1]; $__ai = $__ak + 1; last; } } } } if ($__aj) { my $__al = 0; if (exists $__aj->{"hop"}) { $__al = $__aj->{"hop"}; } else { authlib8_4_8::_bqa(260, "Backup Error.", "Error occured while backing up.", $@); } $__e = $__aj->{"page_num"}; $__t = $authlib8_4_8::_bzj->[$__e - 1]; my @__am = (); my $__an = ""; if ($__e > 1) { while (1) { eval { $__an = "SELECT `hop`,`quest_name` FROM `" . $authlib8_4_8::_bzb . "_history` WHERE `sys_RespNum`=" . $__d . " AND `page_num`=" . $__e . " AND `quest_version`!='0' AND `limbo`=0 AND `hop` <= $__al ORDER BY `hop` ASC"; @__am = @{$authlib8_4_8::_byw->selectall_arrayref(authlib8_4_8::_bmy($__an, 0), { Slice => {} })}; }; if ($@) { authlib8_4_8::_bqa(234, "Database error.", "Unable to connect retrieve history data. " . $authlib8_4_8::_byw->errstr, $@); } if (@__am == 0) { if ($__ai < @__ag) { $__aj = $__ag[++$__ai]; if (exists $__aj->{"hop"}) { $__al = $__aj->{"hop"}; $__e = $__aj->{"page_num"}; $__t = $authlib8_4_8::_bzj->[$__e - 1]; } else { authlib8_4_8::_bqa(260, "Backup Error.", "Error occured while backing up.", $@); } } else { last; } } else { last; } } if (@__am == 0) { $__e = 0; } else { my $__ao = 0; my $__ap = $__t->{'_g'}; my $__aq = @{$__ap}; my %__ar = (); my $__as = 2147483648; my $__at = $__as; for (my $__au = 0; $__au < $__aq; $__au++) { my $__av = $__ap->[$__au]; $__ar{$__av->{'_bgt'}} = $__as; } $__ao = @__am - 1; for (my $__ak = @__am - 1; $__ak >= 0; $__ak--) { my $__aw = ""; if ($__am[$__ak]->{"quest_name"} =~ m/^(.*?)\..*$/o) { $__aw = $1; } else { $__aw = $__am[$__ak]->{"quest_name"}; } if (exists $__ar{$__aw}) { if ($__ar{$__aw} == $__as) { $__ar{$__aw} = $__am[$__ak]->{"hop"}; } else { last; } if ($__am[$__ak]->{"hop"} < $__at) { $__at = $__am[$__ak]->{"hop"}; } } } for (my $__ak = 0; $__ak < $__aq; $__ak++) { my $__ax = $__ap->[$__ak]->{'_bgt'}; if (exists $__ar{$__ax} && $__ar{$__ax} != $__as) { $__m = $__ax; last; } } $authlib8_4_8::_bzi{"sys_prev_low_hop"} = $__at; my @__ay = (); for (my $__ak = 0; $__ak < @__af; $__ak++) { if ($__af[$__ak]->{"hop"} eq $__at) { @__ay = (@__ay, (0..$__ak)); last; } } foreach my $__ak (@__ay) { foreach my $__az (keys %{$__af[$__ak]->{"data"}}) { $authlib8_4_8::_bwu->{$__az} = 1; } } my $__ba = 0; eval { my $__an = "SELECT * FROM `" . $authlib8_4_8::_bzb . "_history` WHERE `sys_RespNum`=" . $__d . " AND `page_num`=" . $__e . " AND `quest_name`='hid_page_vars_history' AND `limbo`=0 AND `hop`>= " . $__al . " ORDER BY `hop` ASC"; my @__bb = @{$authlib8_4_8::_byw->selectall_arrayref(authlib8_4_8::_bmy($__an, 0), { Slice => {} })}; if (@__bb > 0) { $__ba = $__bb[0]; } }; if ($@) { authlib8_4_8::_bqa(279, "Database error.", "Unable to connect retrieve history data. " . $authlib8_4_8::_byw->errstr, $@); } delete $authlib8_4_8::_bzi{"hid_loops"}; delete $authlib8_4_8::_bzi{"hid_page_rand"}; if ($__ba) { eval { $__ba->{"data"} = eval(authlib8_4_8::_bmt($__ba->{"data"})); }; if ($@) { authlib8_4_8::_bqa(280, "Database error while retrieving history.", "Database error while evaling history.", $@); } if (exists $__ba->{"data"}->{"hid_SavedListNames"}) { my @__bc = split(",", $__ba->{"data"}->{"hid_SavedListNames"}); delete $__ba->{"data"}->{"hid_SavedListNames"}; my $__bd = ""; foreach $__bd (@__bc) { $authlib8_4_8::_bxp{$__bd} = $__ba->{"data"}->{$__bd}; delete $authlib8_4_8::_bwu->{$__bd}; delete $__ba->{"data"}->{$__bd}; } } %authlib8_4_8::_byi = (%authlib8_4_8::_byi, %{$__ba->{"data"}}); if (exists $authlib8_4_8::_byi{"hid_loops"}) { $authlib8_4_8::_bzi{"hid_loops"} = $authlib8_4_8::_byi{"hid_loops"}; } if (exists $authlib8_4_8::_byi{"hid_page_rand"}) { $authlib8_4_8::_bzi{"hid_page_rand"} = $authlib8_4_8::_byi{"hid_page_rand"}; } } } } else { $__e = 0; } } else { $__e = 0; } } } if (exists $authlib8_4_8::_bzi{"sys_acbc_byo_request"}) { my $__be = $authlib8_4_8::_bzi{"sys_acbc_name"}; $__d = ciwlib8_4_8::_bia(); my $__bf = authlib8_4_8::_bqx($__be); print acbclib8_4_8::_cix($__bf); exit(); } if (exists $authlib8_4_8::_bzi{"sys_input"}) { print authlib8_4_8::_bpm(); print authlib8_4_8::_boz(); exit(); } if ((exists $authlib8_4_8::_bzi{"hid_javascript"}) && (defined $authlib8_4_8::_bzi{"hid_javascript"})) { $__g = $authlib8_4_8::_bzi{"hid_javascript"}; } else { $__g = authlib8_4_8::_bsm("hid_javascript"); if ($__g eq "") { $__g = 0; } } if (exists $authlib8_4_8::_bzk->{'_bb'} && $__g == 0 && $__e == 1 && $authlib8_4_8::_byb != 1) { ciwlib8_4_8::_bif('_fn', 0); } $authlib8_4_8::_bzi{"hid_javascript"} = $__g; if ($__e > 1 && $authlib8_4_8::_byl == 0) { $__d = ciwlib8_4_8::_bia(); } elsif ($__e == 1) { my $__bg = ""; authlib8_4_8::_boo("enterlib8_4_8.pl"); if ($authlib8_4_8::_bze->{"close_survey"} == 1) { if (!exists $authlib8_4_8::_bzi{"hid_test_mode"}) { enterlib8_4_8::_cdr($__g); } } authlib8_4_8::_box(); if ($authlib8_4_8::_bzo) { if (exists $authlib8_4_8::_bzo->{'_bfx'}) { my $__bh = 0; my $__bi = 0; ($__bh, $__bi, $__d, $__bg) = enterlib8_4_8::_cdi($authlib8_4_8::_bzo->{'_bfx'}); if (!$__bh) { ciwlib8_4_8::_bif('_fd', 0); } elsif (!$__bi) { if ($__d) { $authlib8_4_8::_bzi{"hid_respnum"} = $__d; } ciwlib8_4_8::_bif('_fb', 0); } } if ($__d == 0 && exists $authlib8_4_8::_bzo->{'_bgv'}) { if (!exists $authlib8_4_8::_bzi{"hid_test_mode"}) { $__d = enterlib8_4_8::_cdj($__k); } } } if (exists($authlib8_4_8::_bzk->{'_do'}) && !exists($authlib8_4_8::_bzi{"hid_skip_transition"}) && $__g) { ciwlib8_4_8::_bjy($authlib8_4_8::_bzk->{'_do'}); authlib8_4_8::_bso(); } my $__bj = 0; if (exists $ciwlib8_4_8::_bkl{'_cts'}) { $__bj = 1; } elsif ($__d) { $authlib8_4_8::_bzi{"hid_respnum"} = $__d; $__f = 1; } elsif (exists $authlib8_4_8::_bzi{"hid_respnum"}) { $__d = ciwlib8_4_8::_bia(); } else { $__bj = 1; } if ($__f) { $__m = authlib8_4_8::_bnc("sys_LastQuestion"); if (exists $authlib8_4_8::_bws{"SYS_SKIPTO"}) { $__m = $authlib8_4_8::_bws{"SYS_SKIPTO"}; $__m = ciwlib8_4_8::_bjf($__m); $__n = 0; $__o = 1; } $__m = ciwlib8_4_8::_bjd($__d, $__m); } elsif($__bj) { my $__bk = 0; if (exists $authlib8_4_8::_bzk->{'_bhb'}) { $__d = enterlib8_4_8::_cdm(); } if (exists $ciwlib8_4_8::_bkl{'_cts'}) { $__d = $ciwlib8_4_8::_bkl{'_cts'}; } ($__d, $__bk) = enterlib8_4_8::_cdp($__d, $__bg, $__g); if ($authlib8_4_8::_bzo) { if (exists $authlib8_4_8::_bzo->{'_bgv'} && $__a != 1) { if (!exists $authlib8_4_8::_bzi{"hid_test_mode"}) { enterlib8_4_8::_cdk($__d, $__bk, $__k); } } } } if ($__d) { $authlib8_4_8::_bzi{"hid_respnum"} = $__d; } else { authlib8_4_8::_bqa(271, "", "Respondent number is empty.", ""); } } elsif ($__e == 0) { $authlib8_4_8::_bzi{"hid_javascript"} = 1; ciwlib8_4_8::_bii(1, "", 0, 1, $authlib8_4_8::_byz, 0, 0); authlib8_4_8::_bso(); } if ($__e == 1 && $__f) { $authlib8_4_8::_bzi{"hid_checksum"} = authlib8_4_8::_bnc("sys_CheckSum"); } if ($__q) { my $__bl = ""; my $__bm = ""; if (exists $authlib8_4_8::_bzk->{'_bc'}) { $__bl = authlib8_4_8::_bqk(); $__bm = authlib8_4_8::_bnc("sys_UserAgent"); } my $__bn = ""; my $__bo = ""; if (exists $authlib8_4_8::_bzk->{'_bd'}) { $__bn = authlib8_4_8::_bql(); $__bo = authlib8_4_8::_bnc("sys_IPAddress"); } if ($__bl ne $__bm || $__bn ne $__bo) { authlib8_4_8::_bqa(302, "The link to the survey that you are using will not work. Please enter the survey again using the original link that was given to you.", "A respondent attempted to use the survey page url with a different browser or IP address than they used originally. They were instructed to enter the survey using the original link that was sent to them.", "", 1); } if ($__m) { $__m = ciwlib8_4_8::_bjd($__d, $__m); } } my $__bp = authlib8_4_8::_bnc("sys_RespStatus"); if ($__bp == &authlib8_4_8::_CCX || $__bp == &authlib8_4_8::_CCW) { ciwlib8_4_8::_bif('_fc', 0); } if ($__g == 0) { if (authlib8_4_8::_bnc("sys_UserJavaScript") == 1) { $__g = 1; $authlib8_4_8::_bzi{"hid_javascript"} = $__g; } } if ($__e > 0 && $authlib8_4_8::_byl == 0) { authlib8_4_8::_boo("pverlib8_4_8.pl"); my $__bq = authlib8_4_8::_bsp(\%authlib8_4_8::_bxp); my $__br = authlib8_4_8::_bsp($authlib8_4_8::_byy); my $__bs = authlib8_4_8::_bsp(\%authlib8_4_8::_byi); pverlib8_4_8::_cec($__e,$__d); %authlib8_4_8::_bxp = %{$__bq}; $authlib8_4_8::_byy = $__br; %authlib8_4_8::_byi = %{$__bs}; $authlib8_4_8::_byd = ""; $authlib8_4_8::_bxt = 0; } my $__bt = []; my $__bu = []; if ($ciwlib8_4_8::_bkn && $authlib8_4_8::_byl) { if ($__f) { $__m = ""; } if ($authlib8_4_8::_bzi{"hid_destination"}) { $__m = $authlib8_4_8::_bzi{"hid_destination"}; } } else { if ($__f) { if ($authlib8_4_8::_bxw) { my $__bv = 0; my $__bw = ""; ($__bv, $__bw) = authlib8_4_8::_bph(); if ($__bv) { $__m = $__bw; delete $authlib8_4_8::_bzi{"hid_page_rand"}; } } if (!$__o) { $__h = _bgy(); if ($__h) { $__m = ""; delete $authlib8_4_8::_bzi{"hid_page_rand"}; $__f = 0; } else { $__l = 0; } } } if ($__l && $authlib8_4_8::_byl == 0 && $ciwlib8_4_8::_bkn eq "") { ($__bt, $__bu) = ciwlib8_4_8::_bib($__e, $__f); } } my $__bx = 0; if ($ciwlib8_4_8::_bkn eq "" && $__n && $authlib8_4_8::_byl == 0) { ($__m, $__e, $__bx) = ciwlib8_4_8::_bhe($__bt, $__bu, $__d, $__m, $__e, $__f); } if(exists($ciwlib8_4_8::_bkl{'skip'})) { if ($ciwlib8_4_8::_bkn eq "") { $__m = $ciwlib8_4_8::_bkl{'skip'}; $__m = ciwlib8_4_8::_bjd($__d, $__m); $authlib8_4_8::_bzi{"hid_test_mode_settings"} =~ s/(.*?),/,/; } } if ($authlib8_4_8::_byl) { $authlib8_4_8::_bzw = 0; $authlib8_4_8::_bzx = 0; ($__e, $__m, $__bx) = ciwlib8_4_8::_bii($__e, $__m, $__d, $__g, $authlib8_4_8::_byz, 0, 0); if ($__e || $__m) { authlib8_4_8::_bqa(308, "Previous error.", "Backing up error. A destination was set while backing up. PageNum:" . $__e . " Destination:" . $__m, ""); } } else { my $__by = $authlib8_4_8::_bzi{'hid_pagenum'}; while ($__e > 0 || $__m ne "") { $authlib8_4_8::_bzx = 0; $authlib8_4_8::_bzw = 0; if (!$__f && $ciwlib8_4_8::_bkn eq "") { ($__e, $__m) = ciwlib8_4_8::_bih($__e, $__by, $__m, $__d, $__bx); } $__by = $__e; ($__e, $__m, $__bx) = ciwlib8_4_8::_bii($__e, $__m, $__d, $__g, $authlib8_4_8::_byz, 0, 0); if (exists $authlib8_4_8::_bzi{'sys_autocompletes'}) { my $__bz = ciwlib8_4_8::_bhy($__by); foreach my $__ca (@{$__bz}) { ($__bt, $__bu) = ciwlib8_4_8::_bib($__ca, 0); ($__m, $__e, $__bx) = ciwlib8_4_8::_bhe($__bt, $__bu, $__d, $__m, $__ca, 0); } } elsif (($__e > 0 || $__m ne "") && (keys %authlib8_4_8::_byi || keys %authlib8_4_8::_bxp)) { my $__bz = ciwlib8_4_8::_bhy($__by); foreach my $__ca (@{$__bz}) { ciwlib8_4_8::_bib($__ca, 0); } } } } authlib8_4_8::_bso(); } sub _bgx { my $__ch = ""; my $__ci = "Sawtooth Software process time out."; eval { if(!$authlib8_4_8::_bzy) { $__ch = $__ci; } }; if ($@) { $__ch = $__ci; } if($__ch) { die($__ch); } } sub _bgy { my $__cj = 0; my $__ck = ""; my $__cl = ""; my $__cm = ""; my $__cn = ""; my %__co = (); my $__cp = $authlib8_4_8::_bzj->[0]; my $__cq = $__cp->{'_g'}; my $__cr = @{$__cq}; my $__cs = 0; my $__ct = 0; for($__cs = 0; $__cs < $__cr; $__cs++) { $__ct = $__cq->[$__cs]; if ($__ct->{'_bgu'} != 21) { $__co{$__ct->{'_bgt'}} = 1; } } if ($authlib8_4_8::_bzo) { if (exists $authlib8_4_8::_bzo->{'_bgq'}) { my $__cu = $authlib8_4_8::_bzo->{'_bgq'}; my $__cv = 0; my $__cw = ""; foreach $__cv (@{$__cu}) { $__cw = $__cv->{'_bgt'}; $__co{$__cw} = 1; } } if (exists $authlib8_4_8::_bzo->{'_bfx'}) { my $__cx = $authlib8_4_8::_bzo->{'_bfx'}; if (exists $__cx->{'_bgj'}) { my @__cy = @{$__cx->{'_bgj'}}; my $__cz = 0; my $__da = ""; foreach $__cz (@__cy) { $__da = $__cz->{'_bgt'}; $__co{$__da} = 1; } } } } foreach $__ck (sort keys %authlib8_4_8::_bzi) { if ($__ck =~ m/^(.*?)_(.*?)$/) { $__cl = $1; } else { $__cl = $__ck; } if (exists $__co{$__cl}) { $__cm = ""; $__cn = authlib8_4_8::_bnc($__ck); if (exists $authlib8_4_8::_bzi{$__ck}) { $__cm = $authlib8_4_8::_bzi{$__ck}; } my $__db = authlib8_4_8::_bpy(uc($__cm)); my $__dc = authlib8_4_8::_bpy(uc($__cn)); if ($__db ne $__dc) { $__cj = 1; if (authlib8_4_8::_bto($__db) && authlib8_4_8::_bto($__dc)) { $__db = _bgz($__db); $__dc = _bgz($__dc); if ($__db eq $__dc) { $__cj = 0; } } if ($__cj) { last; } } } } return $__cj; } sub _bgz { my($__dd) = @_; if($__dd =~ m/(\d*)(\.)(\d*?)(0+)$/) { if($3 eq "") { $__dd = $1; } else { $__dd = $1 . $2 . $3; } } return $__dd; } sub _bha { my ($__df, $__dg) = @_; my $__de = ""; if (!(-e $__dg . "/" . $__df)) { $__de = "Cannot find library in " . $__dg; } eval { require $__df; }; if ($@) { $__de = $@; } if ($__de ne "") { print "Content-type: text/html\r\n\r\n"; print "<html><body style=\"font-family: arial; margin: 20px;\">"; print "<span style=\"color: red; font-weight: bold; padding-right: 10px\">Error:</span>"; print "Cannot load library: <span style=\"color: blue;\">" . $__df . "</span>"; print "</body></html>"; exit(); } } END { if($authlib8_4_8::_byh) { close $authlib8_4_8::_byh; } } return 1; 1;
