Subversion Repositories ORC

Rev

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

Rev 7 Rev 8
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 RollerCon;
5
use RollerCon;
5
use CGI;
6
use CGI;
6
use CGI::Cookie;
7
use CGI::Cookie;
7
use WebDB;
8
use WebDB;
Line 60... Line 61...
60
}
61
}
Line 61... Line 62...
61
	
62
	
62
my @managers;
63
my @managers;
63
if ($LVL >= 3) {
64
if ($LVL >= 3) {
-
 
65
	my $manager_departments = join " or ", map { "department like '%$_-0%'" } grep { $user->{department}->{$_} > 2 } keys %{$user->{department}};
64
	my $manager_departments = join " or ", map { "department like '%$_-0%'" } grep { $user->{department}->{$_} > 2 } keys %{$user->{department}};
66
	if ($manager_departments) {
65
	my ($count) = $dbh->selectrow_array ("select count(*) from official where $manager_departments");
67
  	my ($count) = $dbh->selectrow_array ("select count(*) from official where $manager_departments");
66
	my $counttxt = $count == 1 ? "is 1 user" : "are $count users";
68
  	my $counttxt = $count == 1 ? "is 1 user" : "are $count users";
-
 
69
  	push @managers, $h->li ($h->a ({ href=>"user_report.pl?autoload=1&RCid=true&derby_name=true&email=true&real_name=true&access=true&department=true&added=true&filter-RCid=&filter-derby_name=&filter-email=&filter-real_name=&filter-access=0&filter-department=&filter-added=&sortby=derby_name&limit=25&page=1" }, "There $counttxt waiting to be activated")) if $count;
67
	push @managers, $h->li ($h->a ({ href=>"user_report.pl?filter-access=0" }, "There $counttxt waiting to be activated")) if $count;
70
	}
68
	push @managers, $h->li ($h->a ({ href=>"/schedule/manage_shifts.pl" }, "Update your department shift schedule"));
71
 	push @managers, $h->li ($h->a ({ href=>"/schedule/manage_shifts.pl" }, "Update your department shift schedule"));
69
	push @managers, $h->li ($h->a ({ href=>"/schedule/log.pl" }, "Activity Log"));
-
 
70
	
72
 	push @managers, $h->li ($h->a ({ href=>"/schedule/log.pl" }, "Activity Log"));
71
	# Shift Report: select dayofweek, count(RCid) as filled_shifts, count(*) - count(RCid) as open_shifts, count(*) as total_shifts from v_shift group by date order by date
73
	# Shift Report: select dayofweek, count(RCid) as filled_shifts, count(*) - count(RCid) as open_shifts, count(*) as total_shifts from v_shift group by date order by date
Line 72... Line 74...
72
}
74
}
73
 
75
 
Line 78... Line 80...
78
	my ($d, $t) = split /\s+/, $logs[0];
80
	my ($d, $t) = split /\s+/, $logs[0];
79
	push @activity_log, $h->li ({ class=>"shaded" }, join " ", @logs);
81
	push @activity_log, $h->li ({ class=>"shaded" }, join " ", @logs);
80
}
82
}
Line 81... Line 83...
81
 
83
 
-
 
84
my @reference;
82
my @reference;
85
push @reference, $h->li ($h->a ({ href=>"/info.html" }, "Information about using this tool"));
Line 83... Line 86...
83
push @reference, $h->li ($h->a ({ href=>"http://rollercon.com/help-wanted/officiating/" }, "RollerCon Officiating Details"));
86
push @reference, $h->li ($h->a ({ href=>"http://rollercon.com/help-wanted/officiating/" }, "RollerCon Officiating Details"));
84
 
87
 
Line 93... Line 96...
93
 
96
 
Line 94... Line 97...
94
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Lead:"), $h->ul ([ @leads ]) ]) if ($LVL > 1);
97
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Lead:"), $h->ul ([ @leads ]) ]) if ($LVL > 1);
Line 95... Line 98...
95
 
98
 
Line 96... Line 99...
96
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Manager:"), $h->ul ([ @managers ]) ]) if ($LVL > 1);
99
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Manager:"), $h->ul ([ @managers ]) ]) if ($LVL > 1);
Line 97... Line 100...
97
 
100
 
98
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Your Latest Activity:"), $h->ul ([ @activity_log ]), $h->h5 ($h->a ({ href=>"log.pl?filter-RCid=".$user->{RCid} }, "[Your entire log history]")) ]);
101
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]")) ]);