<?php
	include("includes/dbconfig.php");
	$pagetitle = "Customers";
	require('includes/applicationtop.php');
	require('includes/applicationmenu.php');
?>
			<!-- Content Wrapper. Contains page content -->
			<div class="content-wrapper">
				<!-- Content Header (Page header) -->
				<section class="content-header">
					<h1>Make Claim</h1>
					<ol class="breadcrumb">
					</ol>
				</section>

				<!-- Main content -->
				<section class="content">
					<!-- Default card -->
					<?php
						if($_SESSION["connectedusergroup"] == 3 || $_SESSION["connectedusergroup"] == 4 || $_SESSION["connectedusergroup"] == 1)
						{
					?>
					<div class="row">
						<div class="col-md-12">
							<div id="servererrormessage">
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-md-12">
							<div style="">
							</div>
						</div>
					</div>
				
					<div class="row">
						<div class="col-md-12">
							<div class="card card-primary" id="customerdetails" style="height: 500px;">
								<div class="card-body">
									
													
									
									<div>
										<div id="cartitemslist">
										<form method="post" action="customerregister.php">
											<table class="table table-hover"  id="">
												
												<tbody>
													<tr>
														<td><b>Customer</b></td><td>
														
														<select name="customer_id">
														<?php
														$customers = DB::query("SELECT id, name, phone, email, claim FROM customers");
														
														foreach ($customers as $customer)
														{
													?>
														<?php 
															$id = $customer['id']; 
															$name = $customer['name']; 
														?>
														<option value="<?php echo $id; ?>"><?php echo $name; ?></option>
													<?php
														}
													?>
															
														</select>
														
														</td>
													</tr>
													<tr>
														<td><b>Claim</b></td><td><input type="text" name="customer_claim" /></td>
													</tr>
													<tr>
														<td></td><td><input type="submit" name="submit" value="Submit" /></td>
													</tr>
												</tbody>
											</table>
										</form>
										</div>
									</div>
								</div><!-- /.card-body -->
							</div><!-- /.card -->
						</div>
						
						
					</div>
					<?php
						}
						else
						{
					?>
					<div class="alert alert-danger alert-dismissable">
						<i class="fa fa-ban-circle"></i>
						Limited Access
					</div>
					<?php
						}
					?>
				</section><!-- /.content -->
			</div><!-- /.content-wrapper -->

		 
		</div><!-- ./wrapper -->
		
		
 <?php include ('includes/general_footer.php')?>
		
		<script src="plugins/bert/jquery.price_format.min.js" type="text/javascript"></script>
		<script src="plugins/bert/storepos.js" type="text/javascript"></script>
		<script src="plugins/bert/cashsalesregister.js" type="text/javascript"></script>
	</body>
</html>