Commit daebae4f authored by Ad Schellevis's avatar Ad Schellevis

(legacy) curly braces and spaces in authgui.inc

parent d101b28e
<?php <?php
/* /*
Copyright (C) 2008 Shrew Soft Inc Copyright (C) 2008 Shrew Soft Inc
Copyright (C) 2007-2008 Scott Ullrich <sullrich@gmail.com> Copyright (C) 2007-2008 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com> Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
Copyright (C) 2006 Paul Taylor <paultaylor@winn-dixie.com> Copyright (C) 2006 Paul Taylor <paultaylor@winn-dixie.com>
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net> Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, 1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright 2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("auth.inc"); require_once("auth.inc");
...@@ -39,217 +39,224 @@ $priv_list = $acl->getLegacyPrivList(); ...@@ -39,217 +39,224 @@ $priv_list = $acl->getLegacyPrivList();
function cmp_page_matches($page, & $matches, $fullwc = true) { function cmp_page_matches($page, & $matches, $fullwc = true) {
if (!is_array($matches)) if (!is_array($matches)) {
return false; return false;
}
/* skip any leading fwdslash */
$test = strpos($page, "/");
if ($test !== false && $test == 0)
$page = substr($page, 1);
/* look for a match */ /* skip any leading fwdslash */
foreach ($matches as $match) { $test = strpos($page, "/");
if ($test !== false && $test == 0) {
$page = substr($page, 1);
}
/* possibly ignore full wildcard match */ /* look for a match */
if (!$fullwc && !strcmp($match ,"*")) foreach ($matches as $match) {
continue; /* possibly ignore full wildcard match */
if (!$fullwc && !strcmp($match ,"*"))
continue;
/* compare exact or wildcard match */ /* compare exact or wildcard match */
$match = str_replace(array(".", "*","?"), array("\.", ".*","\?"), $match); $match = str_replace(array(".", "*","?"), array("\.", ".*","\?"), $match);
$result = preg_match("@^/{$match}$@", "/{$page}"); $result = preg_match("@^/{$match}$@", "/{$page}");
if ($result) if ($result) {
return true; return true;
} }
}
return false; return false;
} }
function isAllowedPage($page) function isAllowedPage($page)
{ {
if (session_status() == PHP_SESSION_NONE) { if (session_status() == PHP_SESSION_NONE) {
session_start(); session_start();
} }
if (!isset($_SESSION['Username'])) { if (!isset($_SESSION['Username'])) {
session_write_close(); session_write_close();
return false; return false;
} }
/* root access check */ /* root access check */
$user = getUserEntry($_SESSION['Username']); $user = getUserEntry($_SESSION['Username']);
session_write_close(); session_write_close();
if (isset($user)) { if (isset($user)) {
if (isset($user['uid'])) { if (isset($user['uid'])) {
if ($user['uid'] == 0) { if ($user['uid'] == 0) {
return true; return true;
} }
} }
} }
/* user privelege access check */ /* user privelege access check */
$allowedpages = getAllowedPages($_SESSION['Username']); $allowedpages = getAllowedPages($_SESSION['Username']);
return cmp_page_matches($page, $allowedpages); return cmp_page_matches($page, $allowedpages);
} }
function getPrivPages(& $entry, & $allowed_pages) { function getPrivPages(& $entry, & $allowed_pages) {
global $priv_list; global $priv_list;
if (!isset($entry['priv']) || !is_array($entry['priv'])) if (!isset($entry['priv']) || !is_array($entry['priv'])) {
return; return;
}
foreach ($entry['priv'] as $pname) {
if (strncmp($pname, "page-", 5)) foreach ($entry['priv'] as $pname) {
continue; if (strncmp($pname, "page-", 5)) {
$priv = &$priv_list[$pname]; continue;
if (!is_array($priv)) }
continue; $priv = &$priv_list[$pname];
$matches = &$priv['match']; if (!is_array($priv)) {
if (!is_array($matches)) continue;
continue; }
foreach ($matches as $match) $matches = &$priv['match'];
$allowed_pages[] = $match; if (!is_array($matches)) {
} continue;
}
foreach ($matches as $match) {
$allowed_pages[] = $match;
}
}
} }
function getAllowedPages($username) { function getAllowedPages($username) {
global $config; global $config;
$allowed_pages = array(); $allowed_pages = array();
$allowed_groups = array(); $allowed_groups = array();
// search for a local user by name // search for a local user by name
$local_user = getUserEntry($username); $local_user = getUserEntry($username);
getPrivPages($local_user, $allowed_pages); getPrivPages($local_user, $allowed_pages);
// obtain local groups if we have a local user // obtain local groups if we have a local user
$allowed_groups = local_user_get_groups($local_user); $allowed_groups = local_user_get_groups($local_user);
// build a list of allowed pages // build a list of allowed pages
if (is_array($config['system']['group']) && is_array($allowed_groups)) { if (is_array($config['system']['group']) && is_array($allowed_groups)) {
foreach ($config['system']['group'] as $group) { foreach ($config['system']['group'] as $group) {
// a bit odd, we have seem some cases in the wild where $group doesn't contain a name attribute. // a bit odd, we have seem some cases in the wild where $group doesn't contain a name attribute.
// this shouldn't happen, but to avoid warnings we will check over here. // this shouldn't happen, but to avoid warnings we will check over here.
if (isset($group['name']) && in_array($group['name'], $allowed_groups)) { if (isset($group['name']) && in_array($group['name'], $allowed_groups)) {
getPrivPages($group, $allowed_pages); getPrivPages($group, $allowed_pages);
} }
} }
} }
return $allowed_pages; return $allowed_pages;
} }
function session_auth(&$Login_Error) function session_auth(&$Login_Error)
{ {
global $config, $_SESSION; global $config, $_SESSION;
// Handle HTTPS httponly and secure flags // Handle HTTPS httponly and secure flags
$currentCookieParams = session_get_cookie_params(); $currentCookieParams = session_get_cookie_params();
session_set_cookie_params( session_set_cookie_params(
$currentCookieParams["lifetime"], $currentCookieParams["lifetime"],
$currentCookieParams["path"], $currentCookieParams["path"],
NULL, NULL,
($config['system']['webgui']['protocol'] == "https"), ($config['system']['webgui']['protocol'] == "https"),
true true
); );
if (session_status() == PHP_SESSION_NONE) { if (session_status() == PHP_SESSION_NONE) {
session_start(); session_start();
} }
// Detect protocol change // Detect protocol change
if (!isset($_POST['login']) && !empty($_SESSION['Logged_In']) && $_SESSION['protocol'] != $config['system']['webgui']['protocol']) { if (!isset($_POST['login']) && !empty($_SESSION['Logged_In']) && $_SESSION['protocol'] != $config['system']['webgui']['protocol']) {
session_write_close(); session_write_close();
return false; return false;
} }
/* Validate incoming login request */ /* Validate incoming login request */
if (isset($_POST['login']) && !empty($_POST['usernamefld']) && !empty($_POST['passwordfld'])) { if (isset($_POST['login']) && !empty($_POST['usernamefld']) && !empty($_POST['passwordfld'])) {
if (isset($config['system']['webgui']['authmode'])) { if (isset($config['system']['webgui']['authmode'])) {
$authcfg = auth_get_authserver($config['system']['webgui']['authmode']); $authcfg = auth_get_authserver($config['system']['webgui']['authmode']);
} else { } else {
$authcfg = null; $authcfg = null;
} }
// authenticate using config settings, or local if failed // authenticate using config settings, or local if failed
if (authenticate_user($_POST['usernamefld'], $_POST['passwordfld'], $authcfg) || if (authenticate_user($_POST['usernamefld'], $_POST['passwordfld'], $authcfg) ||
authenticate_user($_POST['usernamefld'], $_POST['passwordfld'])) { authenticate_user($_POST['usernamefld'], $_POST['passwordfld'])) {
// Generate a new id to avoid session fixation // Generate a new id to avoid session fixation
session_regenerate_id(); session_regenerate_id();
$_SESSION['Logged_In'] = "True"; $_SESSION['Logged_In'] = "True";
$_SESSION['Username'] = $_POST['usernamefld']; $_SESSION['Username'] = $_POST['usernamefld'];
$_SESSION['last_access'] = time(); $_SESSION['last_access'] = time();
$_SESSION['protocol'] = $config['system']['webgui']['protocol']; $_SESSION['protocol'] = $config['system']['webgui']['protocol'];
if (!isset($config['system']['webgui']['quietlogin'])) { if (!isset($config['system']['webgui']['quietlogin'])) {
log_error(sprintf(gettext("Successful login for user '%1\$s' from: %2\$s"), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR'])); log_error(sprintf(gettext("Successful login for user '%1\$s' from: %2\$s"), $_POST['usernamefld'], $_SERVER['REMOTE_ADDR']));
} }
header("Location: {$_SERVER['REQUEST_URI']}"); header("Location: {$_SERVER['REQUEST_URI']}");
exit; exit;
} else { } else {
/* give the user an error message */ /* give the user an error message */
$Login_Error = gettext('Wrong username or password.'); $Login_Error = gettext('Wrong username or password.');
log_error("webConfigurator authentication error for '{$_POST['usernamefld']}' from {$_SERVER['REMOTE_ADDR']}"); log_error("webConfigurator authentication error for '{$_POST['usernamefld']}' from {$_SERVER['REMOTE_ADDR']}");
} }
} }
/* Show login page if they aren't logged in */ /* Show login page if they aren't logged in */
if (empty($_SESSION['Logged_In'])) { if (empty($_SESSION['Logged_In'])) {
session_write_close(); session_write_close();
return false; return false;
} }
/* If session timeout isn't set, we don't mark sessions stale */ /* If session timeout isn't set, we don't mark sessions stale */
if (!isset($config['system']['webgui']['session_timeout'])) { if (!isset($config['system']['webgui']['session_timeout'])) {
/* Default to 4 hour timeout if one is not set */ /* Default to 4 hour timeout if one is not set */
if ($_SESSION['last_access'] < (time() - 14400)) { if ($_SESSION['last_access'] < (time() - 14400)) {
$_GET['logout'] = true; $_GET['logout'] = true;
$_SESSION['Logout'] = true; $_SESSION['Logout'] = true;
} else { } else {
$_SESSION['last_access'] = time(); $_SESSION['last_access'] = time();
} }
} else if (intval($config['system']['webgui']['session_timeout']) == 0) { } else if (intval($config['system']['webgui']['session_timeout']) == 0) {
$_SESSION['last_access'] = time(); $_SESSION['last_access'] = time();
} else { } else {
/* Check for stale session */ /* Check for stale session */
if ($_SESSION['last_access'] < (time() - ($config['system']['webgui']['session_timeout'] * 60))) { if ($_SESSION['last_access'] < (time() - ($config['system']['webgui']['session_timeout'] * 60))) {
$_GET['logout'] = true; $_GET['logout'] = true;
$_SESSION['Logout'] = true; $_SESSION['Logout'] = true;
} else { } else {
$_SESSION['last_access'] = time(); $_SESSION['last_access'] = time();
} }
} }
/* user hit the logout button */ /* user hit the logout button */
if (isset($_GET['logout'])) { if (isset($_GET['logout'])) {
if (isset($_SESSION['Logout'])) { if (isset($_SESSION['Logout'])) {
log_error(sprintf(gettext("Session timed out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR'])); log_error(sprintf(gettext("Session timed out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
} else { } else {
log_error(sprintf(gettext("User logged out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR'])); log_error(sprintf(gettext("User logged out for user '%1\$s' from: %2\$s"), $_SESSION['Username'], $_SERVER['REMOTE_ADDR']));
} }
/* wipe out $_SESSION */ /* wipe out $_SESSION */
$_SESSION = array(); $_SESSION = array();
if (isset($_COOKIE[session_name()])) { if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/'); setcookie(session_name(), '', time()-42000, '/');
} }
/* and destroy it */ /* and destroy it */
session_destroy(); session_destroy();
$scriptName = explode("/", $_SERVER["SCRIPT_FILENAME"]); $scriptName = explode("/", $_SERVER["SCRIPT_FILENAME"]);
$scriptElms = count($scriptName); $scriptElms = count($scriptName);
$scriptName = $scriptName[$scriptElms-1]; $scriptName = $scriptName[$scriptElms-1];
/* redirect to page the user is on, it'll prompt them to login again */ /* redirect to page the user is on, it'll prompt them to login again */
header("Location: {$scriptName}"); header("Location: {$scriptName}");
exit; exit;
} }
session_write_close(); session_write_close();
return true; return true;
} }
$Login_Error = ''; $Login_Error = '';
...@@ -296,35 +303,35 @@ function display_error_form($http_code, $desc) ...@@ -296,35 +303,35 @@ function display_error_form($http_code, $desc)
<!--[if IE 8 ]><html lang="en" class="ie ie8 lte9 lte8 no-js"><![endif]--> <!--[if IE 8 ]><html lang="en" class="ie ie8 lte9 lte8 no-js"><![endif]-->
<!--[if IE 9 ]><html lang="en" class="ie ie9 lte9 no-js"><![endif]--> <!--[if IE 9 ]><html lang="en" class="ie ie9 lte9 no-js"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]--> <!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]-->
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="robots" content="index, follow, noodp, noydir" /> <meta name="robots" content="index, follow, noodp, noydir" />
<meta name="keywords" content="" /> <meta name="keywords" content="" />
<meta name="description" content="" /> <meta name="description" content="" />
<meta name="copyright" content="" /> <meta name="copyright" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title><?=$http_code?></title> <title><?=$http_code?></title>
<link href="/ui/themes/<?= $themename ?>/build/css/main.css" media="screen, projection" rel="stylesheet"> <link href="/ui/themes/<?= $themename ?>/build/css/main.css" media="screen, projection" rel="stylesheet">
<link href="/ui/themes/<?= $themename ?>/build/images/favicon.png" rel="shortcut icon"> <link href="/ui/themes/<?= $themename ?>/build/images/favicon.png" rel="shortcut icon">
<!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script><![endif]--> <!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script><![endif]-->
</head> </head>
<body class="page-login"> <body class="page-login">
<div id="errordesc"> <div id="errordesc">
<h1>&nbsp</h1> <h1>&nbsp</h1>
<a href="/index.php?logout"> <a href="/index.php?logout">
<p id="errortext" style="vertical-align: middle; text-align: center;"> <p id="errortext" style="vertical-align: middle; text-align: center;">
<span style="color: #000000; font-weight: bold;"> <span style="color: #000000; font-weight: bold;">
<?=$desc;?> <?=$desc;?>
</span> </span>
</p> </p>
</div> </div>
</body> </body>
</html><?php </html><?php
} // end function } // end function
...@@ -364,29 +371,29 @@ function display_login_form($Login_Error = '') ...@@ -364,29 +371,29 @@ function display_login_form($Login_Error = '')
<!--[if IE 8 ]><html lang="en" class="ie ie8 lte9 lte8 no-js"><![endif]--> <!--[if IE 8 ]><html lang="en" class="ie ie8 lte9 lte8 no-js"><![endif]-->
<!--[if IE 9 ]><html lang="en" class="ie ie9 lte9 no-js"><![endif]--> <!--[if IE 9 ]><html lang="en" class="ie ie9 lte9 no-js"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]--> <!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]-->
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="robots" content="index, follow, noodp, noydir" /> <meta name="robots" content="index, follow, noodp, noydir" />
<meta name="keywords" content="" /> <meta name="keywords" content="" />
<meta name="description" content="" /> <meta name="description" content="" />
<meta name="copyright" content="" /> <meta name="copyright" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title><?=gettext("Login"); ?></title> <title><?=gettext("Login"); ?></title>
<link href="/ui/themes/<?= $themename ?>/build/css/main.css" media="screen, projection" rel="stylesheet"> <link href="/ui/themes/<?= $themename ?>/build/css/main.css" media="screen, projection" rel="stylesheet">
<link href="/ui/themes/<?= $themename ?>/build/images/favicon.png" rel="shortcut icon"> <link href="/ui/themes/<?= $themename ?>/build/images/favicon.png" rel="shortcut icon">
<!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script><![endif]--> <!--[if lt IE 9]><script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script><![endif]-->
</head> </head>
<body class="page-login"> <body class="page-login">
<div class="container"> <div class="container">
<?php <?php
if (is_ipaddr($http_host) && !$local_ip && !isset($config['system']['webgui']['nohttpreferercheck'])) { if (is_ipaddr($http_host) && !$local_ip && !isset($config['system']['webgui']['nohttpreferercheck'])) {
print_info_box(sprintf(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. %sIf you did not setup this forwarding, you may be the target of a man-in-the-middle attack."),'<br /><br />')); print_info_box(sprintf(gettext("You are accessing this router by an IP address not configured locally, which may be forwarded by NAT or other means. %sIf you did not setup this forwarding, you may be the target of a man-in-the-middle attack."),'<br /><br />'));
} }
...@@ -394,49 +401,49 @@ function display_login_form($Login_Error = '') ...@@ -394,49 +401,49 @@ function display_login_form($Login_Error = '')
?> ?>
<main class="login-modal-container"> <main class="login-modal-container">
<header class="login-modal-head" style="height:55px;"> <header class="login-modal-head" style="height:55px;">
<div class="navbar-brand"> <div class="navbar-brand">
<img src="/ui/themes/<?= $themename ?>/build/images/default-logo.png" height="30"/> <img src="/ui/themes/<?= $themename ?>/build/images/default-logo.png" height="30"/>
</div> </div>
</header> </header>
<div class="login-modal-content"> <div class="login-modal-content">
<div id="inputerrors" class="text-danger"><?= !empty($Login_Error) ? $Login_Error : '&nbsp;' ?></div><br /> <div id="inputerrors" class="text-danger"><?= !empty($Login_Error) ? $Login_Error : '&nbsp;' ?></div><br />
<form class="clearfix" id="iform" name="iform" method="post" <?= $loginautocomplete ?> action="<?=$_SERVER['REQUEST_URI'];?>"> <form class="clearfix" id="iform" name="iform" method="post" <?= $loginautocomplete ?> action="<?=$_SERVER['REQUEST_URI'];?>">
<div class="form-group"> <div class="form-group">
<label for="usernamefld"><?=gettext("Username:"); ?></label> <label for="usernamefld"><?=gettext("Username:"); ?></label>
<input id="usernamefld" type="text" name="usernamefld" class="form-control user" tabindex="1" autofocus="autofocus" autocapitalize="off" autocorrect="off" /> <input id="usernamefld" type="text" name="usernamefld" class="form-control user" tabindex="1" autofocus="autofocus" autocapitalize="off" autocorrect="off" />
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="passwordfld"><?=gettext("Password:"); ?></label> <label for="passwordfld"><?=gettext("Password:"); ?></label>
<input id="passwordfld" type="password" name="passwordfld" class="form-control pwd" tabindex="2" /> <input id="passwordfld" type="password" name="passwordfld" class="form-control pwd" tabindex="2" />
</div> </div>
<button type="submit" name="login" value="1" class="btn btn-primary pull-right"><?=gettext("Login"); ?></button> <button type="submit" name="login" value="1" class="btn btn-primary pull-right"><?=gettext("Login"); ?></button>
</form> </form>
<?php if (!$have_cookies && isset($_POST['login'])) : ?> <?php if (!$have_cookies && isset($_POST['login'])) : ?>
<br /><br /> <br /><br />
<span class="text-danger"> <span class="text-danger">
<?= gettext("Your browser must support cookies to login."); ?> <?= gettext("Your browser must support cookies to login."); ?>
</span> </span>
<?php endif; ?> <?php endif; ?>
</div> </div>
</main> </main>
<div class="login-foot text-center"> <div class="login-foot text-center">
<a target="_blank" href="<?=$g['product_website']?>" class="redlnk"><?=$g['product_name']?></a> (c) <?=$g['product_copyright_years']?> <a target="_blank" href="<?=$g['product_website']?>" class="redlnk"><?=$g['product_name']?></a> (c) <?=$g['product_copyright_years']?>
<a href="<?=$g['product_copyright_url']?>" class="tblnk"><?=$g['product_copyright_owner']?></a> <a href="<?=$g['product_copyright_url']?>" class="tblnk"><?=$g['product_copyright_owner']?></a>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
<?php } // end function <?php } // end function
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