pub / goaccess_dashboard

Tiny tool for privacy-preserving web-analytics
git clone https://src.jayvii.de/pub/goaccess_dashboard.git
Home | Log | Files | Exports | Refs | Submodules | README | RSS

index.php (2829B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4     <title>Traffic</title>
      5     <meta charset="utf-8" />
      6     <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
      7     <link rel="stylesheet" href="assets/css/simple.min.css" />
      8     <style>
      9       .button { margin: 5px; }
     10     </style>
     11 </head>
     12 
     13 <body>
     14 
     15     <header>
     16         <nav>
     17             <a href="#all">All Time</a>
     18             <a href="#year">Yearly</a>
     19             <a href="#month">Monthly</a>
     20             <a href="#week">Weekly</a>
     21         </nav>
     22     </header>
     23 
     24     <!-- Description -->
     25     <h1>Traffic</h1>
     26     <p>
     27         Here is a summary of <strong>aggregated</strong> privacy preserving
     28         website traffic analytics. This tool <strong>tracks traffic, not
     29         people</strong>. There is no tracking code in the websites that are
     30         shown here. No micro-level information are stored whatsoever. This tool
     31         works with purely technically necessary and minimal information that
     32         users send to the webserver.
     33     </p>
     34 
     35     <!-- All Time -->
     36     <section id="all">
     37         <h2>Long Time Traffic collection</h2>
     38         <a class="button" href="all/">All Time</a>
     39     </section>
     40 
     41     <!-- Yearly List -->
     42     <section id="year">
     43         <h2>Yearly</h2>
     44         <?php
     45             /* Check which Yearly files exist and print them*/
     46             foreach (array_reverse(glob("[0-9][0-9][0-9][0-9]")) as $year) {
     47         ?>
     48         <a class="button" href="<?php echo $year; ?>/"><?php echo $year; ?></a>
     49         <?php
     50             }
     51         ?>
     52     </section>
     53 
     54     <section id="month">
     55         <h2>Monthly</h2>
     56         <?php
     57             /* Only return monthly data from the latest year */
     58             $year = end(glob("[0-9][0-9][0-9][0-9]"));
     59             foreach (glob($year . "/" . "[0-9][0-9]") as $month) {
     60                 $mlab = date(
     61                     "F",
     62                     strtotime($year . "-" . substr("{$month}", -2) . "-01")
     63                 );
     64         ?>
     65         <a class="button" href="<?php echo $month; ?>/"><?php echo $mlab; ?></a>
     66         <?php
     67             }
     68         ?>
     69         <p><em>
     70             <strong>Note:</strong>
     71             Only shows monthly data from <?php echo $year; ?>.
     72         </em></p>
     73     </section>
     74 
     75     <section id="week">
     76         <h2>Weekly</h2>
     77         <?php
     78             /* Only return weekly data from the latest year */
     79             $year = end(glob("[0-9][0-9][0-9][0-9]"));
     80             foreach (glob($year . "/week-" . "[0-9][0-9]") as $week) {
     81                 $wlab = "Week " . substr("{$week}", -2);
     82         ?>
     83         <a class="button" href="<?php echo $week; ?>/"><?php echo $wlab; ?></a>
     84         <?php
     85             }
     86         ?>
     87         <p><em>
     88             <strong>Note:</strong>
     89             Only shows weekly data from <?php echo $year; ?>.
     90         </em></p>
     91     </section>
     92 
     93     </body>
     94 </html>