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/lineGraphDT23.php
  <?php
extract($_REQUEST);
//session_start();
//error_reporting(E_ALL ^ E_NOTICE);?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>PSA Production Report--</title>

</head>
<?php
 $host = "127.0.0.1";
$user = "root";
$pass = "fredsql";
$db = "tvicheck-st";


error_reporting(0);

$connection = new mysqli($host, $user, $pass);
//mysqli_query("SET NAMES 'utf8'");
//mysqli_query( $connection, "SET NAMES 'utf8'");
//$link = mssql_connect("MACBOOK7", "sa", "fred5697");
if( !mysqli_select_db($connection, $db)) {
  die ("無法選擇資料庫");
}
mysqli_query( $connection, "SET NAMES 'utf8'");

// generate and execute query
$query = "SELECT * from productionc9 where po='$po' order by id";
$result =  mysqli_query($connection, $query);
$num = mysqli_num_rows( $result);
//echo "num 31:".$num;
// if records present
$i=0;
	// iterate iii through resultset
	// print title with links to edit and delete scripts
	
	$timear= array();

	

	
	$dekar = array();
	$decar = array();
	$demar = array();
	$deyar = array();
	$dek50ar = array();
	$dec50ar = array();
	$dem50ar = array();
	$dey50ar = array();
	$deRar = array();
	$deGar = array();
	$deBar = array();
	$degar = array();
	$filear = array();
	$stripar = array();
	$Vscorear= array();
	$cscorear= array();
	$df25ar = array();
	$df50ar = array();
	$df75ar = array();
	
	//	if ($num > 0)
	//{
		
//$row = mysqli_fetch_object($results);	
		//$sNo=$row->sNo+1;}
	
	while($row = mysqli_fetch_object($result))
	{
	$i=$i+1;
			if ($row->setOK==1) {$ok=$i;}
	$tm=$row->ddate;
	$press=$row->press;
	$paper=$row->paper;
	//$paper = mb_convert_encoding($paper,"utf-8","big5");
	$remark=$row->cmmt;
	//echo $i."-".$tm."__";
	array_push($timear, $tm);
	
		$file=$row->filename;
	array_push($filear, $file);
	
	$Vscore=$row->Vscore;
	array_push($Vscorear, $Vscore);
	
	$Csc=$row->Cscore;
	array_push($cscorear, $Csc);
	
	$dek=$row->denK;
	array_push($dekar, $dek);
	$dek50=$row->TVIk;
	array_push($dek50ar, $dek50);
	
	$dec=$row->denC;
	array_push($decar, $dec);
	//echo $i."-".$dec."__";
	
	$dec50=$row->TVIc;
	array_push($dec50ar, $dec50);
	
	$dem=$row->denM;
	array_push($demar, $dem);
	$dem50=$row->TVIm;
	array_push($dem50ar, $dem50);
	
	$dey=$row->denY;
	array_push($deyar, $dey);
	$dey50=$row->TVIy;
	array_push($dey50ar, $dey50);
	
	$deR=$row->deR;
	array_push($deRar, $deR);
	
		$deG=$row->deG;
	array_push($deGar, $deG);
	
		$deB=$row->deB;
	array_push($deBar, $deB);
	
	$df25=$row->df25;
	array_push($df25ar, $df25);
	
	$df50=$row->df50;
	array_push($df50ar, $df50);
	
	$df75=$row->df75;
	array_push($df75ar, $df75);
	
	}
	//print_r($deBar);
	$max=$i;
	//echo "maxi:".$i."-__";
	

	
	date_default_timezone_set('Asia/Taipei'); 
	function timeDiff($firstTime,$lastTime)
	{

// convert to unix timestamps
$firstTime=strtotime($firstTime);
$lastTime=strtotime($lastTime);

// perform subtraction to get the difference (in seconds) between times
$timeDiff=$lastTime-$firstTime;

// return the difference
return $timeDiff;
}

$f=0;	
$Fsum=0;
	//echo "Job id:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$po."<br>";	
$queryf = "SELECT Fscore, sNo from productionc9 where po='$po'  order by id";
$resultf =  mysqli_query($connection, $queryf);
$num = mysqli_num_rows( $resultf);
//echo "num 145:".$num;
//$resultf = mysql_query($queryf) or die ("Error in query: $query. " . mysql_error());
	if ($num > 0)
	{
	while($row = mysqli_fetch_object($resultf))
	{
	$fscore=$row->Fscore;
	$Fsum=$Fsum+$fscore;
	//echo "Fsum:".$fscore;	
	$sn=$row->sNo;
	$f=$f+1;
	}
	}
	//echo "Fsum:".$Fsum;	
$c=0;
$Csum=0;

$queryc = "SELECT Vscore from productionc9 where po='$po' order by id";
$resultc =  mysqli_query($connection, $queryc);
//echo "queryc:".$queryc ;
	while($row = mysqli_fetch_object($resultc))
	{
	$Vscore=$row->Vscore;
	$Csum=$Csum+$Vscore;
	//$Fscore=$row->Fscore;
	//$Fsum=$Fsum+$Fscore;
	$c=$c+1;
	}

	
	$Favg=round($Fsum/$f,2);
	$Cavg=round($Csum/$c,2);
	//echo "cc:".$c;
	//echo "cc:".$Cavg;
		echo "工單號碼:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$po."<br>";	
/* 		
		
	echo "開始時間:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$timear[0]."<br>";
	
if ($ok<>'') {
	echo "OK sheet 時間:&nbsp;"."[".$ok."]-&nbsp;".$timear[$ok-1]."&nbsp;&nbsp;**OK sheet 工時:".gmdate("H:i:s", timeDiff($timear[0],$timear[$ok-1]))."<br>";}
	
	if ($ok<>'') {
	echo "結束時間:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".end($timear)."&nbsp;&nbsp;********生產工時:".gmdate("H:i:s", timeDiff($timear[$ok-1],end($timear)))."<br>";}
	else {
	echo "結束時間:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".end($timear)."&nbsp;&nbsp;********生產工時:".gmdate("H:i:s", timeDiff($timear[0],end($timear)))."<br>";}
	
	echo "總工作時間:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	echo  gmdate("H:i:s", timeDiff($timear[0],end($timear)));
	 */
	echo "<br>生產分數:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	echo  $Cavg;
	
?>

<table width="300"  align="center"> <font color="green">
<tr>
<!--
<td> Date of press run: </td><td><?php echo $tm;?></td></tr><tr>
-->
<td> Paper: </td><td><?php echo $paper;?></td></tr><tr>
<td> Press: </td><td><?php echo $press;?></td></tr><tr>
<td> Remark: </td><td><?php echo $remark;?></td></tr><tr>
<td> Job id: </td><td><?php echo $po;?></td>
</tr>
</table>

<p>
<table width="200" border="1" align="center"> <font color="green">

<tr>
<td><div align="center">
<?php 
for ( $j = 1; $j <= $i; $j += 1) {
?><a href="TVIreport23.php?f123=target.txt&f321=upload/<?php print $filear[$j-1]."&rule=c9&target=CRPC6&company=ecolor"; 
if ($j>$ok){ 
echo  $filear[$ok-1];}
?>"><?php if ($j>$ok){?><font color="green"><?php } echo $j." ";?></font></a>
 

<?php
//echo print_r ($filear);
///http://127.0.0.1/fogra627/tvireport.php?tvifile=H3_627TT_627_2013-11-28_163409_18.csv
}

?>
</td></tr>

<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_plotline.php'); 

unlink('CMYSID.png');

$datay1 = $decar;
$datay2 = $demar;
$datay3 = $deyar;
$datay4 = $dekar;
$datay5 = $deRar;
$datay6 = $deGar;
$datay7 = $deBar;



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

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

$graph->title->Set('CMY 100');
$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'));
$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=92.04-5.9;
//$BDR=91.12-6.32;
$p3 = new LinePlot($datay3);
$graph->Add($p3);

$p4 = new LinePlot($datay4);
$graph->Add($p4);

$p5 = new LinePlot($datay5);
$graph->Add($p5);

$p6 = new LinePlot($datay6);
$graph->Add($p6);

$p7 = new LinePlot($datay7);
$graph->Add($p7);

$p1->SetColor("#55bbdd");
$p1->SetLegend('C100');
$p1->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p1->mark->SetColor('#55bbdd');
$p1->mark->SetFillColor('#55bbdd');
$p1->SetCenter();

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

$p3->SetColor("#dce72a");
$p3->SetLegend('Y100');
$p3->mark->SetType(MARK_DIAMOND,'',1.0);
$p3->mark->SetColor('#dce72a');
$p3->mark->SetFillColor('#dce72a');
$p3->value->SetMargin(14);
$p3->SetCenter();

$p4->SetColor("#cccccc");
$p4->SetLegend('K100');
$p4->mark->SetType(MARK_DIAMOND,'',1.0);
$p4->mark->SetColor('#cccccc');
$p4->mark->SetFillColor('#cccccc');
$p4->value->SetMargin(14);
$p4->SetCenter();

$p5->SetColor("#cc0000");
$p5->SetLegend('Red');
$p5->mark->SetType(MARK_DIAMOND,'',1.0);
$p5->mark->SetColor('#cc0000');
$p5->mark->SetFillColor('#cc0000');
$p5->value->SetMargin(14);
$p5->SetCenter();

$p6->SetColor("#00cc00");
$p6->SetLegend('Green');
$p6->mark->SetType(MARK_DIAMOND,'',1.0);
$p6->mark->SetColor('#00cc00');
$p6->mark->SetFillColor('#00cc00');
$p6->value->SetMargin(14);
$p6->SetCenter();

$p7->SetColor("#0000cc");
$p7->SetLegend('Blue');
$p7->mark->SetType(MARK_DIAMOND,'',1.0);
$p7->mark->SetColor('#0000cc');
$p7->mark->SetFillColor('#0000cc');
$p7->value->SetMargin(14);
$p7->SetCenter();


$sline = new PlotLine(HORIZONTAL,1.5,'#146f02',1.1); 
$sline->SetLineStyle('dashed');
$sline->SetLegend("Level A");
$sline2 = new PlotLine(HORIZONTAL,2.4,'black',1.1); 
$sline2->SetLineStyle('dashed');
$sline2->SetLegend("Level B");
$sline3 = new PlotLine(HORIZONTAL,4,'red',1.1); 
$sline3->SetLineStyle('dashed');
$sline3->SetLegend("Level C");
$graph->Add($sline);
$graph->Add($sline2);
$graph->Add($sline3);



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


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

  <p><p>  <p><p>  <p><p>
  <table width="200" border="1" align="center">

</tr>
</table>

<p>
<table width="200" border="1" align="center"> <font color="green">

<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_line.php');
require_once ('../jpgraph/jpgraph_plotline.php'); 

unlink('grayDf.png');

$datay1 = $df25ar;
$datay2 = $df50ar;
$datay3 = $df75ar;
//$datay4 = $dek50ar;





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

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

$graph->title->Set('Gray dch');
$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'));
$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=92.04-5.9;
//$BDR=91.12-6.32;
$p3 = new LinePlot($datay3);
$graph->Add($p3);


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

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

$p3->SetColor("#333333");
$p3->SetLegend('Gray75');
$p3->mark->SetType(MARK_DIAMOND,'',1.0);
$p3->mark->SetColor('#333333');
$p3->mark->SetFillColor('#333333');
$p3->value->SetMargin(14);
$p3->SetCenter();



$sline = new PlotLine(HORIZONTAL,3.0,'#146f02',1.1); 
$sline->SetLineStyle('dashed');
$sline->SetLegend("Level A");
$sline2 = new PlotLine(HORIZONTAL,3.5,'black',1.1); 
$sline2->SetLineStyle('dashed');
$sline2->SetLegend("Level B");
$sline3 = new PlotLine(HORIZONTAL,5.0,'red',1.1); 
$sline3->SetLineStyle('dashed');
$sline3->SetLegend("Level C");
$graph->Add($sline);
$graph->Add($sline2);
$graph->Add($sline3);




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


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


<table width="200" border="1" align="center"> <font color="green">

<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_line.php');
require_once ('../jpgraph/jpgraph_plotline.php'); 

unlink('CMYK50.png');

$datay1 = $dec50ar;
$datay2 = $dem50ar;
$datay3 = $dey50ar;
$datay4 = $dek50ar;





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

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

$graph->title->Set('CMYK 50');
$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'));
$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=92.04-5.9;
//$BDR=91.12-6.32;
$p3 = new LinePlot($datay3);
$graph->Add($p3);

$p4 = new LinePlot($datay4);
$graph->Add($p4);


$p1->SetColor("#55bbdd");
$p1->SetLegend('C50');
$p1->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p1->mark->SetColor('#55bbdd');
$p1->mark->SetFillColor('#55bbdd');
$p1->SetCenter();

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

$p3->SetColor("#dce72a");
$p3->SetLegend('Y50');
$p3->mark->SetType(MARK_DIAMOND,'',1.0);
$p3->mark->SetColor('#dce72a');
$p3->mark->SetFillColor('#dce72a');
$p3->value->SetMargin(14);
$p3->SetCenter();

$p4->SetColor("#aaaaaa");
$p4->SetLegend('Y50');
$p4->mark->SetType(MARK_DIAMOND,'',1.0);
$p4->mark->SetColor('#aaaaaa');
$p4->mark->SetFillColor('#aaaaaa');
$p4->value->SetMargin(14);
$p4->SetCenter();

$sline = new PlotLine(HORIZONTAL,1.5,'#146f02',1.1); 
$sline->SetLineStyle('dashed');
$sline->SetLegend("Level A");
$sline2 = new PlotLine(HORIZONTAL,2,'black',1.1); 
$sline2->SetLineStyle('dashed');
$sline2->SetLegend("Level B");
$sline3 = new PlotLine(HORIZONTAL,2.5,'red',1.1); 
$sline3->SetLineStyle('dashed');
$sline3->SetLegend("Level C");
$graph->Add($sline);
$graph->Add($sline2);
$graph->Add($sline3);




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


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









  <p><p>  <p><p>  <p><p>
  <table width="200" border="1" align="center">

