| Line 11... |
Line 11... |
| 11 |
use RollerCon;
|
11 |
use RollerCon;
|
| 12 |
use CGI qw/param header start_html url/;
|
12 |
use CGI qw/param header start_html url/;
|
| 13 |
use CGI::Cookie;
|
13 |
use CGI::Cookie;
|
| 14 |
#use WebDB;
|
14 |
#use WebDB;
|
| 15 |
our $h = HTML::Tiny->new( mode => 'html' );
|
15 |
our $h = HTML::Tiny->new( mode => 'html' );
|
| - |
|
16 |
my $dbh = getRCDBH ();
|
| Line 16... |
Line 17... |
| 16 |
|
17 |
|
| 17 |
my $cookie_string = authenticate (1) || die;
|
18 |
my $cookie_string = authenticate (1) || die;
|
| 18 |
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
|
19 |
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
|
| 19 |
#my $user = getUser($EML);
|
20 |
#my $user = getUser($EML);
|
| 20 |
my $user = $ORCUSER;
|
21 |
my $user = $ORCUSER;
|
| 21 |
#$user->{department} = convertDepartments $user->{department};
|
22 |
#$user->{department} = convertDepartments $user->{department};
|
| 22 |
#my $activated = max (values %{ $user->{department} });
|
23 |
#my $activated = max (values %{ $user->{department} });
|
| 23 |
my $activated = $ORCUSER->{access};
|
- |
|
| 24 |
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
|
24 |
my $activated = $ORCUSER->{access};
|
| Line 25... |
Line 25... |
| 25 |
my $DEPTS = getDepartments ();
|
25 |
my $DEPTS = getDepartments ();
|
| Line 26... |
Line 26... |
| 26 |
|
26 |
|
| 27 |
print header (-cookie=>$RCAUTH_cookie);
|
27 |
print header (-cookie=>CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m"));
|
| 28 |
|
28 |
|
| Line 29... |
Line -... |
| 29 |
#foreach (sort keys %ENV) {
|
- |
|
| 30 |
# print "$_: $ENV{$_}\n<br>";
|
- |
|
| 31 |
#}
|
- |
|
| Line 32... |
Line 29... |
| 32 |
|
29 |
#foreach (sort keys %ENV) {
|
| 33 |
#use DBI;
|
30 |
# print "$_: $ENV{$_}\n<br>";
|
| 34 |
#my $dbh = WebDB->connect ();
|
31 |
#}
|
| Line 176... |
Line 173... |
| 176 |
|
173 |
|
| 177 |
|
174 |
|
| Line 178... |
Line 175... |
| 178 |
# push @sysadmins, $h->li ($mvpcount." MVP Passholders have signed up for ".$signupcount." spots (".sprintf("%.2f", ($signupcount / ($mvpcount*getSetting("MAX_CLASS_SIGNUP"))) * 100)."\% of allowable signups).");
|
175 |
# push @sysadmins, $h->li ($mvpcount." MVP Passholders have signed up for ".$signupcount." spots (".sprintf("%.2f", ($signupcount / ($mvpcount*getSetting("MAX_CLASS_SIGNUP"))) * 100)."\% of allowable signups).");
|
| 179 |
# push @sysadmins, $h->li (sprintf("%.2f", ($signupcount / $total_class_count) * 100)."\% of total class spaces are filled.");
|
176 |
# push @sysadmins, $h->li (sprintf("%.2f", ($signupcount / $total_class_count) * 100)."\% of total class spaces are filled.");
|
| 180 |
|
177 |
|
| 181 |
my ($active) = $dbh->selectrow_array ("select count(distinct RCid) as users from log where timestamp > (now() - interval 30 minute) and event not like 'Updated User Details%' and event not like 'Activated to work%' and event not like 'New User Registration' and event not like 'Login attempted without activation code.'");
|
178 |
my ($active) = $dbh->selectrow_array ("select count(*) from official where last_active > (now() - interval 30 minute)");
|
| 182 |
#my ($active) = $dbh->selectrow_array ("select * from official where last_login > (now() - interval 150 minute) order by last_login desc");
|
179 |
#my ($active) = $dbh->selectrow_array ("select * from official where last_login > (now() - interval 150 minute) order by last_login desc");
|