<?php
$drops = getDrops($monster['dropid']);
define('droptype', 'droptype');
if($drops>0){	
	echo '<table class="table table-sm"><tr class="table-success"><td colspan=3><center><strong>Drops</strong></center></td></tr>';
	foreach ($drops as $drop) {
		$rate=$drop['itemRate']/10;
		$groupRate=$drop['groupRate']/10;
		$groupno =$drop['groupId'];
		$droptype=$drop['dropType'];
		 echo '<tr><td><a href="?p=items&id='.$drop['itemId'].'"><img src=http://static.ffxiah.com/images/icon/'.$drop['itemId'].'.png alt='.ucwords(str_replace('_',' ',$drop['sortname'])).' height=32 width=32> '.ucwords(str_replace('_',' ',$drop['sortname'])).'</a></td><td>';
		if ($droptype == 0){
			echo ' '.$rate.'% ';
		}
		if ($droptype == 1){
			echo 'Weight ('. $rate.') - Group '.$groupno.'';
			echo '</td><td>Group Rate '.$groupRate.'%</td></tr>';
		}
		if ($droptype != 1){
			echo '</td><td>'.$droptype_array[$droptype].'</td></tr>';
		}
	}
}
echo '</table>';
?>