当前位置: 首页>>代码示例>>PHP>>正文


PHP print_topic函数代码示例

本文整理汇总了PHP中print_topic函数的典型用法代码示例。如果您正苦于以下问题:PHP print_topic函数的具体用法?PHP print_topic怎么用?PHP print_topic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了print_topic函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_topic

<?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");
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:trader_relations.php

示例2: print_topic

<?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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:14,代码来源:galactic_post_write_article.php

示例3: print_topic

<?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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:galactic_post_view_members.php

示例4: SMR_HISTORY_DB

    $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");
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:hall_of_fame_new_detail.php

示例5: get_file_loc

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");
开发者ID:smrealms,项目名称:smrv2.0,代码行数:30,代码来源:games_previous.php

示例6: get_file_loc

<?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)) {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:course_plot_result.php

示例7: get_file_loc

<?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;\"";
    }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:rankings_sector_kill.php

示例8: print_error

$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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:preferences_confirm.php

示例9: print_topic

<?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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:rankings_race_death.php

示例10: print_topic

<?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 {
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:trader_bounties.php

示例11: print_topic

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
// *
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:current_sector.php

示例12: get_file_loc

<?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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:planet_examine.php

示例13: print_error

<?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'];
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bank_personal.php

示例14: get_file_loc

<?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>";
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:council_embassy.php

示例15: define

<?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");
        }
    }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:bank_report.php


注:本文中的print_topic函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。