Subversion Repositories VORC

Rev

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

Rev 116 Rev 117
Line 41... Line 41...
41
my @announcements;
41
my @announcements;
42
push @announcements, $h->li ($h->a ({ href=>'__LINK__?'.$user->{discount_code} }, "THANK YOU! You've earned a discounted pass for next year. Click here to redeem.")) if $user->{discount_code};
42
push @announcements, $h->li ($h->a ({ href=>'__LINK__?'.$user->{discount_code} }, "THANK YOU! You've earned a discounted pass for next year. Click here to redeem.")) if $user->{discount_code};
43
my ($announcement) = $dbh->selectrow_array ("select value from setting where setting.key = ?", undef, "ANNOUNCEMENT");
43
my ($announcement) = $dbh->selectrow_array ("select value from setting where setting.key = ?", undef, "ANNOUNCEMENT");
44
push @announcements, $h->li ($announcement) if $announcement;
44
push @announcements, $h->li ($announcement) if $announcement;
Line 45... Line 45...
45
 
45
 
46
if ($user->{department}->{OFF} > 0) {
46
#if ($user->{department}->{OFF} > 0) {
47
  my @days = ("Thursday", "Friday", "Saturday");
47
#  my @days = ("Thursday", "Friday", "Saturday");
48
  my @dayschecked;
48
#  my @dayschecked;
49
	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})}) {
49
#	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})}) {
50
	  push @dayschecked, @{$day};
50
#	  push @dayschecked, @{$day};
51
	}
51
#	}
52
  
52
#  
53
  use tableViewer qw/inArray/;
53
#  use tableViewer qw/inArray/;
54
  push @announcements, $h->li ("Did you attend the Officiating Huddle on:"),
54
#  push @announcements, $h->li ("Did you attend the Officiating Huddle on:"),
55
    $h->form ({ action => "add_officiating_huddle_time.pl", target => "_blank" }, [
55
#    $h->form ({ action => "add_officiating_huddle_time.pl", target => "_blank" }, [
56
      map ({ inArray($_, \@dayschecked) ? $h->input ({ type => "checkbox", name => $_, checked => [] }).$_.$h->br : $h->input ({ type => "checkbox", name => $_ }).$_.$h->br } @days),
56
#      map ({ inArray($_, \@dayschecked) ? $h->input ({ type => "checkbox", name => $_, checked => [] }).$_.$h->br : $h->input ({ type => "checkbox", name => $_ }).$_.$h->br } @days),
57
      $h->input ({ type => "submit", value => scalar @dayschecked ? "Update my hours." : "Give me credit!" })
57
#      $h->input ({ type => "submit", value => scalar @dayschecked ? "Update my hours." : "Give me credit!" })
58
    ]);
58
#    ]);
Line 59... Line 59...
59
}
59
#}
Line 60... Line 60...
60
 
60