Location: PHPKode > projects > FiForms Framework > FiForms/scripts/uninstall_final.php
<?php
/*  This file is part of the FiForms Framework
    Copyright (C) 2003-2008 by Daniel McFeeters,
    Licensed under the GNU GPL. 
    See LICENSE.txt for details. 
*/
    require_once('localconfig.php');
    $checkpass = true;
    require_once("authenticate.php");
    require_once("promptpage.php");
    $dirsub = array('APP_BASE' => $FIFORMS_CONFIG['APP_BASE'],
                         'SCRIPT_PATH' => $FIFORMS_CONFIG['SCRIPT_PATH'],
                         'APP' => $_POST['app']); 
  if($_POST['uninstall'] == 'Uninstall Application')
  {
    $basedir = $FIFORMS_CONFIG['APP_BASE'];
        $appname = $_POST['app'];
        if(file_exists($FIFORMS_CONFIG['SCRIPT_PATH']."app/$appname/installed_files.php"))
        {
                include_once($FIFORMS_CONFIG['SCRIPT_PATH']."app/$appname/installed_files.php");
        }
        else if(file_exists($FIFORMS_CONFIG['APP_BASE']."installed_files.php"))
        {
                include_once($FIFORMS_CONFIG['APP_BASE']."installed_files.php");
        }
        else
        {
                die('Could not find installed_files.php');
        }
    foreach($files as $file)
    {
            unlink(fillVars($dirsub,$file));
    }
    $rev_dir = array_reverse($directories);
    foreach($rev_dir as $directory)
    {
            rmdir(fillVars($dirsub,$directory));
    }
    promptPage("Application Uninstalled",<<<EOD
    <p><a href="index.php">Please Return to Main Menu</a></p>
EOD
,"20%","20%","60%");

  }
?>
Return current item: FiForms Framework