add email directive

This commit is contained in:
themohooks 2024-09-12 17:28:20 +03:00
parent 7d3cfe163e
commit 820414ae37
4 changed files with 35 additions and 5 deletions

View file

@ -14,8 +14,17 @@ class Load
{
$comments = DB::query('SELECT * FROM photos_comments WHERE photo_id=:pid', array(':pid'=>explode('/', $_SERVER['REQUEST_URI'])[4]));
$number = 1;
foreach ($comments as $c) {
$comm = new Comment($c);
if ($number % 2 == 0) {
$class = 's11';
} else {
$class = 's1';
}
$comm->class($class);
$number++;
$comm->i();
}
}

View file

@ -48,7 +48,7 @@ class Comment {
}
echo '</span></div>
<div class="rank">Фото: '.Photo::fetchAll($this->c['user_id']).' '.$admintype.'</div>
<div class="message-text">'.htmlspecialchars($this->c['body']).'</div>
<div class="message-text">'.preg_replace("~(?:[\p{M}]{1})([\p{M}])+?~uis","", htmlspecialchars($this->c['body'])).'</div>
<div class="comment-votes-block">
<div class="wvote" wid="'.$this->c['id'].'">
<a href="#" vote="1" class="w-btn s2"><span>+</span></a>

6
static/js/playerjs.js Normal file

File diff suppressed because one or more lines are too long

View file

@ -239,7 +239,7 @@ if ($photo->i('id') !== null) {
</table>
<table class="vblock coN">
<?php
$votespos = DB::query('SELECT * FROM photos_rates WHERE photo_id=:pid AND type=0', array(':pid' => $id));
$votespos = DB::query('SELECT * FROM photos_rates WHERE photo_id=:pid AND type=0 ORDER BY id DESC', array(':pid' => $id));
foreach ($votespos as $ps) {
$uservote = new User($ps['user_id']);
echo ' <tr>
@ -454,6 +454,21 @@ if ($photo->i('id') !== null) {
});
});
});
function errimg() {
const content = `<center>
<div class="p20 s5" style="border:none; margin:0 -20px; display:none;">
<b>Фото потеряно при крахе винчестера</b>
<div class="sm" style="margin-top:5px">
Если у вас есть это фото, пожалуйста, пришлите его на
<a href="mailto:<?=NGALLERY['root']['adminemail']?>?subject=Для восстановления фото <?=$id?>"><?=NGALLERY['root']['adminemail']?></a>
</div>
</div>
</center>`;
$('#err').html(content);
$('#err .p20').slideDown(500);
}
</script>
</div>