<?php
$query = $db->get_all ( "incometax_slab" );
?><div class="page-content">
	<div class="page-header position-relative"></div>
	<!--/.page-header-->

	<div class="row-fluid">
		<div class="span12">
			<!--PAGE CONTENT BEGINS-->
			<div class="widget-box">
				<div class="widget-header">
					<h4 class="smaller">RATES OF TAX FOR YEAR OF ASSESSMENT 2014</h4>
				</div>

				<div class="widget-body">
					<div class="widget-main">
						<div class="row-fluid">
							<div class="span12">
								<div class="well well-small">
									<div class="row-fluid">
										<div class="span12">
											<span><b class="text-info">Your chargeable income is the
													amount remaining after deducting from your assessable
													income the personal reliefs to which you are entitled. If
													you are a resident in Singapore, the rates of tax
													chargeable are as follows: </b></span>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!-- ./row-fluid -->
						<div class="row-fluid">
							<div class="span12">
								<form method="POST" action="">
									<table id="sample-table-1"
										class="table table-striped table-bordered table-hover">

										<thead>
											<tr>
												<th></th>
												<th>Charageable Income</th>
												<th>Rate</th>
												<th>Gross Tax Payable</th>
											</tr>
										</thead>

										<tbody>

											<tr>
												<td></td>
												<td><?php echo CURRENCY;?></td>
												<td>(%)</td>
												<td><?php echo CURRENCY;?></td>
											</tr>
											<?php $num=1; foreach ($query as $row){?>
											<tr>
											<?php if($row['first'] == 1){?>
												<td>On the first</td>
											<?php }if($row['next'] == 2){?>
												<td>On the next</td>
											<?php }if($row['first']=='' && $row['next'] == ''){?>
												<td>Above</td>
											<?php }?>		
												<td><input type="text" name="<?php echo "ci".$num;?>"
													value="<?php echo $row['CI'];?>"></td>
												<td><input type="text" name="<?php echo "r".$num;?>"
													value="<?php echo $row['Rate'];?>"></td>
												<td><input type="text" name="<?php echo "gtp".$num;?>"
													value="<?php echo $row['GTP'];?>"></td>
											</tr>
											<?php $num++; }?>
											<tr>
												<td colspan='4'>
													<div class="form-actions center">
														<button type="submit" name="submit"
															class="btn btn-small btn-success">Submit</button>
													</div>
												</td>
											</tr>
										</tbody>
									</table>
								</form>
							</div>
							<!--/span-->
						</div>
						<!--/row-->
					</div>
				</div>
			</div>
			<!--PAGE CONTENT ENDS-->
		</div>
		<!--/.span-->
	</div>
	<!--/.row-fluid-->
</div>
<!--/.page-content-->
</div>
<!--/.main-content-->