Changeset 6018

Show
Ignore:
Timestamp:
05/09/06 11:00:36 (2 years ago)
Author:
GamerZ
Message:

Version 2.04

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wp-dbmanager/trunk/dbmanager/database-backup.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
     
    186186            <tr style='background-color: #eee'> 
    187187                  <th align="left" scope="row">GZIP Database Backup File?</th> 
    188                   <td><input type="radio" name="gzip" value="1">Yes&nbsp;&nbsp;<input type="radio" name="gzip" value="0" checked="checked" />No</td> 
     188                  <td><input type="radio" name="gzip" value="1" />Yes&nbsp;&nbsp;<input type="radio" name="gzip" value="0" checked="checked" />No</td> 
    189189            </tr> 
    190190            <tr> 
  • wp-dbmanager/trunk/dbmanager/database-config.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
  • wp-dbmanager/trunk/dbmanager/database-empty.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
  • wp-dbmanager/trunk/dbmanager/database-manage.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
     
    116116                  break; 
    117117            case 'Download': 
    118                   if(!empty($database_file)) { 
    119                         header('Location: '.get_settings('siteurl').'/wp-content/plugins/dbmanager/database-manage.php?file='.$database_file); 
    120                   } else { 
     118                  if(empty($database_file)) { 
    121119                        $text = '<font color="red">No Backup Database File Selected</font>'; 
    122120                  } 
     
    191189                        } 
    192190                  ?> 
    193                   </tr> 
    194191                  <tr> 
    195192                        <th align="left" colspan="3"><?php echo $no; ?> Backup File(s)</th> 
     
    201198                  </tr> 
    202199                  <tr> 
    203                         <td colspan="5" align="center"><input type="submit" name="do" value="Download" class="button" />&nbsp;&nbsp;<input type="submit" class="button" name="do" value="Restore" onclick="return confirm('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.')" class="button" />&nbsp;&nbsp;<input type="submit" class="button" name="do" value="Delete" onclick="return confirm('You Are About To Delete The Selected Database Backup Files.\nThis Action Is Not Reversible.\n\n Choose \'Cancel\' to stop, \'OK\' to delete.')" />&nbsp;&nbsp;<input type="button" name="cancel" Value="<?php _e('Cancel'); ?>" class="button" onclick="javascript:history.go(-1)" /></td> 
     200                        <td colspan="5" align="center"><input type="submit" name="do" value="Download" class="button" />&nbsp;&nbsp;<input type="submit" name="do" value="Restore" onclick="return confirm('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.')" class="button" />&nbsp;&nbsp;<input type="submit" class="button" name="do" value="Delete" onclick="return confirm('You Are About To Delete The Selected Database Backup Files.\nThis Action Is Not Reversible.\n\n Choose \'Cancel\' to stop, \'OK\' to delete.')" />&nbsp;&nbsp;<input type="button" name="cancel" Value="<?php _e('Cancel'); ?>" class="button" onclick="javascript:history.go(-1)" /></td> 
    204201                  </tr>                          
    205202            </table> 
  • wp-dbmanager/trunk/dbmanager/database-manager.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
  • wp-dbmanager/trunk/dbmanager/database-optimize.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
     
    7777                                    eval("\$table_name = \"$table_name\";"); 
    7878                                    echo "<tr $style><th align=\"left\" scope=\"row\">$table_name</th>\n"; 
    79                                     echo "<td><input type=\"radio\" name=\"optimize[$table_name]\" value=\"no\">No&nbsp;&nbsp;<input type=\"radio\" name=\"optimize[$table_name]\" value=\"yes\" checked=\"checked\">Yes</td></tr>"; 
     79                                    echo "<td><input type=\"radio\" name=\"optimize[$table_name]\" value=\"no\" />No&nbsp;&nbsp;<input type=\"radio\" name=\"optimize[$table_name]\" value=\"yes\" checked=\"checked\" />Yes</td></tr>"; 
    8080                              } 
    8181                        ?> 
  • wp-dbmanager/trunk/dbmanager/database-run.php

    r5686 r6018  
    33+----------------------------------------------------------------+ 
    44|                                                                                                                                         | 
    5 |     WordPress 2.0 Plugin: WP-DBManager 2.03                                           | 
     5|     WordPress 2.0 Plugin: WP-DBManager 2.04                                           | 
    66|     Copyright (c) 2005 Lester "GaMerZ" Chan                                                   | 
    77|                                                                                                                                         | 
     
    7575            <p align="center"><textarea cols="120" rows="30" name="sql_query"></textarea></p> 
    7676            <p align="center"><input type="submit" name="do" Value="Run" class="button" />&nbsp;&nbsp;<input type="button" name="cancel" Value="<?php _e('Cancel'); ?>" class="button" onclick="javascript:history.go(-1)" /></p> 
    77             <p>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.<br />2. UPDATE statement may return an error sometimes due to the newly updated value being the same as the previous value.<br />3. ALTER statement will return an error because there is no value returned.</font></p> 
     77            <p>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.<br />2. UPDATE statement may return an error sometimes due to the newly updated value being the same as the previous value.<br />3. ALTER statement will return an error because there is no value returned.</p> 
    7878      </form> 
    7979</div> 
  • wp-dbmanager/trunk/dbmanager/dbmanager.php

    r5686 r6018  
    44Plugin URI: http://www.lesterchan.net/portfolio/programming.php 
    55Description: Manages your Wordpress database. Allows you to optimizee, backup, restore, delete backup database and run selected queries.   
    6 Version: 2.03 
     6Version: 2.04 
    77Author: GaMerZ 
    88Author URI: http://www.lesterchan.net 
     
    6464      if(!$role->has_cap('manage_database')) { 
    6565            $role->add_cap('manage_database'); 
     66      } 
     67} 
     68 
     69 
     70### Function: Download Database 
     71add_action('init', 'download_database'); 
     72function download_database() { 
     73      if($_POST['do'] == 'Download' && !empty($_POST['database_file'])) { 
     74            if(strpos($_SERVER['HTTP_REFERER'], get_settings('siteurl').'/wp-admin/admin.php?page=dbmanager/database-manage.php') !== false) { 
     75                  $backup_options = get_settings('dbmanager_options'); 
     76                  $file_path = $backup_options['path'].'/'.$_POST['database_file']; 
     77                  header("Pragma: public"); 
     78                  header("Expires: 0"); 
     79                  header("Cache-Control: must-revalidate, post-check=0, pre-check=0");  
     80                  header("Content-Type: application/force-download"); 
     81                  header("Content-Type: application/octet-stream"); 
     82                  header("Content-Type: application/download"); 
     83                  header("Content-Disposition: attachment; filename=".basename($file_path).";"); 
     84                  header("Content-Transfer-Encoding: binary"); 
     85                  header("Content-Length: ".filesize($file_path)); 
     86                  @readfile($file_path); 
     87            } 
     88            exit(); 
    6689      } 
    6790} 
  • wp-dbmanager/trunk/readme-upgrade.txt

    r5684 r6018  
    1 -> Upgrade Instructions For Version 2.02 To Version 2.03 
     1-> Upgrade Instructions For Version 2.02+ To Version 2.04 
    22------------------------------------------------------------------ 
    33// Open wp-content/plugins folder 
  • wp-dbmanager/trunk/readme.txt

    r5639 r6018  
    77Documentation     -> http://dev.wp-plugins.org/wiki/wp-dbmanager 
    88Development -> http://dev.wp-plugins.org/browser/wp-dbmanager/ 
    9 Updated           -> 1st April 2006 
     9Updated           -> 10th May 2006 
    1010-------------------------------------------------- 
    1111 
     12 
     13// Version 2.04 (10-05-2006) 
     14- FIXED: Unable To Download Backup DB Due To Header Sent Error 
     15- FIXED: Some XHTML Code Fixes 
    1216 
    1317// Version 2.03 (01-04-2006)