Subversion Repositories ORC

Rev

Rev 24 | Rev 28 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/usr/bin/perl
2
 
3
#if ($ENV{SHELL}) { die "This script shouldn't be executed from the command line!\n"; }
4
 
7 - 5
#use strict;
8 - 6
use cPanelUserConfig;
7 - 7
use CGI qw/param cookie header start_html url/;
8
use HTML::Tiny;
9
use tableViewer;
2 - 10
use RollerCon;
11
use DateTime;
12
use DateTime::Duration;
25 - 13
my $now = DateTime->now (time_zone => 'America/Los_Angeles');
7 - 14
our $h = HTML::Tiny->new( mode => 'html' );
2 - 15
 
7 - 16
my $cookie_string = authenticate (1) || die;
17
our ($EML, $PWD, $LVL) = split /&/, $cookie_string;
18
my $user = getUser ($EML);
19
$user->{department} = convertDepartments $user->{department};
20
my $username = $h->a ({ href=>"/schedule/manage_user.pl?submit=View&RCid=$user->{RCid}" }, $user->{derby_name});
21
my $RCid = $user->{RCid};
2 - 22
my $RCAUTH_cookie = CGI::Cookie->new(-name=>'RCAUTH',-value=>"$cookie_string",-expires=>"+30m");
7 - 23
my $YEAR = "2022";
2 - 24
 
7 - 25
if (!scalar (grep { $user->{department}->{$_} < 1 } grep { !/^(ANN|OFF)$/ } keys %{$user->{department}}) and $LVL < 4) {
26
	print header(-cookie=>$RCAUTH_cookie);
27
	printRCHeader("Unauthorized Page");
28
	print $h->div ({ class=>"error" }, "No Access");
29
	print $h->div ("Your user account is not registered as a Volunteer in a department that uses this view, so you can't see these shifts.  It's possible that your access is still being reviewed.  Please be patient.");
8 - 30
	print $h->a ({ href=>"/schedule/" }, "[Go Home]");
7 - 31
	print $h->close ("html");
32
	exit;
33
}
2 - 34
 
35
 
7 - 36
my $pageTitle = "Volunteer Shifts";
37
my $prefscookie = "vorcshifts";
38
our $DBTABLE = 'v_shift';
39
my %COLUMNS = (
40
# colname   =>  [qw(DisplayName       N    type     status)],   status ->  static | default | <blank>
41
	id          => [qw(ShiftID        5    number       )],
42
	dept        => [qw(Department    10    select      default )],
43
	role        => [qw(Role          15    select      default )],
44
	type        => [qw(Type          20    select      default )],
45
	date        => [qw(Date          25    date        default )],
16 - 46
  dayofweek   => [qw(Day           27    select              )],
7 - 47
	location    => [qw(Location      30    select      default )],
48
	time        => [qw(Time          35    text        default )],
49
	start_time  => [qw(Start         36    text         )],
50
	end_time    => [qw(End           40    text         )],
51
	mod_time    => [qw(ModTime       45    number         )],
52
	volhours    => [qw(VolHours      50    number         )],
53
	note        => [qw(Notes         55    text        default )],
54
	RCid        => [qw(AssigneeID    60    text         )],
55
	derby_name  => [qw(DerbyName     65    select      default   )],
56
);
57
my $stylesheet = "/style.css";
8 - 58
my $homeURL = '/schedule/';
7 - 59
my @pagelimitoptions = ("All", 5, 10, 25);
60
 
61
my @whereClause;
62
if ($LVL <= RollerCon::MANAGER) {
63
  my $string = "dept in (".join ",", map { '"'.$_.'"' } grep { $ORCUSER->{department}->{$_} >= 3 } keys %{$ORCUSER->{department}};
64
  $string .= ")";
65
  # warn $string;
66
  push @whereClause, $string;
2 - 67
}
7 - 68
push @whereClause, "(dept != 'PER' or RCid = $RCid)";
2 - 69
 
70
 
7 - 71
# If we need to modify line item values, create a subroutine named "modify_$columnname"
72
#    It will receive a hashref to the object lineitem
73
 
