| Line 595... |
Line 595... |
| 595 |
|
595 |
|
| 596 |
use HTML::Tiny;
|
596 |
use HTML::Tiny;
|
| Line 597... |
Line 597... |
| 597 |
my $h = HTML::Tiny->new( mode => 'html' );
|
597 |
my $h = HTML::Tiny->new( mode => 'html' );
|
| 598 |
|
598 |
|
| - |
|
599 |
my $where = scalar @whereclause ? "where ".join " and ", @whereclause : "";
|
| - |
|
600 |
my ($sth, @shifts);
|
| - |
|
601 |
if ($output eq "shifts") {
|
| - |
|
602 |
$sth = $dbh->prepare("select * from (select id, date, dayofweek, start_time, end_time, track as location, time, role, teams, signup, 'OFF' as dept, volhours from v_shift_officiating where RCid = ? union
|
| - |
|
603 |
select id, date, dayofweek, start_time, end_time, track as location, time, role, teams, signup, 'ANN' as dept, volhours from v_shift_announcer where RCid = ? union
|
| - |
|
604 |
select id, date, dayofweek, start_time, end_time, location, time, role, if(dept = 'COA', note, '') as teams, type as signup, dept, volhours from v_shift where RCid = ? and dept <> 'PER') temp
|
| - |
|
605 |
$where order by date, time");
|
| 599 |
my $where = scalar @whereclause ? "where ".join " and ", @whereclause : "";
|
606 |
$sth->execute($RCid, $RCid, $RCid);
|
| 600 |
my @shifts;
|
607 |
} else {
|
| 601 |
my $sth = $dbh->prepare("select * from (select id, date, dayofweek, start_time, end_time, track as location, time, role, teams, signup, 'OFF' as dept, volhours from v_shift_officiating where RCid = ? union
|
608 |
$sth = $dbh->prepare("select * from (select id, date, dayofweek, start_time, end_time, track as location, time, role, teams, signup, 'OFF' as dept, volhours from v_shift_officiating where RCid = ? union
|
| 602 |
select id, date, dayofweek, start_time, end_time, track as location, time, role, teams, signup, 'ANN' as dept, volhours from v_shift_announcer where RCid = ? union
|
609 |
select id, date, dayofweek, start_time, end_time, track as location, time, role, teams, signup, 'ANN' as dept, volhours from v_shift_announcer where RCid = ? union
|
| 603 |
select id, date, dayofweek, start_time, end_time, location, time, role, if(dept = 'COA', note, '') as teams, type as signup, dept, if(dept = 'PER', 0, volhours) as volhours from v_shift where RCid = ? union
|
610 |
select id, date, dayofweek, start_time, end_time, location, time, role, if(dept = 'COA', note, '') as teams, type as signup, dept, if(dept = 'PER', 0, volhours) as volhours from v_shift where RCid = ? union
|
| 604 |
select id, date, dayofweek, start_time, end_time, location, time, role, name as teams, 'mvpclass' as signup, 'CLA' as dept, 0 as volhours from v_class_signup_new where RCid = ? union
|
611 |
select id, date, dayofweek, start_time, end_time, location, time, role, name as teams, 'mvpclass' as signup, 'CLA' as dept, 0 as volhours from v_class_signup_new where RCid = ? union
|
| 605 |
select id, date, dayofweek, start_time, end_time, location, time, role, name as teams, 'seminar' as signup, 'SEM' as dept, 0 as volhours from v_seminar_signup_new where RCid = ?) temp
|
612 |
select id, date, dayofweek, start_time, end_time, location, time, role, name as teams, 'seminar' as signup, 'SEM' as dept, 0 as volhours from v_seminar_signup_new where RCid = ?) temp
|
| - |
|
613 |
$where order by date, time");
|
| - |
|
614 |
$sth->execute($RCid, $RCid, $RCid, $RCid, $RCid);
|
| 606 |
$where order by date, time");
|
615 |
}
|
| 607 |
$sth->execute($RCid, $RCid, $RCid, $RCid, $RCid);
|
616 |
|
| 608 |
my @RESULTS;
|
617 |
my @RESULTS;
|
| Line 609... |
Line 618... |
| 609 |
while (my $r = $sth->fetchrow_hashref) {
|
618 |
while (my $r = $sth->fetchrow_hashref) {
|