add new concurs

This commit is contained in:
2022-04-06 00:10:37 +03:00
parent 1c53718658
commit 25df0b2c10
9 changed files with 295 additions and 21 deletions

21
blocks/golos.php Normal file
View File

@@ -0,0 +1,21 @@
<?php $curr_id = get_the_id(); ?>
<?if (!isset($_COOKIE[COOK_GOLOS])):?>
<div id="golos-<?=$curr_id?>">
<br><button style="padding: 8px; cursor: pointer;" id="golos" onclick="javascript:add_golos(<?= $curr_id;?>, 'golos-<?= $curr_id;?>');">Проголосовать</button>
</div>
<?endif?>
<div id="golos-<?=$curr_id?>">
<?if (isset($_COOKIE["vec_$curr_id"])):?>
<p>Спасибо за Ваш голос</p>
<?endif?>
</div>
<div id="count-<?=$ID?>" style="margin-top: 12px;">
<i class="far fa-thumbs-up"></i> <?=$votes->$curr_id?>
</div>