33 lines
636 B
PHP
33 lines
636 B
PHP
<?php
|
|
// Main page posts counter
|
|
|
|
|
|
|
|
if (!$IS_FRONTEND) {
|
|
http_response_code(500);
|
|
die();
|
|
}
|
|
|
|
|
|
|
|
// Includes
|
|
require_once("api/post/index.php");
|
|
|
|
|
|
|
|
$totalPostsAmount = Post_GetPostsAmount();
|
|
$totalPostsAmount = strval($totalPostsAmount);
|
|
|
|
?>
|
|
<div class="visualbox">
|
|
<?php
|
|
// India stronk 🇮🇳💪
|
|
$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>
|