[zi-cvs] packages/com.zzoss.zis/admin applications.php,NONE,1.1 distribution_add.php,NONE,1.1 distributions.php,NONE,1.1 index.php,NONE,1.1 info.php,NONE,1.1 packages.php,NONE,1.1

[email protected] Wed, 14 Jan 2004 08:38:42 -0800
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zis/admin
In directory sc8-pr-cvs1:/tmp/cvs-serv8193/admin

Added Files:
	applications.php distribution_add.php distributions.php 
	index.php info.php packages.php 
Log Message:
initial release

--- NEW FILE: applications.php ---
<?php 
	/*   
	Copyright (C) 2001-2003 ZZOSS GbR, http://www.zzoss.com
	----------------------------------------------------------------------   
	This program is free software; you can redistribute it and/or   
	modify it under the terms of the GNU General Public License   
	as published by the Free Software Foundation; either version 2   
	of the License, or (at your option) any later version.   
	----------------------------------------------------------------------   
	$Id: applications.php,v 1.1 2004/01/14 16:38:40 czonsius Exp $   
	*/

	// include the portlet manager
	require_once "DSERV_PHPortlet/PHPortletManager.php";
	
	$manager = new DSERV_PHPortletManager();
	$manager->addPath($_SERVER['ZZOSS_PATH_TRANSLATED']."mod/dserv_phportlets/packages/");
	
	// load the portlets
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerNavigation", 'zzoss_installer_server/Navigation.php');
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerApplicationList", 'zzoss_installer_server/ApplicationList.php');
	
	// Initialize the concrete instances
	$manager->initConcretePortlet("zzoss_installer_server_navigation", "ZZOSS_PHPortletZzossInstallerServerNavigation", array("section" => "applications", "pagetitle" => 'Applications', "admin" => true));
	$manager->initConcretePortlet("zzoss_installer_server_application_list", "ZZOSS_PHPortletZzossInstallerServerApplicationList", array("admin" => true));
	
	// page output
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/header.php';

	$manager->call("zzoss_installer_server_navigation", "view");
	$manager->call("zzoss_installer_server_application_list", "view");	
	
	// footer
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/footer.php';
?>
--- NEW FILE: distribution_add.php ---
<?php 
	/*   
	Copyright (C) 2001-2003 ZZOSS GbR, http://www.zzoss.com
	----------------------------------------------------------------------   
	This program is free software; you can redistribute it and/or   
	modify it under the terms of the GNU General Public License   
	as published by the Free Software Foundation; either version 2   
	of the License, or (at your option) any later version.   
	----------------------------------------------------------------------   
	$Id: distribution_add.php,v 1.1 2004/01/14 16:38:40 czonsius Exp $   
	*/

	// include the portlet manager
	require_once "DSERV_PHPortlet/PHPortletManager.php";
	
	$manager = new DSERV_PHPortletManager();
	$manager->addPath($_SERVER['ZZOSS_PATH_TRANSLATED']."mod/dserv_phportlets/packages/");
	
	// load the portlets
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerNavigation", 'zzoss_installer_server/Navigation.php');
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerDistributionAdd", 'zzoss_installer_server/DistributionAdd.php');
	
	// Initialize the concrete instances
	$manager->initConcretePortlet("zzoss_installer_server_navigation", "ZZOSS_PHPortletZzossInstallerServerNavigation", array("section" => "distributions", "pagetitle" => 'Add Distribution', "admin" => true));
	$manager->initConcretePortlet("zzoss_installer_server_distribution_add", "ZZOSS_PHPortletZzossInstallerServerDistributionAdd", array("admin" => true));
	
	// navigation button config
	$zi_buttons['next'] = true;
	
	// process input
	if(isset($_REQUEST['ZI_BUTTON_NEXT']) || isset($_REQUEST['ZI_BUTTON_NEXT_x'])) {
		switch($_REQUEST['zis_form']['type']) {
			case '1'	:	header("Location: distribution_add_form.php");
							break;
			case '2'	:	header("Location: distribution_import_file.php");
							break;
			case '3'	:	header("Location: distribution_import_url.php");
							break;
		}
	}

	
	// page output
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/header.php';

	$manager->call("zzoss_installer_server_navigation", "view");
	$manager->call("zzoss_installer_server_distribution_add", "view");	
	
	// footer
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/footer.php';
?>
--- NEW FILE: distributions.php ---
<?php 
	/*   
	Copyright (C) 2001-2003 ZZOSS GbR, http://www.zzoss.com
	----------------------------------------------------------------------   
	This program is free software; you can redistribute it and/or   
	modify it under the terms of the GNU General Public License   
	as published by the Free Software Foundation; either version 2   
	of the License, or (at your option) any later version.   
	----------------------------------------------------------------------   
	$Id: distributions.php,v 1.1 2004/01/14 16:38:40 czonsius Exp $   
	*/

	// include the portlet manager
	require_once "DSERV_PHPortlet/PHPortletManager.php";
	
	$manager = new DSERV_PHPortletManager();
	$manager->addPath($_SERVER['ZZOSS_PATH_TRANSLATED']."mod/dserv_phportlets/packages/");
	
	// load the portlets
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerNavigation", 'zzoss_installer_server/Navigation.php');
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerDistributionList", 'zzoss_installer_server/DistributionList.php');
	
	// Initialize the concrete instances
	$manager->initConcretePortlet("zzoss_installer_server_navigation", "ZZOSS_PHPortletZzossInstallerServerNavigation", array("section" => "distributions", "pagetitle" => 'Distributions', "admin" => true));
	$manager->initConcretePortlet("zzoss_installer_server_distribution_list", "ZZOSS_PHPortletZzossInstallerServerDistributionList", array("admin" => true));
	
	// page output
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/header.php';

	$manager->call("zzoss_installer_server_navigation", "view");
	$manager->call("zzoss_installer_server_distribution_list", "view");	
	
	// footer
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/footer.php';
?>
--- NEW FILE: index.php ---
<?php 
	/*   
	Copyright (C) 2001-2003 ZZOSS GbR, http://www.zzoss.com
	----------------------------------------------------------------------   
	This program is free software; you can redistribute it and/or   
	modify it under the terms of the GNU General Public License   
	as published by the Free Software Foundation; either version 2   
	of the License, or (at your option) any later version.   
	----------------------------------------------------------------------   
	$Id: index.php,v 1.1 2004/01/14 16:38:40 czonsius Exp $   
	*/

	// include the portlet manager
	require_once "DSERV_PHPortlet/PHPortletManager.php";
	
	$manager = new DSERV_PHPortletManager();
	$manager->addPath($_SERVER['ZZOSS_PATH_TRANSLATED']."mod/dserv_phportlets/packages/");
	
	// load the portlets
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerNavigation", 'zzoss_installer_server/Navigation.php');
	
	// Initialize the concrete instances
	$manager->initConcretePortlet("zzoss_installer_server_navigation", "ZZOSS_PHPortletZzossInstallerServerNavigation", array("section" => "distributions", "pagetitle" => 'Distributions', "admin" => true));
	
	// page output
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/header.php';

	$manager->call("zzoss_installer_server_navigation", "view");
	
	echo 'content';
	
	// footer
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/footer.php';
?>
--- NEW FILE: info.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: info.php,v 1.1 2004/01/14 16:38:40 czonsius 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
    include 'inc/info.php';
	// include necessary classes
	require_once 'ZZOSS_Installer_Server/DistributionRepository.php';
	require_once 'ZZOSS_Installer_Server/ApplicationRepository.php';
	require_once 'ZZOSS_Installer_Server/PackageRepository.php';
	
	/***************************************************************************   
    * STARTUP                                                             	   *   
    ***************************************************************************/   
	
    switch($_REQUEST['type']){
        case 'distribution':
            $header = 'Distribution';
            
			$distribution_repository = new ZZOSS_DistributionRepository();
			$distribution = $distribution_repository->getDistributionByID($_REQUEST['id']);
			$info = $distribution;
            break;
        case 'application':
            $header = 'Application';
            
			$application_repository = new ZZOSS_ApplicationRepository();
			$application = $application_repository->getApplicationByID($_REQUEST['id']);
			$info = $application;
            break;
        case 'package':
            $header = 'Package';
			
			$package_repository = new ZZOSS_PackageRepository();
			$package = $package_repository->getPackageByID($_REQUEST['id']);
			$xml = $package_repository->getXMLArray($package);
			if(is_array($xml)) {
				//print_r($xml);
				$info = $xml;
				$info['version'] = $info['release']['version'];
				$info['date'] = $info['release']['date'];
				$info['state'] = $info['release']['state'];
				$info['notes'] = $info['release']['notes'];
			}
			// fix some fields
            break;
    }
    
    /***************************************************************************   
    * PAGE CONTENT                                                             *   
    ***************************************************************************/   
	
    if(is_array($info["changelog"])) {
        $zi_buttons['next'] = 'info_changelog.php'.zi_form_querystr();
    }
    
	// page output
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/header_popup.php';

