Subversion Repositories ORC

Rev

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

Rev 8 Rev 38
Line 1... Line 1...
1
#!/usr/bin/perl
1
#!/usr/bin/perl
Line 2... Line 2...
2
 
2
 
3
use strict;
3
use strict;
4
use cPanelUserConfig;
-
 
5
use lib "/home/rollerco/perl5/lib/perl5";
4
use cPanelUserConfig;
-
 
5
use RollerCon;
6
use RollerCon;
6
use WebDB;
7
use scanFunctions;
7
use tableViewer;
8
use CGI;
8
use CGI;
9
use CGI::Cookie;
9
use CGI::Cookie;
Line 10... Line 10...
10
use DateTime;
10
use DateTime;
Line 16... Line 16...
16
 
16
 
17
my $dt = DateTime->today;
17
my $dt = DateTime->today;
18
my $day = $dt->day_name;
18
my $day = $dt->day_name;
Line -... Line 19...
-
 
19
my $date = $dt->date;
19
my $date = $dt->date;
20
 
20
 
21
## Uncomment and update to test:
Line 21... Line 22...
21
#$day = "Wednesday";
22
$day = "Wednesday";
22
#$date = "2017-07-26";
23
$date = "2022-07-13";
23
 
24
 
24
my %class = qw(
25
my %class = qw(
25
	U Unrestricted
26
	U Unrestricted
26
	M Mens
27
	M Mens
Line 27... Line 28...
27
	W Womens
28
	W Womens
Line 28... Line 29...
28
	SS Single-Gender
29
	SS Single-Gender
Line 29... Line 30...
29
);
30
);
30
 
31
 
31
my $dbh = getDBConnection();
32
my $dbh = WebDB::connect ();
32
 
33
 
33
print CGI::header(-cookie=>$RCAUTH_cookie);
34
print CGI::header(-cookie=>$RCAUTH_cookie);
34
 
35
 
Line 35... Line 36...
35
 
36
 
36
 
37
 
37
 
38
 
38
print<<output;
39
print<<output;
39
<html><head><title>RollerCon Officials Schedule Manager - Daily Schedule - $day ($date)</title>
40
<html><head><title>RollerCon VORC - Daily Officiating Schedule - $day ($date)</title>
Line 40... Line 41...
40
<link rel="stylesheet" type="text/css" href="/rollercon.css">
41
<link rel="stylesheet" type="text/css" href="/rollercon.css">
41
</head>
42
</head>
42
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
43
<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
43
output
44
output
44
 
45
 
45
my $gcount = 1; my $tcount = '';
46
my $gcount = 1; my $tcount = '';
46
my $sth = $dbh->prepare("select distinct teams, track, level, time, gtype, restrictions from v_shift where date = ? order by track, time");
47
my $sth = $dbh->prepare("select distinct teams, track, level, time, gtype, restrictions from v_shift_officiating where date = ? order by track, time");
47
my $crewhan = $dbh->prepare("select role, derby_name from v_shift where date = ? and track = ? and time = ?");
48
my $crewhan = $dbh->prepare("select role, derby_name from v_shift_officiating where date = ? and track = ? and time = ?");
48
my $leadhan = $dbh->prepare("select track, time, derby_name from v_lead_shift where date = ? order by track, time");
49
my $leadhan = $dbh->prepare("select location, time, derby_name from v_shift where dept = 'OFF' and date = ? order by location, time");
49
my $openshifthan = $dbh->prepare("select time, level, restrictions, gtype, teams, tla, name from v_shift where tla <> 'ALT' and isNull(derby_name) = 1 and date = ? and track = ? order by time");
50
my $openshifthan = $dbh->prepare("select time, level, restrictions, gtype, teams, tla, name from v_shift_officiating where tla <> 'ALT' and isNull(derby_name) = 1 and date = ? and track = ? order by time");
50
 
51
 
Line 51... Line 52...
51
my @leads = ("<table>\n", "<tr><td colspan=5><b>Lead Shifts</b></td></tr>\n");
52
my @leads = ("<table>\n", "<tr><td colspan=5><b>Lead Shifts</b></td></tr>\n");
52
$leadhan->execute($date);
53
$leadhan->execute($date);
Line 114... Line 115...
114
		$crew{'PLT-1'} = "<i>-not staffed-</i>";
115
		$crew{'PLT-1'} = "<i>-not staffed-</i>";
115
		$crew{'PLT-2'} = "<i>-not staffed-</i>";
116
		$crew{'PLT-2'} = "<i>-not staffed-</i>";
116
		$crew{'SK-1'} = "<i>-not staffed-</i>";
117
		$crew{'SK-1'} = "<i>-not staffed-</i>";
117
		$crew{'SK-2'} = "<i>-not staffed-</i>";
118
		$crew{'SK-2'} = "<i>-not staffed-</i>";
118
		$crew{'PBM'} = "<i>-not staffed-</i>";
119
		$crew{'PBM'} = "<i>-not staffed-</i>";
-
 
120
	} elsif ($g->{gtype} eq "Scrimmage") {
-
 
121
		$crew{'PLT-1'} = "<i>-not staffed-</i>";
-
 
122
		$crew{'PLT-2'} = "<i>-not staffed-</i>";
-
 
123
		$crew{'SK-1'} = "<i>-not staffed-</i>";
-
 
124
		$crew{'SK-2'} = "<i>-not staffed-</i>";
-
 
125
		$crew{'PBM'} = "<i>-not staffed-</i>";
-
 
126
		$crew{'PBT-1'} = "<i>-not staffed-</i>";
-
 
127
		$crew{'PBT-2'} = "<i>-not staffed-</i>";
-
 
128
		$crew{'SO'} = "<i>-not staffed-</i>";
119
	}
129
	}
Line 120... Line 130...
120
		
130
		
121
	my $A = '';
131
	my $A = '';
122
	if (defined $crew{'ALT'}) {
132
	if (defined $crew{'ALT'}) {