<?php
  session_start();
  include("library/conn.php");
?>
<!DOCTYPE html>
<html lang="en">
  <head>
  	<title>Advanced Salaries Report => <?php echo $sys_comp_name; ?></title>
    <?php include("library/head.php");?>
  </head>
  <body class="app sidebar-mini">

    <!-- Navbar-->
    <?php include("library/header.php");?>
    <!-- Sidebar menu-->
    <div class="app-sidebar__overlay" data-toggle="sidebar"></div>
    <?php include("library/sidebar.php");?>
    
	<main class="app-content">
		<div class="app-title">
			<div>
				<h4 class="text-primary"><i class="fa fa-line-chart"></i> <b> ADVANCED SALARIES REPORT</b></h4>
				<p>Advanced Salaries Report</p>
			</div>
			<ul class="app-breadcrumb breadcrumb">
				<li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
				<li class="breadcrumb-item"><a href="advanced-salaries-report">Advanced Salaries Report</a></li>
			</ul>
		</div>
		
		<?php include("models/admin_config.php");?>
		<?php include("models/system_config.php");?>
		
		<div class="tile">
			<div class="tile-body">
				<form action="#" method="POST" id="advancedSalariesReportForm">
					<div class="row">
						<div class="form-group col-md-3">
							<label class="control-label">Advanced Salary Of</label>
							<select class="form-control" id="cmbPaymentMonthAdvancedSalariesReport" name="cmbPaymentMonthAdvancedSalariesReport" required>
							    <option value="">Select Month</option>
							    
							    <?php
							        
							        $getSalaryMonth = mysqli_query($conn, "SELECT DISTINCT paymentMonth FROM advanced_salaries");
							        if (mysqli_num_rows($getSalaryMonth) > 0) {
							            while ($salry_month_rs = mysqli_fetch_array($getSalaryMonth)) {
							                ?>
							                <option value="<?php echo $salry_month_rs[0]; ?>"><?php echo $salry_month_rs[0]; ?></option>
							                <?php
							            }
							            
							        } else {
							            echo "No Month Found";
							        }
							    ?>
							    
							</select>
						</div>
						<div class="form-group col-md-7">
							<label class="control-label">Employee Name</label><br>
                            <select class="form-control" name="cmbEmployeeIdAdvancedSalariesReport" id="cmbEmployeeIdAdvancedSalariesReport" style="width: 100%;">

							</select>
						</div>
						<div class="form-group col-md-2">
							<label class="control-label">&nbsp;</label><br>
							<button type="submit" class="btn btn-primary col-md-12" name="btnAdvancedSalariesReport" id="btnAdvancedSalariesReport"><i class="fa fa-search" style="font-size: 18px; margin-left: 5px; margin-bottom: 3px;"></i> Search</button>
						</div>
					</div>	
				</form>
			</div>
		</div>
		<div id="advancedSalariesReportSection">
			
		</div>
	  
    </main>
	
    <!-- Essential javascripts for application to work-->
	<?php include("library/footer.php");?>	    	
	<?php include("library/scripts.php"); ?>
	<script type="text/javascript"> $("#cmbPaymentMonthAdvancedSalariesReport, #cmbEmployeeIdAdvancedSalariesReport").select2({tags: false});</script>
	
  </body>
</html>