Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: backupdb.php 5016 2010-06-12 00:24:02Z RyanGordon $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 187 | Zeile 187 |
---|
$header = "-- MyBB Database Backup\n-- Generated: {$time}\n-- -------------------------------------\n\n"; $contents = $header; foreach($mybb->input['tables'] as $table)
|
$header = "-- MyBB Database Backup\n-- Generated: {$time}\n-- -------------------------------------\n\n"; $contents = $header; foreach($mybb->input['tables'] as $table)
|
{
| { if(!$db->table_exists($db->escape_string($table))) { continue; }
|
if($mybb->input['analyzeoptimize'] == 1) { $db->optimize_table($table);
| if($mybb->input['analyzeoptimize'] == 1) { $db->optimize_table($table);
|
Zeile 267 | Zeile 271 |
---|
$file_from_admindir = 'index.php?module=tools-backupdb&action=dlbackup&file='.basename($file).$ext; flash_message("<span><em>{$lang->success_backup_created}</em></span><p>{$lang->backup_saved_to}<br />{$file}{$ext} (<a href=\"{$file_from_admindir}\">{$lang->download}</a>)</p>", 'success'); admin_redirect("index.php?module=tools-backupdb");
|
$file_from_admindir = 'index.php?module=tools-backupdb&action=dlbackup&file='.basename($file).$ext; flash_message("<span><em>{$lang->success_backup_created}</em></span><p>{$lang->backup_saved_to}<br />{$file}{$ext} (<a href=\"{$file_from_admindir}\">{$lang->download}</a>)</p>", 'success'); admin_redirect("index.php?module=tools-backupdb");
|
}
| }
|
else { $plugins->run_hooks("admin_tools_backupdb_backup_download_commit");
| else { $plugins->run_hooks("admin_tools_backupdb_backup_download_commit");
|
Zeile 278 | Zeile 282 |
---|
if($mybb->input['filetype'] == 'gzip') { echo gzencode($contents);
|
if($mybb->input['filetype'] == 'gzip') { echo gzencode($contents);
|
}
| }
|
else { echo $contents; } }
|
else { echo $contents; } }
|
|
|
exit; }
| exit; }
|
Zeile 294 | Zeile 298 |
---|
var select_box = document.getElementById('table_select'); for(var i = 0; i < select_box.length; i++)
|
var select_box = document.getElementById('table_select'); for(var i = 0; i < select_box.length; i++)
|
{
| {
|
if(action == 'select') { select_box[i].selected = true; } else if(action == 'deselect')
|
if(action == 'select') { select_box[i].selected = true; } else if(action == 'deselect')
|
{
| {
|
select_box[i].selected = false; } else if(action == 'forum' && prefix != 0)
| select_box[i].selected = false; } else if(action == 'forum' && prefix != 0)
|
Zeile 319 | Zeile 323 |
---|
$page->add_breadcrumb_item($lang->new_database_backup); $page->output_header($lang->new_database_backup);
|
$page->add_breadcrumb_item($lang->new_database_backup); $page->output_header($lang->new_database_backup);
|
$sub_tabs['database_backup'] = array( 'title' => $lang->database_backups,
| $sub_tabs['database_backup'] = array( 'title' => $lang->database_backups,
|
'link' => "index.php?module=tools-backupdb" );
| 'link' => "index.php?module=tools-backupdb" );
|
Zeile 342 | Zeile 346 |
---|
} $table = new Table;
|
} $table = new Table;
|
$table->construct_header($lang->table_selectiona);
| $table->construct_header($lang->table_selection);
|
$table->construct_header($lang->backup_options); $table_selects = array(); $table_list = $db->list_tables($config['database']['database']); foreach($table_list as $id => $table_name)
|
$table->construct_header($lang->backup_options); $table_selects = array(); $table_list = $db->list_tables($config['database']['database']); foreach($table_list as $id => $table_name)
|
{
| {
|
$table_selects[$table_name] = $table_name; }
| $table_selects[$table_name] = $table_name; }
|
Zeile 399 | Zeile 403 |
---|
$backups = array(); $dir = MYBB_ADMIN_DIR.'backups/'; $handle = opendir($dir);
|
$backups = array(); $dir = MYBB_ADMIN_DIR.'backups/'; $handle = opendir($dir);
|
while(($file = readdir($handle)) !== false)
| if($handle !== false)
|
{
|
{
|
if(filetype(MYBB_ADMIN_DIR.'backups/'.$file) == 'file')
| while(($file = readdir($handle)) !== false)
|
{
|
{
|
$ext = get_extension($file); if($ext == 'gz' || $ext == 'sql')
| if(filetype(MYBB_ADMIN_DIR.'backups/'.$file) == 'file')
|
{
|
{
|
$backups[@filemtime(MYBB_ADMIN_DIR.'backups/'.$file)] = array( "file" => $file, "time" => @filemtime(MYBB_ADMIN_DIR.'backups/'.$file), "type" => $ext );
| $ext = get_extension($file); if($ext == 'gz' || $ext == 'sql') { $backups[@filemtime(MYBB_ADMIN_DIR.'backups/'.$file)] = array( "file" => $file, "time" => @filemtime(MYBB_ADMIN_DIR.'backups/'.$file), "type" => $ext ); }
|
} }
|
} }
|
| closedir($handle);
|
} $count = count($backups);
| } $count = count($backups);
|