<?php
/*
	+-----------------------------------------------------------------------------+
	| ILIAS open source                                                           |
	+-----------------------------------------------------------------------------+
	| Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
	|                                                                             |
	| 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.                      |
	|                                                                             |
	| This program 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 General Public License for more details.                                |
	|                                                                             |
	| You should have received a copy of the GNU General Public License           |
	| along with this program; if not, write to the Free Software                 |
	| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
	+-----------------------------------------------------------------------------+
*/


/**
* base script for payment_shopping_cart and buyed objects
*
* @author Stefan Meyer <smeyer@databay.de>
* @version $Id: payment.php 5054 2004-09-27 14:00:01Z smeyer $
*
* @package ilias-core
*/
define('ILIAS_MODULE','payment');

require_once "include/inc.header.php";

switch ($_GET["view"])
{
	case "payment_admin"	:	require_once "./payment/classes/class.ilPaymentAdminGUI.php";

								$ilCtrl->setTargetScript("payment.php");
								$ilCtrl->setParameterByClass("ilpaymentadmingui", "view", "payment_admin");
								$ilCtrl->getCallStructure("ilpaymentadmingui");

								$pa =& new ilPaymentAdminGUI($ilias->account);
								$ilCtrl->forwardCommand($pa);
								break;
	case "start_purchase"	:	require_once "./payment/classes/class.ilPaymentPurchaseGUI.php";

								$ilCtrl->setTargetScript("payment.php");
								$ilCtrl->setParameterByClass("ilpaymentpurchasegui", "view", "start_purchase");
								$ilCtrl->getCallStructure("ilpaymentpurchasegui");

								$pa =& new ilPaymentPurchaseGUI((int) $_GET['ref_id']);
								$ilCtrl->forwardCommand($pa);
								break;
	case "start_bmf"		:	require_once "./payment/classes/class.ilPurchaseBMFGUI.php";

								$ilCtrl->setTargetScript("payment.php");
								$ilCtrl->setParameterByClass("ilpurchasebmfgui", "view", "start_bmf");
								$ilCtrl->getCallStructure("ilpurchasebmfgui");

								$pa =& new ilPurchaseBMFGUI($ilias->account);
								$ilCtrl->forwardCommand($pa);
								break;
	case "conditions"		:	require_once "./payment/classes/class.ilTermsCondition.php";

								$pa =& new ilTermsCondition($ilias->account);
								$pa->show();
								break;
	default					:	require_once "./payment/classes/class.ilPaymentGUI.php";

								$ilCtrl->setTargetScript("payment.php");
								$ilCtrl->setParameterByClass("ilpaymentgui", "view", "payment");
								$ilCtrl->getCallStructure("ilpaymentgui");

								$pa =& new ilPaymentGUI($ilias->account);
								$ilCtrl->forwardCommand($pa);
								break;
								
}

$tpl->show();
?>
