Пример #1
0
function adm_backup($qb, $auth, $goto, $rep)
{
    $r = msql_read('', $qb . '_cache', '', 1);
    $bkf = min(array_keys($r));
    if ($auth == 7) {
        $xt_end = checkbox('xtend', 'ok', 'all_hubs', 0) . checkbox('no_id', 'ok', 'no_ID', 0);
    }
    if ($_GET['bkp_from'] == '') {
        $ret = form($goto . '&bkp_from==', autoclic('from', $bkf, '5', '6', '') . input2('submit', 'Submit', 'from', '') . $xt_end);
        if ($auth > 6) {
            $ret .= ' ' . lkc('txtx', $goto . '&bkp_sql==', 'insert');
        }
    } else {
        $bkf = $_POST['from'];
        if (!$bkf) {
            $bkf = 1;
        }
        //echo $qb;
        if ($auth == 7 && $_POST['xtend'] != 'ok') {
            $wh = 'nod="' . $qb . '" AND ';
        }
        $ret .= backups($wh, $bkf, $rep, $qb);
    }
    if ($auth > 6) {
        if ($_GET['bkp_sql']) {
            $ret .= form($goto . '&bkp_sql==&save=ok', balb('textarea', 'name="insertsql" cols="50" rows="10"', '') . input2('submit', 'Submit', 'insert', ''));
        }
        if ($_GET['save'] == 'ok') {
            $toinsert = stripslashes($_POST['insertsql']);
            $verif = msquery($toinsert);
            if (!$verif) {
                $ret .= 'error';
            } else {
                $ret .= btn('txtyl', 'saved');
            }
        }
        $ret .= br();
        $ret .= lkc('txtblc', 'plug/export.php', 'master_backup') . br();
        $ret .= btn('txtblc', 'master_dump:') . ' ';
        $ret .= lkc('txtblc', 'plug/dump.php?tb=' . ses('qda'), '_art') . ' ';
        $ret .= lkc('txtblc', 'plug/dump.php?tb=' . ses('qdi'), '_txt') . ' ';
        $ret .= lkc('txtblc', 'plug/dump.php?tb=' . ses('qdu'), '_idy') . br() . br();
        $ret .= lkc('txtbox', $goto . '&backup_msql==', 'backup_msql');
        if ($_GET['backup_msql']) {
            require 'plug/backup_msql.php';
            $ret .= make_archive_msql('');
        }
    }
    return $ret;
}
Пример #2
0
    $wf["{$m->bundle}"]['updated'] = $m->updated;
    $wf["{$m->bundle}"]['url'] = $m->url;
}
if (isset($page)) {
    switch ($page) {
        case 'blacklist':
            blacklist();
            break;
        case 'about':
            about();
            break;
        case 'settings':
            settings();
            break;
        case 'backup':
            backups();
            break;
        case 'updates':
            updates();
            break;
        case 'status':
            status();
            break;
        default:
            // Of course, we shouldn't get here because all the calls to this file
            // are controlled.
            echo "<h1>{$page}</h1>";
            echo "<p>You shouldn't be seeing this message. Some error has occured " . "please contact the workflow author.</p>";
            break;
    }
} else {