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">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
if (DB::query('SELECT status FROM contests WHERE status=1')[0]['status'] === 1) {
|
||||
} else {
|
||||
echo '<h2><b>Следующего конкурса нет. Пожалуйста, заходите сюда позже.</b></h2>';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<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>
|
||||
|
|
|
@ -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>');
|
||||
}
|
||||
</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>
|
||||
function startCountdown(unixTimestamp) {
|
||||
function padZero(num) {
|
||||
|
@ -191,8 +165,36 @@ LIMIT 10;');
|
|||
updateTimer(); // сразу обновляем отображение
|
||||
const interval = setInterval(updateTimer, 1000);
|
||||
}
|
||||
startCountdown(1740607200);
|
||||
</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>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue