Commit ece086df authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor fixups for cookie handling and login/logout buttons.

parent 22231ac9
...@@ -40,6 +40,7 @@ $disable_accounts = 0; ...@@ -40,6 +40,7 @@ $disable_accounts = 0;
if ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.aptlab.net") { if ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.aptlab.net") {
$TBAUTHDOMAIN = ".aptlab.net"; $TBAUTHDOMAIN = ".aptlab.net";
$APTHOST = "www.aptlab.net"; $APTHOST = "www.aptlab.net";
$WWWHOST = "www.aptlab.net";
$APTBASE = "https://www.aptlab.net"; $APTBASE = "https://www.aptlab.net";
} }
...@@ -84,11 +85,11 @@ function SPITHEADER($thinheader = 0) ...@@ -84,11 +85,11 @@ function SPITHEADER($thinheader = 0)
<ul class='nav navbar-nav navbar-right'>"; <ul class='nav navbar-nav navbar-right'>";
if (!$disable_accounts) { if (!$disable_accounts) {
if ($login_user) { if ($login_user) {
echo "<li><a>$login_uid logged in</a></li>\n"; echo "<li><a id='loginbutton'>$login_uid logged in</a></li>\n";
} }
elseif (!NOLOGINS()) { elseif (!NOLOGINS()) {
echo "<li><a class='btn btn-primary navbar-btn' echo "<li><a class='btn btn-primary navbar-btn'
id='login_button' id='loginbutton'
data-toggle='modal' data-toggle='modal'
href='#quickvm_login_modal' href='#quickvm_login_modal'
data-target='#quickvm_login_modal'> data-target='#quickvm_login_modal'>
...@@ -100,7 +101,7 @@ function SPITHEADER($thinheader = 0) ...@@ -100,7 +101,7 @@ function SPITHEADER($thinheader = 0)
<ul class='nav navbar-nav navbar-left'> <ul class='nav navbar-nav navbar-left'>
<li><a href='quickvm.php'>Home</a></li>\n"; <li><a href='quickvm.php'>Home</a></li>\n";
if (!$disable_accounts && $login_user) { if (!$disable_accounts && $login_user) {
echo " <li><a href='#' id='logout_button'>Logout</a></li>\n"; echo " <li><a href='#' id='logoutbutton'>Logout</a></li>\n";
} }
echo " </ul> echo " </ul>
</div> </div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment