#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

require 5.004;

use strict;
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use EdcomLib::EdcomLib;
use EdcomLib::Auth;
use EdcomLib::Tables;
use EdcomLib::SQL;
use EdcomLib::Time;

$CGI::POST_MAX=1024 * 10;
$CGI::DISABLE_UPLOADS = 1;

my $q = new CGI;
my $auth = new EdcomLib::Auth;
my $p = new EdcomLib::EdcomLib;
my $t = new EdcomLib::Tables;
my $time = new EdcomLib::Time;
my $s = new EdcomLib::SQL;
$s->connect(
	{'pass' => 'qudc79'}
);

my $h = {};
my $aref = undef;

print $q->header();

if($q->param('uid') ne '') {
	userinfo();
}
else {
	print $q->start_html();
	print $t->getblock('bad_access');
	print $q->end_html();
}

sub userinfo {
	$h->{'uid'} = $q->param('uid');
	print $p->parse(
		$t->getheb('user_info'),
		$h
	);
}
