Exemplo n.º 1
0
<?php

$player->get_relations();
print_topic("TRADER RELATIONS");
include get_file_loc('menue.inc');
print_trader_menue();
print "<p align=\"center\">";
print "<table cellspacing=\"0\" cellpadding=\"5\" width=\"60%\" border=\"0\" class=\"standard\">";
print "<tr>";
print "<th valign=\"top\" width=\"50%\">Relations (Global)</th>";
print "<th valign=\"top\" width=\"50%\">Relations (Personal)</th>";
print "</tr>";
print "<tr>";
print "<td valign=\"top\" width=\"50%\">";
print "<p>";
$db->query("SELECT * FROM race");
while ($db->next_record()) {
    $race_id = $db->f("race_id");
    if ($race_id == 1) {
        continue;
    }
    $race_name = $db->f("race_name");
    print "{$race_name} : " . get_colored_text($player->relations_global_rev[$race_id], $player->relations_global_rev[$race_id]) . "<br>";
}
print "</p>";
print "</td>";
print "<td valign=\"top\">";
print "<p>";
$db->query("SELECT * FROM race");
while ($db->next_record()) {
    $race_id = $db->f("race_id");
<?php

print_topic("WRITTING AN ARTICLE");
include get_file_loc('menue.inc');
print_galactic_post_menue();
print "What is the title?<br>";
$container = array();
$container["url"] = "galactic_post_write_article_processing.php";
print_form($container);
print "<input type=\"text\" name=\"title\" id=\"InputFields\" style=\"text-align:center;width:525;\"><br><br>";
print "<br>Write what you want to write here!<br>";
print "<textarea name=\"message\" id=\"InputFields\" style=\"width:350px;height:100px;\"></textarea><br><br>";
print_submit("Enter the article");
print "</form>";
<?php

print_topic("VIEWING MEMBERS");
include get_file_loc('menue.inc');
print_galactic_post_menue();
$container = array();
$container["url"] = "skeleton.php";
$container["body"] = "galactic_post_view_members.php";
if ($action == "Remove") {
    $db->query("DELETE FROM galactic_post_writer WHERE game_id = {$player->game_id} AND account_id = {$var['id']}");
}
$db->query("SELECT * FROM galactic_post_writer WHERE game_id = {$player->game_id} AND account_id != {$player->account_id}");
if ($db->nf()) {
    print_table();
    print "<tr>";
    print "<th align=\"center\">Player Name</th>";
    print "<th align=\"center\">Last Wrote</th>";
    print "<th align=\"center\">Options</th>";
    print "</tr>";
    while ($db->next_record()) {
        $curr_writter = new SMR_PLAYER($db->f("account_id"), $player->game_id);
        $time = $db->f("last_wrote");
        print "<tr>";
        print "<td align=\"center\">{$curr_writter->player_name}</td>";
        print "<td align=\"center\"> " . date("n/j/Y g:i:s A", $time) . "</td>";
        $container["id"] = $curr_writter->account_id;
        print_form($container);
        print "<td>";
        print_submit("Remove");
        print "</td>";
        print "</tr>";
Exemplo n.º 4
0
    $table = "player_has_stats_cache WHERE game_id = {$game_id} AND";
    $db2 = new SMR_HISTORY_DB();
    $db2->query("SELECT * FROM game WHERE game_id = {$game_id}");
    //if next record we have an old game so we query the hist db
    if ($db2->next_record()) {
        $db = new SMR_HISTORY_DB();
        $past = "Yes";
        $table = "player_has_stats WHERE game_id = {$game_id} AND";
    } else {
        $db = new SmrMySqlDatabase();
    }
} else {
    $table = "account_has_stats_cache WHERE";
}
print "<div align=center>";
print_topic("Hall of Fame - {$cat} {$action}");
$container = array();
$container["url"] = "skeleton.php";
$container["body"] = "hall_of_fame_new.php";
if (isset($game_id)) {
    $container["game_id"] = $game_id;
}
print_link($container, "<b>&lt;&lt;Back</b>");
print "<br>";
print "Here are the ranks of players by {$cat} {$action}<br><br>";
print_table();
print "<tr><th align=center>Rank</th><th align=center>Player</th><th align=center>{$cat} {$action}</th></tr>";
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 LIMIT 25");
} else {
    $db->query("SELECT account_id, {$row} as amount FROM {$table} {$row} > 0 ORDER BY amount DESC LIMIT 25");
Exemplo n.º 5
0
require_once get_file_loc("smr_history_db.inc");
print "<div align=center>";
//topic
if (isset($var["game_name"])) {
    $game_name = $var["game_name"];
}
if (isset($var["game_id"])) {
    $game_id = $var["game_id"];
}
if (isset($game_name)) {
    $topic = "Game {$var['game_name']}";
} else {
    $topic = "Games";
}
print_topic("Viewing Old SMR {$topic}");
if (!isset($game_name)) {
    //list old games
    $db2 = new SMR_HISTORY_DB();
    $db2->query("SELECT DATE_FORMAT(start_date, '%c/%e/%Y') as start_date, " . "DATE_FORMAT(end_date, '%c/%e/%Y') as end_date, game_name, speed, game_id " . "FROM game ORDER BY game_id");
    if ($db2->nf()) {
        print_table();
        print "<tr><th align=center>Game Name</th><th align=center>Start Date</th><th align=center>End Date</th><th align=center>Speed</th><th align=center colspan=3>Options</th></tr>";
        while ($db2->next_record()) {
            $id = $db2->f("game_id");
            $container = array();
            $container["url"] = "skeleton.php";
            $container["game_id"] = $db2->f("game_id");
            $container["game_name"] = $db2->f("game_name");
            $container["body"] = "games_previous.php";
            $name = $db2->f("game_name");
Exemplo n.º 6
0
<?php

require_once get_file_loc('smr_sector.inc');
$sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id);
print_topic("PLOT A COURSE");
// create menu
$container = array();
$container['url'] = 'skeleton.php';
$container['body'] = 'course_plot.php';
$menue_items[] = create_link($container, 'Plot a Course');
if ($player->land_on_planet == 'FALSE') {
    $container['body'] = 'map_local.php';
    $menue_items[] = create_link($container, 'Local Map');
}
$menue_items[] = '<a href="' . URL . '/map_galaxy.php" target="_blank">Galaxy Map</a>';
// print it
print_menue($menue_items);
echo '<table cellspacing="0" cellpadding="0" style="width:100%;border:none"><tr><td style="padding:0px;vertical-align:top">';
print "The plotted course is " . $var["distance"] . " sectors long.";
echo '</td><td style="padding:0px;vertical-align:top;width:32em">';
// get the array back
$route = unserialize($var["plotted_course"]);
$full = implode(' - ', $route);
// throw start sector away
// it's useless for the route
array_shift($route);
// now get the sector we are going to but don't remove it (sector_move_processing does it)
$next_sector = $route[0];
if ($next_sector == $sector->link_up || $next_sector == $sector->link_down || $next_sector == $sector->link_left || $next_sector == $sector->link_right || $next_sector == $sector->warp) {
    // save this to db (if we still have something
    if (!empty($route)) {
Exemplo n.º 7
0
<?php

require_once get_file_loc('smr_sector.inc');
print_topic("SECTOR DEATH RANKINGS");
include get_file_loc('menue.inc');
print_ranking_menue(3, 0);
print "<div align=\"center\">";
print "<p>Here are the most deadly Sectors!</p>";
print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"60%\">";
print "<tr>";
print "<th>Rank</th>";
print "<th>Sector</th>";
print "<th>Battles</th>";
print "</tr>";
$db->query("SELECT * FROM sector WHERE game_id = {$player->game_id} ORDER BY battles DESC, sector_id LIMIT 10");
$rank = 0;
while ($db->next_record()) {
    // get current player
    $curr_sector = new SMR_SECTOR($db->f("sector_id"), $player->game_id, $player->account_id);
    // increase rank counter
    $rank++;
    print "<tr>";
    print "<td valign=\"top\" align=\"center\"";
    if ($player->sector_id == $curr_sector->sector_id) {
        print " style=\"font-weight:bold;\"";
    }
    print ">{$rank}</td>";
    print "<td valign=\"top\" align=\"center\"";
    if ($player->sector_id == $curr_sector->sector_id) {
        print " style=\"font-weight:bold;\"";
    }
Exemplo n.º 8
0
$amount = $_REQUEST['amount'];
$account_id = $_REQUEST['account_id'];
if (!is_numeric($amount)) {
    print_error("Numbers only please");
    return;
}
$amount = round($amount);
if ($amount <= 0) {
    print_error("You can only tranfer a positive amount");
    return;
}
if ($amount > $account->get_credits()) {
    print_error("You can't transfer more than you have!");
    return;
}
print_topic("Confirmation");
print "Are you sure you want to transfer {$amount} credits to<br>";
$db->query("SELECT * FROM account WHERE account_id = {$account_id}");
if ($db->next_record()) {
    $login = $db->f("login");
}
$db->query("SELECT * FROM player WHERE account_id = {$account_id}");
if ($db->nf()) {
    while ($db->next_record()) {
        $player_name = stripslashes($db->f("player_name"));
        $game_id = $db->f("game_id");
        $db2->query("SELECT * FROM game WHERE game_id = {$game_id}");
        if ($db2->next_record()) {
            $game_name = $db2->f("game_name");
        }
        print "{$player_name} in game {$game_name}({$game_id})<br>";
Exemplo n.º 9
0
<?php

print_topic("Racial Standings");
include get_file_loc('menue.inc');
print_ranking_menue(2, 2);
print "<div align=center>";
print "<p>Here are the rankings of the races by their deaths</p>";
print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">";
print "<tr>";
print "<th>Rank</th>";
print "<th>Race</th>";
print "<th>Deaths</th>";
print "</tr>";
$rank = 0;
$db2 = new SmrMySqlDatabase();
$db->query("SELECT race.race_id as race_id, race_name, sum(deaths) as death_sum, count(account_id) FROM player NATURAL JOIN race WHERE game_id = {$player->game_id} GROUP BY player.race_id ORDER BY death_sum DESC");
while ($db->next_record()) {
    $rank++;
    $race_id = $db->f("race_id");
    $db2->query("SELECT * FROM player WHERE race_id = {$race_id} AND game_id = {$player->game_id} AND out_of_game = 'TRUE'");
    if ($player->race_id == $race_id) {
        $style = " style=\"font-weight:bold;\"";
    } elseif ($db2->next_record()) {
        $style = " style=\"color:red;\"";
    } else {
        $style = "";
    }
    print "<tr>";
    print "<td align=\"center\"{$style}>{$rank}</td>";
    print "<td align=\"center\"{$style}>" . $db->f("race_name") . "</td>";
    print "<td align=\"center\"{$style}>" . $db->f("death_sum") . "</td>";
Exemplo n.º 10
0
<?php

print_topic("BOUNTIES");
include get_file_loc('menue.inc');
print_trader_menue();
echo 'Bounties awaiting collection.<br><br>';
echo '<table cellspacing="0" cellpadding="0" class="standard fullwidth"><tr><th>Federal</th><th>Underground</th></tr>';
$bounties['HQ'] = array();
$bounties['UG'] = array();
$ids = array();
$db->query('SELECT amount,account_id,type FROM bounty WHERE claimer_id=' . SmrSession::$old_account_id . ' AND game_id=' . SmrSession::$game_id);
while ($db->next_record()) {
    $bounties[$db->f('type')][] = array($db->f('account_id'), $db->f('amount'));
    $ids[] = $db->f('account_id');
}
if (count($ids)) {
    $db->query('SELECT account_id,player_name,player_id,alignment FROM player WHERE account_id IN (' . implode(',', $ids) . ') AND game_id=' . SmrSession::$game_id . ' LIMIT ' . count($ids));
    while ($db->next_record()) {
        $players[$db->f('account_id')] = get_colored_text($db->f('alignment'), stripslashes($db->f('player_name')) . ' (' . $db->f('player_id') . ')');
    }
}
echo '<tr><td style="width:50%" class="top">';
if (count($bounties['HQ']) > 0) {
    foreach ($bounties['HQ'] as $bounty) {
        echo $players[$bounty[0]];
        echo ' : <span class="yellow">';
        echo number_format($bounty[1]);
        echo '</span>';
        echo '<br>';
    }
} else {
Exemplo n.º 11
0
FROM sector,galaxy
WHERE sector.sector_id=' . $player->sector_id . '
AND game_id=' . SmrSession::$game_id . '
AND galaxy.galaxy_id = sector.galaxy_id
LIMIT 1');
$db->next_record();
$galaxy_name = $db->f('galaxy_name');
$galaxy_id = $db->f('galaxy_id');
// get our rank
$rank_id = $account->get_rank();
// remove newbie gals
// add newbie to gal name?
//if ($galaxy_id<9 && $rank_id < FLEDGLING && $account->veteran == 'FALSE') {
//	$galaxy_name .= ' - Newbie';
//}
print_topic('CURRENT SECTOR: ' . $player->sector_id . ' (' . $galaxy_name . ')');
$container = array();
$container['url'] = 'skeleton.php';
$container['body'] = 'course_plot.php';
// create menu
$menue_items[] = create_link($container, 'Plot a Course');
$container['body'] = 'map_local.php';
$menue_items[] = create_link($container, 'Local Map');
$menue_items[] = '<a href="' . URL . '/map_galaxy.php" target="_blank">Galaxy Map</a>';
// print it
print_menue($menue_items);
echo '<table cellspacing="0" cellpadding="0" style="width:100%;border:none"><tr><td style="padding:0px;vertical-align:top">';
// *******************************************
// *
// * Sector List
// *
Exemplo n.º 12
0
<?php

require_once get_file_loc("smr_planet.inc");
// get a planet from the sector where the player is in
$planet = new SMR_PLANET($player->sector_id, $player->game_id);
// owner of planet
if ($planet->owner_id != 0) {
    $planet_owner = new SMR_PLAYER($planet->owner_id, SmrSession::$game_id);
    $ownerAllianceID = $planet_owner->alliance_id;
} else {
    $ownerAllianceID = 0;
}
print_topic("Examine Planet");
print "<table>";
print "<tr><td><b>Planet Name:</b></td><td>{$planet->planet_name}</td></tr>";
print "<tr><td><b>Level:</b></td><td>" . $planet->level() . "</td></tr>";
print "<tr><td><b>Owner:</b></td><td>";
if ($planet->owner_id != 0) {
    print $planet_owner->player_name;
} else {
    print "Unclaimed";
}
print "</td></tr>";
print "<tr><td><b>Alliance:</b></td><td>";
if ($planet->owner_id != 0) {
    print $planet_owner->alliance_name;
} else {
    print "none";
}
print "</td></tr>";
print "</table>";
Exemplo n.º 13
0
<?php

// ********************************
// *
// * V a l i d a t e d ?
// *
// ********************************
// is account validated?
if ($account->validated == 'FALSE') {
    print_error('You are not validated so you can\'t use banks.');
    return;
}
print_topic('bank');
include get_file_loc('menue.inc');
print_bank_menue();
echo 'Hello ';
echo $player->player_name;
echo '<br><br>';
echo 'Balance: <b>';
echo number_format($player->bank);
echo '</b><br><br><h2>Make transaction</h2><br>';
$container = array();
$container['url'] = 'bank_personal_processing.php';
$container['body'] = '';
$actions = array();
$actions[] = array('Deposit', 'Deposit');
$actions[] = array('Withdraw', 'Withdraw');
$form = create_form($container, $actions);
echo $form['form'];
echo 'Amount:&nbsp;<input class="text" type="text" name="amount" size="10" value="0"><br><br>';
echo $form['submit']['Deposit'];
Exemplo n.º 14
0
<?php

include get_file_loc("council.inc");
include get_file_loc('menue.inc');
print_topic("RULING COUNCIL OF {$player->race_name}");
print_council_menue($player->race_id, getPresident($player->race_id));
print "<table border=\"0\" class=\"standard\" cellspacing=\"0\" align=\"center\" width=\"50%\">";
print "<tr>";
print "<th>Race</th>";
print "<th>Treaty</th>";
print "</tr>";
$db2 = new SmrMySqlDatabase();
$db->query("SELECT * FROM race " . "WHERE race_id != {$player->race_id} AND " . "race_id > 1");
while ($db->next_record()) {
    $race_id = $db->f("race_id");
    $race_name = $db->f("race_name");
    $db2->query("SELECT * FROM race_has_voting " . "WHERE game_id = {$player->game_id} AND " . "race_id_1 = {$player->race_id} AND " . "race_id_2 = {$race_id}");
    if ($db2->nf() > 0) {
        continue;
    }
    print "<tr>";
    print "<td align=\"center\">" . $player->get_colored_race($race_id) . "</td>";
    $container = array();
    $container["url"] = "council_embassy_processing.php";
    $container["race_id"] = $race_id;
    print_form($container);
    print "<td align=\"center\">";
    print_submit("Peace");
    print "&nbsp;";
    print_submit("War");
    print "</td>";
Exemplo n.º 15
0
<?php

if (isset($var['alliance_id'])) {
    $alliance_id = $var['alliance_id'];
} else {
    $alliance_id = $player->alliance_id;
}
define('WITHDRAW', 0);
define('DEPOSIT', 1);
print_topic('Alliance Bank Report');
include get_file_loc('menue.inc');
print_bank_menue();
//get all transactions
$db->query("SELECT * FROM alliance_bank_transactions WHERE alliance_id = {$alliance_id} AND game_id = {$player->game_id}");
if (!$db->nf()) {
    create_error("Your alliance has no recorded transactions");
}
while ($db->next_record()) {
    if ($db->f("transaction") == 'Payment') {
        if (!$db->f("exempt")) {
            $trans[$db->f("payee_id")][WITHDRAW] += $db->f("amount");
        } else {
            $trans[0][WITHDRAW] += $db->f("amount");
        }
    } else {
        if (!$db->f("exempt")) {
            $trans[$db->f("payee_id")][DEPOSIT] += $db->f("amount");
        } else {
            $trans[0][DEPOSIT] += $db->f("amount");
        }
    }
Exemplo n.º 16
0
<?php

require_once get_file_loc('smr_sector.inc');
$sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id);
//first check if there is a bar here
if (!$sector->has_bar()) {
    create_error("So two guys walk into this bar...");
}
//get script to include
if (isset($var["script"])) {
    $script = $var["script"];
} else {
    $script = "bar_opening.php";
}
//if ($script == 'bar_gambling_bet.php') create_error("Blackjack is currently outlawed, you will have to come back later.");
//get bar name
$db->query("SELECT location_name FROM location_type NATURAL JOIN location WHERE game_id = {$player->game_id} AND sector_id = {$player->sector_id} AND location_type.location_type_id > 800 AND location_type.location_type_id < 900");
//next welcome them
if ($db->next_record()) {
    print_topic("Welcome to " . $db->f("location_name") . ".");
} else {
    print_topic("Welcome to this bar");
}
//include menu (not menue ;) )
include get_file_loc('menue.inc');
print_bar_menue();
//get rid of drinks older than 30 mins
$time = time() - 1800;
$db->query("DELETE FROM player_has_drinks WHERE time < {$time}");
//include bar part
include get_file_loc("{$script}");
Exemplo n.º 17
0
$made = $var["made"];
if (isset($var["account_num"])) {
    $account_num = $var["account_num"];
}
if (isset($var["password"])) {
    $pass = $var["password"];
}
if (isset($var["amount"])) {
    $amount = $var["amount"];
}
if (!isset($account_num)) {
    $topic = 'Anonymous Account';
} else {
    $topic = 'Anonymous Account #' . $account_num;
}
print_topic($topic);
include get_file_loc('menue.inc');
print_bank_menue();
if (isset($make)) {
    echo 'Hello ';
    echo $player->player_name;
    echo '<br><br>';
    echo '<h2>Create Account</h2><br>';
    echo 'Please enter the password you would like<br><br>';
    $container = array();
    $container["url"] = "skeleton.php";
    $container["body"] = "bank_anon.php";
    $container["made"] = "yes";
    $form = create_form($container, 'Create Account');
    echo $form['form'];
    echo '
Exemplo n.º 18
0
<?php

create_error('Please use main album edit.');
print_topic("Edit Photo");
print "<p><span style=\"font-size:80%;\">Here you have a chance to add an entry to the Space Merchant Realms - The Photo Album!<br>";
print "We only accept jpg or gif images to a maximum of 500 x 500 in size.<br>";
print "Your image will be posted under your <i>Hall Of Fame</i> nick!<br>";
print "<b>Please Note:</b> Your entry needs to be approved by an admin before going online</p>";
print "<p style=\"font-size:150%;\">";
print "Status of your album entry: ";
$db->query("SELECT * FROM album WHERE account_id = " . SmrSession::$old_account_id);
if ($db->next_record()) {
    $location = stripslashes($db->f("location"));
    $email = stripslashes($db->f("email"));
    $website = stripslashes($db->f("website"));
    $day = $db->f("day");
    $month = $db->f("month");
    $year = $db->f("year");
    $other = stripslashes($db->f("other"));
    $approved = $db->f("approved");
    $disabled = $db->f("disabled");
    if ($approved == "TBC") {
        print "<span style=\"color:orange;\">Waiting approval</span>";
    } elseif ($approved == "NO") {
        print "<span style=\"color:red;\">Approval denied</span>";
    } elseif ($disabled == "TRUE") {
        print "<span style=\"color:red;\">Disabled</span>";
    } elseif ($approved == "YES") {
        print "<a href=\"" . URL . "/album/?{$account->HoF_name}\" style=\"color:green;\">Online</a>";
    }
} else {
Exemplo n.º 19
0
<?php

print_topic("VALIDATION REMINDER");
$container = array();
$container["url"] = "validate_processing.php";
print_form($container);
print "<p>Welcome " . $account->first_name . ",</p>";
print "<p>";
print "Thank you for trying out Space Merchant Realms! We hope that you are enjoying the game. However,";
print "in order for you to experience the full features of the game, you need to validate your login.";
print "When you first created your login, you should have received an email confirmation which includes";
print "your validation code. If you have not received this, please verify that you gave us the correct";
print "email address by going to the user preferences page. If it";
print "is incorrect, please edit the email address and it will generate a new code and have it sent to";
print "you.";
print "</p>";
print "<p>";
print "The following restrictions are placed on users who have not validated their account:";
print "<ul>";
print "<li>No additional turns are granted to your traders while you are not validated.";
print "<li>Bank access is denied.";
print "<li>You will be unable to land on a planet.";
print "<li>You will be unable to access alliances.";
print "<li>You will be unable to vote in the daily politics of the universe.";
print "</ul>";
print "</p>";
print "<p>";
print "Enter validation code:&nbsp;&nbsp;";
print "<input type=\"text\" name=\"validation_code\" maxlength=\"10\" size=\"10\" id=\"InputFields\" style=\"text-align:center;\">";
print "</p>";
print "<p align=\"center\">";
Exemplo n.º 20
0
<?php

$db->query("SELECT * FROM race WHERE race_id = " . $var["race_id"]);
if ($db->next_record()) {
    $race_name = $db->f("race_name");
}
print_topic("Send message to ruling council of the {$race_name}");
include get_file_loc('menue.inc');
print_message_menue();
print "<p>";
$container = array();
$container["url"] = "council_send_message_processing.php";
transfer("race_id");
print_form($container);
print "<p><small><b>From:</b> {$player->player_name} ({$player->player_id})<br>";
print "<b>To:</b> Ruling Council of {$race_name}</small></p>";
print "<textarea name=\"message\" id=\"InputFields\" style=\"width:350px;height:100px;\"></textarea><br><br>";
print_submit("Send message");
print "</form>";
print "</p>";
Exemplo n.º 21
0
<?php

require_once get_file_loc('smr_sector.inc');
$sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id);
print_topic("Military Payment Center");
include get_file_loc('menue.inc');
if ($sector->has_hq()) {
    print_hq_menue();
} else {
    print_ug_menue();
}
if ($player->military_payment > 0) {
    print "For your military help you have been paid <font color=yellow>{$player->military_payment}</font> credits";
    $player->update_stat("military_claimed", $player->military_payment);
    // add to our cash
    $player->credits += $player->military_payment;
    $player->military_payment = 0;
    $player->update();
} else {
    print "You have done nothing worthy of military payment";
}
Exemplo n.º 22
0
<?php

$db2 = new SmrMySqlDatabase();
print_topic('SHIP DEALER');
$db->query('SELECT 
	ship_type.ship_name as ship_name,
	ship_type.ship_type_id as ship_type_id,
	ship_type.cost as cost,
	ship_type.lvl_needed as lvl_needed
	FROM location, location_sells_ships,ship_type
	WHERE location.sector_id=' . $player->sector_id . '
	AND location.game_id=' . $player->game_id . '
	AND location_sells_ships.location_type_id = location.location_type_id
	AND ship_type.ship_type_id = location_sells_ships.ship_type_id
');
if ($db->nf() > 0) {
    echo '<table cellspacing="0" class="standard"><tr><th>Name</th><th>Cost</th><th>Action</th></tr>';
    $container = array();
    $container['url'] = 'skeleton.php';
    $container['body'] = 'shop_ship.php';
    while ($db->next_record()) {
        $ship_name = $db->f('ship_name');
        $ship_type_id = $db->f('ship_type_id');
        $cost = $db->f('cost');
        $level_needed = $db->f('lvl_needed');
        $container['ship_id'] = $ship_type_id;
        $container['level_needed'] = $level_needed;
        echo '<tr><td>' . $ship_name;
        echo '</td><td>' . $cost . '</td><td>';
        echo print_button($container, 'View Details');
        echo '</td></tr>';
<?php

print_topic("VIEWING APPLICATIONS");
include get_file_loc('menue.inc');
print_galactic_post_menue();
$db->query("SELECT * FROM galactic_post_applications WHERE game_id = {$player->game_id}");
if ($db->nf()) {
    print "You have received an application from the following players (click name to view description)<br>";
    print "Becareful when choosing your writters.  Make sure it is someone who will actually help you.<br><br>";
} else {
    print "You have no applications to view at the current time.";
}
while ($db->next_record()) {
    $appliee = new SMR_PLAYER($db->f("account_id"), $player->game_id);
    $container = array();
    $container["url"] = "skeleton.php";
    $container["body"] = "galactic_post_view_applications.php";
    $container["id"] = $appliee->account_id;
    print_link($container, "<font color=yellow>{$appliee->player_name}</font>");
    print " who has ";
    if ($db->f("written_before") == "YES") {
        print "written for some kind of a newspaper before.";
    } else {
        print "not written for a newspaper before.";
    }
    print "<br>";
}
print "<br><br>";
if (isset($var["id"])) {
    $db->query("SELECT * FROM galactic_post_applications WHERE game_id = {$player->game_id} AND account_id = {$var['id']}");
    $db->next_record();
Exemplo n.º 24
0
<?php

$rank_id = $account->get_rank();
print_topic("Extended User Rankings");
include get_file_loc('menue.inc');
if ($session->game_id != 0) {
    print_trader_menue();
}
$db->query("SELECT * FROM rankings WHERE rankings_id = {$rank_id}");
if ($db->next_record()) {
    $rank_name = $db->f("rankings_name");
}
// initialize vars
$kills = 0;
$exp = 0;
// get stats
$db->query("SELECT * from account_has_stats WHERE account_id = " . SmrSession::$old_account_id);
if ($db->next_record()) {
    $kills = $db->f("kills") > 0 ? $db->f("kills") : 0;
    $exp = $db->f("experience_traded") > 0 ? $db->f("experience_traded") : 0;
}
print "You have <font color=\"red\">{$kills}</font> kills and <font color=\"red\">{$exp}</font> traded experience<br><br>";
print "You are ranked as a <font size=\"4\" color=\"greenyellow\">{$rank_name}</font> player.<p><br>";
$db->query("SELECT * FROM rankings");
$i = 0;
while ($db->next_record()) {
    if ($i > 1) {
        print " OR " . $db->f(experience_needed) . " experience OR " . $db->f(kills_needed) . " kills.";
    }
    if ($i > 0) {
        print "<br>";
Exemplo n.º 25
0
<?php

require_once get_file_loc('smr_sector.inc');
$sector = new SMR_SECTOR($player->sector_id, SmrSession::$game_id, SmrSession::$old_account_id);
require_once get_file_loc("smr_planet.inc");
print_topic("VIEWING PLANET DETAILS");
$db2 = new SmrMySqlDatabase();
if ($player->alliance_id != 0) {
    $db->query("SELECT planet.sector_id as sector, player.game_id as game, time_attack, attacker_damage, planet_damage, trigger_id FROM player, planet, planet_attack WHERE player.game_id = planet.game_id AND " . "owner_id = account_id AND " . "player.game_id = {$player->game_id} AND " . "planet.game_id = {$player->game_id} AND " . "planet.sector_id = planet_attack.sector_id AND " . "planet.game_id = planet_attack.game_id AND " . "alliance_id = {$player->alliance_id} " . "ORDER BY time_attack DESC");
} else {
    $db->query("SELECT planet.sector_id as sector, player.game_id as game, time_attack, attacker_damage, planet_damage, trigger_id FROM player, planet, planet_attack WHERE player.game_id = planet.game_id AND " . "owner_id = account_id AND " . "planet.game_id = {$player->game_id} AND " . "planet.sector_id = planet_attack.sector_id AND " . "planet.game_id = planet_attack.game_id AND " . "player.game_id = {$player->game_id} " . "ORDER BY time_attack DESC");
}
while ($db->next_record()) {
    $game_id = $db->f("game");
    $sector_id = $db->f("sector");
    $time = $db->f("time_attack");
    $attacker = new SMR_PLAYER($db->f("trigger_id"), $player->game_id);
    $att_damage = $db->f("attacker_damage");
    $planet_damage = $db->f("planet_damage");
    $planet = new SMR_PLANET($db->f("sector"), $player->game_id);
    print "Planet <span style=font-variant:small-caps>{$planet->planet_name}</span> is under attack by " . $attacker->get_colored_name() . "<br>";
    print "This shot was at " . date("n/j/Y g:i:s A", $time) . ".  The attacking team did {$att_damage} damage ";
    print "while the planet did {$planet_damage} damage<br><br>";
}
Exemplo n.º 26
0
<?php

print_topic("Report a Bug");
print "<span style=\"font-size:75%;\">All information you can see on this page will be sent via email to the developer team!<br>";
print "Be as accurate as possible with your bug description.</span>";
print_form(create_container("bug_report_processing.php", ""));
print "<table>";
print "<tr>";
print "<td style=\"font-weight:bold;\">Login:</td>";
print "<input type=\"hidden\" name=\"login\" value=\"{$account->login}\">";
print "<td>{$account->login}</td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\">eMail:</td>";
print "<input type=\"hidden\" name=\"email\" value=\"{$account->email}\">";
print "<td>{$account->email}</td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\">Account ID:</td>";
print "<input type=\"hidden\" name=\"account_id\" value=\"{$account->account_id}\">";
print "<td>{$account->account_id}</td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\">Subject:</td>";
print "<td><input type=\"text\" name=\"subject\" id=\"InputFields\" style=\"width:300px;\"></td>";
print "</tr>";
print "<tr>";
print "<td style=\"font-weight:bold;\" valign=\"top\">Description:</td>";
print "<td><textarea id=\"InputFields\" name=\"description\" style=\"width:300px;height:100px;\"></textarea></td>";
print "</tr>";
print "<tr>";
Exemplo n.º 27
0
<?php

print_topic("ALLIANCE KILL RANKINGS");
include get_file_loc('menue.inc');
print_ranking_menue(1, 1);
$db->query("SELECT alliance_id, alliance_name, alliance_kills, leader_id FROM alliance\n\t\t\tWHERE game_id = {$player->game_id} ORDER BY alliance_kills DESC, alliance_name");
$alliances = array();
while ($db->next_record()) {
    $alliances[$db->f("alliance_id")] = array(stripslashes($db->f("alliance_name")), $db->f("alliance_kills"), $db->f("leader_id"));
    if ($db->f("alliance_id") == $player->alliance_id) {
        $ourRank = sizeof($alliances);
    }
}
// how many alliances are there?
$numAlliances = sizeof($alliances);
print "<div align=\"center\">";
print "<p>Here are the rankings of alliances by their kills.</p>";
if ($player->alliance_id > 0) {
    print "<p>Your alliance is ranked {$ourRank} out of {$numAlliances} alliances.</p>";
}
print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">";
print "<tr>";
print "<th>Rank</th>";
print "<th>Alliance</th>";
print "<th>Kills</th>";
print "</tr>";
$rank = 0;
foreach ($alliances as $id => $infoArray) {
    // get current alliance
    $currAllianceName = $infoArray[0];
    $numKills = $infoArray[1];
Exemplo n.º 28
0
<?php

print_topic("DEATH RANKINGS");
include get_file_loc('menue.inc');
print_ranking_menue(0, 2);
// what rank are we?
$db->query("SELECT * FROM player WHERE game_id = " . SmrSession::$game_id . " AND " . "(deaths > {$player->deaths} OR " . "(deaths = {$player->deaths} AND player_name <= " . format_string("{$player->player_name}", true) . " ))");
$our_rank = $db->nf();
// how many players are there?
$db->query("SELECT * FROM player WHERE game_id = {$player->game_id}");
$total_player = $db->nf();
print "<div align=\"center\">";
print "<p>Here are the rankings of players by their deaths</p>";
print "<p>You are ranked {$our_rank} out of {$total_player}</p>";
print "<table cellspacing=\"0\" cellpadding=\"5\" border=\"0\" class=\"standard\" width=\"95%\">";
print "<tr>";
print "<th>Rank</th>";
print "<th>Player</th>";
print "<th>Race</th>";
print "<th>Alliance</th>";
print "<th>Deaths</th>";
print "</tr>";
$db->query("SELECT * FROM player WHERE game_id = {$player->game_id} ORDER BY deaths DESC, player_name LIMIT 10");
$rank = 0;
while ($db->next_record()) {
    // get current player
    $curr_player = new SMR_PLAYER($db->f("account_id"), SmrSession::$game_id);
    // increase rank counter
    $rank++;
    print "<tr>";
    print "<td valign=\"top\" align=\"center\"";
Exemplo n.º 29
0
<?php

require_once get_file_loc("smr_planet.inc");
if ($player->land_on_planet == "FALSE") {
    print_error("You are not on a planet!");
    return;
}
// create planet object
$planet = new SMR_PLANET($player->sector_id, $player->game_id);
$planet->build();
print_topic("PLANET : {$planet->planet_name} [SECTOR #{$player->sector_id}]");
include get_file_loc('menue.inc');
print_planet_menue();
//print the dump cargo message or other message.
if (isset($var["msg"])) {
    print $var["msg"] . "<br>";
}
print "<table cellspacing=\"0\" cellpadding=\"3\" border=\"0\" class=\"standard\">";
print "<tr>";
print "<th width=\"125\">&nbsp;</th>";
print "<th width=\"75\">Current</th>";
print "<th width=\"75\">Max</th>";
print "</tr>";
print "<tr>";
print "<td>Generator</td><td align=\"center\">";
print $planet->construction[1];
print "</td><td align=\"center\">";
print $planet->max_construction[1];
print "</td>";
print "</tr>";
print "<tr>";
Exemplo n.º 30
0
<?php

print_topic("LEAVE NEWBIE PROTECTION");
print_form(create_container("leave_newbie_processing.php", ""));
print "Do you really want to leave Newbie Protection?<br><br>";
print_submit("Yes!");
print "&nbsp;&nbsp;";
print_submit("No!");
print "</form>";