?>
<h1><?php echo $header; ?> Information</h1>
<?php
    $content = '';
    // Show the installation paths if it is an installed application
    $content .= zi_info_td('Description', zi_info_text($info["description"]) );
	$content .= zi_info_td('Distinguished Name', $info["name"] );
/*    if($_REQUEST['type'] == 'package'){
        $application = $zi_registry->getApplication();
        $content  .= zi_info_td('Application', $application['summary'].' '.$application['release']['version']);
    }*/
/*    if($_REQUEST['type'] != 'distribution'){
        $distribution = $zi_registry->getDistribution();
        $content  .= zi_info_td('Distribution', $distribution['summary'].' '.$distribution['release']['version']);
    }*/
	$content .= zi_info_td('Version', $info["version"] );
	$content .= zi_info_td('Release Date', $info["date"] );
	$content .= zi_info_td('State', zi_info_text($info["state"]) );
    $content .= zi_info_td('Homepage', zi_info_text($info['homepage']) );
	$content .= zi_info_td('Licenses', zi_info_licenses($info["release"]["license"]) );
    $content .= zi_info_td('Copyrights', zi_info_copyrights($info["release"]["copyright"]['holder']) );
	$content .= zi_info_td('Maintainers', zi_info_maintainers($info["maintainers"]["maintainer"]) );
	$content .= zi_info_td('Notes', zi_info_text($info["notes"]) );
    if($_REQUEST['type'] == 'package'){
        $header = $info['name'].'-'.$info["version"].'<br/>'.$info["summary"];
    } else {
        $header = $info["summary"].' '. $info["version"];
    }
	echo zi_info_table($header, $content);
    ?>
    <div class="contextlink">
        <?php
            if(is_array($info["changelog"])) {
                ?>
                [ <a href="info_changelog.php<?php echo zi_form_querystr(); ?>">Older Versions</a> ]
                <?php
            }
        ?>
    </div>
