| 7 |
- |
1 |
#!/usr/bin/perl
|
|
|
2 |
|
| 56 |
bgadell |
3 |
# Redirect error messages to a log of my choosing. (it's annoying to filter for errors in the shared env)
|
| 180 |
- |
4 |
#my $error_log_path = $ENV{SERVER_NAME} eq "volunteers.rollercon.com" ? "/home3/rollerco/logs/" : "/tmp/";
|
|
|
5 |
#close STDERR;
|
|
|
6 |
#open STDERR, '>>', $error_log_path.'vorc_error.log' or warn "Failed to open redirected logfile ($0): $!";
|
| 56 |
bgadell |
7 |
#warn "Redirecting errors to ${error_log_path}vorc_error.log";
|
|
|
8 |
|
| 7 |
- |
9 |
use strict;
|
| 8 |
- |
10 |
use cPanelUserConfig;
|
| 7 |
- |
11 |
use RollerCon;
|
| 50 |
bgadell |
12 |
use CGI qw/param header start_html url/;
|
| 7 |
- |
13 |
use CGI::Cookie;
|
|
|
14 |
our $h = HTML::Tiny->new( mode => 'html' );
|
| 138 |
- |
15 |
my $dbh = getRCDBH ();
|
| 7 |
- |
16 |
|
| 50 |
bgadell |
17 |
my $cookie_string = authenticate (1) || die;
|
| 7 |
- |
18 |
my ($EML, $PWD, $LVL) = split /&/, $cookie_string;
|
| 50 |
bgadell |
19 |
my $user = $ORCUSER;
|
| 65 |
bgadell |
20 |
my $activated = $ORCUSER->{access};
|
| 50 |
bgadell |
21 |
my $DEPTS = getDepartments ();
|
| 7 |
- |
22 |
|
| 138 |
- |
23 |
print header (-cookie=>CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m"));
|
| 7 |
- |
24 |
|
|
|
25 |
#foreach (sort keys %ENV) {
|
|
|
26 |
# print "$_: $ENV{$_}\n<br>";
|
|
|
27 |
#}
|
|
|
28 |
|
|
|
29 |
use DateTime;
|
|
|
30 |
my $dt = DateTime->today;
|
|
|
31 |
$dt =~ s/T00\:00\:00$//;
|
|
|
32 |
|
| 50 |
bgadell |
33 |
my @announcements;
|
| 134 |
- |
34 |
if ($user->{department}->{EMT} >= RollerCon::USER and !$user->{emt_verified}) {
|
| 261 |
- |
35 |
push @announcements, $h->li ({ style => "padding-bottom:10px;" }, "<b>EMT NOTE:</b> Anyone in the EMT department can see shifts, but you cannot sign up for them until your credentials have been verified. Start here: ".$h->a ({ href => "https://rollercon.com/help-wanted/emts/", target => "_blank" }, "https://rollercon.com/help-wanted/emts/"));
|
| 134 |
- |
36 |
}
|
|
|
37 |
|
| 261 |
- |
38 |
if (!$user->{MVPid}) {
|
|
|
39 |
push @announcements, $h->li ({ style => "padding-bottom:10px;" }, "<b>Did you get an MVP Ticket?</b>".$h->br.$h->div ( { style => "font-size:small;padding-bottom:10px;" }, "As of right now, your MVP Ticket hasn't been matched with your VORC account. (If your civil name and email address are exactly the same between your VORC account and Events.com registration, the match happens automatically.) We periodically review a list of 'almost' matches and manually connect what we can.",
|
|
|
40 |
"If you just bought your MVP ticket, or you just created your VORC account, it can take a couple of days for the systems to synchronize (or someone to do the manual review). If it's been longer than a few days, your info probably isn't close enough for a human to be sure that ticket belongs to you.",
|
|
|
41 |
"Email <b>rollercon.vorc\@gmail.com</b> from the account that's registered in VORC with your Events.com registrion ID, and we'll help as quickly as we can."));
|
|
|
42 |
}
|
|
|
43 |
|
| 180 |
- |
44 |
my $volhours = getSchedule ($user->{RCid}, 'all', 'hours');
|
|
|
45 |
if ($volhours) {
|
| 261 |
- |
46 |
push @announcements, $h->li ({ style => "padding-bottom:10px;" }, "<b>Volunteer Hours:</b> You currently have credit for $volhours hour(s) of volunteer time.");
|
| 180 |
- |
47 |
}
|
|
|
48 |
|
| 56 |
bgadell |
49 |
my ($announcement) = $dbh->selectrow_array ("select value from setting where setting.key = ?", undef, "ANNOUNCEMENT");
|
| 261 |
- |
50 |
push @announcements, $h->li ({ style => "padding-bottom:10px;" }, $announcement) if $announcement;
|
| 50 |
bgadell |
51 |
|
| 194 |
- |
52 |
#if ($user->{department}->{OFF} > 0) {
|
|
|
53 |
# my @days = ("Thursday", "Friday", "Saturday");
|
|
|
54 |
# my @dayschecked;
|
|
|
55 |
# foreach my $day (@{$dbh->selectall_arrayref ("select dayofweek from v_shift where year(date) = year(now()) and RCid = ? and role = 'Officiating Huddle'", undef, $user->{RCid})}) {
|
|
|
56 |
# push @dayschecked, @{$day};
|
|
|
57 |
# }
|
|
|
58 |
#
|
|
|
59 |
# use tableViewer qw/inArray/;
|
| 261 |
- |
60 |
# push @announcements, $h->li ({ style => "padding-bottom:10px;" }, "Did you attend the Officiating Huddle on:"),
|
| 194 |
- |
61 |
# $h->form ({ action => "add_officiating_huddle_time.pl", target => "_blank" }, [
|
|
|
62 |
# map ({ inArray($_, \@dayschecked) ? $h->input ({ type => "checkbox", name => $_, checked => [] }).$_.$h->br : $h->input ({ type => "checkbox", name => $_ }).$_.$h->br } @days),
|
|
|
63 |
# $h->input ({ type => "submit", value => scalar @dayschecked ? "Update my hours." : "Give me credit!" })
|
|
|
64 |
# ]);
|
|
|
65 |
#}
|
| 56 |
bgadell |
66 |
|
| 249 |
- |
67 |
#if ($user->{department}->{OFF} > 1) {
|
|
|
68 |
# my @days = ("Thursday", "Friday", "Saturday");
|
|
|
69 |
# my @dayschecked;
|
|
|
70 |
# foreach my $day (@{$dbh->selectall_arrayref ("select dayofweek from v_shift where year(date) = year(now()) and RCid = ? and role = 'Officiating Leads Huddle'", undef, $user->{RCid})}) {
|
|
|
71 |
# push @dayschecked, @{$day};
|
|
|
72 |
# }
|
|
|
73 |
#
|
|
|
74 |
# use tableViewer qw/inArray/;
|
| 261 |
- |
75 |
# push @announcements, $h->li ({ style => "padding-bottom:10px;" }, "Did you attend the Officiating Leads Huddle on:"),
|
| 249 |
- |
76 |
# $h->form ({ action => "add_officiating_leads_huddle_time.pl", target => "_blank" }, [
|
|
|
77 |
# map ({ inArray($_, \@dayschecked) ? $h->input ({ type => "checkbox", name => $_, checked => [] }).$_.$h->br : $h->input ({ type => "checkbox", name => $_ }).$_.$h->br } @days),
|
|
|
78 |
# $h->input ({ type => "submit", value => scalar @dayschecked ? "Update my hours." : "Give me credit!" })
|
|
|
79 |
# ]);
|
|
|
80 |
#}
|
| 112 |
- |
81 |
|
| 7 |
- |
82 |
my $schedule = getSchedule ($user->{RCid});
|
|
|
83 |
|
|
|
84 |
my @everyone;
|
|
|
85 |
my @printDEPTS = map { $DEPTS->{$_} } grep { $user->{department}->{$_} > 0 } grep { !/(ANN)|(OFF)/ } sort keys %{$user->{department}};
|
|
|
86 |
push @printDEPTS, "Officiating Lead" if $user->{department}->{"OFF"} > 1;
|
|
|
87 |
my $printDEPTS = join ", ", @printDEPTS;
|
|
|
88 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/shifts.pl" }, "View and Sign Up for $printDEPTS Shifts")) if $printDEPTS;
|
|
|
89 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/officiating_shifts.pl" }, "View and Sign Up for Officiating Shifts")) if $user->{department}->{OFF} > 0;
|
| 183 |
- |
90 |
|
| 194 |
- |
91 |
my @OHD_YEARS;
|
| 183 |
- |
92 |
if ($user->{department}->{OFF} > 0) {
|
| 194 |
- |
93 |
foreach my $officiating_year (@{$dbh->selectall_arrayref ("select distinct year(date) as year from v_shift_officiating where RCid = ? and gtype in ('challenge', 'full length', 'selected', 'challenge-rs1', 'challenge-rs2') order by year desc", undef, $user->{RCid})}) {
|
|
|
94 |
push @OHD_YEARS, $h->li ($h->a ({ href=>"/schedule/ohd.pl?year=".$officiating_year->[0] }, $officiating_year->[0]));
|
|
|
95 |
}
|
| 183 |
- |
96 |
}
|
| 194 |
- |
97 |
push @everyone, $h->li (["Export your officiating game assignments in OHD Format (CSV File):", $h->ul ([@OHD_YEARS])]) unless !scalar @OHD_YEARS;
|
| 183 |
- |
98 |
|
| 29 |
- |
99 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/announcer_shifts.pl" }, "View and Sign Up to Announce Games")) if $user->{department}->{ANN} > 0;
|
| 56 |
bgadell |
100 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/games.pl" }, "View Games"));
|
|
|
101 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/personal_time.pl" }, "Block Personal Time"));
|
| 193 |
- |
102 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/missing_hours.pl" }, "Request Missing Volunteer Time"));
|
| 56 |
bgadell |
103 |
push @everyone, $h->li ($h->a ({ href=>"/schedule/view_user.pl?submit=Edit&RCid=$user->{RCid}" }, "Edit your profile"));
|
| 7 |
- |
104 |
|
| 252 |
- |
105 |
|
|
|
106 |
my @seminars;
|
|
|
107 |
my $seminar_reviews;
|
|
|
108 |
|
|
|
109 |
my ($seminars_exist) = $dbh->selectrow_array ("select count(*) from v_seminar_new where year(date) = year(now())");
|
|
|
110 |
if ($seminars_exist) {
|
|
|
111 |
push @seminars, $h->li ("<b>NEW:</b> ".$h->a ({href=>"seminars.pl"}, "View and sign up for Seminars!"));
|
|
|
112 |
|
|
|
113 |
# push @seminars, $h->li ($h->a ({ href=>"/schedule/current_coaches.pl" }, "View the list of current MVP Coaches"));
|
|
|
114 |
|
|
|
115 |
# Get a list of seminars attended to ask for reviews...
|
|
|
116 |
my (@reviews_done, @reviews_tbd);
|
|
|
117 |
# foreach my $class (@{$dbh->selectall_arrayref ("select id, date, time, name, coach, count(*) as answers from v_class_signup_new left join v_survey_answer on id = classid and v_class_signup_new.RCid = v_survey_answer.RCid where v_class_signup_new.RCid = ? and year(date) = year(now()) and concat_ws(' ', date, end_time) < date_sub(now(), interval 2 hour) group by id order by date, start_time", undef, $user->{RCid})}) {
|
|
|
118 |
foreach my $class (@{$dbh->selectall_arrayref ("select id, date, time, name, null, count(*) as answers from v_seminar_signup_new left join v_seminar_survey_answer on id = seminarid and v_seminar_signup_new.RCid = v_seminar_survey_answer.RCid where v_seminar_signup_new.RCid = ? and year(date) = year(now()) and concat_ws(' ', date, end_time) < date_sub(now(), interval 2 hour) group by id order by date, start_time", undef, $user->{RCid})}) {
|
|
|
119 |
my ($id, $date, $time, $name, $coach, $answers) = @{$class};
|
|
|
120 |
next unless $id;
|
|
|
121 |
$time = convertTime $time;
|
|
|
122 |
|
|
|
123 |
if ($answers > 1) {
|
|
|
124 |
push @reviews_done, $h->li ("$date $time: ".$h->a ({ href=>"/schedule/seminar_survey.pl?seminarid=$id" }, "$name [".getUserDerbyName ($coach)."]"));
|
|
|
125 |
} else {
|
|
|
126 |
push @reviews_tbd, $h->li ("$date $time: ".$h->a ({ href=>"/schedule/seminar_survey.pl?seminarid=$id" }, "$name [".getUserDerbyName ($coach)."]"));
|
|
|
127 |
}
|
|
|
128 |
}
|
|
|
129 |
$seminar_reviews = $h->li (["Please submit feedback:", $h->ul ([@reviews_tbd])]) unless !scalar @reviews_tbd;
|
|
|
130 |
$seminar_reviews .= $h->li (["View the feedback you've submitted:", $h->ul ([@reviews_done])]) unless !scalar @reviews_done;
|
|
|
131 |
}
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
|
|
|
135 |
|
| 35 |
- |
136 |
my @mvppass;
|
| 105 |
bgadell |
137 |
my $reviews;
|
|
|
138 |
if ($user->{MVPid} or $user->{department}->{MVP} >= RollerCon::USER or $user->{department}->{COA} >= RollerCon::USER or $LVL >= RollerCon::SYSADMIN) {
|
| 249 |
- |
139 |
|
|
|
140 |
if (getSetting ("MAX_CLASS_SIGNUP") < 1) {
|
|
|
141 |
# push @mvppass, $h->div ({class=>"error"}, "MVP Classes are not open for pre-registration yet. Pre-registration will start sometime this week, but the exact date and time won't be announced. Check back later.").$h->br;
|
|
|
142 |
push @mvppass, $h->div ({class=>"error"}, "MVP Classes are not open for pre-registration yet.").$h->br;
|
| 261 |
- |
143 |
} else {
|
|
|
144 |
push @mvppass, $h->div ({ style=>"font-weight:bold;" }, "MVP Classes are open for pre-registration! You can sign up for up to ".getSetting ("MAX_CLASS_SIGNUP")." classes.").$h->br;
|
| 249 |
- |
145 |
}
|
|
|
146 |
|
| 105 |
bgadell |
147 |
push @mvppass, $h->li ($h->a ({ href=>"/schedule/classes.pl" }, "View and Sign Up for MVP Classes"));
|
| 222 |
- |
148 |
push @mvppass, $h->li ($h->a ({ href=>"/schedule/current_coaches.pl" }, "View the list of current MVP Coaches"));
|
| 105 |
bgadell |
149 |
|
|
|
150 |
# Get a list of classes attended to ask for reviews...
|
| 112 |
- |
151 |
my (@reviews_done, @reviews_tbd);
|
| 208 |
- |
152 |
# foreach my $class (@{$dbh->selectall_arrayref ("select id, date, time, name, coach, count(*) as answers from v_class_signup_new left join v_survey_answer on id = classid and v_class_signup_new.RCid = v_survey_answer.RCid where v_class_signup_new.RCid = ? and year(date) = year(now()) and concat_ws(' ', date, end_time) < date_sub(now(), interval 2 hour) group by id order by date, start_time", undef, $user->{RCid})}) {
|
|
|
153 |
foreach my $class (@{$dbh->selectall_arrayref ("select id, date, time, name, null, count(*) as answers from v_class_signup_new left join v_survey_answer on id = classid and v_class_signup_new.RCid = v_survey_answer.RCid where v_class_signup_new.RCid = ? and year(date) = year(now()) and concat_ws(' ', date, end_time) < date_sub(now(), interval 2 hour) group by id order by date, start_time", undef, $user->{RCid})}) {
|
| 105 |
bgadell |
154 |
my ($id, $date, $time, $name, $coach, $answers) = @{$class};
|
|
|
155 |
next unless $id;
|
|
|
156 |
$time = convertTime $time;
|
|
|
157 |
|
|
|
158 |
if ($answers > 1) {
|
|
|
159 |
push @reviews_done, $h->li ("$date $time: ".$h->a ({ href=>"/schedule/survey.pl?classid=$id" }, "$name [".getUserDerbyName ($coach)."]"));
|
|
|
160 |
} else {
|
|
|
161 |
push @reviews_tbd, $h->li ("$date $time: ".$h->a ({ href=>"/schedule/survey.pl?classid=$id" }, "$name [".getUserDerbyName ($coach)."]"));
|
| 112 |
- |
162 |
}
|
| 105 |
bgadell |
163 |
}
|
| 112 |
- |
164 |
$reviews = $h->li (["Please submit feedback:", $h->ul ([@reviews_tbd])]) unless !scalar @reviews_tbd;
|
|
|
165 |
$reviews .= $h->li (["View the feedback you've submitted:", $h->ul ([@reviews_done])]) unless !scalar @reviews_done;
|
| 35 |
- |
166 |
}
|
| 7 |
- |
167 |
|
|
|
168 |
my @leads = ();
|
|
|
169 |
if ($LVL > 1) {
|
| 56 |
bgadell |
170 |
push @leads, $h->li ($h->a ({ href=>"/schedule/users.pl" }, "View Users in your Department(s)."));
|
| 7 |
- |
171 |
push @leads, $h->li ($h->a ({ href=>"/schedule/password_reset.pl" }, "Reset a Password."));
|
|
|
172 |
|
|
|
173 |
# Officiating Leads:
|
|
|
174 |
if ($user->{department}->{OFF} > 1) {
|
|
|
175 |
unshift @leads, $h->li ($h->a ({ href=>"/schedule/scores.pl" }, "View / Update Game Scores"));
|
|
|
176 |
push @leads, $h->li (["What's happening right now on...", $h->ul ([
|
|
|
177 |
$h->li ($h->a ({ href=>"right_now.pl?t=C1" }, "Track C1")),
|
|
|
178 |
$h->li ($h->a ({ href=>"right_now.pl?t=C2" }, "Track C2")),
|
|
|
179 |
$h->li ($h->a ({ href=>"right_now.pl?t=C3" }, "Track C3")),
|
| 141 |
- |
180 |
$h->li ($h->a ({ href=>"right_now.pl?t=C5" }, "Track C5")),
|
|
|
181 |
$h->li ($h->a ({ href=>"right_now.pl?t=BT" }, "Banked Track")),
|
| 7 |
- |
182 |
])]);
|
|
|
183 |
}
|
| 261 |
- |
184 |
push @announcements, $h->li ({ style => "padding-bottom:10px;" }, [$h->img ({src=>"/images/star-icon.png"}), $h->a ({href => "https://docs.google.com/forms/d/e/1FAIpQLSdcHjUzd7wwpGTK6LPW15XFuWZbpCNHkbdlYxIszwe03WuStQ/viewform"}, "Gold Star Form")]);
|
| 7 |
- |
185 |
}
|
|
|
186 |
|
|
|
187 |
my @managers;
|
|
|
188 |
if ($LVL >= 3) {
|
|
|
189 |
my $manager_departments = join " or ", map { "department like '%$_-0%'" } grep { $user->{department}->{$_} > 2 } keys %{$user->{department}};
|
| 8 |
- |
190 |
if ($manager_departments) {
|
|
|
191 |
my ($count) = $dbh->selectrow_array ("select count(*) from official where $manager_departments");
|
|
|
192 |
my $counttxt = $count == 1 ? "is 1 user" : "are $count users";
|
| 56 |
bgadell |
193 |
push @managers, $h->li ($h->a ({ href=>"users.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;
|
| 8 |
- |
194 |
}
|
|
|
195 |
push @managers, $h->li ($h->a ({ href=>"/schedule/log.pl" }, "Activity Log"));
|
| 29 |
- |
196 |
push @managers, $h->li ($h->a ({ href=>"/schedule/volhours.pl" }, "View Volunteer Hours by Department"));
|
| 39 |
- |
197 |
|
|
|
198 |
foreach (grep { $user->{department}->{$_} > 2 } keys %{$user->{department}}) {
|
|
|
199 |
push @managers, $h->li ($h->a ({ href=>"/schedule/shifts.pl?autoload=1&dept=true&role=true&dayofweek=true&location=true&time=true¬e=true&derby_name=true&filter-dept=$_&sortby=dayofweek&limit=All&page=1" }, "$DEPTS->{$_} Staff Schedule"));
|
|
|
200 |
}
|
|
|
201 |
|
| 46 |
- |
202 |
if ($user->{department}->{VCI} > 2 or $user->{department}->{MVP} > 2 or $LVL > 4) {
|
| 56 |
bgadell |
203 |
push @managers, $h->li ($h->a ({ href=>"/schedule/classes.pl" }, "View MVP Classes"));
|
| 46 |
- |
204 |
push @managers, $h->li ($h->a ({ href=>"/schedule/mvp_class_report.pl", target=>"_new" }, "Daily MVP Class Report (for print)"));
|
| 112 |
- |
205 |
push @managers, $h->li ($h->a ({ href=>"/schedule/mvp_class_report_without_skaters.pl", target=>"_new" }, "Daily MVP Class Report without Skaters (for print)"));
|
| 46 |
- |
206 |
push @managers, $h->li ($h->a ({ href=>"/schedule/daily_print.pl", target=>"_new" }, "Daily Officiating Report (for print)"));
|
|
|
207 |
push @managers, $h->li ($h->a ({ href=>"/schedule/daily_print_announcers.pl", target=>"_new" }, "Daily Announcers Report (for print)"));
|
|
|
208 |
push @managers, $h->li ($h->a ({ href=>"/schedule/print_dept_by_day.pl", target=>"_new" }, "BETA: Daily Shift Report (for print)"));
|
| 249 |
- |
209 |
push @managers, $h->li ($h->a ({ href=>"https://tinyurl.com/RCreportingtool", target=>"_new" }, "COC Reporting Form"));
|
| 46 |
- |
210 |
}
|
|
|
211 |
|
| 220 |
- |
212 |
push @managers, $h->li ($h->a ({ href=>"/schedule/leadership.pl" }, "View Leadership Team"));
|
|
|
213 |
|
| 7 |
- |
214 |
# 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
|
|
|
215 |
}
|
|
|
216 |
|
| 90 |
bgadell |
217 |
my (@sysadmins, @mvpcounts);
|
| 16 |
- |
218 |
if ($LVL >= 5) {
|
|
|
219 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/bulk_upload.pl" }, "Upload a CSV of Department Shifts"));
|
| 60 |
bgadell |
220 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/shifts.pl" }, "Update department shift schedule"));
|
| 58 |
bgadell |
221 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/tickets.pl" }, "Manage MVP Ticket Matches"));
|
| 56 |
bgadell |
222 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/classes.pl" }, "Manage MVP Classes"));
|
|
|
223 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/games.pl" }, "Manage Games"));
|
|
|
224 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/departments.pl" }, "Manage Department Settings"));
|
|
|
225 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/settings.pl" }, "System Settings"));
|
| 50 |
bgadell |
226 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/volhours_report.pl?limit=All" }, "YEAR END VOLUNTEER HOURS REPORT"));
|
| 249 |
- |
227 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/shift_report.pl?limit=All" }, "Open / Closed Volunteer Shift Report"));
|
| 214 |
- |
228 |
# push @sysadmins, $h->li ($h->a ({ href=>"/schedule/shifts.pl?excel=0&autoload=1&dept=true&date=true&dayofweek=true&time=true&doubletime=true&volhours=true&role=true&location=true¬e=true&RCid=true&derby_name=true&filter-dept=COA&filter-date=&filter-dayofweek=&filter-time=&filter-doubletime=&filter-volhours=&filter-role=&filter-location=&filter-note=&filter-RCid=&filter-derby_name=&year=2024&sortby=dayofweek&limit=25&page=1" }, "COACH HOURS REPORT"));
|
|
|
229 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/coach_hours.pl" }, "Coach Hours"));
|
|
|
230 |
push @sysadmins, $h->li ($h->a ({ href=>"/schedule/coach_pay.pl" }, "Coach Pay Report"));
|
| 90 |
bgadell |
231 |
|
|
|
232 |
|
| 35 |
- |
233 |
|
| 90 |
bgadell |
234 |
my ($unclaimed_tix) = $dbh->selectrow_array ("select count(*) from v_ticket where isnull(RCid) = 1");
|
|
|
235 |
my ($mvpcount) = $dbh->selectrow_array ("select count(*) from v_ticket where isnull(RCid) = 0");
|
| 62 |
bgadell |
236 |
$mvpcount = 1 unless $mvpcount;
|
| 90 |
bgadell |
237 |
my $class_limit = getSetting ("MAX_CLASS_SIGNUP");
|
| 35 |
- |
238 |
|
| 90 |
bgadell |
239 |
push @mvpcounts, $h->li ($mvpcount." MVP Tickets have been matched in VORC. ($unclaimed_tix remain unmatched.)");
|
|
|
240 |
push @mvpcounts, $h->li ("They could (in theory) sign up for ".$mvpcount*$class_limit." class spots.");
|
| 35 |
- |
241 |
|
| 208 |
- |
242 |
my ($signupcount, $total_class_count, $available_count) = $dbh->selectrow_array ("select sum(count), sum(capacity), sum(available) from v_class_new where year(date) = year(now())");
|
| 90 |
bgadell |
243 |
|
| 116 |
- |
244 |
$total_class_count //= 0;
|
| 90 |
bgadell |
245 |
push @mvpcounts, $h->li ($total_class_count." Total Class Spots");
|
| 116 |
- |
246 |
push @mvpcounts, $h->li ($signupcount." Filled Class Spots (".sprintf("%.2f", ($signupcount / $total_class_count) * 100)."\%)") unless !$total_class_count;
|
|
|
247 |
push @mvpcounts, $h->li ($available_count." Available Class Spots (".sprintf("%.2f", ($available_count / $total_class_count) * 100)."\%)") unless !$total_class_count;
|
| 90 |
bgadell |
248 |
|
| 138 |
- |
249 |
my ($active) = $dbh->selectrow_array ("select count(*) from official where last_active > (now() - interval 30 minute)");
|
| 35 |
- |
250 |
push @sysadmins, $h->li ("There seem to be about $active user session(s) right now.");
|
| 16 |
- |
251 |
}
|
|
|
252 |
|
| 7 |
- |
253 |
my @activity_log;
|
|
|
254 |
my $alog = $dbh->prepare("select timestamp, event from v_log where RCid = ? limit 10");
|
|
|
255 |
$alog->execute($user->{RCid});
|
|
|
256 |
while (my @logs = $alog->fetchrow_array) {
|
|
|
257 |
my ($d, $t) = split /\s+/, $logs[0];
|
|
|
258 |
push @activity_log, $h->li ({ class=>"shaded" }, join " ", @logs);
|
|
|
259 |
}
|
|
|
260 |
|
|
|
261 |
my @reference;
|
| 8 |
- |
262 |
push @reference, $h->li ($h->a ({ href=>"/info.html" }, "Information about using this tool"));
|
| 7 |
- |
263 |
push @reference, $h->li ($h->a ({ href=>"http://rollercon.com/help-wanted/officiating/" }, "RollerCon Officiating Details"));
|
|
|
264 |
|
|
|
265 |
printRCHeader("Home");
|
|
|
266 |
print $h->close ("table");
|
|
|
267 |
|
| 50 |
bgadell |
268 |
print $h->form ({ name => "Req", action => url });
|
| 7 |
- |
269 |
|
| 50 |
bgadell |
270 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Announcement:"), $h->ul ([ @announcements ]) ]) if (scalar @announcements);
|
|
|
271 |
|
| 35 |
- |
272 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Note:"), "<b>Your account is being reviewed.</b>", $h->br, "You won't have access to view or sign-up for things until you've been approved / added to a department.", $h->br, "Please watch your email for notifications." ]) unless $activated;
|
|
|
273 |
|
| 7 |
- |
274 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Your up-coming schedule (as of $dt):"), $schedule, $h->h5 ("[".$h->a ({ href=>"export_ics.pl?RCid=$user->{RCid}" }, "use this link for iCal")."]") ]) if $schedule;
|
|
|
275 |
|
| 105 |
bgadell |
276 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "MVP Classes:"), $h->ul ([ @mvppass, $reviews ]) ]) if (scalar @mvppass);
|
| 35 |
- |
277 |
|
| 252 |
- |
278 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Seminars:"), $h->ul ([ @seminars, $seminar_reviews ]) ]) if (scalar @seminars);
|
|
|
279 |
|
| 7 |
- |
280 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do:"), $h->ul ([ @everyone ]) ]);
|
|
|
281 |
|
|
|
282 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Lead:"), $h->ul ([ @leads ]) ]) if ($LVL > 1);
|
|
|
283 |
|
| 16 |
- |
284 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Manager:"), $h->ul ([ @managers ]) ]) if ($LVL > 2);
|
| 7 |
- |
285 |
|
| 16 |
- |
286 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a SysAdmin:"), $h->ul ([ @sysadmins ]) ]) if ($LVL >= 5);
|
|
|
287 |
|
| 90 |
bgadell |
288 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "MVP Class and Ticket Status:"), $h->ul ([ @mvpcounts ]) ]) if (scalar @mvpcounts);
|
|
|
289 |
|
| 8 |
- |
290 |
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×tamp=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]")) ]);
|
| 7 |
- |
291 |
|
|
|
292 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Reference:"), $h->ul ([ @reference ]) ]);
|
|
|
293 |
|
|
|
294 |
print $h->close ("body"), $h->close ("html");
|
|
|
295 |
|
| 50 |
bgadell |
296 |
|