<?php
	include("../includes/dbconfig.php");
	$pagetitle = "Workshop services";
	require('../includes/applicationtop.php');
	require('../includes/applicationmenu.php');
	
	$results = DB::query("SELECT * FROM repair_jobnames JOIN repair_jobtypes on repair_jobtypes.rptid=repair_jobnames.job_type");
	
?>
			<!-- Content Wrapper. Contains page content -->
			<div class="content-wrapper">
				<!-- Content Header (Page header) -->
				<section class="content-header">
					<h1><?= $pagetitle;?></h1>
					<ol class="breadcrumb">
					</ol>
				</section>

				<!-- Main content -->
				<!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-12">
          <div class="card">
            
					 
					 
						 
						
						 
							<div id="servererrormessage">
							</div>
							
							
          
                            <div class="card-body">	
								<div class="col-sm-12">
									<div class="input-group-btn">
										<a href="repairjobssetup.php" class="btn btn-sm btn-primary pull-right"><i class="fa fa-plus"></i> Add new</a>
									</div>
								</div>
								
								<table id="example1"   class="table table-bordered table-striped">
									<thead>
										<tr>
                                            <th>Name</th>
											<th>Amount</th>
											<th>Type</th> 
											<th class="text-center">Action</th>
										</tr>
									</thead>
									<tfoot>
										<tr>
											<th>Name</th>
											<th>Amount</th>
											<th>Type</th> 
											<th class="text-center">Action</th>
										</tr>
									</tfoot>
									<tbody>
									<?php
										foreach($results as $user)
										{
									?>
										<tr>
											<td><?php echo $user['job_name']; ?></td>
											<td><?php echo $user['job_amount']; ?></td>
											<td><?php echo $user['rpt_name']; ?></td>
										 
										  
											<td class="text-center">
												<a href="javascript:void(0);" onclick="gendawano('editjobname', 'userfocus', <?php echo $user['job_id']; ?>)" data-toggle="tooltip" title="Edit System User" class="tooltips"><span class="label label-primary" ><i class="fa fa-edit"></i></span></a>
											 
											</td>
										</tr>
									<?php
										}
									?>
									</tbody>
								</table>
							</div>
						</div>
						 
					 
					   </div>
					</div>
					 
					
				</section><!-- /.content -->
			</div><!-- /.content-wrapper -->

			<footer class="main-footer text-center">
				<strong>Copyright &copy; <?php echo date("Y"); ?> BSMPOS.</strong> All rights reserved.
			</footer>
		</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="../plugins/bert/storepos.js" type="text/javascript"></script>
		<script src="../plugins/bert/systemusers.js" type="text/javascript"></script>
		
	</body>
</html>