コード例 #1
0
ファイル: games_previous.php プロジェクト: smrealms/smrv2.0
            print "<td align=center>";
            $container["body"] = "games_previous_detail.php";
            $container["game_id"] = $db2->f("game_id");
            $container["game_name"] = $db2->f("game_name");
            print_link($container, "Game Stats");
            print "</td>";
        }
        print "</table>";
    }
} else {
    //code for the game goes in here
    $db2 = new SMR_HISTORY_DB();
    $db2->query("SELECT DATE_FORMAT(start_date, '%c/%e/%Y') as start_date, type, " . "DATE_FORMAT(end_date, '%c/%e/%Y') as end_date, game_name, speed, game_id " . "FROM game WHERE game_id = '{$game_id}'");
    print_table();
    $db2->next_record();
    $start = $db2->f("start_date");
    $end = $db2->f("end_date");
    $type = $db2->f("type");
    $speed = $db2->f("speed");
    print "<tr><td align=center>General Info</td><td align=center>Other Info</td></tr>\n\t<tr>\n\t<td valign=top align=center>\n\t<table>\n\t<tr><td align=right>Name</td>           <td>&nbsp;</td><td align=left>{$game_name}</td></tr>\n\t<tr><td align=right>Start Date</td>     <td>&nbsp;</td><td align=left>{$start}</td></tr>\n\t<tr><td align=right>End Date</td>       <td>&nbsp;</td><td align=left>{$end}</td></tr>\n\t<tr><td align=right>Game Type</td>      <td>&nbsp;</td><td align=left>{$type}</td></tr>\n\t<tr><td align=right>Game Speed</td>     <td>&nbsp;</td><td align=left>{$speed}</td></tr>\n\t</table>\n\t</td>";
    $db2->query("SELECT * FROM player WHERE game_id = {$game_id} ORDER BY experience DESC");
    if ($db2->next_record()) {
        $players = $db2->nf();
        $max_exp = $db2->f("experience");
    }
    $db2->query("SELECT * FROM player WHERE game_id = {$game_id} ORDER BY alignment DESC");
    if ($db2->next_record()) {
        $align = $db2->f("alignment");
    }
    $db2->query("SELECT * FROM player WHERE game_id = {$game_id} ORDER BY alignment ASC");
    if ($db2->next_record()) {
コード例 #2
0
    } else {
        print "<td align=center{$bold}>" . $db->f("amount") . "</td>";
    }
    print "</tr>";
}
//our rank goes here if we aren't shown...first get our value
if (isset($past)) {
    $db = new SMR_HISTORY_DB();
}
if ($cat == "<b>Money Donated to SMR</b>") {
    $db->query("SELECT account_id, sum(amount) as amount FROM account_donated " . "WHERE account_id = " . SmrSession::$old_account_id . " GROUP BY account_id");
} else {
    $db->query("SELECT account_id, {$row} as amount FROM {$table} " . "{$row} > 0 AND account_id = " . SmrSession::$old_account_id . " ORDER BY amount DESC");
}
if ($db->next_record()) {
    $my_stat = $db->f("amount");
    if ($cat == "<b>Money Donated to SMR</b>") {
        $db->query("SELECT account_id, sum(amount) as amount FROM account_donated " . "WHERE amount > {$my_stat} GROUP BY account_id ORDER BY amount DESC");
    } else {
        $db->query("SELECT account_id, {$row} as amount FROM {$table} " . "{$row} > {$my_stat} ORDER BY amount DESC");
    }
    $better = $db->nf();
} else {
    $my_stat = 0;
    if ($cat == "<b>Money Donated to SMR</b>") {
        $db->query("SELECT account_id, sum(amount) as amount FROM account_donated " . "GROUP BY account_id ORDER BY amount DESC");
    } else {
        $db->query("SELECT account_id, {$row} as amount FROM {$table} {$row} > 0 ORDER BY amount DESC");
    }
    $better = $db->nf();
}
コード例 #3
0
<?php

