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/cmykDe/CNYplate/lineGraph.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5"><title>�ƥ󱱨�d��--</title>
</head>
<tr>
	<td bgcolor="Navy"><font size="+1" color="White"><b>����O�� 
	      <?php  echo $date_s;?> �� <?php  echo $date_e;?>
	</b></font></td>
</tr>
<?php


$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!");




// generate and execute query
$query = "SELECT * from Fplate where plog='$sn' and ctp='88' and date 
						between '$date_s' and '$date_e'  order by id";
$result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
//echo $query;
// if records present

	// iterate iii through resultset
	// print title with links to edit and delete scripts
	$timear= array();
	$denar = array();
	$filear= array();
	$T50ar = array();
	$T25ar = array();
	$par = array();
	
	while($row = mysql_fetch_object($result))
	{

	$tm=$row->date;
	//echo $i."-".$tm."__";
	array_push($timear, $tm);
	
	$file=$row->filename;
	array_push($filear, $file);

	$SID=$row->SID;
	//echo $i."-".$k100."__";
	array_push($denar, $SID);	
	
	$T50=$row->T50;
	array_push($T50ar, $T50);
	
	$T25=$row->T25;
	array_push($T25ar, $T25);
	
	$paper=$row->paper;
	array_push($par, $paper);
	}
	
	date_default_timezone_set('Asia/Taipei'); 
	
echo "�ƥ󸹽X:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$sn."<br>";	
?>

<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');


unlink('CMYKT.png');

$datay1 = $denar;
$datay2 = $T50ar;
$datay3 = $T25ar;
$datay4 = $par;




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

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

$graph->title->Set('TINT');
$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);




$p2 = new LinePlot($datay2);
$graph->Add($p2);

$p2->SetColor("#FF0088");
$p2->SetLegend('T50');
$p2->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p2->mark->SetColor('#FF0088');
$p2->mark->SetFillColor('#FF0088');
$p2->SetCenter();

$p3 = new LinePlot($datay3);
$graph->Add($p3);

$p3->SetColor("#8800FF");
$p3->SetLegend('T25');
$p3->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p3->mark->SetColor('#8800FF');
$p3->mark->SetFillColor('#8800FF');
$p3->SetCenter();



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


// Output line
$graph->Stroke('CMYKT.png');
?>
<img src="CMYKT.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');


unlink('CMYKSID.png');

$datay1 = $denar;
$datay2 = $T50ar;
$datay3 = $T25ar;
$datay4 = $par;




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

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

$graph->title->Set('Plate Check');
$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);

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




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

$p4->SetColor("#8888FF");
$p4->SetLegend('Plate');
$p4->mark->SetType(MARK_FILLEDCIRCLE,'',1.0);
$p4->mark->SetColor('#8888FF');
$p4->mark->SetFillColor('#8888FF');
$p4->SetCenter();

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


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

<!-- graph code ends here-->