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 (2428B)


      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     <!-- Yearly List -->
     36     <section id="year">
     37         <h2>Yearly</h2>
     38         <?php
     39             /* Check which Yearly files exist and print them*/
     40             foreach (glob("[0-9][0-9][0-9][0-9]") as $year) {
     41                 echo "<a class='button' href='" . $year . "/'>" . $year . "</a>";
     42         
     43             }
     44         ?>
     45     </section>
     46 
     47     <section id="month">
     48         <h2>Monthly</h2>
     49         <?php
     50             foreach (glob("[0-9][0-9][0-9][0-9]") as $year) {
     51                 foreach (glob($year . "/" . "[0-9][0-9]") as $month) {
     52                     echo "<a class='button' href='" . $month .
     53                         "/'>" .
     54                         date("F",
     55                             strtotime(
     56                                 $year . "-" . substr("{$month}", -2) . "-01"
     57                             )
     58                         ) . " " . $year . "</a>";
     59                     
     60                 }
     61             }
     62         ?>
     63     </section>
     64 
     65     <section id="week">
     66         <h2>Weekly</h2>
     67         <?php
     68             foreach (glob("[0-9][0-9][0-9][0-9]") as $year) {
     69                 foreach (glob($year . "/week-" . "[0-9][0-9]") as $week) {
     70                     echo "<a class='button' href='" . $week .
     71                         "/'>Week " . substr("{$week}", -2) . " " . $year .
     72                         "</a>";
     73                     
     74                 }
     75             }
     76         ?>
     77     </section>
     78 
     79     </body>
     80 </html>