<? global $current,$module, $CONTACT; $S=$current->settings; ?>

<div id="prodview" class="col5 prodview " >


<div class="prodnav pc tab">
	<h3> Quick Links </h3>
	<ul><? foreach($pool[5]->getChildren() as $c) { ?>
	<? $c->printNav(2);  } ?>
	</ul>				
</div>

<div class="hsp4 products" >

<? if(!$current->parent){ //Product Page ?>

	<div class="prodcats">
		<div class="ttl"><h1><?= $current->title ?></h1></div>
		<div class="col3  catlst">
		<?	foreach($current->getChildren() as $c){ ?>
			<div class="prodcat">
				<div>
					<div class="imgwrp"><div class="prodimg w0" style="background-image:url(<?= $c->getImage(banner) ?>)">	</div></div>
					<h2><?= $c->title ?></h2>
				</div>
				<div class="butn"><a href="<?= $c->getURL(); ?>"><p>View More</p></a></div>
			</div>
		<? } ?>
		</div>
	</div>



<?

} else if($current->children){ // Category Page	?>

<div class="prodcats">
		<div class="ttl"><h1><?= $current->title ?></h1></div>
		<div class="col3  catlst">
		<?	foreach($current->getChildren() as $c){ ?>
			<div class="prodcat">
				<div>
					<div class="imgwrp"><div class="prodimg w0" style="background-image:url(<?= $c->getImage(banner) ?>)">	</div></div>
					<h2><?= $c->title ?></h2>
				</div>
				<div class="butn"><a href="<?= $c->getURL(); ?>"><p>View More</p></a></div>
			</div>
		<? } ?>
		</div>
	</div>
	<? 

} else  { //Item Page
	?>
	<div class="col2 gap20 item">
	
		<div class=" imgs">
			<div class="itmimg w0" id="mainview" style="background-image:url(<?= $current->getImage(banner) ?>)"></div>
			<div class="col4 lstwrp">
				<?  foreach($current->getImages() as $f) { ?>
				<div class="imglst" style=" background-image:url('<?= $f ?>')" onclick="d('<?= $f ?>');"></div>
				<? } ?>
			</div>
			
			<div class="hotline pc tab"><h3>Call Us: <b> <?= $CONTACT->Hotline ?> </b> </h3></div>
			
			<div class="callme pc tab">
				<h3>Make an inquiry for this product and We will call you soon..!</h3>
				<form method="post" action="<?= $pool[3]->getURL() ?>">
				<input name="CMS_Emailer" value="module_emailer" type="hidden"> 
				<div class="col4 gap20">
				<div class="hsp3">
				<input class="txt" type="text" name="I[Name]" value="<?= $I['Name'] ?>" required placeholder="Name">
				<input class="txt" type="tel" name="I[Telephone]" value="<?= $I['Telephone'] ?>" required placeholder="Phone">
				<input class="txt" type="email" name="I[Email]" value="<?= $I['Email'] ?>" required placeholder="Email">
				<input type="hidden" name="I[Subject]" value="Call Me" required placeholder="Subject">
				<textarea style="display:none" name="I[Message]" >Prodcurt Name: <?= $current->title ?> - Prodcurt ID: <?= $S['ItCode'] ?> </textarea>
				</div>
				<div class="subwrp">
				<input class="sub" type="submit" name="submit" value="Call Me"> 
				</div>
				</div>
				</form>
			</div>

			
			
		</div>
		
		
		<div class=" prodarticle">
			<h1><?= $current->title ?></h1>
			<h3>Item Code: <?= $S['ItCode'] ?></h3>
			<div class="para"><?= $current->article ?></div>
			<div class="col4 dwn">
				<?  foreach($current->getfiles() as $g) { $n=PATHINFO($g,PATHINFO_EXTENSION); if($n=="pdf"){  ?>
				<div> <a href="<?= $g ?>" target="_blank"> More Details</a> </div>
				<? }} ?>
			</div>
		
		
		</div>
		
		
			<div class="hotline mob"><h3>Call Us: <b> <?= $CONTACT->Hotline ?> </b> </h3></div>
			
			<div class="callme mob">
				<h3>Make an inquiry for this product and We will call you soon..! </h3>
				<form method="post" action="<?= $pool[3]->getURL() ?>">
				<input name="CMS_Emailer" value="module_emailer" type="hidden"> 
				<div class="col4 gap20">
				<div class="hsp3">
				<input class="txt" type="text" name="I[Name]" value="<?= $I['Name'] ?>" required placeholder="Name">
				<input class="txt" type="tel" name="I[Telephone]" value="<?= $I['Telephone'] ?>" required placeholder="Phone">
				<input class="txt" type="email" name="I[Email]" value="<?= $I['Email'] ?>" required placeholder="Email">
				<input type="hidden" name="I[Subject]" value="Call Me" required placeholder="Subject">
				<textarea style="display:none" name="I[Message]" >Prodcurt Name: <?= $current->title ?> - Prodcurt ID: <?= $S['ItCode'] ?> </textarea>
				</div>
				<div class="subwrp">
				<input class="sub" type="submit" name="submit" value="Call Me"> 
				</div>
				</div>
				</form>
			</div>

		
		
		</div>
	<? 
}


function module_edit(){ global $current,$module; $S=$current->settings; 

?><div class="col4 gaph20">
<div><div><label>Item Code</label><input type="text" name="S[ItCode]" value="<?= $S['ItCode'] ?>"></div></div>
</div><?

}

?>

</div>

</div>