HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/xampp/htdocs/FograCT1/pbnTAC28.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>G7 GV Check</title>
<style type="text/css">
body,td,th {
	font-size: 12px;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.ssss {
	font-size: 12px;
	color: #F00;
	border-top-width: 0px;
	border-right-width: 0px;
	border-bottom-width: 0px;
	border-left-width: 0px;
	border-top-style: 0;
	border-right-style: 0;
	border-bottom-style: 0;
	border-left-style: 0;
}
.z {
	color: #CCC;
}
.SS {
	color: #F00;
}
<!--
body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #ffffff;
	margin: 0; /* 比較好的做法是將 Body 元素的邊界與欄位間隔調整為零,以處理不同的瀏覽器預設值 */
	padding: 0;
	text-align: center; /* 這樣會讓容器在 IE 5* 瀏覽器內置中對齊。然後,文字會在 #container 選取器中設定為靠左對齊預設值 */
	color: #000000;
}
.oneColElsCtr #container {
	width: 46em;
	background: #FFFFFF;
	margin: 0 auto; /* 自動邊界 (搭配寬度) 會讓頁面置中對齊 */
	border: 0px solid #000000;
	text-align: left; /* 這樣做會覆寫 Body 元素上的 text-align: center。 */
}
.oneColElsCtr #mainContent {
	padding: 0 20px; /* 請記住,欄位間隔就是 Div 方塊內部的空間,而邊界就是 Div 方塊外部的空間 */
}aph
-->
</style></head>


<body class="oneColElsCtr">

<?php
error_reporting(0);
$f123= $_GET['f123'];
$f321= $_GET['f321'];
$sum=160;
$check=1;
$sccSt=$_GET['sccSt'];
$stTV=0;
$stFail=0;
$company=$_GET['company'];
$dtime=time();
$dStr=substr($dtime,7,9)."-";



include 'sp38XYZ.php';
include 'lab2xyz.php';
include 'SCCA06.php';
include 'xyz2lab01.php';
include 'xyz2lab.php';
include 'de00.php';
include 'DensityV38.php';
include 'SCCA51.php';
include 'invert.php';


     // echo "Stored in: " . "upload/" . $_FILES["file"]["name"]. "<br />";
	  
	  ///parsing start
	  	  $filedb=substr($f321,8,60);
		  $filedb2=substr($f321,7,60);
	  $dbstr=explode("_", $filedb);
echo "fuleb:".$filedb2."<br>";
	  $filename=$filedb2;
	  		 // $filedb2=substr($filedb,7);
	  $po=$dbstr[1];

	  
	  
	  $contents = file($f321);
		$string = implode($contents);
		////echo $contents[20]; 
		//echo $string; 
$snstring=get_between($string,"Serial number ","_CREATED");
echo "sn:".$snstring;
$dotS = explode(",", $snstring);////Measure upload
//print_r ($dotS);
$snstring=$dotS[0];

//ctcounter($company,$myip,$area,$country,$snstring,'CT60');		
		
		

//$p = str_replace("\n", '\t', $p);
//echo $p;
function get_between ($text, $s1, $s2) {
$mid_url = "";
$pos_s = strrpos($text,$s1);
$pos_e = strrpos($text,$s2);
for ( $i=$pos_s+strlen($s1) ; (( $i<($pos_e)) && $i < strlen($text)) ; $i++ ) {
$mid_url .= $text[$i];
}
return $mid_url;
}

		$nm380 = strrpos($string,'nm380');
		//echo "<br>nm380:".$nm380."<br>";








//$pt = ereg_replace("\r\n?", "\t", $string);
$pt = str_replace("	\r", "\r", $string);
$pt = str_replace("\r", "	", $pt);

$datastring=get_between($string,"BEGIN_DATA","END_DATA");



$dot = explode("_", $datastring);

print_r($dot);

////////////////////////////////////////////////////KK

	
	$Pdm=0;
