<!DOCTYPE html>
<html lang="en">


<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
<head>
    
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Rizwan </title>
    <!-- Favicon icon -->
    <link rel="icon" type="image/png" sizes="16x16" href="<?php echo base_url();?>assets/images/favicon.png">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/bootstrap-select/dist/css/bootstrap-select.min.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css">
    <!-- Pick date -->
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.css">
    <link rel="stylesheet" href="<?php echo base_url();?>assets/vendor/pickadate/themes/default.date.css">
     <link href="<?php echo base_url();?>assets/vendor/datatables/css/jquery.dataTables.min.css" rel="stylesheet">
    <!-- Custom Stylesheet -->
     
<style type="text/css">
    @media screen {
  #printSection {
      display: none;
  }
}

@media print {
  body * {
    visibility:hidden;
  }
  #printSection, #printSection * {
    visibility:visible;
  }
  #printSection {
    position:absolute;
    left:0;
    top:0;
  }
}




 </style>
</head>

<body>

    <!--*******************
        Preloader start
    ********************-->
        <div id="preloader">
        <div class="sk-three-bounce">
            <div class="sk-child sk-bounce1"></div>
            <div class="sk-child sk-bounce2"></div>
            <div class="sk-child sk-bounce3"></div>
        </div>
    </div>
    <!--*******************
        Preloader end
    ********************-->

    <!--**********************************
        Main wrapper start
    ***********************************-->
    <div id="main-wrapper">

      <?php  $this->load->view('header'); ?>
        
        <!--**********************************
            Content body start
        ***********************************-->
        <div class="content-body">
            <!-- row -->
            <div class="container-fluid">
                    
                  <div class="row page-titles mx-0" style=" width: 35%;background-color: #71A6E3; color:#fff;">
                    <div class="col-sm-6 p-md-0">
                        <div class="welcome-text">
                            <p>Machine #:<b><?php echo machine_name($this->uri->segment('5')); ?></b></p>
                             <p>Item # : <b><?php echo product_name($this->uri->segment('3')); ?></b></p>
                            
                        </div>
                    </div>
                   
                </div>
                
                <div class="row">
            <?php echo form_open(base_url(''),array('class'=>"form-horizontal add_inspec", 'id'=>"add_inspec")); ?>   

                          <?php if($this->session->flashdata('add_inspec_success')){ ?>
                                <div class="alert alert-success solid" style='text-align:center;'><?php echo $this->session->flashdata('add_inspec_success'); ?></div>
                            <?php } ?>

                            <input type='hidden' name="product" value="<?php echo $this->uri->segment('3'); ?>">
                            
                            <input type='hidden' name="so_id" value="<?php echo $this->uri->segment('4'); ?>">

                            <input type='hidden' name="machine" value="<?php echo $this->uri->segment('5'); ?>">
           
                	<div class="col-8">
                		 
                		<div class="card">
							
							<div class="card-body">
								 <div id='add_inspec_success' class='alert alert-success solid' style='display:none;'></div>
                                  <div id='condition' class='alert alert-danger solid' style='display:none;'></div>

                                 <div class="row">
                            

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range1 Max</label>
                                        <input type="text" name="range1_max" id="range1_max" required value="" class="form-control required">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range1 Min</label>
                                        <input type="text" name="range1_min" id="range1_min" required value="" class="form-control required">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range2 Max</label>
                                        <input type="text" name="range2_max" id="range2_max"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range2 Min</label>
                                        <input type="text" name="range2_min" id="range2_min"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range3 Max</label>
                                        <input type="text" name="range3_max" id="range3_max"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range3 Min</label>
                                        <input type="text" name="range3_min" id="range3_min"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range4 Max</label>
                                        <input type="text" name="range4_max" id="range4_max"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range4 Min</label>
                                        <input type="text" name="range4_min" id="range4_min"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range5 Max</label>
                                        <input type="text" name="range5_max" id="range5_max"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range5 Min</label>
                                        <input type="text" name="range5_min" id="range5_min"  value="" class="form-control ">
                                    </div>
                                </div>

                                


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range1 Max INJ-P</label>
                                        <input type="text" name="range1_injp_max" id="range1_injp_max"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range1 Min INJ-P</label>
                                        <input type="text" name="range1_injp_min" id="range1_injp_min"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range2 Max INJ-S</label>
                                        <input type="text" name="range2_injs_max" id="range2_injs_max"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range2 Min INJ-S</label>
                                        <input type="text" name="range2_injs_min" id="range2_injs_min"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range3 Max INJ-T Sec</label>
                                        <input type="text" name="range3_injt_sec_max" id="range3_injt_sec_max"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range3 Min INJ-T Sec</label>
                                        <input type="text" name="range3_injt_sec_min" id="range3_injt_sec_min"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range4 Max C-T Sec</label>
                                        <input type="text" name="range4_ct_sec_max" id="range4_ct_sec_max"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range4 Min C-T Sec</label>
                                        <input type="text" name="range4_ct_sec_min" id="range4_ct_sec_min"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range5 Max DOZ mm</label>
                                        <input type="text" name="range5_doz_mm_max" id="range5_doz_mm_max"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Range5 Min DOZ mm</label>
                                        <input type="text" name="range5_doz_mm_min" id="range5_doz_mm_min"  value="" class="form-control ">
                                    </div>
                                </div>


                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Oil Temperature Max</label>
                                        <input type="text" name="oil_temperature" id="oil_temperature"  value="" class="form-control ">
                                    </div>
                                </div>

                                <div class="col-lg-3 col-md-6 col-sm-12">
                                    <div class="form-group">
                                         <label class="form-label">Oil Temperature Min</label>
                                        <input type="text" name="max_min" id="max_min"  value="" class="form-control ">
                                    </div>
                                </div>

                               
                                             <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="form-group">
                                           
                                            <input type="hidden" name="created" id="created" value="<?php echo date('Y-m-d H:i:s'); ?>" class="form-control required">
                                        </div>
                                    </div>



                                   
							</div>	
                            
                            <button type="submit" class="btn btn-primary" id="emp_add" >Add</button>
							</div>
						</div>

                	</div>
                    <?php form_close(); ?>
                   
                    </div>

                    
                </div>
            </div>
        </div>

          
                                    
    <!-- Required vendors -->
         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
         <style type="text/css" media="print">
  @page { size: landscape; }