74
sub modify_derby_name {
75
  my $t = shift;
76
 
77
  if ($user->{department}->{$t->{dept}} < 2 and $t->{derby_name} and $t->{RCid} != $RCid and $LVL < 5) {
78
    $t->{derby_name} = "FILLED";
79
  }
80
 
81
 	my ($yyyy, $mm, $dd) = split /\-/, $t->{date};
82
	my $cutoff = DateTime->new(
83
        year => $yyyy,
84
        month => $mm,
85
        day => $dd,
86
        hour => 5,
87
        minute => 0,
88
        second => 0,
89
        time_zone => 'America/Los_Angeles'
90
  );
91
 
92
 	if (($t->{RCid} == $RCid and $t->{type} ne "selected" and $now < $cutoff) or ($t->{derby_name} and ($user->{department}->{$t->{dept}} >= 2 or $LVL >= 5))) {
93
 	  if ($t->{dept} eq "PER") {
94
 	    # DEL Personal Block
95
 	    $t->{derby_name} .= " ".$h->a ({ onClick=>"if (confirm('Really? You want to delete this personal time?')==true) { window.open('manage_personal_time.pl?choice=Delete&id=$s[0]','Confirm Change','resizable,height=260,width=370'); return false; }" }, "[DEL]");
96
 	  } else {
97
   		# DROP
98
 	    $t->{derby_name} .= " ".$h->a ({ onClick=>"if (confirm('Really? You want to drop this shift?')==true) { window.open('make_shift_change.pl?change=del&RCid=$t->{RCid}&id=$t->{id}','Confirm Change','resizable,height=260,width=370'); return false; }" }, "[DROP]");
99
   		if ($user->{department}->{$t->{dept}} >= 2 or $LVL >= 5) {
100
   		  # NO SHOW
101
   		  $t->{derby_name} .= " | ".$h->a ({ href=>'#', onClick=>"if (confirm('Really? They were a no show?')==true) { window.open('make_shift_change.pl?noshow=true&change=del&RCid=$t->{RCid}&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false; }" }, "[NO SHOW]");
102
   		  $t->{derby_name} .= " | ".$h->a ({ onClick=>"window.open('mod_shift_time.pl?RCid=$t->{RCid}&shiftid=$t->{id}','Mod Vol Hours','resizable,height=260,width=370');" }, "[MOD]");
103
   		}
104
 	  }
105
 	} elsif (!$t->{derby_name}) {
106
 		if (signUpEligible ($ORCUSER, $t, "vol") and $now < $cutoff) {
107
 			# SIGN UP
108
 			$t->{derby_name} = $h->a ({ onClick=>"window.open('make_shift_change.pl?change=add&RCid=$RCid&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false;" }, "[SIGN UP]");
109
 		}
110
 		if ($user->{department}->{$t->{dept}} >= 2 or $LVL > 4) {
111
 			# ADD USER
112
 			$t->{derby_name} ? $t->{derby_name} .= " | " : {};
113
 			$t->{derby_name} .= $h->a ({ onClick=>"window.open('make_shift_change.pl?change=lookup&RCid=$RCid&id=$t->{id}','Confirm Shift Change','resizable,height=260,width=370'); return false;" }, "[ADD USER]");
114
 		}
115
 	}
116
 	return $t->{derby_name};
117
}
118
 
119
my $DEPTS = getDepartments;
120
sub modify_dept {
121
  my $hr = shift;
122
  return $DEPTS->{$hr->{dept}};
123
}
124
 
