<?php
$date=date('d/m/Y');
 $time=date('h:i', time());
 $period=date(A);
 $timestamp = date("H:i", time());
 $modid=$_REQUEST['modid'];
$frmid=$_REQUEST['frmid'];
$rurl="&modid=".$modid."&frmid=".$frmid;
if($_REQUEST['Save'])
{
$fstatus=true;
  if($_REQUEST['site']=='000')
  {
  	  $msgErr[]="Please Select Branch Name"	;
      $fstatus=false;
  }
  if($_REQUEST['job_ticket']=='')
  {
  	  $msgErr[]="Please Enter Job Ticket No"	;
      $fstatus=false;
  }	
	 if($_REQUEST['date']=='')
  {
  	  $msgErr[]="Please Enter  Date";
      $fstatus=false;
  }
   
  if($_REQUEST['operator']=='')
  {
  	  $msgErr[]="Please Enter Operator Name"	;
      $fstatus=false;
  }
   if($_REQUEST['printing_slip_no']=='')
  {
  	  $msgErr[]="Must Enter Printing  Slip"	;
      $fstatus=false;
  }
 	 if($_REQUEST['shift']=='')
  {
  	  $msgErr[]="Must Enter Shift"	;
      $fstatus=false;
  }
  if($_REQUEST['item']=='')
  {
  	  $msgErr[]="Must Enter Item Name"	;
      $fstatus=false;
  }
  if($_REQUEST['supervisor']=='')
  {
  	  $msgErr[]="Must Enter Supervisor Name"	;
      $fstatus=false;
  }
  	 if($_REQUEST['machine']=='')
  {
  	  $msgErr[]="Must Enter Machine Center"	;
      $fstatus=false;
  }
  if($_REQUEST['customer_name']=='')
  {
  	  $msgErr[]="Must Enter Customer Name"	;
      $fstatus=false;
  }
  
}
if($_REQUEST['Save']!='' and $fstatus)
{
		 $data['branch_id'] =$_REQUEST['site'];
		 $data['job_card_id']=$_REQUEST['job_ticket'];	
		 $data['printing_slip_no']=$_REQUEST['printing_slip_no'];
		 $data['date']=FormatDateForSQL($_REQUEST['date']);
		 $data['item_name']=$_REQUEST['item'];
		 $data['customer']=$_REQUEST['customer_name'];
		 $data['shift']=$_REQUEST['shift'];
		 $data['machine']=$_REQUEST['machine'];
		 $data['operator']=$_REQUEST['operator'];
		 $data['total_qty']=$_REQUEST['total_qty'];
		 $data['supervisor']=$_REQUEST['supervisor'];
		 $data['raw_mat']=$_REQUEST['raw_mat'];
		 $data['gsm']=$_REQUEST['gsm'];
		 $data['size']=$_REQUEST['size'];
		 $data['no_ups']=$_REQUEST['no_ups'];
		 $data['foil_qty']=$_REQUEST['foil_qty'];
		 $data['foil_color']=$_REQUEST['foil_color'];
		 $data['coating']=$_REQUEST['coating'];
		  $data['coating_code']=$_REQUEST['coating_code'];
		   $data['coating_batch']=$_REQUEST['coating_batch'];
		    $data['coating_manuf']=$_REQUEST['coating_manuf'];
			 $data['text_matter']=$_REQUEST['text_matter'];
			  $data['text_code']=$_REQUEST['text_code'];
			   $data['text_batch']=$_REQUEST['text_batch'];
			    $data['text_manuf']=$_REQUEST['text_manuf'];
				 $data['registration_lab']=$_REQUEST['registration_lab'];
				  $data['foil_shade']=$_REQUEST['foil_shade'];
				   $data['remarks']=$_REQUEST['remarks1'];
				    $data['branch_id']=$_REQUEST['site'];
					
			  
 $inprocess_printing=$s->insertRecord('tbl_inprocess_printing_audit', $data);
 $insertResult = DB_query($inprocess_printing,$db,$ErrMsg); 
		if(!$insertResult)
			{
			  die("Not Inserted".DB_error_msg($db));
			}
			$Lastreq_id=DB_Last_Insert_ID($db,'tbl_inprocess_audit_hotfoil',$ErrMsg);
			if($Lastreq_id!='')
			{
			$data1['parent_id']=$Lastreq_id;	
			$data1['shade_card_date']=FormatDateForSQL($_REQUEST['shade_card_date']);
			$data1['shade_card_time']=$_REQUEST['shade_card_time'];	
			$data1['start_AMPM_shade_card']=$_REQUEST['start_AMPM_shade_card'];	
			$data1['shade_cardr_remarks']=$_REQUEST['shade_cardr_remarks'];	
			$data1['beyond_shade_date']=FormatDateForSQL($_REQUEST['beyond_shade_date']);	
			$data1['beyond_shade_time']=$_REQUEST['beyond_shade_time'];	
			$data1['start_AMPM_beyond_shade']=$_REQUEST['start_AMPM_beyond_shade'];	
			$data1['start_AMPM_beyond_shade_remarks']=$_REQUEST['start_AMPM_beyond_shade_remarks'];	
			$data1['scumming_date']=FormatDateForSQL($_REQUEST['scumming_date']);	
			$data1['scumming_time']=$_REQUEST['scumming_time'];	
			$data1['start_AMPM_scumming']=$_REQUEST['start_AMPM_scumming'];
			$data1['wrinkless_remarks']=$_REQUEST['wrinkless_remarks'];
			$data1['patchy_printing_date']=FormatDateForSQL($_REQUEST['patchy_printing_date']);
			$data1['patchy_printing_time']=$_REQUEST['patchy_printing_time'];
			$data1['start_AMPM_patchy_printing']=$_REQUEST['start_AMPM_patchy_printing'];	
			$data1['patchy_printing_remarks']=$_REQUEST['patchy_printing_remarks'];
			$data1['matter_miss_date']=FormatDateForSQL($_REQUEST['matter_miss_date']);
			$data1['matter_miss_time']=$_REQUEST['matter_miss_time'];
			$data1['start_AMPM_matter_miss']=$_REQUEST['start_AMPM_matter_miss'];
			$data1['matter_miss_remarks']=$_REQUEST['matter_miss_remarks'];				
			$data1['doubing_date']=FormatDateForSQL($_REQUEST['doubing_date']);
			$data1['doubing_time']=$_REQUEST['doubing_time'];
			$data1['start_AMPM_doubing']=$_REQUEST['start_AMPM_doubing'];
			$data1['doubing_remarks']=$_REQUEST['doubing_remarks'];	
			$data1['missreg_date']=FormatDateForSQL($_REQUEST['missreg_date']);
			$data1['missreg_time']=$_REQUEST['missreg_time'];
			$data1['start_AMPM_missreg']=$_REQUEST['start_AMPM_missreg'];
			$data1['missreg_remarks']=$_REQUEST['missreg_remarks'];	
			$data1['puncture_date']=FormatDateForSQL($_REQUEST['puncture_date']);
			$data1['puncture_time']=$_REQUEST['puncture_time'];
			$data1['start_AMPM_puncture']=$_REQUEST['start_AMPM_puncture'];
			$data1['puncture_remarks']=$_REQUEST['puncture_remarks'];				
			$data1['water_date']=FormatDateForSQL($_REQUEST['water_date']);
			$data1['water_time']=$_REQUEST['water_time'];
			$data1['start_AMPM_water']=$_REQUEST['start_AMPM_water'];
			$data1['water_remarks']=$_REQUEST['water_remarks'];	
			$data1['hickies_date']=FormatDateForSQL($_REQUEST['hickies_date']);
			$data1['hickies_time']=$_REQUEST['hickies_time'];
			$data1['start_AMPM_hickiesr']=$_REQUEST['start_AMPM_hickiesr'];
			$data1['hickies_remarks']=$_REQUEST['hickies_remarks'];	
			$data1['scratch_mark_date']=FormatDateForSQL($_REQUEST['scratch_mark_date']);
			$data1['scratch_mark_time']=$_REQUEST['scratch_mark_time'];
			$data1['start_AMPM_scratch_mark']=$_REQUEST['start_AMPM_scratch_mark'];
			$data1['scratch_remarks']=$_REQUEST['scratch_remarks'];				
			$data1['alcohal_date']=FormatDateForSQL($_REQUEST['alcohal_date']);
			$data1['alcohal_time']=$_REQUEST['alcohal_time'];
			$data1['start_AMPM_alcohal']=$_REQUEST['start_AMPM_alcohal'];
			$data1['alcohal_remarks']=$_REQUEST['alcohal_remarks'];	
			$data1['tape_date']=FormatDateForSQL($_REQUEST['tape_date']);
			$data1['tape_time']=$_REQUEST['tape_time'];
			$data1['start_AMPM_tape']=$_REQUEST['start_AMPM_tape'];
			$data1['tape_remarks']=$_REQUEST['tape_remarks'];				
			$data1['curing_date']=FormatDateForSQL($_REQUEST['curing_date']);
			$data1['curing_time']=$_REQUEST['curing_time'];
			$data1['start_AMPM_curing']=$_REQUEST['start_AMPM_curing'];
			$data1['curing_remarks']=$_REQUEST['curing_remarks'];	
			$data1['heater_date']=FormatDateForSQL($_REQUEST['heater_date']);
			$data1['heater_time']=$_REQUEST['heater_time'];
			$data1['start_AMPM_heater']=$_REQUEST['start_AMPM_heater'];
			$data1['heater_remarks']=$_REQUEST['heater_remarks'];			
			$data1['foil_date']=FormatDateForSQL($_REQUEST['foil_date']);
			$data1['foil_time']=$_REQUEST['foil_time'];
			$data1['start_AMPM_foil']=$_REQUEST['start_AMPM_foil'];
			$data1['foil_remarks']=$_REQUEST['foil_remarks'];	
			$data1['dyne_date']=FormatDateForSQL($_REQUEST['dyne_date']);
			$data1['dyne_time']=$_REQUEST['dyne_time'];
			$data1['start_AMPM_dyne']=$_REQUEST['start_AMPM_dyne'];
			$data1['dyne_remarks']=$_REQUEST['dyne_remarks'];			
			$data1['printing_date']=FormatDateForSQL($_REQUEST['printing_date']);
			$data1['printing_time']=$_REQUEST['printing_time'];
			$data1['start_AMPM_printing']=$_REQUEST['start_AMPM_printing'];
			$data1['printing_remarks']=$_REQUEST['printing_remarks'];	
					
			
			
			$insert_data=$s->insertRecord('tbl_inprocess_printing_audit_details', $data1);
			$insertResult = DB_query($insert_data,$db,$ErrMsg);
			}
$s->pageLocation('index.php?route=view_process_printing&modid='.$_REQUEST['modid'].'&frmid='.$_REQUEST['frmid'].$rurl);
 }
 
 
?>

<form action="" method="post" >
<p align="center"><strong><h2 align="center">In Process Audit Report For Printing</h2></strong></p>
<br>
<table width="70%">	
<?php if(count($msgErr)>0){?>
   <tr>
   <td colspan="4"><?php
   for($i=0;$i<count($msgErr);$i++)
   {
     echo "<div class='error'>".$msgErr[$i].'</div>';
   }
    ?></td>
   </tr>
   <?php } ?>	
	</table>
<p align="center"><strong>Branch:</strong>
	 <?php
 		$sql = 'SELECT loccode, locationname FROM locations';
	 	$resultStkLocs = DB_query($sql,$db);
		?>
	<select name="site" style="width:100px" onchange="getdata(this.value);" >
	<option value="000">Select</option>
      <?php    
			while ($myrow=DB_fetch_array($resultStkLocs))
				{
				?>
      <option value="<?php echo $myrow['loccode']; ?>"><?php echo $myrow['locationname'];?></option>
      <?php  }	?> 
    </select></p>
   
<p align="left"><strong>General Details</strong></p>
<table width="100%" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr>
        <td nowrap="nowrap" colspan="2" width="50%" valign="top">
        <div id="enquiryId" style="width:100%; margin:0 auto;">
            <table width="100%" cellpadding="2" cellspacing="1" border="0">
            	<tr>
                 <th align="left" width="24%"><strong>Printing Slip No.</strong></th>
                    <td width="27%" id="hotfoil"><input type="text"  name="printing_slip_no" id="printing_slip_no" style="width:100%"  >                    	
                    	</td>
                    	<th align="left" width="20%"><strong>Job Card  No.</strong></th>
                     <td width="27%" id="vouchar"><select  name="job_ticket" id="job_ticket" style="width:100%" onchange="getdata1(this.value);" >
                    	<option value="0">Select</option> 
                    	<?php
                    	$sql=DB_query("select * from job_route_card",$db);
						while($row=DB_fetch_array($sql))
						{ 
                    	?>
                    	<option value="<?php echo $row['id']; ?>"><?php echo $row['job_card_no']; ?></option>
                    	<?php } ?></select>                   	
                    	                    	</td>
      </tr>
            	<tr>
                 <th align="left" width="24%"><strong>Date.</strong></th>
                   <td><input type="text" id="date" name="date" style="width:100%;" class="datepicker"/>
                     </td> 
                    	<th align="left" width="20%"><strong>Item Name..</strong></th>
                     <td><input type="text" id="item" name="item" style="width:100%;"/>
                     </td>
      </tr>
            	<tr>
                 <th align="left" width="24%"><strong>Customer</strong></th>
                    <td width="27%" id="vouchar"><input type="text" name="customer_name" style="width:100%;" id="customer_name"/></td>
                    	<th align="left" width="20%"><strong>Shift</strong></th>
                     <td><input type="text" name="shift" style="width:100%" id="shift">            	                 	
                       	
                     </td>
       </tr>
       <tr>
       	<th align="left" width="24%"><strong>Machine</strong></th>
        <td width="27%" id="vouchar"><input type="text" name="machine" id="machine" style="width:100%"></td>
        <th align="left" width="20%"><strong>Operator</strong></th>
        <td ><input type="text" name="operator" style="width:100%" id="operator" >
       </tr>
       <tr>
       	<th align="left" width="24%"><strong>Total Qty</strong></th>
        <td width="27%" id="vouchar"><input type="text" name="total_qty" id="total_qty" style="width:100%"></td>
        <th align="left" width="20%"><strong>Supervisor</strong></th>
        <td ><input type="text" name="supervisor" style="width:100%" id="supervisor" >
       </tr>
      </table></div></td>
      </tr> 
      <tr><td>&nbsp;</td></tr>
   
   <tr><td><p align="left"><strong> INITIAL CHECK POINT </strong></p>
                    <table width="100%" cellpadding="2" cellspacing="1" border="0">
                 <tr>
                 	
        <th align="left"  ><strong>Type of Raw material being used is as per job card</strong></th>
        <td><table  border="0">
        	
                    <tr><td >&nbsp;</td><th >Yes</th><td ><input type="radio" name="raw_mat" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="raw_mat" value="No" /></td>
                         <td></td><td></td></tr>		
                    </table></td>
     </tr>
     <tr>
     
        <th align="left" ><strong>GSM as per Job Card(5%):</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="gsm" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="gsm" value="No" /></td>	
                           <th>Actual</th><td><input type="text" name="gsm_actual" /></td> </tr>         	
                    </table></td>
      </tr>
      <tr>
     	
        <th align="left" ><strong>Size as per job card(2mm)</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="size" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="size" value="No" /></td>
                          <th>Actual</th><td><input type="text" name="size_actual" /></td> <td></td> <td></td> <td></td> <td></td> 
                              </tr>	  	
                    </table></td>
      </tr>
      <tr>
     	
        <th align="left" ><strong>No of Ups</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="no_ups" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="no_ups" value="No" /></td>
                          <td></td><td></td><td></td> <td></td> <td></td> <td></td>  
                              </tr>	  	
                    </table></td>
      </tr>
      <tr>
     
        <th align="left" ><strong>Foil Quality</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="foil_qty" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="foil_qty" value="No" /></td>
                          <th>Gold</th><td ><input type="radio" name="foil_color" value="Gold" /><th>Silver</th>
                          	<td ><input type="radio" name="foil_color" value="Silver" />
                          		<th>Both</th><td ><input type="radio" name="foil_color" value="silver/gold" /></td>
                          			<th>other</th><td ><input type="radio" name="foil_color" value="other" /> </td>
                              </tr>	  	
                    </table></td>
      </tr>
      
      <tr>
     	
        <th align="left" ><strong>Coating Used</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="coating" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="coating" value="No" /></td>
                          <th>Code</th><td ><input type="text" name="coating_code"  /><th>Batch No</th>
                          	<td ><input type="radio" name="coating_batch"  /></td>
                          		<th>Manufactured</th><td ><input type="text" name="coating_manuf"  /></td>
                          			<td></td><td > </td>
                              </tr>	  	
                    </table></td>
      </tr>
      <tr>
     	
        <th align="left" ><strong>Text matter as per customer approved/in house approved PDF</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="text_matter" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="text_matter" value="No" /></td>
                          <th>Code</th><td ><input type="text" name="text_code"  /></td><th>Batch No</th>
                          <td ><input type="radio" name="text_batch"  /></td>
                          		<th>Manufactured</th><td ><input type="text" name="text_manuf"  /></td>
                          	
                          			<td></td><td > </td>
                              </tr>	  	
                    </table></td>
      </tr>
      <tr>
     	
        <th align="left" ><strong>Registration of all labels perfectly in all up</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="registration_lab" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="registration_lab" value="No" /></td>
                          <td></td><td ></td><td></td>
                          	</td><td >
                          			<td></td><td > </td>
                              </tr>	  	
                    </table></td>
      </tr>
      <tr>
     
        <th align="left" ><strong>Foil Shade as per sample</strong></th>
        <td><table  border="0">
                    <tr><td>&nbsp;</td><th >Yes</th><td ><input type="radio" name="foil_shade" value="Yes" /></td>
                    	<th >No</th><td ><input type="radio" name="foil_shade" value="No" /></td>
                          <td></td><td ></td><td></td>
                          	</td><td >
                          			<td></td><td > </td>
                              </tr>	  	
                    </table></td>
      </tr>
                    
                 </table></td></tr>
                <tr><td>&nbsp;</td></tr>
                <tr><td> <p align="center"><strong>Check Point Details</strong></p>
                 
            <table width="100%" cellpadding="2" cellspacing="1" border="0" align="center" >
            <tr>
            	
          <th width="24%" align="left" class="text">Check Point</th>
          <th width="27%" align="left" valign="top">Observations</th>          
          <th  align="left" width="65%">Remarks</th>
          <td align="left" valign="top"></td>
          </tr>  
           <tr>
          	<td><strong>Shade with in shade card range</stong></td><td>
          	<table border="0">
          	<tr><td><input type="text" class="datepicker" name="shade_card_date" /></td>
          	<td><input type="text"  name="shade_card_time" value="<?php echo $timestamp; ?>" /></td>
          	<td><select name="start_AMPM_shade_card" id="start_AMPM_shade_card" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_shade_cardr']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_shade_cardr']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>	
          	</td><td width="65%"><textarea style="width:100%" name="shade_cardr_remarks"></textarea></td>
          </tr>     
          <tr>
          	<td><strong> Shade is beyond the shade card</strong></td><td>
          	<table border="0">
          	<tr><td><input type="text" class="datepicker" name="beyond_shade_date" /></td>
          		<td><input type="text"  name="beyond_shade_time" value="<?php echo $timestamp; ?>" /></td>
          	<td><select name="start_AMPM_beyond_shade" id="start_AMPM_beyond_shade" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_beyond_shade']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_beyond_shade']=='PM'?'selected':'')?>>PM</option>
	 </select></td>	
          		
          	</tr>	
          	</table>	
          	</td><td width="65%"><textarea style="width:100%" name="start_AMPM_beyond_shade_remarks"></textarea></td>
          </tr>     
          <tr>
          	<td><strong>Scumming</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="scumming_date" /></td>
          		<td><input type="text" name="scumming_time" value="<?php echo $timestamp; ?>"  /></td>
          		<td><select name="start_AMPM_scumming" id="start_AMPM_scumming" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_scumming']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_scumming']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>	
          		
          	</td><td width="65%"><textarea style="width:100%" name="wrinkless_remarks"></textarea></td>
          </tr>     
          <tr>
          	<td><strong>Patchy Printing/Coating</strong></td><td>
          	<table border="0">
          	<tr><td><input type="text" class="datepicker"  name="patchy_printing_date"/></td>
          		<td><input type="text"  name="patchy_printing_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_patchy_printing" id="start_AMPM_patchy_printing" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_patchy_printing']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_patchy_printing']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>	
          	</td><td width="65%"><textarea style="width:100%" name="patchy_printing_remarks"></textarea></td>
          </tr>     
          <tr>
          	<td><strong>Matter Miss & Cut</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="matter_miss_date" /></td>
          		<td><input type="text"  name="matter_miss_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_matter_miss" id="start_AMPM_matter_miss" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_matter_miss']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_matter_miss']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="matter_miss_remarks"></textarea></td>
          </tr>   
          
            <tr>
          	<td><strong>Doubing</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="doubing_date" /></td>
          		<td><input type="text"  name="doubing_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_doubing" id="start_AMPM_doubing" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_doubing']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_doubing']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="doubing_remarks"></textarea></td>
          </tr>    
          <tr>
          	<td><strong>Missregistration</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="missreg_date" /></td>
          		<td><input type="text"  name="missreg_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_missreg" id="start_AMPM_missreg" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_missreg']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_missreg']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="missreg_remarks"></textarea></td>
          </tr>   
           <tr>
          	<td><strong>Puncture in any color or varnish</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="puncture_date" /></td>
          		<td><input type="text"  name="puncture_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_puncture" id="start_AMPM_puncture" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_puncture']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_puncture']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="puncture_remarks"></textarea></td>
          </tr>   
           <tr>
          	<td><strong>Water/Oil drop</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="water_date" /></td>
          		<td><input type="text"  name="water_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_water" id="start_AMPM_water" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_water']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_water']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="water_remarks"></textarea></td>
          </tr>   
             <tr>
          	<td><strong>Hickies/Spots</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="hickies_date" /></td>
          		<td><input type="text"  name="hickies_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_hickiesr" id="start_AMPM_hickies" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_hickies']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_hickies']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="hickies_remarks"></textarea></td>
          </tr>   
          <tr>
          	<td><strong>Scratch mark/Line mark</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="scratch_mark_date" /></td>
          		<td><input type="text"  name="scratch_mark_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_scratch_mark" id="start_AMPM_scratch_mark" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_scratch_mark']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_scratch_mark']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="scratch_remarks"></textarea></td>
          </tr>   
          <tr>
          	<td><strong>Alcohal Test</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="alcohal_date" /></td>
          		<td><input type="text"  name="alcohal_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_alcohal" id="start_AMPM_alcohal" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_alcohal']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_alcohal']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="alcohal_remarks"></textarea></td>
          </tr>   
           <tr>
          	<td><strong>Tape Test</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="tape_date" /></td>
          		<td><input type="text"  name="tape_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_tape" id="start_AMPM_tape" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_tape']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_tape']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="tape_remarks"></textarea></td>
          </tr>   
          <tr>
          	<td><strong>Curing Speed</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="curing_date" /></td>
          		<td><input type="text"  name="curing_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_curing" id="start_AMPM_curing" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_curing']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_curing']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="curing_remarks"></textarea></td>
          </tr>   
          <tr>
          	<td><strong>Heater on in all sticker's job</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="heater_date" /></td>
          		<td><input type="text"  name="heater_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_heater" id="start_AMPM_heater" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_heater']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_heater']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="heater_remarks"></textarea></td>
          </tr>   
           <tr>
          	<td><strong>Foil Temperature & speed</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="foil_date" /></td>
          		<td><input type="text"  name="foil_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_foil" id="start_AMPM_foil" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_foil']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_foil']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="foil_remarks"></textarea></td>
          </tr>   
           <tr>
          	<td><strong>Dyne Value</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="dyne_date" /></td>
          		<td><input type="text"  name="dyne_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_dyne" id="start_AMPM_dyne" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_dyne']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_dyne']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="dyne_remarks"></textarea></td>
          </tr>   
          <tr>
          	<td><strong>Printing Counter at checking time</strong></td><td>
          	<table border="0">
          		
          	<tr><td><input type="text" class="datepicker" name="printing_date" /></td>
          		<td><input type="text"  name="printing_time" value="<?php echo $timestamp; ?>" /></td>
          		<td><select name="start_AMPM_printing" id="start_AMPM_printing" style="width:40px">
	 <option value="AM"<?php echo ($_REQUEST['start_AMPM_printing']=='AM'?'selected':'')?>>AM</option>
	 <option value="PM"<?php echo ($_REQUEST['start_AMPM_printing']=='PM'?'selected':'')?>>PM</option>
	 </select></td>
          	</tr>	
          	</table>
          	</td><td width="65%"><textarea style="width:100%" name="printing_remarks"></textarea></td>
          </tr>   
                </table></td></tr>
                 <tr><td><table width="100%" cellpadding="2" cellspacing="1" border="0">
                <tr>
                 <th align="left" colspan="2" width="25%"><strong>Remarks</strong></th>
                    <td colspan="2" width="75%"><textarea name="remarks1" style="width:100%" ></textarea>
                    	</td>
                   
                </tr> </table></td></tr>
             </table>
						<p align="center"><input type="submit" name="Save" value="Save" /></p>				

</form>
<script language="JavaScript"> 
 function getdata1(str)
{
var xmlhttp;
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
	 var data=xmlhttp.responseText.split("__");	
		document.getElementById("customer_name").value=data[1];
	document.getElementById("shift").value=data[4];
	document.getElementById("machine").value=data[2];
	document.getElementById("operator").value=data[3];
	document.getElementById("item").value=data[0];	
    }
  }
  xmlhttp.open("GET","get_inprocess_audit.php?site="+str,true);
xmlhttp.send();
//xmlhttp.open("GET","getSort.php?s="+str+"&cat="+cat,true);
}
function getdata(str12) 
{	 
	
if (str12.length==0)
  {
  document.getElementById("hotfoil").innerHTML="";
 
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("hotfoil").innerHTML=xmlhttp.responseText;
      }
  }
 
xmlhttp.open("GET","get_entryslip_jobcard.php?site12="+str12,true);
xmlhttp.send();
}




</script>
