mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-15 03:31:10 +03:00
Some fixes & add metakeys!
This commit is contained in:
parent
e683084adb
commit
262a6ef34f
8 changed files with 29 additions and 3 deletions
0
app/Controllers/AdminController.php
Normal file
0
app/Controllers/AdminController.php
Normal file
|
@ -15,6 +15,7 @@ class MainController
|
|||
public static function i()
|
||||
{
|
||||
Page::set('Main');
|
||||
|
||||
}
|
||||
|
||||
public static function logout()
|
||||
|
|
|
@ -45,7 +45,6 @@ class Router
|
|||
}
|
||||
public static function route($route, $path_to_include)
|
||||
{
|
||||
// Определение корневой директории
|
||||
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
// Обработка случая, когда маршрут - 404
|
||||
|
|
|
@ -2,6 +2,8 @@ ngallery:
|
|||
root:
|
||||
title: "NativeGallery"
|
||||
logo: "/static/img/logosmall.png"
|
||||
description: ""
|
||||
keywords: ""
|
||||
maintenance: false
|
||||
debug: true
|
||||
botkey: ''
|
||||
|
|
|
@ -68,7 +68,7 @@ if (NGALLERY['root']['title'] != null) {
|
|||
</div>
|
||||
</li>
|
||||
<?php
|
||||
if (Auth::userid() < 0) { ?>
|
||||
if (Auth::userid() <= 0) { ?>
|
||||
<li class="mm-pad-right"><a href="/login" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-address-card"></i></span><span class="mm-label">Войти</span></a></li>
|
||||
<li><a href="/register" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-user"></i></span><span class="mm-label">Регистрация</span></a></li>
|
||||
<?php } else { ?>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<?php
|
||||
use App\Services\{Router, Auth};
|
||||
if (Auth::userid() > 0) {
|
||||
Router::redirect('/');
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
|
|
|
@ -14,7 +14,12 @@ $photouser = new \App\Models\User($photo->i('user_id'));
|
|||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
|
||||
<meta name="description" content="<?=NGALLERY['root']['description']?>">
|
||||
<meta name="keywords" content="<?=NGALLERY['root']['keywords']?>">
|
||||
<meta property="og:title" content="<?=$photo->i('title')?> — Фото">
|
||||
<link rel="alternate" hreflang="x-default" href="<?=$_SERVER['REQUEST_URI']?>">
|
||||
<meta property="og:image" content="<?=$photo->i('photourl')?>">
|
||||
</head>
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<?php
|
||||
use App\Services\{Router, Auth};
|
||||
if (Auth::userid() > 0) {
|
||||
Router::redirect('/');
|
||||
}
|
||||
?>
|
||||
<html lang="ru">
|
||||
|
||||
|
||||
|
@ -14,6 +20,8 @@
|
|||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<?php
|
||||
if (NGALLERY['root']['registration']['access']['public'] === true) { ?>
|
||||
<center>
|
||||
<h1>Регистрация</h1>
|
||||
<div class="mf-center-block">
|
||||
|
@ -80,6 +88,11 @@
|
|||
});
|
||||
</script>
|
||||
</center>
|
||||
<?php } else { ?>
|
||||
<center>
|
||||
<h1>К сожалению, регистрация на сервере <?=$title?> запрещена.</h1>
|
||||
</center?
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in a new issue