$idx=10;	
$cols=46;
	echo "paper den=".$Pdm;

	$i=0;
	for ($Pdot=0;$Pdot<=27;$Pdot+=1) {
	$i=$i+1;
	//echo "<br>num:";
	//echo "dot:".$dot[$idx+$cols*$Pdot];
	${"K".$i."Xm"}=sp38XYZ("X",$dot[$idx+$cols*$Pdot],$dot[$idx+$cols*$Pdot+1],$dot[$idx+$cols*$Pdot+2],$dot[$idx+$cols*$Pdot+3],$dot[$idx+$cols*$Pdot+4],$dot[$idx+$cols*$Pdot+5],$dot[$idx+$cols*$Pdot+6],$dot[$idx+$cols*$Pdot+7],$dot[$idx+$cols*$Pdot+8],$dot[$idx+$cols*$Pdot+9],$dot[$idx+$cols*$Pdot+10],$dot[$idx+$cols*$Pdot+11],$dot[$idx+$cols*$Pdot+12],$dot[$idx+$cols*$Pdot+13],$dot[$idx+$cols*$Pdot+14],$dot[$idx+$cols*$Pdot+15],$dot[$idx+$cols*$Pdot+16],$dot[$idx+$cols*$Pdot+17],$dot[$idx+$cols*$Pdot+18],$dot[$idx+$cols*$Pdot+19],$dot[$idx+$cols*$Pdot+20],$dot[$idx+$cols*$Pdot+21],$dot[$idx+$cols*$Pdot+22],$dot[$idx+$cols*$Pdot+23],$dot[$idx+$cols*$Pdot+24],$dot[$idx+$cols*$Pdot+25],$dot[$idx+$cols*$Pdot+26],$dot[$idx+$cols*$Pdot+27],$dot[$idx+$cols*$Pdot+28],$dot[$idx+$cols*$Pdot+29],$dot[$idx+$cols*$Pdot+30],$dot[$idx+$cols*$Pdot+31],$dot[$idx+$cols*$Pdot+32],$dot[$idx+$cols*$Pdot+33],$dot[$idx+$cols*$Pdot+34],$dot[$idx+$cols*$Pdot+35]);

	${"K".$i."Ym"}=sp38XYZ("Y",$dot[$idx+$cols*$Pdot],$dot[$idx+$cols*$Pdot+1],$dot[$idx+$cols*$Pdot+2],$dot[$idx+$cols*$Pdot+3],$dot[$idx+$cols*$Pdot+4],$dot[$idx+$cols*$Pdot+5],$dot[$idx+$cols*$Pdot+6],$dot[$idx+$cols*$Pdot+7],$dot[$idx+$cols*$Pdot+8],$dot[$idx+$cols*$Pdot+9],$dot[$idx+$cols*$Pdot+10],$dot[$idx+$cols*$Pdot+11],$dot[$idx+$cols*$Pdot+12],$dot[$idx+$cols*$Pdot+13],$dot[$idx+$cols*$Pdot+14],$dot[$idx+$cols*$Pdot+15],$dot[$idx+$cols*$Pdot+16],$dot[$idx+$cols*$Pdot+17],$dot[$idx+$cols*$Pdot+18],$dot[$idx+$cols*$Pdot+19],$dot[$idx+$cols*$Pdot+20],$dot[$idx+$cols*$Pdot+21],$dot[$idx+$cols*$Pdot+22],$dot[$idx+$cols*$Pdot+23],$dot[$idx+$cols*$Pdot+24],$dot[$idx+$cols*$Pdot+25],$dot[$idx+$cols*$Pdot+26],$dot[$idx+$cols*$Pdot+27],$dot[$idx+$cols*$Pdot+28],$dot[$idx+$cols*$Pdot+29],$dot[$idx+$cols*$Pdot+30],$dot[$idx+$cols*$Pdot+31],$dot[$idx+$cols*$Pdot+32],$dot[$idx+$cols*$Pdot+33],$dot[$idx+$cols*$Pdot+34],$dot[$idx+$cols*$Pdot+35]);

	${"K".$i."Zm"}=sp38XYZ("Z",$dot[$idx+$cols*$Pdot],$dot[$idx+$cols*$Pdot+1],$dot[$idx+$cols*$Pdot+2],$dot[$idx+$cols*$Pdot+3],$dot[$idx+$cols*$Pdot+4],$dot[$idx+$cols*$Pdot+5],$dot[$idx+$cols*$Pdot+6],$dot[$idx+$cols*$Pdot+7],$dot[$idx+$cols*$Pdot+8],$dot[$idx+$cols*$Pdot+9],$dot[$idx+$cols*$Pdot+10],$dot[$idx+$cols*$Pdot+11],$dot[$idx+$cols*$Pdot+12],$dot[$idx+$cols*$Pdot+13],$dot[$idx+$cols*$Pdot+14],$dot[$idx+$cols*$Pdot+15],$dot[$idx+$cols*$Pdot+16],$dot[$idx+$cols*$Pdot+17],$dot[$idx+$cols*$Pdot+18],$dot[$idx+$cols*$Pdot+19],$dot[$idx+$cols*$Pdot+20],$dot[$idx+$cols*$Pdot+21],$dot[$idx+$cols*$Pdot+22],$dot[$idx+$cols*$Pdot+23],$dot[$idx+$cols*$Pdot+24],$dot[$idx+$cols*$Pdot+25],$dot[$idx+$cols*$Pdot+26],$dot[$idx+$cols*$Pdot+27],$dot[$idx+$cols*$Pdot+28],$dot[$idx+$cols*$Pdot+29],$dot[$idx+$cols*$Pdot+30],$dot[$idx+$cols*$Pdot+31],$dot[$idx+$cols*$Pdot+32],$dot[$idx+$cols*$Pdot+33],$dot[$idx+$cols*$Pdot+34],$dot[$idx+$cols*$Pdot+35]);

	${"K".$i."Lm"}=xyz2lab01("l",${"K".$i."Xm"},${"K".$i."Ym"},${"K".$i."Zm"});
	${"K".$i."am"}=xyz2lab01("a",${"K".$i."Xm"},${"K".$i."Ym"},${"K".$i."Zm"});
	${"K".$i."bm"}=xyz2lab01("b",${"K".$i."Xm"},${"K".$i."Ym"},${"K".$i."Zm"});
	
	${"K".$i."dm"}=DensitySp38("K",$dot[$idx+$cols*$Pdot],$dot[$idx+$cols*$Pdot+1],$dot[$idx+$cols*$Pdot+2],$dot[$idx+$cols*$Pdot+3],$dot[$idx+$cols*$Pdot+4],$dot[$idx+$cols*$Pdot+5],$dot[$idx+$cols*$Pdot+6],$dot[$idx+$cols*$Pdot+7],$dot[$idx+$cols*$Pdot+8],$dot[$idx+$cols*$Pdot+9],$dot[$idx+$cols*$Pdot+10],$dot[$idx+$cols*$Pdot+11],$dot[$idx+$cols*$Pdot+12],$dot[$idx+$cols*$Pdot+13],$dot[$idx+$cols*$Pdot+14],$dot[$idx+$cols*$Pdot+15],$dot[$idx+$cols*$Pdot+16],$dot[$idx+$cols*$Pdot+17],$dot[$idx+$cols*$Pdot+18],$dot[$idx+$cols*$Pdot+19],$dot[$idx+$cols*$Pdot+20],$dot[$idx+$cols*$Pdot+21],$dot[$idx+$cols*$Pdot+22],$dot[$idx+$cols*$Pdot+23],$dot[$idx+$cols*$Pdot+24],$dot[$idx+$cols*$Pdot+25],$dot[$idx+$cols*$Pdot+26],$dot[$idx+$cols*$Pdot+27],$dot[$idx+$cols*$Pdot+28],$dot[$idx+$cols*$Pdot+29],$dot[$idx+$cols*$Pdot+30],$dot[$idx+$cols*$Pdot+31],$dot[$idx+$cols*$Pdot+32],$dot[$idx+$cols*$Pdot+33],$dot[$idx+$cols*$Pdot+34],$dot[$idx+$cols*$Pdot+35]);

	${'KTV'.$i}= (($PYm-${"K".$i."Ym"})/($PYm-$K100Ym))*100;   
  //  echo "<br>KTV".$i.":".(${'KTV'.$i}-$i);

	echo "<br>Lab:".$i."_:".${"K".$i."Lm"}.",".${"K".$i."am"}.",".${"K".$i."bm"}."T den=".${"K".$i."dm"};	
	}
	
	
	