125
sub filter_dept {
126
  my $colName = shift;
127
	my $filter = shift;
128
 
129
	if (defined $filter)	{
130
		if ($filter eq "-blank-") {
131
			return "($colName = '' or isNull($colName) = 1)";
132
		}
133
		return "$colName = \"$filter\"";
134
	}	else {
135
		my $thing = "filter-${colName}";
136
    my $categories = join "", map { $FORM{$thing} eq $_ ? $h->option ({ value=>$_, selected=>[] }, $DEPTS->{$_}) : $h->option ({ value=>$_ }, $DEPTS->{$_}) } grep { $LVL > 4 or exists $user->{department}->{$_} } sort keys %{$DEPTS};
137
		my $Options = "<OPTION></OPTION>".$categories;
138
 
139
		$Options =~ s/>($FORM{$thing})/ selected>$1/;
140
		return "<SELECT name=filter-${colName} $onChange>$Options</SELECT>";
141
	}
142
}
143
 
144
 
145
# Ideally, nothing below this comment needs to change
146
#-------------------------------------------------------------------------------
147
 
148
 
149
our %NAME              = map  { $_ => $COLUMNS{$_}->[0] } keys %COLUMNS;
150
our %colOrderHash      = map  { $_ => $COLUMNS{$_}->[1] } keys %COLUMNS;
151
our %colFilterTypeHash = map  { $_ => $COLUMNS{$_}->[2] } keys %COLUMNS;
152
our @staticFields      = sort byfield grep { $COLUMNS{$_}->[3] eq 'static' } keys %COLUMNS;
153
our @defaultFields     = sort byfield grep { defined $COLUMNS{$_}->[3] } keys %COLUMNS;
154
#our @defaultFields     = grep { $COLUMNS{$_}->[3] eq 'default' or inArray ($_, \@staticFields) } keys %COLUMNS;
155
 
156
our @allFields = sort byfield keys %NAME;
157
our @displayFields = ();
158
our @hideFields = ();
159
my $QUERY_STRING;
160
 
161
my $pagelimit = param ("limit") // $pagelimitoptions[$#pagelimitoptions];
162
my $curpage = param ("page") // 1;
163
 
164
our %FORM;
165
my $FILTER;
166
foreach (param()) {
167
 	if (/^year$/) { #
2 - 168
		$YEAR = param($_);
169
		next;
170
	}
7 - 171
 
2 - 172
	$FORM{$_} = param($_);				# Retrieve all of the FORM data submitted
173
 
7 - 174
	if ((/^filter/) and ($FORM{$_} ne '')) {	# Build a set of filters to apply
175
		my ($filter,$field) = split /-/, $_;
2 - 176
		$FILTER->{$field} = $FORM{$_};
7 - 177
	}	elsif ($FORM{$_} eq "true")	{		# Compile list of fields to display
2 - 178
	  if ($_ ne "shiftinclude") {
179
		  push @displayFields, $_;
180
		}
7 - 181
	}
2 - 182
}
183
 
184
 
7 - 185
if (exists $FORM{autoload})	{			# If the FORM was submitted (i.e. the page is being redisplayed),
186
							                    #  	build the data for the cookie that remembers the page setup
2 - 187
	my $disFields = join ":", @displayFields;
7 - 188
	my $fils = join ":", map { "$_=$FILTER->{$_}" } keys %{$FILTER};
2 - 189
 
7 - 190
	$QUERY_STRING = $disFields.'&'.$fils.'&'.$FORM{sortby}.'&'.$FORM{autoload}.'&'.$FORM{shiftinclude};
2 - 191
}
192
 
193
 
7 - 194
if (!(exists $FORM{autoload}))	{			# No FORM was submitted...
195
	if (my $prefs = cookie ($prefscookie) and !defined param ("ignoreCookie"))	{ # Check for cookies from previous visits.
196
		my ($disF, $filts, $sb, $al) = split /&/,$prefs;
2 - 197
		@displayFields = split /:/,$disF;
198
 
7 - 199
		foreach my $pair (split /:/, $filts)	{
2 - 200
			my ($key, $value) = split /=/, $pair;
201
			$FORM{"filter-$key"} = $value;
202
			$FILTER->{$key} = $value;
203
		}
204
 
7 - 205
		$FORM{sortby} = $sb;
2 - 206
		$FORM{autoload} = $al;
207
		$FORM{shiftinclude} = $si;
208
		$QUERY_STRING = $prefs;
7 - 209
	}	else {
210
	  @displayFields = sort byfield @defaultFields; # Otherwise suppply a default list of columns.
211
	  $FORM{autoload} = 1;             # And turn aut0load on by default.
212
	}
2 - 213
}
214
 
