Location: PHPKode > projects > ZZ/OSS Installer > zic-1.1.0dev1/installer/dev_reset_data.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: dev_reset_data.php,v 1.2 2004/01/14 15:41:27 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"])) {
		switch($_REQUEST["action"]) {
			// remove login data
			case 'reset_login':
                $msg .= dev_remove($GLOBALS['ZI']['installer_data_dir'].'.htpasswd');
				break;
			// 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>Reset Options</h1>
<?php
if(isset($msg)) {
	echo '<textarea style="width:95%;height: 100px" readonly>'.$msg.'</textarea>';
}
?>
<p>
    [<a href="<?php echo $_SERVER["PHP_SELF"].'?action=reset_login'; ?>" title="Reset Login">Reset Login</a>]<br/>
    Trigger a new autentication request.
</p>
<p>
    [<a href="<?php echo $_SERVER["PHP_SELF"].'?action=reset_installer'; ?>" title="Reset Installer">Reset Installer</a>]<br/>
    Reset installer to initial state (all data gets lost).
</p>
<?php
    $zi_buttons['back'] = 'applications.php?mode=dev';
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Return current item: ZZ/OSS Installer