version 1.4, 2001/06/24 01:40:14
|
version 1.5, 2001/06/24 18:09:38
|
Line 13
|
Line 13
|
# 03/23 Guy Albertelli |
# 03/23 Guy Albertelli |
# 03/24,03/29 Gerd Kortemeyer) |
# 03/24,03/29 Gerd Kortemeyer) |
# |
# |
# 03/31,04/03,05/02,05/09,06/23 Gerd Kortemeyer) |
# 03/31,04/03,05/02,05/09,06/23,06/24 Gerd Kortemeyer) |
# |
# |
# 06/23 Gerd Kortemeyer |
# 06/23 Gerd Kortemeyer |
|
|
Line 114 sub phaseone {
|
Line 114 sub phaseone {
|
|
|
sub phasetwo { |
sub phasetwo { |
my ($r,$fn,$uname,$udom)=@_; |
my ($r,$fn,$uname,$udom)=@_; |
$r->print('Under Construction'); |
|
|
$fn=~/(.*)\/([^\/]+)\.(\w+)$/; |
|
my $dir=$1; |
|
my $main=$2; |
|
my $suffix=$3; |
|
|
|
my $conspace='/home/'.$uname.'/public_html'.$fn; |
|
|
|
if ($ENV{'form.action'} eq 'rename') { |
|
if (-e $conspace) { |
|
if ($ENV{'form.newfilename'}) { |
|
unless (rename('/home/'.$uname.'/public_html'.$fn, |
|
'/home/'.$uname.'/public_html'.$dir.'/'.$ENV{'form.newfilename'})) { |
|
$r->print('<font color=red>Error: '.$!.'</font>'); |
|
} |
|
} |
|
} else { |
|
$r->print('<p>No such file.</form>'); |
|
return; |
|
} |
|
} elsif ($ENV{'form.action'} eq 'delete') { |
|
if (-e $conspace) { |
|
unless (unlink('/home/'.$uname.'/public_html'.$fn)) { |
|
$r->print('<font color=red>Error: '.$!.'</font>'); |
|
} |
|
} else { |
|
$r->print('<p>No such file.</form>'); |
|
return; |
|
} |
|
} elsif ($ENV{'form.action'} eq 'copy') { |
|
if (-e $conspace) { |
|
if ($ENV{'form.newfilename'}) { |
|
unless (copy('/home/'.$uname.'/public_html'.$fn, |
|
'/home/'.$uname.'/public_html'.$dir.'/'.$ENV{'form.newfilename'})) { |
|
$r->print('<font color=red>Error: '.$!.'</font>'); |
|
} |
|
} else { |
|
$r->print('<p>No new filename specified.</form>'); |
|
return; |
|
} |
|
} else { |
|
$r->print('<p>No such file.</form>'); |
|
return; |
|
} |
|
} elsif ($ENV{'form.action'} eq 'newdir') { |
|
my $newdir='/home/'.$uname.'/public_html/'. |
|
$fn.$ENV{'form.newfilename'}; |
|
unless (mkdir($newdir,0770)) { |
|
$r->print('<font color=red>Error: '.$!.'</font>'); |
|
} |
|
} |
|
$r->print('<h3><a href="/priv/'.$uname.$dir.'/">Done</a></h3>'); |
} |
} |
|
|
sub handler { |
sub handler { |