| Line 12... |
Line 12... |
| 12 |
echo 'Message DBMS/Utilisateur : ' . $db->getUserInfo() . "\n";
|
12 |
echo 'Message DBMS/Utilisateur : ' . $db->getUserInfo() . "\n";
|
| 13 |
echo 'Message DBMS/Déboguage : ' . $db->getDebugInfo() . "\n";
|
13 |
echo 'Message DBMS/Déboguage : ' . $db->getDebugInfo() . "\n";
|
| 14 |
exit;
|
14 |
exit;
|
| 15 |
}
|
15 |
}
|
| Line 16... |
Line 16... |
| 16 |
|
16 |
|
| 17 |
$tab_mois = array('', "Jan","Fev","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Dec");
|
17 |
$tab_mois = array('', 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Août', 'Sep', 'Oct', 'Nov', 'Dec');
|
| - |
|
18 |
$tab_donnees = array(0);
|
| - |
|
19 |
if (isset($_GET['annee'])) {
|
| - |
|
20 |
$tps_debut = mktime(0,0,0,1,1, $_GET['annee']);
|
| - |
|
21 |
$tps_fin = mktime(23,59,59,12,31, $_GET['annee']);
|
| - |
|
22 |
$annee = $_GET['annee'];
|
| 18 |
$tab_donnees = array(0);
|
23 |
} else {
|
| - |
|
24 |
$tps_debut = mktime(0,0,0,1,1);
|
| - |
|
25 |
$tps_fin = time();// jour courrant
|
| - |
|
26 |
$annee = date('Y', $tps_fin);
|
| 19 |
$tps_debut = mktime(0,0,0,1,1);
|
27 |
}
|
| 20 |
$tps_courrant = $tps_debut;
|
- |
|
| 21 |
$tps_fin = time();// jour courrant
|
28 |
$tps_courrant = $tps_debut;
|
| 22 |
$i = 1;
|
29 |
$i = 1;
|
| 23 |
//Requete par mois
|
30 |
//Requete par mois
|
| 24 |
while ($tps_courrant <= $tps_fin) {
|
31 |
while ($tps_courrant <= $tps_fin) {
|
| 25 |
$tps_semaine_suivante = $tps_courrant + (7 * 24 * 60 * 60);
|
32 |
$tps_semaine_suivante = $tps_courrant + (7 * 24 * 60 * 60);
|
| 26 |
$tps_mois_suivant = mktime(0,0,0,$i+1,1);
|
33 |
$tps_mois_suivant = mktime(0,0,0,$i+1,1,$annee);
|
| 27 |
//echo date('Y-m-d H:i:s', $tps_courrant).' - '.date('Y-m-d H:i:s', $tps_mois_suivant);
|
34 |
//echo date('Y-m-d H:i:s', $tps_courrant).' - '.date('Y-m-d H:i:s', $tps_mois_suivant);
|
| 28 |
$requete = 'SELECT IS_ACTION '.
|
35 |
$requete = 'SELECT IS_ACTION '.
|
| 29 |
'FROM ins_STATS '.
|
36 |
'FROM ins_STATS '.
|
| 30 |
'WHERE IS_DATE >= "'.date('Y-m-d H:i:s', $tps_courrant).'" '.
|
37 |
'WHERE IS_DATE >= "'.date('Y-m-d H:i:s', $tps_courrant).'" '.
|
| Line 40... |
Line 47... |
| 40 |
$tps_courrant = $tps_mois_suivant;
|
47 |
$tps_courrant = $tps_mois_suivant;
|
| 41 |
$i++;
|
48 |
$i++;
|
| 42 |
}
|
49 |
}
|
| 43 |
//echo '<pre>'.print_r($tab_donnees, true).'</pre>';
|
50 |
//echo '<pre>'.print_r($tab_donnees, true).'</pre>';
|
| Line 44... |
Line 51... |
| 44 |
|
51 |
|
| 45 |
$graph = new Graph(500,440,"auto");
|
52 |
$graph = new Graph(500, 440, 'auto');
|
| 46 |
$graph->img->SetMargin(50,50,30,50);
|
53 |
$graph->img->SetMargin(50, 50, 30, 50);
|
| 47 |
$graph->SetMarginColor("white");
|
54 |
$graph->SetMarginColor('white');
|
| 48 |
$graph->SetScale('textint');
|
55 |
$graph->SetScale('textint');
|
| 49 |
$graph->xaxis->SetTickLabels($tab_mois);
|
56 |
$graph->xaxis->SetTickLabels($tab_mois);
|
| 50 |
$graph->SetShadow();
|
57 |
$graph->SetShadow();
|
| 51 |
$graph->title->Set("Évolution des inscriptions au Réseau");
|
58 |
$graph->title->Set('Évolution des inscriptions au Réseau');
|
| 52 |
$graph->title->SetFont(FF_FONT1,FS_BOLD);
|
59 |
$graph->title->SetFont(FF_FONT1,FS_BOLD);
|
| Line 53... |
Line 60... |
| 53 |
$graph->xaxis->title->Set("Mois depuis le 1er janvier ".date('Y'));
|
60 |
$graph->xaxis->title->Set("Mois depuis le 1er janvier $annee");
|
| 54 |
|
61 |
|
| 55 |
$LinePlot = new LinePlot($tab_donnees);
|
62 |
$LinePlot = new LinePlot($tab_donnees);
|
| 56 |
$LinePlot->value->Show();
|
63 |
$LinePlot->value->Show();
|
| Line 57... |
Line 64... |
| 57 |
$LinePlot->value->SetFormat("%s");
|
64 |
$LinePlot->value->SetFormat('%s');
|
| 58 |
$LinePlot->SetColor("brown") ;
|
65 |
$LinePlot->SetColor('brown') ;
|
| 59 |
|
66 |
|
| 60 |
$graph->Add($LinePlot);
|
67 |
$graph->Add($LinePlot);
|