$ptd=$path_to_domain; $path_to_domain.="/"; $url_to_ikons=~s!/$!!; $path_to_wysiwyg=~s!/$!!; $dir=qq~~; $bin=qq~~; $aro=qq~~; $stop=0; $disallow=~s!https*://.+?/!$path_to_domain!gi; @test=split(/\|/,$disallow); &check_cookie; &check_login; $user_root=~s|/$||; if($url_to_common){$com_path=$url_to_common;$com_path=~s!http://.+?/!$path_to_domain!i;} $user_path=$user_root; $user_path=~s!$url_to_domain!$path_to_domain!; $user_path=~s!^//!We_irD!; $user_path=~s!//!/!g; $user_path=~s!^We_irD!//!; $url_to_domain_=$url_to_domain."/"; $user_root=~s|/$||;$user_root.="/"; $user_root=~m!(http://.+?/)!;$LOC=$1; if($Current_Dir && $Current_Dir =~ /$user_path/){$DIR=$Current_Dir}else{$DIR=$user_path} $DIR =~ s!http://.+?/!$path_to_domain!; unless(-e $DIR){error("

The user's root folder
$user_root
does not exist when converted to
$user_path
$x")} if($param1){ if($param1 eq "up"){ if($Current_Dir eq $com_path || $Current_Dir eq $com_path."/"){ $DIR=$user_path; }else{ $Current_Dir=~m!(.*?/)\w*?-?\w*?/$!;$DIR=$1; } }else{ $param1=~s|/$||;$DIR=$param1."/"; } } if($param2 =~ /create_/ && ($param1 eq '' || $param1 eq "up") && $buttons !~ /jail_links/){$DIR=$path_to_domain} if(length($DIR)$dir$file ~; push(@FLDRS,$FLDR); } if(-T $file_ && $file_ !~ /\.pdf$/){ $bell=1; get_title("$file_");$pt=~s`"`\\"`g; if($bell==1){ push(@txts,$file);push(@bins,$file); $file_=~m!\.(\w+)$!;$ext=$1; if("@allowable_ascii_extensions" =~ /\b$ext\b/i){ $txt=qq~$PT~; if($param2 !~ /upload_file|find_folder/){$hrf=qq~parent.selection1("bin","$file_","$url","$pt")~;$reg="reg"}else{$hrf='';$reg="unreg"} if($param2 eq "create_button" || ($param3 eq "two" && $param2 !~ /upload_file|saveas|find_folder/)){$hrf=qq~parent.selection2("bin","$file_","$url")~} $TXT=qq~

$txt $file
~; push(@TXTS,$TXT); push(@ARRAY,$file); }}} if(-B $file_ || $file_ =~ /\.pdf$/){ push(@bins,$file); if($file_ =~ m`^\.|^_`i){next} $file_=~m!\.(\w+)$!;$ext=$1; if("@allowable_binary_extensions" =~ /\b$ext\b/i && $ext ne ''){ if($param2 !~ /upload_file|find_folder/){$hrf=qq~parent.selection1("bin","$file_","$url")~;$reg="reg"}else{$hrf='';$reg="unreg"} $BIN=qq~
$bin $file
~; push(@BINS,$BIN); push(@ARRAY,$file); }} }} if($param2 =~ /insert_image|open_page/ && $un_url eq $user_root && $url_to_common){&common} if($param2 =~ /upload/ && $un_url eq $user_root && $super && $url_to_common){&common} @FLDRS=sort(@FLDRS); if($param2 =~ /create_link|open_page|create_button|find_file/){ $n=6; if($param2 =~ /create_link|create_button/){$n=5} if($Admin_Login=~/\w+/ || $param2 =~ /find_file/){$n=4} $cols=$#FLDRS+1;$cols+=$#TXTS+1;$cols/=$n;if($cols=~/\./){$cols=int($cols)+1} push(@RET,@FLDRS);push(@RET,@TXTS);push(@RET,@BINS);$i=0; foreach $r (@RET){ $r=~s`image\.gif`file.gif`; if($i==0){$RETURN.=qq~~} $RETURN.=$r; if($i==$n){$RETURN.=qq~~;$i=-1} ++$i; }} if($param2 eq "upload_file"){ $cols=$#FLDRS+1;$cols+=$#TXTS+1;$cols+=$#BINS+1;$cols/=6;if($cols=~/\./){$cols=int($cols)+1} push(@TXTS,@BINS);@TXTS=sort(@TXTS); push(@RET,@FLDRS);push(@RET,@TXTS);$i=0; foreach $r (@RET){ if($i==0){$RETURN.=qq~~} $RETURN.=$r; if($i==5){$RETURN.=qq~~;$i=-1} ++$i; }} if($param2 eq "saveas"){ $cols=$#FLDRS+1;$cols+=$#TXTS+1;$cols/=6;if($cols=~/\./){$cols=int($cols)+1} push(@RET,@FLDRS);push(@RET,@TXTS);$i=0; foreach $r (@RET){ if($i==0){$RETURN.=qq~~} $RETURN.=$r; if($i==6){$RETURN.=qq~~;$i=-1} ++$i; }} if($param2 eq "find_folder"){ $cols=$#FLDRS+1;$cols+=$#TXTS+1;$cols+=$#BINS+1;$cols/=4;if($cols=~/\./){$cols=int($cols)+1} push(@RET,@FLDRS);push(@RET,@TXTS);push(@RET,@BINS);$i=0; foreach $r (@RET){ if($i==0){$RETURN.=qq~~} $RETURN.=$r; if($i==4){$RETURN.=qq~~;$i=-1} ++$i; } $un_url=~s!/$!!; $re=qq~top.selection1("re","obj","$un_url")~; } if($param2 eq "insert_image"){ $cols=$#FLDRS+1;$cols+=$#BINS+1;$cols/=4;if($cols=~/\./){$cols=int($cols)+1} push(@RET,@FLDRS);push(@RET,@BINS);$i=0; foreach $r (@RET){ if($i==0){$RETURN.=qq~~} $RETURN.=$r; if($i==4){$RETURN.=qq~~;$i=-1} ++$i; }} if($param2 eq "saveas"){ $CURRENT= qq~if(parent.document.getElementById("saveas_url")){parent.document.getElementById("saveas_url").value="$un_url"}~; } $array=join("\",\"",@ARRAY); $folders=join("\",\"",@fldrs); $bins=join("\",\"",@allowable_binary_extensions); $bins=uc($bins); unless($param3 eq "two"){ print "Set-Cookie: Current_Dir=$path_to_domain$curr_dir;path=/\n"; } $nu_folder_display="visible"; if($Files_Dir){$nu_folder_display="hidden";$disabled="true";if($DIR eq $DIRX){$aro_display="none";;}} $vpage = qq~
$aro $un_url
$RETURN
~; print "Content-type: text/html\n\n"; print "$vpage"; sub get_title{ #++++++++++++++++++++++++++++++++++++++++++++++++ $bell=1; if($editing_mode==1 && !$super && $param2 eq "open_page"){$bell=0} open(P,"$_[0]"); while(

){ m!(.+?)!si;$pt=$1; $pt=~s`«|»|"` `g; $pt=~ s`\W` `g; if($bell==0){ if(/editblock=|includeblock=/){$bell=1;last} }else{ if($pt ne ''){last} } } $pt=substr($pt,0,60); $pt=~s`'``g; if($pt ne ''){$PT=qq~$com_text_title => $pt~} }##get title sub common{ #+++++++++++++++++++++++++++++++++++++++++++++++++++ @test=@files; opendir(COM,$com_path); @com=readdir(COM); if($#com>-1){ $com_fldr_name=$com_path;$com_fldr_name=~s-.+/([^/]+)$-$1-; push(@fldrs,"common"); $hrf=qq~parent.selection1("dir","$com_path","$url_to_common")~; $FLDR=qq~

$dir$com_fldr_name
~; push(@FLDRS,$FLDR); } @test=(); }#common 1;