| Line 36... |
Line 36... |
| 36 |
my ($type, $ID, $subject, $body) = @_;
|
36 |
my ($type, $ID, $subject, $body) = @_;
|
| Line 37... |
Line 37... |
| 37 |
|
37 |
|
| 38 |
my @emails;
|
38 |
my @emails;
|
| 39 |
my $dbh = WebDB::connect ();
|
39 |
my $dbh = WebDB::connect ();
|
| 40 |
if ($type eq "class") {
|
40 |
if ($type eq "class") {
|
| 41 |
push @emails, map { @{$_} } @{ $dbh->selectall_arrayref ("select email from v_class_signup join official on v_class_signup.RCid = official.RCid where id = ?", undef, $ID) };
|
41 |
push @emails, map { @{$_} } @{ $dbh->selectall_arrayref ("select email from v_class_signup_new join official on v_class_signup_new.RCid = official.RCid where id = ?", undef, $ID) };
|
| 42 |
} elsif ($type eq "game") {
|
42 |
} elsif ($type eq "game") {
|
| 43 |
push @emails, map { @{$_} } @{ $dbh->selectall_arrayref ("select email from v_shift_officiating where id = ? and isnull(email) = 0 union select email from v_shift_announcer where id = ? and isnull(email) = 0", undef, $ID, $ID) };
|
43 |
push @emails, map { @{$_} } @{ $dbh->selectall_arrayref ("select email from v_shift_officiating where id = ? and isnull(email) = 0 union select email from v_shift_announcer where id = ? and isnull(email) = 0", undef, $ID, $ID) };
|
| 44 |
}
|
44 |
}
|
| Line 127... |
Line 127... |
| 127 |
print $h->div ("Please select either Class or Game.");
|
127 |
print $h->div ("Please select either Class or Game.");
|
| 128 |
print $h->input ({type=>"hidden", name=>"ID"});
|
128 |
print $h->input ({type=>"hidden", name=>"ID"});
|
| 129 |
print $h->br;
|
129 |
print $h->br;
|
| 130 |
return "";
|
130 |
return "";
|
| 131 |
} else {
|
131 |
} else {
|
| 132 |
my $table = $type eq "class" ? "v_class" : "v_games";
|
132 |
my $table = $type eq "class" ? "v_class_new" : "v_games";
|
| 133 |
my $field = $type eq "class" ? "name" : "teams";
|
133 |
my $field = $type eq "class" ? "name" : "teams";
|
| 134 |
my $dbh = WebDB::connect ();
|
134 |
my $dbh = WebDB::connect ();
|
| 135 |
#push @queued_users, map { @{$_} } @{ $qdbh->selectall_arrayref ("select queueid from queue where timestampdiff(minute, last_seen, now()) < 7 and (timestamp <> last_seen or timestampdiff(second, last_seen, now()) <= 60) order by timestamp") };
|
135 |
#push @queued_users, map { @{$_} } @{ $qdbh->selectall_arrayref ("select queueid from queue where timestampdiff(minute, last_seen, now()) < 7 and (timestamp <> last_seen or timestampdiff(second, last_seen, now()) <= 60) order by timestamp") };
|
| 136 |
my %things = map { $_->[0] => $_->[1] } @{ $dbh->selectall_arrayref ("select distinct id, $field from $table where year(date) = year(now())") };
|
136 |
my %things = map { $_->[0] => $_->[1] } @{ $dbh->selectall_arrayref ("select distinct id, $field from $table where year(date) = year(now())") };
|
| 137 |
$dbh->disconnect ();
|
137 |
$dbh->disconnect ();
|
| Line 155... |
Line 155... |
| 155 |
|
155 |
|
| Line 156... |
Line 156... |
| 156 |
my $dbh = WebDB::connect ();
|
156 |
my $dbh = WebDB::connect ();
|
| 157 |
|
157 |
|
| 158 |
my $user_count;
|
158 |
my $user_count;
|
| 159 |
if ($type eq "class") {
|
159 |
if ($type eq "class") {
|
| 160 |
print map { $_.$h->br } $dbh->selectrow_array ("select id, name, coach, date, dayofweek, time, location from v_class where id = ?", undef, $ID);
|
160 |
print map { $_.$h->br } $dbh->selectrow_array ("select id, name, coach, date, dayofweek, time, location from v_class_new where id = ?", undef, $ID);
|
| 161 |
($user_count) = $dbh->selectrow_array ("select count(email) from v_class_signup join official on v_class_signup.RCid = official.RCid where id = ?", undef, $ID);
|
161 |
($user_count) = $dbh->selectrow_array ("select count(email) from v_class_signup_new join official on v_class_signup_new.RCid = official.RCid where id = ?", undef, $ID);
|
| 162 |
print $user_count." Users".$h->br;
|
162 |
print $user_count." Users".$h->br;
|
| 163 |
} elsif ($type eq "game") {
|
163 |
} elsif ($type eq "game") {
|
| 164 |
print map { $_.$h->br } $dbh->selectrow_array ("select id, teams, date, dayofweek, time, track, gtype from v_games where id = ?", undef, $ID);
|
164 |
print map { $_.$h->br } $dbh->selectrow_array ("select id, teams, date, dayofweek, time, track, gtype from v_games where id = ?", undef, $ID);
|