Esempio n. 1
0
    $activityQuery .= "and guild_name LIKE \"%" . $_GET["guild_name"] . "%\" ";
}
if ($_GET["guild_tag"] != "") {
    $activityQuery .= "and guild_tag = \"" . $_GET["guild_tag"] . "\" ";
}
$activityQuery .= "GROUP BY objective.obj_id;";
//
//
//
$resultSet = $conn->query($activityQuery);
if ($resultSet->rowCount() == 0) {
    die("<b>No data returned.</b>");
}
$map = 1;
//0 for desert, 1 for alpine
if ($map == 0) {
    echo "<img src=\"gw2_desert_map.jpg\" style=\"width:2048;height:1490;position:absolute;z-index:-1;\">";
    $mapXoffset = 0;
    $mapYoffset = 0;
} else {
    echo "<img src=\"gw2_alpine_map.jpg\" style=\"width:2048;height:1490;position:absolute;z-index:-1;\">";
    $mapXoffset = 0;
    $mapYoffset = 0;
}
foreach ($resultSet as $r) {
    generate_googleChart(generate_jsontable($resultSet, array("Green Count", "Blue Count", "Red Count"), array($r["Green Count"], $r["Blue Count"], $r["Red Count"])), $r["Objective Name"], $r["obj_id"], "", $r["coordx"] + $mapXoffset, $r["coordy"] + $mapYoffset, $r["obj_type"]);
}
?>
	</body>
</html>
Esempio n. 2
0
}
if ($_GET["timeStamp_end"] != "") {
    $scoreQuery .= "and timeStamp <= \"" . $_GET["timeStamp_end"] . "\" ";
}
$scoreQuery .= " GROUP BY timeStamp, map_scores.match_id;";
//
//
//
$resultSet = $conn->query($scoreQuery);
if ($resultSet->rowCount() == 0) {
    die("<b>No data returned.</b>");
}
$resultSet = new ArrayIterator($resultSet->fetchAll());
$redName = $conn->query("SELECT name FROM server_info INNER JOIN match_details ON red_srv=srv_id WHERE match_id = \"" . $_GET["region"] . "-" . $_GET["match_num"] . "\" AND week_num = \"" . $_GET["week_num"] . "\";");
$blueName = $conn->query("SELECT name FROM server_info INNER JOIN match_details ON blue_srv=srv_id WHERE match_id = \"" . $_GET["region"] . "-" . $_GET["match_num"] . "\" AND week_num = \"" . $_GET["week_num"] . "\";");
$greenName = $conn->query("SELECT name FROM server_info INNER JOIN match_details ON green_srv=srv_id WHERE match_id = \"" . $_GET["region"] . "-" . $_GET["match_num"] . "\" AND week_num = \"" . $_GET["week_num"] . "\";");
echo "<center><table border=\"1\"><tr><td style=\"padding:8px\" bgcolor=\"#00cc00\">" . $greenName->fetchColumn() . "</td><td>|</td><td style=\"padding:8px\" bgcolor=\"#3399ff\">" . $blueName->fetchColumn() . "</td><td>|</td><td style=\"padding:8px\" bgcolor=\"#ff5050\">" . $redName->fetchColumn() . "</td></tr></table></center>";
echo "<table><tr><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green PPT", "Blue PPT", "Red PPT")), "PPT", "ppt_chart");
echo "</td><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green Score", "Blue Score", "Red Score")), "Scores", "score_chart");
echo "</td></tr><tr><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green Kills", "Blue Kills", "Red Kills")), "Kills", "kills_chart");
echo "</td><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green Deaths", "Blue Deaths", "Red Deaths")), "Deaths", "deaths_chart");
echo "</td></tr><tr><td>";
generate_googleChart(generate_jsontable($resultSet, array("Green KD%", "Blue KD%", "Red KD%")), "KD Ratio", "kd_chart");
?>
	</body>
</html>