<?php
$section = 'cart';
$title = 'Your Cart';
include('header.php');
?>

<div id="body">
<div class="wrap">

<h2><?=$title?></h2>
<div id="pageheader">
<h4>Print Instructions:</h4>
<p class="shrink">Follow the steps in each section to print each size / paper color sign you require. Your price sign selections are organized by size and paper color. Use the following menu choices to jump to a specific size / paper color section to print the signs in each section. </p>
<div id="pagenav">
<h4>Jump to a Section:</h4>
<div class="sign-white">
<h5>White</h5>
<ul>
	<li><a href="#white-1">&lt;SIZE 1&gt;</a></li>
	<li><a href="#white-2">&lt;SIZE 2&gt;</a></li>
</ul>
</div><!--/sign-white-->
<div class="sign-yellow">
<h5>Yellow</h5>
<ul>
	<li><a href="#yellow-1">&lt;SIZE 1&gt;</a></li>
	<li><a href="#yellow-2">&lt;SIZE 2&gt;</a></li>
</ul>
</div><!--/sign-yellow-->
<div class="sign-red">
<h5>Red</h5>
<ul>
	<li><a href="#red-1">&lt;SIZE 1&gt;</a></li>
	<li><a href="#red-2">&lt;SIZE 2&gt;</a></li>
</ul>
</div><!--/sign-red-->
</div><!--/pagenav-->
</div><!--/pageheader-->

<?php for ($i = 1; $i <= 6; $i++): ?>
<?php
switch ($i) {
	case ($i <= 2): $color = "white"; break;
	case ($i > 2 && $i <= 4): $color = "yellow"; break;
	case ($i > 4): $color = "red"; break;
}
$section_id = $i % 2;
if ($section_id == 0) $section_id = 2;
?>
<div class="returntop"><a href="#">Return to top</a></div>
<h3 id="<?=$color.'-'.$section_id?>">&lt;SIZE <?=$section_id?>&gt; <?=ucwords($color)?></h3>
<div class="section<?=' sign-'.$color?>">
<h4>1. Select the checkbox for each Price Sign you want to print:</h4>
<form method="post" id="frmCart<?=$i?>">
<?php for ($j = 1; $j <= 4; $j++): ?>
<div class="item<?=($j % 2)?' left':''?>">
	<div class="select"><input type="checkbox" id="chkSelect" name="chkSelect" checked="checked" /></div>
	<dl>
		<dt>Description:</dt>
		<dd>Donec blandit elit eu leo. Vestibulum massa ligula, facilisis.</dd>
		<dt>Price:</dt>
		<dd><input type="text" name="txtPrice" id="txtPrice" style="width:40px;" /></dd>
		<dt>Print Qty:</dt>
		<dd><input type="text" name="txtQty" id="txtQty" style="width:30px;" /></dd>
	</dl>
	<div class="image"><!-- Mohan, please replace the following placeholder div with 100x100 thumbnail image --><div class="placeholder">thumbnail preview</div></div>
	<div class="preview"><button type="button" class="preview">Preview</button><input type="hidden" name="pdfUrl<?=$i?>" id="pdfUrl<?=$i?>" class="pdfUrl" value="http://www.pdflib.com/fileadmin/pdflib/pdf/whitepaper/Whitepaper-PDFA-with-PDFlib-products.pdf?id=<?=$i?>" /> </div>
</div><!--/item-->
<?php endfor; ?>
<div class="column left">
<h4>2. Click on paper layout diagram to indicate starting paper position:</h4>
<div class="paperlayout">
<?php
$letters = array("A","B","C","D","E","F","G","H","I","I","K","L","M","N","O");
$cell_id = 0;
switch ($i) {
	case 1:
		$rows = 5;
		$columns = 3;
		break;
	case 2:
		$rows = 1;
		$columns = 2;
		break;
	case 3:
		$rows = 2;
		$columns = 1;
		break;
	case 4:
		$rows = 4;
		$columns = 1;
		break;
	default:
		$rows = 5;
		$columns = 3;
		break;		
}
?>
	<div class="stack">
	<table>
	<?php for ($k = 1; $k <= $rows; $k++): ?>
		<tr>
		<?php for ($l = 1; $l <= $columns; $l++): ?>
			<td><label for="radLayout<?=$i.'_'.$cell_id?>" class="radio"><input type="radio" name="radLayout<?=$i?>" id="radLayout<?=$i.'_'.$cell_id?>" value="<?=$cell_id?>" <?=($cell_id == 0)?'checked="checked"':''?> /> <?=$letters[$cell_id]?></label></td>
		<?php $cell_id++; ?>
		<?php endfor; ?>
		</tr>
	<?php endfor; ?>
	</table>
	</div><!--/stack-->
</div><!--/paperlayout-->
</div><!--/column-->
<div class="column right">
<h4>3. Add &lt;QTY&gt; <?=$color?> page(s) of &lt;SIZE <?=$section_id?>&gt; to the printer and print:</h4>
<div class="buttonrow">
	<button type="submit" class="print">Print Selected</button>
</div>
</div><!--/column-->
</form>
</div><!--/section-->
<?php endfor; ?>

<div id="dialog-preview" title="Preview">
	<iframe src="" style="width:550px; height:400px;"></iframe>
</div><!--/dialog-preview-->

</div><!--/wrap-->
</div><!--/body-->

<?php include('footer.php'); ?>