예제 #1
0
 /**
  * Triggers the self deletion of the installation folder.
  *
  * When the installation finishes in step 7, the user is asked,
  * wether he might delete the installation folder for security purposes.
  */
 public function handleRequest_deleteInstallationFolder()
 {
     // allow session reset only in debug mode
     if (DEBUG == true and isset($_GET['reset_session'])) {
         $_SESSION = array();
         unset($_SESSION);
     }
     if (isset($_GET['delete_installation'])) {
         /**
          * Delete the installation folder
          */
         echo "Deleting Directory - " . __DIR__;
         Helper::removeDirectory(__DIR__);
         // display success message
         if (false === file_exists(__DIR__)) {
             echo '<p>
                     <center><h1>Finished!</h1><br />
                         <p><a href="../index.php">Click here to proceed!</a></p>
                     </center>
                   </p>';
         }
         exit;
     }
 }