| Line 18... |
Line 18... |
| 18 |
my $user = getUser ($EML);
|
18 |
my $user = getUser ($EML);
|
| 19 |
$user->{department} = convertDepartments $user->{department};
|
19 |
$user->{department} = convertDepartments $user->{department};
|
| 20 |
my $username = $h->a ({ href=>"/schedule/manage_user.pl?submit=View&RCid=$user->{RCid}" }, $user->{derby_name});
|
20 |
my $username = $h->a ({ href=>"/schedule/manage_user.pl?submit=View&RCid=$user->{RCid}" }, $user->{derby_name});
|
| 21 |
my $RCid = $user->{RCid};
|
21 |
my $RCid = $user->{RCid};
|
| 22 |
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
|
22 |
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
|
| 23 |
my $YEAR = "2022";
|
23 |
my $YEAR = "2023";
|
| Line 24... |
Line 24... |
| 24 |
|
24 |
|
| 25 |
if (!scalar (grep { $user->{department}->{$_} > 0 } grep { !/^(ANN|OFF)$/ } keys %{$user->{department}}) and
|
25 |
if (!scalar (grep { $user->{department}->{$_} > 0 } grep { !/^(ANN|OFF)$/ } keys %{$user->{department}}) and
|
| 26 |
$user->{department}->{ANN} < 2 and
|
26 |
$user->{department}->{ANN} < 2 and
|
| 27 |
$user->{department}->{OFF} < 2 and
|
27 |
$user->{department}->{OFF} < 2 and
|
| Line 150... |
Line 150... |
| 150 |
$Options =~ s/>($FORM{$thing})/ selected>$1/;
|
150 |
$Options =~ s/>($FORM{$thing})/ selected>$1/;
|
| 151 |
return "<SELECT name=filter-${colName} $onChange>$Options</SELECT>";
|
151 |
return "<SELECT name=filter-${colName} $onChange>$Options</SELECT>";
|
| 152 |
}
|
152 |
}
|
| 153 |
}
|
153 |
}
|
| Line -... |
Line 154... |
| - |
|
154 |
|
| - |
|
155 |
sub modify_time {
|
| - |
|
156 |
my $t = shift;
|
| - |
|
157 |
return convertTime $t->{time};
|
| - |
|
158 |
}
|
| Line 154... |
Line 159... |
| 154 |
|
159 |
|
| 155 |
|
160 |
|
| Line 190... |
Line 195... |
| 190 |
push @displayFields, $_;
|
195 |
push @displayFields, $_;
|
| 191 |
}
|
196 |
}
|
| 192 |
}
|
197 |
}
|
| 193 |
}
|
198 |
}
|
| Line -... |
Line 199... |
| - |
|
199 |
|
| Line 194... |
Line 200... |
| 194 |
|
200 |
my @addToWhereClause = ("year(date) = '$YEAR'", "type != 'announcer'");
|
| 195 |
|
201 |
|
| 196 |
if (exists $FORM{autoload}) { # If the FORM was submitted (i.e. the page is being redisplayed),
|
202 |
if (exists $FORM{autoload}) { # If the FORM was submitted (i.e. the page is being redisplayed),
|
| 197 |
# build the data for the cookie that remembers the page setup
|
203 |
# build the data for the cookie that remembers the page setup
|
| Line 202... |
Line 208... |
| 202 |
}
|
208 |
}
|
| Line 203... |
Line 209... |
| 203 |
|
209 |
|
| 204 |
|
210 |
|
| 205 |
if (!(exists $FORM{autoload})) { # No FORM was submitted...
|
211 |
if (!(exists $FORM{autoload})) { # No FORM was submitted...
|
| 206 |
if (my $prefs = cookie ($prefscookie) and !defined param ("ignoreCookie")) { # Check for cookies from previous visits.
|
212 |
if (my $prefs = cookie ($prefscookie) and !defined param ("ignoreCookie")) { # Check for cookies from previous visits.
|
| Line 207... |
Line 213... |
| 207 |
my ($disF, $filts, $sb, $al, $si) = split /&/,$prefs;
|
213 |
my ($disF, $filts, $sb, $al, $si) = split /&/, $prefs;
|
| 208 |
@displayFields = split /:/,$disF;
|
214 |
@displayFields = split /:/,$disF;
|
| 209 |
|
215 |
|
| Line 229... |
Line 235... |
| 229 |
# If the field isn't in the displayFields list, then add it to the hideFields list
|
235 |
# If the field isn't in the displayFields list, then add it to the hideFields list
|
| 230 |
@hideFields = grep { notInArray ($_, \@displayFields) } @allFields;
|
236 |
@hideFields = grep { notInArray ($_, \@displayFields) } @allFields;
|
| Line 231... |
Line 237... |
| 231 |
|
237 |
|
| 232 |
# Process any filters provided in the form to pass to the database
|
238 |
# Process any filters provided in the form to pass to the database
|
| - |
|
239 |
push @whereClause, map { filter ($_, $FILTER->{$_}) } grep { defined $FILTER->{$_} } @displayFields;
|
| Line 233... |
Line 240... |
| 233 |
push @whereClause, map { filter ($_, $FILTER->{$_}) } grep { defined $FILTER->{$_} } @displayFields;
|
240 |
push @whereClause, @addToWhereClause;
|
| 234 |
|
241 |
|
| 235 |
# Given the fields to display and the where conditions,
|
242 |
# Given the fields to display and the where conditions,
|
| 236 |
# "getData" will return a reference to an array of
|
243 |
# "getData" will return a reference to an array of
|
| Line 352... |
Line 359... |
| 352 |
@hiddencheckboxes = [];
|
359 |
@hiddencheckboxes = [];
|
| 353 |
}
|
360 |
}
|
| 354 |
}
|
361 |
}
|
| 355 |
push @hiddenrows, $h->div ({ class=>'rTableRow' }, [ @hiddencheckboxes ]) unless --$c % 4 == 0;
|
362 |
push @hiddenrows, $h->div ({ class=>'rTableRow' }, [ @hiddencheckboxes ]) unless --$c % 4 == 0;
|
| Line -... |
Line 363... |
| - |
|
363 |
|
| - |
|
364 |
my @yearoptions;
|
| - |
|
365 |
foreach (@{&getYears()}) {
|
| - |
|
366 |
push @yearoptions, $YEAR eq $_ ? $h->option ({ selected=>[] }, $_) : $h->option ($_);
|
| Line 356... |
Line 367... |
| 356 |
|
367 |
}
|
| 357 |
|
368 |
|
| 358 |
if (scalar @hideFields) {
|
369 |
if (scalar @hideFields) {
|
| 359 |
my @topleft;
|
370 |
my @topleft;
|
| Line 440... |
Line 451... |
| 440 |
$h->br,
|
451 |
$h->br,
|
| 441 |
$h->a ({ href=>"", target=>"_new", onClick=>"window.document.Req.excel.value=1; window.document.Req.submit(); window.document.Req.excel.value=0; return false;" }, "[Export Displayed Data as an Excel Document.]"),
|
452 |
$h->a ({ href=>"", target=>"_new", onClick=>"window.document.Req.excel.value=1; window.document.Req.submit(); window.document.Req.excel.value=0; return false;" }, "[Export Displayed Data as an Excel Document.]"),
|
| 442 |
$h->br,
|
453 |
$h->br,
|
| 443 |
"This page was displayed on ", currentTime (),
|
454 |
"This page was displayed on ", currentTime (),
|
| 444 |
$h->br,
|
455 |
$h->br,
|
| 445 |
"Please direct questions, problems, and concerns to Officials.RollerCon.Schedule\@gmail.com"
|
456 |
"Please direct questions, problems, and concerns to Officials.RollerCon.Schedule\@gmail.com",
|
| - |
|
457 |
$h->br,
|
| - |
|
458 |
"Displaying: ", $h->select ({ name=>"year", onchange=>"Req.submit();" }, [ @yearoptions ])
|
| 446 |
])
|
459 |
])
|
| 447 |
]),
|
460 |
]),
|
| 448 |
$h->div ({ class=>"spRight" }, [
|
461 |
$h->div ({ class=>"spRight" }, [
|
| 449 |
$h->h5 ([
|
462 |
$h->h5 ([
|
| 450 |
"$x of $datacount Record". ($x == 1 ? "" : "s") ." Displayed", $h->br,
|
463 |
"$x of $datacount Record". ($x == 1 ? "" : "s") ." Displayed", $h->br,
|