Subversion Repositories VORC

Rev

Rev 46 | Rev 56 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 46 Rev 50
Line 1... Line 1...
1
#!/usr/bin/perl
1
#!/usr/bin/perl
Line 2... Line 2...
2
 
2
 
3
use strict;
3
use strict;
4
use cPanelUserConfig;
4
use cPanelUserConfig;
5
use RollerCon;
5
use RollerCon;
6
use CGI;
6
use CGI qw/param header start_html url/;
7
use CGI::Cookie;
7
use CGI::Cookie;
8
use WebDB;
8
#use WebDB;
Line 9... Line 9...
9
our $h = HTML::Tiny->new( mode => 'html' );
9
our $h = HTML::Tiny->new( mode => 'html' );
10
 
10
 
11
my $cookie_string = authenticate(1) || die;
11
my $cookie_string = authenticate (1) || die;
-
 
12
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
12
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
13
#my $user = getUser($EML);
13
my $user = getUser($EML);
14
my $user = $ORCUSER;
14
$user->{department} = convertDepartments $user->{department};
15
#$user->{department} = convertDepartments $user->{department};
15
my $activated = max (values %{ $user->{department} });
16
my $activated = max (values %{ $user->{department} });
Line 16... Line 17...
16
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
17
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
Line 17... Line 18...
17
my $DEPTS = getDepartments;
18
my $DEPTS = getDepartments ();
18
 
19
 
19
print CGI::header(-cookie=>$RCAUTH_cookie);
20
print header (-cookie=>$RCAUTH_cookie);
Line 20... Line 21...
20
 
21
 
21
#foreach (sort keys %ENV) {
22
#foreach (sort keys %ENV) {
22
#	print "$_: $ENV{$_}\n<br>";
23
#	print "$_: $ENV{$_}\n<br>";
Line 23... Line 24...
23
#}
24
#}
24
 
25
 
25
#use DBI;
26
#use DBI;
Line -... Line 27...
-
 
27
#my $dbh = WebDB->connect ();
-
 
28
my $dbh = getRCDBH ();
-
 
29
 
26
#my $dbh = WebDB->connect ();
30
use DateTime;
Line 27... Line 31...
27
my $dbh = getRCDBH;
31
my $dt = DateTime->today;
28
 
32
$dt =~ s/T00\:00\:00$//;
29
use DateTime;
33
 
Line 93... Line 97...
93
 
97
 
94
my @sysadmins;
98
my @sysadmins;
95
if ($LVL >= 5) {
99
if ($LVL >= 5) {
96
  push @sysadmins, $h->li ($h->a ({ href=>"/schedule/bulk_upload.pl" }, "Upload a CSV of Department Shifts"));
100
  push @sysadmins, $h->li ($h->a ({ href=>"/schedule/bulk_upload.pl" }, "Upload a CSV of Department Shifts"));
-
 
101
 	push @sysadmins, $h->li ($h->a ({ href=>"/schedule/manage_shifts.pl" }, "Update department shift schedule"));
Line 97... Line 102...
97
 	push @sysadmins, $h->li ($h->a ({ href=>"/schedule/manage_shifts.pl" }, "Update department shift schedule"));
102
 	push @sysadmins, $h->li ($h->a ({ href=>"/schedule/volhours_report.pl?limit=All" }, "YEAR END VOLUNTEER HOURS REPORT"));
98
 	
103
 	
Line 99... Line 104...
99
 	my ($signupcount) = $dbh->selectrow_array ("select count(*) from v_shift where dept = ? and RCid <> ''", undef, "CLA");
104
 	my ($signupcount) = $dbh->selectrow_array ("select count(*) from v_shift where dept = ? and RCid <> ''", undef, "CLA");
Line 122... Line 127...
122
push @reference, $h->li ($h->a ({ href=>"http://rollercon.com/help-wanted/officiating/" }, "RollerCon Officiating Details"));
127
push @reference, $h->li ($h->a ({ href=>"http://rollercon.com/help-wanted/officiating/" }, "RollerCon Officiating Details"));
Line 123... Line 128...
123
 
128
 
124
printRCHeader("Home");
129
printRCHeader("Home");
Line 125... Line 130...
125
print $h->close ("table");
130
print $h->close ("table");
-
 
131
 
-
 
132
print $h->form ({ name => "Req", action => url });
Line 126... Line 133...
126
 
133
 
Line 127... Line 134...
127
print $h->form ({ name=>"Req", action=>url });
134
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Announcement:"), $h->ul ([ @announcements ]) ]) if (scalar @announcements);
Line 143... Line 150...
143
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Your Latest Activity:"), $h->ul ([ @activity_log ]), $h->h5 ($h->a ({ href=>"log.pl?excel=0&autoload=1&eventid=true&timestamp=true&event=true&RCid=true&derby_name=true&filter-timestamp=&filter-event=&filter-RCid=".$user->{RCid}."&filter-derby_name=&sortby=eventid&limit=25&page=1" }, "[Your entire log history]")) ]);
150
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Your Latest Activity:"), $h->ul ([ @activity_log ]), $h->h5 ($h->a ({ href=>"log.pl?excel=0&autoload=1&eventid=true&timestamp=true&event=true&RCid=true&derby_name=true&filter-timestamp=&filter-event=&filter-RCid=".$user->{RCid}."&filter-derby_name=&sortby=eventid&limit=25&page=1" }, "[Your entire log history]")) ]);
Line 144... Line 151...
144
 
151
 
Line 145... Line 152...
145
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Reference:"), $h->ul ([ @reference ]) ]);
152
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Reference:"), $h->ul ([ @reference ]) ]);
146
 
153