Exemplo n.º 1
0
echo "</select></td></tr>";
createDateTime("Last seized", "last_flipped_begin", "last_flipped_end");
createDateTime("Claimed at", "claimed_at_begin", "claimed_at_end");
echo "<tr><td>In-game clock time: </td><td><input type=\"number\" min=\"1\" max=\"15\" name=\"tick_timer_begin\" value=\"" . $_GET["tick_timer_begin"] . "\"/></td>\n\t\t\t<td>-</td><td><input type=\"number\"min=\"1\" max=\"15\" name=\"tick_timer_end\" value=\"" . $_GET["tick_timer_end"] . "\"/></td></tr>\n\t\t<tr><td>Objective name: </td><td><input type=\"text\" name=\"obj_name\" value=\"" . $_GET["obj_name"] . "\"/></td></tr>\n\t\t<tr><td>Objective type: </td><td><select name=\"obj_type\">";
generate_option("", "", "obj_type");
generate_option("Camp", "Camp", "obj_type");
generate_option("Tower", "Tower", "obj_type");
generate_option("Keep", "Keep", "obj_type");
generate_option("Castle", "Castle", "obj_type");
echo "</select></td></tr>\n\t\t<tr><td>Map type: </td><td><select name=\"map_type\">";
generate_option("", "All Maps", "map_type");
generate_option("center", "Eternal Battlegrounds", "map_type");
generate_option("greenHome", "Green Borderlands", "map_type");
generate_option("blueHome", "Blue Borderlands", "map_type");
generate_option("redHome", "Red Borderlands", "map_type");
generate_option("home", "All Borderlands", "map_type");
echo "</select></td></tr>\n\t\t<tr><td>Guild name: </td><td><input type=\"text\" name=\"guild_name\" value=\"" . $_GET["guild_name"] . "\"/></td></tr>\n\t\t<tr><td>Guild tag: </td><td><input type=\"text\" name=\"guild_tag\" value=\"" . $_GET["guild_tag"] . "\"/></td></tr>";
echo "</table></div>\n\t<table>\n\t<tr>\n\t<td><input type=\"submit\" value=\"Submit Query\"/></td><td style=\"width:175px\"></td>\n\t</form></td>\n\t<td><form action=\"guild_analyser.php\">\n\t\t<input type=\"submit\" value=\"Reset fields\"/>\n\t</form></td>\n\t</tr>\n\t</table>";
?>
	<br/>
	<?php 
$guildClaimQuery = "SELECT count(*) as \"Number of Claims\", guild_name as \"Guild Name\", guild_tag as \"Guild Tag\"\n\t\tFROM activity_data\n\t\tINNER JOIN server_info ON activity_data.owner_server = server_info.srv_id\n\t\tINNER JOIN objective ON activity_data.obj_id=objective.obj_id\n\t\tINNER JOIN guild ON guild.guild_id = activity_data.guild_id\n\t\tINNER JOIN match_details on match_details.match_id=activity_data.match_id\n\t\tWHERE match_details.start_time = activity_data.start_time and guild_name!=\"\" ";
//automatically eliminate any activity-data without a guild claim
if ($_GET["match_num"] == "" and $_GET["week_num"] == "" and $_GET["obj_owner"] == "" and $_GET["owner_color"] == "" and $_GET["last_flipped_begin"] == "" and $_GET["last_flipped_end"] == "" and $_GET["claimed_at_begin"] == "" and $_GET["claimed_at_end"] == "" and $_GET["tick_timer_begin"] == "" and $_GET["tick_timer_end"] == "" and $_GET["obj_name"] == "" and $_GET["obj_type"] == "" and $_GET["map_type"] == "" and $_GET["guild_name"] == "" and $_GET["guild_tag"] == "" and $_GET["region"] == "") {
    die("");
    //if the user did not enter any search criteria, stop early
}
check_inputs();
if ($_GET["region"] != "") {
    $guildClaimQuery .= "and activity_data.match_id LIKE \"" . $_GET["region"] . "-%\" ";
}
Exemplo n.º 2
0
<?php

include 'analyser_header.php';
include 'bootstrap_styling.php';
?>
<html>
	<title> Match Details Analyser </title>
	<style>body{background:#FFF;}</style>
	<body>
	<div class="container-fluid col-sm-12">
	<?php 
echo "<form action=\"match_details_analyser.php\" method=\"GET\">\n\t<table class=\"table-condensed\">";
echo "<tr><td>Region / Match Number:</td><td> <select name=\"region\">";
generate_option("", "", "region");
generate_option("1", "1 (NA)", "region");
generate_option("2", "2 (EU)", "region");
echo "</select><input type=\"number\" min=\"1\" max=\"9\" name=\"match_num\" value=\"" . $_GET["match_num"] . "\"/></td></tr> \n\t\t<tr><td>Week number: </td><td><input type=\"number\" min=\"0\" max=\"52\" name=\"week_num\" value=\"" . $_GET["week_num"] . "\"/></td></tr>\n\t\t<tr><td>Server name: </td><td><input name=\"obj_owner\" value=\"" . $_GET["obj_owner"] . "\"/></td></tr>";
echo "</table>\n\t<table>\n\t<tr>\n\t<td><input type=\"submit\" value=\"Submit Query\"/></td><td style=\"width:175px\"></td>\n\t</form></td>\n\t<td><form action=\"match_details_analyser.php\" method=\"GET\">\n\t\t<input type=\"submit\" value=\"Reset fields\"/>\n\t</form></td>\n\t</tr>\n\t</table>";
?>
	</div>
	<br/>
	<?php 
$matchQuery = "SELECT match_id as \"Match ID\", week_num as \"Week Number\",\n\t\t\tstart_time as \"Start Time\", end_time as \"End Time\", s1.name as \"Red Server\", s1_1.name as \"Red Server2\",\n\t\t\ts2.name as \"Blue Server\", s2_1.name as \"Blue Server2\", s3.name as \"Green Server\", s3_1.name as \"Green Server2\",\n\t\t\tgrn_srv_population as \"Green Population\", blu_srv_population as \"Blue Population\", red_srv_population as \"Red Population\",\n\t\t\tgrn_srv2_pop as \"Green Population2\", blu_srv2_pop as \"Blue Population2\", red_srv2_pop as \"Red Population2\"\n\t\t\tFROM match_details\n\t\t\tLEFT JOIN server_info s1_1 on s1_1.srv_id = red_srv2\n\t\t\tLEFT JOIN server_info s2_1 on s2_1.srv_id = blue_srv2\n\t\t\tLEFT JOIN server_info s3_1 on s3_1.srv_id = green_srv2\n\t\t\tINNER JOIN server_info s1 ON s1.srv_id = red_srv\n\t\t\tINNER JOIN server_info s2 ON s2.srv_id = blue_srv\n\t\t\tINNER JOIN server_info s3 ON s3.srv_id = green_srv\n\t\t\tWHERE match_id = match_id ";
//dummy where clause
check_inputs();
if ($_GET["region"] != "") {
    $matchQuery .= "and match_id LIKE \"" . $_GET["region"] . "-%\" ";
}
if ($_GET["match_num"] != "") {
    $matchQuery .= "and match_id LIKE \"%-" . $_GET["match_num"] . "\" ";
}