htdocs/index.php
changeset 44 73f74d395f95
parent 34 a8daa2016cf1
child 46 186507f67064
equal deleted inserted replaced
43:ce2e9caf2dfa 44:73f74d395f95
     3 require('../timezone.php');
     3 require('../timezone.php');
     4 
     4 
     5 $channel_list = stats_channel_list();
     5 $channel_list = stats_channel_list();
     6 $first_channel = $channel_list[0];
     6 $first_channel = $channel_list[0];
     7 $channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel;
     7 $channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel;
       
     8 
       
     9 $title = "$nick - Statistics";
       
    10 require("./themes/$webtheme/header.php");
     8 ?>
    11 ?>
     9 
       
    10 <html>
       
    11   <head>
       
    12     <title><?php echo $nick; ?> - Statistics</title>
       
    13     <style type="text/css">
       
    14     div.footer {
       
    15       font-size: smaller;
       
    16       padding-top: 10px;
       
    17       margin-top: 10px;
       
    18       border-top: 1px solid #aaa;
       
    19     }
       
    20     </style>
       
    21   </head>
       
    22   <body>
       
    23     <div style="float: right;">
    12     <div style="float: right;">
    24       <p>
    13       <p>
    25         <?php
    14         <?php
    26         $tz_display = str_replace('_', ' ', str_replace('/', ': ', $tz));
    15         $tz_display = str_replace('_', ' ', str_replace('/', ': ', $tz));
    27         echo 'Time zone: ' . $tz_display . ' [<a href="changetz.php">change</a>]<br />';
    16         echo 'Time zone: ' . $tz_display . ' [<a href="changetz.php">change</a>]<br />';
    80         $pct = round(100 * $pct, 1);
    69         $pct = round(100 * $pct, 1);
    81         echo "<li>$usernick - $pct% ($total)</li>\n";
    70         echo "<li>$usernick - $pct% ($total)</li>\n";
    82       }
    71       }
    83       ?>
    72       ?>
    84     </ul>
    73     </ul>
       
    74     <h1>Last 60 minutes</h1>
       
    75     <img alt="Graph image" src="graph.php?mode=lasthour&amp;channel=<?php echo urlencode($channel); ?>" />
    85     <h1>Last 24 hours</h1>
    76     <h1>Last 24 hours</h1>
    86     <img alt="Graph image" src="graph.php?mode=lastday&amp;channel=<?php echo urlencode($channel); ?>" />
    77     <img alt="Graph image" src="graph.php?mode=lastday&amp;channel=<?php echo urlencode($channel); ?>" />
    87     <h1>Last 2 weeks</h1>
    78     <h1>Last 2 weeks</h1>
    88     <img alt="Graph image" src="graph.php?mode=lastweek&amp;channel=<?php echo urlencode($channel); ?>" />
    79     <img alt="Graph image" src="graph.php?mode=lastweek&amp;channel=<?php echo urlencode($channel); ?>" />
    89     
    80 <?php
    90     <div class="footer">
    81 require("./themes/$webtheme/footer.php");
    91     <b><?php echo $nick; ?> is a privacy-respecting bot.</b> <a href="privacy.php">Read about what information <?php echo $nick; ?> collects</a>
    82 
    92     </div>
       
    93   </body>
       
    94 </head>