////////////////////////////////////////////////KK

?>


 

 
 
 
<table width="200" border="1" align="center">
<tr>
  <td><div align="center">主色</div></td>
  <td><font color="#aaaaaa">1</font></td>
  <td><font color="#aaaaaa">2</font></td>
  <td><font color="#aaaaaa">3</font></td>
  <td><font color="#aaaaaa">4</font></td>
  <td><font color="#aaaaaa">5</font></td>
  <td><font color="#aaaaaa">6</font></td>
  <td><font color="#aaaaaa">7</font></td>
  <td><font color="#aaaaaa">8</font></td>
  <td><font color="#666666">9</font></td>
  <td><font color="#666666">10</font></td>
  <td><font color="#666666">11</font></td>
  <td><font color="#666666">12</font></td>
  <td><font color="#666666">13</font></td>
  <td><font color="#666666">14</font></td>
  <td><font color="#666666">15</font></td>
  <td><font color="#666666">16</font></td>
  <td>17</td>
  <td>18</td>
  <td>19</td>
  <td>20</td>
  <td>21</td>
  <td>22</td>
  <td>23</td>
  <td>24</td>
  <td>25</td>
    <td>26</td>
  <td>27</td>
  <td>28</td>
</tr>

<tr>
  <td bgcolor="#CCCCCC"><div align="center">K</div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K1dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K2dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K3dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K4dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K5dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K6dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K7dm-$Pdm,2);?></div></td>
