Location: PHPKode > projects > ZZ/OSS Installer > zic-1.1.0dev1/installer/application_profile.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: application_profile.php,v 1.10 2004/04/05 08:23:12 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';
	
    // check if this script is part of installation procedure
    if(/*isset($_REQUEST['mode']) && ($_REQUEST['mode'] == 'dev' || $_REQUEST['mode'] == 'instant') && */!$zi_registry->isProcedure('profile')){
        $_REQUEST['type'] = 'plugin';
        header('Location: packages_reset.php'.zi_form_querystr().'&type=plugin');
        exit;
    }
    
	/***************************************************************************   
    * INSTALLER FRAMEWORK FUNCTIONS                                       	   *   
    ***************************************************************************/   
	
	function zi_process()
	{
        global $zi_registry;
        
        // save the selection
        $zi_registry->updateApplicationSettings($_REQUEST['ZI_VALUES']);
        
        $_REQUEST['profile'] = $_REQUEST['ZI_VALUES']['application_profile'];
        
        // compose actions if full or minimum installation
        if(isset($_REQUEST['profile']) && $_REQUEST["profile"] != 'custom') {
            //$zi_registry->setPkgsActionsPreselect($_REQUEST['profile']);
            
            // change procedures, omit the plugins/packages managers
            // as well as the confirm pages
            $procedures = array(
                            'settings' => 'on',
                            'profile' => 'on',
                            /*'plugins_manager' => 'on',*/
                            /*'plugins_confirm' => 'on',*/
                            'plugins_register' => 'hide',
                            'plugins_deps' => 'on',
                            'plugins_fileroles' => 'on',
                            'plugins_build' => 'on',
                            /*'packages_manager' => 'on',*/
                            /*'packages_confirm' => 'on',*/
                            'packages_register' => 'hide',
                            'packages_deps' => 'on',
                            'packages_fileroles' => 'on',
                            'packages_build' => 'on'
                            );
            // show register in dev
            if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dev'){
                $procedures['plugins_register'] = 'on';
                $procedures['packages_register'] = 'on';
            }
            $zi_registry->setProcedures($procedures);
            
            // clean up previous dependency queue
            //$zi_registry->unsetPackagesQueue();
        }
        
		//if($_REQUEST["mode"] == 'dev') {
            $_REQUEST['type'] = 'plugin';
			$_REQUEST["ZI_LOCATION_NEXT"] = "packages_reset.php".zi_form_querystr();
		/*} else {
			$_REQUEST["ZI_LOCATION_NEXT"] = 'packages.php'.zi_form_querystr();
		}*/
        
	}
    
    function zi_default()
    {
        global $zi_registry;
        $_REQUEST['ZI_VALUES'] = $zi_registry->getApplicationSettings();
        
        // set default profile
        if(!isset($_REQUEST['ZI_VALUES']["application_profile"])) {
            $_REQUEST['ZI_VALUES']["application_profile"] = 'full';
        }
        
        return $_REQUEST;
    }

	$application = $zi_registry->getApplication();
    
    /***************************************************************************   
    * PAGE CONTENT                                                             *   
    ***************************************************************************/   
	
	include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
    
    // installer widget class
	require_once 'ZZOSS_Installer/Widget.php';
	$zi_widget = new ZZOSS_InstallerWidget;
	if(isset($zi_errors)){
        $zi_widget->setErrors($zi_errors);
    }
?>
	<h1>Installation Profile</h1>

<h2><a href="info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>" onclick="javascript:window.open('info.php?mode=<?php echo $_REQUEST['mode']; ?>&type=application&distribution=<?php echo $_REQUEST['distribution']; ?>&application=<?php echo $_REQUEST['application']; ?>', '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>

<table border="0" cellspacing="0" cellpadding="4">
    <?php
    echo $zi_widget->add('radiobutton', 'Full Installation', 'application_profile', array('value' => 'full'));
    echo $zi_widget->add('radiobutton', 'Minimal Installation', 'application_profile', array('value' => 'minimum'));
    echo $zi_widget->add('radiobutton', 'Custom Installation', 'application_profile',  array('value' => 'custom'));
    ?>
    </table>
    <p/>
    <table border="0" cellspacing="0" cellpadding="4">
    <?php
    echo $zi_widget->add('checkbox', 'Demo Mode', 'application_demo');
    ?>
</table>
<?php
	$zi_buttons['back'] = "application_settings.php".zi_form_querystr();
	$zi_buttons['next'] = "applications.php";
    $zi_hide['profile'] = true;
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Return current item: ZZ/OSS Installer