</style>
        <style>
        .redborder{
            border:1px solid red;
        }
        </style>

    <script type='text/javascript'>
 

      function delete_data(parameter_id) { 
        var id = parameter_id;
        //var mold = mold;
          var mold_id = $("#mold").val();

           if (confirm('Are you sure you want to Delete.?')) {
         $.ajax({
                type:'POST',
                url:'<?php echo base_url('Requisition/delete_parameter/'); ?>'+id,
                data:id,
                dataType:'json',
                success:function(data){
                    console.log('first'+data.status);
                    
                        console.log('second'+data.status);
                        //debugger;
                        $('#party_danger').show().html('Deleted Successfully');
                      setTimeout(function(){location.href="<?php echo base_url('Requisition/inspection/'); ?>"+mold_id} , 3000);
                    
                },
                error:function(data){console.log(data.responseText);}
            });
          }
        } 

      

  var add_inspec = $('#add_inspec');   
    
    add_inspec.on('submit',function(e){

        e.preventDefault();
        $("#emp_add").attr('disabled', true);
       
         var add_inspecdata = add_inspec.serialize();
      
            if (confirm('Are you sure you want to Add .?')) {
            $.ajax({
             url:'<?php echo base_url('Requisition/add_machine_config'); ?>',
             type:"post",
             data:new FormData(this),
             processData:false,
             contentType:false,
             cache:false,
             async:false,
             dataType:'json',
             success: function(data){
            
                    if(data.status === 'true'){
                        console.log('second'+data.status);
                        $('#add_inspec_success').show().html('added Successfully').hide(3000);
                     
                      setTimeout(function(){location.href="<?php echo base_url('Requisition/machine_config'); ?>"} , 3000);
                
                      
                    }else if (data.status === 'false'){
                        console.log('third'+data);     

                         $('#condition').show().html('Data Already Exists..!');     
                    }
                }
             });
       }
    });

    </script>   

       <?php  $this->load->view('footer'); ?>
        
</body>

<!-- Mirrored from edumin.dexignlab.com/xhtml/add-departments.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Nov 2020 13:56:15 GMT -->
</html>