Пример #1
0
            flush();
        }
    }
    exit;
} elseif (isset($_GET['dates']) && $USER->hasPerm("admin")) {
    $map->setOrigin(0, -10);
    $map->setImageSize(900, 1300);
    $map->setScale(1);
    $map->type_or_user = $_GET['dates'] == -2 ? -2 : -1;
    set_time_limit(3600 * 3);
    $root =& $_SERVER['DOCUMENT_ROOT'];
    $n = time() - 60 * 60 * 24 * 7;
    for ($t = strtotime("10 March 2005"); $t < $n; $t += 60 * 60 * 24 * 7) {
        $map->mapDateStart = date('Y-m-d', $t);
        $map->mapDateCrit = date('Y-m-d', $t - 60 * 60 * 24 * 7);
        $target = $map->getImageFilename();
        if (!file_exists($root . $target)) {
            $map->_renderMap();
        }
        print "{$map->mapDateStart} DONE<BR>";
        flush();
    }
    exit;
}
//force render of this map
//$map->_renderRandomGeographMap();
//now done with type_or_user = -1
if (count($_GET)) {
    $map->returnImage();
}
exit;