| Line 17... |
Line 17... |
| 17 |
$ENV{HTTPS} = 'ON' if $ENV{SERVER_NAME} =~ /^peeps/;
|
17 |
$ENV{HTTPS} = 'ON' if $ENV{SERVER_NAME} =~ /^peeps/;
|
| Line 18... |
Line 18... |
| 18 |
|
18 |
|
| 19 |
my $cookie_string = authenticate () || die;
|
19 |
my $cookie_string = authenticate () || die;
|
| 20 |
our ($EML, $PWD, $LVL) = split /&/, $cookie_string;
|
20 |
our ($EML, $PWD, $LVL) = split /&/, $cookie_string;
|
| - |
|
21 |
my $PEEPSAUTH_cookie = CGI::Cookie->new(-name=>'PEEPSAUTH',-value=>"$cookie_string",-expires=>"+30m");
|
| Line 21... |
Line 22... |
| 21 |
my $PEEPSAUTH_cookie = CGI::Cookie->new(-name=>'PEEPSAUTH',-value=>"$cookie_string",-expires=>"+30m");
|
22 |
my $user = $ORCUSER;
|
| 22 |
|
23 |
|
| 23 |
my $pageTitle = "PEEPS - People";
|
24 |
my $pageTitle = "PEEPS - People";
|
| 24 |
our $DBTABLE = 'full_person';
|
25 |
our $DBTABLE = 'full_person';
|
| Line 48... |
Line 49... |
| 48 |
my @whereClause;
|
49 |
my @whereClause;
|
| Line 49... |
Line 50... |
| 49 |
|
50 |
|
| 50 |
# Only let users see people from leagues where they're a League Admin (unless they're a SysAdmin)
|
51 |
# Only let users see people from leagues where they're a League Admin (unless they're a SysAdmin)
|
| 51 |
my $org = getLeagueAffiliation ($ORCUSER->{person_id});
|
52 |
my $org = getLeagueAffiliation ($ORCUSER->{person_id});
|
| 52 |
#use Data::Dumper; warn Dumper $org;
|
53 |
#use Data::Dumper; warn Dumper $org;
|
| 53 |
push @whereClause, "league_id in (".join (", ", grep { inArray ("League Admin", $org->{$_}) } keys %{$org}).")" unless $ORCUSER->{SYSADMIN};
|
54 |
push @whereClause, "league_id in (".join (", ", grep { inArray ("League Admin", $org->{$_}) } keys %{$org}).")" unless $user->{SYSADMIN} or $user->{SANCTIONING};
|
| 54 |
#warn @whereClause;
|
55 |
#warn @whereClause;
|
| 55 |
# If we need to modify line item values, create a subroutine named "modify_$columnname"
|
56 |
# If we need to modify line item values, create a subroutine named "modify_$columnname"
|
| Line 56... |
Line 57... |
| 56 |
# It will receive a hashref to the object lineitem
|
57 |
# It will receive a hashref to the object lineitem
|
| Line 75... |
Line 76... |
| 75 |
return "$colName in (select distinct $colName from organization where type = 'Non-Member League')";
|
76 |
return "$colName in (select distinct $colName from organization where type = 'Non-Member League')";
|
| 76 |
} else {
|
77 |
} else {
|
| 77 |
return "$colName = \"$filter\"";
|
78 |
return "$colName = \"$filter\"";
|
| 78 |
}
|
79 |
}
|
| 79 |
} else {
|
80 |
} else {
|
| 80 |
my $Options = $ORCUSER->{SYSADMIN} ?
|
81 |
my $Options = ($user->{SYSADMIN} or $user->{SANCTIONING}) ?
|
| 81 |
$h->option ("", "<-blank->", "<-not blank->", "<-Member League->", "<-Non-Member League->", @{ $dbh->selectall_arrayref ("select distinct league_name from organization order by league_name") })
|
82 |
$h->option ("", "<-blank->", "<-not blank->", "<-Member League->", "<-Non-Member League->", @{ $dbh->selectall_arrayref ("select distinct league_name from organization order by league_name") })
|
| 82 |
: $h->option ("", @{ $dbh->selectall_arrayref ("select distinct league_name from full_person where id = ? and role like ? order by league_name", undef, $ORCUSER->{person_id}, '%League Admin%') });
|
83 |
: $h->option ("", @{ $dbh->selectall_arrayref ("select distinct league_name from full_person where id = ? and role like ? order by league_name", undef, $ORCUSER->{person_id}, '%League Admin%') });
|
| Line 83... |
Line 84... |
| 83 |
|
84 |
|