Version Description
Download this release
Release Info
Developer | GamerZ |
Plugin | WP-DBManager |
Version | 2.10 |
Comparing to | |
See all releases |
Version 2.10
- .htaccess +4 -0
- dbmanager/database-backup.php +199 -0
- dbmanager/database-empty.php +111 -0
- dbmanager/database-manage.php +205 -0
- dbmanager/database-manager.php +120 -0
- dbmanager/database-optimize.php +102 -0
- dbmanager/database-run.php +99 -0
- dbmanager/dbmanager.php +249 -0
- dbmanager/wp-dbmanager.pot +619 -0
- readme.html +424 -0
- readme.txt +31 -0
.htaccess
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<Files ~ ".*\..*">
|
2 |
+
order allow,deny
|
3 |
+
deny from all
|
4 |
+
</Files>
|
dbmanager/database-backup.php
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
+----------------------------------------------------------------+
|
4 |
+
| |
|
5 |
+
| WordPress 2.1 Plugin: WP-DBManager 2.10 |
|
6 |
+
| Copyright (c) 2007 Lester "GaMerZ" Chan |
|
7 |
+
| |
|
8 |
+
| File Written By: |
|
9 |
+
| - Lester "GaMerZ" Chan |
|
10 |
+
| - http://www.lesterchan.net |
|
11 |
+
| |
|
12 |
+
| File Information: |
|
13 |
+
| - Database Backup |
|
14 |
+
| - wp-content/plugins/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');
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
### Variables Variables Variables
|
27 |
+
$base_name = plugin_basename('dbmanager/database-manager.php');
|
28 |
+
$base_page = 'admin.php?page='.$base_name;
|
29 |
+
$current_date = gmdate('l, jS F Y @ H:i', (time() + (get_option('gmt_offset') * 3600)));
|
30 |
+
$backup = array();
|
31 |
+
$backup_options = get_option('dbmanager_options');
|
32 |
+
$backup['date'] = current_time('timestamp');
|
33 |
+
$backup['mysqldumppath'] = $backup_options['mysqldumppath'];
|
34 |
+
$backup['mysqlpath'] = $backup_options['mysqlpath'];
|
35 |
+
$backup['path'] = $backup_options['path'];
|
36 |
+
|
37 |
+
|
38 |
+
### Form Processing
|
39 |
+
if($_POST['do']) {
|
40 |
+
// Decide What To Do
|
41 |
+
switch($_POST['do']) {
|
42 |
+
case __('Backup', 'wp-dbmanager'):
|
43 |
+
$gzip = intval($_POST['gzip']);
|
44 |
+
if($gzip == 1) {
|
45 |
+
$backup['filename'] = $backup['date'].'_-_'.DB_NAME.'.sql.gz';
|
46 |
+
$backup['filepath'] = $backup['path'].'/'.$backup['filename'];
|
47 |
+
$backup['command'] = $backup['mysqldumppath'].' --host="'.DB_HOST.'" --user="'.DB_USER.'" --password="'.DB_PASSWORD.'" --add-drop-table '.DB_NAME.' | gzip > '.$backup['filepath'];
|
48 |
+
} else {
|
49 |
+
$backup['filename'] = $backup['date'].'_-_'.DB_NAME.'.sql';
|
50 |
+
$backup['filepath'] = $backup['path'].'/'.$backup['filename'];
|
51 |
+
$backup['command'] = $backup['mysqldumppath'].' --host="'.DB_HOST.'" --user="'.DB_USER.'" --password="'.DB_PASSWORD.'" --add-drop-table '.DB_NAME.' > '.$backup['filepath'];
|
52 |
+
}
|
53 |
+
passthru($backup['command'], $error);
|
54 |
+
if(!is_writable($backup['path'])) {
|
55 |
+
$text = '<font color="red">'.sprintf(__('Database Failed To Backup On \'%s\'. Backup Folder Not Writable.', 'wp-dbmanager'), $current_date).'</font>';
|
56 |
+
} elseif(filesize($backup['filepath']) == 0) {
|
57 |
+
unlink($backup['filepath']);
|
58 |
+
$text = '<font color="red">'.sprintf(__('Database Failed To Backup On \'%s\'. Backup File Size Is 0KB.', 'wp-dbmanager'), $current_date).'</font>';
|
59 |
+
} elseif(!is_file($backup['filepath'])) {
|
60 |
+
$text = '<font color="red">'.sprintf(__('Database Failed To Backup On \'%s\'. Invalid Backup File Path.', 'wp-dbmanager'), $current_date).'</font>';
|
61 |
+
} elseif($error) {
|
62 |
+
$text = '<font color="red">'.sprintf(__('Database Failed To Backup On \'%s\'.', 'wp-dbmanager'), $current_date).'</font>';
|
63 |
+
} else {
|
64 |
+
$text = '<font color="green">'.sprintf(__('Database Backed Up Successfully On \'%s\'.', 'wp-dbmanager'), $current_date).'</font>';
|
65 |
+
}
|
66 |
+
break;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
### Backup File Name
|
72 |
+
$backup['filename'] = $backup['date'].'_-_'.DB_NAME.'.sql';
|
73 |
+
|
74 |
+
|
75 |
+
### MYSQL Base Dir
|
76 |
+
$status_count = 0;
|
77 |
+
$stats_function_disabled = 0;
|
78 |
+
?>
|
79 |
+
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
80 |
+
<!-- Checking Backup Status -->
|
81 |
+
<div class="wrap">
|
82 |
+
<h2><?php _e('Checking Backup Status', 'wp-dbmanager'); ?></h2>
|
83 |
+
<p>
|
84 |
+
<?php _e('Checking Backup Folder', 'wp-dbmanager'); ?> (<strong><?php echo stripslashes($backup['path']); ?></strong>) ...<br />
|
85 |
+
<?php
|
86 |
+
if(is_dir(stripslashes($backup['path']))) {
|
87 |
+
echo '<font color="green">'.__('Backup folder exists', 'wp-dbmanager').'</font><br />';
|
88 |
+
$status_count++;
|
89 |
+
} else {
|
90 |
+
echo '<font color="red">'.__('Backup folder does NOT exist. Please create \'backup-db\' folder in \'wp-content\' folder and CHMOD it to \'777\' or change the location of the backup folder under DB Option.', 'wp-dbmanager').'</font><br />';
|
91 |
+
}
|
92 |
+
if(is_writable(stripslashes($backup['path']))) {
|
93 |
+
echo '<font color="green">'.__('Backup folder is writable', 'wp-dbmanager').'</font>';
|
94 |
+
$status_count++;
|
95 |
+
} else {
|
96 |
+
echo '<font color="red">'.__('Backup folder is NOT writable. Please CHMOD it to \'777\'.', 'wp-dbmanager').'</font>';
|
97 |
+
}
|
98 |
+
?>
|
99 |
+
</p>
|
100 |
+
<p>
|
101 |
+
<?php
|
102 |
+
if(file_exists(stripslashes($backup['mysqldumppath']))) {
|
103 |
+
echo __('Checking MYSQL Dump Path', 'wp-dbmanager').' (<strong>'.stripslashes($backup['mysqldumppath']).'</strong>) ...<br />';
|
104 |
+
echo '<font color="green">'.__('MYSQL dump path exists.', 'wp-dbmanager').'</font>';
|
105 |
+
$status_count++;
|
106 |
+
} else {
|
107 |
+
echo __('Checking MYSQL Dump Path', 'wp-dbmanager').' ...<br />';
|
108 |
+
echo '<font color="red">'.__('MYSQL dump path does NOT exist. Please check your mysqldump path under DB Options. If uncertain, contact your server administrator.', 'wp-dbmanager').'</font>';
|
109 |
+
}
|
110 |
+
?>
|
111 |
+
</p>
|
112 |
+
<p>
|
113 |
+
<?php
|
114 |
+
if(file_exists(stripslashes($backup['mysqlpath']))) {
|
115 |
+
echo __('Checking MYSQL Path', 'wp-dbmanager').' (<strong>'.stripslashes($backup['mysqlpath']).'</strong>) ...<br />';
|
116 |
+
echo '<font color="green">'.__('MYSQL path exists.', 'wp-dbmanager').'</font>';
|
117 |
+
$status_count++;
|
118 |
+
} else {
|
119 |
+
echo __('Checking MYSQL Path', 'wp-dbmanager').' ...<br />';
|
120 |
+
echo '<font color="red">'.__('MYSQL path does NOT exist. Please check your mysql path under DB Options. If uncertain, contact your server administrator.', 'wp-dbmanager').'</font>';
|
121 |
+
}
|
122 |
+
?>
|
123 |
+
</p>
|
124 |
+
<p>
|
125 |
+
<?php _e('Checking PHP Functions', 'wp-dbmanager'); ?> (<strong>passthru()</strong>, <strong>system()</strong> <?php _e('and', 'wp-dbmanager'); ?> <strong>exec()</strong>) ...<br />
|
126 |
+
<?php
|
127 |
+
if(function_exists('passthru')) {
|
128 |
+
echo '<font color="green">passthru() '.__('enabled', 'wp-dbmanager').'.</font><br />';
|
129 |
+
$status_count++;
|
130 |
+
} else {
|
131 |
+
echo '<font color="red">passthru() '.__('disabled', 'wp-dbmanager').'.</font><br />';
|
132 |
+
$stats_function_disabled++;
|
133 |
+
}
|
134 |
+
if(function_exists('system')) {
|
135 |
+
echo '<font color="green">system() '.__('enabled', 'wp-dbmanager').'.</font><br />';
|
136 |
+
} else {
|
137 |
+
echo '<font color="red">system() '.__('disabled', 'wp-dbmanager').'.</font><br />';
|
138 |
+
$stats_function_disabled++;
|
139 |
+
}
|
140 |
+
if(function_exists('exec')) {
|
141 |
+
echo '<font color="green">exec() '.__('enabled', 'wp-dbmanager').'.</font>';
|
142 |
+
} else {
|
143 |
+
echo '<font color="red">exec() '.__('disabled', 'wp-dbmanager').'.</font>';
|
144 |
+
$stats_function_disabled++;
|
145 |
+
}
|
146 |
+
?>
|
147 |
+
</p>
|
148 |
+
<p>
|
149 |
+
<?php
|
150 |
+
if($status_count == 5) {
|
151 |
+
echo '<strong><font color="green">'.__('Excellent. You Are Good To Go.', 'wp-dbmanager').'</font></strong>';
|
152 |
+
} else if($stats_function_disabled == 3) {
|
153 |
+
echo '<strong><font color="red">'.__('I\'m sorry, your server administrator has disabled passthru(), system() and exec(), thus you cannot use this backup script. You may consider using the default WordPress database backup script instead.', 'wp-dbmanager').'</font></strong>';
|
154 |
+
} else {
|
155 |
+
echo '<strong><font color="red">'.__('Please Rectify The Error Highlighted In Red Before Proceeding On.', 'wp-dbmanager').'</font></strong>';
|
156 |
+
}
|
157 |
+
?>
|
158 |
+
</p>
|
159 |
+
<p><i><?php _e('Note: The checking of backup status is still undergoing testing, it may not be accurate.', 'wp-dbmanager'); ?></i></p>
|
160 |
+
</div>
|
161 |
+
<!-- Backup Database -->
|
162 |
+
<div class="wrap">
|
163 |
+
<h2><?php _e('Backup Database', 'wp-dbmanager'); ?></h2>
|
164 |
+
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
165 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
166 |
+
<tr>
|
167 |
+
<th align="left" scope="row"><?php _e('Database Name:', 'wp-dbmanager'); ?></th>
|
168 |
+
<td><?php echo DB_NAME; ?></td>
|
169 |
+
</tr>
|
170 |
+
<tr style="background-color: #eee;">
|
171 |
+
<th align="left" scope="row"><?php _e('Database Backup To:', 'wp-dbmanager'); ?></th>
|
172 |
+
<td><?php echo stripslashes($backup['path']); ?></td>
|
173 |
+
</tr>
|
174 |
+
<tr>
|
175 |
+
<th align="left" scope="row"><?php _e('Database Backup Date:', 'wp-dbmanager'); ?></th>
|
176 |
+
<td><?php echo gmdate('l, jS F Y @ H:i', $backup['date']); ?></td>
|
177 |
+
</tr>
|
178 |
+
<tr style="background-color: #eee;">
|
179 |
+
<th align="left" scope="row"><?php _e('Database Backup File Name:', 'wp-dbmanager'); ?></th>
|
180 |
+
<td><?php echo $backup['filename']; ?></td>
|
181 |
+
</tr>
|
182 |
+
<tr>
|
183 |
+
<th align="left" scope="row"><?php _e('Database Backup Type:', 'wp-dbmanager'); ?></th>
|
184 |
+
<td><?php _e('Full (Structure and Data)', 'wp-dbmanager'); ?></td>
|
185 |
+
</tr>
|
186 |
+
<tr style="background-color: #eee;">
|
187 |
+
<th align="left" scope="row"><?php _e('MYSQL Dump Location:', 'wp-dbmanager'); ?></th>
|
188 |
+
<td><?php echo stripslashes($backup['mysqldumppath']); ?></td>
|
189 |
+
</tr>
|
190 |
+
<tr>
|
191 |
+
<th align="left" scope="row"><?php _e('GZIP Database Backup File?', 'wp-dbmanager'); ?></th>
|
192 |
+
<td><input type="radio" name="gzip" value="1" /><?php _e('Yes', 'wp-dbmanager'); ?> <input type="radio" name="gzip" value="0" checked="checked" /><?php _e('No', 'wp-dbmanager'); ?></td>
|
193 |
+
</tr>
|
194 |
+
<tr>
|
195 |
+
<td colspan="2" align="center"><input type="submit" name="do" value="<?php _e('Backup', 'wp-dbmanager'); ?>" class="button" /> <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
|
196 |
+
</tr>
|
197 |
+
</table>
|
198 |
+
</form>
|
199 |
+
</div>
|
dbmanager/database-empty.php
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
+----------------------------------------------------------------+
|
4 |
+
| |
|
5 |
+
| WordPress 2.1 Plugin: WP-DBManager 2.10 |
|
6 |
+
| Copyright (c) 2007 Lester "GaMerZ" Chan |
|
7 |
+
| |
|
8 |
+
| File Written By: |
|
9 |
+
| - Lester "GaMerZ" Chan |
|
10 |
+
| - http://www.lesterchan.net |
|
11 |
+
| |
|
12 |
+
| File Information: |
|
13 |
+
| - Database Empty |
|
14 |
+
| - wp-content/plugins/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('dbmanager/database-manager.php');
|
28 |
+
$base_page = 'admin.php?page='.$base_name;
|
29 |
+
$current_date = gmdate('l, jS F Y @ H:i', (time() + (get_option('gmt_offset') * 3600)));
|
30 |
+
$backup = array();
|
31 |
+
$backup_options = get_option('dbmanager_options');
|
32 |
+
$backup['date'] = current_time('timestamp');
|
33 |
+
$backup['mysqldumppath'] = $backup_options['mysqldumppath'];
|
34 |
+
$backup['mysqlpath'] = $backup_options['mysqlpath'];
|
35 |
+
$backup['path'] = $backup_options['path'];
|
36 |
+
|
37 |
+
|
38 |
+
### Form Processing
|
39 |
+
if($_POST['do']) {
|
40 |
+
// Lets Prepare The Variables
|
41 |
+
$emptydrop = $_POST['emptydrop'];
|
42 |
+
|
43 |
+
// Decide What To Do
|
44 |
+
switch($_POST['do']) {
|
45 |
+
case __('Empty/Drop', 'wp-dbmanager'):
|
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 |
+
<div class="wrap">
|
80 |
+
<h2><?php _e('Empty/Drop Tables', 'wp-dbmanager'); ?></h2>
|
81 |
+
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
82 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
83 |
+
<tr class="thead">
|
84 |
+
<th align="left"><?php _e('Tables', 'wp-dbmanager'); ?></th>
|
85 |
+
<th align="left"><?php _e('Empty', 'wp-dbmanager'); ?></th>
|
86 |
+
<th align="left"><?php _e('Drop', 'wp-dbmanager'); ?></th>
|
87 |
+
</tr>
|
88 |
+
<?php
|
89 |
+
foreach($tables as $table_name) {
|
90 |
+
if($no%2 == 0) {
|
91 |
+
$style = 'style=\'background: none;\'';
|
92 |
+
} else {
|
93 |
+
$style = 'style=\'background-color: #eee;\'';
|
94 |
+
}
|
95 |
+
$no++;
|
96 |
+
echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n";
|
97 |
+
echo "<td><input type=\"radio\" name=\"emptydrop[$table_name]\" value=\"empty\" /> ".__('Empty', 'wp-dbmanager').'</td>';
|
98 |
+
echo "<td><input type=\"radio\" name=\"emptydrop[$table_name]\" value=\"drop\" /> ".__('Drop', 'wp-dbmanager').'</td></tr>';
|
99 |
+
}
|
100 |
+
?>
|
101 |
+
<tr>
|
102 |
+
<td colspan="3">
|
103 |
+
<?php _e('1. DROPPING a table means deleting the table. This action is not REVERSIBLE.', 'wp-dbmanager'); ?><br />
|
104 |
+
<?php _e('2. EMPTYING a table means all the rows in the table will be deleted. This action is not REVERSIBLE.', 'wp-dbmanager'); ?></td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
+
<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'); ?>')" /> <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
|
108 |
+
</tr>
|
109 |
+
</table>
|
110 |
+
</form>
|
111 |
+
</div>
|
dbmanager/database-manage.php
ADDED
@@ -0,0 +1,205 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
+----------------------------------------------------------------+
|
4 |
+
| |
|
5 |
+
| WordPress 2.1 Plugin: WP-DBManager 2.10 |
|
6 |
+
| Copyright (c) 2007 Lester "GaMerZ" Chan |
|
7 |
+
| |
|
8 |
+
| File Written By: |
|
9 |
+
| - Lester "GaMerZ" Chan |
|
10 |
+
| - http://www.lesterchan.net |
|
11 |
+
| |
|
12 |
+
| File Information: |
|
13 |
+
| - Database Restore |
|
14 |
+
| - wp-content/plugins/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');
|
23 |
+
}
|
24 |
+
|
25 |
+
|
26 |
+
### Variables Variables Variables
|
27 |
+
$base_name = plugin_basename('dbmanager/database-manager.php');
|
28 |
+
$base_page = 'admin.php?page='.$base_name;
|
29 |
+
$current_date = gmdate('l, jS F Y @ H:i', (time() + (get_option('gmt_offset') * 3600)));
|
30 |
+
$backup = array();
|
31 |
+
$backup_options = get_option('dbmanager_options');
|
32 |
+
$backup['date'] = current_time('timestamp');
|
33 |
+
$backup['mysqldumppath'] = $backup_options['mysqldumppath'];
|
34 |
+
$backup['mysqlpath'] = $backup_options['mysqlpath'];
|
35 |
+
$backup['path'] = $backup_options['path'];
|
36 |
+
|
37 |
+
|
38 |
+
### Form Processing
|
39 |
+
if($_POST['do']) {
|
40 |
+
// Lets Prepare The Variables
|
41 |
+
$database_file = trim($_POST['database_file']);
|
42 |
+
$nice_file_date = gmdate('l, jS F Y @ H:i', substr($database_file, 0, 10));
|
43 |
+
|
44 |
+
// Decide What To Do
|
45 |
+
switch($_POST['do']) {
|
46 |
+
case __('Restore', 'wp-dbmanager'):
|
47 |
+
if(!empty($database_file)) {
|
48 |
+
if(stristr($database_file, '.gz')) {
|
49 |
+
$backup['command'] = 'gunzip < '.$backup['path'].'/'.$database_file.' | '.$backup['mysqlpath'].' --host="'.DB_HOST.'" --user="'.DB_USER.'" --password="'.DB_PASSWORD.'" '.DB_NAME;
|
50 |
+
} else {
|
51 |
+
$backup['command'] = $backup['mysqlpath'].' --host="'.DB_HOST.'" --user="'.DB_USER.'" --password="'.DB_PASSWORD.'" '.DB_NAME.' < '.$backup['path'].'/'.$database_file;
|
52 |
+
}
|
53 |
+
passthru($backup['command'], $error);
|
54 |
+
if($error) {
|
55 |
+
$text = '<font color="red">'.sprintf(__('Database On \'%s\' Failed To Restore', 'wp-dbmanager'), $nice_file_date).'</font>';
|
56 |
+
} else {
|
57 |
+
$text = '<font color="green">'.sprintf(__('Database On \'%s\' Restored Successfully', 'wp-dbmanager'), $nice_file_date).'</font>';
|
58 |
+
}
|
59 |
+
} else {
|
60 |
+
$text = '<font color="red">'.__('No Backup Database File Selected', 'wp-dbmanager').'</font>';
|
61 |
+
}
|
62 |
+
break;
|
63 |
+
case __('E-Mail', 'wp-dbmanager'):
|
64 |
+
if(!empty($database_file)) {
|
65 |
+
// Get And Read The Database Backup File
|
66 |
+
$file_path = $backup['path'].'/'.$database_file;
|
67 |
+
$file_size = format_size(filesize($file_path));
|
68 |
+
$file_date = gmdate('l, jS F Y @ H:i', substr($database_file, 0, 10));
|
69 |
+
$file = fopen($file_path,'rb');
|
70 |
+
$file_data = fread($file,filesize($file_path));
|
71 |
+
fclose($file);
|
72 |
+
$file_data = chunk_split(base64_encode($file_data));
|
73 |
+
// Create Mail To, Mail Subject And Mail Header
|
74 |
+
if(!empty($_POST['email_to'])) {
|
75 |
+
$mail_to = trim($_POST['email_to']);
|
76 |
+
} else {
|
77 |
+
$mail_to = get_option('admin_email');
|
78 |
+
}
|
79 |
+
$mail_subject = sprintf(__('%s Database Backup File For %s', 'wp-dbmanager'), get_bloginfo('name'), $file_date);
|
80 |
+
$mail_header = 'From: '.get_bloginfo('name').' Administrator <'.get_option('admin_email').'>';
|
81 |
+
// MIME Boundary
|
82 |
+
$random_time = md5(time());
|
83 |
+
$mime_boundary = "==WP-DBManager- $random_time";
|
84 |
+
// Create Mail Header And Mail Message
|
85 |
+
$mail_header .= "\nMIME-Version: 1.0\n" .
|
86 |
+
"Content-Type: multipart/mixed;\n" .
|
87 |
+
" boundary=\"{$mime_boundary}\"";
|
88 |
+
$mail_message = __('Website Name:', 'wp-dbmanager').' '.get_bloginfo('name')."\n".
|
89 |
+
__('Website URL:', 'wp-dbmanager').' '.get_bloginfo('siteurl')."\n".
|
90 |
+
__('Backup File Name:', 'wp-dbmanager').' '.$database_file."\n".
|
91 |
+
__('Backup File Date:', 'wp-dbmanager').' '.$file_date."\n".
|
92 |
+
__('Backup File Size:', 'wp-dbmanager').' '.$file_size."\n\n".
|
93 |
+
__('With Regards,', 'wp-dbmanager')."\n".
|
94 |
+
get_bloginfo('name').' '. __('Administrator', 'wp-dbmanager')."\n".
|
95 |
+
get_bloginfo('siteurl');
|
96 |
+
$mail_message = "This is a multi-part message in MIME format.\n\n" .
|
97 |
+
"--{$mime_boundary}\n" .
|
98 |
+
"Content-Type: text/plain; charset=\"utf-8\"\n" .
|
99 |
+
"Content-Transfer-Encoding: 7bit\n\n".$mail_message."\n\n";
|
100 |
+
$mail_message .= "--{$mime_boundary}\n" .
|
101 |
+
"Content-Type: application/octet-stream;\n" .
|
102 |
+
" name=\"$database_file\"\n" .
|
103 |
+
"Content-Disposition: attachment;\n" .
|
104 |
+
" filename=\"$database_file\"\n" .
|
105 |
+
"Content-Transfer-Encoding: base64\n\n" .
|
106 |
+
$file_data."\n\n--{$mime_boundary}--\n";
|
107 |
+
if(mail($mail_to, $mail_subject, $mail_message, $mail_header)) {
|
108 |
+
$text .= '<font color="green">'.sprintf(__('Database Backup File For \'%s\' Successfully E-Mailed To \'%s\'', 'wp-dbmanager'), $file_date, $mail_to).'</font><br />';
|
109 |
+
} else {
|
110 |
+
$text = '<font color="red">'.sprintf(__('Unable To E-Mail Database Backup File For \'%s\' To \'%s\'', 'wp-dbmanager'), $file_date, $mail_to).'</font>';
|
111 |
+
}
|
112 |
+
} else {
|
113 |
+
$text = '<font color="red">'.__('No Backup Database File Selected', 'wp-dbmanager').'</font>';
|
114 |
+
}
|
115 |
+
break;
|
116 |
+
case __('Download', 'wp-dbmanager'):
|
117 |
+
if(empty($database_file)) {
|
118 |
+
$text = '<font color="red">'.__('No Backup Database File Selected', 'wp-dbmanager').'</font>';
|
119 |
+
}
|
120 |
+
break;
|
121 |
+
case __('Delete', 'wp-dbmanager'):
|
122 |
+
if(!empty($database_file)) {
|
123 |
+
$nice_file_date = gmdate('l, jS F Y @ H:i', substr($database_file, 0, 10));
|
124 |
+
if(is_file($backup['path'].'/'.$database_file)) {
|
125 |
+
if(!unlink($backup['path'].'/'.$database_file)) {
|
126 |
+
$text .= '<font color="red">'.sprintf(__('Unable To Delete Database Backup File On \'%s\'', 'wp-dbmanager'), $nice_file_date).'</font><br />';
|
127 |
+
} else {
|
128 |
+
$text .= '<font color="green">'.sprintf(__('Database Backup File On \'%s\' Deleted Successfully', 'wp-dbmanager'), $nice_file_date).'</font><br />';
|
129 |
+
}
|
130 |
+
} else {
|
131 |
+
$text = '<font color="red">'.sprintf(__('Invalid Database Backup File On \'%s\'', 'wp-dbmanager'), $nice_file_date).'</font>';
|
132 |
+
}
|
133 |
+
} else {
|
134 |
+
$text = '<font color="red">'.__('No Backup Database File Selected', 'wp-dbmanager').'</font>';
|
135 |
+
}
|
136 |
+
break;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
?>
|
140 |
+
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
141 |
+
<!-- Manage Backup Database -->
|
142 |
+
<div class="wrap">
|
143 |
+
<h2><?php _e('Manage Backup Database', 'wp-dbmanager'); ?></h2>
|
144 |
+
<p><?php _e('Choose A Backup Date To E-Mail, Restore, Download Or Delete', 'wp-dbmanager'); ?></p>
|
145 |
+
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
146 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
147 |
+
<tr class="thead">
|
148 |
+
<th align="left"><?php _e('No.', 'wp-dbmanager'); ?></th>
|
149 |
+
<th align="left"><?php _e('Database File', 'wp-dbmanager'); ?></th>
|
150 |
+
<th align="left"><?php _e('Date/Time', 'wp-dbmanager'); ?></th>
|
151 |
+
<th align="left"><?php _e('Size', 'wp-dbmanager'); ?></th>
|
152 |
+
<th align="left"><?php _e('Select', 'wp-dbmanager'); ?></th>
|
153 |
+
</tr>
|
154 |
+
<?php
|
155 |
+
if(!is_emtpy_folder($backup['path'])) {
|
156 |
+
if ($handle = opendir($backup['path'])) {
|
157 |
+
$database_files = array();
|
158 |
+
while (false !== ($file = readdir($handle))) {
|
159 |
+
if ($file != '.' && $file != '..' && (file_ext($file) == 'sql' || file_ext($file) == 'gz')) {
|
160 |
+
$database_files[] = $file;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
closedir($handle);
|
164 |
+
for($i = (sizeof($database_files)-1); $i > -1; $i--) {
|
165 |
+
if($no%2 == 0) {
|
166 |
+
$style = 'style=\'background: none\'';
|
167 |
+
} else {
|
168 |
+
$style = 'style=\'background-color: #eee\'';
|
169 |
+
}
|
170 |
+
$no++;
|
171 |
+
$database_text = substr($database_files[$i], 13);
|
172 |
+
$date_text = gmdate('l, jS F Y @ H:i', substr($database_files[$i], 0, 10));
|
173 |
+
$size_text = filesize($backup['path'].'/'.$database_files[$i]);
|
174 |
+
echo "<tr $style>\n<td>$no</td>";
|
175 |
+
echo "<td>$database_text</td>";
|
176 |
+
echo "<td>$date_text</td>";
|
177 |
+
echo '<td>'.format_size($size_text).'</td>';
|
178 |
+
echo "<td><input type=\"radio\" name=\"database_file\" value=\"$database_files[$i]\" /></td>\n</tr>\n";
|
179 |
+
$totalsize += $size_text;
|
180 |
+
}
|
181 |
+
} else {
|
182 |
+
echo '<tr><td align="center" colspan="5">'.__('There Are No Database Backup Files Available.', 'wp-dbmanager').'</td></tr>';
|
183 |
+
}
|
184 |
+
} else {
|
185 |
+
echo '<tr><td align="center" colspan="5">'.__('There Are No Database Backup Files Available.', 'wp-dbmanager').'</td></tr>';
|
186 |
+
}
|
187 |
+
?>
|
188 |
+
<tr class="thead">
|
189 |
+
<th align="left" colspan="3"><?php echo $no; ?> <?php _e('Backup File(s)', 'wp-dbmanager'); ?></th>
|
190 |
+
<th align="left"><?php echo format_size($totalsize); ?></th>
|
191 |
+
<td> </td>
|
192 |
+
</tr>
|
193 |
+
<tr>
|
194 |
+
<td colspan="5"><?php _e('E-mail database backup file to:', 'wp-dbmanager'); ?> <input type="text" name="email_to" size="30" maxlength="50" value="<?php echo get_option('admin_email'); ?>" /> <input type="submit" name="do" value="<?php _e('E-Mail', 'wp-dbmanager'); ?>" class="button" /></td>
|
195 |
+
</tr>
|
196 |
+
<tr>
|
197 |
+
<td colspan="5" align="center">
|
198 |
+
<input type="submit" name="do" value="<?php _e('Download', 'wp-dbmanager'); ?>" class="button" />
|
199 |
+
<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" />
|
200 |
+
<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'); ?>')" />
|
201 |
+
<input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
|
202 |
+
</tr>
|
203 |
+
</table>
|
204 |
+
</form>
|
205 |
+
</div>
|
dbmanager/database-manager.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
+----------------------------------------------------------------+
|
4 |
+
| |
|
5 |
+
| WordPress 2.1 Plugin: WP-DBManager 2.10 |
|
6 |
+
| Copyright (c) 2007 Lester "GaMerZ" Chan |
|
7 |
+
| |
|
8 |
+
| File Written By: |
|
9 |
+
| - Lester "GaMerZ" Chan |
|
10 |
+
| - http://www.lesterchan.net |
|
11 |
+
| |
|
12 |
+
| File Information: |
|
13 |
+
| - Database Manager |
|
14 |
+
| - wp-content/plugins/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('dbmanager/database-manager.php');
|
28 |
+
$base_page = 'admin.php?page='.$base_name;
|
29 |
+
$current_date = gmdate('l, jS F Y @ H:i', (time() + (get_option('gmt_offset') * 3600)));
|
30 |
+
$backup = array();
|
31 |
+
$backup_options = get_option('dbmanager_options');
|
32 |
+
$backup['date'] = current_time('timestamp');
|
33 |
+
$backup['mysqldumppath'] = $backup_options['mysqldumppath'];
|
34 |
+
$backup['mysqlpath'] = $backup_options['mysqlpath'];
|
35 |
+
$backup['path'] = $backup_options['path'];
|
36 |
+
|
37 |
+
|
38 |
+
### Get MYSQL Version
|
39 |
+
$sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
|
40 |
+
?>
|
41 |
+
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
42 |
+
<!-- Database Information -->
|
43 |
+
<div class="wrap">
|
44 |
+
<h2><?php _e('Database Information', 'wp-dbmanager'); ?></h2>
|
45 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
46 |
+
<tr class="thead">
|
47 |
+
<th align="left"><?php _e('Setting', 'wp-dbmanager'); ?></th>
|
48 |
+
<th align="left"><?php _e('Value', 'wp-dbmanager'); ?></th>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td><?php _e('Database Host', 'wp-dbmanager'); ?></td>
|
52 |
+
<td><?php echo DB_HOST; ?></td>
|
53 |
+
</tr>
|
54 |
+
<tr style="background-color: #eee;">
|
55 |
+
<td><?php _e('Database Name', 'wp-dbmanager'); ?></td>
|
56 |
+
<td><?php echo DB_NAME; ?></td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td><?php _e('Database User', 'wp-dbmanager'); ?></td>
|
60 |
+
<td><?php echo DB_USER; ?></td>
|
61 |
+
</tr>
|
62 |
+
<tr style="background-color: #eee;">
|
63 |
+
<td><?php _e('Database Type', 'wp-dbmanager'); ?></td>
|
64 |
+
<td>MYSQL</td>
|
65 |
+
</tr>
|
66 |
+
<tr>
|
67 |
+
<td><?php _e('Database Version', 'wp-dbmanager'); ?></td>
|
68 |
+
<td>v<?php echo $sqlversion; ?></td>
|
69 |
+
</tr>
|
70 |
+
</table>
|
71 |
+
</div>
|
72 |
+
<div class="wrap">
|
73 |
+
<h2><?php _e('Tables Information', 'wp-dbmanager'); ?></h2>
|
74 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
75 |
+
<tr class="thead">
|
76 |
+
<th align="left"><?php _e('No.', 'wp-dbmanager'); ?></th>
|
77 |
+
<th align="left"><?php _e('Tables', 'wp-dbmanager'); ?></th>
|
78 |
+
<th align="left"><?php _e('Records', 'wp-dbmanager'); ?></th>
|
79 |
+
<th align="left"><?php _e('Data Usage', 'wp-dbmanager'); ?></th>
|
80 |
+
<th align="left"><?php _e('Index Usage', 'wp-dbmanager'); ?></th>
|
81 |
+
<th align="left"><?php _e('Overhead', 'wp-dbmanager'); ?></th>
|
82 |
+
</tr>
|
83 |
+
<?php
|
84 |
+
// If MYSQL Version More Than 3.23, Get More Info
|
85 |
+
if($sqlversion >= '3.23') {
|
86 |
+
$tablesstatus = $wpdb->get_results("SHOW TABLE STATUS");
|
87 |
+
foreach($tablesstatus as $tablestatus) {
|
88 |
+
if($no%2 == 0) {
|
89 |
+
$style = 'style=\'background: none;\'';
|
90 |
+
} else {
|
91 |
+
$style = 'style=\'background-color: #eee;\'';
|
92 |
+
}
|
93 |
+
$no++;
|
94 |
+
echo "<tr $style>\n";
|
95 |
+
echo "<td>$no</td>\n";
|
96 |
+
echo "<td>$tablestatus->Name</td>\n";
|
97 |
+
echo '<td>'.number_format($tablestatus->Rows).'</td>'."\n";
|
98 |
+
echo '<td>'.format_size($tablestatus->Data_length).'</td>'."\n";
|
99 |
+
echo '<td>'.format_size($tablestatus->Index_length).'</td>'."\n";;
|
100 |
+
echo '<td>'.format_size($tablestatus->Data_free).'</td>'."\n";
|
101 |
+
$row_usage += $tablestatus->Rows;
|
102 |
+
$data_usage += $tablestatus->Data_length;
|
103 |
+
$index_usage += $tablestatus->Index_length;
|
104 |
+
$overhead_usage += $tablestatus->Data_free;
|
105 |
+
echo '</tr>'."\n";
|
106 |
+
}
|
107 |
+
echo '<tr class="thead">'."\n";
|
108 |
+
echo '<th align="left">'.__('Total:', 'wp-dbmanager').'</th>'."\n";
|
109 |
+
echo '<th align="left">'.$no.' '.__('Tables', 'wp-dbmanager').'</th>'."\n";
|
110 |
+
echo '<th align="left">'.number_format($row_usage).'</th>'."\n";
|
111 |
+
echo '<th align="left">'.format_size($data_usage).'</th>'."\n";
|
112 |
+
echo '<th align="left">'.format_size($index_usage).'</th>'."\n";
|
113 |
+
echo '<th align="left">'.format_size($overhead_usage).'</th>'."\n";
|
114 |
+
echo '</tr>';
|
115 |
+
} else {
|
116 |
+
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>';
|
117 |
+
}
|
118 |
+
?>
|
119 |
+
</table>
|
120 |
+
</div>
|
dbmanager/database-optimize.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
+----------------------------------------------------------------+
|
4 |
+
| |
|
5 |
+
| WordPress 2.1 Plugin: WP-DBManager 2.10 |
|
6 |
+
| Copyright (c) 2007 Lester "GaMerZ" Chan |
|
7 |
+
| |
|
8 |
+
| File Written By: |
|
9 |
+
| - Lester "GaMerZ" Chan |
|
10 |
+
| - http://www.lesterchan.net |
|
11 |
+
| |
|
12 |
+
| File Information: |
|
13 |
+
| - Database Optimize |
|
14 |
+
| - wp-content/plugins/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('dbmanager/database-manager.php');
|
28 |
+
$base_page = 'admin.php?page='.$base_name;
|
29 |
+
$current_date = gmdate('l, jS F Y @ H:i', (time() + (get_option('gmt_offset') * 3600)));
|
30 |
+
$backup = array();
|
31 |
+
$backup_options = get_option('dbmanager_options');
|
32 |
+
$backup['date'] = current_time('timestamp');
|
33 |
+
$backup['mysqldumppath'] = $backup_options['mysqldumppath'];
|
34 |
+
$backup['mysqlpath'] = $backup_options['mysqlpath'];
|
35 |
+
$backup['path'] = $backup_options['path'];
|
36 |
+
|
37 |
+
|
38 |
+
### Form Processing
|
39 |
+
if($_POST['do']) {
|
40 |
+
// Lets Prepare The Variables
|
41 |
+
$optimize = $_POST['optimize'];
|
42 |
+
|
43 |
+
// Decide What To Do
|
44 |
+
switch($_POST['do']) {
|
45 |
+
case 'Optimize':
|
46 |
+
if(!empty($optimize)) {
|
47 |
+
foreach($optimize as $key => $value) {
|
48 |
+
if($value == 'yes') {
|
49 |
+
$tables_string .= ', '.$key;
|
50 |
+
}
|
51 |
+
}
|
52 |
+
} else {
|
53 |
+
$text = '<font color="red">'.__('No Tables Selected', 'wp-dbmanager').'</font>';
|
54 |
+
}
|
55 |
+
$selected_tables = substr($tables_string, 2);
|
56 |
+
if(!empty($selected_tables)) {
|
57 |
+
$optimize2 = $wpdb->query("OPTIMIZE TABLE $selected_tables");
|
58 |
+
if(!$optimize2) {
|
59 |
+
$text = '<font color="red">'.sprintf(__('Table(s) \'%s\' NOT Optimized', 'wp-dbmanager'), $selected_tables).'</font>';
|
60 |
+
} else {
|
61 |
+
$text = '<font color="green">'.sprintf(__('Table(s) \'%s\' Optimized', 'wp-dbmanager'), $selected_tables).'</font>';
|
62 |
+
}
|
63 |
+
}
|
64 |
+
break;
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
### Show Tables
|
70 |
+
$tables = $wpdb->get_col("SHOW TABLES");
|
71 |
+
?>
|
72 |
+
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
73 |
+
<!-- Optimize Database -->
|
74 |
+
<div class="wrap">
|
75 |
+
<h2><?php _e('Optimize Database', 'wp-dbmanager'); ?></h2>
|
76 |
+
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
77 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
78 |
+
<tr class="thead">
|
79 |
+
<th align="left"><?php _e('Tables', 'wp-dbmanager'); ?></th>
|
80 |
+
<th align="left"><?php _e('Options', 'wp-dbmanager'); ?></th>
|
81 |
+
</tr>
|
82 |
+
<?php
|
83 |
+
foreach($tables as $table_name) {
|
84 |
+
if($no%2 == 0) {
|
85 |
+
$style = 'style=\'background: none\'';
|
86 |
+
} else {
|
87 |
+
$style = 'style=\'background-color: #eee;\'';
|
88 |
+
}
|
89 |
+
$no++;
|
90 |
+
echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n";
|
91 |
+
echo "<td><input type=\"radio\" name=\"optimize[$table_name]\" value=\"no\" />".__('No', 'wp-dbmanager')." <input type=\"radio\" name=\"optimize[$table_name]\" value=\"yes\" checked=\"checked\" />".__('Yes', 'wp-dbmanager').'</td></tr>';
|
92 |
+
}
|
93 |
+
?>
|
94 |
+
<tr>
|
95 |
+
<td colspan="2" align="center"><?php _e('Database should be optimize once every month.', 'wp-dbmanager'); ?></td>
|
96 |
+
</tr>
|
97 |
+
<tr>
|
98 |
+
<td colspan="2" align="center"><input type="submit" name="do" value="<?php _e('Optimize', 'wp-dbmanager'); ?>" class="button" /> <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
|
99 |
+
</tr>
|
100 |
+
</table>
|
101 |
+
</form>
|
102 |
+
</div>
|
dbmanager/database-run.php
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
+----------------------------------------------------------------+
|
4 |
+
| |
|
5 |
+
| WordPress 2.1 Plugin: WP-DBManager 2.10 |
|
6 |
+
| Copyright (c) 2007 Lester "GaMerZ" Chan |
|
7 |
+
| |
|
8 |
+
| File Written By: |
|
9 |
+
| - Lester "GaMerZ" Chan |
|
10 |
+
| - http://www.lesterchan.net |
|
11 |
+
| |
|
12 |
+
| File Information: |
|
13 |
+
| - Database Run Query |
|
14 |
+
| - wp-content/plugins/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('dbmanager/database-manager.php');
|
28 |
+
$base_page = 'admin.php?page='.$base_name;
|
29 |
+
$current_date = gmdate('l, jS F Y @ H:i', (time() + (get_option('gmt_offset') * 3600)));
|
30 |
+
$backup = array();
|
31 |
+
$backup_options = get_option('dbmanager_options');
|
32 |
+
$backup['date'] = current_time('timestamp');
|
33 |
+
$backup['mysqldumppath'] = $backup_options['mysqldumppath'];
|
34 |
+
$backup['mysqlpath'] = $backup_options['mysqlpath'];
|
35 |
+
$backup['path'] = $backup_options['path'];
|
36 |
+
|
37 |
+
|
38 |
+
### Form Processing
|
39 |
+
if($_POST['do']) {
|
40 |
+
// Decide What To Do
|
41 |
+
switch($_POST['do']) {
|
42 |
+
case __('Run', 'wp-dbmanager'):
|
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 .= "<font color=\"red\">$sql_query</font><br />";
|
62 |
+
} else {
|
63 |
+
$successquery++;
|
64 |
+
$text .= "<font color=\"green\">$sql_query</font><br />";
|
65 |
+
}
|
66 |
+
$totalquerycount++;
|
67 |
+
} elseif (preg_match("/^\\s*(select|drop|show|grant) /i",$sql_query)) {
|
68 |
+
$text .= "<font color=\"red\">$sql_query</font><br />";
|
69 |
+
$totalquerycount++;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
$text .= "<font color=\"blue\">$successquery/$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 |
+
<div class="wrap">
|
86 |
+
<h2><?php _e('Run SQL Query', 'wp-dbmanager'); ?></h2>
|
87 |
+
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
88 |
+
<p>
|
89 |
+
<strong><?php _e('Seperate Multiple Queries With A New Line', 'wp-dbmanager'); ?></strong><br />
|
90 |
+
<font color="green"><?php _e('Use Only INSERT, UPDATE, REPLACE, DELETE, CREATE and ALTER statements.', 'wp-dbmanager'); ?></font>
|
91 |
+
</p>
|
92 |
+
<p align="center"><textarea cols="120" rows="30" name="sql_query"></textarea></p>
|
93 |
+
<p align="center"><input type="submit" name="do" value="<?php _e('Run', 'wp-dbmanager'); ?>" class="button" /> <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></p>
|
94 |
+
<p>
|
95 |
+
<?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 />
|
96 |
+
<?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 />
|
97 |
+
<?php _e('3. ALTER statement will return an error because there is no value returned.', 'wp-dbmanager'); ?></p>
|
98 |
+
</form>
|
99 |
+
</div>
|
dbmanager/dbmanager.php
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WP-DBManager
|
4 |
+
Plugin URI: http://www.lesterchan.net/portfolio/programming.php
|
5 |
+
Description: Manages your Wordpress database. Allows you to optimize database, backup database, restore database, delete backup database , drop/empty tables and run selected queries.
|
6 |
+
Version: 2.10
|
7 |
+
Author: GaMerZ
|
8 |
+
Author URI: http://www.lesterchan.net
|
9 |
+
*/
|
10 |
+
|
11 |
+
|
12 |
+
/*
|
13 |
+
Copyright 2007 Lester Chan (email : gamerz84@hotmail.com)
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License as published by
|
17 |
+
the Free Software Foundation; either version 2 of the License, or
|
18 |
+
(at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program; if not, write to the Free Software
|
27 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
28 |
+
*/
|
29 |
+
|
30 |
+
|
31 |
+
### Create Text Domain For Translations
|
32 |
+
load_plugin_textdomain('wp-dbmanager', 'wp-content/plugins/dbmanager');
|
33 |
+
|
34 |
+
|
35 |
+
### Function: Database Manager Menu
|
36 |
+
add_action('admin_menu', 'dbmanager_menu');
|
37 |
+
function dbmanager_menu() {
|
38 |
+
if (function_exists('add_menu_page')) {
|
39 |
+
add_menu_page(__('Database', 'wp-dbmanager'), __('Database', 'wp-dbmanager'), 'manage_database', 'dbmanager/database-manager.php');
|
40 |
+
}
|
41 |
+
if (function_exists('add_submenu_page')) {
|
42 |
+
add_submenu_page('dbmanager/database-manager.php', __('Backup DB', 'wp-dbmanager'), __('Backup DB', 'wp-dbmanager'), 'manage_database', 'dbmanager/database-backup.php');
|
43 |
+
add_submenu_page('dbmanager/database-manager.php', __('Manage Backup DB', 'wp-dbmanager'), __('Manage Backup DB', 'wp-dbmanager'), 'manage_database', 'dbmanager/database-manage.php');
|
44 |
+
add_submenu_page('dbmanager/database-manager.php', __('Optimize DB', 'wp-dbmanager'), __('Optimize DB', 'wp-dbmanager'), 'manage_database', 'dbmanager/database-optimize.php');
|
45 |
+
add_submenu_page('dbmanager/database-manager.php', __('Empty/Drop Tables', 'wp-dbmanager'), __('Empty/Drop Tables', 'wp-dbmanager'), 'manage_database', 'dbmanager/database-empty.php');
|
46 |
+
add_submenu_page('dbmanager/database-manager.php', __('Run SQL Query', 'wp-dbmanager'), __('Run SQL Query', 'wp-dbmanager'), 'manage_database', 'dbmanager/database-run.php');
|
47 |
+
add_submenu_page('dbmanager/database-manager.php', __('DB Options', 'wp-dbmanager'), __('DB Options', 'wp-dbmanager'), 'manage_database', 'dbmanager/dbmanager.php', 'dbmanager_options');
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
### Function: Auto Detect MYSQL and MYSQL Dump Paths
|
53 |
+
function detect_mysql() {
|
54 |
+
global $wpdb;
|
55 |
+
$paths = array('mysq' => '', 'mysqldump' => '');
|
56 |
+
if(substr(PHP_OS,0,3) == 'WIN') {
|
57 |
+
$mysql_install = $wpdb->get_row("SHOW VARIABLES LIKE 'basedir'");
|
58 |
+
if($mysql_install) {
|
59 |
+
$install_path = str_replace('\\', '/', $mysql_install->Value);
|
60 |
+
$paths['mysql'] = $install_path.'bin/mysql.exe';
|
61 |
+
$paths['mysqldump'] = $install_path.'bin/mysqldump.exe';
|
62 |
+
} else {
|
63 |
+
$paths['mysql'] = 'mysql.exe';
|
64 |
+
$paths['mysqldump'] = 'mysqldump.exe';
|
65 |
+
}
|
66 |
+
} else {
|
67 |
+
if(function_exists('exec')) {
|
68 |
+
$paths['mysql'] = exec('which mysql');
|
69 |
+
$paths['mysqldump'] = exec('which mysqldump');
|
70 |
+
} else {
|
71 |
+
$paths['mysql'] = 'mysql';
|
72 |
+
$paths['mysqldump'] = 'mysqldump';
|
73 |
+
}
|
74 |
+
}
|
75 |
+
return $paths;
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
### Function: Format Bytes Into KB/MB
|
80 |
+
if(!function_exists('format_size')) {
|
81 |
+
function format_size($rawSize) {
|
82 |
+
if($rawSize / 1073741824 > 1)
|
83 |
+
return round($rawSize/1048576, 1) . ' GB';
|
84 |
+
else if ($rawSize / 1048576 > 1)
|
85 |
+
return round($rawSize/1048576, 1) . ' MB';
|
86 |
+
else if ($rawSize / 1024 > 1)
|
87 |
+
return round($rawSize/1024, 1) . ' KB';
|
88 |
+
else
|
89 |
+
return round($rawSize, 1) . ' bytes';
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
|
94 |
+
### Function: Get File Extension
|
95 |
+
if(!function_exists('file_ext')) {
|
96 |
+
function file_ext($file_name) {
|
97 |
+
return substr(strrchr($file_name, '.'), 1);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
|
102 |
+
### Function: Check Folder Whether There Is Any File Inside
|
103 |
+
if(!function_exists('is_emtpy_folder')) {
|
104 |
+
function is_emtpy_folder($folder){
|
105 |
+
if(is_dir($folder) ){
|
106 |
+
$handle = opendir($folder);
|
107 |
+
while( (gettype( $name = readdir($handle)) != 'boolean')){
|
108 |
+
$name_array[] = $name;
|
109 |
+
}
|
110 |
+
foreach($name_array as $temp)
|
111 |
+
$folder_content .= $temp;
|
112 |
+
|
113 |
+
if($folder_content == '...')
|
114 |
+
return true;
|
115 |
+
else
|
116 |
+
return false;
|
117 |
+
closedir($handle);
|
118 |
+
}
|
119 |
+
else
|
120 |
+
return true;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
|
125 |
+
### Function: Database Manager Role
|
126 |
+
add_action('activate_dbmanager/dbmanager.php', 'dbmanager_init');
|
127 |
+
function dbmanager_init() {
|
128 |
+
global $wpdb;
|
129 |
+
$auto = detect_mysql();
|
130 |
+
// Add Options
|
131 |
+
$backup_options = array();
|
132 |
+
$backup_options['mysqldumppath'] = $auto['mysqldump'];
|
133 |
+
$backup_options['mysqlpath'] = $auto['mysql'];
|
134 |
+
$backup_options['path'] = str_replace('\\', '/', ABSPATH).'wp-content/backup-db';
|
135 |
+
add_option('dbmanager_options', $backup_options, 'WP-DBManager Options');
|
136 |
+
|
137 |
+
// Create Backup Folder
|
138 |
+
if(!is_dir(ABSPATH.'wp-content/backup-db')) {
|
139 |
+
mkdir(ABSPATH.'wp-content/backup-db');
|
140 |
+
}
|
141 |
+
|
142 |
+
// Set 'manage_database' Capabilities To Administrator
|
143 |
+
$role = get_role('administrator');
|
144 |
+
if(!$role->has_cap('manage_database')) {
|
145 |
+
$role->add_cap('manage_database');
|
146 |
+
}
|
147 |
+
}
|
148 |
+
|
149 |
+
|
150 |
+
### Function: Download Database
|
151 |
+
add_action('init', 'download_database');
|
152 |
+
function download_database() {
|
153 |
+
if($_POST['do'] == 'Download' && !empty($_POST['database_file'])) {
|
154 |
+
if(strpos($_SERVER['HTTP_REFERER'], get_option('siteurl').'/wp-admin/admin.php?page=dbmanager/database-manage.php') !== false) {
|
155 |
+
$backup_options = get_option('dbmanager_options');
|
156 |
+
$file_path = $backup_options['path'].'/'.$_POST['database_file'];
|
157 |
+
header("Pragma: public");
|
158 |
+
header("Expires: 0");
|
159 |
+
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
160 |
+
header("Content-Type: application/force-download");
|
161 |
+
header("Content-Type: application/octet-stream");
|
162 |
+
header("Content-Type: application/download");
|
163 |
+
header("Content-Disposition: attachment; filename=".basename($file_path).";");
|
164 |
+
header("Content-Transfer-Encoding: binary");
|
165 |
+
header("Content-Length: ".filesize($file_path));
|
166 |
+
@readfile($file_path);
|
167 |
+
}
|
168 |
+
exit();
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
### Function: Database Options
|
174 |
+
function dbmanager_options() {
|
175 |
+
global $wpdb;
|
176 |
+
$text = '';
|
177 |
+
$backup_options = array();
|
178 |
+
$backup_options = get_option('dbmanager_options');
|
179 |
+
if($_POST['Submit']) {
|
180 |
+
$backup_options['mysqldumppath'] = trim($_POST['db_mysqldumppath']);
|
181 |
+
$backup_options['mysqlpath'] = trim($_POST['db_mysqlpath']);
|
182 |
+
$backup_options['path'] = trim($_POST['db_path']);
|
183 |
+
$update_db_options = update_option('dbmanager_options', $backup_options);
|
184 |
+
if($update_db_options) {
|
185 |
+
$text = '<font color="green">'.__('DB Options Updated', 'wp-dbmanager').'</font>';
|
186 |
+
}
|
187 |
+
if(empty($text)) {
|
188 |
+
$text = '<font color="red">'.__('No DB Option Updated', 'wp-dbmanager').'</font>';
|
189 |
+
}
|
190 |
+
}
|
191 |
+
$path = detect_mysql();
|
192 |
+
?>
|
193 |
+
<script type="text/javascript">
|
194 |
+
/* <![CDATA[*/
|
195 |
+
function mysqlpath() {
|
196 |
+
document.getElementById('db_mysqlpath').value = '<?php echo $path['mysql']; ?>';
|
197 |
+
}
|
198 |
+
function mysqldumppath() {
|
199 |
+
document.getElementById('db_mysqldumppath').value = '<?php echo $path['mysqldump']; ?>';
|
200 |
+
}
|
201 |
+
/* ]]> */
|
202 |
+
</script>
|
203 |
+
<?php if(!empty($text)) { echo '<!-- Last Action --><div id="message" class="updated fade"><p>'.$text.'</p></div>'; } ?>
|
204 |
+
<!-- Database Options -->
|
205 |
+
<div class="wrap">
|
206 |
+
<h2><?php _e('Database Options', 'wp-dbmanager'); ?></h2>
|
207 |
+
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
|
208 |
+
<table width="100%" cellspacing="3" cellpadding="3" border="0">
|
209 |
+
<tr>
|
210 |
+
<td valign="top"><strong><?php _e('Path To mysqldump:', 'wp-dbmanager'); ?></strong></td>
|
211 |
+
<td>
|
212 |
+
<input type="text" id="db_mysqldumppath" name="db_mysqldumppath" size="60" maxlength="100" value="<?php echo stripslashes($backup_options['mysqldumppath']); ?>" /> <input type="button" value="Auto Detect" onclick="mysqldumppath();" /><br /><?php _e('The absolute path to mysqldump without trailing slash. If unsure, please email your server administrator about this.', 'wp-dbmanager'); ?>
|
213 |
+
</td>
|
214 |
+
</tr>
|
215 |
+
<tr>
|
216 |
+
<td valign="top"><strong><?php _e('Path To mysql:', 'wp-dbmanager'); ?></strong></td>
|
217 |
+
<td>
|
218 |
+
<input type="text" id="db_mysqlpath" name="db_mysqlpath" size="60" maxlength="100" value="<?php echo stripslashes($backup_options['mysqlpath']); ?>" /> <input type="button" value="Auto Detect" onclick="mysqlpath();" /><br /><?php _e('The absolute path to mysql without trailing slash. If unsure, please email your server administrator about this.', 'wp-dbmanager'); ?>
|
219 |
+
</td>
|
220 |
+
</tr>
|
221 |
+
<tr>
|
222 |
+
<td valign="top"><strong><?php _e('Path To Backup:', 'wp-dbmanager'); ?></strong></td>
|
223 |
+
<td>
|
224 |
+
<input type="text" name="db_path" size="60" maxlength="100" value="<?php echo stripslashes($backup_options['path']); ?>" />
|
225 |
+
<br /><?php _e('The absolute path to your database backup folder without trailing slash. Make sure the folder is writable.', 'wp-dbmanager'); ?>
|
226 |
+
</td>
|
227 |
+
</tr>
|
228 |
+
<tr>
|
229 |
+
<td width="100%" colspan="2" align="center"><input type="submit" name="Submit" class="button" value="<?php _e('Update Options', 'wp-dbmanager'); ?>" /> <input type="button" name="cancel" value="<?php _e('Cancel', 'wp-dbmanager'); ?>" class="button" onclick="javascript:history.go(-1)" /></td>
|
230 |
+
</tr>
|
231 |
+
</table>
|
232 |
+
</form>
|
233 |
+
<p>
|
234 |
+
<strong><?php _e('Windows Server', 'wp-dbmanager'); ?></strong><br />
|
235 |
+
<?php _e('For mysqldump path, you can try \'<strong>mysqldump.exe</strong>\'.', 'wp-dbmanager'); ?><br />
|
236 |
+
<?php _e('For mysql path, you can try \'<strong>mysql.exe</strong>\'.', 'wp-dbmanager'); ?><br />
|
237 |
+
<br />
|
238 |
+
<strong><?php _e('Linux Server', 'wp-dbmanager'); ?></strong><br />
|
239 |
+
<?php _e('For mysqldump path, normally is just \'<strong>mysqldump</strong>\'.', 'wp-dbmanager'); ?><br />
|
240 |
+
<?php _e('For mysql path, normally is just \'<strong>mysql</strong>\'.', 'wp-dbmanager'); ?><br />
|
241 |
+
</p>
|
242 |
+
<p>
|
243 |
+
<strong><?php _e('Note', 'wp-dbmanager'); ?></strong><br />
|
244 |
+
<?php _e('The \'Auto Detect\' function does not work for some servers. If it does not work for you, please contact your server administrator for the MYSQL and MYSQL DUMP paths.'); ?>
|
245 |
+
</p>
|
246 |
+
</div>
|
247 |
+
<?php
|
248 |
+
}
|
249 |
+
?>
|
dbmanager/wp-dbmanager.pot
ADDED
@@ -0,0 +1,619 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP-DBManager\n"
|
4 |
+
"POT-Creation-Date: \n"
|
5 |
+
"PO-Revision-Date: 2007-01-27 14:56+0800\n"
|
6 |
+
"Last-Translator: Lester 'GaMerZ' Chan <gamerz84@hotmail.com>\n"
|
7 |
+
"Language-Team: Lester Chan <gamerz84@hotmail.com>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Poedit-Language: English\n"
|
12 |
+
"X-Poedit-Country: SINGAPORE\n"
|
13 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
14 |
+
"X-Poedit-Basepath: .\n"
|
15 |
+
"X-Poedit-SearchPath-0: .\n"
|
16 |
+
|
17 |
+
#: database-backup.php:42
|
18 |
+
#: database-backup.php:195
|
19 |
+
msgid "Backup"
|
20 |
+
msgstr ""
|
21 |
+
|
22 |
+
#: database-backup.php:55
|
23 |
+
#, php-format
|
24 |
+
msgid "Database Failed To Backup On '%s'. Backup Folder Not Writable."
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: database-backup.php:58
|
28 |
+
#, php-format
|
29 |
+
msgid "Database Failed To Backup On '%s'. Backup File Size Is 0KB."
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: database-backup.php:60
|
33 |
+
#, php-format
|
34 |
+
msgid "Database Failed To Backup On '%s'. Invalid Backup File Path."
|
35 |
+
msgstr ""
|
36 |
+
|
37 |
+
#: database-backup.php:62
|
38 |
+
#, php-format
|
39 |
+
msgid "Database Failed To Backup On '%s'."
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: database-backup.php:64
|
43 |
+
#, php-format
|
44 |
+
msgid "Database Backed Up Successfully On '%s'."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: database-backup.php:82
|
48 |
+
msgid "Checking Backup Status"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: database-backup.php:84
|
52 |
+
msgid "Checking Backup Folder"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: database-backup.php:87
|
56 |
+
msgid "Backup folder exists"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: database-backup.php:90
|
60 |
+
msgid "Backup folder does NOT exist. Please create 'backup-db' folder in 'wp-content' folder and CHMOD it to '777' or change the location of the backup folder under DB Option."
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: database-backup.php:93
|
64 |
+
msgid "Backup folder is writable"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: database-backup.php:96
|
68 |
+
msgid "Backup folder is NOT writable. Please CHMOD it to '777'."
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: database-backup.php:103
|
72 |
+
#: database-backup.php:107
|
73 |
+
msgid "Checking MYSQL Dump Path"
|
74 |
+
msgstr ""
|
75 |
+
|
76 |
+
#: database-backup.php:104
|
77 |
+
msgid "MYSQL dump path exists."
|
78 |
+
msgstr ""
|
79 |
+
|
80 |
+
#: database-backup.php:108
|
81 |
+
msgid "MYSQL dump path does NOT exist. Please check your mysqldump path under DB Options. If uncertain, contact your server administrator."
|
82 |
+
msgstr ""
|
83 |
+
|
84 |
+
#: database-backup.php:115
|
85 |
+
#: database-backup.php:119
|
86 |
+
msgid "Checking MYSQL Path"
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: database-backup.php:116
|
90 |
+
msgid "MYSQL path exists."
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: database-backup.php:120
|
94 |
+
msgid "MYSQL path does NOT exist. Please check your mysql path under DB Options. If uncertain, contact your server administrator."
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: database-backup.php:125
|
98 |
+
msgid "Checking PHP Functions"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: database-backup.php:125
|
102 |
+
msgid "and"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: database-backup.php:128
|
106 |
+
#: database-backup.php:135
|
107 |
+
#: database-backup.php:141
|
108 |
+
msgid "enabled"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: database-backup.php:131
|
112 |
+
#: database-backup.php:137
|
113 |
+
#: database-backup.php:143
|
114 |
+
msgid "disabled"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: database-backup.php:151
|
118 |
+
msgid "Excellent. You Are Good To Go."
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: database-backup.php:153
|
122 |
+
msgid "I'm sorry, your server administrator has disabled passthru(), system() and exec(), thus you cannot use this backup script. You may consider using the default WordPress database backup script instead."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: database-backup.php:155
|
126 |
+
msgid "Please Rectify The Error Highlighted In Red Before Proceeding On."
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: database-backup.php:159
|
130 |
+
msgid "Note: The checking of backup status is still undergoing testing, it may not be accurate."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: database-backup.php:163
|
134 |
+
msgid "Backup Database"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: database-backup.php:167
|
138 |
+
msgid "Database Name:"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: database-backup.php:171
|
142 |
+
msgid "Database Backup To:"
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: database-backup.php:175
|
146 |
+
msgid "Database Backup Date:"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: database-backup.php:179
|
150 |
+
msgid "Database Backup File Name:"
|
151 |
+
msgstr ""
|
152 |
+
|
153 |
+
#: database-backup.php:183
|
154 |
+
msgid "Database Backup Type:"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: database-backup.php:184
|
158 |
+
msgid "Full (Structure and Data)"
|
159 |
+
msgstr ""
|
160 |
+
|
161 |
+
#: database-backup.php:187
|
162 |
+
msgid "MYSQL Dump Location:"
|
163 |
+
msgstr ""
|
164 |
+
|
165 |
+
#: database-backup.php:191
|
166 |
+
msgid "GZIP Database Backup File?"
|
167 |
+
msgstr ""
|
168 |
+
|
169 |
+
#: database-backup.php:192
|
170 |
+
#: database-optimize.php:91
|
171 |
+
msgid "Yes"
|
172 |
+
msgstr ""
|
173 |
+
|
174 |
+
#: database-backup.php:192
|
175 |
+
#: database-optimize.php:91
|
176 |
+
msgid "No"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: database-backup.php:195
|
180 |
+
#: database-empty.php:107
|
181 |
+
#: database-manage.php:201
|
182 |
+
#: database-optimize.php:98
|
183 |
+
#: database-run.php:93
|
184 |
+
#: dbmanager.php:229
|
185 |
+
msgid "Cancel"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: database-empty.php:45
|
189 |
+
#: database-empty.php:107
|
190 |
+
msgid "Empty/Drop"
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: database-empty.php:56
|
194 |
+
msgid "No Tables Selected."
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: database-empty.php:62
|
198 |
+
#, php-format
|
199 |
+
msgid "Table '%s' Emptied"
|
200 |
+
msgstr ""
|
201 |
+
|
202 |
+
#: database-empty.php:67
|
203 |
+
#, php-format
|
204 |
+
msgid "Table(s) '%s' Dropped"
|
205 |
+
msgstr ""
|
206 |
+
|
207 |
+
#: database-empty.php:80
|
208 |
+
#: dbmanager.php:45
|
209 |
+
msgid "Empty/Drop Tables"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: database-empty.php:84
|
213 |
+
#: database-manager.php:77
|
214 |
+
#: database-manager.php:109
|
215 |
+
#: database-optimize.php:79
|
216 |
+
msgid "Tables"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: database-empty.php:85
|
220 |
+
#: database-empty.php:97
|
221 |
+
msgid "Empty"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: database-empty.php:86
|
225 |
+
#: database-empty.php:98
|
226 |
+
msgid "Drop"
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: database-empty.php:103
|
230 |
+
msgid "1. DROPPING a table means deleting the table. This action is not REVERSIBLE."
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: database-empty.php:104
|
234 |
+
msgid "2. EMPTYING a table means all the rows in the table will be deleted. This action is not REVERSIBLE."
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: database-empty.php:107
|
238 |
+
msgid ""
|
239 |
+
"You Are About To Empty Or Drop The Selected Databases.\\n"
|
240 |
+
"This Action Is Not Reversible.\\n"
|
241 |
+
"\\n"
|
242 |
+
" Choose [Cancel] to stop, [Ok] to delete."
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: database-manage.php:46
|
246 |
+
#: database-manage.php:199
|
247 |
+
msgid "Restore"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#: database-manage.php:55
|
251 |
+
#, php-format
|
252 |
+
msgid "Database On '%s' Failed To Restore"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: database-manage.php:57
|
256 |
+
#, php-format
|
257 |
+
msgid "Database On '%s' Restored Successfully"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: database-manage.php:60
|
261 |
+
#: database-manage.php:113
|
262 |
+
#: database-manage.php:118
|
263 |
+
#: database-manage.php:134
|
264 |
+
msgid "No Backup Database File Selected"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: database-manage.php:63
|
268 |
+
#: database-manage.php:194
|
269 |
+
msgid "E-Mail"
|
270 |
+
msgstr ""
|
271 |
+
|
272 |
+
#: database-manage.php:79
|
273 |
+
#, php-format
|
274 |
+
msgid "%s Database Backup File For %s"
|
275 |
+
msgstr ""
|
276 |
+
|
277 |
+
#: database-manage.php:88
|
278 |
+
msgid "Website Name:"
|
279 |
+
msgstr ""
|
280 |
+
|
281 |
+
#: database-manage.php:89
|
282 |
+
msgid "Website URL:"
|
283 |
+
msgstr ""
|
284 |
+
|
285 |
+
#: database-manage.php:90
|
286 |
+
msgid "Backup File Name:"
|
287 |
+
msgstr ""
|
288 |
+
|
289 |
+
#: database-manage.php:91
|
290 |
+
msgid "Backup File Date:"
|
291 |
+
msgstr ""
|
292 |
+
|
293 |
+
#: database-manage.php:92
|
294 |
+
msgid "Backup File Size:"
|
295 |
+
msgstr ""
|
296 |
+
|
297 |
+
#: database-manage.php:93
|
298 |
+
msgid "With Regards,"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: database-manage.php:94
|
302 |
+
msgid "Administrator"
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: database-manage.php:108
|
306 |
+
#, php-format
|
307 |
+
msgid "Database Backup File For '%s' Successfully E-Mailed To '%s'"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: database-manage.php:110
|
311 |
+
#, php-format
|
312 |
+
msgid "Unable To E-Mail Database Backup File For '%s' To '%s'"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: database-manage.php:116
|
316 |
+
#: database-manage.php:198
|
317 |
+
msgid "Download"
|
318 |
+
msgstr ""
|
319 |
+
|
320 |
+
#: database-manage.php:121
|
321 |
+
#: database-manage.php:200
|
322 |
+
msgid "Delete"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: database-manage.php:126
|
326 |
+
#, php-format
|
327 |
+
msgid "Unable To Delete Database Backup File On '%s'"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: database-manage.php:128
|
331 |
+
#, php-format
|
332 |
+
msgid "Database Backup File On '%s' Deleted Successfully"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: database-manage.php:131
|
336 |
+
#, php-format
|
337 |
+
msgid "Invalid Database Backup File On '%s'"
|
338 |
+
msgstr ""
|
339 |
+
|
340 |
+
#: database-manage.php:143
|
341 |
+
msgid "Manage Backup Database"
|
342 |
+
msgstr ""
|
343 |
+
|
344 |
+
#: database-manage.php:144
|
345 |
+
msgid "Choose A Backup Date To E-Mail, Restore, Download Or Delete"
|
346 |
+
msgstr ""
|
347 |
+
|
348 |
+
#: database-manage.php:148
|
349 |
+
#: database-manager.php:76
|
350 |
+
msgid "No."
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: database-manage.php:149
|
354 |
+
msgid "Database File"
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: database-manage.php:150
|
358 |
+
msgid "Date/Time"
|
359 |
+
msgstr ""
|
360 |
+
|
361 |
+
#: database-manage.php:151
|
362 |
+
msgid "Size"
|
363 |
+
msgstr ""
|
364 |
+
|
365 |
+
#: database-manage.php:152
|
366 |
+
msgid "Select"
|
367 |
+
msgstr ""
|
368 |
+
|
369 |
+
#: database-manage.php:182
|
370 |
+
#: database-manage.php:185
|
371 |
+
msgid "There Are No Database Backup Files Available."
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: database-manage.php:189
|
375 |
+
msgid "Backup File(s)"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: database-manage.php:194
|
379 |
+
msgid "E-mail database backup file to:"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: database-manage.php:199
|
383 |
+
msgid ""
|
384 |
+
"You Are About To Restore A Database.\\n"
|
385 |
+
"This Action Is Not Reversible.\\n"
|
386 |
+
"Any Data Inserted After The Backup Date Will Be Gone.\\n"
|
387 |
+
"\\n"
|
388 |
+
" Choose [Cancel] to stop, [Ok] to restore."
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: database-manage.php:200
|
392 |
+
msgid ""
|
393 |
+
"You Are About To Delete The Selected Database Backup Files.\\n"
|
394 |
+
"This Action Is Not Reversible.\\n"
|
395 |
+
"\\n"
|
396 |
+
" Choose [Cancel] to stop, [Ok] to delete."
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: database-manager.php:44
|
400 |
+
msgid "Database Information"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: database-manager.php:47
|
404 |
+
msgid "Setting"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: database-manager.php:48
|
408 |
+
msgid "Value"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: database-manager.php:51
|
412 |
+
msgid "Database Host"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: database-manager.php:55
|
416 |
+
msgid "Database Name"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: database-manager.php:59
|
420 |
+
msgid "Database User"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: database-manager.php:63
|
424 |
+
msgid "Database Type"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: database-manager.php:67
|
428 |
+
msgid "Database Version"
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: database-manager.php:73
|
432 |
+
msgid "Tables Information"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: database-manager.php:78
|
436 |
+
msgid "Records"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: database-manager.php:79
|
440 |
+
msgid "Data Usage"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: database-manager.php:80
|
444 |
+
msgid "Index Usage"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: database-manager.php:81
|
448 |
+
msgid "Overhead"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: database-manager.php:108
|
452 |
+
msgid "Total:"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: database-manager.php:116
|
456 |
+
msgid "Could Not Show Table Status Due To Your MYSQL Version Is Lower Than 3.23."
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: database-optimize.php:53
|
460 |
+
msgid "No Tables Selected"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: database-optimize.php:59
|
464 |
+
#, php-format
|
465 |
+
msgid "Table(s) '%s' NOT Optimized"
|
466 |
+
msgstr ""
|
467 |
+
|
468 |
+
#: database-optimize.php:61
|
469 |
+
#, php-format
|
470 |
+
msgid "Table(s) '%s' Optimized"
|
471 |
+
msgstr ""
|
472 |
+
|
473 |
+
#: database-optimize.php:75
|
474 |
+
msgid "Optimize Database"
|
475 |
+
msgstr ""
|
476 |
+
|
477 |
+
#: database-optimize.php:80
|
478 |
+
msgid "Options"
|
479 |
+
msgstr ""
|
480 |
+
|
481 |
+
#: database-optimize.php:95
|
482 |
+
msgid "Database should be optimize once every month."
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
+
#: database-optimize.php:98
|
486 |
+
msgid "Optimize"
|
487 |
+
msgstr ""
|
488 |
+
|
489 |
+
#: database-run.php:42
|
490 |
+
#: database-run.php:93
|
491 |
+
msgid "Run"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: database-run.php:72
|
495 |
+
msgid "Query(s) Executed Successfully"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: database-run.php:74
|
499 |
+
#: database-run.php:77
|
500 |
+
msgid "Empty Query"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: database-run.php:86
|
504 |
+
#: dbmanager.php:46
|
505 |
+
msgid "Run SQL Query"
|
506 |
+
msgstr ""
|
507 |
+
|
508 |
+
#: database-run.php:89
|
509 |
+
msgid "Seperate Multiple Queries With A New Line"
|
510 |
+
msgstr ""
|
511 |
+
|
512 |
+
#: database-run.php:90
|
513 |
+
msgid "Use Only INSERT, UPDATE, REPLACE, DELETE, CREATE and ALTER statements."
|
514 |
+
msgstr ""
|
515 |
+
|
516 |
+
#: database-run.php:95
|
517 |
+
msgid "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."
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
#: database-run.php:96
|
521 |
+
msgid "2. UPDATE statement may return an error sometimes due to the newly updated value being the same as the previous value."
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: database-run.php:97
|
525 |
+
msgid "3. ALTER statement will return an error because there is no value returned."
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: dbmanager.php:39
|
529 |
+
msgid "Database"
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
#: dbmanager.php:42
|
533 |
+
msgid "Backup DB"
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: dbmanager.php:43
|
537 |
+
msgid "Manage Backup DB"
|
538 |
+
msgstr ""
|
539 |
+
|
540 |
+
#: dbmanager.php:44
|
541 |
+
msgid "Optimize DB"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
#: dbmanager.php:47
|
545 |
+
msgid "DB Options"
|
546 |
+
msgstr ""
|
547 |
+
|
548 |
+
#: dbmanager.php:185
|
549 |
+
msgid "DB Options Updated"
|
550 |
+
msgstr ""
|
551 |
+
|
552 |
+
#: dbmanager.php:188
|
553 |
+
msgid "No DB Option Updated"
|
554 |
+
msgstr ""
|
555 |
+
|
556 |
+
#: dbmanager.php:206
|
557 |
+
msgid "Database Options"
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: dbmanager.php:210
|
561 |
+
msgid "Path To mysqldump:"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: dbmanager.php:212
|
565 |
+
msgid "The absolute path to mysqldump without trailing slash. If unsure, please email your server administrator about this."
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: dbmanager.php:216
|
569 |
+
msgid "Path To mysql:"
|
570 |
+
msgstr ""
|
571 |
+
|
572 |
+
#: dbmanager.php:218
|
573 |
+
msgid "The absolute path to mysql without trailing slash. If unsure, please email your server administrator about this."
|
574 |
+
msgstr ""
|
575 |
+
|
576 |
+
#: dbmanager.php:222
|
577 |
+
msgid "Path To Backup:"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: dbmanager.php:225
|
581 |
+
msgid "The absolute path to your database backup folder without trailing slash. Make sure the folder is writable."
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
+
#: dbmanager.php:229
|
585 |
+
msgid "Update Options"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: dbmanager.php:234
|
589 |
+
msgid "Windows Server"
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: dbmanager.php:235
|
593 |
+
msgid "For mysqldump path, you can try '<strong>mysqldump.exe</strong>'."
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: dbmanager.php:236
|
597 |
+
msgid "For mysql path, you can try '<strong>mysql.exe</strong>'."
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: dbmanager.php:238
|
601 |
+
msgid "Linux Server"
|
602 |
+
msgstr ""
|
603 |
+
|
604 |
+
#: dbmanager.php:239
|
605 |
+
msgid "For mysqldump path, normally is just '<strong>mysqldump</strong>'."
|
606 |
+
msgstr ""
|
607 |
+
|
608 |
+
#: dbmanager.php:240
|
609 |
+
msgid "For mysql path, normally is just '<strong>mysql</strong>'."
|
610 |
+
msgstr ""
|
611 |
+
|
612 |
+
#: dbmanager.php:243
|
613 |
+
msgid "Note"
|
614 |
+
msgstr ""
|
615 |
+
|
616 |
+
#: dbmanager.php:244
|
617 |
+
msgid "The 'Auto Detect' function does not work for some servers. If it does not work for you, please contact your server administrator for the MYSQL and MYSQL DUMP paths."
|
618 |
+
msgstr ""
|
619 |
+
|
readme.html
ADDED
@@ -0,0 +1,424 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
5 |
+
<title>WP-DBManager 2.10 Readme</title>
|
6 |
+
<style type="text/css" media="screen">
|
7 |
+
/* Default Style */
|
8 |
+
BODY {
|
9 |
+
font-family: Verdana, Arial;
|
10 |
+
font-size: 12px;
|
11 |
+
color: #000000;
|
12 |
+
background: #FFFFFF;
|
13 |
+
}
|
14 |
+
P {
|
15 |
+
padding-left: 10px;
|
16 |
+
}
|
17 |
+
BLOCKQUOTE {
|
18 |
+
margin: 10px 20px 0px 20px;
|
19 |
+
padding: 10px;
|
20 |
+
border: 1px solid #8d8d8d;
|
21 |
+
background-color: #f5f5f5;
|
22 |
+
}
|
23 |
+
LI {
|
24 |
+
margin-top: 20px;
|
25 |
+
}
|
26 |
+
UL LI UL LI {
|
27 |
+
margin-top: 10px;
|
28 |
+
}
|
29 |
+
A, A:active, A:link, A:visited {
|
30 |
+
color: #2d3a4c;
|
31 |
+
text-decoration: none;
|
32 |
+
}
|
33 |
+
A:hover {
|
34 |
+
color: #5577a5;
|
35 |
+
text-decoration: underline;
|
36 |
+
}
|
37 |
+
/* Place Holder Style */
|
38 |
+
#Container {
|
39 |
+
width: 780px;
|
40 |
+
margin-left: auto;
|
41 |
+
margin-right: auto;
|
42 |
+
}
|
43 |
+
#Content {
|
44 |
+
background-color: #fafafa;
|
45 |
+
border: 1px solid #a2b6cb;
|
46 |
+
padding: 10px;
|
47 |
+
margin-top: -13px;
|
48 |
+
}
|
49 |
+
/* Title Style */
|
50 |
+
#Title {
|
51 |
+
font-family: Verdana, Arial;
|
52 |
+
font-size: 22px;
|
53 |
+
font-weight: bold;
|
54 |
+
color: #389aff;
|
55 |
+
border-bottom: 1px solid #389aff;
|
56 |
+
margin-bottom: 10px;
|
57 |
+
}
|
58 |
+
.SubTitle {
|
59 |
+
font-family: Verdana, Arial;
|
60 |
+
font-size: 18px;
|
61 |
+
font-weight: bold;
|
62 |
+
color: #5b87b4;
|
63 |
+
}
|
64 |
+
.SubSubTitle {
|
65 |
+
font-family: Verdana, Arial;
|
66 |
+
font-size: 14px;
|
67 |
+
font-weight: bold;
|
68 |
+
color: #73a4d6;
|
69 |
+
}
|
70 |
+
/* Tabs */
|
71 |
+
UL#Tabs {
|
72 |
+
font-family: Verdana, Arial;
|
73 |
+
font-size: 12px;
|
74 |
+
font-weight: bold;
|
75 |
+
list-style-type: none;
|
76 |
+
padding-bottom: 28px;
|
77 |
+
border-bottom: 1px solid #a2b6cb;
|
78 |
+
margin-bottom: 12px;
|
79 |
+
z-index: 1;
|
80 |
+
}
|
81 |
+
#Tabs LI.Tab {
|
82 |
+
float: right;
|
83 |
+
height: 25px;
|
84 |
+
background-color: #deedfb;
|
85 |
+
margin: 2px 0px 0px 5px;
|
86 |
+
border: 1px solid #a2b6cb;
|
87 |
+
}
|
88 |
+
#Tabs LI.Tab A {
|
89 |
+
float: left;
|
90 |
+
display: block;
|
91 |
+
color: #666666;
|
92 |
+
text-decoration: none;
|
93 |
+
padding: 5px;
|
94 |
+
}
|
95 |
+
#Tabs LI.Tab A:hover {
|
96 |
+
background-color: #bfe0fe;
|
97 |
+
border-bottom: 1px solid #bfe0fe;
|
98 |
+
}
|
99 |
+
/* Selected Tab */
|
100 |
+
#Tabs LI.SelectedTab {
|
101 |
+
float: right;
|
102 |
+
height: 25px;
|
103 |
+
background-color: #fafafa;
|
104 |
+
margin: 2px 0px 0px 5px;
|
105 |
+
border-top: 1px solid #a2b6cb;
|
106 |
+
border-right: 1px solid #a2b6cb;
|
107 |
+
border-bottom: 1px solid #fafafa;
|
108 |
+
border-left: 1px solid #a2b6cb;
|
109 |
+
}
|
110 |
+
#Tabs LI.SelectedTab A {
|
111 |
+
float: left;
|
112 |
+
display: block;
|
113 |
+
color: #666666;
|
114 |
+
text-decoration: none;
|
115 |
+
padding: 5px;
|
116 |
+
cursor: default;
|
117 |
+
}
|
118 |
+
/* Copyright */
|
119 |
+
#Copyright {
|
120 |
+
text-align: center;
|
121 |
+
}
|
122 |
+
</style>
|
123 |
+
<script type="text/javascript">
|
124 |
+
/* <![CDATA[*/
|
125 |
+
// Index Page
|
126 |
+
function index() {
|
127 |
+
// Tab
|
128 |
+
document.getElementById('IndexTab').className = 'SelectedTab';
|
129 |
+
document.getElementById('ChangelogTab').className = 'Tab';
|
130 |
+
document.getElementById('InstallTab').className = 'Tab';
|
131 |
+
document.getElementById('UpgradeTab').className = 'Tab';
|
132 |
+
document.getElementById('UsageTab').className = 'Tab';
|
133 |
+
// Page
|
134 |
+
document.getElementById('Index').style.display= 'block';
|
135 |
+
document.getElementById('Changelog').style.display = 'none';
|
136 |
+
document.getElementById('Install').style.display = 'none';
|
137 |
+
document.getElementById('Upgrade').style.display = 'none';
|
138 |
+
document.getElementById('Usage').style.display = 'none';
|
139 |
+
}
|
140 |
+
// Changelog Page
|
141 |
+
function changelog() {
|
142 |
+
// Tab
|
143 |
+
document.getElementById('IndexTab').className = 'Tab';
|
144 |
+
document.getElementById('ChangelogTab').className = 'SelectedTab';
|
145 |
+
document.getElementById('InstallTab').className = 'Tab';
|
146 |
+
document.getElementById('UpgradeTab').className = 'Tab';
|
147 |
+
document.getElementById('UsageTab').className = 'Tab';
|
148 |
+
// Page
|
149 |
+
document.getElementById('Index').style.display = 'none';
|
150 |
+
document.getElementById('Changelog').style.display = 'block';
|
151 |
+
document.getElementById('Install').style.display = 'none';
|
152 |
+
document.getElementById('Upgrade').style.display = 'none';
|
153 |
+
document.getElementById('Usage').style.display = 'none';
|
154 |
+
}
|
155 |
+
// Installation Page
|
156 |
+
function install() {
|
157 |
+
// Tab
|
158 |
+
document.getElementById('IndexTab').className = 'Tab';
|
159 |
+
document.getElementById('ChangelogTab').className = 'Tab';
|
160 |
+
document.getElementById('InstallTab').className = 'SelectedTab';
|
161 |
+
document.getElementById('UpgradeTab').className = 'Tab';
|
162 |
+
document.getElementById('UsageTab').className = 'Tab';
|
163 |
+
// Page
|
164 |
+
document.getElementById('Index').style.display= 'none';
|
165 |
+
document.getElementById('Changelog').style.display = 'none';
|
166 |
+
document.getElementById('Install').style.display = 'block';
|
167 |
+
document.getElementById('Upgrade').style.display = 'none';
|
168 |
+
document.getElementById('Usage').style.display = 'none';
|
169 |
+
}
|
170 |
+
// Upgrade Page
|
171 |
+
function upgrade() {
|
172 |
+
// Tab
|
173 |
+
document.getElementById('IndexTab').className = 'Tab';
|
174 |
+
document.getElementById('ChangelogTab').className = 'Tab';
|
175 |
+
document.getElementById('InstallTab').className = 'Tab';
|
176 |
+
document.getElementById('UpgradeTab').className = 'SelectedTab';
|
177 |
+
document.getElementById('UsageTab').className = 'Tab';
|
178 |
+
// Page
|
179 |
+
document.getElementById('Index').style.display= 'none';
|
180 |
+
document.getElementById('Changelog').style.display = 'none';
|
181 |
+
document.getElementById('Install').style.display = 'none';
|
182 |
+
document.getElementById('Upgrade').style.display = 'block';
|
183 |
+
document.getElementById('Usage').style.display = 'none';
|
184 |
+
}
|
185 |
+
// Usage Page
|
186 |
+
function usage() {
|
187 |
+
// Tab
|
188 |
+
document.getElementById('IndexTab').className = 'Tab';
|
189 |
+
document.getElementById('ChangelogTab').className = 'Tab';
|
190 |
+
document.getElementById('InstallTab').className = 'Tab';
|
191 |
+
document.getElementById('UpgradeTab').className = 'Tab';
|
192 |
+
document.getElementById('UsageTab').className = 'SelectedTab';
|
193 |
+
// Page
|
194 |
+
document.getElementById('Index').style.display= 'none';
|
195 |
+
document.getElementById('Changelog').style.display = 'none';
|
196 |
+
document.getElementById('Install').style.display = 'none';
|
197 |
+
document.getElementById('Upgrade').style.display = 'none';
|
198 |
+
document.getElementById('Usage').style.display = 'block';
|
199 |
+
}
|
200 |
+
/* ]]> */
|
201 |
+
</script>
|
202 |
+
</head>
|
203 |
+
<body>
|
204 |
+
<div id="Container">
|
205 |
+
<!-- Title -->
|
206 |
+
<div id="Title">WP-DBManager 2.10 <span style="color: #aaaaaa;">Readme</span></div>
|
207 |
+
|
208 |
+
<!-- Tabs -->
|
209 |
+
<ul id="Tabs">
|
210 |
+
<li id="UsageTab" class="Tab"><a href="#Usage" onclick="usage(); return false;" title="Usage Instructions">Usage</a></li>
|
211 |
+
<li id="UpgradeTab" class="Tab"><a href="#Upgrade" onclick="upgrade(); return false;" title="Upgrade Instructions">Upgrade</a></li>
|
212 |
+
<li id="InstallTab" class="Tab"><a href="#Installation" onclick="install(); return false;" title="Installation Instructions">Installation</a></li>
|
213 |
+
<li id="ChangelogTab" class="Tab"><a href="#Changelog" onclick="changelog(); return false;" title="Changelog">Changelog</a></li>
|
214 |
+
<li id="IndexTab" class="SelectedTab"><a href="#Index" onclick="index(); return false;" title="Index Instructions">Index</a></li>
|
215 |
+
</ul>
|
216 |
+
|
217 |
+
<!-- Content -->
|
218 |
+
<div id="Content">
|
219 |
+
<!-- Index -->
|
220 |
+
<div id="Index">
|
221 |
+
<div class="SubTitle">» Index</div>
|
222 |
+
<div class="SubSubTitle">Plugin Information</div>
|
223 |
+
<p>
|
224 |
+
<b>Author:</b><br />
|
225 |
+
<b>»</b> Lester 'GaMerZ' Chan
|
226 |
+
</p>
|
227 |
+
<p>
|
228 |
+
<b>EMail:</b><br />
|
229 |
+
<b>»</b>
|
230 |
+
<script type="text/javascript">
|
231 |
+
/* <![CDATA[*/
|
232 |
+
document.write(' <a href="mailto:gamerz84@hotmail.com?Subject=WP-DBManager%202.10%20Support" title="EMail To gamerz84@hotmail.com">gamerz84@hotmail.com</a>');
|
233 |
+
/* ]]> */
|
234 |
+
</script>
|
235 |
+
</p>
|
236 |
+
<p>
|
237 |
+
<b>Website:</b><br />
|
238 |
+
<b>»</b> <a href="http://www.lesterchan.net/" title="http://www.lesterchan.net/">http://www.lesterchan.net/</a>
|
239 |
+
</p>
|
240 |
+
<p>
|
241 |
+
<b>Features:</b><br />
|
242 |
+
<b>»</b> Manages your Wordpress database. Allows you to optimize database, backup database, restore database, delete backup database , drop/empty tables and run selected queries.
|
243 |
+
</p>
|
244 |
+
<p>
|
245 |
+
<b>Download:</b><br />
|
246 |
+
<b>»</b> <a href="http://www.lesterchan.net/others/downloads.php?id=15" title="http://www.lesterchan.net/others/downloads.php?id=15">WP-DBManager 2.10 For WordPress 2.1.x</a><br />
|
247 |
+
<b>»</b> <a href="http://www.lesterchan.net/others/downloads/wp-dbmanager205.zip" title="http://www.lesterchan.net/others/downloads/wp-dbmanager205.zip">WP-DBManager 2.05 For WordPress 2.0.x</a><br />
|
248 |
+
<b>»</b> <a href="http://www.lesterchan.net/others/downloads/wp-dbmanager.zip" title="http://www.lesterchan.net/others/downloads/wp-dbmanager.zip">WP-DBManager 1.00 For WordPress 1.5.2</a>
|
249 |
+
</p>
|
250 |
+
<p>
|
251 |
+
<b>Demo:</b><br />
|
252 |
+
<b>»</b> N/A
|
253 |
+
</p>
|
254 |
+
<p>
|
255 |
+
<b>Development:</b><br />
|
256 |
+
<b>»</b> <a href="http://dev.wp-plugins.org/browser/wp-dbmanager/" title="http://dev.wp-plugins.org/browser/wp-dbmanager/">http://dev.wp-plugins.org/browser/wp-dbmanager/</a>
|
257 |
+
</p>
|
258 |
+
<p>
|
259 |
+
<b>Translations:</b><br />
|
260 |
+
<b>»</b> <a href="http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/" title="http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/">http://dev.wp-plugins.org/browser/wp-dbmanager/i18n/</a>
|
261 |
+
</p>
|
262 |
+
<p>
|
263 |
+
<b>Support Forums:</b><br />
|
264 |
+
<b>»</b> <a href="http://forums.lesterchan.net/index.php?board=11.0" title="http://forums.lesterchan.net/index.php?board=11.0">http://forums.lesterchan.net/index.php?board=11.0</a>
|
265 |
+
</p>
|
266 |
+
<p>
|
267 |
+
<b>Updated:</b><br />
|
268 |
+
<b>»</b> 1st February 2007
|
269 |
+
</p>
|
270 |
+
<p>
|
271 |
+
<b>Note:</b><br />
|
272 |
+
<b>»</b> The <b>Changelog</b>, <b>Installation</b>, <b>Upgrade</b>, <b>Usage</b> Tab at the top of the page.
|
273 |
+
</p>
|
274 |
+
<p>
|
275 |
+
<b>Donations:</b><br />
|
276 |
+
<b>»</b> 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 as my school allowance, I will really appericiate it. If not feel free to use it without any obligations. Thank You. My Paypal account is
|
277 |
+
<script type="text/javascript">
|
278 |
+
/* <![CDATA[*/
|
279 |
+
document.write(' <b>gamerz84@hotmail.com</b>.');
|
280 |
+
/* ]]> */
|
281 |
+
</script>
|
282 |
+
</p>
|
283 |
+
</div>
|
284 |
+
|
285 |
+
<!-- Changelog -->
|
286 |
+
<div id="Changelog" style="display: none;">
|
287 |
+
<div class="SubTitle">» Changelog</div>
|
288 |
+
<ul>
|
289 |
+
<li>
|
290 |
+
<b>Version 2.10 (01-02-2007)</b>
|
291 |
+
<ul>
|
292 |
+
<li>NEW: Works For WordPress 2.1 Only</li>
|
293 |
+
<li>NEW: Removed database-config.php</li>
|
294 |
+
<li>NEW: Localize WP-DBManager</li>
|
295 |
+
<li>NEW: Added The Ability To Auto Detect MYSQL And MYSQL Dump Path</li>
|
296 |
+
</ul>
|
297 |
+
</li>
|
298 |
+
<li>
|
299 |
+
<b>Version 2.05 (01-06-2006)</b>
|
300 |
+
<ul>
|
301 |
+
<li>FIXED: Database Table Names Not Appearing Correctly</li>
|
302 |
+
<li>NEW: DBManager Administration Panel Is XHTML 1.0 Transitional</li>
|
303 |
+
</ul>
|
304 |
+
</li>
|
305 |
+
<li>
|
306 |
+
<b>Version 2.04 (10-05-2006)</b>
|
307 |
+
<ul>
|
308 |
+
<li>FIXED: Unable To Download Backup DB Due To Header Sent Error</li>
|
309 |
+
<li>FIXED: Some XHTML Code Fixes</li>
|
310 |
+
</ul>
|
311 |
+
</li>
|
312 |
+
<li>
|
313 |
+
<b>Version 2.03 (01-04-2006)</b>
|
314 |
+
<ul>
|
315 |
+
<li>FIXED: Run Query Box Too Big</li>
|
316 |
+
<li>FIXED: Header Sent Error</li>
|
317 |
+
<li>FIXED: Extra Slashes For Mysql/Mysql Dump Path</li>
|
318 |
+
<li>FIXED: Mismatch Date Due To GMT</li>
|
319 |
+
</ul>
|
320 |
+
</li>
|
321 |
+
<li>
|
322 |
+
<b>Version 2.02 (01-03-2006)</b>
|
323 |
+
<ul>
|
324 |
+
<li>NEW: Improved On 'manage_database' Capabilities</li>
|
325 |
+
<li>NEW: Added GigaBytes To File Size</li>
|
326 |
+
<li>NEW: Added ALTER Statement To Allowed Queries</li>
|
327 |
+
<li>NEW: Able To Empty/Drop Tables</li>
|
328 |
+
<li>NEW: Able To EMail Database Backup File</li>
|
329 |
+
<li>NEW: Splitted database-manager.php Into Individual Files</li>
|
330 |
+
<li>NEW: Merge Restore And Delete Backup Database</li>
|
331 |
+
<li>NEW: Included .htaccess File To Protect Backup Folder</li>
|
332 |
+
<li>NEW: Checking Of Backup Status</li>
|
333 |
+
<li>FIXED: Using Old Method To Add Submenu</li>
|
334 |
+
<li>FIXED: PHP Short Tags</li>
|
335 |
+
<li>FIXED: Redirect Back To The Same Page Instead Of Manage Database Page After Submitting Form</li>
|
336 |
+
</ul>
|
337 |
+
</li>
|
338 |
+
<li>
|
339 |
+
<b>Version 2.01 (01-02-2006)</b>
|
340 |
+
<ul>
|
341 |
+
<li>NEW: Added 'manage_database' Capabilities To Administrator Role</li>
|
342 |
+
</ul>
|
343 |
+
</li>
|
344 |
+
<li>
|
345 |
+
<b>Version 2.00 (01-01-2006)</b>
|
346 |
+
<ul>
|
347 |
+
<li>NEW: Compatible With WordPress 2.0 Only</li>
|
348 |
+
<li>NEW: GPL License Added</li>
|
349 |
+
</ul>
|
350 |
+
</li>
|
351 |
+
</ul>
|
352 |
+
</div>
|
353 |
+
|
354 |
+
<!-- Installation Instructions -->
|
355 |
+
<div id="Install" style="display: none;">
|
356 |
+
<div class="SubTitle">» Installation Instructions</div>
|
357 |
+
<ol>
|
358 |
+
<li>
|
359 |
+
Open <b>wp-content/plugins</b> Folder
|
360 |
+
</li>
|
361 |
+
<li>
|
362 |
+
Put:
|
363 |
+
<blockquote>Folder: dbmanager</blockquote>
|
364 |
+
</li>
|
365 |
+
<li>
|
366 |
+
<b>Activate</b> WP-DBManager Plugin
|
367 |
+
</li>
|
368 |
+
<li>
|
369 |
+
Open <b>wp-content/backup-db</b> Folder
|
370 |
+
</li>
|
371 |
+
<li>
|
372 |
+
Put:
|
373 |
+
<blockquote>File: .htaccess</blockquote>
|
374 |
+
<p>The script will automatically create a folder called <b>backup-db</b> in wp-content folder if that folder is writable. If it is not created, please create it and CHMOD it to 777.</p>
|
375 |
+
</li>
|
376 |
+
<li>
|
377 |
+
Refer To <b>Usage</b> For Further Instructions
|
378 |
+
</li>
|
379 |
+
</ol>
|
380 |
+
</div>
|
381 |
+
|
382 |
+
<!-- Upgrade Instructions -->
|
383 |
+
<div id="Upgrade" style="display: none;">
|
384 |
+
<div class="SubTitle">» Upgrade Instructions</div>
|
385 |
+
<div class="SubSubTitle">From v2.0x To v2.10</div>
|
386 |
+
<ol>
|
387 |
+
<li>
|
388 |
+
<b>Deactivate</b> WP-DBManager Plugin
|
389 |
+
</li>
|
390 |
+
<li>
|
391 |
+
Open <b>wp-content/plugins</b> Folder
|
392 |
+
</li>
|
393 |
+
<li>
|
394 |
+
Put/Overwrite:
|
395 |
+
<blockquote>Folder: dbmanager</blockquote>
|
396 |
+
</li>
|
397 |
+
<li>
|
398 |
+
Delete:
|
399 |
+
<blockquote>File: wp-content/plugins/dbmanager/database-config.php</blockquote>
|
400 |
+
</li>
|
401 |
+
<li>
|
402 |
+
<b>Activate</b> WP-DBManager Plugin
|
403 |
+
</li>
|
404 |
+
<li>
|
405 |
+
Refer To <b>Usage</b> For Further Instructions
|
406 |
+
</li>
|
407 |
+
</ol>
|
408 |
+
</div>
|
409 |
+
|
410 |
+
<!-- Usage Instructions -->
|
411 |
+
<div id="Usage" style="display: none;">
|
412 |
+
<div class="SubTitle">» Usage Instructions</div>
|
413 |
+
<div class="SubSubTitle">General Usage</div>
|
414 |
+
<ol>
|
415 |
+
<li>
|
416 |
+
You can find DBManager under the <b>Database Tab</b> in the WordPress Administration Panel.
|
417 |
+
</li>
|
418 |
+
</ol>
|
419 |
+
</div>
|
420 |
+
</div>
|
421 |
+
</div>
|
422 |
+
<p id="Copyright">WP-DBManager 2.10<br />Copyright © 2007 Lester 'GaMerZ' Chan. All Rights Reserved.</p>
|
423 |
+
</body>
|
424 |
+
</html>
|
readme.txt
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WP-DBManager ===
|
2 |
+
Contributors: GamerZ
|
3 |
+
Donate link: http://www.lesterchan.net/wordpress
|
4 |
+
Tags: database, manage, wp-dbmanager, manager, table, optimize, backup, queries, query, drop, empty, tables, table, run
|
5 |
+
Requires at least: 2.1.0
|
6 |
+
Stable tag: 2.10
|
7 |
+
|
8 |
+
Manages your Wordpress database.
|
9 |
+
|
10 |
+
== Description ==
|
11 |
+
|
12 |
+
Allows you to optimize database, backup database, restore database, delete backup database , drop/empty tables and run selected queries.
|
13 |
+
|
14 |
+
All the information (general, changelog, installation, upgrade, usage) you need about this plugin can be found here: [WP-DBManager Readme](http://www.lesterchan.net/wordpress/readme/wp-dbmanager.html "WP-DBManager Readme").
|
15 |
+
It is the exact same readme.html is included in the zip package.
|
16 |
+
|
17 |
+
== Development Blog ==
|
18 |
+
|
19 |
+
[GaMerZ WordPress Plugins Development Blog](http://www.lesterchan.net/wordpress/ "GaMerZ WordPress Plugins Development Blog")
|
20 |
+
|
21 |
+
== Installation ==
|
22 |
+
|
23 |
+
[WP-DBManager Readme](http://www.lesterchan.net/wordpress/readme/wp-dbmanager.html "WP-DBManager Readme") (Installation Tab)
|
24 |
+
|
25 |
+
== Screenshots ==
|
26 |
+
|
27 |
+
[GaMerZ WordPress Plugins Screenshots](http://www.lesterchan.net/wordpress/screenshots/ "GaMerZ WordPress Plugins Screenshots")
|
28 |
+
|
29 |
+
== Frequently Asked Questions ==
|
30 |
+
|
31 |
+
You will need [GaMerZ WordPress Plugins Support Forums](http://forums.lesterchan.net/ "GaMerZ WordPress Plugins Support Forums")
|