| Line 9... |
Line 9... |
| 9 |
use WebDB;
|
9 |
use WebDB;
|
| Line 10... |
Line 10... |
| 10 |
|
10 |
|
| 11 |
$SIG{__WARN__} = sub { warn sprintf("[%s] ", scalar localtime), @_ };
|
11 |
$SIG{__WARN__} = sub { warn sprintf("[%s] ", scalar localtime), @_ };
|
| Line 12... |
Line 12... |
| 12 |
$SIG{__DIE__} = sub { die sprintf("[%s] ", scalar localtime), @_ };
|
12 |
$SIG{__DIE__} = sub { die sprintf("[%s] ", scalar localtime), @_ };
|
| Line 13... |
Line 13... |
| 13 |
|
13 |
|
| 14 |
our @EXPORT = qw( $ORCUSER $SYSTEM_EMAIL getRCDBH getAccessLevels authDB max authenticate canView getLeagueAffiliation getLeagueName getLeagues getShiftRef getShiftDepartment getClassID getDepartments convertDepartments convertTime getSchedule getRCid getSetting getUser getUserEmail getUserDerbyName getYears printRCHeader changeShift modShiftTime signUpCount signUpEligible findConflict changeLeadShift sendNewUserEMail sendUserMFAEMail logit orglogit isLeagueAdmin isPersonCovered isLeagueCovered isWFTDAMember remainingPolicyDays remainingOrgPolicyDays getPolicyByID getCoverageByID getOrgCoverageByID);
|
14 |
our @EXPORT = qw( $ORCUSER $SYSTEM_EMAIL getRCDBH getAccessLevels authDB max authenticate canView getLeagueAffiliation getLeagueName getLeague getLeagues getShiftRef getShiftDepartment getClassID getDepartments convertDepartments convertTime getSchedule getRCid getSetting getUser getUserEmail getUserDerbyName getYears printRCHeader changeShift modShiftTime signUpCount signUpEligible findConflict changeLeadShift sendNewUserEMail sendUserMFAEMail logit orglogit isLeagueAdmin isPersonCovered isLeagueCovered isWFTDAMember remainingPolicyDays remainingOrgPolicyDays getPolicyByID getCoverageByID getOrgCoverageByID);
|
| 15 |
|
15 |
|
| 16 |
my $dbh = WebDB::connect ("peeps");
|
16 |
my $dbh = WebDB::connect ("peeps");
|
| Line 557... |
Line 557... |
| 557 |
my $id = shift // "";
|
557 |
my $id = shift // "";
|
| 558 |
my ($name) = $dbh->selectrow_array ("select league_name from organization where id = ?", undef, $id);
|
558 |
my ($name) = $dbh->selectrow_array ("select league_name from organization where id = ?", undef, $id);
|
| 559 |
return $name;
|
559 |
return $name;
|
| 560 |
}
|
560 |
}
|
| Line -... |
Line 561... |
| - |
|
561 |
|
| - |
|
562 |
sub getLeague {
|
| - |
|
563 |
my $id = shift // "";
|
| - |
|
564 |
my ($league) = $dbh->selectrow_hashref ("select * from organization where id = ?", undef, $id);
|
| - |
|
565 |
return $league;
|
| - |
|
566 |
}
|
| 561 |
|
567 |
|
| 562 |
sub getLeagues {
|
568 |
sub getLeagues {
|
| 563 |
my $exclude_id = shift // 0;
|
569 |
my $exclude_id = shift // 0;
|
| 564 |
return $dbh->selectall_arrayref ("select id, concat_ws(' - ', league_name, type, status) as league from organization where status in ('Active', 'Voluntary Inactive') and visible = 1 and id not in (select member_org_id from role where person_id = ?) order by league_name", undef, $exclude_id);
|
570 |
return $dbh->selectall_arrayref ("select id, concat_ws(' - ', league_name, type, status) as league from organization where status in ('Active', 'Voluntary Inactive') and visible = 1 and id not in (select member_org_id from role where person_id = ?) order by league_name", undef, $exclude_id);
|