File: C:/xampp/htdocs/FograCT1/pbnCT42CR40apicc - 複製.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>Control-9 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'];
$sn= $_GET['sn'];
$f321= $_GET['f321'];
$TR15= $_GET['TR15'];
$target=$_GET['target'];
$iccName=$_GET['po'];
if ($target==''){
$target='CRPC6';
}
echo "目標:".$target;
$po=$_GET['po'];
include 'spXYZ.php';
include 'sp38XYZ.php';
include 'lab2xyz.php';
include 'SCCA06.php';
include 'xyz2lab01.php';
include 'xyz2lab.php';
include 'DensityV38.php';
include 'DensityV.php';
//include 'DensityV38.php';
include 'invert.php';
$sum=120;
$check=1;
$dtime=time();
$dStr=substr($dtime,7,9)."-";
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;
}
$contentT = file($f321);
//echo substr('abcdef', 1, 3); // bcd
$filedb=substr($f321,7,60);
$dbstr=explode("_", $filedb);
echo $dbstr[0]."XX".$dbstr[1]."XX".$dbstr[2]."XX".$dbstr[3].$dbstr[4].$dbstr[5];
$filename=$filedb;
$po=$_GET['po'];
echo "po:".$po;
///////////get last ok//////////////////////////
///////////////////////// get ok
$stringT = implode($contentT);
//echo $contents[20];
//echo $stringT;
//$pt = ereg_replace("\r\n?", " ", $stringT);
//$datastring=get_between($pt,"BEGIN_DATA","END_DATA");
$dotTx = explode("_", $stringT);////Measure upload
print_r ($dotTx);
$myFile = $iccName.".ti3";
//$icclab="upload/".$filename."T.ti1";
$fh = fopen($myFile, 'w') or die("can't open file");
//fwrite($fh, $p);
//1 "A1" 0.00000 0.00000 0.00000 '.$dotTx[0].' '.$dotTx[1].' '.$dotTx[2].'
$viHead='CTI3
DESCRIPTOR "Argyll Calibration Target chart information 3"
ORIGINATOR "Argyll chartread"
CREATED "Thu May 11 16:41:43 2023"
DEVICE_CLASS "OUTPUT"
COLOR_REP "CMYK_LAB"
TARGET_INSTRUMENT "GretagMacbeth i1 Pro"
DEVCALSTD "GMDI"
NUMBER_OF_FIELDS 8
BEGIN_DATA_FORMAT
SAMPLE_ID SAMPLE_LOC CMYK_C CMYK_M CMYK_Y CMYK_K LAB_L LAB_A LAB_B
END_DATA_FORMAT
NUMBER_OF_SETS 42
BEGIN_DATA
1 A1 0 0 0 0 '.$dotTx[0].' '.$dotTx[1].' '.$dotTx[2].'
2 A2 100 0 0 0 '.$dotTx[3].' '.$dotTx[4].' '.$dotTx[5].'
3 A3 0 100 0 0 '.$dotTx[6].' '.$dotTx[7].' '.$dotTx[8].'
4 A4 0 0 100 0 '.$dotTx[9].' '.$dotTx[10].' '.$dotTx[11].'
5 A5 0 0 0 100 '.$dotTx[12].' '.$dotTx[13].' '.$dotTx[14].'
6 A6 100 100 0 0 '.$dotTx[15].' '.$dotTx[16].' '.$dotTx[17].'
7 A7 100 0 100 0 '.$dotTx[18].' '.$dotTx[19].' '.$dotTx[20].'
8 B1 25.09 25.09 25.09 0 '.$dotTx[21].' '.$dotTx[22].' '.$dotTx[23].'
9 B2 74.90 74.90 74.90 0 '.$dotTx[24].' '.$dotTx[25].' '.$dotTx[26].'
10 B3 0 0 0 25.09804 '.$dotTx[27].' '.$dotTx[28].' '.$dotTx[29].'
11 B4 0 0 0 50.19608 '.$dotTx[30].' '.$dotTx[31].' '.$dotTx[32].'
12 B5 0 0 0 74.90196 '.$dotTx[33].' '.$dotTx[34].' '.$dotTx[35].'
13 B6 5.098039 3.921569 3.921569 0 '.$dotTx[36].' '.$dotTx[37].' '.$dotTx[38].'
14 B7 14.90196 12.15686 12.15686 0 '.$dotTx[39].' '.$dotTx[40].' '.$dotTx[41].'
15 C1 25.09804 34.90196 50.19608 0 '.$dotTx[42].' '.$dotTx[43].' '.$dotTx[44].'
16 C2 45.09804 60 74.90196 0 '.$dotTx[45].' '.$dotTx[46].' '.$dotTx[47].'
17 C3 14.90196 25.09804 34.90196 5.098039 '.$dotTx[48].' '.$dotTx[49].' '.$dotTx[50].'
18 C4 80 20 0 0 '.$dotTx[51].' '.$dotTx[52].' '.$dotTx[53].'
19 C5 20 80 0 0 '.$dotTx[54].' '.$dotTx[55].' '.$dotTx[56].'
20 C6 80 0 20 0 '.$dotTx[57].' '.$dotTx[58].' '.$dotTx[59].'
21 C7 0 20 80 0 '.$dotTx[60].' '.$dotTx[61].' '.$dotTx[62].'
22 D1 60 40 0 0 '.$dotTx[63].' '.$dotTx[64].' '.$dotTx[65].'
23 D2 40 60 0 0 '.$dotTx[66].' '.$dotTx[67].' '.$dotTx[68].'
24 D3 60 0 40 0 '.$dotTx[69].' '.$dotTx[70].' '.$dotTx[71].'
25 D4 0 40 60 0 '.$dotTx[72].' '.$dotTx[73].' '.$dotTx[74].'
26 D5 40 0 60 0 '.$dotTx[75].' '.$dotTx[76].' '.$dotTx[77].'
27 D6 0 60 40 0 '.$dotTx[78].' '.$dotTx[79].' '.$dotTx[80].'
28 D7 40 40 20 0 '.$dotTx[81].' '.$dotTx[82].' '.$dotTx[83].'
29 E1 20 40 60 0 '.$dotTx[84].' '.$dotTx[85].' '.$dotTx[86].'
30 E2 80 69.80392 69.80392 20 '.$dotTx[87].' '.$dotTx[88].' '.$dotTx[89].'
31 E3 60 50.19608 50.19608 40 '.$dotTx[90].' '.$dotTx[91].' '.$dotTx[92].'
32 E4 40 29.80392 29.80392 60 '.$dotTx[93].' '.$dotTx[94].' '.$dotTx[95].'
33 E5 14.90196 5.098039 14.90196 0 '.$dotTx[96].' '.$dotTx[97].' '.$dotTx[98].'
34 E6 5.098039 14.90196 5.098039 0 '.$dotTx[99].' '.$dotTx[100].' '.$dotTx[101].'
35 E7 60 29.80392 40 0 '.$dotTx[102].' '.$dotTx[103].' '.$dotTx[104].'
36 F1 0 100 100 0 '.$dotTx[105].' '.$dotTx[106].' '.$dotTx[107].'
37 F2 50.19608 50.19608 50.19608 0 '.$dotTx[108].' '.$dotTx[109].' '.$dotTx[110].'
38 F3 29.80392 23.92157 23.92157 0 '.$dotTx[111].' '.$dotTx[112].' '.$dotTx[113].'
39 F4 7.843137 14.90196 20 0 '.$dotTx[114].' '.$dotTx[115].' '.$dotTx[116].'
40 F5 20 0 80 0 '.$dotTx[117].' '.$dotTx[118].' '.$dotTx[119].'
41 F6 0 80 20 0 '.$dotTx[120].' '.$dotTx[121].' '.$dotTx[122].'
42 F7 29.80392 60 20 0 '.$dotTx[123].' '.$dotTx[124].' '.$dotTx[125].'
END_DATA
';
fwrite($fh, $viHead);
fclose($fh);
//echo "colprof -v -D'".$iccName."' -qm ".$iccName;
exec("echo . | colprof -v -D'".$iccName."' -qm ".$iccName);
//run(@ScriptDir&"\"&"colprof.exe -v -D"&'"'&$barcode&'"'&" -ql "&$barcode)
sleep(2);
$size = filesize($iccName.".icm");
echo "File size: " . $size . " bytes";
?>
<table align='center'>
<tr>
<td align="center"><a href="http://www.fredkuo.idv.tw/FograCT1/<?php echo $iccName.".icm";?>">Download Profile here!.</a><br></td>
</tr>
<tr>
<td align="center"><font size="-2"> © <a href="mailto:[email protected]">Fred Kuo</a>, 2025. All rights reserved.<br><a href="http://www.fredkuo.idv.tw/wordpress">Read more.</a><br>
</td>
</tr>
</table>
</body>
</html>