require_once get_file_loc("smr_history_db.inc");
//offer a back button
$container = array();
$container["url"] = "skeleton.php";
$container["body"] = "games_previous.php";
$db = new SMR_HISTORY_DB();
$db->query("SELECT * FROM game WHERE game_id = {$var['game_id']}");
$db->next_record();
$game_id = $db->f("game_id");
$container["game_id"] = $game_id;
$container["game_name"] = $db->f("game_name");
//get alliance members
$id = $var["alliance_id"];
print "{$game_id}, {$id}";
$db->query("SELECT * FROM alliance WHERE alliance_id = {$id} AND game_id = {$game_id}");
$db->next_record();
print "<div align=center>";
print_link($container, "<b>&lt;&lt;Back</b>");
print_topic("Alliance Roster - " . stripslashes($db->f("alliance_name")));
$db->query("SELECT * FROM player WHERE alliance_id = {$id} AND game_id = {$game_id} ORDER BY experience DESC");
echo '
<table cellspacing="0" cellpadding="0" class="standard">
	<tr>
		<th>Player Name</th>
		<th>Experience</th>
		<th>Alignment</th>
		<th>Race</th>
		<th>Kills</th>
		<th>Deaths</th>
コード例 #4
0
     $dis = "Alliance Deaths";
     $gr = "dummy";
 }
 $db2 = new SMR_HISTORY_DB();
 if (empty($gr)) {
     $db2->query("SELECT {$sql} as val, sector_id FROM {$from} WHERE game_id = {$game_id} {$gr} ORDER BY {$sql} DESC LIMIT 30");
     $container = array();
     $container["url"] = "skeleton.php";
     $container["body"] = "games_previous_detail.php";
     $container["game_id"] = $game_id;
     $container["game_name"] = $game_name;
     print_link($container, "<b>&lt;&lt;Back</b>");
     print_table();
     print "<tr><th align=center>Sector ID</th><th align=center>{$dis}</th></tr>";
     while ($db2->next_record()) {
         $sector_id = $db2->f("sector_id");
         $val = $db2->f("val");
         print "<tr><td>{$sector_id}</td><td>{$val}</td></tr>";
     }
     print "</table>";
 } else {
     $sql = "SELECT alliance_id, {$sql} as val FROM {$from} WHERE game_id = {$game_id} AND alliance_id > 0 GROUP BY alliance_id ORDER BY val DESC LIMIT 30";
     $db2->query("{$sql}");
     $db = new SMR_HISTORY_DB();
     $container = array();
     $container["url"] = "skeleton.php";
     $container["body"] = "games_previous_detail.php";
     $container["game_id"] = $game_id;
     $container["game_name"] = $game_name;
     print_link($container, "<b>&lt;&lt;Back</b>");
     print_table();
コード例 #5
0
//games_previous_news.php
if (isset($_REQUEST['min'])) {
    $min = $_REQUEST['min'];
} else {
    $min = 1;
}
if (isset($_REQUEST['max'])) {
    $max = $_REQUEST['max'];
} else {
    $max = 50;
}
$game_id = $var["game_id"];
$container = array();
$container["url"] = "skeleton.php";
$container["body"] = "games_previous_news.php";
$container["game_id"] = $game_id;
print_form($container);
print "<div align=center>Show News<br>Min:<input id=Inputfields type=text value={$min} name=min size=5> - Max:<input id=Inputfields type=text value={$max} name=max size=5><br>";
print_submit("Show");
print "</form>";
$db2 = new SMR_HISTORY_DB();
$db2->query("SELECT * FROM news WHERE game_id = {$game_id} AND news_id >= {$min} AND news_id <= {$max}");
print_table();
print "<tr><th align=center>Time</th><th align=center>News</th></tr>";
while ($db2->next_record()) {
    $time = $db2->f("time");
    $news = $db2->f("message");
    print "<tr><td>" . date("n/j/Y g:i:s A", $time) . "</td><td>{$news}</td></tr>";
}
print "</table></div>";
$db = new SmrMySqlDatabase();