Subversion Repositories VORC

Rev

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

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