$jt
\n\n";}sub jf{my($ja,%jb,$AG);%jb=%{$_[0]};
$AG="\x0D\x0A";local(*AH);if(!$jb{$z[501]}){die("SMTP_pop3auth: POP3 username not defined'\n");
}if(!$jb{$z[502]}){die("SMTP_pop3auth: POP3 password not defined'\n");
}if($aa{$z[503]}{$z[504]}){return 1;}my($fm,$ji,$fl,$jv,$jk,$en);
$fm=$jb{$z[505]}||$jb{$z[490]};$ji=$jb{$z[506]}||110;$fl=$jb{$z[501]};
$jv=$jb{$z[502]};$jk=$jb{$z[507]}||$jb{$z[494]}||30;$en=$jb{$z[495]}
||0;$jk+=time()if$jk<10**8&&$jk>0;if($fm=~s/:(\d+)//){$ji=$1;
}my($jn)=gethostbyname($fm)||do{$aa{$z[496]}="Could not connect to POP3 server. Unknown host $fm\n";
return 0;};socket(AH,PF_INET,SOCK_STREAM,0)||do{$aa{$z[496]}
="Could not connect to POP3 server. No Socket: $!\n";return
0;};connect(AH,pack"SnA4x8",PF_INET,$ji,$jn)||do{if($!eq"Unknown error")
{$aa{$z[496]}="Could not connect to POP3 server. POP3 server does not exist or is not responding.\n";
return 0;}else{$aa{$z[496]}="Could not connect to POP3 server. Connect failed: $!\n";
return 0;}};select(AH);$|=1;select(STDOUT);binmode(AH);my$jo
=&jg(\*AH,$jk)||do{$aa{$z[496]}="Timed out waiting for POP3 server to respond.\n";
return 0;};if($en){&jd($jo);}if(uc(substr($jo,0,3))ne"+OK")
{$aa{$z[496]}="An unknown error occured. Server response: $jo\n";
return 0;}print AH"USER $fl",$AG;if($en){&jd("USER $fl",$AG);
}$jo=&jg(\*AH,$jk)||do{$aa{$z[496]}="Timed out waiting for POP3 server to respond.\n";
return 0;};if($en){&jd($jo);}if(substr($jo,0,3)ne"+OK"){$aa{$z[496]}
="The server didn't accept the login info for '$fl'. Server response: $jo\n";
return 0;}print AH"PASS $jv",$AG;if($en){&jd("PASS $jv",$AG);
}$jo=&jg(\*AH,$jk)||do{$aa{$z[496]}="Timed out waiting for POP3 server to respond.\n";
return 0;};if($en){&jd($jo);}if(substr($jo,0,3)ne"+OK"){$aa{$z[496]}
="The server didn't accept the login info for '$fl'. Server response: $jo\n";
return 0;}print AH"QUIT",$AG;if($en){&jd("QUIT",$AG);}close(AH);
$aa{$z[503]}{$z[504]}=1;return 1;}sub jh{my$AI=$_[0];my$jk=
$_[1]||$z[357];my($jw,$jx,$jy,$jz,$ka,$kb,$kc);fileno($AI)||
die("fh_can_read: invalid filehandle or filehandle not open!\n");
vec($jw,fileno($AI),1)=1;$kc=select($jx=$jw,undef,undef,$jk);
return vec($jx,fileno($AI),1);}sub jg{my$AI=$_[0];my$jk=int($_[1]);
if(!$jk){die("FH_readline: no timeout value specified!\n");
}if($jk<10**8){die("FH_readline: timeout value must be in time() format!\n");
}fileno($AI)||die("FH_readline: invalid filehandle or filehandle not open!\n");
my($du,$kd);while($jk>=time()){&jh(\*AH,0.25)||next;sysread(\*AH,$kd,
1)||last;$du.=$kd;if($kd eq"\x0A"){last;}}return$du;}sub oh
{my$ew=shift;$ew=~s|\\|/|g;if($ew=~m|^/|){return$ew;}if($ew
=~m|^\w:/|){return$ew;}return&ke($aa{$z[508]}.$z[64].$ew);}
sub ke{my$ew=shift;$ew=~s|\\|/|g;1 while$ew=~s|[^/]*/\.\./||;
return$ew;}1;;sub kn{my($kf,$kg)=@_;foreach(@{$kf->{$z[169]}})
{my($kh,$fa)=@{$_};if(!defined&{$fa}&&!defined&{$aa{$z[509]}{$kh}})
{die("The action '$kh' defined as a handler for db '$kf->{'name'}' does not have a custom handler or a default handler");
}if((!$kg&&$af{$kf->{$z[50]}.$z[510].$kh})||$kg eq$kh){if(defined
&{$fa}){&{$fa}($kf);exit;}else{&{$aa{$z[509]}{$kh}}($kf);exit;
}}}if($kg){die"Unable to execute forced action '$kg' on db '$kf->{'name'}'";
}}sub oi{my$kf=shift;my$an=&ki($kf);&kj($kf,$an);}sub oj{my
$kf=shift;my$an=&kk($kf);&kl($kf,$an);&km($z[511],$an);exit;
}sub ok{my$kf=shift;if(!$ab{$z[512]}){&kn($kf,$z[170]);}my$an
=&ko($kf);&km($z[512],$an);exit;}sub ol{my$kf=shift;my$an=&kp($kf);
&kq($kf,$an);}sub om{my$kf=shift;&ck;my$kr=&ks($kf);my$kt=&ku($kf,
$kr);&kv($kf,$kr);&kw($kf,$kr);&cl;&kx($kf,$kt);&ky($kf);}sub
on{my$kf=shift;my($dc,$dd);my$kz={$z[57]=>$ae{$z[513]}{$z[57]},
$z[514]=>1,$z[78]=>'',};$kz=&la($kf,$kz);foreach(split(/\s+/,$kf->{$z[75]}))
{push(@$dd,[$_,$z[279],$kz->{$z[78]}]);}my$ao=sub{my$lb=shift;
if(!defined$lb->{$z[515]}&&$lb->{$z[19]}){my$hp=&hc(0,0,0,$lb->{$z[20]},$lb->{$z[19]}-1,$lb->{$z[18]});
$lb->{$z[515]}=&ar($aa{$z[91]},$hp);}$lb->{$z[516]}=&ar($aa{$z[40]},int($lb->{$z[516]}))
if$lb->{$z[516]};$lb->{$z[66]}=&ar($aa{$z[40]},int($lb->{$z[66]}))
if$lb->{$z[66]};$ac{$z[517]}=$ac{$z[517]}eq$z[518]?$z[519]:
$z[518];return&bq($z[119],$lb);};my$an=&lc($kf,$ao,$kz,$dc,
$dd);&ld($an);}sub ki{my$kf=shift;$ac{$z[520]}=$kf->{$z[142]};
$ac{$z[521]}=$kf->{$z[50]};&fx($kf->{$z[144]},{});my($an)={};
if($kf->{$z[522]}&&&le($kf)>=$kf->{$z[522]}){&km($z[523],$kf);
}my($hm,$gl,$gm)=(localtime(&as($^T)))[3,4,5];$gl++;$gm+=1900;
$an->{"day_$hm".$z[524]}=$z[525];$an->{"mon_$gl".$z[524]}=$z[525];
$an->{"year_$gm".$z[524]}=$z[525];foreach(split(/ /,$kf->{$z[147]}))
{if(/^ufile/&&!$an->{$_}){$an->{$_}=$z[526];}}$an->{$z[516]}
=&ar($aa{$z[40]},&as($^T));$an->{$z[66]}=&ar($aa{$z[40]},&as($^T));
$an->{$z[527]}=$ah{$z[50]}||"unknown user";$an->{$z[528]}=$ah{$z[50]}
||"unknown user";return$an;}sub kj{my($kf,$an)=@_;if($aa{$z[130]}{$z[131]}{$z[529]})
{&km($z[529],$an);}else{&km($z[511],$an);}exit;}sub kk{my$kf
=shift;$ac{$z[520]}=$kf->{$z[142]};$ac{$z[521]}=$kf->{$z[50]};
&fx($kf->{$z[144]},{});my($lf)=int$af{$kf->{$z[50]}.$z[530]};
my$an={};&lg($kf,$an,$lf)||&aj($z[531],$lf);return$an;}sub
kl{my($kf,$an)=@_;foreach(split(/ /,$kf->{$z[147]})){if(/^ufile/
&&!$an->{$_}){$an->{$_}=$z[526];}}foreach(keys%{$an}){$an->{$_}
=~s/\&/&/g;$an->{$_}=~s/\"/"/g;$an->{$_}=~s/\</g;
$an->{$_}=~s/\>/>/g;}foreach(keys%{$an}){if(!/\W/&&$an->{$_}
!~/\W/){$an->{$_.$z[510].$an->{$_}.$z[532]}=$z[533];$an->{$_.$z[510].$an->{$_}.$z[524]}
=$z[525];}}$an->{$z[516]}=&ar($aa{$z[40]},&as($an->{$z[516]}))
if$an->{$z[516]};$an->{$z[66]}=&ar($aa{$z[40]},&as($an->{$z[66]}))
if$an->{$z[66]};my%lh;&lg($ad{$z[190]},\%lh,$an->{$z[527]})
if$an->{$z[527]};$an->{$z[527]}=$lh{$z[50]}||"unknown user";
&lg($ad{$z[190]},\%lh,$an->{$z[528]})if$an->{$z[528]};$an->{$z[528]}
=$lh{$z[50]}||"unknown user";return$an;}sub ko{my$kf=shift;
$ac{$z[520]}=$kf->{$z[142]};$ac{$z[521]}=$kf->{$z[50]};&fx($kf->{$z[144]},
{});my($lf)=int($af{$kf->{$z[50]}.$z[534]})||int($af{$z[48]});
my($an)={};&lg($kf,$an,$lf)||&aj($z[531],$lf);return$an;}sub
kp{my$kf=shift;$ac{$z[520]}=$kf->{$z[142]};$ac{$z[521]}=$kf->{$z[50]};
&fx($kf->{$z[144]},{});my($lf)=$af{$z[48]}||$af{$kf->{$z[50]}.$z[534]};
my$an={};&ck();&lg($kf,$an,$lf)||&aj($z[531],$lf);&li($kf,$lf)
||die($z[535].$lf);&cl();foreach(split(/ /,$kf->{$z[147]}))
{if(/^ufile/&&$an->{$_}){if(-e"$ab{'dir_upload'}/$an->{$_}")
{unlink("$ab{'dir_upload'}/$an->{$_}");}}}if(defined&{$kf->{$z[168]}})
{&{$kf->{$z[168]}}($lf,$z[170],$an);}return$an;}sub kq{my($kf,
$an)=@_;if(!$ab{$z[536]}){&kn($kf,$z[171]);}&km($z[537],$an);
exit;}sub ks{my$kf=shift;$ac{$z[520]}=$kf->{$z[142]};$ac{$z[521]}
=$kf->{$z[50]};&fx($kf->{$z[144]},{});my($lf)=int($af{$z[48]});
my$kr={};if($kf->{$z[522]}){my($bh)=&le($kf);if($lf&&$bh>$kf->{$z[522]})
{&km($z[523],$kf);}elsif(!$lf&&$bh>=$kf->{$z[522]}){&km($z[523],$kf);
}}if($lf){&lg($kf,$kr,$lf)||die("ui_save : Can't find record #$lf");
}return($kr);}sub ku{my($lb)=$_[0]->{$z[50]}||die($z[538]);
my($lf)=int($af{$z[48]});my(%lb)=%{$_[1]||{}};my(%eo,%fi,$ee,%kt,%an);
if(!$ab{$z[539]}){die("ui_save_uploads: No upload directory has been defined in setup options!\n");
}if(!-d$ab{$z[539]}){die("ui_save_uploads: Upload directory '$ab{'dir_upload'}' doesn't exist!\n");
}if(!-w$ab{$z[539]}){die("ui_save_uploads: Upload directory isn't writable!\n");
}%eo=&ay($ab{$z[539]});foreach(split(/ |\,/,$ab{$z[540]})){
$fi{$_}++if$_;}foreach$ee(split(/ /,$_[0]->{$z[147]})){if($ee
!~/^ufile/){next;}if($af{$ee}){if($ab{$z[541]}&&length($af{$ee})
>$ab{$z[542]}*1000){my$lj=length($af{$ee});$kt{$z[543]}.=qq|$af{$ee."_file"} ($lj bytes, file too large)
\n|;
$af{$ee}=$lb{$ee};next;}if(!$fi{lc$af{$ee.$z[321]}}){$kt{$z[543]}
.=qq|$af{$ee."_file"} ('$af{$ee.'_ext'}' files not accepted)
\n|;
$af{$ee}=$lb{$ee};next;}if($lb{$ee}&&$eo{$lb{$ee}}){unlink("$ab{'dir_upload'}/$lb{$ee}");
}my($lk);my($ll)=lc$af{$ee.$z[320]};my($lm)=lc$af{$ee.$z[321]};
my($ln)=$z[544];$ll=~s/\.[^\.]*$//g;$ll=~s/[^a-z0-9_\-]/_/g;
$lm=~s/[^a-z0-9_\-]/_/g;$lk="$ll.$lm";if(-e"$ab{'dir_upload'}/$lk")
{do{$ln=sprintf($z[417],++$ln);$lk=$ll."_$ln.$lm";}while(-e
"$ab{'dir_upload'}/$lk");}open(AA,">$ab{'dir_upload'}/$lk")
||die($z[545]."$lk $!\n");binmode AA;print AA$af{$ee};close(AA);
if($lk=~/\.(gif|jpg|jpeg|png)$/i){my($iq,$ir,$lo)=&lp("$ab{'dir_upload'}/$lk");
if(($ab{$z[546]}&&$ir>$ab{$z[546]})||($ab{$z[547]}&&$iq>$ab{$z[547]}))
{unlink("$ab{'dir_upload'}/$lk");$kt{$z[543]}.=qq|$af{$ee."_file"} (${ir}x$iq, image too big)
\n|;
$af{$ee}=$lb{$ee};next;}}$af{$ee}=$lk;}elsif($af{$ee.$z[320]})
{if($lb{$ee}&&$eo{$lb{$ee}}){unlink("$ab{'dir_upload'}/$lb{$ee}");
}$lb{$ee}='';}else{$af{$ee}=$lb{$ee};}}return\%kt;}sub kv{my
($kf,$kr)=@_;my($lf)=int($af{$z[48]});$af{$z[516]}=$lf?$kr->{$z[516]}
:$^T;$af{$z[527]}=$lf?$kr->{$z[527]}:$ah{$z[48]};$af{$z[548]}
=$lf?$kr->{$z[548]}:$ah{$z[48]};$af{$z[66]}=$^T;$af{$z[528]}
=$ah{$z[48]};my$lq;foreach$lq($kf->{$z[147]}=~/\bufile([^ ]*)\b/g)
{if($kf->{$z[147]}=~/\bimagewidth\Q$lq\E\b/){($af{$z[549].$lq},
$af{$z[550].$lq})=&lp($ab{$z[539]}.$af{$z[551].$lq});}}}sub
kw{my($kf,$kr)=@_;my($lf)=int($af{$z[48]});if($lf){&dt($kf,
\%af,$lf);}else{$af{$z[48]}=&dx($kf,\%af,$lf);}if(defined&{$kf->{$z[168]}})
{&{$kf->{$z[168]}}($af{$z[48]},$z[552],$kr);}}sub kx{my($kf,
$kt)=@_;if(keys%{$kt}){undef$ab{$z[542]}if!$ab{$z[541]};$kt->{$z[48]}
=$af{$z[48]};$kt->{$z[553]}=&bq($z[553],\%ab)if$ab{$z[542]};
$kt->{$z[554]}=&bq($z[554],\%ab)if$ab{$z[546]};$kt->{$z[555]}
=&bq($z[555],\%ab)if$ab{$z[547]};$kt->{$z[556]}=&bq($z[556],
{$z[540]=>$ab{$z[540]}?$ab{$z[540]}:$z[557]});&km($z[558],$kt);
exit;}}sub ky{my($kf)=@_;if(!$ab{$z[559]}){&kn($kf,$z[171]);
}&km($z[560],\%af);exit;}sub ld{my$an=shift;&km($z[171],$an);
exit;}sub la{my($kf,$kz)=@_;$ac{$z[520]}=$kf->{$z[142]};$ac{$z[521]}
=$kf->{$z[50]};if(ref($kf)ne$z[223]){die$z[561]."\n";}&fx($kf->{$z[144]},
{});if($af{$kf->{$z[50]}.$z[562]}){my$lr={};while($ag{$kf->{$z[50]}.$z[563]}
=~/(.*?)\t(.*?)\t/g){$lr->{$1}=$2;}$kz->{$z[57]}=$af{$z[564]}
||$lr->{$z[57]};}else{while($ag{$kf->{$z[50]}.$z[563]}=~/(.*?)\t(.*?)\t/g)
{$kz->{$1}=$2;}foreach(keys%{$kz}){if(defined$af{$z[510].$_})
{if($_ ne$z[57]&&$_ ne$z[514]){$kz->{$z[514]}=1;}$kz->{$_}=
$af{$z[510].$_};}}}&ls($kf->{$z[50]}.$z[563],join("\t",map{
$_,$kz->{$_}}keys%{$kz})."\t");foreach(keys%{$kz}){$ac{$z[510]
.$_}=$kz->{$_};$ac{$z[510].$_.$z[510].$kz->{$_}.$z[524]}=$z[525];
}return$kz;}sub lc{my($kf,$ao,$kz,$dc,$dd)=@_;my%an;my$it=sub
{$an{$z[565]}.=&{$ao}(@_);};($an{$z[566]},$an{$z[567]},$an{$z[568]},
$an{$z[569]},$an{$z[570]},$an{$z[571]})=<($kf,$it,$kz->{$z[514]},
$kz->{$z[57]},$dc,$dd);unless($an{$z[565]}){if($aa{$z[130]}{$z[131]}{$z[572]}
&&scalar grep{$_ ne$z[57]&&$_ ne$z[514]&&$kz->{$_}ne''}keys
%{$kz}){$an{$z[565]}=&bq($z[572],{});}else{$an{$z[565]}=&bq($z[125],
{});}}return\%an;}sub ch{my$kf=shift;my($dc,$dd);my$kz={$z[57]
=>$ae{$z[513]}{$z[57]},$z[514]=>1,$z[78]=>'',};$kz=&la($kf,
$kz);foreach(split(/\s+/,$kf->{$z[75]})){push(@$dd,[$_,$z[279],
$kz->{$z[78]}]);}my$ao=sub{my$lb=shift;$lb->{$z[573]}=$ai[$lb->{$z[574]}];
if(!defined$lb->{$z[515]}&&$lb->{$z[19]}){my$hp=&hc(0,0,0,$lb->{$z[20]},$lb->{$z[19]}-1,$lb->{$z[18]});
$lb->{$z[515]}=&ar($aa{$z[91]},$hp);}$lb->{$z[516]}=&ar($aa{$z[40]},int($lb->{$z[516]}))
if$lb->{$z[516]};$lb->{$z[66]}=&ar($aa{$z[40]},int($lb->{$z[66]}))
if$lb->{$z[66]};$ac{$z[517]}=$ac{$z[517]}eq$z[518]?$z[519]:
$z[518];return&bq($z[119],$lb);};my$an=&lc($kf,$ao,$kz,$dc,
$dd);&ld($an);}sub oo{my$kf=shift;&ck();my$kr=&ks($kf);my$kt
=&ku($kf,$kr);&kv($kf,$kr);my%lu;if(&lv($kf,\%lu,$z[575],$af{$z[575]}))
{if($lu{$z[48]}!=$kr->{$z[48]}){&cl();&km($z[576],\%af);}}if
($af{$z[48]}==$ah{$z[48]}&&$af{$z[574]}<9){&cl();&km($z[577],
{});}&kw($kf,$kr);my%lw;if(&lv($ad{$z[195]},\%lw,$z[48],$af{$z[48]}))
{&dt($ad{$z[195]},\%af,$af{$z[48]});}&cl();&kx($kf,$kt);&ky($kf);
}sub op{my$kf=shift;if(!$ab{$z[512]}){&kn($kf,$z[170]);}my$an
=&ko($kf);if($an->{$z[48]}==$ah{$z[48]}&&$af{$z[574]}<9){&km($z[577],
{});}&km($z[512],$an);}sub cg{my$kf=shift;my$lf=$af{$z[48]}
||$af{$kf->{$z[50]}.$z[534]};if($lf==$ah{$z[48]}&&$af{$z[574]}
<9){$ac{$z[520]}=$kf->{$z[142]};$ac{$z[521]}=$kf->{$z[50]};
&fx($kf->{$z[144]},{});&km($z[577],{});}&ck();&lg($ad{$z[190]},
{},$ah{$z[48]})||&lx($z[578],{});my$an=&kp($kf);&li($ad{$z[195]},
$lf);&cl();&kq($kf,$an);}sub oq{my$ja=shift;if($ab{$z[579]}
eq$z[580]){my%jb=(host=>$ab{$z[581]},helo=>$ae{$z[582]}{$z[583]},
timeout=>$ae{$z[582]}{$z[584]},pop3_auth=>$ab{$z[585]},pop3_host
=>$ab{$z[586]},pop3_user=>$ab{$z[587]},pop3_pass=>$ab{$z[588]});
&ly($ja,\%jb)||die("Error sending message: $aa{'error'}
\n");
}elsif($ab{$z[579]}eq$z[589]){if(!-e$ab{$z[590]}){die("sendmail: can't find sendmail program '$ab{'mail_sendmail'}'\n");
}local(*AK);my($jl)=&jc($ja);open(AK,"|$ab{'mail_sendmail'} -f $jl -t")
||die"Can't open $ab{'mail_sendmail'} : $!";print AK$ja;close(AK);
}elsif(!$ab{$z[579]}){die("sendmail: no mailer specified in setup options!\n");
}else{die("sendmail: unknown mailer '$ab{'mail_mailer'}' specified!\n");
}}sub or{my($ex)=$_[0];my($lz)=$af{$z[591]}||die("browse: you must pass a name/value for the 'fieldname'!\n");
my(%an,$ey);if($ex ne$z[592]&&$ex ne$z[593]){die("browse: the first argument must be either 'dir' or 'file'!\n");
}if($af{$z[594]}){&ma($z[595].$z[596].$aa{$z[0]}.$z[597]);}
if($af{$z[598]}){&ma($z[599].$z[596].$aa{$z[0]}.$z[597]);}if
($af{$z[592]}){&ma($z[600].$z[596].$aa{$z[0]}.$z[597]);}if(!-d
$ab{$z[601]}){delete$ab{$z[601]};}if($af{$z[602]}){if(-f$af{$z[602]})
{$af{$z[602]}=~s!^(.+)(\\|/).*?$!$1!;}if(-d$af{$z[602]}){$af{$z[592]}
=$af{$z[602]};}}if($ae{$z[603]}){$af{$z[592]}=$ab{$z[601]};
}&fx("_browse_$ex.html",{});my$mb="/";$an{$z[591]}=$af{$z[591]};
if($af{$z[594]}){$an{$z[604]}=$af{$z[604]};if(!$af{$z[604]})
{$ac{$z[605]}=$z[606];}elsif($af{$z[604]}=~m/[^\w\-]/i){$ac{$z[605]}
=$z[607];}elsif(!mkdir("$af{'cdir'}$mb$af{'mkdir_name'}",0777)){
$ac{$z[605]}=$z[608].$!;}if($ac{$z[605]}){$ac{$z[605]}=&bq($z[605],\%ac);
}}if($af{$z[598]}){local(*AA);$an{$z[609]}=$af{$z[609]};if(!$af{$z[609]})
{$ac{$z[610]}=$z[611];}elsif($af{$z[609]}=~m/[^\w\-\.]/i){$ac{$z[610]}
=$z[612];}elsif(-e"$af{'cdir'}$mb$af{'mkfile_name'}"){$ac{$z[610]}
=$z[613];}elsif(!open(AA,">$af{'cdir'}$mb$af{'mkfile_name'}"))
{$ac{$z[610]}=$z[614].$!;}close(AA);if($ac{$z[610]}){$ac{$z[610]}
=&bq($z[610],\%ac);}}$an{$z[592]}=$af{$z[592]}||$ab{$z[601]}
||$aa{$z[508]};$an{$z[592]}=~s/^(.+)(\\|\/)+$/$1/;$an{$z[615]}
=$an{$z[592]};$an{$z[615]}=~s!^([a-z]:)!$1/..!i;$an{$z[616]}
=($an{$z[592]}=~m#^(.*)[\\/]#,$1||$mb);$an{$z[617]}=&fy($an{$z[616]});
$an{$z[171]}.=&bq($z[616],\%an)if($an{$z[592]}=~m!.+(\\|/)!);
if(!-e$an{$z[592]}){$an{$z[496]}=$z[618];}elsif(!-r$an{$z[592]})
{$an{$z[496]}=$z[619];}if($an{$z[496]}){print"Content-type: text/html\n\n"
unless($aa{$z[620]}++);$an{$z[171]}.=&bq($z[496],\%an);print
&fx($z[621],\%an);exit;}opendir(AB,"$an{'dir2'}");my@ey=sort
{lc$a cmp lc$b}grep(!/^\.+$/,readdir(AB));closedir(AB);my($ay);
foreach$ay(@ey){-d"$an{'dir'}$mb$ay"||next;$an{$z[50]}=$ay;
$an{$z[622]}="$an{'dir'}$mb$ay";$an{$z[622]}=~s/$mb+/$mb/g;
$an{$z[623]}=&fy($an{$z[622]});($an{$z[624]},$an{$z[625]})=
(stat($an{$z[622]}))[7,9];$an{$z[626]}=&ar($aa{$z[40]},$an{$z[625]});
$an{$z[171]}.=&bq($z[592],\%an);$ey++;}my($eo);foreach$eo(@ey)
{-d"$an{'dir'}$mb$eo"&&next;$an{$z[50]}=$eo;$an{$z[622]}="$an{'dir'}$mb$eo";
($an{$z[624]},$an{$z[625]})=(stat($an{$z[622]}))[7,9];if($an{$z[624]})
{$an{$z[624]}=(int($an{$z[624]}/1000)||1)."KB";}else{$an{$z[624]}
="0KB";}$an{$z[626]}=&ar($aa{$z[40]},$an{$z[625]});$an{$z[622]}
=~s/'/\\'/g;$an{$z[622]}=~s/\\/\\\\/g;if(-f"$an{'dir'}$mb$eo")
{$an{$z[171]}.=&bq($z[593],\%an);}else{$an{$z[171]}.=&bq($z[627],\%an);
}$ey++;}if(!$ey){$an{$z[171]}.=&bq($z[628],{});}print"Content-type: text/html\n\n"
unless($aa{$z[620]}++);print&fx("_browse_$ex.html",\%an);exit;
}sub os{my($jp,$js);if($ENV{$z[314]}=~/^[\w\-]+\.gif$/){$jp
=$z[629]."\n\n";}elsif($ENV{$z[314]}=~/^[\w\-]+\.jpg$/){$jp
=$z[630]."\n\n";}else{return;}$js=&fx($ENV{$z[314]},{},$z[330]);
if($js){binmode(STDOUT);print$jp ;print$js ;exit;}}sub as{my
$hp=$_[0]||die("time_adj: first argument must be time()\n");
if($ab{$z[631]}eq$z[529]){$hp+=$ab{$z[632]}*60*60;}if($ab{$z[631]}
eq$z[633]){$hp-=$ab{$z[632]}*60*60;}if($ab{$z[634]}eq$z[529])
{$hp+=$ab{$z[635]}*60;}if($ab{$z[634]}eq$z[633]){$hp-=$ab{$z[635]}*60;
}return$hp;}sub ot{my($ao,$mc,$md,$me,%lw);my(%an,%mf);if(!$af{$z[636]}
&&!$ag{$z[575]}){&lx(undef,\%an);}if($af{$z[636]}){($mc,$md)
=(lc$af{$z[575]},lc$af{$z[637]});if(!$mc&&!$md){&lx($z[578],
\%an);}if(!$mc||!$md){&lx($z[578],\%an);}$ao=sub{if(lc$mf{$z[575]}
eq$mc&&lc$mf{$z[637]}eq$md){$me=$mf{$z[48]};}};&au($ad{$z[190]},
$ao,\%mf);if(!$me){&lx($z[578],\%an);}&lg($ad{$z[190]},\%mf,
$me);$mf{$z[516]}=$^T;$mf{$z[66]}=$^T;&dt($ad{$z[195]},\%mf,
$me);}else{($mc,$md)=(lc$ag{$z[575]},lc$ag{$z[637]});if(!$mc
||!$md){&lx($z[638],\%an);}$ao=sub{if(($ae{$z[639]}&&$mf{$z[66]}
<$^T-60*$ae{$z[639]})||$mf{$z[66]}<$^T-60*60*24){&li($ad{$z[195]},
$mf{$z[48]});}elsif(lc$mf{$z[575]}eq$mc&&lc$mf{$z[637]}eq$md)
{$me=$mf{$z[48]};}};&au($ad{$z[195]},$ao,\%mf);if(!$me){&lx($z[638],
\%an);}&lg($ad{$z[195]},\%mf,$me);$mf{$z[66]}=$^T;&dt($ad{$z[195]},
\%mf,$me);}&ls($z[575],$mc);&ls($z[637],$md);return%mf;}sub
lx{if(!$aa{$z[620]}++){print$z [640]."\n\n";}my($jt)=$_[0];
my(%an)=%{$_[1]||{}};&fx($z[641],{});foreach(keys%an){$an{$_}
=&fb($an{$_});}$an{$z[642]}=&mg(\%af,$z[575],$z[637],$z[643]);
if($jt&&!$aa{$z[130]}{$z[131]}{$jt}){die($z[644]."'$jt' isn't defined!\n");
}if($jt){$an{$z[543]}=&bq($jt,\%an);}print&bq($z[645],{});if
($jt){print&bq($z[646],\%an);}else{print&bq($z[636],\%an);}
print&bq($z[647],{});if($aa{$z[495]}){print"
";print"
$aa{'debug_output'}"
if($aa{$z[310]});}&mh();exit;}sub ou{&fx($z[641],{});&ls($z[575],'');
&ls($z[637],'');$ab{$z[648]}=~s/^\s+|\s+$//g;if($ab{$z[648]}
&&$ENV{$z[314]}=~/logoff/i){print"Content-type: text/html\n\n";
print qq|Stack Trace ($fa) called from ($eo) line ($du) ";print" $np")],
$z[272]=>[("Warning: Persistent Filelock!","This web application uses temporary 'file locks' to ensure than only one user can update data at a time. The program was halted while in the middle of writing data and the file lock will need to be removed manually to avoid data corruption. Please ask your server administrator to remove the following directory: If you are using a Mac, try disabling this setting and re-uploading all the files, otherwise, contact support for assistance. ")],
$z[770]=>[("Publishing Error","The program cannot create or write to the file: Stack Trace ($fa) called from ($eo) line ($du) /\n\n/gm;
}foreach($ns,$kt){s/<[^>]*>//gm;}print"\n$aa{'prog_name'} v$aa{'prog_ver'}\n$ns\n$kt\n";
}else{if(!$aa{$z[620]}++){print"Cache-Control: no-cache\nPragma: no-cache\nExpires: -1\n";
print"Content-type: text/html\n\n";}my$nu=$z[777]if$nq;print
qq|\n\n ";print"
";
my$cu=0;while(my($eo,$du,$fa)=(caller($cu++))[1,2,3]){print
qq!
\n!;}}if($aa{$z[495]})
{print"$aa{'debug_output'}"if($aa{$z[310]});
}&mh();exit;}sub mh{print$z [705]."\n";print$ac {$z[692]}.$z[706]
.$aa{$z[4]}.$z[707].$aa{$z[708]}.$z[29].$aa{$z[709]}.")\n";
print$z [710].$ac{$z[684]}.$z[711].$ac{$z[680]}.$z[711].$ac{$z[681]}
."\n";printf($z[712]."\n",time()-$^T);print$z [713]."\n";}sub
oy{my(@ey)=map"$aa{'datadir'}$ad{$_}{'datafile'}",keys%ad;my(@mv)
=($aa{$z[274]});my($ay,$eo,$mw);foreach$ay(sort@mv){if($ay
eq""){next;}if(!-d$ay||!-w$ay){$mw.="$ay\n";}}foreach$eo(sort
@ey){$eo=~s/\\/\//g;1 while$eo=~s!/[^/]+/\.\./!/!;if(-f$eo&&
!-w$eo){$mw.="$eo\n";}}if($mw){&aj($z[273],$mw);}}sub mk{return
unless$ae{$z[603]};my$ja=shift;&lx($z[714],{$z[543]=>$ja});
}sub ma{return unless$ae{$z[603]};my$ja=shift;$ja=&fy($ja);
print"Content-type: text/html\n\n";print qq|\n|
;exit;}sub oz{&fx($ad{$z[197]}{$z[144]},{});my%mx;my$my;foreach
$my(keys%{$aa{$z[715]}}){my%an=($z[716]=>$my,$z[717]=>$aa{$z[715]}{$my}
);$mx{$my}[0]=&bq($z[718],\%an);$mx{$my}[1]=&bq($z[719],\%an);
}foreach$my(keys%{$aa{$z[715]}}){my$mz=join'',map{$mx{$_}[$my
==$_?1:0]}sort keys%{$aa{$z[715]}};$ac{$z[720].$my}=&bq($z[721],
{$z[722]=>$mz});}}1;;sub pa{my$na=shift||die("ip2num : no ip or host specified!\n");
my($a,$b,$nb,$nc,$lf);if($na=~/[^0-9\.]/){my$jn=gethostbyname("$na.")
||die("ip2num: Can't find IP for host '$na'!\n");($a,$b,$nb,$nc)
=unpack($z[723],$jn);}else{($a,$b,$nb,$nc)=split(/\./,$na);
}$lf+=$nc*(256**0);$lf+=$nb*(256**1);$lf+=$b*(256**2);$lf+=
$a*(256**3);return$lf;}sub pb{my$lf=shift||die("num2ip : no number specified!\n");
my($a,$b,$nb,$nc);$a=($lf/256**3)% 256;$b=($lf/256**2)% 256;
$nb=($lf/256**1)% 256;$nc=($lf/256**0)% 256;return join$z[29],
$a,$b,$nb,$nc;}sub pc{my$hp=shift||time();$hp-=(localtime($hp))[6]
* 60*60*24;$hp-=(localtime($hp))[2]* 60*60;$hp-=(localtime($hp))[1]
* 60;$hp-=(localtime($hp))[0]* 1;return$hp;}sub pd{my$hp=shift
||time();$hp-=(localtime($hp))[2]* 60*60;$hp-=(localtime($hp))[1]
* 60;$hp-=(localtime($hp))[0]* 1;return$hp;}sub pe{my$gh=int
shift;my$gi=int($gh/60);my$gj=int($gi/60);$gi%=60;$gh%=60;return
sprintf("%01d:%02d:%02d",$gj,$gi,$gh);}sub pf{my$lf=reverse
int shift;$lf=~s/(...)\B/$1,/g;return reverse$lf;}sub bu{my
$lf=shift;if($lf==int($lf)){return$lf;}elsif($lf<0){return
int$lf;}else{return int($lf)+1;}}sub pg{my$lf=shift;if($lf==
int($lf)){return$lf;}elsif($lf<0){return int($lf)-1;}else{return
int$lf;}}sub bv{return(sort{$a<=>$b}@_)[0];}sub ph{return(sort
{$a<=>$b}@_)[-1];}1;;sub av{local(*AA);my($eo,%er,$fr,$fs);
%er=%{$_[1]}if$_[1];my$nd=$_[3];my%ft;%ft=($z[328]=>0,$z[329]
=>0,$z[330]=>0,$z[53]=>0,$z[339]=>0);foreach(split(/ /,$_[2]))
{if(undef$ft{$_}){die($z[331]."'$_'\n");}$ft{$_}=1;}unless($ft{$z[328]})
{$ft{$z[329]}=1;}if(!$_[0]){die$z[332]."\n";}if(ref($_[1])ne
$z[223]){die$z[333]."\n";}if((!$ft{$z[329]}||!$aa{$z[130]}{$z[329]}{$_[0]})
){if(-e"$_[0]"){$eo=$_[0];}else{foreach(grep/^templatedir/,
sort keys%aa){if(-e"$aa{$_}/$_[0]"){$eo="$aa{$_}/$_[0]";last;
}}if(!$eo){die$z[334]."'$_[0]'".$z[335]."\n";}}}if($ft{$z[329]}
&&$aa{$z[130]}{$z[329]}{$_[0]}){$fr=$aa{$z[130]}{$z[329]}{$_[0]};
}else{open(AA,"<$eo")||die$z[336]."$eo! $!\n";binmode(AA)if
($eo=~/gif$/i||$eo=~/jpg$/i);read(AA,$fr,-s AA);close(AA);}
if($ft{$z[330]}){return$fr;}if(!$ft{$z[329]}||!$aa{$z[130]}{$z[329]}{$_[0]})
{foreach$fs($fr=~m//g)
{$aa{$z[130]}{$z[131]}{"$nd$1"}=$2 if($fr=~m/(?:\r\n|\n)?(.*?)/is);
}$fr=~s/(?:\r\n|\n)?(.*?)//gis;
if($ft{$z[329]}){$aa{$z[130]}{$z[329]}{$_[0]}=$fr;}}if($ft{$z[53]})
{while($fr=~//i){my$ne=$1;
my$fu=$ne;$fu=~s/\$(\w+?)\$/defined$ac{$1}?$ac{$1}:$er{$1}/eg;
unless($fu){$fr=~s///;next;
}if($fu=~m!^/!){;}else{if($_[4]){$fu="$_[4]$fu";}else{$fu=($eo
=~m!(.*/)!)[0].$fu;}}my$fw;if(not$aa{$z[130]}{$z[724]}{$fu}++)
{my$nf;if(-e"$fu"){$nf++;}else{foreach(grep/^templatedir/,sort
keys%aa){if(-e"$aa{$_}/$fu"){$nf++;last;}}}if($nf){$fw=&av($fu,
$_[1],"$_[2] inside_ssi",$z[725],$_[4]);}else{$fw="[ Program Error - Could not include file \"$fu\" via template include ]";
}}else{$fw="[ Program Error - Cyclic Include - The file '$fu' is included by itself (perhaps indirectly). Please check include files for other Include statements. ]";
}$fr=~s//$fw/;delete$aa{$z[130]}{$z[724]}{$fu};
}}else{$fr=~s///gi;}$fr=~s//$1/gi;
$fr=~s[\$(\w+?)(_ue|_he|_nbsp|_je)?\$][my$eg=defined$ac{$1}
?$ac{$1}:$er{$1};if($2 eq$z[340]){$eg=&fy($eg);}if($2 eq$z[341])
{$eg=&fb($eg);}if($2 eq$z[342]){$eg=&fb($eg);$eg=~s/ / /g;
}if($2 eq$z[343]){$eg=&fz($eg);}$eg;]ge;return$fr;}sub bn{my
($ho,$bi,$nd)=@_;$ho=~s|
(\s*\*\*\*image\d+(?:\:(\w+))?\*\*\*)|
$1|gsi;
$ho=~s[\s*\*\*\*image(\d+)(?:\:(\w+))?\*\*\*\s*][if($2 eq$z[726])
{$bi->{$z[117].$1}}else{my%ng;$ng{$z[727]}=$2||$ae{$z[728]}{$z[729]}
||$z[730];$ng{$z[731]}=$bi->{$z[117].$1};$ng{$z[732]}=$bi->{$z[118]
.$1};$ng{$z[733]}=$bi->{$z[68].$1};$ng{$z[734]}=$bi->{$z[69]
.$1};&bq($nd.($ng{$z[732]}ne''?$z[732]:$z[735]),\%ng);}]eigo;
return$ho;}sub pi{my($an,$bi,$nd,$nh,$ni,@nj)=@_;$an->{$z[86]}
=&bn($nh,$bi,$nd);$an->{$z[88]}=&bn($ni,$bi,$nd);my$cu;for$cu
(1..$aa{$z[6]}){$an->{$z[84].$cu}=&bn($nj[$cu-1],$bi,$nd);}
}sub pj{my($an,$nh,$ni,@nj)=@_;($an->{$z[86]}=$nh)=~s/\s*\*\*\*image\d+(\:\w+)?\*\*\*\s*//g;
($an->{$z[88]}=$ni)=~s/\s*\*\*\*image\d+(\:\w+)?\*\*\*\s*//g;
my$cu;for$cu(1..$aa{$z[6]}){($an->{$z[84].$cu}=$nj[$cu-1])=~
s/\s*\*\*\*image\d+(\:\w+)?\*\*\*\s*//g;}}sub pk{my$fr=shift;
my$hp=$ac{$z[39]}||&ar($aa{$z[40]},$ab{$z[39]}||$^T);my$nk=
$z[736].$aa{$z[0]}.$z[737];$$fr=$z[738].$hp.$z[739].$aa{$z[0]}
.$z[740]."\n\n".$$fr;unless($$fr=~s/(]+>)/$nk\n$1/is)
{$$fr=~s/(]*>)/$1\n$nk\n/i;}}sub hc{my$it;eval{local
$SIG{$z[741]}=undef;local$SIG{$z[742]}=undef;$it=timelocal(@_);
};if($@){$it=0;}return$it;}sub hb{my$it;eval{local$SIG{$z[741]}
=undef;local$SIG{$z[742]}=undef;$it=timegm(@_);};if($@){$it
=0;}return$it;}1;;%ae=&nl("$by/config.ini");$ac{$z[743]}=$ae{$z[513]}{$z[744]}
||"#336699";$aa{$z[274]}=$ae{$z[274]}||$z[745];$aa{$z[272]}
=$ae{$z[272]}||$z[746];$aa{$z[40]}=$ae{$z[513]}{$z[40]}||$z[747];
$aa{$z[91]}=$ae{$z[513]}{$z[91]}||$z[748];$aa{$z[749]}=$ae{$z[513]}{$z[749]}
||$z[433];&aj($z[750])if!$ENV{$z[751]};&aj("macftp")if"¡"ne
"\xA1";&aj($z[752])if$ENV{$z[753]}&&!$ae{$z[754]};%aa=(%aa,
$z[508]=>$by,$z[755]=>$bw,$z[756]=>$bw,$z[63]=>$z[757],$z[758]
=>$z[759],$z[760]=>$z[761],$z[620]=>0,);foreach(qw(datadir filelock templatedir1 templatedir2 templatedir3 archive))
{if(ref($aa{$_})){next;}$aa{$_}="$by/$aa{$_}"if(index($aa{$_},$z[29])
==0);$aa{$_}=~s|\\|/|g;1 while$aa{$_}=~s|/[^/]+/\.\./|/|;}&lg($ad{$z[197]},
\%ab,1);if(!$ab{$z[762]}){&aj($z[763]);}foreach(grep/^dir_/,
keys%ab){$ab{$_}="$by/$ab{$_}"if index($ab{$_},$z[29])==0;$ab{$_}
=~tr|\\|/|;1 while$ab{$_}=~s|/[^/]+/\.\.||;}foreach(qw(prog_name prog_name2 prog_ver cgidir cgiurl publish_fileext))
{$ac{$z[510].$_}=$aa{$_};}foreach(qw(url_help reg1 reg2 reg3))
{$ac{$z[510].$_}=$ab{$_};}$ac{$z[27]}=$ab{$z[27]};$ac{$z[690]}
=$ab{$z[691]};$ac{$z[692]}=join$z[764],grep{$_}$aa{$z[0]},$ab{$z[693]};
$ac{$z[765]}||=$ab{$z[693]};%af=&nm;%ag=&nn;}sub aj{my($no)
=$ac{$z[128]};my($ex,$np,$nq)=@_;my(%nr,$kt,$ns);$np=&fb($np);
$ac{$z[766]}||="#336699";%nr=($z[531]=>[("Can't find record # $np",
"The program can't find the specified record number in the database. This is usually because the record has already been erased. Reload the record list and try again.")],
$z[273]=>[("Warning: File/Directory not writeable!","This web application needs to be able to create and update it's data files. Please ask your server administrator to make the following files and directories writeable:
$np")],
$z[275]=>[($z[767],$z[768])],$z[769]=>[("Warning: Program corrupted during upload!",
"This is usually caused by Mac FTP clients that have an \"Translate ISO characters\" setting enabled.
$np
Please ask your server administrator to make sure the publish directory and publish file(s) are writable.")],
$z[752]=>[("Program doesn't support mod_perl","Your server is running $ENV{MOD_PERL}
This program doesn't support mod_perl. Please ask your server administrator to disable mod_perl for this program.")],
$z[750]=>[("This program can only be run through a web server.",
"")],$z[771]=>[($z[772],$z[773])],$z[774]=>[("No such file or directory",
"The program can't find the file or directory it's looking for. Please make sure the following file or directory exists:
$np")],
$z[775]=>[("Permission denied","The program doesn't have permission to access a required file. Please make sure the program has read and write access to the following directories and files:
$np")],
);my($nt)=$ac{$z[776]}||$nr{$ex}[0]||"Program Message";if($nr{$ex}[0])
{$ns=$nr{$ex}[0];$kt=$nr{$ex}[1];}elsif($np&&$ex){$ns=&fb($ex);
$kt=$np;}else{$ns="Program Message";$kt=&fb($ex);}if(!$nr{$ex}[1])
{$kt=~s/\n/
\n/g;}if($aa{$z[495]}){if(!$ENV{$z[751]})
{$kt.="\n\nSTACK TRACE\n";}else{$kt.="
";
}my$cu=0;while(my($eo,$du,$fa)=(caller($cu++))[1,2,3]){if(!$ENV{$z[751]})
{$kt.=qq!($fa) called from ($eo) line ($du)\n!;}else{$kt.=qq!
\n!;
}}}if(!$ENV{$z[751]}){foreach($ns,$kt){s/
/\n/gm;s/$aa{'debug_output'}"
if($aa{$z[310]});print"";}}if($aa{$z[271]}){rmdir($aa{$z[272]})
&&undef$aa{$z[271]};}if($ENV{$z[751]}){printf($z[778]."\n",time()-$^T);
print$z [779]."\n\n";}exit;}sub bp{my($fs,$hy,$nv)=@_;if(defined
$aa{$z[130]}{$z[131]}{$fs.$nv}){$fs.=$nv;}&bq($fs,$hy);}sub
al{my@nw;my$cu;foreach$cu(1..3){my$nx=$ab{"sort${cu}field"};
next unless$nx;$nx="#$nx#"if$ab{"sort${cu}numeric"};$nx="-$nx"
if$ab{"sort${cu}reverse"};push@nw,$nx;}$ad{$z[13]}{$z[166]}
=join($z[780],@nw);}
# ----------------------------------------------------------------------------
# Programming by interactivetools.com, inc.