<?php if (!defined('FLUX_ROOT')) exit; ?>
<div class="SynosisCont" id="synopsis">
<?php if ($itemGroups): ?>

 	<?php $weapons = 0; ?>
	<?php $armor = 0; ?>
	<?php $ammo = 0; ?>
	<?php $usable = 0; ?>
	<?php $usable1 = 0; ?>
	<?php $gift = 0; ?>
	<?php $delayed = 0; ?>
	<?php $pet = 0; ?>
	<?php $card = 0; ?>
	<?php $egg = 0; ?>

	<?php foreach ($itemGroups as $itemGroup): ?>

	   <?php if($itemGroup->type == 0):?>	
		<?php ++$usable1; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 2):?>	
		<?php ++$usable; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 3):?>	
		<?php ++$gift; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 4):?>	
		<?php ++$weapons; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 5):?>	
		<?php ++$armor; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 6):?>	
		<?php ++$card; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 7):?>	
		<?php ++$egg; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 8):?>	
		<?php ++$pet; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 10):?>	
		<?php ++$ammo; ?>
	   <?php endif ?>
	   <?php if($itemGroup->type == 11):?>	
		<?php ++$delayed; ?>
	   <?php endif ?>


	<?php endforeach ?>

</center><div style="overflow-x:auto;"><center>
<table class="vertical-table">

	<?php if($weapons): ?>	
		<tr>	
			<th colspan="4">Weapons</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 4): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	





	<?php if($armor): ?>
		<tr>	
			<th colspan="4">Armors</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 5): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>


	<?php if($ammo): ?>	
		<tr>	
			<th colspan="4">Ammunitions</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 10): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	


	<?php if($usable): ?>	
		<tr>	
			<th colspan="4">Usables</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 2): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	



	<?php if($delayed): ?>	
		<tr>	
			<th colspan="4">Delayed Consumables</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 11): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	



	<?php if($pet): ?>	
		<tr>	
			<th colspan="4">Pet Armors</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 8): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	


	<?php if($card): ?>	
		<tr>	
			<th colspan="4">Cards</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 6): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	

	<?php if($egg): ?>	
		<tr>	
			<th colspan="4">Gifts</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 7): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	


	<?php if($gift): ?>	
		<tr>	
			<th colspan="4">Miscellaneous</th>
		</tr>	
		<?php $i = 0; ?>
		<?php $c = 0; ?>
		<tr>
			<?php foreach ($itemGroups as $itemGroup): ?>
				<?php if($itemGroup->type == 3): ?>
	
					<?php if (($i % 4) == 0 && $i > 0): ?>
						<?php $c = 0; ?>
					    </tr><tr>
		    			<?php endif ?>
			
					<td align="center">
						<?php if ($icon=$this->iconImage($itemGroup->nameid)) ?>
							<img src="<?php echo htmlspecialchars($icon); ?>" />
							<br>(<?php echo (float)$itemGroup->rate ?>%)
							<?php if (!$itemGroup->slots): ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
							<?php else: ?>
								<br><?php echo $this->linkToItem($itemGroup->nameid,($itemGroup->name_japanese))?>
								[<?php echo $itemGroup->slots ?>]
							<?php endif ?>
					</td>

					<?php $c++; ?>
					<?php $i++; ?>
				<?php endif ?>
			<?php endforeach ?> <!-- end database list --->

			<!-- close columns --->
			<?php if ($c == 1): ?>
				<td></td><td></td><td></td>
			<?php endif ?>
			<?php if ($c == 2): ?>
				<td></td><td></td>
			<?php endif ?>
			<?php if ($c == 3): ?>
				<td></td>
			<?php endif ?>
	<?php endif ?>	

		
	</tr>
</table>
</div>

<?php else: ?>
	<p>No such group was found. <a href="javascript:history.go(-1)">Go back</a>.</p>
<?php endif ?>
</div>
<div style="width:100%; height:20px; margin:0; padding:0;"></div>
</div>        
<!-- Left Cont -->