<?php

class ProductCalcView extends Slot {
	var $SectionID = 23;
	var $ModuleID = 2;
	var $module = 0;

 function __construct($pquery) { 
		parent::__construct($pquery);
		$this->Cache = 0;
		$this->Passing = TRUE;
 }

 function init() {
	switch($this->Scheme) {
		case 'default': 
			//if (isset($_SESSION['compare'])) $this->PreparedTemplates['qty'] = count($_SESSION['compare']);
		break;
		case 'cartsqty':   
			$this->Action->processEvent($this->SectionID,'getcart_status',array(),$this);
		break;
		default: break;
	}
	$this->setSchemeTemplate($this->Scheme);
 }

 function fillElements() {
	switch($this->Scheme) {
		case 'default': $this->fillDefault(); break;
		case 'cartsqty': $this->fillCartsqty(); break;
		default: break;
	}
 }

function fillCartsqty() {
	$this->TempFillEls['qty'] = empty($this->PreparedTemplates['qty'])? 0: $this->PreparedTemplates['qty'];
	return; 
} 

function fillDefault() {
	if (isset($this->LocalTarget[0])){
		if (strtolower(substr($this->LocalTarget[0], 0, 16)) == 'turbine-services')
		   $this->TempFillEls['text'] = "Enabling Technologies for O&M Cost Management";
		       else if (strtolower(substr($this->LocalTarget[0], 0, 20)) == 'engineering-services' || strtolower(substr($this->LocalTarget[0], 0, 19)) == 'protective-coatings' )
			   $this->TempFillEls['text'] = "Enabling Technologies and Engineering Support";
			       else if (strtolower(substr($this->LocalTarget[0], 0, 35)) == 'welding-systems-automation-services' || strtolower(substr($this->LocalTarget[0], 0, 34)) == 'welding-systems-dimetrics-services')
       				   $this->TempFillEls['text'] = "Enabling Welding Technologies Globally in Field Applications";
				       else if (strtolower(substr($this->LocalTarget[0], 0, 26)) == 'welding-systems-automation')
						   $this->TempFillEls['text'] = "Enabling Welding Technologies Globally for the Aerospace and Nuclear Industries";
					       else if (strtolower(substr($this->LocalTarget[0], 0, 25)) == 'welding-systems-dimetrics')	
							   $this->TempFillEls['text'] = "Enabling Technologies Globally for Orbital Tube and Pipe Welding Applications";
					  	       else if (strtolower(substr($this->LocalTarget[0], 0, 17)) == 'contract-services')	
							 		$this->TempFillEls['text'] = "Code Construction Welding Services since 1978";              
	}
	if (!isset($this->TempFillEls['text'])) $this->TempFillEls['text'] = "Enabling Technologies Globally";
	return; 
} 

}
?>