make it clearer what to configure
[awstats-helper.git] / create-historic.php
1 #!/usr/bin/env php
2 <?php
3 /**
4  * Renders historic data for multiple sites
5  * Does not render static pages if they exist
6  * already.
7  *
8  * Only used during the initial setup.
9  */
10 require_once 'functions.php';
11
12 foreach (aws_sites() as $site) {
13     $dates = aws_historic($site);
14     foreach ($dates as $date) {
15         list($year, $month) = $date;
16         $dir = $GLOBALS['htmldir'] . '/' . $site . '/' . $year . '-' . $month . '/';
17         if (!is_dir($dir)) {
18             aws_createHtml($site, true, $year, $month);
19         }
20     }
21     aws_createIndex($site);
22 }
23
24 ?>