| Line 498... |
Line 498... |
| 498 |
} else {
|
498 |
} else {
|
| 499 |
$daily_count = signUpCount ('get', $user_id, $department);
|
499 |
$daily_count = signUpCount ('get', $user_id, $department);
|
| 500 |
if ($change eq "add" and $daily_count >= $MAXSHIFTS and !$leadership_change) {
|
500 |
if ($change eq "add" and $daily_count >= $MAXSHIFTS and !$leadership_change) {
|
| 501 |
return "<br>Denied! You may only sign up for $MAXSHIFTS $game_type shifts in one day!<br>\n";
|
501 |
return "<br>Denied! You may only sign up for $MAXSHIFTS $game_type shifts in one day!<br>\n";
|
| 502 |
}
|
502 |
}
|
| - |
|
503 |
if ($change eq "add" and $game_based eq "game" and $department eq "OFF" and $game_type eq "full length") {
|
| - |
|
504 |
my ($full_length_count) = $dbh->selectrow_array ("select count(*) from v_shift_officiating where RCid = ? and gtype = 'full length' and date > '2022-01-01'", undef, $user_id);
|
| - |
|
505 |
if ($full_length_count >= 3) {
|
| - |
|
506 |
return "<br>Denied! You may only sign up to officiate 3 $game_type games (total)!<br>\n";
|
| - |
|
507 |
}
|
| - |
|
508 |
}
|
| 503 |
}
|
509 |
}
|
| Line 504... |
Line 510... |
| 504 |
|
510 |
|
| 505 |
my @DBARGS;
|
511 |
my @DBARGS;
|
| 506 |
if ($game_based eq "game") {
|
512 |
if ($game_based eq "game") {
|
| Line 625... |
Line 631... |
| 625 |
$user->{$limitkey} = signUpCount('get', $user->{RCid}, $dept);
|
631 |
$user->{$limitkey} = signUpCount('get', $user->{RCid}, $dept);
|
| 626 |
}
|
632 |
}
|
| Line 627... |
Line 633... |
| 627 |
|
633 |
|
| 628 |
if ($shifttype eq "game") {
|
634 |
if ($shifttype eq "game") {
|
| 629 |
# if ($t->{gtype} !~ /^selected/ and $t->{gtype} ne "short track" and $user->{$limitkey} < $limit) {
|
635 |
# if ($t->{gtype} !~ /^selected/ and $t->{gtype} ne "short track" and $user->{$limitkey} < $limit) {
|
| 630 |
if ($t->{signup} eq "full length" and $dept eq "OFF") {
|
636 |
if ($t->{gtype} eq "full length" and $dept eq "OFF") {
|
| 631 |
my ($full_length_count) = $dbh->selectrow_array ("select count(*) from v_shift_officiating where RCid = ? and gtype = 'full length' and date > '2022-01-01'", undef, $user->{RCid});
|
637 |
my ($full_length_count) = $dbh->selectrow_array ("select count(*) from v_shift_officiating where RCid = ? and gtype = 'full length' and date > '2022-01-01'", undef, $user->{RCid});
|
| 632 |
if ($full_length_count >= 2) {
|
638 |
if ($full_length_count >= 3) {
|
| 633 |
return 0;
|
639 |
return 0;
|
| 634 |
}
|
640 |
}
|
| 635 |
}
|
641 |
}
|
| 636 |
if ($t->{signup} ne "selected" and $user->{$limitkey} < $limit) {
|
642 |
if ($t->{signup} ne "selected" and $user->{$limitkey} < $limit) {
|