WP-DBManager - Version 2.70

Version Description

N/A

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-DBManager
Version 2.70
Comparing to
See all releases

Code changes from version 2.65 to 2.70

database-admin-css.css DELETED
@@ -1,21 +0,0 @@
1
- /*
2
- +----------------------------------------------------------------+
3
- | |
4
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
5
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
6
- | |
7
- | File Written By: |
8
- | - Lester "GaMerZ" Chan |
9
- | - http://lesterchan.net |
10
- | |
11
- | File Information: |
12
- | - Database Admin CSS Styles |
13
- | - wp-content/plugins/wp-dbmanager/database-admin-css.css |
14
- | |
15
- +----------------------------------------------------------------+
16
- */
17
-
18
-
19
- #icon-wp-dbmanager {
20
- background: transparent url(images/database_admin_icon.png) no-repeat;
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
database-backup.php CHANGED
@@ -1,22 +1,4 @@
1
  <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Backup |
14
- | - wp-content/plugins/wp-dbmanager/database-backup.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
  ### Check Whether User Can Manage Database
21
  if(!current_user_can('manage_database')) {
22
  die('Access Denied');
@@ -36,8 +18,9 @@ $backup['path'] = $backup_options['path'];
36
  $backup['password'] = str_replace('$', '\$', DB_PASSWORD);
37
  $backup['charset'] = ' --default-character-set="utf8"';
38
 
39
- ### Form Processing
40
- if($_POST['do']) {
 
41
  // Decide What To Do
42
  switch($_POST['do']) {
43
  case __('Backup', 'wp-dbmanager'):
@@ -45,7 +28,7 @@ if($_POST['do']) {
45
  $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
46
  $backup['host'] = DB_HOST;
47
  $backup['port'] = '';
48
- $backup['sock'] = '';
49
  if(strpos(DB_HOST, ':') !== false) {
50
  $db_host = explode(':', DB_HOST);
51
  $backup['host'] = $db_host[0];
@@ -94,7 +77,6 @@ $stats_function_disabled = 0;
94
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
95
  <!-- Checking Backup Status -->
96
  <div class="wrap">
97
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
98
  <h2><?php _e('Backup Database', 'wp-dbmanager'); ?></h2>
99
  <h3><?php _e('Checking Backup Status', 'wp-dbmanager'); ?></h3>
100
  <p>
@@ -114,8 +96,8 @@ $stats_function_disabled = 0;
114
  }
115
  ?>
116
  </p>
117
- <p>
118
- <?php
119
  if(@file_exists(stripslashes($backup['mysqldumppath']))) {
120
  echo __('Checking MYSQL Dump Path', 'wp-dbmanager').' <span dir="ltr">(<strong>'.stripslashes($backup['mysqldumppath']).'</strong>)</span> ...<br />';
121
  echo '<font color="green">'.__('MYSQL dump path exists.', 'wp-dbmanager').'</font>';
@@ -160,7 +142,7 @@ $stats_function_disabled = 0;
160
  echo '<font color="red"><span dir="ltr">exec()</span> '.__('disabled', 'wp-dbmanager').'.</font>';
161
  $stats_function_disabled++;
162
  }
163
- ?>
164
  </p>
165
  <p>
166
  <?php
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  ### Check Whether User Can Manage Database
3
  if(!current_user_can('manage_database')) {
4
  die('Access Denied');
18
  $backup['password'] = str_replace('$', '\$', DB_PASSWORD);
19
  $backup['charset'] = ' --default-character-set="utf8"';
20
 
21
+ ### Form Processing
22
+ if(!empty($_POST['do'])) {
23
+ $text = '';
24
  // Decide What To Do
25
  switch($_POST['do']) {
26
  case __('Backup', 'wp-dbmanager'):
28
  $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
29
  $backup['host'] = DB_HOST;
30
  $backup['port'] = '';
31
+ $backup['sock'] = '';
32
  if(strpos(DB_HOST, ':') !== false) {
33
  $db_host = explode(':', DB_HOST);
34
  $backup['host'] = $db_host[0];
77
  <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
78
  <!-- Checking Backup Status -->
79
  <div class="wrap">
 
80
  <h2><?php _e('Backup Database', 'wp-dbmanager'); ?></h2>
81
  <h3><?php _e('Checking Backup Status', 'wp-dbmanager'); ?></h3>
82
  <p>
96
  }
97
  ?>
98
  </p>
99
+ <p>
100
+ <?php
101
  if(@file_exists(stripslashes($backup['mysqldumppath']))) {
102
  echo __('Checking MYSQL Dump Path', 'wp-dbmanager').' <span dir="ltr">(<strong>'.stripslashes($backup['mysqldumppath']).'</strong>)</span> ...<br />';
103
  echo '<font color="green">'.__('MYSQL dump path exists.', 'wp-dbmanager').'</font>';
142
  echo '<font color="red"><span dir="ltr">exec()</span> '.__('disabled', 'wp-dbmanager').'.</font>';
143
  $stats_function_disabled++;
144
  }
145
+ ?>
146
  </p>
147
  <p>
148
  <?php
database-empty.php CHANGED
@@ -1,118 +1,102 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Empty |
14
- | - wp-content/plugins/wp-dbmanager/database-empty.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Database
21
- if(!current_user_can('manage_database')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-dbmanager/database-manager.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $backup = array();
30
- $backup_options = get_option('dbmanager_options');
31
- $backup['date'] = current_time('timestamp');
32
- $backup['mysqldumppath'] = $backup_options['mysqldumppath'];
33
- $backup['mysqlpath'] = $backup_options['mysqlpath'];
34
- $backup['path'] = $backup_options['path'];
35
-
36
-
37
- ### Form Processing
38
- if($_POST['do']) {
39
- // Lets Prepare The Variables
40
- $emptydrop = $_POST['emptydrop'];
41
-
42
- // Decide What To Do
43
- switch($_POST['do']) {
44
- case __('Empty/Drop', 'wp-dbmanager'):
45
- check_admin_referer('wp-dbmanager_empty');
46
- $empty_tables = array();
47
- if(!empty($emptydrop)) {
48
- foreach($emptydrop as $key => $value) {
49
- if($value == 'empty') {
50
- $empty_tables[] = $key;
51
- } elseif($value == 'drop') {
52
- $drop_tables .= ', '.$key;
53
- }
54
- }
55
- } else {
56
- $text = '<font color="red">'.__('No Tables Selected.', 'wp-dbmanager').'</font>';
57
- }
58
- $drop_tables = substr($drop_tables, 2);
59
- if(!empty($empty_tables)) {
60
- foreach($empty_tables as $empty_table) {
61
- $empty_query = $wpdb->query("TRUNCATE $empty_table");
62
- $text .= '<font color="green">'.sprintf(__('Table \'%s\' Emptied', 'wp-dbmanager'), $empty_table).'</font><br />';
63
- }
64
- }
65
- if(!empty($drop_tables)) {
66
- $drop_query = $wpdb->query("DROP TABLE $drop_tables");
67
- $text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Dropped', 'wp-dbmanager'), $drop_tables).'</font>';
68
- }
69
- break;
70
- }
71
- }
72
-
73
-
74
- ### Show Tables
75
- $tables = $wpdb->get_col("SHOW TABLES");
76
- ?>
77
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
78
- <!-- Empty/Drop Tables -->
79
- <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
80
- <?php wp_nonce_field('wp-dbmanager_empty'); ?>
81
- <div class="wrap">
82
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
83
- <h2><?php _e('Empty/Drop Tables', 'wp-dbmanager'); ?></h2>
84
- <br style="clear" />
85
- <table class="widefat">
86
- <thead>
87
- <tr>
88
- <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
89
- <th><?php _e('Empty', 'wp-dbmanager'); ?> <sup><?php _e('1', 'wp-dbmanager'); ?></sup></th>
90
- <th><?php _e('Drop', 'wp-dbmanager'); ?> <sup><?php _e('2', 'wp-dbmanager'); ?></sup></th>
91
- </tr>
92
- </thead>
93
- <?php
94
- foreach($tables as $table_name) {
95
- if($no%2 == 0) {
96
- $style = '';
97
- } else {
98
- $style = ' class="alternate"';
99
- }
100
- $no++;
101
- echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n";
102
- echo "<td><input type=\"radio\" id=\"$table_name-empty\" name=\"emptydrop[$table_name]\" value=\"empty\" />&nbsp;<label for=\"$table_name-empty\">".__('Empty', 'wp-dbmanager').'</label></td>';
103
- echo "<td><input type=\"radio\" id=\"$table_name-drop\" name=\"emptydrop[$table_name]\" value=\"drop\" />&nbsp;<label for=\"$table_name-drop\">".__('Drop', 'wp-dbmanager').'</label></td></tr>';
104
- }
105
- ?>
106
- <tr>
107
- <td colspan="3">
108
- <?php _e('1. EMPTYING a table means all the rows in the table will be deleted. This action is not REVERSIBLE.', 'wp-dbmanager'); ?>
109
- <br />
110
- <?php _e('2. DROPPING a table means deleting the table. This action is not REVERSIBLE.', 'wp-dbmanager'); ?>
111
- </td>
112
- </tr>
113
- <tr>
114
- <td colspan="3" align="center"><input type="submit" name="do" value="<?php _e('Empty/Drop', 'wp-dbmanager'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Empty Or Drop The Selected Databases.\nThis Action Is Not Reversible.\n\n Choose [Cancel] to stop, [Ok] to delete.', 'wp-dbmanager'); ?>')" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
115
- </tr>
116
- </table>
117
- </div>
118
  </form>
1
+ <?php
2
+ ### Check Whether User Can Manage Database
3
+ if(!current_user_can('manage_database')) {
4
+ die('Access Denied');
5
+ }
6
+
7
+
8
+ ### Variables Variables Variables
9
+ $base_name = plugin_basename('wp-dbmanager/database-manager.php');
10
+ $base_page = 'admin.php?page='.$base_name;
11
+ $backup = array();
12
+ $backup_options = get_option('dbmanager_options');
13
+ $backup['date'] = current_time('timestamp');
14
+ $backup['mysqldumppath'] = $backup_options['mysqldumppath'];
15
+ $backup['mysqlpath'] = $backup_options['mysqlpath'];
16
+ $backup['path'] = $backup_options['path'];
17
+
18
+
19
+ ### Form Processing
20
+ if(!empty($_POST['do'])) {
21
+ // Lets Prepare The Variables
22
+ $emptydrop = (!empty($_POST['emptydrop']) ? $_POST['emptydrop'] : array());
23
+ $text = '';
24
+
25
+ // Decide What To Do
26
+ switch($_POST['do']) {
27
+ case __('Empty/Drop', 'wp-dbmanager'):
28
+ check_admin_referer('wp-dbmanager_empty');
29
+ $empty_tables = array();
30
+ $drop_tables = '';
31
+ if(!empty($emptydrop)) {
32
+ foreach($emptydrop as $key => $value) {
33
+ if($value == 'empty') {
34
+ $empty_tables[] = $key;
35
+ } elseif($value == 'drop') {
36
+ $drop_tables .= ', '.$key;
37
+ }
38
+ }
39
+ } else {
40
+ $text = '<font color="red">'.__('No Tables Selected.', 'wp-dbmanager').'</font>';
41
+ }
42
+ $drop_tables = substr($drop_tables, 2);
43
+ if(!empty($empty_tables)) {
44
+ foreach($empty_tables as $empty_table) {
45
+ $empty_query = $wpdb->query("TRUNCATE $empty_table");
46
+ $text .= '<font color="green">'.sprintf(__('Table \'%s\' Emptied', 'wp-dbmanager'), $empty_table).'</font><br />';
47
+ }
48
+ }
49
+ if(!empty($drop_tables)) {
50
+ $drop_query = $wpdb->query("DROP TABLE $drop_tables");
51
+ $text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Dropped', 'wp-dbmanager'), $drop_tables).'</font>';
52
+ }
53
+ break;
54
+ }
55
+ }
56
+
57
+
58
+ ### Show Tables
59
+ $tables = $wpdb->get_col("SHOW TABLES");
60
+ ?>
61
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
62
+ <!-- Empty/Drop Tables -->
63
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
64
+ <?php wp_nonce_field('wp-dbmanager_empty'); ?>
65
+ <div class="wrap">
66
+ <h2><?php _e('Empty/Drop Tables', 'wp-dbmanager'); ?></h2>
67
+ <br style="clear" />
68
+ <table class="widefat">
69
+ <thead>
70
+ <tr>
71
+ <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
72
+ <th><?php _e('Empty', 'wp-dbmanager'); ?> <sup><?php _e('1', 'wp-dbmanager'); ?></sup></th>
73
+ <th><?php _e('Drop', 'wp-dbmanager'); ?> <sup><?php _e('2', 'wp-dbmanager'); ?></sup></th>
74
+ </tr>
75
+ </thead>
76
+ <?php
77
+ $no = 0;
78
+ foreach($tables as $table_name) {
79
+ if($no%2 == 0) {
80
+ $style = '';
81
+ } else {
82
+ $style = ' class="alternate"';
83
+ }
84
+ $no++;
85
+ echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n";
86
+ echo "<td><input type=\"radio\" id=\"$table_name-empty\" name=\"emptydrop[$table_name]\" value=\"empty\" />&nbsp;<label for=\"$table_name-empty\">".__('Empty', 'wp-dbmanager').'</label></td>';
87
+ echo "<td><input type=\"radio\" id=\"$table_name-drop\" name=\"emptydrop[$table_name]\" value=\"drop\" />&nbsp;<label for=\"$table_name-drop\">".__('Drop', 'wp-dbmanager').'</label></td></tr>';
88
+ }
89
+ ?>
90
+ <tr>
91
+ <td colspan="3">
92
+ <?php _e('1. EMPTYING a table means all the rows in the table will be deleted. This action is not REVERSIBLE.', 'wp-dbmanager'); ?>
93
+ <br />
94
+ <?php _e('2. DROPPING a table means deleting the table. This action is not REVERSIBLE.', 'wp-dbmanager'); ?>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td colspan="3" align="center"><input type="submit" name="do" value="<?php _e('Empty/Drop', 'wp-dbmanager'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Empty Or Drop The Selected Databases.\nThis Action Is Not Reversible.\n\n Choose [Cancel] to stop, [Ok] to delete.', 'wp-dbmanager'); ?>')" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
99
+ </tr>
100
+ </table>
101
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  </form>
database-manage.php CHANGED
@@ -1,22 +1,4 @@
1
  <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Restore |
14
- | - wp-content/plugins/wp-dbmanager/database-restore.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
  ### Check Whether User Can Manage Database
21
  if(!current_user_can('manage_database')) {
22
  die('Access Denied');
@@ -36,12 +18,13 @@ $backup['password'] = str_replace('$', '\$', DB_PASSWORD);
36
  $backup['charset'] = ' --default-character-set="utf8"';
37
 
38
 
39
- ### Form Processing
40
- if($_POST['do']) {
41
  check_admin_referer('wp-dbmanager_manage');
42
  // Lets Prepare The Variables
43
  $database_file = trim($_POST['database_file']);
44
  $nice_file_date = mysql2date(sprintf(__('%s @ %s', 'wp-dbmanager'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', substr($database_file, 0, 10)));
 
45
 
46
  // Decide What To Do
47
  switch($_POST['do']) {
@@ -50,7 +33,7 @@ if($_POST['do']) {
50
  $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
51
  $backup['host'] = DB_HOST;
52
  $backup['port'] = '';
53
- $backup['sock'] = '';
54
  if(strpos(DB_HOST, ':') !== false) {
55
  $db_host = explode(':', DB_HOST);
56
  $backup['host'] = $db_host[0];
@@ -77,52 +60,12 @@ if($_POST['do']) {
77
  break;
78
  case __('E-Mail', 'wp-dbmanager'):
79
  if(!empty($database_file)) {
80
- // Get And Read The Database Backup File
81
- $file_path = $backup['path'].'/'.$database_file;
82
- $file_size = format_size(filesize($file_path));
83
- $file_date = $nice_file_date;
84
- $file = fopen($file_path,'rb');
85
- $file_data = fread($file,filesize($file_path));
86
- fclose($file);
87
- $file_data = chunk_split(base64_encode($file_data));
88
- // Create Mail To, Mail Subject And Mail Header
89
- if(!empty($_POST['email_to'])) {
90
- $mail_to = trim($_POST['email_to']);
91
- } else {
92
- $mail_to = get_option('admin_email');
93
- }
94
- $mail_subject = sprintf(__('%s Database Backup File For %s', 'wp-dbmanager'), wp_specialchars_decode(get_option('blogname')), $file_date);
95
- $mail_header = 'From: '.wp_specialchars_decode(get_option('blogname')).' Administrator <'.get_option('admin_email').'>';
96
- // MIME Boundary
97
- $random_time = md5(time());
98
- $mime_boundary = "==WP-DBManager- $random_time";
99
- // Create Mail Header And Mail Message
100
- $mail_header .= "\nMIME-Version: 1.0\n" .
101
- "Content-Type: multipart/mixed;\n" .
102
- " boundary=\"{$mime_boundary}\"";
103
- $mail_message = __('Website Name:', 'wp-dbmanager').' '.wp_specialchars_decode(get_option('blogname'))."\n".
104
- __('Website URL:', 'wp-dbmanager').' '.get_bloginfo('siteurl')."\n".
105
- __('Backup File Name:', 'wp-dbmanager').' '.$database_file."\n".
106
- __('Backup File Date:', 'wp-dbmanager').' '.$file_date."\n".
107
- __('Backup File Size:', 'wp-dbmanager').' '.$file_size."\n\n".
108
- __('With Regards,', 'wp-dbmanager')."\n".
109
- wp_specialchars_decode(get_option('blogname')).' '. __('Administrator', 'wp-dbmanager')."\n".
110
- get_bloginfo('siteurl');
111
- $mail_message = "This is a multi-part message in MIME format.\n\n" .
112
- "--{$mime_boundary}\n" .
113
- "Content-Type: text/plain; charset=\"utf-8\"\n" .
114
- "Content-Transfer-Encoding: 7bit\n\n".$mail_message."\n\n";
115
- $mail_message .= "--{$mime_boundary}\n" .
116
- "Content-Type: application/octet-stream;\n" .
117
- " name=\"$database_file\"\n" .
118
- "Content-Disposition: attachment;\n" .
119
- " filename=\"$database_file\"\n" .
120
- "Content-Transfer-Encoding: base64\n\n" .
121
- $file_data."\n\n--{$mime_boundary}--\n";
122
- if(mail($mail_to, $mail_subject, $mail_message, $mail_header)) {
123
- $text .= '<font color="green">'.sprintf(__('Database Backup File For \'%s\' Successfully E-Mailed To \'%s\'', 'wp-dbmanager'), $file_date, $mail_to).'</font><br />';
124
  } else {
125
- $text = '<font color="red">'.sprintf(__('Unable To E-Mail Database Backup File For \'%s\' To \'%s\'', 'wp-dbmanager'), $file_date, $mail_to).'</font>';
126
  }
127
  } else {
128
  $text = '<font color="red">'.__('No Backup Database File Selected', 'wp-dbmanager').'</font>';
@@ -156,9 +99,8 @@ if($_POST['do']) {
156
  <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
157
  <?php wp_nonce_field('wp-dbmanager_manage'); ?>
158
  <div class="wrap">
159
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
160
  <h2><?php _e('Manage Backup Database', 'wp-dbmanager'); ?></h2>
161
- <p><?php _e('Choose A Backup Date To E-Mail, Restore, Download Or Delete', 'wp-dbmanager'); ?></p>
162
  <table class="widefat">
163
  <thead>
164
  <tr>
@@ -170,19 +112,21 @@ if($_POST['do']) {
170
  </tr>
171
  </thead>
172
  <?php
 
 
173
  if(!is_emtpy_folder($backup['path'])) {
174
  if ($handle = opendir($backup['path'])) {
175
  $database_files = array();
176
- while (false !== ($file = readdir($handle))) {
177
  if ($file != '.' && $file != '..' && $file != '.htaccess' && (file_ext($file) == 'sql' || file_ext($file) == 'gz')) {
178
  $database_files[] = $file;
179
- }
180
  }
181
  closedir($handle);
182
  sort($database_files);
183
  for($i = (sizeof($database_files)-1); $i > -1; $i--) {
184
  if($no%2 == 0) {
185
- $style = '';
186
  } else {
187
  $style = ' class="alternate"';
188
  }
@@ -221,7 +165,7 @@ if($_POST['do']) {
221
  <input type="submit" name="do" value="<?php _e('Restore', 'wp-dbmanager'); ?>" onclick="return confirm('<?php _e('You Are About To Restore A Database.\nThis Action Is Not Reversible.\nAny Data Inserted After The Backup Date Will Be Gone.\n\n Choose [Cancel] to stop, [Ok] to restore.', 'wp-dbmanager'); ?>')" class="button" />&nbsp;&nbsp;
222
  <input type="submit" class="button" name="do" value="<?php _e('Delete', 'wp-dbmanager'); ?>" onclick="return confirm('<?php _e('You Are About To Delete The Selected Database Backup Files.\nThis Action Is Not Reversible.\n\n Choose [Cancel] to stop, [Ok] to delete.', 'wp-dbmanager'); ?>')" />&nbsp;&nbsp;
223
  <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
224
- </tr>
225
  </table>
226
  </div>
227
  </form>
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  ### Check Whether User Can Manage Database
3
  if(!current_user_can('manage_database')) {
4
  die('Access Denied');
18
  $backup['charset'] = ' --default-character-set="utf8"';
19
 
20
 
21
+ ### Form Processing
22
+ if( !empty( $_POST['do'] ) ) {
23
  check_admin_referer('wp-dbmanager_manage');
24
  // Lets Prepare The Variables
25
  $database_file = trim($_POST['database_file']);
26
  $nice_file_date = mysql2date(sprintf(__('%s @ %s', 'wp-dbmanager'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', substr($database_file, 0, 10)));
27
+ $text = '';
28
 
29
  // Decide What To Do
30
  switch($_POST['do']) {
33
  $brace = (substr(PHP_OS, 0, 3) == 'WIN') ? '"' : '';
34
  $backup['host'] = DB_HOST;
35
  $backup['port'] = '';
36
+ $backup['sock'] = '';
37
  if(strpos(DB_HOST, ':') !== false) {
38
  $db_host = explode(':', DB_HOST);
39
  $backup['host'] = $db_host[0];
60
  break;
61
  case __('E-Mail', 'wp-dbmanager'):
62
  if(!empty($database_file)) {
63
+ $to = ( !empty( $_POST['email_to'] ) ? sanitize_email( $_POST['email_to'] ) : get_option( 'admin_email' ) );
64
+
65
+ if( dbmanager_email_backup( $to, $backup['path'].'/'.$database_file ) ) {
66
+ $text .= '<font color="green">'.sprintf(__('Database Backup File For \'%s\' Successfully E-Mailed To \'%s\'', 'wp-dbmanager'), $nice_file_date, $to).'</font><br />';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  } else {
68
+ $text = '<font color="red">'.sprintf(__('Unable To E-Mail Database Backup File For \'%s\' To \'%s\'', 'wp-dbmanager'), $nice_file_date, $to).'</font>';
69
  }
70
  } else {
71
  $text = '<font color="red">'.__('No Backup Database File Selected', 'wp-dbmanager').'</font>';
99
  <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
100
  <?php wp_nonce_field('wp-dbmanager_manage'); ?>
101
  <div class="wrap">
 
102
  <h2><?php _e('Manage Backup Database', 'wp-dbmanager'); ?></h2>
103
+ <p><?php _e('Choose A Backup Date To E-Mail, Restore, Download Or Delete', 'wp-dbmanager'); ?></p>
104
  <table class="widefat">
105
  <thead>
106
  <tr>
112
  </tr>
113
  </thead>
114
  <?php
115
+ $no = 0;
116
+ $totalsize = 0;
117
  if(!is_emtpy_folder($backup['path'])) {
118
  if ($handle = opendir($backup['path'])) {
119
  $database_files = array();
120
+ while (false !== ($file = readdir($handle))) {
121
  if ($file != '.' && $file != '..' && $file != '.htaccess' && (file_ext($file) == 'sql' || file_ext($file) == 'gz')) {
122
  $database_files[] = $file;
123
+ }
124
  }
125
  closedir($handle);
126
  sort($database_files);
127
  for($i = (sizeof($database_files)-1); $i > -1; $i--) {
128
  if($no%2 == 0) {
129
+ $style = '';
130
  } else {
131
  $style = ' class="alternate"';
132
  }
165
  <input type="submit" name="do" value="<?php _e('Restore', 'wp-dbmanager'); ?>" onclick="return confirm('<?php _e('You Are About To Restore A Database.\nThis Action Is Not Reversible.\nAny Data Inserted After The Backup Date Will Be Gone.\n\n Choose [Cancel] to stop, [Ok] to restore.', 'wp-dbmanager'); ?>')" class="button" />&nbsp;&nbsp;
166
  <input type="submit" class="button" name="do" value="<?php _e('Delete', 'wp-dbmanager'); ?>" onclick="return confirm('<?php _e('You Are About To Delete The Selected Database Backup Files.\nThis Action Is Not Reversible.\n\n Choose [Cancel] to stop, [Ok] to delete.', 'wp-dbmanager'); ?>')" />&nbsp;&nbsp;
167
  <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
168
+ </tr>
169
  </table>
170
  </div>
171
  </form>
database-manager.php CHANGED
@@ -1,129 +1,115 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Manager |
14
- | - wp-content/plugins/wp-dbmanager/database-manager.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Database
21
- if(!current_user_can('manage_database')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-dbmanager/database-manager.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $backup = array();
30
- $backup_options = get_option('dbmanager_options');
31
- $backup['date'] = current_time('timestamp');
32
- $backup['mysqldumppath'] = $backup_options['mysqldumppath'];
33
- $backup['mysqlpath'] = $backup_options['mysqlpath'];
34
- $backup['path'] = $backup_options['path'];
35
-
36
-
37
- ### Get MYSQL Version
38
- $sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
39
- ?>
40
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
41
- <!-- Database Information -->
42
- <div class="wrap">
43
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
44
- <h2><?php _e('Database', 'wp-dbmanager'); ?></h2>
45
- <h3><?php _e('Database Information', 'wp-dbmanager'); ?></h3>
46
- <br style="clear" />
47
- <table class="widefat">
48
- <thead>
49
- <tr>
50
- <th><?php _e('Setting', 'wp-dbmanager'); ?></th>
51
- <th><?php _e('Value', 'wp-dbmanager'); ?></th>
52
- </tr>
53
- </thead>
54
- <tr>
55
- <td><?php _e('Database Host', 'wp-dbmanager'); ?></td>
56
- <td><?php echo DB_HOST; ?></td>
57
- </tr>
58
- <tr class="alternate">
59
- <td><?php _e('Database Name', 'wp-dbmanager'); ?></td>
60
- <td><?php echo DB_NAME; ?></td>
61
- </tr>
62
- <tr>
63
- <td><?php _e('Database User', 'wp-dbmanager'); ?></td>
64
- <td><?php echo DB_USER; ?></td>
65
- </tr>
66
- <tr class="alternate">
67
- <td><?php _e('Database Type', 'wp-dbmanager'); ?></td>
68
- <td>MYSQL</td>
69
- </tr>
70
- <tr>
71
- <td><?php _e('Database Version', 'wp-dbmanager'); ?></td>
72
- <td>v<?php echo $sqlversion; ?></td>
73
- </tr>
74
- </table>
75
- </div>
76
- <p>&nbsp;</p>
77
-
78
- <div class="wrap">
79
- <h3><?php _e('Tables Information', 'wp-dbmanager'); ?></h3>
80
- <br style="clear" />
81
- <table class="widefat">
82
- <thead>
83
- <tr>
84
- <th><?php _e('No.', 'wp-dbmanager'); ?></th>
85
- <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
86
- <th><?php _e('Records', 'wp-dbmanager'); ?></th>
87
- <th><?php _e('Data Usage', 'wp-dbmanager'); ?></th>
88
- <th><?php _e('Index Usage', 'wp-dbmanager'); ?></th>
89
- <th><?php _e('Overhead', 'wp-dbmanager'); ?></th>
90
- </tr>
91
- </thead>
92
- <?php
93
- // If MYSQL Version More Than 3.23, Get More Info
94
- if($sqlversion >= '3.23') {
95
- $tablesstatus = $wpdb->get_results("SHOW TABLE STATUS");
96
- foreach($tablesstatus as $tablestatus) {
97
- if($no%2 == 0) {
98
- $style = '';
99
- } else {
100
- $style = ' class="alternate"';
101
- }
102
- $no++;
103
- echo "<tr$style>\n";
104
- echo '<td>'.number_format_i18n($no).'</td>'."\n";
105
- echo "<td>$tablestatus->Name</td>\n";
106
- echo '<td>'.number_format_i18n($tablestatus->Rows).'</td>'."\n";
107
- echo '<td>'.format_size($tablestatus->Data_length).'</td>'."\n";
108
- echo '<td>'.format_size($tablestatus->Index_length).'</td>'."\n";;
109
- echo '<td>'.format_size($tablestatus->Data_free).'</td>'."\n";
110
- $row_usage += $tablestatus->Rows;
111
- $data_usage += $tablestatus->Data_length;
112
- $index_usage += $tablestatus->Index_length;
113
- $overhead_usage += $tablestatus->Data_free;
114
- echo '</tr>'."\n";
115
- }
116
- echo '<tr class="thead">'."\n";
117
- echo '<th>'.__('Total:', 'wp-dbmanager').'</th>'."\n";
118
- echo '<th>'.sprintf(_n('%s Table', '%s Tables', $no, 'wp-dbmanager'), number_format_i18n($no)).'</th>'."\n";
119
- echo '<th>'.sprintf(_n('%s Record', '%s Records', $row_usage, 'wp-dbmanager'), number_format_i18n($row_usage)).'</th>'."\n";
120
- echo '<th>'.format_size($data_usage).'</th>'."\n";
121
- echo '<th>'.format_size($index_usage).'</th>'."\n";
122
- echo '<th>'.format_size($overhead_usage).'</th>'."\n";
123
- echo '</tr>';
124
- } else {
125
- echo '<tr><td colspan="6" align="center"><strong>'.__('Could Not Show Table Status Due To Your MYSQL Version Is Lower Than 3.23.', 'wp-dbmanager').'</strong></td></tr>';
126
- }
127
- ?>
128
- </table>
129
  </div>
1
+ <?php
2
+ ### Check Whether User Can Manage Database
3
+ if(!current_user_can('manage_database')) {
4
+ die('Access Denied');
5
+ }
6
+
7
+
8
+ ### Variables Variables Variables
9
+ $base_name = plugin_basename('wp-dbmanager/database-manager.php');
10
+ $base_page = 'admin.php?page='.$base_name;
11
+ $backup = array();
12
+ $backup_options = get_option('dbmanager_options');
13
+ $backup['date'] = current_time('timestamp');
14
+ $backup['mysqldumppath'] = $backup_options['mysqldumppath'];
15
+ $backup['mysqlpath'] = $backup_options['mysqlpath'];
16
+ $backup['path'] = $backup_options['path'];
17
+
18
+
19
+ ### Get MYSQL Version
20
+ $sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
21
+ ?>
22
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
23
+ <!-- Database Information -->
24
+ <div class="wrap">
25
+ <h2><?php _e('Database', 'wp-dbmanager'); ?></h2>
26
+ <h3><?php _e('Database Information', 'wp-dbmanager'); ?></h3>
27
+ <br style="clear" />
28
+ <table class="widefat">
29
+ <thead>
30
+ <tr>
31
+ <th><?php _e('Setting', 'wp-dbmanager'); ?></th>
32
+ <th><?php _e('Value', 'wp-dbmanager'); ?></th>
33
+ </tr>
34
+ </thead>
35
+ <tr>
36
+ <td><?php _e('Database Host', 'wp-dbmanager'); ?></td>
37
+ <td><?php echo DB_HOST; ?></td>
38
+ </tr>
39
+ <tr class="alternate">
40
+ <td><?php _e('Database Name', 'wp-dbmanager'); ?></td>
41
+ <td><?php echo DB_NAME; ?></td>
42
+ </tr>
43
+ <tr>
44
+ <td><?php _e('Database User', 'wp-dbmanager'); ?></td>
45
+ <td><?php echo DB_USER; ?></td>
46
+ </tr>
47
+ <tr class="alternate">
48
+ <td><?php _e('Database Type', 'wp-dbmanager'); ?></td>
49
+ <td>MYSQL</td>
50
+ </tr>
51
+ <tr>
52
+ <td><?php _e('Database Version', 'wp-dbmanager'); ?></td>
53
+ <td>v<?php echo $sqlversion; ?></td>
54
+ </tr>
55
+ </table>
56
+ </div>
57
+ <p>&nbsp;</p>
58
+
59
+ <div class="wrap">
60
+ <h3><?php _e('Tables Information', 'wp-dbmanager'); ?></h3>
61
+ <br style="clear" />
62
+ <table class="widefat">
63
+ <thead>
64
+ <tr>
65
+ <th><?php _e('No.', 'wp-dbmanager'); ?></th>
66
+ <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
67
+ <th><?php _e('Records', 'wp-dbmanager'); ?></th>
68
+ <th><?php _e('Data Usage', 'wp-dbmanager'); ?></th>
69
+ <th><?php _e('Index Usage', 'wp-dbmanager'); ?></th>
70
+ <th><?php _e('Overhead', 'wp-dbmanager'); ?></th>
71
+ </tr>
72
+ </thead>
73
+ <?php
74
+ // If MYSQL Version More Than 3.23, Get More Info
75
+ if($sqlversion >= '3.23') {
76
+ $no = 0;
77
+ $row_usage = 0;
78
+ $data_usage = 0;
79
+ $index_usage = 0;
80
+ $overhead_usage = 0;
81
+ $tablesstatus = $wpdb->get_results("SHOW TABLE STATUS");
82
+ foreach($tablesstatus as $tablestatus) {
83
+ if($no%2 == 0) {
84
+ $style = '';
85
+ } else {
86
+ $style = ' class="alternate"';
87
+ }
88
+ $no++;
89
+ echo "<tr$style>\n";
90
+ echo '<td>'.number_format_i18n($no).'</td>'."\n";
91
+ echo "<td>$tablestatus->Name</td>\n";
92
+ echo '<td>'.number_format_i18n($tablestatus->Rows).'</td>'."\n";
93
+ echo '<td>'.format_size($tablestatus->Data_length).'</td>'."\n";
94
+ echo '<td>'.format_size($tablestatus->Index_length).'</td>'."\n";;
95
+ echo '<td>'.format_size($tablestatus->Data_free).'</td>'."\n";
96
+ $row_usage += $tablestatus->Rows;
97
+ $data_usage += $tablestatus->Data_length;
98
+ $index_usage += $tablestatus->Index_length;
99
+ $overhead_usage += $tablestatus->Data_free;
100
+ echo '</tr>'."\n";
101
+ }
102
+ echo '<tr class="thead">'."\n";
103
+ echo '<th>'.__('Total:', 'wp-dbmanager').'</th>'."\n";
104
+ echo '<th>'.sprintf(_n('%s Table', '%s Tables', $no, 'wp-dbmanager'), number_format_i18n($no)).'</th>'."\n";
105
+ echo '<th>'.sprintf(_n('%s Record', '%s Records', $row_usage, 'wp-dbmanager'), number_format_i18n($row_usage)).'</th>'."\n";
106
+ echo '<th>'.format_size($data_usage).'</th>'."\n";
107
+ echo '<th>'.format_size($index_usage).'</th>'."\n";
108
+ echo '<th>'.format_size($overhead_usage).'</th>'."\n";
109
+ echo '</tr>';
110
+ } else {
111
+ echo '<tr><td colspan="6" align="center"><strong>'.__('Could Not Show Table Status Due To Your MYSQL Version Is Lower Than 3.23.', 'wp-dbmanager').'</strong></td></tr>';
112
+ }
113
+ ?>
114
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  </div>
database-optimize.php CHANGED
@@ -1,101 +1,84 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Optimize |
14
- | - wp-content/plugins/wp-dbmanager/database-optimize.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Database
21
- if(!current_user_can('manage_database')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-dbmanager/database-manager.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
-
30
- ### Form Processing
31
- if($_POST['do']) {
32
- // Lets Prepare The Variables
33
- $optimize = $_POST['optimize'];
34
-
35
- // Decide What To Do
36
- switch($_POST['do']) {
37
- case __('Optimize', 'wp-dbmanager'):
38
- check_admin_referer('wp-dbmanager_optimize');
39
- if(!empty($optimize)) {
40
- foreach($optimize as $key => $value) {
41
- if($value == 'yes') {
42
- $tables_string .= '`, `'.$key;
43
- }
44
- }
45
- } else {
46
- $text = '<font color="red">'.__('No Tables Selected', 'wp-dbmanager').'</font>';
47
- }
48
- $selected_tables = substr($tables_string, 3);
49
- $selected_tables .= '`';
50
- if(!empty($selected_tables)) {
51
- $optimize2 = $wpdb->query("OPTIMIZE TABLE $selected_tables");
52
- if(!$optimize2) {
53
- $text = '<font color="red">'.sprintf(__('Table(s) \'%s\' NOT Optimized', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
54
- } else {
55
- $text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Optimized', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
56
- }
57
- }
58
- break;
59
- }
60
- }
61
-
62
-
63
- ### Show Tables
64
- $tables = $wpdb->get_col("SHOW TABLES");
65
- ?>
66
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
67
- <!-- Optimize Database -->
68
- <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
69
- <?php wp_nonce_field('wp-dbmanager_optimize'); ?>
70
- <div class="wrap">
71
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
72
- <h2><?php _e('Optimize Database', 'wp-dbmanager'); ?></h2>
73
- <br style="clear" />
74
- <table class="widefat">
75
- <thead>
76
- <tr>
77
- <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
78
- <th><?php _e('Options', 'wp-dbmanager'); ?></th>
79
- </tr>
80
- </thead>
81
- <?php
82
- foreach($tables as $table_name) {
83
- if($no%2 == 0) {
84
- $style = '';
85
- } else {
86
- $style = ' class="alternate"';
87
- }
88
- $no++;
89
- echo "<tr$style><th align=\"left\" scope=\"row\">$table_name</th>\n";
90
- echo "<td><input type=\"radio\" id=\"$table_name-no\" name=\"optimize[$table_name]\" value=\"no\" />&nbsp;<label for=\"$table_name-no\">".__('No', 'wp-dbmanager')."</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" id=\"$table_name-yes\" name=\"optimize[$table_name]\" value=\"yes\" checked=\"checked\" />&nbsp;<label for=\"$table_name-yes\">".__('Yes', 'wp-dbmanager').'</label></td></tr>';
91
- }
92
- ?>
93
- <tr>
94
- <td colspan="2" align="center"><?php _e('Database should be optimize once every month.', 'wp-dbmanager'); ?></td>
95
- </tr>
96
- <tr>
97
- <td colspan="2" align="center"><input type="submit" name="do" value="<?php _e('Optimize', 'wp-dbmanager'); ?>" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
98
- </tr>
99
- </table>
100
- </div>
101
  </form>
1
+ <?php
2
+ ### Check Whether User Can Manage Database
3
+ if(!current_user_can('manage_database')) {
4
+ die('Access Denied');
5
+ }
6
+
7
+
8
+ ### Variables Variables Variables
9
+ $base_name = plugin_basename('wp-dbmanager/database-manager.php');
10
+ $base_page = 'admin.php?page='.$base_name;
11
+
12
+ ### Form Processing
13
+ if(!empty($_POST['do'])) {
14
+ // Lets Prepare The Variables
15
+ $optimize = $_POST['optimize'];
16
+
17
+ // Decide What To Do
18
+ switch($_POST['do']) {
19
+ case __('Optimize', 'wp-dbmanager'):
20
+ check_admin_referer('wp-dbmanager_optimize');
21
+ if(!empty($optimize)) {
22
+ $tables_string = '';
23
+ foreach($optimize as $key => $value) {
24
+ if($value == 'yes') {
25
+ $tables_string .= '`, `'.$key;
26
+ }
27
+ }
28
+ } else {
29
+ $text = '<font color="red">'.__('No Tables Selected', 'wp-dbmanager').'</font>';
30
+ }
31
+ $selected_tables = substr($tables_string, 3);
32
+ $selected_tables .= '`';
33
+ if(!empty($selected_tables)) {
34
+ $optimize2 = $wpdb->query("OPTIMIZE TABLE $selected_tables");
35
+ if(!$optimize2) {
36
+ $text = '<font color="red">'.sprintf(__('Table(s) \'%s\' NOT Optimized', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
37
+ } else {
38
+ $text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Optimized', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
39
+ }
40
+ }
41
+ break;
42
+ }
43
+ }
44
+
45
+
46
+ ### Show Tables
47
+ $tables = $wpdb->get_col("SHOW TABLES");
48
+ ?>
49
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
50
+ <!-- Optimize Database -->
51
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
52
+ <?php wp_nonce_field('wp-dbmanager_optimize'); ?>
53
+ <div class="wrap">
54
+ <h2><?php _e('Optimize Database', 'wp-dbmanager'); ?></h2>
55
+ <br style="clear" />
56
+ <table class="widefat">
57
+ <thead>
58
+ <tr>
59
+ <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
60
+ <th><?php _e('Options', 'wp-dbmanager'); ?></th>
61
+ </tr>
62
+ </thead>
63
+ <?php
64
+ $no = 0;
65
+ foreach($tables as $table_name) {
66
+ if($no%2 == 0) {
67
+ $style = '';
68
+ } else {
69
+ $style = ' class="alternate"';
70
+ }
71
+ $no++;
72
+ echo "<tr$style><th align=\"left\" scope=\"row\">$table_name</th>\n";
73
+ echo "<td><input type=\"radio\" id=\"$table_name-no\" name=\"optimize[$table_name]\" value=\"no\" />&nbsp;<label for=\"$table_name-no\">".__('No', 'wp-dbmanager')."</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" id=\"$table_name-yes\" name=\"optimize[$table_name]\" value=\"yes\" checked=\"checked\" />&nbsp;<label for=\"$table_name-yes\">".__('Yes', 'wp-dbmanager').'</label></td></tr>';
74
+ }
75
+ ?>
76
+ <tr>
77
+ <td colspan="2" align="center"><?php _e('Database should be optimize once every month.', 'wp-dbmanager'); ?></td>
78
+ </tr>
79
+ <tr>
80
+ <td colspan="2" align="center"><input type="submit" name="do" value="<?php _e('Optimize', 'wp-dbmanager'); ?>" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
81
+ </tr>
82
+ </table>
83
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  </form>
database-repair.php CHANGED
@@ -1,98 +1,82 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Repair |
14
- | - wp-content/plugins/wp-dbmanager/database-repair.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Database
21
- if(!current_user_can('manage_database')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-dbmanager/database-manager.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
-
30
- ### Form Processing
31
- if($_POST['do']) {
32
- // Lets Prepare The Variables
33
- $repair = $_POST['repair'];
34
-
35
- // Decide What To Do
36
- switch($_POST['do']) {
37
- case __('Repair', 'wp-dbmanager'):
38
- check_admin_referer('wp-dbmanager_repair');
39
- if(!empty($repair)) {
40
- foreach($repair as $key => $value) {
41
- if($value == 'yes') {
42
- $tables_string .= '`, `'.$key;
43
- }
44
- }
45
- } else {
46
- $text = '<font color="red">'.__('No Tables Selected', 'wp-dbmanager').'</font>';
47
- }
48
- $selected_tables = substr($tables_string, 2);
49
- $selected_tables .= '`';
50
- if(!empty($selected_tables)) {
51
- $repair2 = $wpdb->query("REPAIR TABLE $selected_tables");
52
- if(!$repair2) {
53
- $text = '<font color="red">'.sprintf(__('Table(s) \'%s\' NOT Repaired', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
54
- } else {
55
- $text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Repaired', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
56
- }
57
- }
58
- break;
59
- }
60
- }
61
-
62
-
63
- ### Show Tables
64
- $tables = $wpdb->get_col("SHOW TABLES");
65
- ?>
66
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
67
- <!-- Repair Database -->
68
- <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
69
- <?php wp_nonce_field('wp-dbmanager_repair'); ?>
70
- <div class="wrap">
71
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
72
- <h2><?php _e('Repair Database', 'wp-dbmanager'); ?></h2>
73
- <br style="clear" />
74
- <table class="widefat">
75
- <thead>
76
- <tr>
77
- <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
78
- <th><?php _e('Options', 'wp-dbmanager'); ?></th>
79
- </tr>
80
- </thead>
81
- <?php
82
- foreach($tables as $table_name) {
83
- if($no%2 == 0) {
84
- $style = '';
85
- } else {
86
- $style = ' class="alternate"';
87
- }
88
- $no++;
89
- echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n";
90
- echo "<td><input type=\"radio\" id=\"$table_name-no\" name=\"repair[$table_name]\" value=\"no\" />&nbsp;<label for=\"$table_name-no\">".__('No', 'wp-dbmanager')."</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" id=\"$table_name-yes\" name=\"repair[$table_name]\" value=\"yes\" checked=\"checked\" />&nbsp;<label for=\"$table_name-yes\">".__('Yes', 'wp-dbmanager').'</label></td></tr>';
91
- }
92
- ?>
93
- <tr>
94
- <td colspan="2" align="center"><input type="submit" name="do" value="<?php _e('Repair', 'wp-dbmanager'); ?>" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
95
- </tr>
96
- </table>
97
- </div>
98
  </form>
1
+ <?php
2
+ ### Check Whether User Can Manage Database
3
+ if(!current_user_can('manage_database')) {
4
+ die('Access Denied');
5
+ }
6
+
7
+
8
+ ### Variables Variables Variables
9
+ $base_name = plugin_basename('wp-dbmanager/database-manager.php');
10
+ $base_page = 'admin.php?page='.$base_name;
11
+
12
+ ### Form Processing
13
+ if(!empty($_POST['do'])) {
14
+ // Lets Prepare The Variables
15
+ $repair = $_POST['repair'];
16
+ $text = '';
17
+
18
+ // Decide What To Do
19
+ switch($_POST['do']) {
20
+ case __('Repair', 'wp-dbmanager'):
21
+ check_admin_referer('wp-dbmanager_repair');
22
+ if(!empty($repair)) {
23
+ $tables_string = '';
24
+ foreach($repair as $key => $value) {
25
+ if($value == 'yes') {
26
+ $tables_string .= '`, `'.$key;
27
+ }
28
+ }
29
+ } else {
30
+ $text = '<font color="red">'.__('No Tables Selected', 'wp-dbmanager').'</font>';
31
+ }
32
+ $selected_tables = substr($tables_string, 2);
33
+ $selected_tables .= '`';
34
+ if(!empty($selected_tables)) {
35
+ $repair2 = $wpdb->query("REPAIR TABLE $selected_tables");
36
+ if(!$repair2) {
37
+ $text = '<font color="red">'.sprintf(__('Table(s) \'%s\' NOT Repaired', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
38
+ } else {
39
+ $text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Repaired', 'wp-dbmanager'), str_replace('`', '', $selected_tables)).'</font>';
40
+ }
41
+ }
42
+ break;
43
+ }
44
+ }
45
+
46
+
47
+ ### Show Tables
48
+ $tables = $wpdb->get_col("SHOW TABLES");
49
+ ?>
50
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
51
+ <!-- Repair Database -->
52
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
53
+ <?php wp_nonce_field('wp-dbmanager_repair'); ?>
54
+ <div class="wrap">
55
+ <h2><?php _e('Repair Database', 'wp-dbmanager'); ?></h2>
56
+ <br style="clear" />
57
+ <table class="widefat">
58
+ <thead>
59
+ <tr>
60
+ <th><?php _e('Tables', 'wp-dbmanager'); ?></th>
61
+ <th><?php _e('Options', 'wp-dbmanager'); ?></th>
62
+ </tr>
63
+ </thead>
64
+ <?php
65
+ $no = 0;
66
+ foreach($tables as $table_name) {
67
+ if($no%2 == 0) {
68
+ $style = '';
69
+ } else {
70
+ $style = ' class="alternate"';
71
+ }
72
+ $no++;
73
+ echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n";
74
+ echo "<td><input type=\"radio\" id=\"$table_name-no\" name=\"repair[$table_name]\" value=\"no\" />&nbsp;<label for=\"$table_name-no\">".__('No', 'wp-dbmanager')."</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"radio\" id=\"$table_name-yes\" name=\"repair[$table_name]\" value=\"yes\" checked=\"checked\" />&nbsp;<label for=\"$table_name-yes\">".__('Yes', 'wp-dbmanager').'</label></td></tr>';
75
+ }
76
+ ?>
77
+ <tr>
78
+ <td colspan="2" align="center"><input type="submit" name="do" value="<?php _e('Repair', 'wp-dbmanager'); ?>" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
79
+ </tr>
80
+ </table>
81
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  </form>
database-run.php CHANGED
@@ -1,109 +1,91 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Database Run Query |
14
- | - wp-content/plugins/wp-dbmanager/database-run.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Database
21
- if(!current_user_can('manage_database')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-dbmanager/database-manager.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $backup = array();
30
- $backup_options = get_option('dbmanager_options');
31
- $backup['date'] = current_time('timestamp');
32
- $backup['mysqldumppath'] = $backup_options['mysqldumppath'];
33
- $backup['mysqlpath'] = $backup_options['mysqlpath'];
34
- $backup['path'] = $backup_options['path'];
35
-
36
-
37
- ### Form Processing
38
- if($_POST['do']) {
39
- // Decide What To Do
40
- switch($_POST['do']) {
41
- case __('Run', 'wp-dbmanager'):
42
- check_admin_referer('wp-dbmanager_run');
43
- $sql_queries2 = trim($_POST['sql_query']);
44
- $totalquerycount = 0;
45
- $successquery = 0;
46
- if($sql_queries2) {
47
- $sql_queries = array();
48
- $sql_queries2 = explode("\n", $sql_queries2);
49
- foreach($sql_queries2 as $sql_query2) {
50
- $sql_query2 = trim(stripslashes($sql_query2));
51
- $sql_query2 = preg_replace("/[\r\n]+/", '', $sql_query2);
52
- if(!empty($sql_query2)) {
53
- $sql_queries[] = $sql_query2;
54
- }
55
- }
56
- if($sql_queries) {
57
- foreach($sql_queries as $sql_query) {
58
- if (preg_match("/^\\s*(insert|update|replace|delete|create|alter) /i",$sql_query)) {
59
- $run_query = $wpdb->query($sql_query);
60
- if(!$run_query) {
61
- $text .= "<span dir=\"ltr\"><font color=\"red\">$sql_query</font></span><br />";
62
- } else {
63
- $successquery++;
64
- $text .= "<span dir=\"ltr\"><font color=\"green\">$sql_query</font></span><br />";
65
- }
66
- $totalquerycount++;
67
- } elseif (preg_match("/^\\s*(select|drop|show|grant) /i",$sql_query)) {
68
- $text .= "<span dir=\"ltr\"><font color=\"red\">$sql_query</font></span><br />";
69
- $totalquerycount++;
70
- }
71
- }
72
- $text .= '<font color="blue">'.number_format_i18n($successquery).'/'.number_format_i18n($totalquerycount).' '.__('Query(s) Executed Successfully', 'wp-dbmanager').'</font>';
73
- } else {
74
- $text = '<font color="red">'.__('Empty Query', 'wp-dbmanager').'</font>';
75
- }
76
- } else {
77
- $text = '<font color="red">'.__('Empty Query', 'wp-dbmanager').'</font>';
78
- }
79
- break;
80
- }
81
- }
82
- ?>
83
- <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
84
- <!-- Run SQL Query -->
85
- <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
86
- <?php wp_nonce_field('wp-dbmanager_run'); ?>
87
- <div class="wrap">
88
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
89
- <h2><?php _e('Run SQL Query', 'wp-dbmanager'); ?></h2>
90
- <br style="clear" />
91
- <div>
92
- <strong><?php _e('Seperate Multiple Queries With A New Line', 'wp-dbmanager'); ?></strong><br />
93
- <font color="green"><?php _e('Use Only INSERT, UPDATE, REPLACE, DELETE, CREATE and ALTER statements.', 'wp-dbmanager'); ?></font>
94
- </div>
95
- <table class="form-table">
96
- <tr>
97
- <td align="center"><textarea cols="120" rows="30" name="sql_query" style="width: 99%;" dir="ltr" ></textarea></td>
98
- </tr>
99
- <tr>
100
- <td align="center"><input type="submit" name="do" value="<?php _e('Run', 'wp-dbmanager'); ?>" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
101
- </tr>
102
- </table>
103
- <p>
104
- <?php _e('1. CREATE statement will return an error, which is perfectly normal due to the database class. To confirm that your table has been created check the Manage Database page.', 'wp-dbmanager'); ?><br />
105
- <?php _e('2. UPDATE statement may return an error sometimes due to the newly updated value being the same as the previous value.', 'wp-dbmanager'); ?><br />
106
- <?php _e('3. ALTER statement will return an error because there is no value returned.', 'wp-dbmanager'); ?>
107
- </p>
108
- </div>
109
  </form>
1
+ <?php
2
+ ### Check Whether User Can Manage Database
3
+ if(!current_user_can('manage_database')) {
4
+ die('Access Denied');
5
+ }
6
+
7
+
8
+ ### Variables Variables Variables
9
+ $base_name = plugin_basename('wp-dbmanager/database-manager.php');
10
+ $base_page = 'admin.php?page='.$base_name;
11
+ $backup = array();
12
+ $backup_options = get_option('dbmanager_options');
13
+ $backup['date'] = current_time('timestamp');
14
+ $backup['mysqldumppath'] = $backup_options['mysqldumppath'];
15
+ $backup['mysqlpath'] = $backup_options['mysqlpath'];
16
+ $backup['path'] = $backup_options['path'];
17
+
18
+
19
+ ### Form Processing
20
+ if(!empty($_POST['do'])) {
21
+ $text = '';
22
+ // Decide What To Do
23
+ switch($_POST['do']) {
24
+ case __('Run', 'wp-dbmanager'):
25
+ check_admin_referer('wp-dbmanager_run');
26
+ $sql_queries2 = trim($_POST['sql_query']);
27
+ $totalquerycount = 0;
28
+ $successquery = 0;
29
+ if($sql_queries2) {
30
+ $sql_queries = array();
31
+ $sql_queries2 = explode("\n", $sql_queries2);
32
+ foreach($sql_queries2 as $sql_query2) {
33
+ $sql_query2 = trim(stripslashes($sql_query2));
34
+ $sql_query2 = preg_replace("/[\r\n]+/", '', $sql_query2);
35
+ if(!empty($sql_query2)) {
36
+ $sql_queries[] = $sql_query2;
37
+ }
38
+ }
39
+ if($sql_queries) {
40
+ foreach($sql_queries as $sql_query) {
41
+ if (preg_match("/^\\s*(insert|update|replace|delete|create|alter) /i",$sql_query)) {
42
+ $run_query = $wpdb->query($sql_query);
43
+ if(!$run_query) {
44
+ $text .= "<span dir=\"ltr\"><font color=\"red\">$sql_query</font></span><br />";
45
+ } else {
46
+ $successquery++;
47
+ $text .= "<span dir=\"ltr\"><font color=\"green\">$sql_query</font></span><br />";
48
+ }
49
+ $totalquerycount++;
50
+ } elseif (preg_match("/^\\s*(select|drop|show|grant) /i",$sql_query)) {
51
+ $text .= "<span dir=\"ltr\"><font color=\"red\">$sql_query</font></span><br />";
52
+ $totalquerycount++;
53
+ }
54
+ }
55
+ $text .= '<font color="blue">'.number_format_i18n($successquery).'/'.number_format_i18n($totalquerycount).' '.__('Query(s) Executed Successfully', 'wp-dbmanager').'</font>';
56
+ } else {
57
+ $text = '<font color="red">'.__('Empty Query', 'wp-dbmanager').'</font>';
58
+ }
59
+ } else {
60
+ $text = '<font color="red">'.__('Empty Query', 'wp-dbmanager').'</font>';
61
+ }
62
+ break;
63
+ }
64
+ }
65
+ ?>
66
+ <?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
67
+ <!-- Run SQL Query -->
68
+ <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
69
+ <?php wp_nonce_field('wp-dbmanager_run'); ?>
70
+ <div class="wrap">
71
+ <h2><?php _e('Run SQL Query', 'wp-dbmanager'); ?></h2>
72
+ <br style="clear" />
73
+ <div>
74
+ <strong><?php _e('Seperate Multiple Queries With A New Line', 'wp-dbmanager'); ?></strong><br />
75
+ <font color="green"><?php _e('Use Only INSERT, UPDATE, REPLACE, DELETE, CREATE and ALTER statements.', 'wp-dbmanager'); ?></font>
76
+ </div>
77
+ <table class="form-table">
78
+ <tr>
79
+ <td align="center"><textarea cols="120" rows="30" name="sql_query" style="width: 99%;" dir="ltr" ></textarea></td>
80
+ </tr>
81
+ <tr>
82
+ <td align="center"><input type="submit" name="do" value="<?php _e('Run', 'wp-dbmanager'); ?>" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
83
+ </tr>
84
+ </table>
85
+ <p>
86
+ <?php _e('1. CREATE statement will return an error, which is perfectly normal due to the database class. To confirm that your table has been created check the Manage Database page.', 'wp-dbmanager'); ?><br />
87
+ <?php _e('2. UPDATE statement may return an error sometimes due to the newly updated value being the same as the previous value.', 'wp-dbmanager'); ?><br />
88
+ <?php _e('3. ALTER statement will return an error because there is no value returned.', 'wp-dbmanager'); ?>
89
+ </p>
90
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  </form>
database-uninstall.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
- /*
3
- +----------------------------------------------------------------+
4
- | |
5
- | WordPress 2.8 Plugin: WP-DBManager 2.63 |
6
- | Copyright (c) 2009 Lester "GaMerZ" Chan |
7
- | |
8
- | File Written By: |
9
- | - Lester "GaMerZ" Chan |
10
- | - http://lesterchan.net |
11
- | |
12
- | File Information: |
13
- | - Uninstall WP-DBManager |
14
- | - wp-content/plugins/wp-dbmanager/dbmanager-uninstall.php |
15
- | |
16
- +----------------------------------------------------------------+
17
- */
18
-
19
-
20
- ### Check Whether User Can Manage Database
21
- if(!current_user_can('manage_database')) {
22
- die('Access Denied');
23
- }
24
-
25
-
26
- ### Variables Variables Variables
27
- $base_name = plugin_basename('wp-dbmanager/database-manager.php');
28
- $base_page = 'admin.php?page='.$base_name;
29
- $mode = trim($_GET['mode']);
30
- $db_settings = array('dbmanager_options');
31
- $backup_options = get_option('dbmanager_options');
32
- $backup_options_path = $backup_options['path'];
33
-
34
- ### Form Processing
35
- if(!empty($_POST['do'])) {
36
- // Decide What To Do
37
- switch($_POST['do']) {
38
- // Uninstall WP-DBManager
39
- case __('UNINSTALL WP-DBManager', 'wp-dbmanager') :
40
- check_admin_referer('wp-dbmanager_uninstall');
41
- if(trim($_POST['uninstall_db_yes']) == 'yes') {
42
- echo '<div id="message" class="updated fade">';
43
- echo '<p>';
44
- foreach($db_settings as $setting) {
45
- $delete_setting = delete_option($setting);
46
- if($delete_setting) {
47
- echo '<font color="green">';
48
- printf(__('Setting Key \'%s\' has been deleted.', 'wp-dbmanager'), "<strong><em>{$setting}</em></strong>");
49
- echo '</font><br />';
50
- } else {
51
- echo '<font color="red">';
52
- printf(__('Error deleting Setting Key \'%s\'.', 'wp-dbmanager'), "<strong><em>{$setting}</em></strong>");
53
- echo '</font><br />';
54
- }
55
- }
56
- echo '</p>';
57
- echo '<p style="color: blue;">';
58
- _e('The database backup files generated by WP-DBManager <strong>WILL NOT</strong> be deleted. You will have to delete it manually.', 'wp-dbmanager');
59
- echo '<br />';
60
- printf(__('The path to the backup folder is <strong>\'%s\'</strong>.', 'wp-dbmanager'), $backup_options_path);
61
- echo '</p>';
62
- echo '</div>';
63
- $mode = 'end-UNINSTALL';
64
- }
65
- break;
66
- }
67
- }
68
-
69
-
70
- ### Determines Which Mode It Is
71
- switch($mode) {
72
- // Deactivating WP-DBManager
73
- case 'end-UNINSTALL':
74
- $deactivate_url = 'plugins.php?action=deactivate&amp;plugin=wp-dbmanager/wp-dbmanager.php';
75
- if(function_exists('wp_nonce_url')) {
76
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_wp-dbmanager/wp-dbmanager.php');
77
- }
78
- echo '<div class="wrap">';
79
- echo '<div id="icon-wp-dbmanager" class="icon32"><br /></div>';
80
- echo '<h2>'.__('Uninstall WP-DBManager', 'wp-dbmanager').'</h2>';
81
- echo '<p><strong>'.sprintf(__('<a href="%s">Click Here</a> To Finish The Uninstallation And WP-DBManager Will Be Deactivated Automatically.', 'wp-dbmanager'), $deactivate_url).'</strong></p>';
82
- echo '</div>';
83
- break;
84
- // Main Page
85
- default:
86
- ?>
87
- <!-- Uninstall WP-DBManager -->
88
- <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
89
- <?php wp_nonce_field('wp-dbmanager_uninstall'); ?>
90
- <div class="wrap">
91
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
92
- <h2><?php _e('Uninstall WP-DBManager', 'wp-dbmanager'); ?></h2>
93
- <p>
94
- <?php _e('Deactivating WP-DBManager plugin does not remove any data that may have been created, such as the database options. To completely remove this plugin, you can uninstall it here.', 'wp-dbmanager'); ?>
95
- </p>
96
- <p style="color: red">
97
- <strong><?php _e('WARNING:', 'wp-dbmanager'); ?></strong><br />
98
- <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to back up all the data first.', 'wp-dbmanager'); ?>
99
- </p>
100
- <p style="color: red">
101
- <strong><?php _e('NOTE:', 'wp-dbmanager'); ?></strong><br />
102
- <?php _e('The database backup files generated by WP-DBManager <strong>WILL NOT</strong> be deleted. You will have to delete it manually.', 'wp-dbmanager'); ?><br />
103
- <?php printf(__('The path to the backup folder is <strong>\'%s\'</strong>.', 'wp-dbmanager'), $backup_options_path); ?>
104
- </p>
105
- <p style="color: red">
106
- <strong><?php _e('The following WordPress Options will be DELETED:', 'wp-dbmanager'); ?></strong><br />
107
- </p>
108
- <table class="widefat">
109
- <thead>
110
- <tr>
111
- <th><?php _e('WordPress Options', 'wp-dbmanager'); ?></th>
112
- </tr>
113
- </thead>
114
- <tr>
115
- <td valign="top">
116
- <ol>
117
- <?php
118
- foreach($db_settings as $settings) {
119
- echo '<li>'.$settings.'</li>'."\n";
120
- }
121
- ?>
122
- </ol>
123
- </td>
124
- </tr>
125
- </table>
126
- <p>&nbsp;</p>
127
- <p style="text-align: center;">
128
- <input type="checkbox" name="uninstall_db_yes" value="yes" />&nbsp;<?php _e('Yes', 'wp-dbmanager'); ?><br /><br />
129
- <input type="submit" name="do" value="<?php _e('UNINSTALL WP-DBManager', 'wp-dbmanager'); ?>" class="button" onclick="return confirm('<?php _e('You Are About To Uninstall WP-DBManager From WordPress.\nThis Action Is Not Reversible.\n\n Choose [Cancel] To Stop, [OK] To Uninstall.', 'wp-dbmanager'); ?>')" />
130
- </p>
131
- </div>
132
- </form>
133
- <?php
134
- } // End switch($mode)
135
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
images/database.png DELETED
Binary file
images/database_admin_icon.png DELETED
Binary file
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: database, manage, wp-dbmanager, manager, table, optimize, backup, queries, query, drop, empty, tables, table, run, repair, cron, schedule, scheduling, automatic
5
- Requires at least: 2.8
6
- Tested up to: 3.7
7
- Stable tag: trunk
8
 
9
  Manages your WordPress database.
10
 
@@ -12,21 +12,12 @@ Manages your WordPress database.
12
 
13
  Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
14
 
15
- = Previous Versions =
16
- * [WP-DBManager 2.40 For WordPress 2.7.x](http://downloads.wordpress.org/plugin/wp-dbmanager.2.40.zip "WP-DBManager 2.40 For WordPress 2.7.x")
17
- * [WP-DBManager 2.31 For WordPress 2.1.x To 2.6.x](http://downloads.wordpress.org/plugin/wp-dbmanager.2.31.zip "WP-DBManager 2.31 For WordPress 2.1.x To 2.6.x")
18
- * [WP-DBManager 2.05 For WordPress 2.0.x](http://downloads.wordpress.org/plugin/wp-dbmanager.2.05.zip "WP-DBManager 2.05 For WordPress 2.0.x")
19
- * [WP-DBManager 1.00 For WordPress 1.5.2](http://downloads.wordpress.org/plugin/wp-dbmanager.1.00.zip "WP-DBManager 1.00 For WordPress 1.5.2")
20
-
21
  = Development =
22
- * [http://dev.wp-plugins.org/browser/wp-dbmanager/](http://dev.wp-plugins.org/browser/wp-dbmanager/ "http://dev.wp-plugins.org/browser/wp-dbmanager/")
23
 
24
  = Translations =
25
  * [http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/](http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/ "http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/")
26
 
27
- = Support Forums =
28
- * [http://forums.lesterchan.net/index.php?board=11.0](http://forums.lesterchan.net/index.php?board=11.0 "http://forums.lesterchan.net/index.php?board=11.0")
29
-
30
  = Credits =
31
  * __ngetext() by [Anna Ozeritskaya](http://hweia.ru/ "Anna Ozeritskaya")
32
  * Right To Left Language Support by [Kambiz R. Khojasteh](http://persian-programming.com/ "Kambiz R. Khojasteh")
@@ -35,6 +26,16 @@ Allows you to optimize database, repair database, backup database, restore datab
35
  * I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appericiate it. If not feel free to use it without any obligations.
36
 
37
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
38
  = Version 2.65 =
39
  * FIXED: Set default character set to UTF-8. Props Karsonito
40
 
@@ -188,4 +189,4 @@ N/A
188
 
189
  = Why do I get the message "Warning: Your backup folder MIGHT be visible to the public!"? =
190
  * Ensure that you have renamed `htaccess.txt` to `.htaccess` and placed it in your backup folder (defaults to `wp-content/backup-db/`)
191
- * If you are 100% sure you have did that and have verfied that the folder no longer is accessible to the public by visiting the URL `http://yousite.com/wp-content/backup-db/`, you can safely remove it by deleting `add_action('admin_notices', 'dbmanager_admin_notices');` on `line 204` in `wp-dbmanager.php`.
2
  Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: database, manage, wp-dbmanager, manager, table, optimize, backup, queries, query, drop, empty, tables, table, run, repair, cron, schedule, scheduling, automatic
5
+ Requires at least: 3.9
6
+ Tested up to: 3.9
7
+ Stable tag: 2.70
8
 
9
  Manages your WordPress database.
10
 
12
 
13
  Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
14
 
 
 
 
 
 
 
15
  = Development =
16
+ * [https://github.com/lesterchan/wp-dbmanager](https://github.com/lesterchan/wp-dbmanager "https://github.com/lesterchan/wp-dbmanager")
17
 
18
  = Translations =
19
  * [http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/](http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/ "http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/")
20
 
 
 
 
21
  = Credits =
22
  * __ngetext() by [Anna Ozeritskaya](http://hweia.ru/ "Anna Ozeritskaya")
23
  * Right To Left Language Support by [Kambiz R. Khojasteh](http://persian-programming.com/ "Kambiz R. Khojasteh")
26
  * I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appericiate it. If not feel free to use it without any obligations.
27
 
28
  == Changelog ==
29
+ = Version 2.70 =
30
+ * New: Uses WordPress 3.9 Dashicons
31
+ * NEW: Allow you to hide admin notices in the DB Options page
32
+ * NEW: Allow Multisite Network Activate
33
+ * NEW: Uses WordPress uninstall.php file to uninstall the plugin
34
+ * NEW: Uses wp_mail() to send email instead of PHP mail()
35
+ * NEW: New From E-mail, From Name & Subject template
36
+ * FIXED: Issues with email from field if site title contains , (comma)
37
+ * FIXED: Notices
38
+
39
  = Version 2.65 =
40
  * FIXED: Set default character set to UTF-8. Props Karsonito
41
 
189
 
190
  = Why do I get the message "Warning: Your backup folder MIGHT be visible to the public!"? =
191
  * Ensure that you have renamed `htaccess.txt` to `.htaccess` and placed it in your backup folder (defaults to `wp-content/backup-db/`)
192
+ * If you are 100% sure you have did that and have verfied that the folder no longer is accessible to the public by visiting the URL `http://yousite.com/wp-content/backup-db/`, you can safely disable the notice by going to `WP-Admin -> Database -> DB Options` and set `Hide Admin Notices` to `Yes`.
uninstall.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Uninstall plugin
4
+ */
5
+ if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
6
+ exit ();
7
+
8
+ $option_name = 'dbmanager_options';
9
+
10
+ if ( is_multisite() ) {
11
+ $ms_sites = wp_get_sites();
12
+
13
+ if( 0 < sizeof( $ms_sites ) ) {
14
+ foreach ( $ms_sites as $ms_site ) {
15
+ switch_to_blog( $ms_site['blog_id'] );
16
+ delete_option( $option_name );
17
+ }
18
+ }
19
+
20
+ restore_current_blog();
21
+ } else {
22
+ delete_option( $option_name );
23
+ }
wp-dbmanager.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-DBManager
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
6
- Version: 2.65
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-dbmanager
@@ -11,7 +11,7 @@ Text Domain: wp-dbmanager
11
 
12
 
13
  /*
14
- Copyright 2013 Lester Chan (email : lesterchan@gmail.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
@@ -30,9 +30,9 @@ Text Domain: wp-dbmanager
30
 
31
 
32
  ### Create Text Domain For Translations
33
- add_action('init', 'dbmanager_textdomain');
34
  function dbmanager_textdomain() {
35
- load_plugin_textdomain('wp-dbmanager', false, 'wp-dbmanager');
36
  }
37
 
38
 
@@ -40,7 +40,7 @@ function dbmanager_textdomain() {
40
  add_action('admin_menu', 'dbmanager_menu');
41
  function dbmanager_menu() {
42
  if (function_exists('add_menu_page')) {
43
- add_menu_page(__('Database', 'wp-dbmanager'), __('Database', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-manager.php', '', plugins_url('wp-dbmanager/images/database.png'));
44
  }
45
  if (function_exists('add_submenu_page')) {
46
  add_submenu_page('wp-dbmanager/database-manager.php', __('Backup DB', 'wp-dbmanager'), __('Backup DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-backup.php');
@@ -50,17 +50,6 @@ function dbmanager_menu() {
50
  add_submenu_page('wp-dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-empty.php');
51
  add_submenu_page('wp-dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-run.php');
52
  add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/wp-dbmanager.php', 'dbmanager_options');
53
- add_submenu_page('wp-dbmanager/database-manager.php', __('Uninstall WP-DBManager', 'wp-dbmanager'), __('Uninstall WP-DBManager', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-uninstall.php');
54
- }
55
- }
56
-
57
-
58
- ### Function: Displays DBManager Header In WP-Admin
59
- add_action('admin_enqueue_scripts', 'dbmanager_stylesheets_admin');
60
- function dbmanager_stylesheets_admin($hook_suffix) {
61
- $dbmanager_admin_pages = array('wp-dbmanager/database-manager.php', 'wp-dbmanager/database-backup.php', 'wp-dbmanager/database-manage.php', 'wp-dbmanager/database-optimize.php', 'wp-dbmanager/database-repair.php', 'wp-dbmanager/database-empty.php', 'wp-dbmanager/database-run.php', 'database_page_wp-dbmanager/wp-dbmanager', 'wp-dbmanager/database-uninstall.php');
62
- if(in_array($hook_suffix, $dbmanager_admin_pages)) {
63
- wp_enqueue_style('wp-dbmanager-admin', plugins_url('wp-dbmanager/database-admin-css.css'), false, '2.63', 'all');
64
  }
65
  }
66
 
@@ -106,45 +95,9 @@ function cron_dbmanager_backup() {
106
  $backup['command'] = $brace.$backup['mysqldumppath'].$brace.' --force --host="'.$backup['host'].'" --user="'.DB_USER.'" --password="'.$backup['password'].'"'.$backup['port'].$backup['sock'].' --add-drop-table --skip-lock-tables '.DB_NAME.' > '.$brace.$backup['filepath'].$brace;
107
  }
108
  execute_backup($backup['command']);
109
- if(!empty($backup_email)) {
110
- // Get And Read The Database Backup File
111
- $file_path = $backup['filepath'];
112
- $file_size = format_size(filesize($file_path));
113
- $file_date = mysql2date(sprintf(__('%s @ %s', 'wp-dbmanager'), get_option('date_format'), get_option('time_format')), gmdate('Y-m-d H:i:s', substr($backup['filename'], 0, 10)));
114
- $file = fopen($file_path,'rb');
115
- $file_data = fread($file,filesize($file_path));
116
- fclose($file);
117
- $file_data = chunk_split(base64_encode($file_data));
118
- // Create Mail To, Mail Subject And Mail Header
119
- $mail_subject = sprintf(__('%s Database Backup File For %s', 'wp-dbmanager'), wp_specialchars_decode(get_option('blogname')), $file_date);
120
- $mail_header = 'From: '.wp_specialchars_decode(get_option('blogname')).' Administrator <'.get_option('admin_email').'>';
121
- // MIME Boundary
122
- $random_time = md5(time());
123
- $mime_boundary = "==WP-DBManager- $random_time";
124
- // Create Mail Header And Mail Message
125
- $mail_header .= "\nMIME-Version: 1.0\n" .
126
- "Content-Type: multipart/mixed;\n" .
127
- " boundary=\"{$mime_boundary}\"";
128
- $mail_message = __('Website Name:', 'wp-dbmanager').' '.wp_specialchars_decode(get_option('blogname'))."\n".
129
- __('Website URL:', 'wp-dbmanager').' '.get_bloginfo('siteurl')."\n".
130
- __('Backup File Name:', 'wp-dbmanager').' '.$backup['filename']."\n".
131
- __('Backup File Date:', 'wp-dbmanager').' '.$file_date."\n".
132
- __('Backup File Size:', 'wp-dbmanager').' '.$file_size."\n\n".
133
- __('With Regards,', 'wp-dbmanager')."\n".
134
- wp_specialchars_decode(get_option('blogname')).' '. __('Administrator', 'wp-dbmanager')."\n".
135
- get_bloginfo('siteurl');
136
- $mail_message = "This is a multi-part message in MIME format.\n\n" .
137
- "--{$mime_boundary}\n" .
138
- "Content-Type: text/plain; charset=\"utf-8\"\n" .
139
- "Content-Transfer-Encoding: 7bit\n\n".$mail_message."\n\n";
140
- $mail_message .= "--{$mime_boundary}\n" .
141
- "Content-Type: application/octet-stream;\n" .
142
- " name=\"{$backup['filename']}\"\n" .
143
- "Content-Disposition: attachment;\n" .
144
- " filename=\"{$backup['filename']}\"\n" .
145
- "Content-Transfer-Encoding: base64\n\n" .
146
- $file_data."\n\n--{$mime_boundary}--\n";
147
- mail($backup_email, $mail_subject, $mail_message, $mail_header);
148
  }
149
  }
150
  return;
@@ -201,11 +154,28 @@ function cron_dbmanager_reccurences($schedules) {
201
 
202
 
203
  ### Function: Ensure .htaccess Is In The Backup Folder
204
- add_action('admin_notices', 'dbmanager_admin_notices');
205
  function dbmanager_admin_notices() {
206
- $backup_options = get_option('dbmanager_options');
207
- if(!@file_exists($backup_options['path'].'/.htaccess')) {
208
- echo '<div class="error" style="text-align: center;"><p style="color: red; font-size: 14px; font-weight: bold;">'.__('Your backup folder MIGHT be visible to the public', 'wp-postratings').'</p><p>'.sprintf(__('To correct this issue, move the <strong>.htaccess</strong> file from <strong>wp-content/plugins/wp-dbmanager</strong> to <strong>%s</strong>', 'wp-postratings'), $backup_options['path']).'</p></div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  }
210
  }
211
 
@@ -255,6 +225,53 @@ function execute_backup($command) {
255
  return $error;
256
  }
257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
258
 
259
  ### Function: Format Bytes Into KB/MB
260
  if(!function_exists('format_size')) {
@@ -283,6 +300,7 @@ if(!function_exists('file_ext')) {
283
  if(!function_exists('is_emtpy_folder')) {
284
  function is_emtpy_folder($folder){
285
  if(is_dir($folder) ){
 
286
  $handle = opendir($folder);
287
  while( (gettype( $name = readdir($handle)) != 'boolean')){
288
  if($name != '.htaccess') {
@@ -325,37 +343,94 @@ function check_backup_files() {
325
  }
326
 
327
 
328
- ### Function: Database Manager Role
329
- add_action('activate_wp-dbmanager/wp-dbmanager.php', 'dbmanager_init');
330
- function dbmanager_init() {
331
- global $wpdb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  $auto = detect_mysql();
333
  // Add Options
334
- $backup_options = array();
335
- $backup_options['mysqldumppath'] = $auto['mysqldump'];
336
- $backup_options['mysqlpath'] = $auto['mysql'];
337
- $backup_options['path'] = str_replace('\\', '/', WP_CONTENT_DIR).'/backup-db';
338
- $backup_options['max_backup'] = 10;
339
- $backup_options['backup'] = 1;
340
- $backup_options['backup_gzip'] = 0;
341
- $backup_options['backup_period'] = 604800;
342
- $backup_options['backup_email'] = get_option('admin_email');
343
- $backup_options['optimize'] = 3;
344
- $backup_options['optimize_period'] = 86400;
345
- $backup_options['repair'] = 2;
346
- $backup_options['repair_period'] = 604800;
347
- add_option('dbmanager_options', $backup_options, 'WP-DBManager Options');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348
 
349
  // Create Backup Folder
350
- if(!is_dir(WP_CONTENT_DIR.'/backup-db')) {
351
- mkdir(WP_CONTENT_DIR.'/backup-db');
352
- chmod(WP_CONTENT_DIR.'/backup-db', 0750);
 
 
 
 
353
  }
354
 
355
  // Set 'manage_database' Capabilities To Administrator
356
- $role = get_role('administrator');
357
- if(!$role->has_cap('manage_database')) {
358
- $role->add_cap('manage_database');
 
359
  }
360
  }
361
 
@@ -388,27 +463,29 @@ function download_database() {
388
  }
389
  }
390
 
391
-
392
  ### Function: Database Options
393
  function dbmanager_options() {
394
- global $wpdb;
395
  $text = '';
396
- $backup_options = array();
397
  $backup_options = get_option('dbmanager_options');
398
- if($_POST['Submit']) {
399
  check_admin_referer('wp-dbmanager_options');
400
- $backup_options['mysqldumppath'] = trim($_POST['db_mysqldumppath']);
401
- $backup_options['mysqlpath'] = trim($_POST['db_mysqlpath']);
402
- $backup_options['path'] = trim($_POST['db_path']);
403
- $backup_options['max_backup'] = intval($_POST['db_max_backup']);
404
- $backup_options['backup'] = intval($_POST['db_backup']);
405
- $backup_options['backup_gzip'] = intval($_POST['db_backup_gzip']);
406
- $backup_options['backup_period'] = intval($_POST['db_backup_period']);
407
- $backup_options['backup_email'] = trim(addslashes($_POST['db_backup_email']));
408
- $backup_options['optimize'] = intval($_POST['db_optimize']);
409
- $backup_options['optimize_period'] = intval($_POST['db_optimize_period']);
410
- $backup_options['repair'] = intval($_POST['db_repair']);
411
- $backup_options['repair_period'] = intval($_POST['db_repair_period']);
 
 
 
 
 
412
  $update_db_options = update_option('dbmanager_options', $backup_options);
413
  if($update_db_options) {
414
  $text = '<font color="green">'.__('Database Options Updated', 'wp-dbmanager').'</font>';
@@ -436,6 +513,25 @@ function dbmanager_options() {
436
  }
437
  }
438
  $path = detect_mysql();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  ?>
440
  <script type="text/javascript">
441
  /* <![CDATA[*/
@@ -452,7 +548,6 @@ function dbmanager_options() {
452
  <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
453
  <?php wp_nonce_field('wp-dbmanager_options'); ?>
454
  <div class="wrap">
455
- <div id="icon-wp-dbmanager" class="icon32"><br /></div>
456
  <h2><?php _e('Database Options', 'wp-dbmanager'); ?></h2>
457
  <h3><?php _e('Paths', 'wp-dbmanager'); ?></h3>
458
  <table class="form-table">
@@ -525,21 +620,20 @@ function dbmanager_options() {
525
  ?>
526
  <p>
527
  <?php _e('Every', 'wp-dbmanager'); ?>&nbsp;<input type="text" name="db_backup" size="3" maxlength="5" value="<?php echo intval($backup_options['backup']); ?>" />&nbsp;
528
- <select name="db_backup_period" size="1">
529
- <option value="0"<?php selected('0', $backup_options['backup_period']); ?>><?php _e('Disable', 'wp-dbmanager'); ?></option>
530
- <option value="60"<?php selected('60', $backup_options['backup_period']); ?>><?php _e('Minutes(s)', 'wp-dbmanager'); ?></option>
531
- <option value="3600"<?php selected('3600', $backup_options['backup_period']); ?>><?php _e('Hour(s)', 'wp-dbmanager'); ?></option>
532
- <option value="86400"<?php selected('86400', $backup_options['backup_period']); ?>><?php _e('Day(s)', 'wp-dbmanager'); ?></option>
533
- <option value="604800"<?php selected('604800', $backup_options['backup_period']); ?>><?php _e('Week(s)', 'wp-dbmanager'); ?></option>
534
- <option value="18144000"<?php selected('18144000', $backup_options['backup_period']); ?>><?php _e('Month(s)', 'wp-dbmanager'); ?></option>
535
- </select>&nbsp;&nbsp;&nbsp;
536
- <?php _e('Gzip', 'wp-dbmanager'); ?>
537
- <select name="db_backup_gzip" size="1">
538
- <option value="0"<?php selected('0', $backup_options['backup_gzip']); ?>><?php _e('No', 'wp-dbmanager'); ?></option>
539
- <option value="1"<?php selected('1', $backup_options['backup_gzip']); ?>><?php _e('Yes', 'wp-dbmanager'); ?></option>
540
- </select>
541
  </p>
542
- <p><?php _e('E-mail backup to:', 'wp-dbmanager'); ?> <input type="text" name="db_backup_email" size="30" maxlength="50" value="<?php echo stripslashes($backup_options['backup_email']) ?>" dir="ltr" />&nbsp;&nbsp;&nbsp;<?php _e('(Leave blank to disable this feature)', 'wp-dbmanager'); ?></p>
543
  <p><?php _e('WP-DBManager can automatically backup your database after a certain period.', 'wp-dbmanager'); ?></p>
544
  </td>
545
  </tr>
@@ -594,6 +688,52 @@ function dbmanager_options() {
594
  </td>
595
  </tr>
596
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  <p class="submit">
598
  <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-dbmanager'); ?>" />
599
  </p>
3
  Plugin Name: WP-DBManager
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
6
+ Version: 2.70
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-dbmanager
11
 
12
 
13
  /*
14
+ Copyright 2014 Lester Chan (email : lesterchan@gmail.com)
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License as published by
30
 
31
 
32
  ### Create Text Domain For Translations
33
+ add_action( 'plugins_loaded', 'dbmanager_textdomain' );
34
  function dbmanager_textdomain() {
35
+ load_plugin_textdomain( 'wp-dbmanager', false, dirname( plugin_basename( __FILE__ ) ) );
36
  }
37
 
38
 
40
  add_action('admin_menu', 'dbmanager_menu');
41
  function dbmanager_menu() {
42
  if (function_exists('add_menu_page')) {
43
+ add_menu_page(__('Database', 'wp-dbmanager'), __('Database', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-manager.php', '', 'dashicons-archive');
44
  }
45
  if (function_exists('add_submenu_page')) {
46
  add_submenu_page('wp-dbmanager/database-manager.php', __('Backup DB', 'wp-dbmanager'), __('Backup DB', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-backup.php');
50
  add_submenu_page('wp-dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-empty.php');
51
  add_submenu_page('wp-dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/database-run.php');
52
  add_submenu_page('wp-dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'manage_database', 'wp-dbmanager/wp-dbmanager.php', 'dbmanager_options');
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
  }
55
 
95
  $backup['command'] = $brace.$backup['mysqldumppath'].$brace.' --force --host="'.$backup['host'].'" --user="'.DB_USER.'" --password="'.$backup['password'].'"'.$backup['port'].$backup['sock'].' --add-drop-table --skip-lock-tables '.DB_NAME.' > '.$brace.$backup['filepath'].$brace;
96
  }
97
  execute_backup($backup['command']);
98
+ if( !empty( $backup_email ) )
99
+ {
100
+ dbmanager_email_backup( $backup_email, $backup['filepath'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  }
102
  }
103
  return;
154
 
155
 
156
  ### Function: Ensure .htaccess Is In The Backup Folder
157
+ add_action( 'admin_notices', 'dbmanager_admin_notices' );
158
  function dbmanager_admin_notices() {
159
+ $backup_options = get_option( 'dbmanager_options' );
160
+ $backup_folder_writable = ( is_dir( $backup_options['path'] ) && wp_is_writable( $backup_options['path'] ) );
161
+ $htaccess_exists = ( file_exists( $backup_options['path'] . '/.htaccess' ) );
162
+
163
+ if( !isset( $backup_options['hide_admin_notices'] ) || intval( $backup_options['hide_admin_notices'] ) === 0 )
164
+ {
165
+ if( !$backup_folder_writable || !$htaccess_exists ) {
166
+ echo '<div class="error">';
167
+
168
+ if( !$backup_folder_writable ) {
169
+ echo '<p style="font-weight: bold;">'.__('Your backup folder is NOT writable', 'wp-postratings').'</p>';
170
+ echo '<p>'.sprintf( __( 'To correct this issue, make the folder <strong>%s</strong> writable.', 'wp-dbmanager'), $backup_options['path'] ).'</p>';
171
+ }
172
+ if( !$htaccess_exists ) {
173
+ echo '<p style="font-weight: bold;">'.__('Your backup folder MIGHT be visible to the public', 'wp-dbmanager').'</p>';
174
+ echo '<p>'.sprintf( __( 'To correct this issue, move the file from <strong>%s</strong> to <strong>%s</strong>', 'wp-dbmanager'), plugin_dir_path( __FILE__ ) . 'htaccess.txt', $backup_options['path'] .'/.htaccess' ).'</p>';
175
+ }
176
+
177
+ echo '</div>';
178
+ }
179
  }
180
  }
181
 
225
  return $error;
226
  }
227
 
228
+ ### Function: Email database backup
229
+ function dbmanager_email_backup($to = '', $backup_file_path)
230
+ {
231
+ if( is_email( $to ) && file_exists( $backup_file_path ) )
232
+ {
233
+ $backup_options = get_option( 'dbmanager_options' );
234
+
235
+ $file_name = basename( $backup_file_path );
236
+ $file_gmt_date = gmdate( 'Y-m-d H:i:s', substr( $file_name, 0, 10 ) );
237
+ $file_size = format_size( filesize( $backup_file_path) );
238
+ $file_date = mysql2date( sprintf( __( '%s @ %s', 'wp-dbmanager' ), get_option( 'date_format' ), get_option( 'time_format' ) ), $file_gmt_date );
239
+
240
+ $to = ( !empty( $to ) ? $to : get_option( 'admin_email' ) );
241
+
242
+ $subject = ( !empty( $backup_options['backup_email_subject'] ) ? $backup_options['backup_email_subject'] : dbmanager_default_options( 'backup_email_subject' ) );
243
+ $subject = str_replace(
244
+ array(
245
+ '%SITE_NAME%'
246
+ , '%POST_DATE%'
247
+ , '%POST_TIME%'
248
+ )
249
+ , array(
250
+ wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES )
251
+ , mysql2date( get_option( 'date_format' ), $file_gmt_date )
252
+ , mysql2date( get_option( 'time_format' ), $file_gmt_date )
253
+ )
254
+ , $subject
255
+ );
256
+ $message = __( 'Website Name:', 'wp-dbmanager').' '. wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) . "\n".
257
+ __( 'Website URL:', 'wp-dbmanager' ).' '.get_bloginfo( 'url' )."\n".
258
+ __( 'Backup File Name:', 'wp-dbmanager' ).' '.$file_name."\n".
259
+ __( 'Backup File Date:', 'wp-dbmanager' ).' '.$file_date."\n".
260
+ __( 'Backup File Size:', 'wp-dbmanager' ).' '.$file_size."\n\n".
261
+ __( 'With Regards,', 'wp-dbmanager' )."\n".
262
+ wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ). ' ' . __('Administrator', 'wp-dbmanager' )."\n".
263
+ get_bloginfo('url');
264
+
265
+ $from = ( !empty( $backup_options['backup_email_from'] ) ? $backup_options['backup_email_from'] : dbmanager_default_options( 'backup_email_from' ) );
266
+ $from_name = ( !empty( $backup_options['backup_email_from_name'] ) ? $backup_options['backup_email_from_name'] : dbmanager_default_options( 'backup_email_from_name' ) );
267
+ $headers[] = 'From: "' . wp_specialchars_decode( stripslashes_deep( $from_name ), ENT_QUOTES ) . '" <'.$from.'>';
268
+
269
+ return wp_mail( $to, $subject, $message, $headers, $backup_file_path );
270
+ }
271
+
272
+ return false;
273
+ }
274
+
275
 
276
  ### Function: Format Bytes Into KB/MB
277
  if(!function_exists('format_size')) {
300
  if(!function_exists('is_emtpy_folder')) {
301
  function is_emtpy_folder($folder){
302
  if(is_dir($folder) ){
303
+ $folder_content = '';
304
  $handle = opendir($folder);
305
  while( (gettype( $name = readdir($handle)) != 'boolean')){
306
  if($name != '.htaccess') {
343
  }
344
 
345
 
346
+ ### Function: DBManager Default Options
347
+ function dbmanager_default_options( $option_name )
348
+ {
349
+ switch( $option_name )
350
+ {
351
+ case 'backup_email_from':
352
+ return get_option( 'admin_email' );
353
+ break;
354
+ case 'backup_email_from_name':
355
+ return wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) .' '.__( 'Administrator', 'wp-dbmanager' );
356
+ break;
357
+ case 'backup_email_subject':
358
+ return __( '%SITE_NAME% Database Backup File For %POST_DATE% @ %POST_TIME%', 'wp-dbmanager' );
359
+ break;
360
+ case 'hide_admin_notices':
361
+ return 0;
362
+ break;
363
+ }
364
+ }
365
+
366
+ ### Function: Acticate Plugin
367
+ register_activation_hook( __FILE__, 'dbmanager_activation' );
368
+ function dbmanager_activation( $network_wide )
369
+ {
370
  $auto = detect_mysql();
371
  // Add Options
372
+ $option_name = 'dbmanager_options';
373
+ $option = array(
374
+ 'mysqldumppath' => $auto['mysqldump']
375
+ , 'mysqlpath' => $auto['mysql']
376
+ , 'path' => str_replace( '\\', '/', WP_CONTENT_DIR ).'/backup-db'
377
+ , 'max_backup' => 10
378
+ , 'backup' => 1
379
+ , 'backup_gzip' => 0
380
+ , 'backup_period' => 604800
381
+ , 'backup_email' => get_option( 'admin_email' )
382
+ , 'backup_email_from' => dbmanager_default_options( 'backup_email_from' )
383
+ , 'backup_email_from_name' => dbmanager_default_options( 'backup_email_from_name' )
384
+ , 'backup_email_subject' => dbmanager_default_options( 'backup_email_subject' )
385
+ , 'optimize' => 3
386
+ , 'optimize_period' => 86400
387
+ , 'repair' => 2
388
+ , 'repair_period' => 604800
389
+ , 'hide_admin_notices' => 0
390
+ );
391
+
392
+ if ( is_multisite() && $network_wide )
393
+ {
394
+ $ms_sites = wp_get_sites();
395
+
396
+ if( 0 < sizeof( $ms_sites ) )
397
+ {
398
+ foreach ( $ms_sites as $ms_site )
399
+ {
400
+ switch_to_blog( $ms_site['blog_id'] );
401
+ add_option( $option_name, $option );
402
+ dbmanager_activate();
403
+ }
404
+ }
405
+
406
+ restore_current_blog();
407
+ }
408
+ else
409
+ {
410
+ add_option( $option_name, $option );
411
+ dbmanager_activate();
412
+ }
413
+ }
414
+
415
+ function dbmanager_activate() {
416
+ $plugin_path = plugin_dir_path( __FILE__ );
417
+ $default_backup_folder = WP_CONTENT_DIR . '/backup-db';
418
 
419
  // Create Backup Folder
420
+ if( is_dir( $default_backup_folder ) && wp_is_writable( $default_backup_folder ) )
421
+ {
422
+ if( wp_mkdir_p( $default_backup_folder ) )
423
+ {
424
+ @copy( $plugin_path . 'htaccess.txt', $default_backup_folder . '/.htaccess' );
425
+ @chmod( $default_backup_folder, 0750 );
426
+ }
427
  }
428
 
429
  // Set 'manage_database' Capabilities To Administrator
430
+ $role = get_role( 'administrator' );
431
+ if( !$role->has_cap( 'manage_database') )
432
+ {
433
+ $role->add_cap( 'manage_database' );
434
  }
435
  }
436
 
463
  }
464
  }
465
 
 
466
  ### Function: Database Options
467
  function dbmanager_options() {
 
468
  $text = '';
 
469
  $backup_options = get_option('dbmanager_options');
470
+ if(!empty($_POST['Submit'])) {
471
  check_admin_referer('wp-dbmanager_options');
472
+ $backup_options['mysqldumppath'] = sanitize_text_field( $_POST['db_mysqldumppath'] );
473
+ $backup_options['mysqlpath'] = sanitize_text_field( $_POST['db_mysqlpath'] );
474
+ $backup_options['path'] = sanitize_text_field( $_POST['db_path'] );
475
+ $backup_options['max_backup'] = intval( $_POST['db_max_backup'] );
476
+ $backup_options['backup'] = intval( $_POST['db_backup'] );
477
+ $backup_options['backup_gzip'] = intval( $_POST['db_backup_gzip'] );
478
+ $backup_options['backup_period'] = intval( $_POST['db_backup_period'] );
479
+ $backup_options['backup_email'] = sanitize_email( $_POST['db_backup_email'] );
480
+ $backup_options['backup_email_from'] = sanitize_email( $_POST['db_backup_email_from'] );
481
+ $backup_options['backup_email_from_name'] = sanitize_text_field( $_POST['db_backup_email_from_name'] );
482
+ $backup_options['backup_email_subject'] = sanitize_text_field( $_POST['db_backup_email_subject'] );
483
+ $backup_options['optimize'] = intval( $_POST['db_optimize'] );
484
+ $backup_options['optimize_period'] = intval( $_POST['db_optimize_period'] );
485
+ $backup_options['repair'] = intval( $_POST['db_repair'] );
486
+ $backup_options['repair_period'] = intval( $_POST['db_repair_period'] );
487
+ $backup_options['hide_admin_notices'] = intval( $_POST['db_hide_admin_notices'] );
488
+
489
  $update_db_options = update_option('dbmanager_options', $backup_options);
490
  if($update_db_options) {
491
  $text = '<font color="green">'.__('Database Options Updated', 'wp-dbmanager').'</font>';
513
  }
514
  }
515
  $path = detect_mysql();
516
+
517
+ // Default Options
518
+ if( !isset( $backup_options['backup_email_from'] ) )
519
+ {
520
+ $backup_options['backup_email_from'] = dbmanager_default_options( 'backup_email_from' );
521
+ }
522
+ if( !isset( $backup_options['backup_email_from_name'] ) )
523
+ {
524
+ $backup_options['backup_email_from_name'] = dbmanager_default_options( 'backup_email_from_name' );
525
+ }
526
+ if( !isset( $backup_options['backup_email_subject'] ) )
527
+ {
528
+ $backup_options['backup_email_subject'] = dbmanager_default_options( 'backup_email_subject' );
529
+ }
530
+ if( !isset( $backup_options['hide_admin_notices'] ) )
531
+ {
532
+ $backup_options['hide_admin_notices'] = dbmanager_default_options( 'hide_admin_notices' );
533
+ }
534
+
535
  ?>
536
  <script type="text/javascript">
537
  /* <![CDATA[*/
548
  <form method="post" action="<?php echo admin_url('admin.php?page='.plugin_basename(__FILE__)); ?>">
549
  <?php wp_nonce_field('wp-dbmanager_options'); ?>
550
  <div class="wrap">
 
551
  <h2><?php _e('Database Options', 'wp-dbmanager'); ?></h2>
552
  <h3><?php _e('Paths', 'wp-dbmanager'); ?></h3>
553
  <table class="form-table">
620
  ?>
621
  <p>
622
  <?php _e('Every', 'wp-dbmanager'); ?>&nbsp;<input type="text" name="db_backup" size="3" maxlength="5" value="<?php echo intval($backup_options['backup']); ?>" />&nbsp;
623
+ <select name="db_backup_period" size="1">
624
+ <option value="0"<?php selected('0', $backup_options['backup_period']); ?>><?php _e('Disable', 'wp-dbmanager'); ?></option>
625
+ <option value="60"<?php selected('60', $backup_options['backup_period']); ?>><?php _e('Minutes(s)', 'wp-dbmanager'); ?></option>
626
+ <option value="3600"<?php selected('3600', $backup_options['backup_period']); ?>><?php _e('Hour(s)', 'wp-dbmanager'); ?></option>
627
+ <option value="86400"<?php selected('86400', $backup_options['backup_period']); ?>><?php _e('Day(s)', 'wp-dbmanager'); ?></option>
628
+ <option value="604800"<?php selected('604800', $backup_options['backup_period']); ?>><?php _e('Week(s)', 'wp-dbmanager'); ?></option>
629
+ <option value="18144000"<?php selected('18144000', $backup_options['backup_period']); ?>><?php _e('Month(s)', 'wp-dbmanager'); ?></option>
630
+ </select>&nbsp;&nbsp;&nbsp;
631
+ <?php _e('Gzip', 'wp-dbmanager'); ?>
632
+ <select name="db_backup_gzip" size="1">
633
+ <option value="0"<?php selected('0', $backup_options['backup_gzip']); ?>><?php _e('No', 'wp-dbmanager'); ?></option>
634
+ <option value="1"<?php selected('1', $backup_options['backup_gzip']); ?>><?php _e('Yes', 'wp-dbmanager'); ?></option>
635
+ </select>
636
  </p>
 
637
  <p><?php _e('WP-DBManager can automatically backup your database after a certain period.', 'wp-dbmanager'); ?></p>
638
  </td>
639
  </tr>
688
  </td>
689
  </tr>
690
  </table>
691
+
692
+ <h3><?php _e('Backup Email Options', 'wp-dbmanager'); ?></h3>
693
+ <table class="form-table">
694
+ <tr>
695
+ <td valign="top"><strong><?php _e('To', 'wp-dbmanager'); ?></strong></td>
696
+ <td>
697
+ <p>
698
+ <input type="text" name="db_backup_email" size="30" maxlength="250" placeholder="<?php _e ( 'To E-mail', 'wp-dbmanager' ); ?>" value="<?php echo esc_attr( stripslashes( $backup_options['backup_email'] ) ) ?>" dir="ltr" />
699
+ </p>
700
+ <p><?php _e('(Leave blank to disable this feature)', 'wp-dbmanager'); ?></p>
701
+ </td>
702
+ </tr>
703
+ <tr>
704
+ <td valign="top"><strong><?php _e('From', 'wp-dbmanager'); ?></strong></td>
705
+ <td>
706
+ <p>
707
+ <input type="text" name="db_backup_email_from_name" size="60" maxlength="250" placeholder="<?php _e ( 'From Name', 'wp-dbmanager' ); ?>" value="<?php echo esc_attr( stripslashes( $backup_options['backup_email_from_name'] ) ) ?>" dir="ltr" />&nbsp;
708
+ &lt;<input type="text" name="db_backup_email_from" size="30" maxlength="250" placeholder="<?php _e ( 'From E-mail', 'wp-dbmanager' ); ?>" value="<?php echo esc_attr( stripslashes( $backup_options['backup_email_from'] ) ) ?>" dir="ltr" />&gt;
709
+ </p>
710
+ <p><?php _e('(Leave blank to use the default)', 'wp-dbmanager'); ?></p>
711
+ </td>
712
+ </tr>
713
+ <tr>
714
+ <td valign="top"><strong><?php _e('Subject:', 'wp-dbmanager'); ?></strong></td>
715
+ <td>
716
+ <p>
717
+ <input type="text" name="db_backup_email_subject" size="90" maxlength="255" placeholder="<?php _e ( 'Subject', 'wp-dbmanager' ); ?>" value="<?php echo esc_attr( stripslashes( $backup_options['backup_email_subject'] ) ) ?>" dir="ltr" />
718
+ </p>
719
+ <p><?php _e('(Leave blank to use the default)', 'wp-dbmanager'); ?></p>
720
+ </td>
721
+ </tr>
722
+ </table>
723
+
724
+ <h3><?php _e('Miscellaneous Options', 'wp-dbmanager'); ?></h3>
725
+ <table class="form-table">
726
+ <tr>
727
+ <td valign="top"><strong><?php _e('Hide Admin Notices', 'wp-dbmanager'); ?></strong></td>
728
+ <td>
729
+ <p>
730
+ <input type="radio" name="db_hide_admin_notices" value="1"<?php echo (intval( $backup_options['hide_admin_notices'] ) === 1 ? ' checked="checked"' : '' ); ?> />&nbsp;<?php _e('Yes', 'wp-dbmanager'); ?>
731
+ <input type="radio" name="db_hide_admin_notices" value="0"<?php echo (intval( $backup_options['hide_admin_notices'] ) === 0 ? ' checked="checked"' : '' ); ?> />&nbsp;<?php _e('No', 'wp-dbmanager'); ?>
732
+ </p>
733
+ </td>
734
+ </tr>
735
+ </table>
736
+
737
  <p class="submit">
738
  <input type="submit" name="Submit" class="button" value="<?php _e('Save Changes', 'wp-dbmanager'); ?>" />
739
  </p>
wp-dbmanager.pot ADDED
@@ -0,0 +1,872 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP-DBManager\n"
4
+ "POT-Creation-Date: 2014-02-19 09:48+0800\n"
5
+ "PO-Revision-Date: 2014-02-19 09:49+0800\n"
6
+ "Last-Translator: Lester Chan <lesterchan@gmail.com>\n"
7
+ "Language-Team: Lester Chan <lesterchan@gmail.com>\n"
8
+ "Language: en_US\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.4\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
16
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
17
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ "X-Poedit-SearchPath-0: .\n"
20
+
21
+ #: database-backup.php:11 database-backup.php:184 database-manage.php:26
22
+ #: database-manage.php:136 wp-dbmanager.php:77 wp-dbmanager.php:248
23
+ #: wp-dbmanager.php:627 wp-dbmanager.php:657 wp-dbmanager.php:682
24
+ #, php-format
25
+ msgid "%s @ %s"
26
+ msgstr ""
27
+
28
+ #: database-backup.php:26 database-backup.php:203
29
+ msgid "Backup"
30
+ msgstr ""
31
+
32
+ #: database-backup.php:53
33
+ #, php-format
34
+ msgid "Database Failed To Backup On '%s'. Backup Folder Not Writable."
35
+ msgstr ""
36
+
37
+ #: database-backup.php:56
38
+ #, php-format
39
+ msgid "Database Failed To Backup On '%s'. Backup File Size Is 0KB."
40
+ msgstr ""
41
+
42
+ #: database-backup.php:58
43
+ #, php-format
44
+ msgid "Database Failed To Backup On '%s'. Invalid Backup File Path."
45
+ msgstr ""
46
+
47
+ #: database-backup.php:60
48
+ #, php-format
49
+ msgid "Database Failed To Backup On '%s'."
50
+ msgstr ""
51
+
52
+ #: database-backup.php:62
53
+ #, php-format
54
+ msgid "Database Backed Up Successfully On '%s'."
55
+ msgstr ""
56
+
57
+ #: database-backup.php:81 database-backup.php:165
58
+ msgid "Backup Database"
59
+ msgstr ""
60
+
61
+ #: database-backup.php:82
62
+ msgid "Checking Backup Status"
63
+ msgstr ""
64
+
65
+ #: database-backup.php:84
66
+ msgid "Checking Backup Folder"
67
+ msgstr ""
68
+
69
+ #: database-backup.php:87
70
+ msgid "Backup folder exists"
71
+ msgstr ""
72
+
73
+ #: database-backup.php:90
74
+ #, php-format
75
+ msgid ""
76
+ "Backup folder does NOT exist. Please create 'backup-db' folder in '%s' "
77
+ "folder and CHMOD it to '777' or change the location of the backup folder "
78
+ "under DB Option."
79
+ msgstr ""
80
+
81
+ #: database-backup.php:93
82
+ msgid "Backup folder is writable"
83
+ msgstr ""
84
+
85
+ #: database-backup.php:96
86
+ msgid "Backup folder is NOT writable. Please CHMOD it to '777'."
87
+ msgstr ""
88
+
89
+ #: database-backup.php:103 database-backup.php:107
90
+ msgid "Checking MYSQL Dump Path"
91
+ msgstr ""
92
+
93
+ #: database-backup.php:104
94
+ msgid "MYSQL dump path exists."
95
+ msgstr ""
96
+
97
+ #: database-backup.php:108
98
+ msgid ""
99
+ "MYSQL dump path does NOT exist. Please check your mysqldump path under DB "
100
+ "Options. If uncertain, contact your server administrator."
101
+ msgstr ""
102
+
103
+ #: database-backup.php:115 database-backup.php:119
104
+ msgid "Checking MYSQL Path"
105
+ msgstr ""
106
+
107
+ #: database-backup.php:116
108
+ msgid "MYSQL path exists."
109
+ msgstr ""
110
+
111
+ #: database-backup.php:120
112
+ msgid ""
113
+ "MYSQL path does NOT exist. Please check your mysql path under DB Options. If "
114
+ "uncertain, contact your server administrator."
115
+ msgstr ""
116
+
117
+ #: database-backup.php:125
118
+ msgid "Checking PHP Functions"
119
+ msgstr ""
120
+
121
+ #: database-backup.php:125
122
+ msgid "and"
123
+ msgstr ""
124
+
125
+ #: database-backup.php:128 database-backup.php:135 database-backup.php:141
126
+ msgid "enabled"
127
+ msgstr ""
128
+
129
+ #: database-backup.php:131 database-backup.php:137 database-backup.php:143
130
+ msgid "disabled"
131
+ msgstr ""
132
+
133
+ #: database-backup.php:151
134
+ msgid "Excellent. You Are Good To Go."
135
+ msgstr ""
136
+
137
+ #: database-backup.php:153
138
+ msgid ""
139
+ "I'm sorry, your server administrator has disabled passthru(), system() and "
140
+ "exec(), thus you cannot use this backup script. You may consider using the "
141
+ "default WordPress database backup script instead."
142
+ msgstr ""
143
+
144
+ #: database-backup.php:155
145
+ msgid "Please Rectify The Error Highlighted In Red Before Proceeding On."
146
+ msgstr ""
147
+
148
+ #: database-backup.php:159
149
+ msgid ""
150
+ "Note: The checking of backup status is still undergoing testing, it may not "
151
+ "be accurate."
152
+ msgstr ""
153
+
154
+ #: database-backup.php:170
155
+ msgid "Option"
156
+ msgstr ""
157
+
158
+ #: database-backup.php:171 database-manager.php:33
159
+ msgid "Value"
160
+ msgstr ""
161
+
162
+ #: database-backup.php:175
163
+ msgid "Database Name:"
164
+ msgstr ""
165
+
166
+ #: database-backup.php:179
167
+ msgid "Database Backup To:"
168
+ msgstr ""
169
+
170
+ #: database-backup.php:183
171
+ msgid "Database Backup Date:"
172
+ msgstr ""
173
+
174
+ #: database-backup.php:187
175
+ msgid "Database Backup File Name:"
176
+ msgstr ""
177
+
178
+ #: database-backup.php:191
179
+ msgid "Database Backup Type:"
180
+ msgstr ""
181
+
182
+ #: database-backup.php:192
183
+ msgid "Full (Structure and Data)"
184
+ msgstr ""
185
+
186
+ #: database-backup.php:195
187
+ msgid "MYSQL Dump Location:"
188
+ msgstr ""
189
+
190
+ #: database-backup.php:199
191
+ msgid "GZIP Database Backup File?"
192
+ msgstr ""
193
+
194
+ #: database-backup.php:200 database-optimize.php:74 database-repair.php:75
195
+ #: wp-dbmanager.php:645 wp-dbmanager.php:741
196
+ msgid "Yes"
197
+ msgstr ""
198
+
199
+ #: database-backup.php:200 database-optimize.php:74 database-repair.php:75
200
+ #: wp-dbmanager.php:644 wp-dbmanager.php:742
201
+ msgid "No"
202
+ msgstr ""
203
+
204
+ #: database-backup.php:203 database-empty.php:99 database-manage.php:168
205
+ #: database-optimize.php:81 database-repair.php:79 database-run.php:83
206
+ msgid "Cancel"
207
+ msgstr ""
208
+
209
+ #: database-empty.php:27 database-empty.php:99
210
+ msgid "Empty/Drop"
211
+ msgstr ""
212
+
213
+ #: database-empty.php:40
214
+ msgid "No Tables Selected."
215
+ msgstr ""
216
+
217
+ #: database-empty.php:46
218
+ #, php-format
219
+ msgid "Table '%s' Emptied"
220
+ msgstr ""
221
+
222
+ #: database-empty.php:51
223
+ #, php-format
224
+ msgid "Table(s) '%s' Dropped"
225
+ msgstr ""
226
+
227
+ #: database-empty.php:67 wp-dbmanager.php:50
228
+ msgid "Empty/Drop Tables"
229
+ msgstr ""
230
+
231
+ #: database-empty.php:72 database-manager.php:67 database-optimize.php:60
232
+ #: database-repair.php:61
233
+ msgid "Tables"
234
+ msgstr ""
235
+
236
+ #: database-empty.php:73 database-empty.php:87
237
+ msgid "Empty"
238
+ msgstr ""
239
+
240
+ #: database-empty.php:73
241
+ msgid "1"
242
+ msgstr ""
243
+
244
+ #: database-empty.php:74 database-empty.php:88
245
+ msgid "Drop"
246
+ msgstr ""
247
+
248
+ #: database-empty.php:74
249
+ msgid "2"
250
+ msgstr ""
251
+
252
+ #: database-empty.php:93
253
+ msgid ""
254
+ "1. EMPTYING a table means all the rows in the table will be deleted. This "
255
+ "action is not REVERSIBLE."
256
+ msgstr ""
257
+
258
+ #: database-empty.php:95
259
+ msgid ""
260
+ "2. DROPPING a table means deleting the table. This action is not REVERSIBLE."
261
+ msgstr ""
262
+
263
+ #: database-empty.php:99
264
+ msgid ""
265
+ "You Are About To Empty Or Drop The Selected Databases.\\nThis Action Is Not "
266
+ "Reversible.\\n\\n Choose [Cancel] to stop, [Ok] to delete."
267
+ msgstr ""
268
+
269
+ #: database-manage.php:31 database-manage.php:166
270
+ msgid "Restore"
271
+ msgstr ""
272
+
273
+ #: database-manage.php:53
274
+ #, php-format
275
+ msgid "Database On '%s' Failed To Restore"
276
+ msgstr ""
277
+
278
+ #: database-manage.php:55
279
+ #, php-format
280
+ msgid "Database On '%s' Restored Successfully"
281
+ msgstr ""
282
+
283
+ #: database-manage.php:58 database-manage.php:71 database-manage.php:76
284
+ #: database-manage.php:91
285
+ msgid "No Backup Database File Selected"
286
+ msgstr ""
287
+
288
+ #: database-manage.php:61 database-manage.php:161
289
+ msgid "E-Mail"
290
+ msgstr ""
291
+
292
+ #: database-manage.php:66
293
+ #, php-format
294
+ msgid "Database Backup File For '%s' Successfully E-Mailed To '%s'"
295
+ msgstr ""
296
+
297
+ #: database-manage.php:68
298
+ #, php-format
299
+ msgid "Unable To E-Mail Database Backup File For '%s' To '%s'"
300
+ msgstr ""
301
+
302
+ #: database-manage.php:74 database-manage.php:165 wp-dbmanager.php:451
303
+ msgid "Download"
304
+ msgstr ""
305
+
306
+ #: database-manage.php:79 database-manage.php:167
307
+ msgid "Delete"
308
+ msgstr ""
309
+
310
+ #: database-manage.php:83
311
+ #, php-format
312
+ msgid "Unable To Delete Database Backup File On '%s'"
313
+ msgstr ""
314
+
315
+ #: database-manage.php:85
316
+ #, php-format
317
+ msgid "Database Backup File On '%s' Deleted Successfully"
318
+ msgstr ""
319
+
320
+ #: database-manage.php:88
321
+ #, php-format
322
+ msgid "Invalid Database Backup File On '%s'"
323
+ msgstr ""
324
+
325
+ #: database-manage.php:103
326
+ msgid "Manage Backup Database"
327
+ msgstr ""
328
+
329
+ #: database-manage.php:104
330
+ msgid "Choose A Backup Date To E-Mail, Restore, Download Or Delete"
331
+ msgstr ""
332
+
333
+ #: database-manage.php:108 database-manager.php:66
334
+ msgid "No."
335
+ msgstr ""
336
+
337
+ #: database-manage.php:109
338
+ msgid "Database File"
339
+ msgstr ""
340
+
341
+ #: database-manage.php:110
342
+ msgid "Date/Time"
343
+ msgstr ""
344
+
345
+ #: database-manage.php:111
346
+ msgid "Size"
347
+ msgstr ""
348
+
349
+ #: database-manage.php:112
350
+ msgid "Select"
351
+ msgstr ""
352
+
353
+ #: database-manage.php:147 database-manage.php:150
354
+ msgid "There Are No Database Backup Files Available."
355
+ msgstr ""
356
+
357
+ #: database-manage.php:154
358
+ #, php-format
359
+ msgid "%s Backup File"
360
+ msgid_plural "%s Backup Files"
361
+ msgstr[0] ""
362
+ msgstr[1] ""
363
+
364
+ #: database-manage.php:161
365
+ msgid "E-mail database backup file to:"
366
+ msgstr ""
367
+
368
+ #: database-manage.php:166
369
+ msgid ""
370
+ "You Are About To Restore A Database.\\nThis Action Is Not Reversible.\\nAny "
371
+ "Data Inserted After The Backup Date Will Be Gone.\\n\\n Choose [Cancel] to "
372
+ "stop, [Ok] to restore."
373
+ msgstr ""
374
+
375
+ #: database-manage.php:167
376
+ msgid ""
377
+ "You Are About To Delete The Selected Database Backup Files.\\nThis Action Is "
378
+ "Not Reversible.\\n\\n Choose [Cancel] to stop, [Ok] to delete."
379
+ msgstr ""
380
+
381
+ #: database-manager.php:26 wp-dbmanager.php:43
382
+ msgid "Database"
383
+ msgstr ""
384
+
385
+ #: database-manager.php:27
386
+ msgid "Database Information"
387
+ msgstr ""
388
+
389
+ #: database-manager.php:32
390
+ msgid "Setting"
391
+ msgstr ""
392
+
393
+ #: database-manager.php:37
394
+ msgid "Database Host"
395
+ msgstr ""
396
+
397
+ #: database-manager.php:41
398
+ msgid "Database Name"
399
+ msgstr ""
400
+
401
+ #: database-manager.php:45
402
+ msgid "Database User"
403
+ msgstr ""
404
+
405
+ #: database-manager.php:49
406
+ msgid "Database Type"
407
+ msgstr ""
408
+
409
+ #: database-manager.php:53
410
+ msgid "Database Version"
411
+ msgstr ""
412
+
413
+ #: database-manager.php:61
414
+ msgid "Tables Information"
415
+ msgstr ""
416
+
417
+ #: database-manager.php:68
418
+ msgid "Records"
419
+ msgstr ""
420
+
421
+ #: database-manager.php:69
422
+ msgid "Data Usage"
423
+ msgstr ""
424
+
425
+ #: database-manager.php:70
426
+ msgid "Index Usage"
427
+ msgstr ""
428
+
429
+ #: database-manager.php:71
430
+ msgid "Overhead"
431
+ msgstr ""
432
+
433
+ #: database-manager.php:104
434
+ msgid "Total:"
435
+ msgstr ""
436
+
437
+ #: database-manager.php:105
438
+ #, php-format
439
+ msgid "%s Table"
440
+ msgid_plural "%s Tables"
441
+ msgstr[0] ""
442
+ msgstr[1] ""
443
+
444
+ #: database-manager.php:106
445
+ #, php-format
446
+ msgid "%s Record"
447
+ msgid_plural "%s Records"
448
+ msgstr[0] ""
449
+ msgstr[1] ""
450
+
451
+ #: database-manager.php:112
452
+ msgid ""
453
+ "Could Not Show Table Status Due To Your MYSQL Version Is Lower Than 3.23."
454
+ msgstr ""
455
+
456
+ #: database-optimize.php:19 database-optimize.php:81
457
+ msgid "Optimize"
458
+ msgstr ""
459
+
460
+ #: database-optimize.php:29 database-repair.php:30
461
+ msgid "No Tables Selected"
462
+ msgstr ""
463
+
464
+ #: database-optimize.php:36
465
+ #, php-format
466
+ msgid "Table(s) '%s' NOT Optimized"
467
+ msgstr ""
468
+
469
+ #: database-optimize.php:38
470
+ #, php-format
471
+ msgid "Table(s) '%s' Optimized"
472
+ msgstr ""
473
+
474
+ #: database-optimize.php:55
475
+ msgid "Optimize Database"
476
+ msgstr ""
477
+
478
+ #: database-optimize.php:61 database-repair.php:62
479
+ msgid "Options"
480
+ msgstr ""
481
+
482
+ #: database-optimize.php:78
483
+ msgid "Database should be optimize once every month."
484
+ msgstr ""
485
+
486
+ #: database-repair.php:20 database-repair.php:79
487
+ msgid "Repair"
488
+ msgstr ""
489
+
490
+ #: database-repair.php:37
491
+ #, php-format
492
+ msgid "Table(s) '%s' NOT Repaired"
493
+ msgstr ""
494
+
495
+ #: database-repair.php:39
496
+ #, php-format
497
+ msgid "Table(s) '%s' Repaired"
498
+ msgstr ""
499
+
500
+ #: database-repair.php:56
501
+ msgid "Repair Database"
502
+ msgstr ""
503
+
504
+ #: database-run.php:24 database-run.php:83
505
+ msgid "Run"
506
+ msgstr ""
507
+
508
+ #: database-run.php:55
509
+ msgid "Query(s) Executed Successfully"
510
+ msgstr ""
511
+
512
+ #: database-run.php:57 database-run.php:60
513
+ msgid "Empty Query"
514
+ msgstr ""
515
+
516
+ #: database-run.php:72 wp-dbmanager.php:51
517
+ msgid "Run SQL Query"
518
+ msgstr ""
519
+
520
+ #: database-run.php:75
521
+ msgid "Seperate Multiple Queries With A New Line"
522
+ msgstr ""
523
+
524
+ #: database-run.php:76
525
+ msgid "Use Only INSERT, UPDATE, REPLACE, DELETE, CREATE and ALTER statements."
526
+ msgstr ""
527
+
528
+ #: database-run.php:87
529
+ msgid ""
530
+ "1. CREATE statement will return an error, which is perfectly normal due to "
531
+ "the database class. To confirm that your table has been created check the "
532
+ "Manage Database page."
533
+ msgstr ""
534
+
535
+ #: database-run.php:88
536
+ msgid ""
537
+ "2. UPDATE statement may return an error sometimes due to the newly updated "
538
+ "value being the same as the previous value."
539
+ msgstr ""
540
+
541
+ #: database-run.php:89
542
+ msgid ""
543
+ "3. ALTER statement will return an error because there is no value returned."
544
+ msgstr ""
545
+
546
+ #: wp-dbmanager.php:46
547
+ msgid "Backup DB"
548
+ msgstr ""
549
+
550
+ #: wp-dbmanager.php:47
551
+ msgid "Manage Backup DB"
552
+ msgstr ""
553
+
554
+ #: wp-dbmanager.php:48
555
+ msgid "Optimize DB"
556
+ msgstr ""
557
+
558
+ #: wp-dbmanager.php:49
559
+ msgid "Repair DB"
560
+ msgstr ""
561
+
562
+ #: wp-dbmanager.php:52
563
+ msgid "DB Options"
564
+ msgstr ""
565
+
566
+ #: wp-dbmanager.php:159
567
+ msgid "WP-DBManager Backup Schedule"
568
+ msgstr ""
569
+
570
+ #: wp-dbmanager.php:160
571
+ msgid "WP-DBManager Optimize Schedule"
572
+ msgstr ""
573
+
574
+ #: wp-dbmanager.php:161
575
+ msgid "WP-DBManager Repair Schedule"
576
+ msgstr ""
577
+
578
+ #: wp-dbmanager.php:179
579
+ msgid "Your backup folder is NOT writable"
580
+ msgstr ""
581
+
582
+ #: wp-dbmanager.php:180
583
+ #, php-format
584
+ msgid "To correct this issue, make the folder <strong>%s</strong> writable."
585
+ msgstr ""
586
+
587
+ #: wp-dbmanager.php:183
588
+ msgid "Your backup folder MIGHT be visible to the public"
589
+ msgstr ""
590
+
591
+ #: wp-dbmanager.php:184
592
+ #, php-format
593
+ msgid ""
594
+ "To correct this issue, move the file from <strong>%s</strong> to <strong>%s</"
595
+ "strong>"
596
+ msgstr ""
597
+
598
+ #: wp-dbmanager.php:266
599
+ msgid "Website Name:"
600
+ msgstr ""
601
+
602
+ #: wp-dbmanager.php:267
603
+ msgid "Website URL:"
604
+ msgstr ""
605
+
606
+ #: wp-dbmanager.php:268
607
+ msgid "Backup File Name:"
608
+ msgstr ""
609
+
610
+ #: wp-dbmanager.php:269
611
+ msgid "Backup File Date:"
612
+ msgstr ""
613
+
614
+ #: wp-dbmanager.php:270
615
+ msgid "Backup File Size:"
616
+ msgstr ""
617
+
618
+ #: wp-dbmanager.php:271
619
+ msgid "With Regards,"
620
+ msgstr ""
621
+
622
+ #: wp-dbmanager.php:272 wp-dbmanager.php:365
623
+ msgid "Administrator"
624
+ msgstr ""
625
+
626
+ #: wp-dbmanager.php:290
627
+ msgid "GiB"
628
+ msgstr ""
629
+
630
+ #: wp-dbmanager.php:292
631
+ msgid "MiB"
632
+ msgstr ""
633
+
634
+ #: wp-dbmanager.php:294
635
+ msgid "KiB"
636
+ msgstr ""
637
+
638
+ #: wp-dbmanager.php:296
639
+ msgid "bytes"
640
+ msgstr ""
641
+
642
+ #: wp-dbmanager.php:368
643
+ msgid "%SITE_NAME% Database Backup File For %POST_DATE% @ %POST_TIME%"
644
+ msgstr ""
645
+
646
+ #: wp-dbmanager.php:501
647
+ msgid "Database Options Updated"
648
+ msgstr ""
649
+
650
+ #: wp-dbmanager.php:504
651
+ msgid "No Database Option Updated"
652
+ msgstr ""
653
+
654
+ #: wp-dbmanager.php:562
655
+ msgid "Database Options"
656
+ msgstr ""
657
+
658
+ #: wp-dbmanager.php:563
659
+ msgid "Paths"
660
+ msgstr ""
661
+
662
+ #: wp-dbmanager.php:566
663
+ msgid "Path To mysqldump:"
664
+ msgstr ""
665
+
666
+ #: wp-dbmanager.php:568 wp-dbmanager.php:575
667
+ msgid "Auto Detect"
668
+ msgstr ""
669
+
670
+ #: wp-dbmanager.php:569
671
+ msgid ""
672
+ "The absolute path to mysqldump without trailing slash. If unsure, please "
673
+ "email your server administrator about this."
674
+ msgstr ""
675
+
676
+ #: wp-dbmanager.php:573
677
+ msgid "Path To mysql:"
678
+ msgstr ""
679
+
680
+ #: wp-dbmanager.php:576
681
+ msgid ""
682
+ "The absolute path to mysql without trailing slash. If unsure, please email "
683
+ "your server administrator about this."
684
+ msgstr ""
685
+
686
+ #: wp-dbmanager.php:580
687
+ msgid "Path To Backup:"
688
+ msgstr ""
689
+
690
+ #: wp-dbmanager.php:583
691
+ msgid ""
692
+ "The absolute path to your database backup folder without trailing slash. "
693
+ "Make sure the folder is writable."
694
+ msgstr ""
695
+
696
+ #: wp-dbmanager.php:587
697
+ msgid "Maximum Backup Files:"
698
+ msgstr ""
699
+
700
+ #: wp-dbmanager.php:590
701
+ msgid ""
702
+ "The maximum number of database backup files that is allowed in the backup "
703
+ "folder as stated above. The oldest database backup file is always deleted in "
704
+ "order to maintain this value. This is to prevent the backup folder from "
705
+ "getting too large."
706
+ msgstr ""
707
+
708
+ #: wp-dbmanager.php:595 wp-dbmanager.php:613
709
+ msgid "Note"
710
+ msgstr ""
711
+
712
+ #: wp-dbmanager.php:599
713
+ msgid "Windows Server"
714
+ msgstr ""
715
+
716
+ #: wp-dbmanager.php:600
717
+ msgid "For mysqldump path, you can try '<strong>mysqldump.exe</strong>'."
718
+ msgstr ""
719
+
720
+ #: wp-dbmanager.php:601
721
+ msgid "For mysql path, you can try '<strong>mysql.exe</strong>'."
722
+ msgstr ""
723
+
724
+ #: wp-dbmanager.php:606
725
+ msgid "Linux Server"
726
+ msgstr ""
727
+
728
+ #: wp-dbmanager.php:607
729
+ msgid "For mysqldump path, normally is just '<strong>mysqldump</strong>'."
730
+ msgstr ""
731
+
732
+ #: wp-dbmanager.php:608
733
+ msgid "For mysql path, normally is just '<strong>mysql</strong>'."
734
+ msgstr ""
735
+
736
+ #: wp-dbmanager.php:614
737
+ msgid ""
738
+ "The 'Auto Detect' function does not work for some servers. If it does not "
739
+ "work for you, please contact your server administrator for the MYSQL and "
740
+ "MYSQL DUMP paths."
741
+ msgstr ""
742
+
743
+ #: wp-dbmanager.php:619
744
+ msgid "Automatic Scheduling"
745
+ msgstr ""
746
+
747
+ #: wp-dbmanager.php:622
748
+ msgid "Automatic Backing Up Of DB:"
749
+ msgstr ""
750
+
751
+ #: wp-dbmanager.php:625
752
+ msgid "Next backup date: "
753
+ msgstr ""
754
+
755
+ #: wp-dbmanager.php:629 wp-dbmanager.php:659 wp-dbmanager.php:684
756
+ msgid "N/A"
757
+ msgstr ""
758
+
759
+ #: wp-dbmanager.php:633 wp-dbmanager.php:663 wp-dbmanager.php:688
760
+ msgid "Every"
761
+ msgstr ""
762
+
763
+ #: wp-dbmanager.php:635 wp-dbmanager.php:665 wp-dbmanager.php:690
764
+ msgid "Disable"
765
+ msgstr ""
766
+
767
+ #: wp-dbmanager.php:636 wp-dbmanager.php:666 wp-dbmanager.php:691
768
+ msgid "Minutes(s)"
769
+ msgstr ""
770
+
771
+ #: wp-dbmanager.php:637 wp-dbmanager.php:667 wp-dbmanager.php:692
772
+ msgid "Hour(s)"
773
+ msgstr ""
774
+
775
+ #: wp-dbmanager.php:638 wp-dbmanager.php:668 wp-dbmanager.php:693
776
+ msgid "Day(s)"
777
+ msgstr ""
778
+
779
+ #: wp-dbmanager.php:639 wp-dbmanager.php:669 wp-dbmanager.php:694
780
+ msgid "Week(s)"
781
+ msgstr ""
782
+
783
+ #: wp-dbmanager.php:640 wp-dbmanager.php:670 wp-dbmanager.php:695
784
+ msgid "Month(s)"
785
+ msgstr ""
786
+
787
+ #: wp-dbmanager.php:642
788
+ msgid "Gzip"
789
+ msgstr ""
790
+
791
+ #: wp-dbmanager.php:648
792
+ msgid ""
793
+ "WP-DBManager can automatically backup your database after a certain period."
794
+ msgstr ""
795
+
796
+ #: wp-dbmanager.php:652
797
+ msgid "Automatic Optimizing Of DB:"
798
+ msgstr ""
799
+
800
+ #: wp-dbmanager.php:655
801
+ msgid "Next optimize date: "
802
+ msgstr ""
803
+
804
+ #: wp-dbmanager.php:673
805
+ msgid ""
806
+ "WP-DBManager can automatically optimize your database after a certain period."
807
+ msgstr ""
808
+
809
+ #: wp-dbmanager.php:677
810
+ msgid "Automatic Repairing Of DB:"
811
+ msgstr ""
812
+
813
+ #: wp-dbmanager.php:680
814
+ msgid "Next repair date: "
815
+ msgstr ""
816
+
817
+ #: wp-dbmanager.php:698
818
+ msgid ""
819
+ "WP-DBManager can automatically repair your database after a certain period."
820
+ msgstr ""
821
+
822
+ #: wp-dbmanager.php:703
823
+ msgid "Backup Email Options"
824
+ msgstr ""
825
+
826
+ #: wp-dbmanager.php:706
827
+ msgid "To"
828
+ msgstr ""
829
+
830
+ #: wp-dbmanager.php:709
831
+ msgid "To E-mail"
832
+ msgstr ""
833
+
834
+ #: wp-dbmanager.php:711
835
+ msgid "(Leave blank to disable this feature)"
836
+ msgstr ""
837
+
838
+ #: wp-dbmanager.php:715
839
+ msgid "From"
840
+ msgstr ""
841
+
842
+ #: wp-dbmanager.php:718
843
+ msgid "From Name"
844
+ msgstr ""
845
+
846
+ #: wp-dbmanager.php:719
847
+ msgid "From E-mail"
848
+ msgstr ""
849
+
850
+ #: wp-dbmanager.php:721 wp-dbmanager.php:730
851
+ msgid "(Leave blank to use the default)"
852
+ msgstr ""
853
+
854
+ #: wp-dbmanager.php:725
855
+ msgid "Subject:"
856
+ msgstr ""
857
+
858
+ #: wp-dbmanager.php:728
859
+ msgid "Subject"
860
+ msgstr ""
861
+
862
+ #: wp-dbmanager.php:735
863
+ msgid "Miscellaneous Options"
864
+ msgstr ""
865
+
866
+ #: wp-dbmanager.php:738
867
+ msgid "Hide Admin Notices"
868
+ msgstr ""
869
+
870
+ #: wp-dbmanager.php:749
871
+ msgid "Save Changes"
872
+ msgstr ""