diff options
Diffstat (limited to 'Neutron-trunk/widgets/views/source.php')
-rw-r--r-- | Neutron-trunk/widgets/views/source.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Neutron-trunk/widgets/views/source.php b/Neutron-trunk/widgets/views/source.php new file mode 100644 index 0000000..399e616 --- /dev/null +++ b/Neutron-trunk/widgets/views/source.php @@ -0,0 +1,25 @@ +<div id="widget-space" style="text-align: center;"> + <?= $lang["widgets"]["views"]["intro"] ?> <h2 style="margin:0;"><?php + + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . date('Y') . "/" . date('m') . "/" . date('d'))) { + $file = trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/newstats/" . date("Y") . "/" . date("m") . "/" . date('d'))); + $count = count(explode("\n", $file)); + if ($count < 4) { + if ($count < 3) { + if ($count < 2) { + echo($count . $lang["widgets"]["views"]["ordinals"]["1"]); + } else { + echo($count . $lang["widgets"]["views"]["ordinals"]["2"]); + } + } else { + echo($count . $lang["widgets"]["views"]["ordinals"]["3"]); + } + } else { + echo($count . $lang["widgets"]["views"]["ordinals"]["4"]); + } + } else { + echo("({$lang["widgets"]["views"]["error"]})"); + } + + ?></h2> <?= $lang["widgets"]["views"]["outro"] ?> +</div>
\ No newline at end of file |