Location: PHPKode > projects > ZZ/OSS Installer > zic-1.1.0dev1/installer/installer_remove.php
<?php   
    /*
    Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
    @version $Id: installer_remove.php,v 1.4 2004/04/04 08:51:32 ordnas Exp $
    @copyright Copyright &copy; 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
    @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
    */

	// execute init file
	require_once 'inc/init.php';

    /***************************************************************************   
    * PAGE CONTENT                                                             *   
    ***************************************************************************/   

	if(isset($_REQUEST["action"])) {
        $msg = '';
		switch($_REQUEST["action"]) {
			// reset installer
			case 'reset_installer':
                $zi_setup->rmDataDir();
    			$msg .= 'removed '.$GLOBALS['ZI']['installer_data_dir']."\n";
				break;
		}
		$msg .= 'done.';
	}
	
	function zi_process()
	{
		// nothing to process
	}

	include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
	
?>
<h1>Remove Installer</h1>
<?php
$application = $zi_registry->getApplication($GLOBALS['ZI']['installer_application'], $GLOBALS['ZI']['installer_distribution']);
?>
<h2><a href="info.php?type=application&application=<?php echo $GLOBALS['ZI']['installer_application']; ?>&distribution=<?php echo $GLOBALS['ZI']['installer_distribution']; ?>" onclick="javascript:window.open('info.php?type=application&application=<?php echo $GLOBALS['ZI']['installer_application']; ?>&distribution=<?php echo $GLOBALS['ZI']['installer_distribution']; ?>', 'ApplicationInformation', 'width=500,height=500,resizable=1,status=0,scrollbars=1,toolbar=0,location=0,directories=0,menubar=0,dependent=0');void(0);javascript:return(false);" target="_blank" title="<?php echo $application["summary"].' '.$application['release']['version']; ?>"><?php echo $application["summary"].' '.$application['release']['version']; ?></a></h2>
<?php
if(isset($msg)) {
	echo '<textarea style="width:95%;height: 100px" readonly>'.$msg.'</textarea>';
}
?>
<hr/>
<p><span class="label">Data Directory:</span> <code><?php echo $GLOBALS['ZI']['data']; ?></code></p>
<hr/>
<p>[<a href="<?php echo $_SERVER["PHP_SELF"].'?action=reset_installer'; ?>" title="Reset Installer">Reset Installer</a>]</p>
<p>Reset installer to initial state (all data gets lost).</p>
<hr/>
<?php
    //$zi_buttons['back'] = 'applications.php?mode=dev';
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Return current item: ZZ/OSS Installer