Esempio n. 1
0
 public function __construct()
 {
     $this->mailer = _etsis_phpmailer();
     $this->app = \Liten\Liten::getInstance();
 }
Esempio n. 2
0
    } else {
        redirect($app->req->server['HTTP_REFERER']);
    }
    exit;
}
if (file_exists(cronDir() . 'cron/' . 'cronjobs.dat.php')) {
    $data = unserialize(base64_decode(substr(_file_get_contents(cronDir() . 'cron/' . 'cronjobs.dat.php'), 7, -2)));
    if (is_array($data)) {
        $_SESSION['cronjobs'] = $data;
    }
} elseif (isset($_SESSION['cronjobs'])) {
    $_SESSION = null;
}
$email = _etsis_email();
$flashNow = new \app\src\Core\etsis_Messages();
$emailer = _etsis_phpmailer();
$css = ['css/admin/module.admin.page.form_elements.min.css', 'css/admin/module.admin.page.tables.min.css'];
$js = ['components/modules/admin/forms/elements/bootstrap-select/assets/lib/js/bootstrap-select.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-select/assets/custom/js/bootstrap-select.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/lib/js/select2.js?v=v2.1.0', 'components/modules/admin/forms/elements/select2/assets/custom/js/select2.init.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/lib/js/bootstrap-datepicker.js?v=v2.1.0', 'components/modules/admin/forms/elements/bootstrap-datepicker/assets/custom/js/bootstrap-datepicker.init.js?v=v2.1.0', 'components/modules/admin/tables/datatables/assets/lib/js/jquery.dataTables.min.js?v=v2.1.0', 'components/modules/admin/tables/datatables/assets/lib/extras/TableTools/media/js/TableTools.min.js?v=v2.1.0', 'components/modules/admin/tables/datatables/assets/custom/js/DT_bootstrap.js?v=v2.1.0', 'components/modules/admin/tables/datatables/assets/custom/js/datatables.init.js?v=v2.1.0'];
$app->group('/cron', function () use($app, $css, $js, $emailer, $email) {
    /**
     * Before route checks to make sure the logged in user
     * us allowed to manage options/settings.
     */
    $app->before('GET', '/', function () {
        if (!hasPermission('access_cronjob_screen')) {
            redirect(get_base_url() . 'dashboard' . '/');
        }
        /**
         * If user is logged in and the lockscreen cookie is set,
         * redirect user to the lock screen until he/she enters
         * his/her password to gain access.