24 lines
563 B
PHP
24 lines
563 B
PHP
<?php
|
|
// Main page posts counter
|
|
|
|
if (!$IS_FRONTEND) {
|
|
http_response_code(500);
|
|
die();
|
|
}
|
|
|
|
$totalPostsAmount = Post_GetPostsAmount();
|
|
$totalPostsAmount = strval($totalPostsAmount);
|
|
|
|
?>
|
|
<div class="nibbabox notsearchbox">
|
|
<?php
|
|
$allNumbers = array();
|
|
for ($i = 0; $i < strlen($totalPostsAmount); ++$i)
|
|
$allNumbers[] = "<img src=\"front/images/counter/" . $totalPostsAmount[$i] . ".png\">";
|
|
while (count($allNumbers) < 7)
|
|
$allNumbers[] = "<img src=\"front/images/counter/0.png\">";
|
|
|
|
foreach ($allNumbers as $numberImg)
|
|
echo $numberImg;
|
|
?>
|
|
</div>
|