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/CC24/CC40Parsing.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>Camera Check</title>
</head>

<body class="oneColElsCtr">
<?php
$sum=260;
$check=1;
$dtime=time();
error_reporting(0);

$contact=$_POST["contact"];
$company=$_POST["company"];
$type=$_POST["type"];
$device=$_POST["device"];


$host="127.0.0.1";
$user="root";
$pass="fredsql";
$db="tvicheck-st";

$connection = mysql_connect($host, $user, $pass) or die ("Unable to connect!");
mysql_query("SET NAMES 'utf8'");
//$link = mssql_connect("MACBOOK7", "sa", "fred5697");
mysql_select_db($db) or die ("Unable to select database!");
$query = "select id from cc24 order by id desc  limit 0,1";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());

	while($row = mysql_fetch_object($result))
	{
$dStr=$row->id+1;
}


//$dStr=substr($dtime,7,9)."-";

  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
	echo "Camera profile Checking form! " .  "<br />";
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
	$filename=$_FILES["file"]["name"];
    //echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
   // echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";

    if (file_exists("upload/x" .$_FILES["file"]["name"]))
      {
      echo $_FILES["file"]["name"] . " already exists. ". "<br />";
      }
    else
      {
      move_uploaded_file($_FILES["file"]["tmp_name"],
       "upload/" .$dStr."-".$_FILES["file"]["name"]);
	  move_uploaded_file($_FILES["iccfile"]["tmp_name"],
       "upload/" .$dStr."-".$_FILES["iccfile"]["name"]); 
	   echo $_FILES["file"]["name"] ."   upload sucess! " .  "<br />";
	    $upcc24="upload/" .$dStr."-".$_FILES["file"]["name"];
		$upicc="upload/" .$dStr."-".$_FILES["iccfile"]["name"];
sleep(5);
	   echo "Report start: " .  "<br />";
     // echo "Stored in: " . "upload/" . $_FILES["file"]["name"]. "<br />";
	 $filename=substr($dStr."-".$_FILES["file"]["name"],0,-4);
	 $iccname=$dStr."-".$_FILES["iccfile"]["name"];

	
	exec("echo . | convert ". $upcc24." info:".$filename."x.txt"); 
	sleep(2);
	//echo "echo . | convert ". $upcc24." info:".$filename.".txt";
	  	  $contents = file($filename."x.txt");
		 $string = implode($contents);

$dot = explode(" ", $string);
print_r ($dot);

$pdot = explode("x", $dot[2]);

print_r ($pdot);

$xpix=$pdot[0];
$ypix=$pdot[1];

$p1x=round(($pdot[0]/16),0)*1;
$p2x=round(($pdot[0]/16),0)*3;
$p3x=round(($pdot[0]/16),0)*5;
$p4x=round(($pdot[0]/16),0)*7;
$p5x=round(($pdot[0]/16),0)*9;
$p6x=round(($pdot[0]/16),0)*11;
$p7x=round(($pdot[0]/16),0)*13;
$p8x=round(($pdot[0]/16),0)*15;

$p1y=round(($pdot[1]/10),0)*1;
$p2y=round(($pdot[1]/10),0)*3;
$p3y=round(($pdot[1]/10),0)*5;
$p4y=round(($pdot[1]/10),0)*7;
$p5y=round(($pdot[1]/10),0)*9;


//echo "<br>x1y1:".$p1x."x".$p1y."<br>";
//echo "x6y4:".$p6x."x".$p4y."<br>";

//echo "echo . | convert ". $upcc24."[1x1+".$p1x."+".$p1y."]  -format '%[fx:int(255*r)] info:".$filename."p.txt"; 
//exec ("echo . | convert ". $upcc24."[1x1+".$p1x."+".$p1y."]  info:".$filename."p.txt"); 
	//echo "echo . | convert ". $upcc24."[1x1+".$p1x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p.txt";
	
	exec("echo . | convert ". $upcc24."[1x1+".$p1x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p1.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p2x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p2.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p3x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p3.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p4x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p4.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p5x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p5.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p6x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p6.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p7x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p7.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p8x."+".$p1y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p8.txt"); 	
	
	exec("echo . | convert ". $upcc24."[1x1+".$p1x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p9.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p2x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p10.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p3x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p11.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p4x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p12.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p5x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p13.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p6x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p14.txt"); 	
	exec("echo . | convert ". $upcc24."[1x1+".$p7x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p15.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p8x."+".$p2y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p16.txt"); 	
	
	exec("echo . | convert ". $upcc24."[1x1+".$p1x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p17.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p2x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p18.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p3x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p19.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p4x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p20.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p5x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p21.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p6x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p22.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p7x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p23.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p8x."+".$p3y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p24.txt"); 	
	
	exec("echo . | convert ". $upcc24."[1x1+".$p1x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p25.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p2x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p26.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p3x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p27.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p4x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p28.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p5x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p29.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p6x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p30.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p7x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p31.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p8x."+".$p4y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p32.txt"); 

	exec("echo . | convert ". $upcc24."[1x1+".$p1x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p33.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p2x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p34.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p3x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p35.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p4x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p36.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p5x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p37.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p6x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p38.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p7x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p39.txt"); 
	exec("echo . | convert ". $upcc24."[1x1+".$p8x."+".$p5y."] -format %[fx:int(255*r)],%[fx:int(255*g)],%[fx:int(255*b)]  info:".$filename."p40.txt"); 	
	
	
	sleep(2);


	
	
$myFile =$filename."px.txt";
//$icclab="upload/".$filename."T.ti1";
$fh = fopen($myFile, 'w') or die("can't open file");
//fwrite($fh, $p);


$viHead='CGATS.17
ORIGINATOR	"icctrans"
#
# Data follows
#
NUMBER_OF_SETS	40
NUMBER_OF_FIELDS	4
BEGIN_DATA_FORMAT
SAMPLE_ID	RGB_R	RGB_G	RGB_B
END_DATA_FORMAT
BEGIN_DATA
';	

fwrite($fh, $viHead);

for ( $j = 1; $j <= 40; $j+= 1) {

$line=$j."	";
fwrite($fh, $line);

	$contents = file($filename."p".$j.".txt");
	$string = implode($contents);
	$p = ereg_replace(",", "	", $string);
	fwrite($fh, $p);
	  }


$viTail='END_DATA';

fwrite($fh, $viTail);	  
fclose($fh);

//echo "<br>icctrans -v -i ".$upicc." -o *Lab -t 3 ".$dStr."-CC24px.txt ".$dStr."-cc24lab.txt";
exec("echo . |icctrans -v -i ".$upicc." -o *Lab -t 3 ".$myFile." ".$filename."lab.txt"); 

	  
	 }//satrt parsing
    }//upload sucess
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;
}

$contents = file($filename."lab.txt");
$string = implode($contents);	
$p = str_replace(' ','', $string );
$p = str_replace('	',',', $p );
$p = str_replace(chr(13).chr(10),',', $p );
$datastring0=get_between($p,"BEGIN_DATA,",",END_DATA");
$dot = explode(",", $datastring0);
//print_r($dot);	


$contentsT = file("SG40.txt");
$stringt = implode($contentsT);	
$pt = str_replace(' ','', $stringt );
$pt = str_replace('	',',', $pt );
$pt = str_replace(chr(13).chr(10),',', $pt );
$datastringt=get_between($pt,"BEGIN_DATA,",",END_DATA");
$dotT = explode(",", $datastringt);
print_r($dotg);	
	
	
function de94($l1,$a1,$b1,$l2,$a2,$b2) {
  $cp=SQRT(pow($a1,2)+pow($b1,2));
  $ctp=SQRT(pow($a2,2)+pow($b2,2));
  $d76=sqrt(pow(($l1-$l2),2)+ pow(($a1-$a2),2)+pow(($b1-$b2),2));
  $dph=SQRT(ABS(pow($d76,2)-pow(($l1-$l2),2)-pow((SQRT(pow($a1,2)+pow($b1,2))-SQRT(pow($a2,2)+pow($b2,2))),2)));
  $dcp=$ctp-$cp;
  $d94=SQRT((pow((($l1-$l2)/(1*1)),2))+pow(($dcp/(1*(1+(0.045*$cp)))),2)+ pow(($dph/(1*(1+(0.015*$cp)))),2));
  return round($d94,2);
} 

?> 
<table width="200" border="1" align="center">
<tr align='center'>
  <td align='center'>編號</td>
  <td colspan="3">相機色彩值</td>
  <td colspan="3">目標值</td>
  <td>色差</td>
<tr align='center'>
<td align='center'>NO</td><td>RL</td><td>Ra</td><td>Rb</td><td>TL</td><td>Ta</td><td>Tb</td><td>dE(94)</td>

<?php
$TT76=0;
$max76=0;
$max1=0;
$max2=0;
$sum=0;
$i=1;
for ( $j = 0; $j <= 39; $j+= 1) {
$L = $dot[$i+($j*4)];
$a = $dot[$i+1+($j*4)];
$b = $dot[$i+2+($j*4)];

$Lt = $dotT[$i+($j*4)];
$at = $dotT[$i+1+($j*4)];
$bt = $dotT[$i+2+($j*4)];

$no=$j+1;

$de76r=de94($L,$a,$b,$Lt,$at,$bt);
$sum=$de76r+$sum;
echo "<tr align='right'><td>".$no."</td><td>".round($L,2)."</td><td>".round($a,2)."</td><td>".round($b,2)."</td><td>".$Lt."</td><td>".$at."</td><td>".$bt."</td><td>";
if ($de76r>2) {
echo "<font color='red'>";}
else {"<font color='black'>";}
echo $de76r."</td></tr>";

$TT76=$de76r+$TT76;
$max1=max($max1,$de76r);

$max76=max($max1,$de76r);
}
$summ=100-$sum;
echo "<tr><td>Avg</td><td>".round(($TT76/24),2)."</td><td>Max</td><td>".$max76."</td>";

?>
 <td> score </td><td><?php echo $summ;?></td></tr>
</table>

<table width="200" border="1" align="center">
<tr>
<td><div align="center">
<?php // content="text/plain; charset=utf-8"

$connection = mysql_connect("127.0.0.1", "root", "fredsql") or die ("Unable to connect!");
	mysql_query("SET NAMES 'utf8'");
	$db = "tvicheck-st";
		// select database
		mysql_select_db($db) or die ("Unable to select database!");

		// generate and execute query
		$query = "INSERT INTO cc24(company, contact, email, type, filename, iccname, score, passbit, date, device, dsn,  rankbit) VALUES('$company', '$contact', '$email',  '$type', '$filename', '$iccname','$summ', '$passbit', NOW(), '$device', '$dsn',  '$rankbit')";
		//$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
  
		mysql_close($connection);





require_once ('../jpgraph/jpgraph.php');
require_once ('../jpgraph/jpgraph_scatter.php');

//unlink('targetrgb.ti3');
unlink('scatterGu.png');
//unlink('scatterGuF.png');
//unlink('scatterGuA.png');

print_r($dotT);
print_r($dot);


$datax = array($dotT[46],$dotT[78],$dotT[38],$dotT[58],$dotT[82],$dotT[54],$dotT[74],$dotT[26],$dotT[90],$dotT[42],$dotT[70],$dotT[50],$dotT[86],$dotT[46]);//SG40
$datay = array($dotT[47],$dotT[79],$dotT[39],$dotT[59],$dotT[83],$dotT[55],$dotT[75],$dotT[27],$dotT[91],$dotT[43],$dotT[71],$dotT[51],$dotT[87],$dotT[47]);

$datax2 =  array($dot[46],$dot[78],$dot[38],$dot[58],$dot[82],$dot[54],$dot[74],$dot[26],$dot[90],$dot[42],$dot[70],$dot[50],$dot[86],$dot[46]);//Sample
$datay2 =  array($dot[47],$dot[79],$dot[39],$dot[59],$dot[83],$dot[55],$dot[75],$dot[27],$dot[91],$dot[43],$dot[71],$dot[51],$dot[87],$dot[47]);

$datax3 = array($dotT[34],$dotT[98],$dotT[30],$dotT[130],$dotT[62],$dotT[66],$dotT[126],$dotT[2],$dotT[34]);//SG40
$datay3 = array($dotT[35],$dotT[99],$dotT[31],$dotT[131],$dotT[63],$dotT[67],$dotT[127],$dotT[3],$dotT[35]);

$datax4 =  array($dot[34],$dot[98],$dot[30],$dot[130],$dot[62],$dot[66],$dot[126],$dot[2],$dot[34]);//SG40
$datay4 =  array($dot[35],$dot[99],$dot[31],$dot[131],$dot[63],$dot[67],$dot[127],$dot[3],$dot[35]);



$graph = new Graph(600,600);
$graph->img->SetMargin(40,40,40,40);	
$graph->img->SetAntiAliasing();
$graph->SetScale("linlin");
$graph->SetShadow();
$graph->title->Set("SG24 in Red"); 
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->SetBackgroundImage("lab.png",BGIMG_FILLFRAME);

//$sp1->SetColor("#55bbdd");
//$sp1->SetLegend('Line 1');
$sp1 = new ScatterPlot($datay,$datax);
$sp1->SetLinkPoints(true,"red",2);
$sp1->mark->SetType(MARK_FILLEDCIRCLE);
$sp1->mark->SetFillColor("red");
$sp1->mark->SetWidth(3);


$sp2 = new ScatterPlot($datay2,$datax2);
$sp2->SetLinkPoints(true,"#55bbdd",2);
$sp2->mark->SetType(MARK_FILLEDCIRCLE);
$sp2->mark->SetFillColor("#55bbdd");
$sp2->mark->SetWidth(3);


$sp3 = new ScatterPlot($datay3,$datax3);
$sp3->SetLinkPoints(true,"red",2);
$sp3->mark->SetType(MARK_FILLEDCIRCLE);
$sp3->mark->SetFillColor("red");
$sp3->mark->SetWidth(3);


$sp4 = new ScatterPlot($datay4,$datax4);
$sp4->SetLinkPoints(true,"#55bbdd",2);
$sp4->mark->SetType(MARK_FILLEDCIRCLE);
$sp4->mark->SetFillColor("#55bbdd");
$sp4->mark->SetWidth(3);

$graph->Add($sp1);
$graph->Add($sp2);
$graph->Add($sp3);
$graph->Add($sp4);

//$graph->Stroke();

$graph->Stroke('scatterGu.png');

for ( $j = 1; $j <= 40; $j+= 1) {
//unlink($filename."p".$j.".txt");
}
//unlink($filename."x.txt");
//unlink($filename."px.txt");
//unlink($filename."lab.txt");


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

<table width="200" 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');


unlink('scatterDR.png');
$datay1 = array($dotT[93],$dotT[89],$dotT[85],$dotT[81],$dotT[77],$dotT[73]);

$datay2 = array($dot[93],$dot[89],$dotT[85],$dot[81],$dot[77],$dot[73]);




// Setup the graph
$graph = new Graph(550,430);
$graph->SetScale("textlin");

$theme_class= new UniversalTheme;
$graph->SetTheme($theme_class);

$graph->title->Set('Dynamic Range');
$graph->SetBox(false);

$graph->yaxis->HideZeroLabel();
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);

$graph->xaxis->SetTickLabels(array('0','5','10','20','30','40','50','60','70','80','90','95','100'));
$graph->ygrid->SetFill(false);
//$graph->SetBackgroundImage("tiger_bkg.png",BGIMG_FILLFRAME);

$p1 = new LinePlot($datay1);
$graph->Add($p1);

$p2 = new LinePlot($datay2);
$graph->Add($p2);
$ADR=$b16l-$a16l;
$BDR=$bt16l-$at16l;

$p1->SetColor("green");
$p1->SetLegend('SG24 DR');
$p1->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p1->mark->SetColor('green');
$p1->mark->SetFillColor('green');
$p1->SetCenter();

$p2->SetColor("#aaaaaa");
$p2->SetLegend('Sample DR');
$p2->mark->SetType(MARK_UTRIANGLE,'',1.0);
$p2->mark->SetColor('#aaaaaa');
$p2->mark->SetFillColor('#aaaaaa');
$p2->value->SetMargin(14);
$p2->SetCenter();

$graph->legend->SetFrameWeight(1);
$graph->legend->SetColor('#4E4E4E','#00A78A');
$graph->legend->SetMarkAbsSize(8);


// Output line
$graph->Stroke('scatterDR.png');
?>
<img src="scatterDR.png">
</div></td></tr>
</table>


<tr>

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


</tr>
</body>


</html>