7 - 215
# let's just make sure the columns are in the right order (and there aren't any missing)
216
@displayFields = sort byfield uniq @displayFields, @staticFields;
2 - 217
 
7 - 218
# If the field isn't in the displayFields list,	then add it to the hideFields list
219
@hideFields = grep { notInArray ($_, \@displayFields) } @allFields;
2 - 220
 
7 - 221
# Process any filters provided in the form to pass to the database
222
push @whereClause, map { filter ($_, $FILTER->{$_}) } grep { defined $FILTER->{$_} } @displayFields;
2 - 223
 
7 - 224
							#  Given the fields to display and the where conditions,
225
							#	  "getData" will return a reference to an array of
226
							#	  hash references of the results.
227
my ($data, $datacount) = getData (\@displayFields, \@whereClause, $DBTABLE, $FORM{sortby}, $curpage, $pagelimit);
228
my @ProductList = @{ $data };
229
 
230
#my @ProductList = @{ getData (\@displayFields, \@whereClause, $DBTABLE, $FORM{sortby}, $curpage, $pagelimit) };
231
my $x = scalar @ProductList; # How many results were returned?
232
 
233
# If the user is trying to download the Excel file, send it to them and then exit out.
234
if ($FORM{excel}) {
235
  exportExcel (\@ProductList, "RC_Officiating_Shifts");
236
  exit;
2 - 237
}
238
 
239
my @shifts;
240
if ($FORM{shiftinclude} eq "true") {
241
  my @SIWhere = ("year(date) = '$YEAR'");
242
  push @SIWhere, "RCid = $ORCUSER->{RCid}";
7 - 243
  my ($d, $c) = getData (\@displayFields, \@SIWhere, $DBTABLE, $FORM{sortby});
244
  @shifts = @{ $d };
2 - 245
}
246
 
247
 
7 - 248
my $signedOnAs = $username ? "Welcome, $username. ".$h->a ({ href=>"index.pl", onClick=>"document.cookie = 'RCAUTH=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/';return true;" }, "[Log Out]") : "You are not signed in.";
2 - 249
 
7 - 250
# Set some cookie stuff...
251
my $path = `dirname $ENV{REQUEST_URI}`; chomp $path; $path .= '/' unless $path eq "/";
252
my $queryCookie = cookie(-NAME=>$prefscookie,
2 - 253
			-VALUE=>"$QUERY_STRING",
254
			-PATH=>"$path",
255
			-EXPIRES=>'+365d');
256
 
7 - 257
my $SIChecked;
258
if ($FORM{shiftinclude}) {
259
  $SIChecked = $h->input ({ type=>"checkbox", name=>"shiftinclude", value=>"true", checked=>[], onClick=>'submit();' });
260
} else {
261
  $SIChecked = $h->input ({ type=>"checkbox", name=>"shiftinclude", value=>"true", onClick=>'submit();' });
262
}
2 - 263
 
7 - 264
# Print the header
265
print header (-cookie=> [ $queryCookie, $RCAUTH_cookie ] );
2 - 266
 
7 - 267
# 	print "<!-- FORM \n\n";				# Debug code to dump the FORM to a html comment
268
#	print "I'm catching updates!!!\n\n";
269
#	foreach $key (sort (keys %FORM))		#	Must be done after the header is written!
270
# 		{ print "\t$key:  $FORM{$key}\n"; }
271
# 	print "--> \n\n";
2 - 272
#
273
#
274
# 	print "<!-- ENV \n\n";				# Debug code to dump the ENV to a html comment
275
# 	foreach $key (sort (keys %ENV))			#	Must be done after the header is written!
276
# 		{ print "\t$key:  $ENV{$key}\n"; }
277
# 	print "--> \n\n";
278
#
279
# 	print "\n\n\n\n<!-- $QUERY_STRING --> \n\n\n\n";
280
 
