function put_login_link in Production check & Production monitor 6
Same name and namespace in other branches
- 7 includes/prod_check.apc.inc \put_login_link()
1 call to put_login_link()
- prod_check.apc.inc in includes/
prod_check.apc.inc
File
- includes/
prod_check.apc.inc, line 490
Code
function put_login_link($s = "Login") {
global $MY_SELF, $MYREQUEST, $AUTHENTICATED;
// needs ADMIN_PASSWORD to be changed!
//
if (!USE_AUTHENTICATION) {
return;
}
else {
if (ADMIN_PASSWORD == 'password') {
// Message below changed to avoid prod_check integration confusion. It used
// to be:
// You need to set a password at the top of apc.php before this will work!
print <<<EOB
\t\t\t<a href="#" onClick="javascript:alert('You need to set a password in the Production Check settings before this will work!');return false";>{<span class="php-variable">$s</span>}</a>
EOB;
}
else {
if ($AUTHENTICATED) {
print <<<EOB
\t\t\t'{<span class="php-variable">$_SERVER</span>[<span class="php-string">'PHP_AUTH_USER'</span>]}' logged in!
EOB;
}
else {
print <<<EOB
\t\t\t<a href="{<span class="php-variable">$MY_SELF</span>}&LO=1&OB={<span class="php-variable">$MYREQUEST</span>[<span class="php-string">'OB'</span>]}">{<span class="php-variable">$s</span>}</a>
EOB;
}
}
}
}