Added editing function for pages (using tinymce).
Added editing pages for footer, banner, aside. Added page overview. Added public page. Added settings page. Added generator for embed pseudocodes.
This commit is contained in:
@ -13,7 +13,7 @@ if (!isset($_SERVER['HTTPS']) or $_SERVER['HTTPS'] != 'on') header("Location: ..
|
||||
// Get available login information
|
||||
|
||||
$loginInformation = json_decode(file_get_contents(__DIR__ . '/../data/users.json'), True);
|
||||
define("loginLogFile", "/../data/logins.csv");
|
||||
define("loginLogFile", __DIR__ . "/../data/logins.csv");
|
||||
|
||||
/**
|
||||
* Function for printing the login page
|
||||
@ -28,11 +28,12 @@ function showLoginPasswordProtect($error_msg = "", $cssFile = "themes/default/de
|
||||
echo '<!DOCTYPE html>
|
||||
<html id="loginPage">
|
||||
<head>
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src \'none\'; script-src \'none\'; connect-src \'none\'; style-src \'self\'; font-src \'self\';" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<meta charset="UTF-8" />
|
||||
<title>Log In</title>
|
||||
<link rel="stylesheet" type="text/css" href="' . $cssFile . '">
|
||||
<link rel="stylesheet" type="text/css" href="' . $cssFile . '" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Log In</h1>';
|
||||
@ -160,6 +161,10 @@ else if (isset($_POST['username']) and isset($_POST['password'])) {
|
||||
|
||||
// Set last access time
|
||||
$_SESSION["userLastLogin"] = date("Y-m-d H:i:s");
|
||||
if ($loginInformation[$_POST['username']]['admin'] or count($loginInformation) == 1) {
|
||||
$_SESSION['admin'] = true;
|
||||
}
|
||||
else $_SESSION['admin'] = false;
|
||||
|
||||
if (isset($_SESSION['loginattempt'])) unset($_SESSION['loginattempt']);
|
||||
|
||||
|
Reference in New Issue
Block a user