コード例 #1
0
ファイル: backup.php プロジェクト: kveldscholten/Ilch-1.1
 }
 // #
 // ##
 // ### start backup
 /*
  phpMyBackup v.0.4 Beta - Documentation
       Homepage: http://www.nm-service.de/phpmybackup
       Copyright (c) 2000-2001 by Holger Mauermann, mauermann@nm-service.de
  phpMyBackup is distributed in the hope that it will be useful for you, but
       WITHOUT ANY WARRANTY. This programm may be used freely as long as all credit
       and copyright information are left intact.
 */
 if ($writer->countWriters()) {
     $version = "0.4 beta";
     $cur_time = date("Y-m-d H:i");
     $writer->write("-- Dump created with 'phpMyBackup v.{$version}' on {$cur_time}\r\n");
     mysql_select_db(DBDATE);
     $tables = array();
     $qry = mysql_query('SHOW TABLES');
     while ($row = mysql_fetch_array($qry)) {
         $tables[] = $row[0];
     }
     foreach ($tables as $table) {
         if (isset($_POST['prefix']) and strpos($table, DBPREF) === false) {
             continue;
         }
         get_def(DBDATE, $table, $writer);
         get_content(DBDATE, $table, $writer);
     }
     $writer->close();
 }
コード例 #2
0
ファイル: backup.php プロジェクト: rjdesign/Ilch-1.2
 }
 // #
 // ##
 // ### start backup
 /*
 phpMyBackup v.0.4 Beta - Documentation
     Homepage: http://www.nm-service.de/phpmybackup
     Copyright (c) 2000-2001 by Holger Mauermann, mauermann@nm-service.de
 phpMyBackup is distributed in the hope that it will be useful for you, but
     WITHOUT ANY WARRANTY. This programm may be used freely as long as all credit
     and copyright information are left intact.
 */
 if ($writer->countWriters()) {
     $version = "0.4 beta";
     $cur_time = date("Y-m-d H:i");
     $writer->write("-- Dump created with 'phpMyBackup v." . $version . "' on " . $cur_time . "\r\n");
     $tables = db_list_tables(DBDATE);
     $num_tables = @db_num_rows($tables);
     $i = 0;
     while ($i < $num_tables) {
         $table = db_tablename($tables, $i);
         if (isset($_POST['prefix']) and strpos($table, DBPREF) === false) {
             $i++;
             continue;
         }
         get_def(DBDATE, $table, $writer);
         get_content(DBDATE, $table, $writer);
         $i++;
     }
     $writer->close();
 }