<td bgcolor="#CCffCC"><div align="right"><?php echo round($K8dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K9dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K10dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K11dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K12dm-$Pdm,2);?></div></td>
<td bgcolor="#CCffCC"><div align="right"><?php echo round($K13dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K14dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K15dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K16dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K17dm-$Pdm,2);?></div></td>
<td bgcolor="#CCffCC"><div align="right"><?php echo round($K18dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K19dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K20dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K21dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K22dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K23dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K24dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K25dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K26dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K27dm-$Pdm,2);?></div></td>
<td bgcolor="#CCCCCC"><div align="right"><?php echo round($K28dm-$Pdm,2);?></div></td>
</tr>




<table width="400" border="1" align="center">
<tr>
<td><div align="center">
<?php // content="text/plain; charset=utf-8" 
require_once ('../jpgraph/jpgraph.php');
require_once ('../jpgraph/jpgraph_line.php');
require_once ('../jpgraph/jpgraph_scatter.php');
require_once ('../jpgraph/jpgraph_regstat.php');


unlink('scatterNK.png');

$xdata = array(0,50,100);
$ydata = array(0,$k50dT,$K100dm-$Pdm);
 
$xdata2 = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28);
$ydata2 =  array($K1dm-$Pdm,$K2dm-$Pdm,$K3dm-$Pdm,$K4dm-$Pdm,$K5dm-$Pdm,$K6dm-$Pdm,$K7dm-$Pdm,$K8dm-$Pdm,$K9dm-$Pdm,$K10dm-$Pdm,$K11dm-$Pdm,$K12dm-$Pdm,$K13dm-$Pdm,$K14dm-$Pdm,$K15dm-$Pdm,$K16dm-$Pdm,$K17dm-$Pdm,$K18dm-$Pdm,$K19dm-$Pdm,$K20dm-$Pdm,$K21dm-$Pdm,$K22dm-$Pdm,$K23dm-$Pdm,$K24dm-$Pdm,$K25dm-$Pdm,$K26dm-$Pdm,$K27dm-$Pdm,$K28dm-$Pdm);
// Get the interpolated values by creating
// a new Spline object.
//$spline = new Spline($xdata,$ydata);
 
// For the new data set we want 40 points to
// get a smooth curve.
//list($newx,$newy) = $spline->Get(50);

$g = new Graph(500,400);
$g->SetScale('linlin');
$theme_class= new UniversalTheme;
//$graph->SetTheme($theme_class);

$g->title->Set('Curve K*');
$g->SetBox(false);

$g->yaxis->HideZeroLabel();
$g->yaxis->HideLine(false);
$g->yaxis->HideTicks(false,false);
$g->ygrid->SetFill(false);
 
// We use a scatterplot to illustrate the original
// contro points.
//$splot = new ScatterPlot($ydata,$xdata);
//$splot->mark->SetFillColor('[email protected]');
//$splot->mark->SetColor('[email protected]');


///$lplot = new LinePlot($newy,$newx);
//$lplot->SetLegend('Target');

$p1 = new LinePlot($ydata2,$xdata2);
$g->Add($p1);

$p1->SetColor("#aaaaaa");
$p1->SetLegend('K ');
$p1->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p1->mark->SetColor('#aaaaaa');
$p1->mark->SetFillColor('#aaaaaa');
$p1->SetCenter();

$g->Add($p1);
//$g->Add($lplot);
$g->Stroke('scatterNK.png');




?>
<img src="scatterNK.png">
</div></td>
</tr>

</table>






<tr>
<td align="center"><font size="-2"> &copy; <a href="mailto:[email protected]">Fred Kuo</a>, 2021. All rights reserved.<br><a href="http://www.fredkuo.idv.tw/wordpress/?p=1025">Read more.</a><br>
</td>
</tr>

</body>


</html>