-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcontent-statistics.php
More file actions
33 lines (23 loc) · 970 Bytes
/
content-statistics.php
File metadata and controls
33 lines (23 loc) · 970 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<section class="statistics-wrap">
<div class="statistics">
<h2>Librivox Statistics</h2>
<?php
$url = LIBRIVOX_STATISTICS;
$json = @file_get_contents($url);
$items = json_decode($json, TRUE);
?>
<?php if (!empty($items)): ?>
<ul class="column-third column-one">
<li>Cataloged works: <?= number_format($items['total_projects'])?></li>
<li>Works cataloged last month: <?= number_format($items['projects_last_month'])?></li>
</ul><!-- end .stats-colum-one -->
<ul class="column-third column-two">
<li>Non-English works: <?= number_format($items['non_english_projects'])?></li>
<li>Number of languages: <?= number_format($items['number_languages'])?></li>
</ul><!-- end .stats-colum-one -->
<ul class="column-third column-three">
<li>Number of readers: <?= number_format($items['number_readers'])?></li>
</ul><!-- end .stats-colum-one -->
<?php endif; ?>
</div><!-- end .statistics-inner-wrap -->
</section>