<?php
	// footer
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/footer_popup.php';

?>

--- NEW FILE: packages.php ---
<?php 
	/*   
	Copyright (C) 2001-2003 ZZOSS GbR, http://www.zzoss.com
	----------------------------------------------------------------------   
	This program is free software; you can redistribute it and/or   
	modify it under the terms of the GNU General Public License   
	as published by the Free Software Foundation; either version 2   
	of the License, or (at your option) any later version.   
	----------------------------------------------------------------------   
	$Id: packages.php,v 1.1 2004/01/14 16:38:40 czonsius Exp $   
	*/

	// include the portlet manager
	require_once "DSERV_PHPortlet/PHPortletManager.php";
	
	$manager = new DSERV_PHPortletManager();
	$manager->addPath($_SERVER['ZZOSS_PATH_TRANSLATED']."mod/dserv_phportlets/packages/");
	
	// load the portlets
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerNavigation", 'zzoss_installer_server/Navigation.php');
	$manager->loadPortlet("ZZOSS_PHPortletZzossInstallerServerPackageList", 'zzoss_installer_server/PackageList.php');
	
	// Initialize the concrete instances
	$manager->initConcretePortlet("zzoss_installer_server_navigation", "ZZOSS_PHPortletZzossInstallerServerNavigation", array("section" => "packages", "pagetitle" => 'Packages', "admin" => true));
	$manager->initConcretePortlet("zzoss_installer_server_package_list", "ZZOSS_PHPortletZzossInstallerServerPackageList", array("admin" => true));
	
	// page output
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/header.php';

	$manager->call("zzoss_installer_server_navigation", "view");
	$manager->call("zzoss_installer_server_package_list", "view");	
	
	// footer
	include $_SERVER['ZZOSS_PATH_TRANSLATED'].'themes/zzoss/footer.php';
?>



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html