aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/widgets/views/source.php
blob: 399e616046e53d6f0a95b1077cf6771af314eb00 (plain)
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
<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>