Файл: EasyHost v2.0/system/lib/pureftpd.pl
Строк: 39
<?php
sub go
{
my ($cgi,%config) = @_;
use EasyHost::Display;
use EasyHost::Category;
use EasyHost::DBI;
use EasyHost::Directory;
use EasyHost::Email;
use EasyHost::File;
use EasyHost::FileExtension;
use EasyHost::Format;
use EasyHost::Log;
use EasyHost::Login;
use EasyHost::Package;
use EasyHost::Search;
use EasyHost::SearchFile;
use EasyHost::Service;
use EasyHost::Socket;
use EasyHost::Stats;
use EasyHost::System;
use EasyHost::User;
use EasyHost::UserDirectory;
use EasyHost::UserFile;
use EasyHost::UserSearchFile;
&bad if ($config{'setup'} || !$ENV{AUTHD_ACCOUNT});
my $system = EasyHost::System->new($cgi,%config);
my $user = $system->service->user($ENV{'AUTHD_ACCOUNT'}) || &bad;
if ($ENV{'AUTHD_PASSWORD'} ne $user->password || $user->status != 1 || $user->config('ftp') != 1)
{
print "auth_ok:-1n";
print "endn";
}
else
{
print "auth_ok:1n";
print 'uid:'.$user->directory->stat('uid')."n";
print 'gid:'.$user->directory->stat('gid')."n";
print 'dir:'.$user->directory->real->path."./n";
print 'user_quota_size:'.$user->config('space_quota')."n" if ($user->config('space_quota') > 0);
print 'user_quota_files:'.$user->config('space_files')."n" if ($user->config('space_files') > 0);
print "endn";
}
}
sub bad
{
print "auth_ok:0n";
print "endn";
exit();
}
1;
?>