Файл: EasyHost v2.0/system/htdocs/manager/files/directory/upload.pl
Строк: 16
<?php
foreach my $key (grep { /^filed+$/ } $system->param)
{
my $name = ($system->param($key) =~ /([^\/]+$)/)[0];
next if (length($name) < 1);
my $handle = $system->upload($key);
my $file = $login->directory->file($name);
my $mode = (-B $handle) ? 'BINARY' : 'ASCII';
seek($handle,0,0);
$file->write(join(undef,<$handle>),$mode);
$login->user->notice('file_create','uploaded a file ('.$file->path.')');
}
$system->redirect('/manager/files/directory');
?>