| Line 98... |
Line 98... |
| 98 |
|
98 |
|
| 99 |
|
- |
|
| 100 |
|
- |
|
| 101 |
|
- |
|
| 102 |
print $h->close ("body", "html");
|
- |
|
| 103 |
exit;
|
- |
|
| 104 |
|
- |
|
| 105 |
#foreach (sort keys %ENV) {
|
- |
|
| 106 |
# print "$_: $ENV{$_}\n<br>";
|
- |
|
| 107 |
#}
|
- |
|
| 108 |
|
- |
|
| 109 |
|
- |
|
| 110 |
my @announcements;
|
- |
|
| 111 |
|
- |
|
| 112 |
my @everyone;
|
- |
|
| 113 |
push @everyone, $h->li ($h->a ( { href=>"people" }, "Look at a list of people." ));
|
- |
|
| 114 |
push @everyone, $h->li ($h->a ( { href=>"organizations" }, "...or a list of leagues." ));
|
- |
|
| 115 |
my @leads;
|
- |
|
| 116 |
|
- |
|
| 117 |
my @insurance;
|
- |
|
| 118 |
$user->{policy} = isPersonCovered ($user->{id});
|
- |
|
| 119 |
if ($user->{policy}) {
|
- |
|
| 120 |
my $daysremaining = remainingPolicyDays ($user->{id}, $user->{policy});
|
- |
|
| 121 |
push @insurance, $h->li ("You are currently covered by Policy ID: $user->{policy}");
|
- |
|
| 122 |
push @insurance, $h->li ("You have $daysremaining days remaining in coverage.");
|
- |
|
| 123 |
if ($daysremaining <= 90) {
|
- |
|
| 124 |
push @insurance, $h->li ($h->a ( { href=>"attestation" }, "You're eligible to renew." ));
|
- |
|
| 125 |
}
|
- |
|
| 126 |
|
- |
|
| 127 |
} else {
|
- |
|
| 128 |
push @insurance, $h->li ($h->a ( { href=>"attestation" }, "Purchase Insurance." ));
|
- |
|
| 129 |
}
|
- |
|
| 130 |
push @insurance, $h->li ($h->a ( { href=>"insurance" }, "View Insurance History." ));
|
- |
|
| 131 |
|
- |
|
| 132 |
|
- |
|
| 133 |
my @managers;
|
- |
|
| 134 |
|
- |
|
| 135 |
my @sysadmins;
|
- |
|
| 136 |
|
- |
|
| 137 |
my @activity_log;
|
- |
|
| 138 |
my $alog = $dbh->prepare("select timestamp, event from log where person_id = ? order by timestamp desc limit 10");
|
- |
|
| 139 |
$alog->execute($user->{person_id});
|
- |
|
| 140 |
while (my @logs = $alog->fetchrow_array) {
|
- |
|
| 141 |
my ($d, $t) = split /\s+/, $logs[0];
|
- |
|
| 142 |
push @activity_log, $h->li ({ class=>"shaded" }, join " ", @logs);
|
- |
|
| 143 |
}
|
- |
|
| 144 |
|
- |
|
| 145 |
my @reference;
|
- |
|
| 146 |
|
- |
|
| 147 |
printRCHeader("Home");
|
- |
|
| 148 |
print $h->close ("table");
|
- |
|
| 149 |
|
- |
|
| 150 |
print $h->form ({ name => "Req", action => url });
|
- |
|
| 151 |
|
- |
|
| 152 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Announcement:"), $h->ul ([ @announcements ]) ]) if (scalar @announcements);
|
- |
|
| 153 |
|
- |
|
| 154 |
#print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Note:"), "<b>Your account is being reviewed.</b>", $h->br, "You won't have access to view or sign-up for things until you've been approved / added to a department.", $h->br, "Please watch your email for notifications." ]) unless $activated;
|
- |
|
| 155 |
|
- |
|
| 156 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do:"), $h->ul ([ @everyone ]) ]);
|
- |
|
| 157 |
|
- |
|
| 158 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Personal Insurance:"), $h->ul ([ @insurance ]) ]);
|
- |
|
| 159 |
|
- |
|
| 160 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Lead:"), $h->ul ([ @leads ]) ]) if ($LVL > 1);
|
- |
|
| 161 |
|
- |
|
| 162 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a Manager:"), $h->ul ([ @managers ]) ]) if ($LVL > 2);
|
- |
|
| 163 |
|
- |
|
| 164 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Things you can do as a SysAdmin:"), $h->ul ([ @sysadmins ]) ]) if ($LVL >= 5);
|
- |
|
| 165 |
|
- |
|
| 166 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Your Latest Activity:"), $h->ul ([ @activity_log ]), $h->h5 ($h->a ({ href=>"log?excel=0&autoload=1&eventid=true×tamp=true&event=true&RCid=true&derby_name=true&filter-timestamp=&filter-event=&filter-RCid=".$user->{RCid}."&filter-derby_name=&sortby=eventid&limit=25&page=1" }, "[Your entire log history]")) ]);
|
- |
|
| 167 |
|
- |
|
| 168 |
print $h->div ({ class=>"index" }, [$h->p ({ class=>"heading" }, "Reference:"), $h->ul ([ @reference ]) ]);
|
- |
|
| 169 |
|
- |
|