mirror of
https://github.com/claradex/nativegallery.git
synced 2025-02-23 03:59:50 +03:00
update pages
This commit is contained in:
parent
be2963117a
commit
1dab03afe8
2 changed files with 80 additions and 71 deletions
|
@ -31,6 +31,13 @@ use \App\Models\User;
|
||||||
<div class="p20p">
|
<div class="p20p">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (DB::query('SELECT status FROM contests WHERE status=1')[0]['status'] === 1) {
|
||||||
|
} else {
|
||||||
|
echo '<h2><b>Следующего конкурса нет. Пожалуйста, заходите сюда позже.</b></h2>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="pb_pre vote" style="padding-left:15px; padding-right:10px; display:table-cell" pid="2068639">
|
<td class="pb_pre vote" style="padding-left:15px; padding-right:10px; display:table-cell" pid="2068639">
|
||||||
<a href="#" vote="1" class="konk_btn"><span>Красиво, на конкурс!</span></a>
|
<a href="#" vote="1" class="konk_btn"><span>Красиво, на конкурс!</span></a>
|
||||||
|
|
|
@ -128,32 +128,6 @@ LIMIT 10;');
|
||||||
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>');
|
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>
|
</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>
|
|
||||||
Закончится через: <b id="countdown"></b><br>
|
|
||||||
Тематика: <b>'.$theme['title'].'</b><br>
|
|
||||||
<b style="color: #412378;">Голосуйте за лучшие фотографии, которые должны стать победителями сегодняшнего конкурса!</b><br><br>
|
|
||||||
<a href="/voting" style="background-color: #37009D; color: #fff;" type="button">Голосовать!</a>';
|
|
||||||
} 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>
|
|
||||||
Начнётся через: <b id="countdown"></b><br>
|
|
||||||
Тематика: <b>'.$theme.'</b><br>
|
|
||||||
<b style="color: #412378;">Лучшие фотографии по мнению сообщества '.NGALLERY['root']['title'].' будут отмечены</b><br><br>
|
|
||||||
<a href="/voting/sendpretend" style="background-color: #37009D; color: #fff;" type="button">Участвовать!</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<script>
|
<script>
|
||||||
function startCountdown(unixTimestamp) {
|
function startCountdown(unixTimestamp) {
|
||||||
function padZero(num) {
|
function padZero(num) {
|
||||||
|
@ -190,9 +164,37 @@ LIMIT 10;');
|
||||||
|
|
||||||
updateTimer(); // сразу обновляем отображение
|
updateTimer(); // сразу обновляем отображение
|
||||||
const interval = setInterval(updateTimer, 1000);
|
const interval = setInterval(updateTimer, 1000);
|
||||||
}
|
}
|
||||||
startCountdown(1740607200);
|
</script>
|
||||||
</script>
|
<?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>
|
||||||
|
Закончится через: <b id="countdown"></b><br>
|
||||||
|
Тематика: <b>' . $theme['title'] . '</b><br>
|
||||||
|
<b style="color: #412378;">Голосуйте за лучшие фотографии, которые должны стать победителями сегодняшнего конкурса!</b><br><br>
|
||||||
|
<a href="/voting" style="background-color: #37009D; color: #fff;" type="button">Голосовать!</a>
|
||||||
|
<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>
|
||||||
|
Начнётся через: <b id="countdown"></b><br>
|
||||||
|
Тематика: <b>' . $theme['title'] . '</b><br>
|
||||||
|
<b style="color: #412378;">Лучшие фотографии по мнению сообщества ' . NGALLERY['root']['title'] . ' будут отмечены</b><br><br>
|
||||||
|
<a href="/voting/sendpretend" style="background-color: #37009D; color: #fff;" type="button">Участвовать!</a>
|
||||||
|
<script>startCountdown(' . $contest['closepretendsdate'] . ');</script>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,7 +209,7 @@ startCountdown(1740607200);
|
||||||
$first_id = $photos[0]['id'];
|
$first_id = $photos[0]['id'];
|
||||||
$last_id = end($photos)['id'];
|
$last_id = end($photos)['id'];
|
||||||
?>
|
?>
|
||||||
<div id="recent-photos" class="ix-photos ix-photos-multiline" lastpid="<?=$first_id+1?>" firstpid="<?=$last_id?>">
|
<div id="recent-photos" class="ix-photos ix-photos-multiline" lastpid="<?= $first_id + 1 ?>" firstpid="<?= $last_id ?>">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -235,8 +237,8 @@ startCountdown(1740607200);
|
||||||
<?php
|
<?php
|
||||||
$news = DB::query('SELECT * FROM news ORDER BY id DESC LIMIT 10');
|
$news = DB::query('SELECT * FROM news ORDER BY id DESC LIMIT 10');
|
||||||
foreach ($news as $n) {
|
foreach ($news as $n) {
|
||||||
echo '<div class="ix-news-item"><b>'.Date::zmdate($n['time']).'</b>
|
echo '<div class="ix-news-item"><b>' . Date::zmdate($n['time']) . '</b>
|
||||||
<div class="break-links" style="padding-top:3px">'.$n['body'].'</div>
|
<div class="break-links" style="padding-top:3px">' . $n['body'] . '</div>
|
||||||
</div>';
|
</div>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue