Hacked By AnonymousFox

Current Path : C:/AppServ/www/timetable_teacher/graph/
Upload File :
Current File : C:/AppServ/www/timetable_teacher/graph/graph3.php

<?php // content="text/plain; charset=utf-8"
include("../lib/config.php");
include("../lib/connect.php");
		
require_once ('jpgraph.php');
require_once ('jpgraph_bar.php');

    	$cmd="select * from evaluate_system_course where evaluate_system_course_Type='Lec' OR evaluate_system_course_Type='Lab' OR evaluate_system_course_Type='Lec,Lab' group by evaluate_system_course_Subject order by evaluate_system_course_ID asc limit 15,15";
		$result = mysql_query($cmd);
		while ($row=mysql_fetch_array($result))
		{ 
			$cmd1="select avg(evaluate_subject_No1),avg(evaluate_subject_No2),avg(evaluate_subject_No3) from evaluate_subject where evaluate_subject_CourseID='$row[evaluate_system_course_ID]'";
			$result1 = mysql_query($cmd1);
			while ($row1=mysql_fetch_row($result1)){
			$data1y[] = $row1[0]; 
			$data2y[] = $row1[1]; 
			$data3y[] = $row1[2]; 
			}
		}
//$data2y=array(3.8,3.9,3.7,3.3,4,4,4,4,4,4,4,4,4);
//$data3y=array(3.8,4.3,4.6,4.8,4,4,4,4,4,4,4,4,4);

// Create the graph. These two calls are always required
$graph = new Graph(600,300,'auto');
$graph->SetScale("textlin");

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

$graph->yaxis->SetTickPositions(array(1,2,3,4,5), array(1.5,2.5,3.5,4.5));
$graph->SetBox(false);

$graph->ygrid->SetFill(false);
$graph->xaxis->SetTickLabels(array('1','2','3'));
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);

// Create the bar plots
$b1plot = new BarPlot($data1y);
$b2plot = new BarPlot($data2y);
$b3plot = new BarPlot($data3y);

// Create the grouped bar plot
$gbplot = new GroupBarPlot(array($b1plot,$b2plot,$b3plot));
// ...and add it to the graPH
$graph->Add($gbplot);


$b1plot->SetColor("white");
$b1plot->SetFillColor("#cc1111");

$b2plot->SetColor("white");
$b2plot->SetFillColor("#11cccc");

$b3plot->SetColor("white");
$b3plot->SetFillColor("#1111cc");

// Display the graph
$graph->Stroke();
?>

Hacked By AnonymousFox1.0, Coded By AnonymousFox