<?php

require_once($_SERVER['WEB_PATH']."/php/includes/CL_TemplateHandler/CL_TemplateHandler.inc");

	$oSmarty = new CL_TemplateHandler();
	//$session = CL_Session::getSession();
		
	$templateDir = $_SERVER['WEB_PATH'].'/php/templates/base/eng/smarty/ladder/forms/';
	
	$calcId 	= 'calcDiv';
	$classId  	= 'box2';
	
	if($_GET)
	{
		$calcType = $_GET['calcType'];			// rank/skill/ladderBux
		$template = $calcType.'Calc.tpl';
	}
	elseif ($_POST)
	{
		$calcType = $_POST['calcType'];			// rank/skill/ladderBux
		$template = $calcType.'Calc.tpl';
	}
	
	if(!empty($calcType))
	{
		$oSmarty->assign('classId',		$classId);
		$oSmarty->assign('calcType',	$calcType);
		$oSmarty->assign('calcId',		$calcId);
	
		$content = $oSmarty->fetch($templateDir.$template);
	}
	
	print $content;

?>
