mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Template-path changes.
This commit is contained in:
@@ -1123,8 +1123,8 @@ else
|
||||
}
|
||||
|
||||
$layout = isset($layout) ? $layout : '_default';
|
||||
define('HEADERF', e_THEME."templates/header{$layout}.php");
|
||||
define('FOOTERF', e_THEME."templates/footer{$layout}.php");
|
||||
define('HEADERF', e_CORE."templates/header{$layout}.php");
|
||||
define('FOOTERF', e_CORE."templates/footer{$layout}.php");
|
||||
|
||||
if (!file_exists(HEADERF))
|
||||
{
|
||||
|
@@ -335,7 +335,7 @@ $etag = md5($page);
|
||||
//header('Pragma:');
|
||||
// previously disabled or there is posted data
|
||||
$canCache = e107::canCache();
|
||||
header("Cache-Control: must-revalidate", true);
|
||||
header("Cache-Control: must-revalidate", true); //XXX testing it here to check for improvement.
|
||||
if($canCache && !deftrue('e_NOCACHE') && $_SERVER['REQUEST_METHOD'] === 'GET' && $_SERVER['QUERY_STRING'] != 'logout')
|
||||
{
|
||||
// header("Cache-Control: must-revalidate", true);
|
26
login.php
26
login.php
@@ -20,7 +20,7 @@
|
||||
require_once("class2.php");
|
||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
||||
|
||||
if (USER || e_LOGIN != e_SELF) // Disable page if user logged in, or some custom e_LOGIN value is used.
|
||||
if ((USER || e_LOGIN != e_SELF) && !getperms('0')) // Disable page if user logged in, or some custom e_LOGIN value is used.
|
||||
{
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit();
|
||||
@@ -36,8 +36,11 @@ if ($use_imagecode)
|
||||
$sec_img = new secure_image;
|
||||
}
|
||||
|
||||
if (!USER)
|
||||
if (!USER || getperms('0'))
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (!defined('LOGINMESSAGE')) define('LOGINMESSAGE', ''); // LOGINMESSAGE only appears with errors
|
||||
require_once(e_HANDLER.'form_handler.php');
|
||||
$rs = new form;
|
||||
@@ -62,23 +65,34 @@ if (!USER)
|
||||
}
|
||||
$LOGIN_TABLE_AUTOLOGIN = "<input type='checkbox' name='autologin' value='1' />";
|
||||
$LOGIN_TABLE_AUTOLOGIN_LAN = LAN_LOGIN_8;
|
||||
$LOGIN_TABLE_SUBMIT = "<input class='button' type='submit' name='userlogin' value=\"".LAN_LOGIN_9."\" />";
|
||||
$LOGIN_TABLE_SUBMIT = "<input class='btn btn-primary button' type='submit' name='userlogin' value=\"".LAN_LOGIN_9."\" />";
|
||||
|
||||
if (!isset($LOGIN_TABLE) || !$LOGIN_TABLE)
|
||||
{
|
||||
if (file_exists(THEME.'login_template.php'))
|
||||
if (file_exists(THEME.'templates/login_template.php')) //v2.x path
|
||||
{
|
||||
require_once(THEME.'templates/login_template.php');
|
||||
}
|
||||
elseif (file_exists(THEME.'login_template.php'))
|
||||
{
|
||||
require_once(THEME.'login_template.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once(e_BASE.$THEMES_DIRECTORY."templates/login_template.php");
|
||||
require_once(e_CORE."templates/login_template.php");
|
||||
}
|
||||
}
|
||||
$text = preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE);
|
||||
|
||||
if(getperms('0'))
|
||||
{
|
||||
echo "<div class='alert alert-block alert-error center'> You are currently logged in.</div>";
|
||||
}
|
||||
|
||||
echo preg_replace("/\{(.*?)\}/e", 'varset($\1,"\1")', $LOGIN_TABLE_HEADER);
|
||||
|
||||
$login_message = LAN_LOGIN_3." | ".SITENAME;
|
||||
// $login_message = LAN_LOGIN_3." | ".SITENAME;
|
||||
$login_message = SITENAME;
|
||||
$ns->tablerender($login_message, $text, 'login_page');
|
||||
|
||||
$LOGIN_TABLE_FOOTER_USERREG = ' '; // In case no registration system enabled
|
||||
|
Reference in New Issue
Block a user