Skip to content

Commit e797fae

Browse files
committed
fixed data source mixture bug
1 parent 604590c commit e797fae

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
if ($DEBUG) var_dump($donor_object);
3131

3232
$team_data = file_get_contents("https://api.foldingathome.org/team/".$_GET["team"], false, stream_context_create($arr_context_options)) or die("api failed");
33-
$team_object = json_decode($donor_data, true);
33+
$team_object = json_decode($team_data, true);
3434
if ($DEBUG) var_dump($team_object);
3535

3636
// Load canvas
@@ -58,11 +58,11 @@
5858
imagettftext($canvas, $text_size, 0, 90, 82, $color, $text_fonts, $team_object["score"]); // score
5959

6060
// For donor
61-
imagettftext($canvas, $text_size, 0, 280, 13, $color, $text_fonts, $team_object["name"]); // name
62-
imagettftext($canvas, $text_size, 0, 290, 32, $color, $text_fonts, $team_object["rank"]); // rank
63-
imagettftext($canvas, $text_size, 0, 300, 50, $color, $text_fonts, $team_object["wus"]); // wus
64-
imagettftext($canvas, $text_size, 0, 280, 68, $color, $text_fonts, $team_object["score"]); // score
65-
imagettftext($canvas, $text_size, 0, 310, 82, $color, $text_fonts, $team_object["last"]); // last done
61+
imagettftext($canvas, $text_size, 0, 280, 13, $color, $text_fonts, $donor_object["name"]); // name
62+
imagettftext($canvas, $text_size, 0, 290, 32, $color, $text_fonts, $donor_object["rank"]); // rank
63+
imagettftext($canvas, $text_size, 0, 300, 50, $color, $text_fonts, $donor_object["wus"]); // wus
64+
imagettftext($canvas, $text_size, 0, 280, 68, $color, $text_fonts, $donor_object["score"]); // score
65+
imagettftext($canvas, $text_size, 0, 310, 82, $color, $text_fonts, $donor_object["last"]); // last done
6666

6767
if (!$DEBUG) header("content-type:image/png");
6868
imagepng($canvas);

0 commit comments

Comments
 (0)