1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 20:51:53 +02:00

Merge pull request #2109 from MikeyGMT/mikey20161204

Lans Cleanup auth.php #6
This commit is contained in:
Cameron 2016-12-05 20:33:19 -08:00 committed by GitHub
commit b7c6ee5ae4
2 changed files with 11 additions and 5 deletions

View File

@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2016 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@ -66,9 +66,12 @@ if (ADMIN)
// XXX LOGIN AS Temporary solution, we need something smarter, e.g. reserved message stack 'admin' which will be always printed
// inside admin area
if(e107::getUser()->getSessionDataAs())
{ // TODO - lan
{
$asuser = e107::getSystemUser(e107::getUser()->getSessionDataAs(), false);
e107::getMessage()->addInfo('Successfully logged in as '.($asuser->getId() ? $asuser->getName().' ('.$asuser->getValue('email').')' : 'unknown'). ' <a href="'.e_ADMIN_ABS.'users.php?mode=main&amp;action=logoutas">[logout]</a>');
$lanVars = array ('x' => ($asuser->getId() ? $asuser->getName().' ('.$asuser->getValue('email').')' : 'unknown')) ;
e107::getMessage()->addInfo($tp->lanVars(ADLAN_164, $lanVars).' <a href="'.e_ADMIN_ABS.'users.php?mode=main&amp;action=logoutas">['.LAN_LOGOUT.']</a>');
}
// NEW, legacy 3rd party code fix, header called inside the footer o.O
if(deftrue('e_ADMIN_UI'))
@ -297,7 +300,7 @@ class auth
$text = "<form id='admin-login' method='post' action='".e_SELF."' {$incChap} >
<div id='logo' ><img src='".e_IMAGE."logo_template_large.png' alt='login' /></div>
<div id='logo' ><img src='".e_IMAGE."logo_template_large.png' alt='".LAN_LOGIN."' /></div>
<div id='login-admin' class='center'>
<div>";
@ -360,7 +363,7 @@ class auth
e107::getRender()->tablerender("", $text, 'admin-login');
echo "<div class='row-fluid'>
<div class='center' style='margin-top:25%; color:silver'><span style='padding:0 40px 0 0px;'><a href='http://e107.org'>Powered by e107</a></span> <a href='".e_BASE."index.php'>Return to Website</a></div>
<div class='center' style='margin-top:25%; color:silver'><span style='padding:0 40px 0 0px;'><a href='http://e107.org'>".ADLAN_165."</a></span> <a href='".e_BASE."index.php'>".ADLAN_166."</a></div>
</div>";
}

View File

@ -182,6 +182,9 @@ define("ADLAN_160", "Configure Site URLs");
define("ADLAN_161", "Custom Fields?");
define("ADLAN_162", "A newer version of your site-theme is available:");
define("ADLAN_163", "A newer version of an installed plugin is available:");
define("ADLAN_164", "Successfully logged in as [x].");
define("ADLAN_165", "Powered by e107");
define("ADLAN_166", "Return to Website");
// define("ADLAN_CL_1", "Settings");
define("ADLAN_CL_2", "Users");