281
 
282
#------------------
283
 
7 - 284
# Toggle the autoload fields within the table elements
285
our ($onClick, $onChange);   # (also used in scanFunctions)
286
my ($radiobutton, $refreshbutton, $sortby);
287
if ($FORM{autoload}) {
288
	$onClick = "onClick='submit();'";
289
	$onChange = "onChange='page.value = 1; submit();'";
290
  $radiobutton = $h->div ({ class=>'autoload' },
291
    ["Autoload Changes: ",
292
    $h->input ({ type=>"radio", name=>'autoload', class=>'accent', value=>1, onClick=>'submit();', checked=>[] }), "On ",
293
    $h->input ({ type=>"radio", name=>'autoload', class=>'accent', value=>0, onClick=>'submit();' }), "Off ",
294
    ]);
295
  $sortby = $h->select ({name=>"sortby", onChange=>'submit();' }, [ map { $FORM{sortby} eq $_ ? $h->option ({ value=>$_, selected=>[] }, $NAME{$_}) : $h->option ({ value=>$_ }, $NAME{$_}) } @displayFields ]);
296
} else {
297
  $onClick = "";
298
	$onChange = "onChange='page.value = 1;'";
299
  $radiobutton = $h->div ({ class=>'autoload' },
300
    ["Autoload Changes: ",
301
    $h->input ({ type=>"radio", name=>'autoload', class=>'accent', value=>1, onClick=>'submit();' }), "On ",
302
    $h->input ({ type=>"radio", name=>'autoload', class=>'accent', value=>0, onClick=>'submit();', checked=>[] }), "Off ",
303
    ]);
11 - 304
  $refreshbutton = $h->input ({ type=>"button", value=>"Refresh", onClick=>"submit(); return false;" });
7 - 305
  $sortby = $h->select ({name=>"sortby" }, [ map { $FORM{sortby} eq $_ ? $h->option ({ value=>$_, selected=>[] }, $NAME{$_}) : $h->option ({ value=>$_ }, $NAME{$_}) } @displayFields ]);
2 - 306
}
307
 
308
 
309
 
7 - 310
 
311
print start_html (-title => $pageTitle, -style => {'src' => $stylesheet} );
8 - 312
#printRCHeader ($pageTitle);
2 - 313
 
7 - 314
print $h->open ('form', { action=>url, method=>'POST', name=>'Req' });
315
print $h->input ({ type=>"hidden", name=>"excel", value=>0 });
316
print $h->div ({ class => "accent pageheader" }, [
317
  $h->h1 ($pageTitle),
318
  $h->div ({ class=>"sp0" }, [
319
    $h->div ({ class=>"spLeft" }, [
320
      $radiobutton
321
    ]),
322
    $h->div ({ class=>"spRight" }, [
323
      $h->input ({ type=>"button", value=>"Home", onClick=>"window.location.href='$homeURL'" }),
324
      $refreshbutton
325
    ]),
326
  ]),
327
]);
2 - 328
 
7 - 329
# Print the Hidden fields' check boxes (if there are any)
2 - 330
 
7 - 331
my $c = 1;
332
my @hiddencheckboxes;
333
my @hiddenrows;
334
foreach my $field (sort { $NAME{$a} cmp $NAME{$b}; } @hideFields) {
335
  if ($FORM{autoload}) {
336
    push @hiddencheckboxes, $h->div ({ class=>'rTableCell quarters nowrap', onClick=>"Req.$field.click();" }, [ $h->input ({ type=>'checkbox', class=>'accent', name=>$field, value=>'true', onClick=>"event.stopPropagation(); submit();" }), $NAME{$field} ]);
337
  } else {
338
    push @hiddencheckboxes, $h->div ({ class=>'rTableCell quarters nowrap', onClick=>"Req.$field.checked=!Req.$field.checked;" }, [ $h->input ({ type=>'checkbox', class=>'accent', name=>$field, value=>'true', onClick=>"event.stopPropagation();" }), $NAME{$field} ]);
339
  }
340
  if ($c++ % 4 == 0) {
341
    push @hiddenrows, $h->div ({ class=>'rTableRow' }, [ @hiddencheckboxes ]);
342
    @hiddencheckboxes = [];
343
  }
344
}
345
push @hiddenrows, $h->div ({ class=>'rTableRow' }, [ @hiddencheckboxes ]) unless --$c % 4 == 0;
2 - 346
 
