mirror of
https://github.com/claradex/nativegallery.git
synced 2025-03-25 18:58:16 +03:00
delete old files
This commit is contained in:
parent
540e643e9a
commit
36093b54d2
14 changed files with 0 additions and 2792 deletions
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
use \App\Services\DB;
|
||||
|
||||
function get_current_git_commit($branch = 'main')
|
||||
{
|
||||
if ($hash = file_get_contents(sprintf($_SERVER['DOCUMENT_ROOT'] . '/.git/refs/heads/%s', $branch))) {
|
||||
return mb_strimwidth($hash, 0, 7, "");
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<td class="footer">
|
||||
<p>Aloha, Hawaii! | PHP <?=phpversion()?> | MySQL <?=DB::query('SELECT VERSION()')[0]['VERSION()']?> | Версия <?=get_current_git_commit ()?></p>
|
||||
<b><a href="/">Главная</a> <a href="/lk/">Личный кабинет</a> <a href="/rules">Правила</a> <a href="/about">О сервере</a></b><br>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
|
@ -1,123 +0,0 @@
|
|||
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
|
||||
<meta name="viewport" content="width=1000,user-scalable=yes">
|
||||
<title><?=NGALLERY['root']['title']?></title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=PT+Sans+Narrow:wght@400;700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/static/css/fontawesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/static/css/style.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/desktop.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/trans.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/photo.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/notie.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/comments.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/map.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<link rel="stylesheet" href="/static/css/jquery-ui-1.8.20.custom.css<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>">
|
||||
<script src="/static/js/jquery.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/jquery.form.min.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/core.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/index.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/jquery-ui.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/selector.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/selector2.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/imageupload.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/progress.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/notie.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/photo.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/comments.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/newcore.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/act.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/core_lk.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<script src="/static/js/tablesort.js<?php if (NGALLERY['root']['cloudflare-caching'] === true) { echo '?'.time(); } ?>"></script>
|
||||
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
|
||||
<div class="progress-container fixed-top">
|
||||
<span class="progress-bard"></span>
|
||||
</div>
|
||||
<style>
|
||||
|
||||
.progress-container {
|
||||
width: 100%;
|
||||
background:linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0.2)) var(--theme-bg-color);
|
||||
height: 5px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
:root {
|
||||
--bckgr: -1500px 0;
|
||||
--bckgr2: 1500px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
:root {
|
||||
--bckgr: -3500px 0;
|
||||
--bckgr2: 3500px 0;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes bg-move {
|
||||
0% { background-position: var(--bckgr); }
|
||||
100% { background-position: var(--bckgr2); }
|
||||
}
|
||||
@keyframes bg-move {
|
||||
0% { background-position: var(--bckgr); }
|
||||
100% { background-position: var(--bckgr2); }
|
||||
}
|
||||
|
||||
.progress-bard {
|
||||
background-color: #fff;
|
||||
width: 0%;
|
||||
display: block;
|
||||
height: inherit;
|
||||
transition: width 0.6s ease;
|
||||
background-image: linear-gradient(270deg, rgba(100, 181, 239, 0) 48.44%, var(--theme-bg-hover-color) 75.52%, rgba(100, 181, 239, 0) 100%);
|
||||
background-repeat: no-repeat;
|
||||
animation: bg-move linear 2s infinite;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
notie.setOptions({
|
||||
transitionCurve: 'cubic-bezier(0.2, 0, 0.2, 1)'
|
||||
});
|
||||
var Notify = {
|
||||
noty: function(status, text) {
|
||||
|
||||
if (status == 'danger') status = 'error';
|
||||
|
||||
return notie.alert({ type: status, text: text })
|
||||
|
||||
},
|
||||
}
|
||||
function scrollProgressBarWidth(number) {
|
||||
var getMax = function() {
|
||||
return $(document).height() - $(window).height();
|
||||
};
|
||||
var progressBar = $(".progress-bard"),
|
||||
max = getMax(),
|
||||
value,
|
||||
width;
|
||||
|
||||
var setWidth = function() {
|
||||
progressBar.css({
|
||||
width: number + '%'
|
||||
});
|
||||
};
|
||||
|
||||
setWidth();
|
||||
}
|
||||
|
||||
function escapeHtml(text) {
|
||||
var map = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
|
||||
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
||||
}
|
||||
</script>
|
|
@ -1,134 +0,0 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB};
|
||||
use \App\Models\User;
|
||||
|
||||
$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) {
|
||||
$title = NGALLERY['root']['title'];
|
||||
} else if (NGALLERY['root']['showtitle'] === false) {
|
||||
$title = '';
|
||||
} else {
|
||||
$title = 'NativeGallery';
|
||||
}
|
||||
|
||||
$noncheckedimgs = DB::query('SELECT COUNT(*) FROM followers_notifications WHERE checked=0 AND follower_id=:id', array(':id'=>Auth::userid()))[0]['COUNT(*)'];
|
||||
if ($noncheckedimgs > 0) {
|
||||
$nonrw = '<span class="mm-notify notify-count">'.$noncheckedimgs.'</span>';
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<?php
|
||||
if (NGALLERY['root']['registration']['emailverify'] === true && $user->i('status') === 3) { ?>
|
||||
<div class="label-orange" style="padding:10px; margin:0 -20px; color:#fff">
|
||||
<center><h4 style="color:#fff; margin-bottom:3px">Пожалуйста, подтвердите свою почту</h4>
|
||||
<div>Так мы сможем убедиться, что Вы настоящий человек. После подтверждения, Вам будет доступен полностью функционал сайта.<br><br><b>Письмо с ссылкой для подтверждения почты была отправлена на Ваш ящик, указанный при регистрации.</b></div></center></div>
|
||||
<?php } ?>
|
||||
<td class="mm-bar">
|
||||
<?php
|
||||
if (explode('/', $_SERVER['REQUEST_URI'])[1] === 'photo') { ?>
|
||||
<a id="title-small" href="/"><img src="<?=$logo?>"><?=$title?></a>
|
||||
<?php } ?>
|
||||
<ul class="mm mm-level-1">
|
||||
<li><a href="#" onclick="return false" class="mm-item"><span class="mm-label">Дополнительно</span></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/news.php" class="mm-item"><span class="mm-label">Новости и хронология</span></a></li>
|
||||
<li><a href="/misc/" class="mm-item"><span class="mm-label">Разные фотогалереи</span></a></li>
|
||||
<li><a href="/voting.php" class="mm-item"><span class="mm-label">Фотоконкурс</span></a></li>
|
||||
<li><a href="/news2.php" class="mm-item"><span class="mm-label">Новости сайта</span></a></li>
|
||||
<li><a href="/links.php" class="mm-item"><span class="mm-label">Ссылки</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li><a href="/comments" class="mm-item"><span class="mm-label">Комментарии</span></a></li>
|
||||
<li><a href="#" onclick="return false" class="mm-item"><span class="mm-label">Обновления</span><?=$nonrw?></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/update.php?time=24" class="mm-item"><span class="mm-label">Новые фотографии</span></a></li>
|
||||
<li><a href="/feed" class="mm-item"><span class="mm-label">Лента обновлений</span></a></li>
|
||||
<li><a href="/fav_authors" class="mm-item"><span class="mm-label">Фотографии избранных авторов</span><?=$nonrw?></a></li>
|
||||
<li><a href="/update.php" class="mm-item"><span class="mm-label">Архив обновлений по датам</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li><a href="/help/" class="mm-item"><span class="mm-label">Помощь</span></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/rules/" class="mm-item"><span class="mm-label">Правила сайта</span></a></li>
|
||||
<li><a href="/rules/pub/" class="mm-item"><span class="mm-label">Критерии отбора фотографий</span></a></li>
|
||||
<li><a href="/rules/photo/" class="mm-item"><span class="mm-label">Правила подписи фотографий</span></a></li>
|
||||
<li><a href="/rules/video/" class="mm-item"><span class="mm-label">Правила видеокаталога</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li><a href="/search.php" class="mm-item"><span class="mm-label">Поиск</span></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/search.php" class="mm-item"><span class="mm-label">Поиск фотографий</span></a></li>
|
||||
<li><a href="/vsearch.php" class="mm-item"><span class="mm-label">Поиск ТС</span></a></li>
|
||||
<li><a href="/csearch.php" class="mm-item"><span class="mm-label">Поиск комментариев</span></a></li>
|
||||
<li><a href="/authors.php" class="mm-item"><span class="mm-label">Поиск авторов</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
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 { ?>
|
||||
<?php
|
||||
if ($user->i('admin') > 0) {
|
||||
$nonreviewedimgs = DB::query('SELECT COUNT(*) FROM photos WHERE moderated=0')[0]['COUNT(*)'];
|
||||
if ($nonreviewedimgs > 0) {
|
||||
$nonr = '<span class="mm-notify notify-count">'.$nonreviewedimgs.'</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<li class="mm-pad-right mm-wide"><a href="/author/<?=Auth::userid()?>/" class="mm-item"><span class="mm-icon"><i class="fas fa-xs fa-user"></i></span><span class="mm-label"><?=$user->i('username')?></span><?=$nonr?></a>
|
||||
<div>
|
||||
<ul class="mm-level-2">
|
||||
<li><a href="/lk/" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-info-circle"></i></span><span class="mm-label">Общая информация</span></a></li>
|
||||
<?php
|
||||
if ($user->i('admin') > 0) {
|
||||
|
||||
?>
|
||||
|
||||
<li><a href="/admin" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-info-circle"></i></span><span class="mm-label">Admin</span><?=$nonr?></a></li>
|
||||
<?php }
|
||||
if (NGALLERY['root']['registration']['emailverify'] != true || $user->i('status') != 3) { ?>
|
||||
<li><a href="/lk/upload" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-plus-square"></i></span><span class="mm-label"><b>Предложить медиа</b></span></a></li>
|
||||
<?php } ?>
|
||||
<li><a href="/lk/history" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-images"></i></span><span class="mm-label">Журнал</span></a></li>
|
||||
<li><a href="/lk/konkurs.php" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-compass"></i></span><span class="mm-label">Конкурс</span></a></li>
|
||||
<li><a href="/vehicle/edit" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-folder-plus"></i></span><span class="mm-label"><b>Правка БД</b></span></a></li>
|
||||
<li><a href="/lk/ticket.php" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-question-circle"></i></span><span class="mm-label">Мои заявки</span></a></li>
|
||||
<li><a href="/lk/profile" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-cog"></i></span><span class="mm-label">Настройки профиля</span></a></li>
|
||||
<li><a href="/search?id=<?=Auth::userid()?>" class="mm-item"><span class="mm-icon"><i class="far fa-sm fa-fw fa-images"></i></span><span class="mm-label">Мои фотографии</span></a></li>
|
||||
<li><a href="/fav" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-star"></i></span><span class="mm-label">Избранные снимки</span></a></li>
|
||||
<li><a href="/logout" class="mm-item"><span class="mm-icon"><i class="fas fa-sm fa-fw fa-sign-out-alt"></i></span><span class="mm-label">Выход</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if (explode('/', $_SERVER['REQUEST_URI'])[1] != 'photo') { ?>
|
||||
<tr>
|
||||
<td><a href="/" id="title"><img style="width: <?=$width?>;" src="<?=$logo?>" alt="<?=$title?>"><span><?=$title?></span></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
use App\Core\Page;
|
||||
?>
|
||||
|
||||
<!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></audio></button></canvas></datalist></details></dialog></iframe></listing></meter></noembed></noframes></noscript></optgroup></option></progress></rp></select></table></template></title></video>
|
||||
<meta charset="utf-8">
|
||||
<meta name=robots content=noindex>
|
||||
<title>Server Error</title>
|
||||
|
||||
<style>
|
||||
@import url("https://rsms.me/inter/inter.css");
|
||||
body {
|
||||
font-family: Inter !important;
|
||||
}
|
||||
#tracy-error { all: initial; position: absolute; top: 0; left: 0; right: 0; height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; z-index: 1000 }
|
||||
#tracy-error div { all: initial; max-width: 550px; background: white; color: #333; display: block }
|
||||
#tracy-error h1 { all: initial; font-family: Inter !important; font-size: 50px; font-weight: 700; display: block; margin: 40px }
|
||||
#tracy-error p { all: initial; font-family: Inter !important; margin: 40px; display: block }
|
||||
#tracy-error pre { all: initial; font-family: Inter !important; margin: 40px; display: block }
|
||||
#tracy-error small { color: gray }
|
||||
#tracy-error small span { color: silver }
|
||||
</style>
|
||||
|
||||
<div id=tracy-error>
|
||||
<div>
|
||||
<h1>Not Found</h1>
|
||||
|
||||
<p>The requested page not found on server.</p><br>
|
||||
<pre><?php echo $_SERVER['REQUEST_URI']; http_response_code(404)?></pre>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
|
@ -1,112 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Birux</title>
|
||||
<link href='https://cdn.jsdelivr.net/npm/boxicons@2.0.5/css/boxicons.min.css' rel='stylesheet'>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.1/dist/umd/popper.min.js" integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG" crossorigin="anonymous"></script>
|
||||
<script src="https://birux.loc/app/Static/js/j.js" integrity="sha384-SR1sx49pcuLnqZUnnPwx6FCym0wLsk5JZuNx2bPPENzswTNFaQU1RDvt3wT4gWFG" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.min.js" integrity="sha384-j0CNLUeiqtyaRmlzUHCPZ+Gy5fQu0dQ6eZ/xAww941Ai1SxSY+0EQqNXNE6DZiVc" crossorigin="anonymous"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
|
||||
</head>
|
||||
<style>
|
||||
@import url("/fonts/sf/stylesheet.css");
|
||||
.content__away {
|
||||
background-color: rgb(236, 237, 248);
|
||||
height: 350px;
|
||||
border: none;
|
||||
border-radius: 15px;
|
||||
}
|
||||
body {
|
||||
font-family: SF UI Text !important;
|
||||
}
|
||||
|
||||
a,
|
||||
span,
|
||||
p,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
color: #67a4ff;
|
||||
}
|
||||
|
||||
b {
|
||||
color: #3887ff;
|
||||
}
|
||||
|
||||
:root {
|
||||
--color-active: rgb(175, 223, 255);
|
||||
--first-color: #d7d8e0;
|
||||
--second-color: rgb(97, 124, 213);
|
||||
--mb-1: 0.5rem;
|
||||
--mb-2: 1rem;
|
||||
--mb-3: 1.5rem;
|
||||
--mb-4: 2rem;
|
||||
--mb-5: 2.5rem;
|
||||
--mb-6: 3rem;
|
||||
--z-back: -10;
|
||||
--z-normal: 1;
|
||||
--z-tooltip: 10;
|
||||
--z-fixed: 100;
|
||||
--body-font: 'SF UI Text';
|
||||
--big-font-size: 2rem;
|
||||
--h2-font-size: 1.25rem;
|
||||
--normal-font-size: 0.938rem;
|
||||
--header-height: 3rem;
|
||||
--font-semi: 600;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
:root {
|
||||
--big-font-size: 3.5rem;
|
||||
--h2-font-size: 2rem;
|
||||
--normal-font-size: 1rem;
|
||||
}
|
||||
}
|
||||
.btn-friendly {
|
||||
background-color: #d3b81d !important;
|
||||
color: aliceblue !important;
|
||||
}
|
||||
.btn-friendly:hover {
|
||||
background-color: #b19600 !important;
|
||||
color: aliceblue !important;
|
||||
}
|
||||
.btn-friendly:focus {
|
||||
background-color: #d3b81d !important;
|
||||
color: aliceblue !important;
|
||||
}
|
||||
.btnl-1 {
|
||||
border: none !important;
|
||||
border-radius: 15px 15px 0 0 !important;
|
||||
}
|
||||
.btnl-2 {
|
||||
border: none !important;
|
||||
border-radius: 0 0 15px 15px !important;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<br><br><br>
|
||||
<main class="flex-shrink-0">
|
||||
<div class="container">
|
||||
<div class="content__away">
|
||||
<div class="modal-body p-5">
|
||||
<h2 class="mt-3"><b>Whoops!</b></h2>
|
||||
<pre>Configuration files not exists!
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
use App\Services\{Router, Auth, DB, Date};
|
||||
?>
|
||||
<html lang="ru">
|
||||
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<html>
|
||||
<body style="background-color:black">
|
||||
|
||||
<table style="width:100%; height:100%">
|
||||
<tr><td style="color:#fff; text-align:center; font-size:19pt; font-family:arial,helvetica,verdana,sans-serif;"><img src="/static/img/hum.jpg"><br><br>Сервер <?=NGALLERY['root']['title']?> временно отключен в связи с техническими работами.</td></tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
<?php
|
||||
use App\Services\{Router, Auth};
|
||||
if (Auth::userid() > 0) {
|
||||
Router::redirect('/');
|
||||
}
|
||||
?>
|
||||
<!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'); ?>
|
||||
<div id="backgr"></div>
|
||||
|
||||
<tr>
|
||||
<td class="main">
|
||||
<center>
|
||||
<h1>Вход на сайт</h1>
|
||||
<div class="mf-center-block mf-label">
|
||||
|
||||
<form id="form" method="post" class="p20i mf-center-block-wide mf-label">
|
||||
<input type="hidden" name="ref" value="/">
|
||||
|
||||
<input type="text" name="username" id="username" class="mf-input-wide" placeholder="Имя или e-mail" value="">
|
||||
<div style="color:#e00" id="err_username"></div>
|
||||
|
||||
<input type="password" name="password" id="password" class="mf-input-wide" placeholder="Пароль">
|
||||
<div style="color:#e00" id="err_password"></div>
|
||||
|
||||
|
||||
<input type="button" id="loginbtn" class="mf-button-wide" value="Войти">
|
||||
|
||||
</form>
|
||||
|
||||
<div style="margin-top:15px"><a href="/register" class="mf-button">Регистрация</a></div>
|
||||
</div><br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#username').on('input', function() {
|
||||
$('#err_password, #err_username').html('');
|
||||
});
|
||||
$('#password').on('input', function() {
|
||||
$('#err_password').html('');
|
||||
});
|
||||
|
||||
$('#loginbtn').on('click', function() {
|
||||
var username = $('#username').val().trim();
|
||||
var password = $('#password').val().trim();
|
||||
|
||||
var err_username = $('#err_username').html('');
|
||||
var err_password = $('#err_password').html('');
|
||||
|
||||
if (username == '') err_username.html('Поле не заполнено');
|
||||
if (password == '') err_password.html('Поле не заполнено');
|
||||
|
||||
if (err_username.html() + err_password.html() == '') {
|
||||
$('#loginbtn').prop('disabled', true).val('Отправка данных...');
|
||||
|
||||
$.post('/api/login', {
|
||||
username: username,
|
||||
password: password,
|
||||
remember: $('#remember').is('checked')
|
||||
}, function(r) {
|
||||
r = JSON.parse(r);
|
||||
if (r.errorcode == 1) {
|
||||
err_password.html('Неверно указаны логин и/или пароль');
|
||||
$('#loginbtn').prop('disabled', false).val('Войти');
|
||||
} else window.location.href = '/';
|
||||
})
|
||||
.fail(function(jx) {
|
||||
if (jx.responseText != '') alert(jx.responseText);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,264 +0,0 @@
|
|||
<?php
|
||||
|
||||
use App\Services\{DB, Auth, Date, Json};
|
||||
use App\Models\{User, Vote, Comment};
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
|
||||
<head>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<style>
|
||||
.ix-country {
|
||||
padding-top: 3px;
|
||||
white-space: nowrap;
|
||||
font-family: var(--narrow-font);
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.ix-country>a>b {
|
||||
border-bottom: dotted 1px;
|
||||
}
|
||||
|
||||
.ix-cities {
|
||||
padding: 5px 0 15px 15px;
|
||||
}
|
||||
|
||||
.ix-arrow {
|
||||
display: inline-block;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background: url("/img/arrow_blue.png") no-repeat;
|
||||
transition: transform .1s ease-out;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.ix-arrow.ix-arrow-expanded {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<div id="backgr"></div>
|
||||
<table class="tmain">
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<table id="idx-main">
|
||||
<tr>
|
||||
|
||||
<td style="vertical-align:top; padding-right:20px">
|
||||
|
||||
<h4><a href="/top30">Самые популярные за 24 часа</a></h4>
|
||||
<div>
|
||||
<?php
|
||||
$photos = DB::query('SELECT photo_id, COUNT(*) as view_count
|
||||
FROM photos_views
|
||||
WHERE time >= UNIX_TIMESTAMP(NOW()) - 86400
|
||||
GROUP BY photo_id
|
||||
ORDER BY view_count DESC
|
||||
LIMIT 10;');
|
||||
foreach ($photos as $pd) {
|
||||
$photo = DB::query('SELECT * FROM photos WHERE id=:id', array(':id' => $pd['photo_id']));
|
||||
foreach ($photo as $p) {
|
||||
$author = new User($p['user_id']);
|
||||
echo '<a href="/photo/' . $p['id'] . '" target="_blank" class="prw pop-prw">
|
||||
<img width="250" src="/api/photo/compress?url=' . $p['photourl'] . '">
|
||||
<div class="hpshade">
|
||||
<div class="eye-icon">+' . $pd['view_count'] . '</div>
|
||||
</div>';
|
||||
if ((int)$p['priority'] === 1) {
|
||||
echo '<div class="temp" style="background-image:url(/static/img/cond.png)"></div>';
|
||||
}
|
||||
echo '
|
||||
</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="text-align:center; margin-bottom:20px">
|
||||
<div style="width: 250px;"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
<td style="vertical-align:top; width:70%; padding-top:4px">
|
||||
|
||||
|
||||
<h4><a href="/photo/" target="_blank">Случайные фотографии</a></h4>
|
||||
<div id="random-photos" class="ix-photos ix-photos-oneline">
|
||||
<?php
|
||||
$photos = DB::query('SELECT * FROM photos WHERE moderated=1 ORDER BY RAND() DESC LIMIT 7');
|
||||
foreach ($photos as $p) {
|
||||
if ($p['posted_at'] === 943909200 || Date::zmdate($p['posted_at']) === '30 ноября 1999 в 00:00') {
|
||||
$date = 'дата не указана';
|
||||
} else {
|
||||
$date = Date::zmdate($p['posted_at']);
|
||||
}
|
||||
$bck = 'background-image:url("/api/photo/compress?url=' . $p['photourl'] . '")';
|
||||
echo ' <div class="prw-grid-item">
|
||||
<div class="prw-wrapper"><span style="word-spacing:-1px"><b>' . htmlspecialchars($p['place']) . '</b></span>
|
||||
<div>' . $date . '</div>
|
||||
</div>
|
||||
'; ?>
|
||||
<a href="/photo/<?= $p['id'] ?>" target="_blank" class="prw-animate" style='background-image:url("/api/photo/compress?url=<?= $p['photourl'] ?>")'></a>
|
||||
<?php echo '
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<style>
|
||||
#contestNotify {
|
||||
background-size: 550px 211.2px;
|
||||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 550 211.2" width="550" height="211.2" style="opacity: 0.3; filter: grayscale(0);"><text x="0em" y="1em" font-size="88" transform="rotate(17 55 52.8)">🎁</text><text x="1.25em" y="2em" font-size="88" transform="rotate(17 165 140.8)">🎈</text><text x="2.5em" y="1em" font-size="88" transform="rotate(17 275 52.8)">🎀</text><text x="3.75em" y="2em" font-size="88" transform="rotate(17 385 140.8)">🎊</text><text x="5em" y="1em" font-size="88" transform="rotate(17 495 52.8)">🎉</text></svg>');
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
if (DB::query('SELECT status FROM contests WHERE status=2')[0]['status'] === 2) {
|
||||
$contest = DB::query('SELECT * FROM contests WHERE status=2')[0];
|
||||
$theme = DB::query('SELECT * FROM contests_themes WHERE id=:id', array(':id' => $contest['themeid']))[0];
|
||||
echo ' <div id="contestNotify" style="float:left; border:solid 1px #171022; padding:6px 10px 7px; margin-bottom:13px; background-color:#E5D6FF"><h4>Фотоконкурс!</h4>
|
||||
<span id="timett">Закончится через:</span> <b id="countdown"></b><br>
|
||||
Тематика: <b>' . $theme['title'] . '</b><br>
|
||||
<b style="color: #412378;">Голосуйте за лучшие фотографии, которые должны стать победителями сегодняшнего конкурса!</b><br><br>
|
||||
<div id="contestBtns"><a href="/voting" style="background-color: #37009D; color: #fff;" type="button">Голосовать!</a></div>
|
||||
<script>startCountdown(' . $contest['closedate'] . ');</script>';
|
||||
} else if (DB::query('SELECT status FROM contests WHERE status=1')[0]['status'] === 1) {
|
||||
$contest = DB::query('SELECT * FROM contests WHERE status=1')[0];
|
||||
$theme = DB::query('SELECT * FROM contests_themes WHERE id=:id', array(':id' => $contest['themeid']))[0];
|
||||
echo ' <div id="contestNotify" style="float:left; border:solid 1px #171022; padding:6px 10px 7px; margin-bottom:13px; background-color:#E5D6FF"><h4>Фотоконкурс!</h4>
|
||||
<span id="timett">Начнётся через:</span> <b id="countdown"></b><br>
|
||||
Тематика: <b>' . $theme['title'] . '</b><br>
|
||||
<b id="textContest" style="color: #412378;">Лучшие фотографии по мнению сообщества ' . NGALLERY['root']['title'] . ' будут отмечены</b><br><br>
|
||||
<div id="contestBtns"><a href="/voting/sendpretend" style="background-color: #37009D; color: #fff;" type="button">Участвовать!</a> <a href="/voting/waiting" style="background-color: #37009D; color: #fff;" type="button">Голосовать за претендентов</a></div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
let unixThreshold = '.$contest['closepretendsdate'].'; // Задайте нужное значение UNIX
|
||||
let checkInterval = 1000; // Интервал проверки в миллисекундах (1 секунда)
|
||||
let isRequestSent = false;
|
||||
|
||||
function checkUnixTime() {
|
||||
let currentUnixTime = Math.floor(Date.now() / 1000);
|
||||
|
||||
if (currentUnixTime > unixThreshold) {
|
||||
$("#countdown").text("Ожидаем ответ от сервера...");
|
||||
|
||||
$.ajax({
|
||||
url: "/api/contests/getinfo", // Укажите свой URL
|
||||
method: "GET",
|
||||
success: function (response) {
|
||||
|
||||
let data = typeof response === "string" ? JSON.parse(response) : response;
|
||||
if (data.statuses.pretends === "closed" && data.statuses.public === "opened") {
|
||||
clearInterval(pingInterval); // Останавливаем старый пинг
|
||||
$("#textContest").text("Голосуйте за лучшие фотографии, которые должны стать победителями сегодняшнего конкурса!");
|
||||
$("#timett").text("Закончится через:");
|
||||
$("#contestBtns").html(`<a href="/voting" style="background-color: #37009D; color: #fff;" type="button">Голосовать!</a>`)
|
||||
unixThreshold = data.contest.closedate;
|
||||
startCountdown(data.contest.closedate);
|
||||
pingInterval = setInterval(checkUnixTime, checkInterval);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error("Ошибка запроса:", error);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log(currentUnixTime);
|
||||
}
|
||||
}
|
||||
|
||||
// Запускаем периодический пинг
|
||||
let pingInterval = setInterval(checkUnixTime, checkInterval);
|
||||
});
|
||||
|
||||
|
||||
</script>';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<h4 style="clear:both"><a href="/update">Недавно добавленные фотографии</a></h4>
|
||||
<?php
|
||||
$photos = DB::query('SELECT * FROM photos WHERE moderated=1 ORDER BY id DESC LIMIT 30');
|
||||
|
||||
$first_id = $photos[0]['id'];
|
||||
$last_id = end($photos)['id'];
|
||||
?>
|
||||
<div id="recent-photos" class="ix-photos ix-photos-multiline" lastpid="<?= $first_id + 1 ?>" firstpid="<?= $last_id ?>">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:center; margin:10px 0"><input type="button" name="button" id="loadmore" class="" value="Загрузить ещё"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Сейчас на сайте (<?= DB::query('SELECT COUNT(*) FROM users WHERE online>=:time-300 ORDER BY online DESC', array(':time' => time()))[0]['COUNT(*)'] ?>)</h4>
|
||||
<div>
|
||||
<?php
|
||||
$online = DB::query('SELECT * FROM users WHERE online>=:time-300 ORDER BY online DESC', array(':time' => time()));
|
||||
foreach ($online as $o) {
|
||||
echo '<a href="/author/' . $o['id'] . '/">' . htmlspecialchars($o['username']) . '</a>, ';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-left:20px; width:254px; vertical-align:top">
|
||||
|
||||
<h4>Новости сайта</h4>
|
||||
<div class="sm" style="margin-bottom:15px; line-height:13px; white-space:normal">
|
||||
<?php
|
||||
$news = DB::query('SELECT * FROM news ORDER BY id DESC LIMIT 10');
|
||||
foreach ($news as $n) {
|
||||
echo '<div class="ix-news-item"><b>' . Date::zmdate($n['time']) . '</b>
|
||||
<div class="break-links" style="padding-top:3px">' . $n['body'] . '</div>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,87 +0,0 @@
|
|||
<?php
|
||||
use \App\Services\DB;
|
||||
$photo = new \App\Models\Photo($_GET['id']);
|
||||
?>
|
||||
<!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'); ?>
|
||||
<?php
|
||||
if ($photo->i('moderated') === 1) { ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<center>
|
||||
<h1>Информация об изображении</h1>
|
||||
<div style="display:inline-block"><a href="/photo/<?=$_GET['id']?>/"><img src="/api/photo/compress?url=<?= $photo->i('photourl') ?>" width="250" alt="347 КБ" class="f"></a></div>
|
||||
<br /><br />
|
||||
|
||||
<table class="p20">
|
||||
<tr class="s1 h21">
|
||||
<td class="ds">Идентификатор изображения:</td>
|
||||
<td class="ds"><b><?=$photo->i('id')?></b></td>
|
||||
</tr>
|
||||
|
||||
<tr class="s1 h21">
|
||||
<td class="ds">Автор:</td>
|
||||
<td class="ds"><b><?=(new \App\Models\User($photo->i('user_id')))->i('username')?></b></td>
|
||||
</tr>
|
||||
<tr class="s11 h21">
|
||||
<td class="ds">Опубликовано:</td>
|
||||
<td class="ds"><b><?=gmdate("d.m.Y H:i:s", $photo->i('timeupload'));?></b></td>
|
||||
</tr>
|
||||
<tr class="s1 h21">
|
||||
<td class="ds">Находится на сайте, дней:</td>
|
||||
<td class="ds"><b><?=floor((time() - $photo->i('timeupload')) / 86400)?></b></td>
|
||||
</tr>
|
||||
<tr class="s11 h21">
|
||||
<td class="ds">Уникальных просмотров:</td>
|
||||
<td class="ds"><b><?=DB::query('SELECT COUNT(*) FROM photos_views WHERE photo_id=:id', array(':id'=>$_GET['id']))[0]['COUNT(*)']?></b></td>
|
||||
</tr>
|
||||
<tr class="s1 h21">
|
||||
<td class="ds">Комментариев:</td>
|
||||
<td class="ds"><b><?=DB::query('SELECT COUNT(*) FROM photos_comments WHERE photo_id=:id', array(':id'=>$_GET['id']))[0]['COUNT(*)']?></b></td>
|
||||
</tr>
|
||||
</table><br />
|
||||
|
||||
|
||||
|
||||
<h4>Динамика просмотров по датам</h4>
|
||||
|
||||
<div class="p20w" style="padding:5px">
|
||||
<img width="500" src="/api/photo/stats?id=<?=$_GET['id']?>">
|
||||
</div><br />
|
||||
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } else { ?>
|
||||
<tr>
|
||||
<td class="main">
|
||||
<center>
|
||||
<h1>Изображение не найдено</h1>
|
||||
<div class="p20w" style="margin-bottom:20px; padding:10px 30px">
|
||||
<img src="/static/img/pnp.jpg" alt="Пусто" width="400" height="205" border="0">
|
||||
<p>Изображения с таким номером нет на сайте.<br />Может быть, его здесь никогда и не было.<br />Если Вы уверены, что что-то здесь всё-таки было, значит, администратор по каким-то причинам это удалил.</p>
|
||||
</div>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,291 +0,0 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\{User, UserCTTC};
|
||||
|
||||
|
||||
|
||||
$userprofile = new User(explode('/', $_SERVER['REQUEST_URI'])[2]);
|
||||
$usercttc = False;
|
||||
$city = htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutlive']['value']);
|
||||
$photourl = $userprofile->i('photourl');
|
||||
$regdate = Date::zmdate($userprofile->content('regdate'));
|
||||
$about = json_decode($userprofile->i('content'), true)['aboutmemo']['value'];
|
||||
$birthdate = json_decode($userprofile->i('content'), true)['aboutbirthday']['value'];
|
||||
|
||||
?>
|
||||
<!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">
|
||||
|
||||
<?php
|
||||
|
||||
if (((int)$userprofile->i('id') === (int)explode('/', $_SERVER['REQUEST_URI'])[2]) || $usercttc === True) { ?>
|
||||
<h1><?= htmlspecialchars($userprofile->i('username')) ?><?php if ($userprofile->i('admin') === 1) { echo '<img width="32" src="/static/img/star.png">'; } ?></h1>
|
||||
|
||||
<?php
|
||||
if ($usercttc === True) {
|
||||
echo '<div style="float:left; border:solid 1px #3b7dc1; padding:6px 10px 7px; margin-bottom:13px; background-color:#0199ff44"><b>Профиль на transphoto.org</b><br>Пользователь не зарегистрирован на сервере '.NGALLERY['root']['title'].'. Информация может быть неполной.<br><a href="https://transphoto.org/author/'.(int)explode('/', explode('@', $_SERVER['REQUEST_URI'])[0])[2].'" target="_blank">Открыть на transphoto.org</a></div>';
|
||||
}
|
||||
if ($userprofile->i('admin') === 1) {
|
||||
echo 'Администратор сервера';
|
||||
} else if ($userprofile->i('admin') === 2) {
|
||||
echo 'Фотомодератор';
|
||||
}
|
||||
|
||||
if ($userprofile->i('id') === Auth::userid()) { ?>
|
||||
<p><b><a href="/lk/profile">Редактировать мой профиль</a></b></p>
|
||||
<?php } ?>
|
||||
<div class="p20" style="padding-right:12px; background-color: white !important;">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<?php if ($userprofile->content('badge') !== null) { ?>
|
||||
<div style="float:left; border:solid 1px #3b7dc1; padding:6px 10px 7px; margin-bottom:13px; background-color:#0199ff44"><b><?=nl2br($userprofile->content('badge'))?></div><br>
|
||||
<?php } ?>
|
||||
<td style="vertical-align:top; width:100%" valign="top" width="100%">
|
||||
<table style="margin-bottom: 15px;">
|
||||
<colgroup><col width="170px">
|
||||
</colgroup>
|
||||
<col width="170px">
|
||||
|
||||
<?php
|
||||
if ($city != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Откуда:</td>
|
||||
<td><?= $city ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ($birthdate != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">День рождения:</td>
|
||||
<td><?= $birthdate ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</col></table>
|
||||
<table style="margin-bottom: 15px;">
|
||||
<colgroup><col width="170px">
|
||||
</colgroup>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutlangs']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Владение языками:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutlangs']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['abouttelegram']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Telegram:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['abouttelegram']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutvk']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">ВКонтакте:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutvk']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['abouttwitter']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Twitter/X:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['abouttwitter']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutyoutube']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">YouTube:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutyoutube']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutemail']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Почта:</td>
|
||||
<td><a href="emailto:<?=htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutemail']['value'])?>"><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutemail']['value']) ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutinstagram']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Instagram:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutinstagram']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['abouttransphoto']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">TransPhoto:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['abouttransphoto']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutwebsite']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Личный сайт:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutwebsite']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<table style="margin-bottom: 15px;">
|
||||
<colgroup><col width="170px">
|
||||
</colgroup>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutfavs_trains']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Любимые модели поездов:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutfavs_trains']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutfavs_countries']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Любимые страны:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutfavs_countries']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (json_decode($userprofile->i('content'), true)['aboutfavs_cities']['value'] != null) { ?>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Любимые города:</td>
|
||||
<td><?= htmlspecialchars(json_decode($userprofile->i('content'), true)['aboutfavs_cities']['value']) ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<table>
|
||||
<colgroup><col width="170px">
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Дата регистрации:</td>
|
||||
<td><span class="sm"><?=$regdate?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sm" style="padding:3px 10px 3px 0">Был на сайте:</td>
|
||||
<td><span class="sm"><?= Date::zmdate($userprofile->i('online')) ?> <?php if (time() - 300 <= $userprofile->i('online')) { ?>(<b>online</b>)<?php } ?></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
<div class="sm" style="float:right"><a href="/lk/ticket.php?action=add&aid=140"></a></div>
|
||||
</td>
|
||||
|
||||
<td valign="top" align="right">
|
||||
<script>
|
||||
function getBodyScrollTop() {
|
||||
return self.pageYOffset || (document.documentElement && document.documentElement.scrollTop) || (document.body && document.body.scrollTop);
|
||||
}
|
||||
|
||||
function showUserPhoto() {
|
||||
_getID('userphoto_big_img').src = '<?= $userprofile->i('photourl') ?>';
|
||||
_getID('userphoto_big_div').style.top = '' + (getBodyScrollTop() + 10) + 'px';
|
||||
_getID('userphoto_big_div').style.display = 'block';
|
||||
}
|
||||
|
||||
function hideUserPhoto() {
|
||||
_getID('userphoto_big_div').style.display = 'none';
|
||||
}
|
||||
|
||||
document.onclick = function(e) {
|
||||
e = e || window.event;
|
||||
E = e.target || e.srcElement;
|
||||
if (E.id != 'userphoto_big_div' && E.id != 'userphoto_img') {
|
||||
_getID('userphoto_big_div').style.display = 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="userphoto_big_div" style="position:absolute; display:none; border:1px solid gray; padding:10px; background-color:white; margin:auto; text-align:center; right:100px; z-index:3000" class="p5 shadow"><a href="#" onclick="hideUserPhoto(); return false"><img src="" id="userphoto_big_img" border="0" style="vertical-align:middle"></a>
|
||||
<div style="margin-top:8px"><a class="dot" href="#" onclick="hideUserPhoto(); return false">закрыть</a></div>
|
||||
</div>
|
||||
|
||||
<a href="<?=$photourl?>" onclick="showUserPhoto(); return false;"><img onerror="this.src = '/static/img/avatar.png'; this.onerror = null;" src="<?= $photourl ?>" alt="" id="userphoto_img" class="f" style="width:auto; max-width:100px"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
if (($about != null) && $usercttc === False) { ?>
|
||||
<div class="p20" style="margin-top: 8px; background-color: white !important;">
|
||||
<h4>О себе</h4>
|
||||
<?=
|
||||
htmlspecialchars($about)
|
||||
?>
|
||||
</div>
|
||||
<?php } else if ($usercttc === True) {
|
||||
echo $about;
|
||||
} ?>
|
||||
|
||||
|
||||
<div style="margin-top: 25px;"><b><a href="/search?id=<?=$userprofile->i('id')?>">Найти все фотографии, сделанные этим пользователем</a></b></div>
|
||||
|
||||
<?php
|
||||
if ($userprofile->i('id') != Auth::userid()) { ?>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('.toggle, .toggle-label').on('click', function()
|
||||
{
|
||||
var toggle = $('.toggle').toggleClass('on');
|
||||
|
||||
var subscr_cnt = $('#subscr_cnt');
|
||||
var cnt = parseInt(subscr_cnt.text());
|
||||
subscr_cnt.html(toggle.is('.on') ? cnt+1 : cnt-1);
|
||||
|
||||
$.get('/api/subscribe', { action: 'subscribe', id: <?=$userprofile->i('id')?>, subj: 'a' }, function (r)
|
||||
{
|
||||
if (r != 0 && r != 1)
|
||||
{
|
||||
toggle.toggleClass('on');
|
||||
alert(r);
|
||||
}
|
||||
else toggle.attr('class', (r == 1) ? 'toggle on' : 'toggle');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<?php
|
||||
if (DB::query('SELECT follower_id FROM followers WHERE user_id=:userid AND follower_id=:followerid', array(':userid' => $userprofile->i('id'), ':followerid' => Auth::userid()))) {
|
||||
$class = 'on';
|
||||
}
|
||||
?>
|
||||
<div style="margin-top: 8px;"><div class="toggle <?=$class?>"><div class="handle"></div></div> <label class="toggle-label"><b>Подписка на новые фотографии этого автора</b> (подписаны: <b id="subscr_cnt"><?=DB::query('SELECT COUNT(*) FROM followers WHERE user_id=:uid', array(':uid'=>$userprofile->i('id')))[0]['COUNT(*)'];?></b>)</label></div>
|
||||
|
||||
<?php } else { ?>
|
||||
<div style="margin-top: 8px;">Пользователей, подписанных на мои фотографии: <b><?=DB::query('SELECT COUNT(*) FROM followers WHERE user_id=:uid', array(':uid'=>$userprofile->i('id')))[0]['COUNT(*)'];?></b></div>
|
||||
<?php } ?>
|
||||
<?php } else { ?>
|
||||
<center><h1>Пользователь не найден</h1></center>
|
||||
<center><img src="/static/img/404.jpg"></center>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
File diff suppressed because it is too large
Load diff
|
@ -1,171 +0,0 @@
|
|||
<?php
|
||||
|
||||
use App\Services\{Router, Auth};
|
||||
|
||||
if (Auth::userid() > 0) {
|
||||
Router::redirect('/');
|
||||
}
|
||||
?>
|
||||
<html lang="ru">
|
||||
|
||||
|
||||
<head>
|
||||
<?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">
|
||||
<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><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">
|
||||
<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>
|
||||
<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>
|
||||
<div class="styled-input">
|
||||
<input name="password" id="password" type="password" 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><b><a href="/tour">Вы можете пройти экскурсию по сайту.</a></b></p>
|
||||
</form><br><br>
|
||||
|
||||
<br>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#email').on('input', function() {
|
||||
$('#err_email').html('');
|
||||
});
|
||||
|
||||
$('#regbtn').on('click', function() {
|
||||
var username = $('#username').val().trim();
|
||||
var err_username = $('#err_username').html('');
|
||||
var email = $('#email').val().trim();
|
||||
var err_email = $('#err_email').html('');
|
||||
var password = $('#password').val().trim();
|
||||
var err_password = $('#err_password').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('<i style="color:#e00" class="bx bx-error"></i> Некорректный адрес');
|
||||
|
||||
|
||||
if (err_email.html() == '') {
|
||||
$(this).prop('disabled', true).val('Отправка данных...');
|
||||
|
||||
$.post('/api/register', {
|
||||
username: username,
|
||||
email: email,
|
||||
password: password
|
||||
}, function(r) {
|
||||
r = JSON.parse(r);
|
||||
if (r.errorcode > 0) {
|
||||
$('#err_email').html('<i class="bx bx-error"></i>' + r.errortitle);
|
||||
$('#regbtn').prop('disabled', false).val('Зарегистрироваться');
|
||||
} else {
|
||||
window.location.href = "/"
|
||||
}
|
||||
})
|
||||
.fail(function(jx) {
|
||||
if (jx.responseText != '') alert(jx.responseText);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</center>
|
||||
<?php } else { ?>
|
||||
<center>
|
||||
<h1>К сожалению, регистрация на сервере <?= NGALLERY['root']['title'] ?> закрыта.</h1>
|
||||
</center?
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -1,36 +0,0 @@
|
|||
<?php
|
||||
|
||||
use \App\Services\{Auth, DB, Date};
|
||||
use \App\Models\User;
|
||||
|
||||
?>
|
||||
<!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'); ?>
|
||||
<td class="main">
|
||||
<h1>Спасибо, ваша почта подтверждена.</h1>
|
||||
|
||||
</td>
|
||||
</tr
|
||||
<tr>
|
||||
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
||||
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue