forked from halo-battle/game
Version 1.10c
This commit is contained in:
parent
4c9814a99c
commit
2a066a7498
148 changed files with 2174 additions and 134960 deletions
|
|
@ -7,7 +7,8 @@ require_once(_FCORE."kernel.php");
|
|||
require_once(_FCORE."../game/tables.php");
|
||||
|
||||
$action = intval(gpc('a'));
|
||||
$race = intval(gpc('a'));
|
||||
if (isset($sess->values['race'])) $race = $sess->values['race'];
|
||||
else $race = gpc('r');
|
||||
|
||||
$bdd = new BDD();
|
||||
$bdd->connexion();
|
||||
|
|
@ -61,35 +62,55 @@ for($i = 6; $i >= 0; $i--){
|
|||
$values[] = $evolution;
|
||||
if ($evolution >= 0 ) $evolution = '+'.$evolution;
|
||||
$values_label[] = $evolution.'%';
|
||||
$values_abscisse[] = ucfirst(strftime('%A', time() - 86400 * $i));
|
||||
$values_abscisse[] = ucfirst(strftime('%a', time() - 86400 * $i));
|
||||
}
|
||||
|
||||
//*
|
||||
require_once ("../jpgraph/jpgraph.php");
|
||||
require_once ("../jpgraph/jpgraph_line.php");
|
||||
|
||||
if ($race != "humain" && $race != "covenant") $race = "humain";
|
||||
|
||||
$graph = new Graph(282, 200);
|
||||
$graph->SetScale("textlin");
|
||||
$graph->img->SetMargin(40,20,20,40);
|
||||
|
||||
$lineplot=new LinePlot($values);
|
||||
$lineplot->mark->SetType(MARK_UTRIANGLE);
|
||||
$lineplot->SetFillColor("orange");
|
||||
$lineplot->value->show();
|
||||
$lineplot->value->SetColor('darkred');
|
||||
$lineplot->value->SetFont(FF_FONT1,FS_BOLD);
|
||||
$lineplot->value->SetFormat('%0.1f');
|
||||
|
||||
//Définition des couleurs
|
||||
$graph->SetBackgroundImage(_FCORE."../game/bourse/".$race.".png", BGIMG_COPY);
|
||||
if ($race == "covenant") {
|
||||
$graph->yaxis->SetColor("#FFFFFF");
|
||||
$graph->xaxis->SetColor("white");
|
||||
$lineplot->SetFillColor("pink@0.8");
|
||||
$lineplot->value->SetColor('#FF0000');
|
||||
$graph->yaxis->title->SetColor("white");
|
||||
$graph->title->SetColor("white");
|
||||
$lineplot->SetColor("#c00000");
|
||||
}
|
||||
else {
|
||||
$graph->yaxis->SetColor("#00DD00");
|
||||
$lineplot->SetFillColor("cyan@0.8");
|
||||
$lineplot->value->SetColor('#FF0000');
|
||||
$graph->yaxis->title->SetColor("white");
|
||||
$graph->title->SetColor("white");
|
||||
$lineplot->SetColor("#3bb3ff");
|
||||
}
|
||||
|
||||
|
||||
$graph->Add($lineplot);
|
||||
$graph->title->Set("Evolution (%)");
|
||||
$graph->xaxis->title->Set("X-title");
|
||||
$graph->yaxis->title->Set("Y-title");
|
||||
$graph->title->Set($act['nom']);
|
||||
$graph->yaxis->title->Set("Evolution (%)");
|
||||
$graph->xaxis->SetTickLabels($values_abscisse);
|
||||
|
||||
$graph->title->SetFont(FF_FONT1,FS_BOLD);
|
||||
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
|
||||
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
|
||||
|
||||
$lineplot->SetColor("blue");
|
||||
$lineplot->SetWeight(2);
|
||||
|
||||
$graph->Stroke();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue