1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| function pubparanif($auteur,$ini,$service,$equipe,$cnu,$cli,$deb,$fin,$chaine)
{
$rand1=rand(0,9);$rand2=rand(0,9);$rand3=rand(0,9);$rand4=rand(0,9);$rand5=rand(0,9);$rand6=rand(0,9);
$rand="$rand1$rand2$rand3$rand4$rand5$rand6";
$periode="période : $deb - $fin";
if($auteur!="") //on vient de stataut.php
$titre="Auteur : $auteur $ini";
elseif($service!="") //on vient de statservice.php
$titre="Service(s) : $service";
elseif($equipe!="") //on vient de statequipe.php
$titre="Equipe(s) : $equipe";
elseif($cnu!="") //on vient de statcnu.php
$titre="Diclipline(s) : $cnu";
elseif($cli!="") //on vient de statcnu.php
$titre="Clinique(s) : $cli";
else{
$titre="Correspond au PMID enregistrés";
$periode ="";
}
// Data must be in the format : open,close,min,max,median
$datay = array(2,2,4,5,5);
// Setup a simple graph
$graph = new Graph(300,200);
$graph->SetScale("textlin");
//$graph->SetMargin(60,60,50,30);
$graph->title->Set($titre);
// Create a new stock plot
$p1 = new BoxPlot($datay);
// Width of the bars (in pixels)
$p1->SetWidth(9);
// Add the plot to the graph and send it back to the browser
$graph->Add($p1);
$graph->img->SetImgFormat('png');
$graph->img->SetQuality(50);
$graph->Stroke("pubparanif$rand.png");
return "pubparanif$rand.png";
} |
Partager