Esempio n. 1
0
 if (!$_POST['fenjuan']) {
     if (!($tables = $database->query("show table status from {$_DB['database']}"))) {
         $msgs[] = $_AL['database.b2.t4'];
         show_msg($msgs);
         pageend();
     }
     $sql = "";
     while ($database->nextrecord($tables)) {
         if (strpos($database->f('Name'), $_DB['prefix']) === 0) {
         } else {
             continue;
         }
         $table = $database->f("Name");
         $sql .= make_header($table);
         $database->query("select * from {$table}");
         $num_fields = $database->nf();
         while ($database->nextrecord()) {
             $sql .= make_record($table, $num_fields);
         }
     }
     $filename = date("Ymd", time()) . "_all.sql";
     if ($_POST['weizhi'] == "localpc") {
         down_file($sql, $filename);
     } elseif ($_POST['weizhi'] == "server") {
         if (write_file($sql, $filename)) {
             $msgs[] = _LANG($_AL['database.b2.t5'], array("/{$backdir}/{$filename}"));
         } else {
             $msgs[] = $_AL['database.b2.t6'];
         }
         show_msg($msgs);
         pageend();