mirror of
https://github.com/claradex/nativegallery.git
synced 2024-12-22 08:30:56 +03:00
register page refresh
This commit is contained in:
parent
a0cbb5b318
commit
a19d2ea775
8 changed files with 216 additions and 39 deletions
|
@ -47,6 +47,11 @@ class MainController
|
|||
{
|
||||
Page::set('Top30');
|
||||
|
||||
}
|
||||
public static function vehicle()
|
||||
{
|
||||
Page::set('Vehicle');
|
||||
|
||||
}
|
||||
public static function favauthors()
|
||||
{
|
||||
|
|
|
@ -22,6 +22,7 @@ class Routes
|
|||
Router::get('/api/photo/stats', 'ApiController@photostats');
|
||||
Router::get('/about', 'MainController@about');
|
||||
Router::get('/rules', 'MainController@rules');
|
||||
Router::get('/vehicle', 'MainController@vehicle');
|
||||
Router::get('/rules/pub', 'MainController@publicationRules');
|
||||
Router::get('/rules/photo', 'MainController@photoRules');
|
||||
Router::get('/rules/video', 'MainController@videoRules');
|
||||
|
|
BIN
static/img/logocube.png
Normal file
BIN
static/img/logocube.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 300 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 11 KiB |
|
@ -7,8 +7,10 @@ $user = new \App\Models\User(Auth::userid());
|
|||
|
||||
if (NGALLERY['root']['logo'] != null) {
|
||||
$logo = NGALLERY['root']['logo'];
|
||||
$width = '70px';
|
||||
} else {
|
||||
$logo = '/static/img/logosmall.png';
|
||||
$width = '70px';
|
||||
}
|
||||
|
||||
if (NGALLERY['root']['title'] != null && NGALLERY['root']['showtitle'] === true) {
|
||||
|
@ -119,6 +121,6 @@ if ($noncheckedimgs > 0) {
|
|||
<?php
|
||||
if (explode('/', $_SERVER['REQUEST_URI'])[1] != 'photo') { ?>
|
||||
<tr>
|
||||
<td><a href="/" id="title"><img src="<?=$logo?>" alt="<?=$title?>"><span><?=$title?></span></a></td>
|
||||
<td><a href="/" id="title"><img style="width: <?=$width?>;" src="<?=$logo?>" alt="<?=$title?>"><span><?=$title?></span></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
|
@ -16,36 +16,77 @@
|
|||
<div class="alert alert-dark" role="alert">
|
||||
Добавляйте и регулируйте поля ввода, которые будут являться шаблонной формой для создания моделей к сущности.
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" id="entityform">
|
||||
<div class="col-md-3">
|
||||
<div class="mb-3">
|
||||
<label for="exampleFormControlInput1" class="form-label">Название переменной</label>
|
||||
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="#FFFFFF">
|
||||
<input name="variablename_1" type="text" class="form-control" id="exampleFormControlInput1" placeholder="#FFFFFF">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="mb-3">
|
||||
<label for="exampleFormControlInput1" class="form-label">ID</label>
|
||||
<input type="text" class="form-control" id="exampleFormControlInput1" placeholder="#FFFFFF">
|
||||
<input name="variableid_1" type="text" class="form-control" id="exampleFormControlInput1" placeholder="blablabla">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="exampleFormControlInput1" class="form-label">Тип</label>
|
||||
<select class="form-select" aria-label="Default select example">
|
||||
<select name="variabletype_1" class="form-select" aria-label="Default select example">
|
||||
<option value="1">Строка</option>
|
||||
<option value="2">Число</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="exampleFormControlInput1" class="form-label">Обязателен?</label>
|
||||
<select class="form-select" aria-label="Default select example">
|
||||
<select name="variableimportant_1" class="form-select" aria-label="Default select example">
|
||||
<option value="1">Да</option>
|
||||
<option value="2">Нет</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-primary">Добавить ещё</button>
|
||||
<button id="addButton" type="button" class="btn btn-outline-primary">Добавить ещё</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
let count = 1; // Начальное значение для номера переменной
|
||||
|
||||
document.getElementById('addButton').addEventListener('click', function() {
|
||||
count++; // Увеличиваем номер переменной
|
||||
|
||||
// Создаем новый элемент
|
||||
const newElement =
|
||||
`<div class="col-md-3">
|
||||
<div class="mb-3">
|
||||
<label for="exampleFormControlInput${count}" class="form-label">Название переменной</label>
|
||||
<input name="variablename_${count}" type="text" class="form-control" id="exampleFormControlInput${count}" placeholder="#FFFFFF">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="mb-3">
|
||||
<label for="exampleFormControlInput${count}" class="form-label">ID</label>
|
||||
<input name="variableid_${count}" type="text" class="form-control" id="exampleFormControlInput${count}" placeholder="blablabla">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="exampleFormControlInput${count}" class="form-label">Тип</label>
|
||||
<select name="variabletype_${count}" class="form-select" aria-label="Default select example">
|
||||
<option value="1">Строка</option>
|
||||
<option value="2">Число</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<label for="exampleFormControlInput${count}" class="form-label">Обязателен?</label>
|
||||
<select name="variableimportant_${count}" class="form-select" aria-label="Default select example">
|
||||
<option value="1">Да</option>
|
||||
<option value="2">Нет</option>
|
||||
</select>
|
||||
</div>`
|
||||
;
|
||||
|
||||
// Добавляем новый элемент в #entityform
|
||||
document.getElementById('entityform').insertAdjacentHTML('beforeend', newElement);
|
||||
});
|
||||
</script>
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Services\{Router, Auth};
|
||||
|
||||
if (Auth::userid() > 0) {
|
||||
Router::redirect('/');
|
||||
}
|
||||
|
@ -8,43 +10,100 @@ if (Auth::userid() > 0) {
|
|||
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<?php
|
||||
if (NGALLERY['root']['registration']['access']['public'] === true) { ?>
|
||||
<style>
|
||||
.styled-input {
|
||||
position: relative;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.styled-input input {
|
||||
width: 100%;
|
||||
padding: 10px 10px 10px 0;
|
||||
font-size: 16px;
|
||||
border: none;
|
||||
border-bottom: 2px solid #ccc;
|
||||
background: transparent;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.styled-input input:focus {
|
||||
border-bottom: 2px solid #000;
|
||||
}
|
||||
|
||||
.styled-input label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 0;
|
||||
font-size: 16px;
|
||||
color: #999;
|
||||
pointer-events: none;
|
||||
transition: 0.2s ease all;
|
||||
}
|
||||
|
||||
.styled-input input:focus~label,
|
||||
.styled-input input:valid~label {
|
||||
top: -20px;
|
||||
font-size: 12px;
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<?php
|
||||
if (NGALLERY['root']['registration']['access']['public'] === true) { ?>
|
||||
<center>
|
||||
<h1>Регистрация</h1>
|
||||
<h1><b>Регистрация</b></h1>
|
||||
<table cellspacing="10" cellpadding="0" border="0" align="center" style="margin: 9px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/static/img/logocube.png" style="width: 32px;" align="middle">
|
||||
</td>
|
||||
<td>
|
||||
<b><?= NGALLERY['root']['title'] ?> — это универсальное средство для размещения своих фотографий и видеороликов, созданное на базе движка СТТС.</b><br>
|
||||
Публикуйте свои самые лучшие фотографии и великолепные видео на наш портал, чтобы их увидели все желающие.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mf-center-block">
|
||||
<form method="post" id="form" class="p20i mf-label mf-center-block-wide">
|
||||
<input type="hidden" name="accept" value="yes">
|
||||
|
||||
<input type="text" name="username" id="username" class="mf-input-wide" style="margin-top:10px" maxlength="50" placeholder="Ваш никнейм" value="">
|
||||
<div class="styled-input">
|
||||
<input type="text" name="username" id="username" required="">
|
||||
<label for="username">Ваш никнейм</label>
|
||||
</div>
|
||||
<div style="color:#e00" id="err_username"></div>
|
||||
<input type="email" name="email" id="email" class="mf-input-wide" style="margin-top:10px" maxlength="50" placeholder="Ваш e-mail" value="">
|
||||
<div class="styled-input">
|
||||
<input type="text" name="email" id="email" required="">
|
||||
<label for="email">Ваш e-mail</label>
|
||||
</div>
|
||||
<div style="color:#e00" id="err_email"></div>
|
||||
<input type="password" name="password" id="password" class="mf-input-wide" style="margin-top:10px" maxlength="50" placeholder="Ваш пароль" value="">
|
||||
<div class="styled-input">
|
||||
<input name="password" id="password" type="text" required="">
|
||||
<label for="password">Ваш пароль</label>
|
||||
</div>
|
||||
<div style="color:#e00" id="err_password"></div>
|
||||
|
||||
|
||||
<input type="button" id="regbtn" class="mf-button-wide" style="margin-top:15px" value="Зарегистрироваться">
|
||||
<p>Регистрируясь на сервере <?=NGALLERY['root']['title']?>, вы <a href="/rules">принимаете его правила.</a></p>
|
||||
<p>Регистрируясь на сервере <?= NGALLERY['root']['title'] ?>, вы <a href="/rules">принимаете его правила.</a></p>
|
||||
</form><br><br>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#email').on('input', function() {
|
||||
$('#err_email').html('');
|
||||
|
@ -58,11 +117,11 @@ if (Auth::userid() > 0) {
|
|||
var password = $('#password').val().trim();
|
||||
var err_password = $('#err_password').html('');
|
||||
|
||||
if (username == '') err_username.html('Поле не заполнено');
|
||||
if (password == '') err_password.html('Поле не заполнено');
|
||||
if (email == '') err_email.html('Поле не заполнено');
|
||||
if (username == '') err_username.html('<i style="color:#e00" class="bx bx-error"></i> Поле не заполнено');
|
||||
if (password == '') err_password.html('<i style="color:#e00" class="bx bx-error"></i> Поле не заполнено');
|
||||
if (email == '') err_email.html('<i style="color:#e00" class="bx bx-error"></i> Поле не заполнено');
|
||||
else
|
||||
if (!email.match(/^[0-9a-z_\-.]+@[0-9a-z_\-^.]+\.[a-z]{2,4}$/i)) err_email.html('Некорректный адрес');
|
||||
if (!email.match(/^[0-9a-z_\-.]+@[0-9a-z_\-^.]+\.[a-z]{2,4}$/i)) err_email.html('<i style="color:#e00" class="bx bx-error"></i> Некорректный адрес');
|
||||
|
||||
|
||||
if (err_email.html() == '') {
|
||||
|
@ -75,7 +134,7 @@ if (Auth::userid() > 0) {
|
|||
}, function(r) {
|
||||
r = JSON.parse(r);
|
||||
if (r.errorcode > 0) {
|
||||
$('#err_email').html(r.errortitle);
|
||||
$('#err_email').html('<i class=`bx bx-error`></i>' + r.errortitle);
|
||||
$('#regbtn').prop('disabled', false).val('Зарегистрироваться');
|
||||
} else {
|
||||
window.location.href = "/"
|
||||
|
@ -89,17 +148,17 @@ if (Auth::userid() > 0) {
|
|||
});
|
||||
</script>
|
||||
</center>
|
||||
<?php } else { ?>
|
||||
<center>
|
||||
<h1>К сожалению, регистрация на сервере <?=NGALLERY['root']['title']?> запрещена.</h1>
|
||||
<?php } else { ?>
|
||||
<center>
|
||||
<h1>К сожалению, регистрация на сервере <?= NGALLERY['root']['title'] ?> запрещена.</h1>
|
||||
</center?
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
69
views/pages/Vehicle.php
Normal file
69
views/pages/Vehicle.php
Normal file
|
@ -0,0 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<h1>Пиксельск, бутылка pepsi № 001</h1>
|
||||
|
||||
<table class="horlines">
|
||||
<col width="150">
|
||||
<col>
|
||||
<tr class="h21">
|
||||
<td class="ds nw">Город:</td>
|
||||
<td class="d"><b><a href="/city/30/">Пиксельск</a></b></td>
|
||||
</tr>
|
||||
<tr class="h21">
|
||||
<td class="ds nw">Адрес:</td>
|
||||
<td class="d"><b><a href="/list.php?did=66">ул. Пушкина дом Колотушкина</a></b></td>
|
||||
</tr>
|
||||
<tr class="h21">
|
||||
<td class="ds nw">Модель:</td>
|
||||
<td class="d"><b><a href="/model/887/">pepsi</b></td>
|
||||
</tr>
|
||||
<tr class="h21">
|
||||
<td class="ds nw">Построен:</td>
|
||||
<td class="d"><b>Завтра</b></td>
|
||||
</tr>
|
||||
|
||||
<tr class="h21">
|
||||
<td class="ds nw">Текущее состояние:</td>
|
||||
<td class="d" style="padding-left:2px">Опустошена</td>
|
||||
</tr>
|
||||
|
||||
</table><br>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="footer"><b><a href="/">Главная</a> <a href="/lk/">Личный кабинет</a> <a href="https://forum.transphoto.org">Форум</a> <a href="/rules/">Правила</a> <a href="/admin/">Редколлегия</a></b><br>
|
||||
<a href="/set.php?dark=0" style="display:inline-block; padding:1px 10px; margin-top:5px; background-color:#ddd; color:#333">Светлая тема</a>
|
||||
<div class="sitecopy">© Администрация ТрансФото и авторы материалов, 2002—2024<br>Использование фотографий и иных материалов, опубликованных на сайте, допускается только с разрешения их авторов.</div>
|
||||
<div style="margin:15px 0">
|
||||
<noindex>
|
||||
|
||||
<!-- Yandex.Metrika informer -->
|
||||
<a href="https://metrika.yandex.ru/stat/?id=73971775&from=informer" target="_blank" rel="nofollow"><img src="https://informer.yandex.ru/informer/73971775/3_0_DDDDDDFF_DDDDDDFF_0_pageviews"
|
||||
style="width:88px; height:31px; border:0;" alt="Яндекс.Метрика" title="Яндекс.Метрика: данные за сегодня (просмотры, визиты и уникальные посетители)" class="ym-advanced-informer" data-cid="73971775" data-lang="ru" /></a>
|
||||
<!-- /Yandex.Metrika informer -->
|
||||
|
||||
</noindex>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue