<?php 
ob_start();
session_start();
require_once("../conn/conn.php");
//include('../utility/chksession.php');
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>Invoice - Ace Admin</title>

		<meta name="description" content="" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<!-- bootstrap & fontawesome -->
		<link rel="stylesheet" href="../assets/css/bootstrap.min.css" />
		<link rel="stylesheet" href="../assets/font-awesome/4.5.0/css/font-awesome.min.css" />

		<!-- page specific plugin styles -->

		<!-- text fonts -->
		<link rel="stylesheet" href="../assets/css/fonts.googleapis.com.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="../assets/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet" />
		<![endif]-->
		<link rel="stylesheet" href="../assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="../assets/css/ace-rtl.min.css" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->

		<!-- inline styles related to this page -->

		<!-- ace settings handler -->
		<script src="../assets/js/ace-extra.min.js"></script>

		<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

		<!--[if lte IE 8]>
		<script src="assets/js/html5shiv.min.js"></script>
		<script src="assets/js/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="no-skin">
		
		<div class="main-container ace-save-state" id="main-container">
			<script type="text/javascript">
				try{ace.settings.loadState('main-container')}catch(e){}
			</script>


			<div class="main-content">
				<div class="main-content-inner">
					
					<div class="page-content">
						<div class="ace-settings-container" id="ace-settings-container">
							

							<div class="ace-settings-box clearfix" id="ace-settings-box">
								<div class="pull-left width-50">
									<div class="ace-settings-item">
										<div class="pull-left">
											<select id="skin-colorpicker" class="hide">
												<option data-skin="no-skin" value="#438EB9">#438EB9</option>
												<option data-skin="skin-1" value="#222A2D">#222A2D</option>
												<option data-skin="skin-2" value="#C6487E">#C6487E</option>
												<option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
											</select>
										</div>
										<span>&nbsp; Choose Skin</span>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2 ace-save-state" id="ace-settings-navbar" autocomplete="off" />
										<label class="lbl" for="ace-settings-navbar"> Fixed Navbar</label>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2 ace-save-state" id="ace-settings-sidebar" autocomplete="off" />
										<label class="lbl" for="ace-settings-sidebar"> Fixed Sidebar</label>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2 ace-save-state" id="ace-settings-breadcrumbs" autocomplete="off" />
										<label class="lbl" for="ace-settings-breadcrumbs"> Fixed Breadcrumbs</label>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-rtl" autocomplete="off" />
										<label class="lbl" for="ace-settings-rtl"> Right To Left (rtl)</label>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2 ace-save-state" id="ace-settings-add-container" autocomplete="off" />
										<label class="lbl" for="ace-settings-add-container">
											Inside
											<b>.container</b>
										</label>
									</div>
								</div><!-- /.pull-left -->

								<div class="pull-left width-50">
									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-hover" autocomplete="off" />
										<label class="lbl" for="ace-settings-hover"> Submenu on Hover</label>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-compact" autocomplete="off" />
										<label class="lbl" for="ace-settings-compact"> Compact Sidebar</label>
									</div>

									<div class="ace-settings-item">
										<input type="checkbox" class="ace ace-checkbox-2" id="ace-settings-highlight" autocomplete="off" />
										<label class="lbl" for="ace-settings-highlight"> Alt. Active Item</label>
									</div>
								</div><!-- /.pull-left -->
							</div><!-- /.ace-settings-box -->
						</div><!-- /.ace-settings-container -->

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="space-6"></div>

								<div class="row">
									<div class="col-sm-10 col-sm-offset-1">
										<div class="widget-box transparent">
											<div class="widget-header widget-header-large">
												<h3 class="widget-title grey lighter">
                                                แบบฟอร์ม In/Just in/Out
												</h3>

												<div class="widget-toolbar no-border invoice-info">
													<span>หมายเลขเอกสาร :</span>
													<span>FM-QA-SS-010</span>

													<br />
													<span>แก้ไขครั้งที่ : </span>
													<span>00/2017</span>

                                                    <br />
													<span>วันที่มีผลบังคับใช้ : </span>
													<span>17/07/2017</span>
												</div>

											
											</div>

											<div class="widget-body">
									
                                                <?php
										$rsub_id = $_REQUEST['rsub_id'];
									    //echo $rsub_id;

                                        $strSQLc = "SELECT * FROM qc_resultinout
                                        where rsub_id='$rsub_id'";									
                                        $objQueryc = mysqli_query($con,$strSQLc); 
                                        $objResultc = mysqli_fetch_array($objQueryc);
                                        
                                        $Item_id=$objResultc['Item_id'];
                                        $Cli_code=$objResultc['Cli_code'];
                                        $per_id=$objResultc['per_id'];
                                        


                                        $strSQL1 = "SELECT * FROM qc_resultinout,qc_resultinsub,qc_topic 
                                        where qc_resultinout.Item_id=qc_resultinsub.Item_id
                                        and qc_resultinout.Cli_code=qc_resultinsub.Cli_code
                                        and qc_resultinsub.Topic_id=qc_topic.Topic_id
                                        and qc_resultinsub.Item_id='$Item_id'
                                        and qc_resultinsub.cli_code='$Cli_code'
                                        and qc_resultinsub.per_id='$per_id'";									
                                        $objQuery1 = mysqli_query($con,$strSQL1); 
                                        $objResult1 = mysqli_fetch_array($objQuery1);


										$strSQL = "SELECT * FROM qc_resultinsub,qc_topic 
                                        where qc_resultinsub.Topic_id=qc_topic.Topic_id
                                         and qc_resultinsub.Item_id='$Item_id'
                                        and qc_resultinsub.cli_code='$Cli_code'
                                        and qc_resultinsub.per_id='$per_id'";								
                                        $objQuery = mysqli_query($con,$strSQL);  
									    ?></br>
									    </br>

										 
										   <table  width='100%'>
                                       <tr>
                                           <td><?php echo  "ผู้ประเมิน : ".$objResult1['per_id'];?></td>
                                           <td></td>
                                           <td align='right'><?php echo  "วันที่ประเมิน : ".$objResult1['result_daterecode'];?></td>
                                       </tr>
                                       <tr>
                                           <td><?php echo  " Item : ".$objResult1['Item_id'];?></td>
                                           <td></td>
                                           <td></td>
                                       </tr>
                                       </table>
                                       <p></p>
														<table class="table table-striped table-bordered" width='100%'>
															<thead>
																<tr>
																	<th class="center">lot number</th>
																	<th>หัวข้อการประเมิน </th>
																	<th class="hidden-xs">ผลการประเมิน</th>
																</tr>
															</thead>

															<tbody>
                                                            <?php
                                               
													        while($objResult = mysqli_fetch_array($objQuery)){
													        ?>
																<tr>
																	<td width="150" class="center"><?=$objResult['Cli_code'];  ?></td>
																	<td width="200"><?=$objResult['Topic_name']; ?></td>
                                                                    <td width="100" align='center'><?=$objResult['result']; ?></td>

																</tr>
                                                            <?php
                                                                }
                                                               // }
                                                            ?>
															</tbody>
														</table>
														<?php
														
												
													    echo "Comment  : ".$objResult1['result_note']; ?>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>

								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->


			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script src="../assets/js/jquery-2.1.4.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="../assets/js/bootstrap.min.js"></script>

		<!-- page specific plugin scripts -->

		<!-- ace scripts -->
		<script src="../assets/js/ace-elements.min.js"></script>
		<script src="../assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->
	</body>
</html>
