 <!--HEADER-SECTION-->
 <?php $this->load->view('header_front'); 
//code for to get the page content	
foreach($aboutconent as $val_content)
{
$title=$val_content->title;
$body_content=$val_content->body;
}
error_reporting(0);
 ?> 
    <!--HEADER-SECTION-->
    
    <!--CONTENT-AREA-->
	<div class="content-section">
            
            <!--WELCOME-JNJ-->
            <div class="section-welcome">
            	
                <div class="container">
                <div class="nav-welcome">
                	<ol class="breadcrumb">
                      <li><a href="<?php echo base_url();?>">Home</a></li>
                      <li><a href="<?php echo base_url();?>front_end/salary_calculator">Salary Calculator</a></li>
                    </ol>
                    <a class="menubtn" href="#"><i class="fa fa-bars"></i></a>
                </div>
                
                    <div class="gradient">
                        <div class="row">
                        
                            <div class="col-md-3">
                                <div class="main-heading">
                                    <h1>Salary </br>Calculator</h1>
                                </div>
                                <div class="aboutus-image">
                                	<img src="<?php echo base_url();?>assets_front/images/chair.png" alt="image">
                                </div>
                            </div>
                        
                            <div class="col-md-9">
                                <div class="welcome-content">  
								<p style="font-size:18px;">Calculate your salary, find out the amount you will be taking home, and how much tax you have to pay.</p>
								                  
                                   <?php //echo $body_content ;?>
<?php

require_once 'assets_front/lib/class-income-tax.php';
require_once 'assets_front/lib/data/income-tax-rates.php';
require_once 'assets_front/lib/data/national-insurance-rates.php';
require_once 'assets_front/lib/utils.php';

if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {

	$persona = array(
		'year'              => get_sanitized_tax_option( 'tax_year_is' ),
		'income'            => get_annual_income( get_sanitized_tax_option( 'income_every_x' ), get_sanitized_tax_option( 'gross_income_is' ) ),
		'other_allowance'   => get_sanitized_tax_option( 'other_allowance_is' ),
		'tax_code'          => strtoupper(get_sanitized_tax_option( 'tax_code_is' )),
		'age'               => get_sanitized_tax_option( 'age_is' ),
		'pension'           => get_sanitized_tax_option( 'pension_contribution_is' ),
		'pension_every'     => get_sanitized_tax_option( 'pension_every_x' ),
		'vouchers'          => get_annual_childcare( get_sanitized_tax_option( 'vouchers_every_x' ), get_sanitized_tax_option( 'childcare_vouchers_are' ) ),
		'childcare_pre2011' => get_other_allowance( 'is_childcare_pre2011' ),
		'blind'             => get_other_allowance( 'is_blind' ),
		'exclude_ni'        => get_other_allowance( 'exclude_ni' ),
		'student_loan'      => get_other_allowance( 'has_student_loan' ),
		'married'           => get_other_allowance( 'is_married' ),
		);

	$taxcalc = new Tax_Calculator( $persona );
	
	$taxcalc->calculate_taxes();

}

?>

<?php include 'assets_front/templates/header-template.php'; ?>

<div class="container" style="width:100%;">
	
	
		<?php include 'assets_front/templates/calculator-template.php'; ?> </br></br>         
		<?php include 'assets_front/templates/results-template.php'; ?>

		
	
</div>

<?php
?>

<?php include 'assets_front/templates/footer-template.php'; ?>
                                    
                                </div>
                            </div>
                        </div>
                    </div>
                </div> 
            </div>
        </div>

	<!--CONTENT-AREA-->
	<?php $this->load->view('footer_front'); ?>