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