Ejemplo n.º 1
0
<?php

switch ($_GET['step']) {
    // Delete
    case 10:
        include_once 'inc/classes/class_masterdelete.php';
        $md = new masterdelete();
        $md->MultiDelete('cron', 'jobid');
        break;
        // Run now
    // Run now
    case 20:
        include_once "modules/cron2/class_cron2.php";
        $cron2 = new cron2();
        $dsp->AddDoubleRow(t('Folgender SQL-Befehl wurde ausgeführt'), $cron2->Run($_GET['jobid']));
        $dsp->AddBackButton('index.php?mod=cron2');
        break;
    default:
        include_once 'modules/mastersearch2/class_mastersearch2.php';
        $ms2 = new mastersearch2('cron2');
        $ms2->query['from'] = "%prefix%cron AS c";
        $ms2->AddResultField(t('Name'), 'c.name');
        $ms2->AddResultField(t('Geplant um'), 'runat');
        $ms2->AddResultField(t('Aktiv'), 'active', 'TrueFalse');
        $ms2->AddResultField(t('Letzte Ausführung'), 'UNIX_TIMESTAMP(c.lastrun) AS lastrun', 'MS2GetDate');
        $ms2->AddIconField('edit', 'index.php?mod=cron2&action=add&jobid=', t('Editieren'));
        $ms2->AddIconField('generate', 'index.php?mod=cron2&step=20&jobid=', t('Jetzt ausführen'));
        $ms2->AddMultiSelectAction('Löschen', 'index.php?mod=cron2&step=10&jobid=', 1);
        $ms2->PrintSearch('index.php?mod=cron2', 'c.jobid');
        $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=cron2&action=add'));
        break;
Ejemplo n.º 2
0
if (isset($debug)) {
    $debug->addvar('$cfg', $cfg);
}
if (isset($debug)) {
    $debug->tracker("All upto HTML-Output");
}
$framework->html_out();
// Output of all HTML
unset($framework);
unset($smarty);
unset($templ);
unset($dsp);
### Statistics will be updated only at scriptend, so pagesize and loadtime can be insert
if ($db->success) {
    // Statistic Functions (for generating server- and usage-statistics)
    include_once "modules/stats/class_stats.php";
    $stats = new stats();
    unset($stats);
    // Check Cronjobs
    if (!$_GET['mod'] == 'install') {
        if (!isset($cron2)) {
            include_once 'modules/cron2/class_cron2.php';
            $cron2 = new cron2();
        }
        $cron2->CheckJobs();
        unset($cron2);
    }
    // Disconnect DB
    $db->disconnect();
    unset($db);
}