- Put a login bar in the header that always has a logout link, eventually it'll

have more.
This commit is contained in:
dave 2007-11-12 20:43:47 +00:00
parent fb65e87587
commit 2a5cdcb57e
2 changed files with 40 additions and 0 deletions

View File

@ -421,6 +421,40 @@ if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config")
if(file_exists($prependdir."data/logo-100.gif"))
echo "<img align=\"left\" height=\"50\" src=\"".$config['SFIABDIRECTORY']."/data/logo-100.gif\">";
echo "<h1>".i18n($config['fairname'])."</h1>";
echo "<div align=\"right\" style=\"font-size: 0.75em;\">";
if(isset($_SESSION['users_type'])) {
$types = array('volunteer' => 'Volunteer', 'judge' => 'Judge',
'student'=>'Participant','committee'=>'Committee Member',
'region'=>'Region');
if($_SESSION['users_type'] != false) {
echo i18n($types[$_SESSION['users_type']]);
}
echo " {$_SESSION['email']}: ";
echo "<a href=\"user_login.php?action=logout\">[Logout]</a>";
} else if(isset($_SESSION['email'])) {
/* Backwards compatible login settings */
/* Check for committee */
if(isset($_SESSION['committee_member_id'])) {
echo i18n('Committee Member');
echo " {$_SESSION['email']}: ";
echo "<a href=\"committee_login.php?action=logout\">[Logout]</a>";
} else if(isset($_SESSION['judges_id'])) {
echo i18n('Judge');
echo " {$_SESSION['email']}: ";
echo "<a href=\"register_judges.php?action=logout\">[Logout]</a>";
} else if(isset($_SESSION['registration_id'])) {
echo i18n('Participant');
echo " {$_SESSION['email']}: ";
echo "<a href=\"register_participants.php?action=logout\">[Logout]</a>";
} else {
echo "&nbsp;";
}
} else {
echo i18n('Not Logged In');
}
echo "</div>";
?>
<hr />
</div>

View File

@ -79,6 +79,7 @@ h1 {
font-size: 2.0em;
font-weight: bold;
margin-top: 0;
margin-bottom: 0;
}
h2 {
font-size: 1.6em;
@ -268,3 +269,8 @@ a.caution:hover {
vertical-align: baseline;
}
hr {
margin-top: 2px;
}