</table>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <table border="1" align="center" cellpadding="1" cellspacing="1">
    <col width="87">
    <col width="83">
    <col width="71" span="2">
    <col width="83">
    <col width="56">
    <col width="53">
    <col width="83">
    <col width="53">
    <col width="56">
    <tr>
      <td width="87">Tol    CIEDE00</td>
      <td width="83" align="center" bgcolor="#00CCFF">C100</td>
      <td width="71" align="center" bgcolor="#FFCCFF">M100</td>
      <td width="71" align="center" bgcolor="#FFFF99">Y100</td>
      <td width="83" align="center" bgcolor="#CCCCCC">K100</td>
	  <td width="71" align="center" bgcolor="#cc0000">Red</td>
      <td width="71" align="center" bgcolor="#00cc00">Green</td>
      <td width="83" align="center" bgcolor="#6666cc">Blue</td>
      <td width="56" align="center" bgcolor="#00CCFF">C50</td>
      <td width="53" align="center" bgcolor="#FFCCFF">M50</td>
      <td width="83" align="center" bgcolor="#FFFFCC">Y50</td>
      <td width="53" align="center" bgcolor="#CCCCCC">K50</td>
      <td width="56" align="center" bgcolor="#dfdfdd">Gray25</td>
	  <td width="56" align="center" bgcolor="#CfCfCC">Gray50</td>
	  <td width="56" align="center" bgcolor="#7f7f77">Gray75</td>
	  <td width="56" align="center" bgcolor="#CCCCCC">分數</td>
    </tr>
    <tr>
      <td>Level A</td>
      <td align="right" bgcolor="#00CCFF">1.50</td>
      <td align="right" bgcolor="#FFCCFF">1.50</td>
      <td align="right" bgcolor="#FFFF99">1.50</td>
      <td align="right" bgcolor="#CCCCCC">2.40</td>
	  <td><td><td>
      <td align="right" bgcolor="#00CCFF">1.50</td>
      <td align="right" bgcolor="#FFCCFF">1.50</td>
      <td align="right" bgcolor="#FFFFCC">1.50</td>
      <td align="right" bgcolor="#CCCCCC">1.50</td>
	  <td>
      <td align="right" bgcolor="#CCCCCC">3.00</td>
    </tr>
    <tr>
      <td>Level B</td>
      <td align="right" bgcolor="#00CCFF">2.4</td>
      <td align="right" bgcolor="#FFCCFF">2.4</td>
      <td align="right" bgcolor="#FFFF99">2.4</td>
      <td align="right" bgcolor="#CCCCCC">3.6</td>
	   <td><td><td>
      <td align="right" bgcolor="#00CCFF">2</td>
      <td align="right" bgcolor="#FFCCFF">2</td>
      <td align="right" bgcolor="#FFFFCC">2</td>
      <td align="right" bgcolor="#CCCCCC">2</td>
	  <td>
      <td align="right" bgcolor="#CCCCCC">3.5</td>
    </tr>
    <tr>
      <td>Level C</td>
      <td align="right" bgcolor="#00CCFF">4</td>
      <td align="right" bgcolor="#FFCCFF">4</td>
      <td align="right" bgcolor="#FFFF99">4</td>
      <td align="right" bgcolor="#CCCCCC">6</td>
	   <td><td><td>
      <td align="right" bgcolor="#00CCFF">2.5</td>
      <td align="right" bgcolor="#FFCCFF">2.5</td>
      <td align="right" bgcolor="#FFFFCC">2.5</td>
      <td align="right" bgcolor="#CCCCCC">2.5</td>
	  <td>
      <td align="right" bgcolor="#CCCCCC">5</td>
    </tr>
	    
	<?php 
	 for ( $i = 1; $i <= $max; $i+= 1) { 
	 
	 ?>
	 <tr>
      <td><?php echo $i;?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $decar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $demar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $deyar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $dekar[$i-1];?></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $deRar[$i-1];?></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $deGar[$i-1];?></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $deBar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $dec50ar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $dem50ar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $dey50ar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $dek50ar[$i-1];?></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $df25ar[$i-1];?></td>
      <td align="right" bgcolor="#FFFFFF"><?php echo $df50ar[$i-1];?></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $df75ar[$i-1];?></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $Vscorear[$i-1];?></td>
	  <?php $fscore=$fscorear[$i-1];
			$Fsum=$Fsum+$fscore;                                                                        ?>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $cscorear[$i-1];?></td>
	  </tr>
	  <?php } ?>
	  	 <tr>
      <td>平均</td>
      <td>
      <td>
      <td>
      <td>
      <td>
      <td>
      <td>
      <td>
      <td>
	        <td>
      <td>
      <td>
      <td>
	  <td></td>
	  <td align="right" bgcolor="#FFFFFF"><?php echo $Cavg;?></td>
	  </tr>
    
  </table>
    <?php
  $chl = "http://pbn.com.tw/FograCT23/lineGraphDT25.php?po=".$po; //vcard尾資訊
echo "<img src='https://chart.googleapis.com/chart?cht=qr&chl=".urlencode($chl)."&choe=UTF8&chs=200x200' />"; //要對內容urlencode()
?>
  <p>&nbsp;</p>

<!-- graph code ends here-->