347
 
7 - 348
if (scalar @hideFields) {
349
  my @topleft;
350
  push @topleft, $h->div ({ class=>"nowrap" }, "Hidden Columns:");
351
  push @topleft, $h->div ({ class=>'rTable' }, [ @hiddenrows ]);
352
 
353
  print $h->div ({ class=>"sp0" }, [
354
    $h->div ({ class=>"spLeft"  }, [ @topleft ]),
355
    $h->div ({ class=>"spRight" }, [
356
      $signedOnAs, $h->br,
357
      "Show my shifts: ", $SIChecked, $h->br,
358
      $h->input ({ type=>"button", value=>"Block Personal Time", onClick=>"window.location.href='manage_personal_time.pl'" }),
359
    ])
360
  ]);
361
}
2 - 362
 
7 - 363
# Print the main table...............................................
2 - 364
 
7 - 365
print $h->open ('div', { class=>'rTable' });
2 - 366
 
7 - 367
my @tmptitlerow;
368
foreach my $f (@displayFields)	{  # Print the Column headings
369
  if (inArray ($f, \@staticFields)) {
370
    push @tmptitlerow, $h->div ({ class=>'rTableHead' }, [ $h->input ({ type=>"hidden", name=>$f, value=>"true" }), $NAME{$f}, "&nbsp;", $h->input ({ type=>"button", value=>"Add", onClick=>"window.location.href='manage_shift.pl'" }) ]);
371
  } else {
372
    if ($FORM{autoload}) {
373
      push @tmptitlerow, $h->div ({ class=>'rTableHead', onClick=>"Req.$f.click();" }, [ $h->input ({ type=>"checkbox", class=>"accent", name=>$f, value=>"true", checked=>[], onClick=>'event.stopPropagation(); submit();' }), $NAME{$f} ]);
374
    } else {
375
      push @tmptitlerow, $h->div ({ class=>'rTableHead', onClick=>"Req.$f.checked=!Req.$f.checked;" }, [ $h->input ({ type=>"checkbox", class=>"accent", name=>$f, value=>"true", checked=>[], onClick=>"event.stopPropagation();" }), $NAME{$f} ]);
376
    }
377
  }
378
}
2 - 379
 
7 - 380
# Print the filter boxes...
381
print $h->div ({ class=>'rTableHeading' }, [ @tmptitlerow ], [ map { $h->div ({ class=>'rTableCell filters' }, filter ($_)) } @displayFields ], $h->div ({ class=>"rTableCell" }));
2 - 382
 
7 - 383
if ($FORM{shiftinclude}) {  # Include all of the user's shifts at the top
384
  foreach my $t (@shifts)	{
385
	  print $h->div ({ class=>'rTableRow highlighted' }, [ map { $h->div ({ class=>'rTableCell' }, exists &{"modify_".$_} ? &{"modify_".$_} ($t) : $t->{$_}) } @displayFields ]);
386
  }
387
  print $h->hr ({ width=>"500%" });
388
}
2 - 389
 
7 - 390
# Print the things
391
#foreach my $t (@ProductList)	{
392
#  print $h->div ({ class=>'rTableRow shaded' }, [ map { $h->div ({ class=>'rTableCell' }, exists &{"modify_".$_} ? &{"modify_".$_} ($t) : $t->{$_}) } @displayFields ]);
393
#}
394
foreach my $t (@ProductList)	{
395
  if ($t->{RCid} eq $ORCUSER->{RCid}) {
396
	  print $h->div ({ class=>'rTableRow highlighted' }, [ map { $h->div ({ class=>'rTableCell' }, exists &{"modify_".$_} ? &{"modify_".$_} ($t) : $t->{$_}) } @displayFields ]);
397
  } else {
398
	  print $h->div ({ class=>'rTableRow shaded' }, [ map { $h->div ({ class=>'rTableCell' }, exists &{"modify_".$_} ? &{"modify_".$_} ($t) : $t->{$_}) } @displayFields ]);
2 - 399
  }
400
}
401
 
