| Line 1... |
Line 1... |
| 1 |
#!/usr/bin/perl
|
1 |
#!/usr/bin/perl
|
| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| 3 |
# Redirect error messages to a log of my choosing. (it's annoying to filter for errors in the shared env)
|
3 |
# Redirect error messages to a log of my choosing. (it's annoying to filter for errors in the shared env)
|
| 4 |
my $error_log_path = $ENV{SERVER_NAME} eq "volunteers.rollercon.com" ? "/home3/rollerco/logs/" : "/tmp/";
|
4 |
#my $error_log_path = $ENV{SERVER_NAME} eq "volunteers.rollercon.com" ? "/home3/rollerco/logs/" : "/tmp/";
|
| 5 |
close STDERR;
|
5 |
#close STDERR;
|
| 6 |
open STDERR, '>>', $error_log_path.'vorc_error.log' or warn "Failed to open redirected logfile ($0): $!";
|
6 |
#open STDERR, '>>', $error_log_path.'vorc_error.log' or warn "Failed to open redirected logfile ($0): $!";
|
| Line 7... |
Line 7... |
| 7 |
#warn "Redirecting errors to ${error_log_path}vorc_error.log";
|
7 |
#warn "Redirecting errors to ${error_log_path}vorc_error.log";
|
| 8 |
|
8 |
|
| 9 |
use strict;
|
9 |
use strict;
|
| Line 40... |
Line 40... |
| 40 |
|
40 |
|
| 41 |
if ($user->{department}->{EMT} >= RollerCon::USER and !$user->{emt_verified}) {
|
41 |
if ($user->{department}->{EMT} >= RollerCon::USER and !$user->{emt_verified}) {
|
| 42 |
push @announcements, $h->li ("NOTE: 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/"));
|
42 |
push @announcements, $h->li ("NOTE: 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/"));
|
| Line -... |
Line 43... |
| - |
|
43 |
}
|
| - |
|
44 |
|
| - |
|
45 |
my $volhours = getSchedule ($user->{RCid}, 'all', 'hours');
|
| - |
|
46 |
if ($volhours) {
|
| - |
|
47 |
push @announcements, $h->li ("Volunteer Hours: You currently have credit for $volhours hour(s) of volunteer time.");
|
| 43 |
}
|
48 |
}
|
| 44 |
|
49 |
|
| Line 45... |
Line 50... |
| 45 |
my ($announcement) = $dbh->selectrow_array ("select value from setting where setting.key = ?", undef, "ANNOUNCEMENT");
|
50 |
my ($announcement) = $dbh->selectrow_array ("select value from setting where setting.key = ?", undef, "ANNOUNCEMENT");
|
| 46 |
push @announcements, $h->li ($announcement) if $announcement;
|
51 |
push @announcements, $h->li ($announcement) if $announcement;
|
| 47 |
|
52 |
|
| 48 |
#if ($user->{department}->{OFF} > 0) {
|
53 |
if ($user->{department}->{OFF} > 0) {
|
| 49 |
# my @days = ("Thursday", "Friday", "Saturday");
|
54 |
my @days = ("Thursday", "Friday", "Saturday");
|
| 50 |
# my @dayschecked;
|
55 |
my @dayschecked;
|
| 51 |
# 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 |
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})}) {
|
| 52 |
# push @dayschecked, @{$day};
|
57 |
push @dayschecked, @{$day};
|
| 53 |
# }
|
58 |
}
|
| 54 |
#
|
59 |
|
| 55 |
# use tableViewer qw/inArray/;
|
60 |
use tableViewer qw/inArray/;
|
| 56 |
# push @announcements, $h->li ("Did you attend the Officiating Huddle on:"),
|
61 |
push @announcements, $h->li ("Did you attend the Officiating Huddle on:"),
|
| 57 |
# $h->form ({ action => "add_officiating_huddle_time.pl", target => "_blank" }, [
|
62 |
$h->form ({ action => "add_officiating_huddle_time.pl", target => "_blank" }, [
|
| 58 |
# map ({ inArray($_, \@dayschecked) ? $h->input ({ type => "checkbox", name => $_, checked => [] }).$_.$h->br : $h->input ({ type => "checkbox", name => $_ }).$_.$h->br } @days),
|
63 |
map ({ inArray($_, \@dayschecked) ? $h->input ({ type => "checkbox", name => $_, checked => [] }).$_.$h->br : $h->input ({ type => "checkbox", name => $_ }).$_.$h->br } @days),
|
| Line 59... |
Line 64... |
| 59 |
# $h->input ({ type => "submit", value => scalar @dayschecked ? "Update my hours." : "Give me credit!" })
|
64 |
$h->input ({ type => "submit", value => scalar @dayschecked ? "Update my hours." : "Give me credit!" })
|
| Line 60... |
Line 65... |
| 60 |
# ]);
|
65 |
]);
|