<?php include 'header1.php';
date_default_timezone_set("Asia/Kolkata");
include'config.php';  
?>
<div class="content-wrapper">
	<section class="content-header">
		<h1>
			Pump Manager
		</h1>
		<ol class="breadcrumb">
			<li>
				<a href="#">
					<i class="fa fa-dashboard">
					</i> Home
				</a>
			</li>
			<li>
				<a href="#">Pump Manager
				</a>
			</li>
			<li class="active">18 HR Client Database
			</li>
		</ol>
	</section>	
	<section class="content">
		<div class="row">
			<div class="col-xs-12" >
				<div class="box" >
					<div class="box-header">
						<h3 class="box-title"> 18 HR Client Database
						</h3>
					</div>			
					<ul class="nav nav-tabs" role="tablist">
						<li class="nav-item">
							<a class="nav-link active" data-toggle="tab" href="#home">All Database</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" data-toggle="tab" href="#menu1">Add Table</a>
						</li>
						<li class="nav-item">
							<a class="nav-link" data-toggle="tab" href="#menu2">Add column</a>
						</li>
					</ul>
					<div class="tab-content " style="overflow-x: auto;scrollbar-x-position: top;max-height:400px;">
						<div id="home" class="container tab-pane active" ><br>
							<div id="employee_table"></div>  
						</div>
						<div id="menu1" class="container tab-pane fade"><br>
							<form method="post" id="addTable"> 
								Table Name : <input type="text" name="table_name" value="tbl_">
								<input type="hidden" name="request_type" id="request_type" readonly value="21" />  
								<button type="button" class="addTable btn btn-primary btn-md" onclick="addTable()">ADD</button>
								<br>
							</form>
						</div>
						<div id="menu2" class="container tab-pane fade"><br>
							<div id="employee_table2"></div>  

						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
</div>
<footer class="main-footer">
	<div class="pull-right hidden-xs">
		<b>Version
		</b> 2.4.18
	</div>
	<strong>Copyright &copy; 2019 
		<a href="https://adminlte.io">Pump Manager
		</a>.
	</strong> All rights
	reserved.
	<span> Powered by 
		<a href="http://qisystems.in/"> QI Systems
		</a>
	</span>
</footer>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
<script src="bower_components/fastclick/lib/fastclick.js"></script>
<script src="dist/js/adminlte.min.js"></script>
<script src="dist/js/demo.js"></script>
<script>
	fetch_data();
	fetch_data2();
	function fetch_data()  
	{  
		$.ajax({  
			url:"feature_insert.php",  
			method:"POST", 
			data:{request_type:23},  
			success:function(data){  
				$('#employee_table').html(data);  
			}  
		});  
	} 
	function fetch_data2()  
	{  
		$.ajax({  
			url:"feature_insert.php",  
			method:"POST", 
			data:{request_type:24},  
			success:function(data){  
				$('#employee_table2').html(data);  
			}  
		});  
	} 
	$(document).on('click', '.addTable', function(e){
		e.preventDefault()
		$.ajax({
			url:"feature_insert.php",  
			method:"POST",  
			data:$('#addTable').serialize(),				
			success:function(data){
				alert('DONE');
				fetch_data();
				fetch_data2();
			}
		}
		);
	});
	$(document).on('click', '.addColumn', function(e){
		e.preventDefault()
		$.ajax({
			url:"feature_insert.php",  
			method:"POST",  
			data:$('#addColumn').serialize(),				
			success:function(data){
				alert('DONE');
				fetch_data();
				fetch_data2();
			}
		}
		);
	});
</script>