<p> <button type="submit" class="btn btn-default">Reoad Data</button> </p> </form> <div class="well"> You can use this page as a command line tool, too. It's a better option if there's <b>lots</b> of data to deal with. </div> <?php return ob_get_clean(); } } if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) { $obj = new CwLoadDataPage(); if (php_sapi_name() != 'cli') { $obj->draw_page(); } else { function print_cli_help() { echo "Usage: php CwReloadDataPage.php [-a || -m <model file>]\n"; echo "\t[ -d <year-month-day] || [-s <start month> <start year> [-e <end month> <end year>]]\n"; echo "Specify a single date or a range of months.\n"; } $start = array(); $end = array(); $day = array(); $file = False; $all = False; $models = $obj->getModels(); for ($i = 1; $i < count($argv); $i++) { switch ($argv[$i]) {