<?php
	include("my_functions.php");
	$pagetitle = "Customer Workshop history";
	require('includes/applicationtop.php');
	require('includes/applicationmenu.php');
	
	$err= ""; 
		 
    $actual_link = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    $parts = explode('workshopcushistory' , $actual_link);	
    $end = $parts[1];

    $custoner =  false;

    $parts = explode('/' , $end);

    if(empty($parts)){

        exit('Error');

    }else {

        $custoner =  $parts[1];
    }


    $fromdate = false;
    $selector = false;
    $cat = $shop = false;
	
	$startdatevalid = false;
	
	 
?>
			<!-- Content Wrapper. Contains page content -->
			<div class="content-wrapper">
				<!-- Content Header (Page header) -->
				 

				<!-- Main content -->
				<section class="content">
					<!-- Default card -->
					<div class="card card-primary">
						<?php
							if($_SESSION["connectedusergroup"] == 1 || $_SESSION["connectedusergroup"] < 5)
							{
						?>
						<div class="card-body">
							<div id="servererrormessage">
							</div>
							
							<?php
								if($err!="")
								{
							?>
							<div class="alert alert-danger alert-dismissable">
								<i class="fa fa-ban"></i>
								<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button><br>
								<?php 
									echo $err; 
								?>
							</div>
							<?php
								}
							?>
							
							<div class="card card-info">
              <div class="card-header">
                <h6 class="card-title"><?= $pagetitle ?></h6>
              </div>
              <div class="card-body"> 
				
							
							 
								<?php
									if($err=="" )
									{

                                        if($custoner > 0){
								?>
								   
								  
								  
								  
								  
								 
								 
								 
												 <table class="table table-striped table-boardered  table-hover" id="ziana">
												<thead>
												
												<tr class ='info'>
												<th> #</th><th>Job Description </th> <th>Date </th>    <th>Client</th><th>Phone</th> <th>Charges</th><th>Job type </th> <th>Owner  </th>  	<th>Status </th> 	<th>Pick up date </th> 
												</tr>
												</thead>
								 
								<?php
								
								  
							

                              job_detailz(false, false, false, $custoner);
                             

                             
									 
								?>
								
								</table>

                                <?php } } ?>
									 
								
								   
								 
								</div>
              </div>
              <!-- /.card-body -->
            </div>		 
								
								
								
								</div>
							</div>
						</div><!-- /.card-body -->
						<?php
						
							}
							else
							{
						?>
						<div class="alert alert-danger alert-dismissable">
							<i class="fa fa-ban-circle"></i><br>
							Limited Access
						</div>
						<?php
							}
						?>
					</div><!-- /.card -->
				</section><!-- /.content -->
			</div><!-- /.content-wrapper -->
 
		</div><!-- ./wrapper -->
		
		<div class="modal" id="waitdialogmodal"  data-backdrop="static">
            <div class="modal-dialog modal-sm">
              <div class="modal-content">
                  <div class="modal-body">
					<div class="text-center">
						<img src="<?php echo $base_url . $ajax_loading_image; ?>" />
					</div>
				  </div>
              </div>
            </div>
        </div>

		 
	
	
	
	
 <?php include ('includes/general_footer.php')?> 
<script src="js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="tableExport.js"></script>
<script type="text/javascript" src="jquery.base64.js"></script>
<script type="text/javascript" src="html2canvas.js"></script>
<script type="text/javascript" src="jspdf/libs/sprintf.js"></script>
<script type="text/javascript" src="jspdf/jspdf.js"></script>
<script type="text/javascript" src="jspdf/libs/base64.js"></script> 
 <link href="css/datepicker.css" rel="stylesheet">
 
<script>
 
		$(function(){
			 
			$('#from').datepicker();
			$('#to').datepicker();
			 
			 
		});
	</script>

	 
		<script src="plugins/bert/storepos.js" type="text/javascript"></script>
		<script src="plugins/bert/store.js" type="text/javascript"></script>
	</body>
</html>