Skip to content

Commit

Permalink
Ajout possibilité graph même sans points général.
Browse files Browse the repository at this point in the history
  • Loading branch information
pitch314 committed Jan 14, 2021
1 parent 7d2f3d6 commit d896798
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions views/home_stat.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@
// on fabrique toutes les courbes ici
global $zoom;
$zoom = 'false';
$curve = create_curves($user_data["user_stat_name"], $min_date, $max_date,
$player_comp);
$curve = create_curves($user_data["user_stat_name"], $min_date, $max_date, $player_comp);

$title = $lang['HOME_STATS_GRAPHIC_TITLE'];
if (!empty($user_data["user_stat_name"])) {
Expand Down Expand Up @@ -327,17 +326,17 @@
echo "<th align='center' width='400'>";
echo "<div id='pie_point'>";
// pas d info
if ($b == 0 && $d == 0 && $l == 0 && $t == 0) {
if ($b == 0 && $d == 0 && $l == 0 && $t == 0) { // calcul impossible ( non connaissance du classement)
echo $lang['HOME_STATS_GRAPHIC_NOEMPIREDATA'];
}

// calcul impossible ( non connaissance du classement)
elseif ($last["general_pts"] == 0) {
echo $lang['HOME_STATS_GRAPHIC_NOSTATSDATA'];
}

// autrement on affiche rien : on prepare juste l affichage du script
// elseif ($last["general_pts"] == 0) { // autrement on affiche rien : on prepare juste l affichage du script
// echo $lang['HOME_STATS_GRAPHIC_NOSTATSDATA'];
// }
else {
if ($last["general_pts"] == 0) {
echo $lang['HOME_STATS_GRAPHIC_NOSTATSDATA'] . "<br>/n";
$f = round(all_fleet_cumulate($user_building) / 1000); // only FOR et Sat, pour le moment
}
$pie_point = create_pie($b . "_x_" . $d . "_x_" . $l . "_x_" . $f . "_x_" . $t,
"Batiments_x_Défenses_x_Lunes_x_Flotte_x_Technologies",
$lang['HOME_STATS_GRAPHIC_LASTREPARTITION'], "pie_point");
Expand All @@ -362,13 +361,9 @@
$pie_empire = "";
echo "<th align='center' width='400'>";
echo "<div id='pie_empire' width='400'>";
// pas d info
if ($b == 0 && $d == 0 && $l == 0 && $t == 0) {
if ($b == 0 && $d == 0 && $l == 0 && $t == 0) { // pas d info
echo $lang['HOME_STATS_GRAPHIC_NOEMPIREDATA'];
}

// autrement on affiche rien : on prepare juste l affichage du script
else {
} else { // autrement on affiche rien : on prepare juste l affichage du script
$pie_empire = create_pie(implode('_x_', $planet), implode('_x_', $planet_name),
$lang['HOME_STATS_GRAPHIC_REPARTITION'], "pie_empire");
}
Expand All @@ -377,12 +372,7 @@
echo "</th></tr></table>";

?>



<br/>


<br/>
<table>
<tr>
<td class="c" colspan="17"><?php echo($lang['HOME_STATS_RANKING']); ?> <a><?php echo $user_data["user_stat_name"]; ?></a></td>
Expand Down

0 comments on commit d896798

Please sign in to comment.