コード例 #1
0
ファイル: guild_analyser.php プロジェクト: JRavet/Capstone
echo "<tr><td>Sort by:</td><td><select name=\"sort_by\">";
generate_option("count(*)", "Claim Count", "sort_by");
generate_option("guild.guild_name", "Guild Name", "sort_by");
generate_option("guild.guild_tag", "Guild Tag", "sort_by");
echo "</select>\n\t\t<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>Owner server: </td><td><input type=\"text\" name=\"obj_owner\" value=\"" . $_GET["obj_owner"] . "\"/></td></tr>\n\t\t<tr><td>Owner color:</td><td><select name=\"owner_color\">";
generate_option("", "", "owner_color");
generate_option("Green", "Green", "owner_color");
generate_option("Blue", "Blue", "owner_color");
generate_option("Red", "Red", "owner_color");
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>";
コード例 #2
0
ファイル: map_score_table.php プロジェクト: JRavet/Capstone
	<style>body{background:#FFF;}</style>
	<body>
	<?php 
echo "<form action=\"map_score_table.php\" method=\"GET\">\n\t<table class=\"table-condensed\">";
echo "<tr><td>Sort by:</td><td><select name=\"sort_by\">";
generate_option("week_num,timeStamp,map_scores.match_id", "Week Number, Time Stamp, Match ID", "sort_by");
generate_option("week_num,map_scores.match_id,timeStamp", "Week Number, Match ID, Time Stamp", "sort_by");
generate_option("timeStamp", "Time Stamp", "sort_by");
generate_option("map_scores.match_id", "Match ID", "sort_by");
generate_option("week_num", "Week Number", "sort_by");
echo "</select></tr>\n\t\t<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>";
createDateTime("Time stamp", "timeStamp_begin", "timeStamp_end");
echo "<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>Page #:</td><td><input type=\"number\" min=\"0\" name=\"offset_num\" value=\"" . $_GET["offset_num"] . "\"/></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=\"map_score_table.php\">\n\t\t<input type=\"submit\" value=\"Reset fields\"/>\n\t</form></td>\n\t</tr>\n\t</table>";
?>
	<br/>
	<?php 
$offset_amount = 500;
$limit = 50000;
$scoreQuery = "SELECT map_scores.match_id as \"Match ID\", week_num as \"Week Number\",\n\t\t\ttimeStamp as \"Time Stamp\", sum(greenDeaths) as \"Green Deaths\",\n\t\t\tsum(blueDeaths) as \"Blue Deaths\", sum(redDeaths) as \"Red Deaths\",\n\t\t\tsum(greenKills) as \"Green Kills\", sum(blueKills) as \"Blue Kills\",\n\t\t\tsum(redKills) as \"Red Kills\", sum(greenScore) as \"Green Score\",\n\t\t\tsum(blueScore) as \"Blue Score\", sum(redScore) as \"Red Score\",\n\t\t\tsum(green_ppt) as \"Green PPT\", sum(blue_ppt) as \"Blue PPT\",\n\t\t\tsum(red_ppt) as \"Red PPT\", s3.name as \"Green Server\",\n\t\t\ts2.name as \"Blue Server\", s1.name as \"Red Server\",\n\t\t\tsum(error_corrected) as \"Errors Corrected\",\n\t\t\tsum(greenKills)/sum(greenDeaths) as \"Green KD\",\n\t\t\tsum(blueKills)/sum(blueDeaths) as \"Blue KD\",\n\t\t\tsum(redKills)/sum(redDeaths) as \"Red KD\"\n\t\t\tFROM map_scores \n\t\t\tINNER JOIN match_details ON map_scores.match_id = match_details.match_id\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_details.start_time = map_scores.start_time ";
コード例 #3
0
ファイル: legal.php プロジェクト: Annon201/IML
<?php

$timezone = new DateTimeZone("Australia/Melbourne");
$birthday = createDateTime(1992, 11, 23, 0, 0, 0);
$legalage = $birthday;
$legalage->modify('+18 years');
function isMileyLegal($datetime = false, $rss = false)
{
    global $legalage;
    if (!$datetime) {
        $datetime = currentDateTime();
    }
    $id = $datetime->format('Ymd');
    $timestamp1 = $datetime->format('U');
    $timestamp2 = $legalage->format('U');
    $legal = dateComp($timestamp1, $timestamp2);
    switch ($legal) {
        case 1:
            $title = "NO";
            $descr = "Miley will be legal in ";
            break;
        case 2:
            $title = "YES";
            $descr = "Miley has been legal for ";
            break;
        case 3:
            $title = "YES";
            $descr = "Miley became legal today!";
            $result = array($id, $title, $descr);
            break;
        default:
コード例 #4
0
ファイル: rss.php プロジェクト: Annon201/IML
<?php

include_once 'legal.php';
header('Content-type: application/rss+xml');
echo '<?xml version="1.0"?>' . "\n";
echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">' . "\n";
echo "\t<channel>\n";
echo "\t\t<title>Is Miley legal?</title>\n";
echo "\t\t<link>http://www.ismileylegal.com/</link>\n";
echo "\t\t<description>Is Miley Cyrus of legal age in Australia?</description>\n";
echo "\t\t<language>en-us</language>\n";
echo "\t\t" . '<atom:link href="http://www.ismileylegal.com/rss.xml" rel="self" type="application/rss+xml" />' . "\n";
$today = currentDateTime();
$checkdate = createDateTime($today->format('Y'), $today->format('m'), $today->format('d'), 6, 0, 0);
for ($x = 0; $x < 20; $x++, $checkdate->modify("-1 day")) {
    list($id, $title, $descr) = isMileyLegal($checkdate, true);
    echo "\t\t\n";
    echo "\t\t<item>\n";
    echo "\t\t\t<title>{$title}</title>\n";
    echo "\t\t\t<description>{$descr}</description>\n";
    echo "\t\t\t<link>http://www.ismileylegal.com/#{$id}</link>\n";
    echo "\t\t\t<guid>http://www.ismileylegal.com/#{$id}</guid>\n";
    echo "\t\t\t<pubDate>" . $checkdate->format("r") . "</pubDate>\n";
    echo "\t\t</item>\n";
}
echo "\t\t\n";
echo "\t</channel>\n";
echo "</rss>";