7 - 402
print $h->close ('div');
2 - 403
 
7 - 404
# close things out................................................
2 - 405
 
7 - 406
my $pages = $pagelimit eq "All" ? 1 : int( $datacount / $pagelimit + 0.99 );
407
if ($curpage > $pages) { $curpage = $pages; }
2 - 408
 
7 - 409
my @pagerange;
410
if ($pages <= 5 ) {
411
  @pagerange = 1 .. $pages;
412
} else {
413
  if ($curpage <= 3) {
414
    @pagerange = (1, 2, 3, 4, ">>");
415
  } elsif ($curpage >= $pages - 2) {
416
    @pagerange = ("<<", $pages-3, $pages-2, $pages-1, $pages);
417
  } else {
418
    @pagerange = ("<<", $curpage-1, $curpage, $curpage+1, ">>");
419
  }
2 - 420
}
421
 
7 - 422
print $h->br; # print $h->br;
423
print $h->div ({ class=>"sp0" }, [
424
    $h->div ({ class=>"spLeft" }, [
425
      $h->div ({ class=>"footer" }, [
426
        "To bookmark, save, or send this exact view, use the ",
427
        $h->a ({ href=>'', onClick=>"window.document.Req.method = 'GET'; Req.submit(); return false;" }, "[Full URL]"),
428
        $h->br,
429
        "If this page is displaying oddly, ", $h->a ({ href=>url ()."?ignoreCookie=1" }, "[Reset Your View]"),
430
        $h->br,
431
        $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.]"),
432
        $h->br,
433
        "This page was displayed on ", currentTime (),
434
        $h->br,
24 - 435
        "Please direct questions, problems, and concerns to Officials.RollerCon.Schedule\@gmail.com"
7 - 436
      ])
437
    ]),
438
    $h->div ({ class=>"spRight" }, [
439
      $h->h5 ([
440
               "$x of $datacount Record". ($x == 1 ? "" : "s") ." Displayed", $h->br,
441
               "Sorted by ", $sortby, $h->br,
442
               "Displaying ", $h->select ({ name=>"limit", onChange=>"page.value = 1; submit();" }, [ map { $pagelimit == $_ ? $h->option ({ selected=>[] }, $_) : $h->option ($_) } @pagelimitoptions ]), " Per Page", $h->br,
443
               ( $pages > 1 ? ( join " ", map { $_ == $curpage ? "<B>$_</b>" :
444
                                                $_ eq "<<"     ? $h->a ({ onClick=>qq{Req.page.value=1; Req.submit();} }, "$_") :
445
                                                $_ eq ">>"     ? $h->a ({ onClick=>qq{Req.page.value=$pages; Req.submit();} }, "$_") :
446
                                                                 $h->a ({ onClick=>qq{Req.page.value=$_; Req.submit();} }, "[$_]") } @pagerange ) : "" ), $h->br,
447
               $h->input ({ type=>"hidden", name=>"page", value=>$curpage })
448
      ])
449
    ]),
450
]);
2 - 451
 
7 - 452
#print $h->br; # print $h->br;
453
#print $h->h5 ("$x Record(s) Displayed");
454
#print $h->div ({ class=>"footer" }, [
455
#  "To bookmark, save, or send this exact view, use the ",
456
#  $h->a ({ href=>'', onClick=>"window.document.Req.method = 'GET'; Req.submit(); return false;" }, "[Full URL]"),
457
#  $h->br,
458
#  "This page was displayed on $now",
459
#  $h->br,
460
#  "Please direct questions, problems, and concerns to noone\@gmail.com"
461
#]);
2 - 462
 
463
 
7 - 464
print $h->close('form');
465
print $h->close('html');