Esempio n. 1
0
if (!hasPopedom("database")) {
    exit(_LANG($_AL['admin.nopopedom'], array($_AL['index.data.man'])));
}
$database = new db_class($_DB['hostname'], $_DB['username'], $_DB['password'], $_DB['database']);
$backdir = "backup/" . md5($cache_settings['salt']);
mysql_query("set names utf8");
if (!file_exists($backdir)) {
    create($backdir);
}
echo "<script>var links={}; " . "links.t1='admin.php?inc=database&action=backupform';" . "links.t2='admin.php?inc=database&action=restoreform';" . "links.t3='admin.php?inc=database&action=sqllist';" . "</script>";
switch ($action) {
    /************************************** backupform BEGIN ************************************************/
    case "backupform":
        $tablesopt = '';
        $database->query("show table status from `{$_DB['database']}`");
        while ($database->nextrecord()) {
            if (strpos($database->f('Name'), $_DB['prefix']) === 0) {
            } else {
                continue;
            }
            $tablesopt .= "<option value='" . $database->f('Name') . "'>" . $database->f('Name') . "</option>";
        }
        $_AL['database.b.tips'] = _LANG($_AL['database.b.tips'], array($backdir));
        echo <<<EOT
\t<style>
\t\t.td_1{width:400px; line-height:200%;}
\t</style>
\t<div id="smalltab_container"></div>
\t<div class="smalltab_line"></div>
\t<div class="div_clear" style="height:10px;"></div>
\t<div id="t1">