Exemple #1
0
        switch ($_POST['sec']) {
            case "generate":
                $controller->executeReportGenerationScript($_POST);
                break;
        }
    } else {
        switch ($_GET['sec']) {
            case "generate":
                $controller->routeCronJob($_GET['website_id'], $_GET['repTools']);
                break;
            case "croncommand":
                $controller->showCronCommand();
                break;
            default:
                $controller->showReportGenerationManager();
                break;
        }
    }
} else {
    # the section for generate reports using system cron job
    include_once "includes/sp-load.php";
    include_once SP_CTRLPATH . "/cron.ctrl.php";
    include_once SP_CTRLPATH . "/report.ctrl.php";
    include_once SP_CTRLPATH . "/searchengine.ctrl.php";
    include_once SP_CTRLPATH . "/keyword.ctrl.php";
    $controller = new CronController();
    $controller->timeStamp = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
    $includeList = array();
    // the only included seo tools id
    $controller->executeCron($includeList);
}