本文整理汇总了PHP中TEXT_GOTOMAIN函数的典型用法代码示例。如果您正苦于以下问题:PHP TEXT_GOTOMAIN函数的具体用法?PHP TEXT_GOTOMAIN怎么用?PHP TEXT_GOTOMAIN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TEXT_GOTOMAIN函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: zoneedit_die
function zoneedit_die($error_msg)
{
echo "<p>" . $error_msg . "<p>";
TEXT_GOTOMAIN();
?>
</div></div>
<?php
include "footer.php";
die;
}
示例2: TEXT_GOTOMAIN
$row = $result3->fields;
$cur_sector = $cur_sector + 1;
} else {
$p = 'unknown';
// Build the alt text for each image
$alt = $c + $div_xmax * $r . " - " . $l_unknown . " ";
// I have not figured out why this formula works, but $row[sector_id] doesn't, so I'm not switching it.
echo "<a href=\"rsmove.php?engage=1&destination=" . ($c + $div_xmax * $r) . "\">";
echo "<img class='map un' src='images/" . $tile[$p] . "' alt='" . $alt . "'></a> ";
$cur_sector = $cur_sector + 1;
}
}
}
// This is the row numbers on the side of the map
for ($a = 1; $a < $sector_max / $div_xmax + 1; $a++) {
echo "\n<div style='position:absolute;left:" . ($map_width + 10) . "px;top:" . ($a - 1) * ($div_h + $div_border) . "px;'>" . ($a * $div_xmax - 1) . "</div>";
}
echo "</div><div style='clear:both'></div><br>";
echo " <div><img alt='" . $l_port . ": " . $l_special_port . "' src='images/{$tile['special']}'> <- " . $l_special_port . "</div>\n";
echo " <div><img alt='" . $l_port . ": " . $l_ore_port . "' src='images/{$tile['ore']}'> <- " . $l_ore_port . "</div>\n";
echo " <div><img alt='" . $l_port . ": " . $l_organics_port . "' src='images/{$tile['organics']}'> <- " . $l_organics_port . "</div>\n";
echo " <div><img alt='" . $l_port . ": " . $l_energy_port . "' src='images/{$tile['energy']}'> <- " . $l_energy_port . "</div>\n";
echo " <div><img alt='" . $l_port . ": " . $l_goods_port . "' src='images/{$tile['goods']}'> <- " . $l_goods_port . "</div>\n";
echo " <div><img alt='" . $l_port . ": " . $l_no_port . "' src='images/{$tile['none']}'> <- " . $l_no_port . "</div>\n";
echo " <div><img alt='" . $l_port . ": " . $l_unexplored . "' src='images/{$tile['unknown']}'> <- " . $l_unexplored . "</div>\n";
echo "<br><br>";
TEXT_GOTOMAIN();
?>
</div></div>
<?php
include "footer.php";
示例3: planetcombat
function planetcombat()
{
global $upgrade_cost, $upgrade_factor;
global $playerinfo;
global $shipinfo;
global $ownerinfo;
global $ownershipinfo;
global $sectorinfo;
global $planetinfo;
global $torpedo_price;
global $colonist_price;
global $ore_price;
global $organics_price;
global $goods_price;
global $energy_price;
global $ibank_paymentfee;
global $planetbeams;
global $planetfighters;
global $planetshields;
global $planettorps;
global $attackerbeams;
global $attackerfighters;
global $attackershields;
global $attackertorps;
global $attackerarmor;
global $torp_dmg_rate;
global $level_factor;
global $attackertorpdamage;
global $start_energy;
global $min_value_capture;
global $l_cmb_atleastoneturn;
global $l_cmb_atleastoneturn, $l_cmb_shipenergybb, $l_cmb_shipenergyab, $l_cmb_shipenergyas, $l_cmb_shiptorpsbtl, $l_cmb_shiptorpsatl;
global $l_cmb_planettorpdamage, $l_cmb_attackertorpdamage, $l_cmb_beams, $l_cmb_fighters, $l_cmb_shields, $l_cmb_torps;
global $l_cmb_torpdamage, $l_cmb_armor, $l_cmb_you, $l_cmb_planet, $l_cmb_combatflow, $l_cmb_defender, $l_cmb_attackingplanet;
global $l_cmb_youfireyourbeams, $l_cmb_defenselost, $l_cmb_defenselost2, $l_cmb_planetarybeams, $l_cmb_planetarybeams;
global $l_cmb_youdestroyedplanetshields, $l_cmb_beamsexhausted, $l_cmb_breachedyourshields, $l_cmb_destroyedyourshields;
global $l_cmb_breachedyourarmor, $l_cmb_destroyedyourarmor, $l_cmb_torpedoexchangephase, $l_cmb_nofightersleft;
global $l_cmb_youdestroyfighters, $l_cmb_planettorpsdestroy, $l_cmb_planettorpsdestroy2, $l_cmb_torpsbreachedyourarmor;
global $l_cmb_planettorpsdestroy3, $l_cmb_youdestroyedallfighters, $l_cmb_youdestroyplanetfighters, $l_cmb_fightercombatphase;
global $l_cmb_youdestroyedallfighters2, $l_cmb_youdestroyplanetfighters2, $l_cmb_allyourfightersdestroyed, $l_cmb_fightertofighterlost;
global $l_cmb_youbreachedplanetshields, $l_cmb_shieldsremainup, $l_cmb_fighterswarm, $l_cmb_swarmandrepel, $l_cmb_engshiptoshipcombat;
global $l_cmb_shipdock, $l_cmb_approachattackvector, $l_cmb_noshipsdocked, $l_cmb_yourshipdestroyed, $l_cmb_escapepod;
global $l_cmb_finalcombatstats, $l_cmb_youlostfighters, $l_cmb_youlostarmorpoints, $l_cmb_energyused, $l_cmb_planetdefeated;
global $l_cmb_citizenswanttodie, $l_cmb_youmaycapture, $l_cmb_youmaycapture2, $l_cmb_planetnotdefeated, $l_cmb_planetstatistics;
global $l_cmb_fighterloststat, $l_cmb_energyleft;
global $db, $dbtables;
//$debug = true;
if($playerinfo[turns] < 1)
{
echo "$l_cmb_atleastoneturn<BR><BR>";
TEXT_GOTOMAIN();
include("footer.php");
die();
}
// Planetary defense system calculation
$planetbeams = calcplanetbeams();
$planetfighters = calcplanetfighters();
$planetshields = calcplanetshields();
$planettorps = calcplanettorps();
// Attacking ship calculations
$attackerbeams = NUM_BEAMS($shipinfo[beams]);
$attackerfighters = $shipinfo[ship_fighters];
$attackershields = NUM_SHIELDS($shipinfo[shields]);
$attackertorps = round(mypw($level_factor, $shipinfo[torp_launchers])) * 2;
$attackerarmor = $shipinfo[armour_pts];
// Now modify player beams, shields and torpedos on available materiel
$starting_energy = $shipinfo[ship_energy];
// Beams
if ($debug)
echo "$l_cmb_shipenergybb: $shipinfo[ship_energy]<BR>\n";
if ($attackerbeams > $shipinfo[ship_energy])
$attackerbeams = $shipinfo[ship_energy];
$shipinfo[ship_energy] = $shipinfo[ship_energy] - $attackerbeams;
if ($debug)
echo "$l_cmb_shipenergyab (before shields): $shipinfo[ship_energy]<BR>\n";
// Shields
if ($attackershields > $shipinfo[ship_energy])
$attackershields = $shipinfo[ship_energy];
$shipinfo[ship_energy] = $shipinfo[ship_energy] - $attackershields;
if ($debug)
echo "$l_cmb_shipenergyas: $shipinfo[ship_energy]<BR>\n";
// Torpedos
if ($debug)
echo "$l_cmb_shiptorpsbtl: $attackertorps ($shipinfo[torps] / $shipinfo[torp_launchers])<BR>\n";
if ($attackertorps > $shipinfo[torps])
$attackertorps = $shipinfo[torps];
$shipinfo[torps] = $shipinfo[torps] - $attackertorps;
if ($debug)
//.........这里部分代码省略.........
示例4: traderoute_new
//.........这里部分代码省略.........
$i = 0;
while ($i < $num_corp_planets) {
echo "<option ";
if ($planets_corp[$i]['planet_id'] == $editroute['source_id']) {
echo "selected ";
}
echo "value=" . $planets_corp[$i]['planet_id'] . ">" . $planets_corp[$i]['name'] . " {$l_tdr_insector} " . $planets_corp[$i]['sector_id'] . "</option>";
$i++;
}
}
echo "\n </select>\n </tr>";
// Begin Ending point selection
echo "\n <tr><td> \n </tr><tr>\n <td align=right><font size=2><strong>{$l_tdr_selendpoint} : <br> </strong></font></td>\n <tr>\n <td align=right><font size=2>{$l_tdr_port} : </font></td>\n <td><input type=radio name=\"ptype2\" value=\"port\"\n ";
if (is_null($editroute) || !is_null($editroute) && $editroute['dest_type'] == 'P') {
echo " checked";
}
echo '
></td>
<td> <input type=text name=port_id2 size=20 align="center"
';
if (!is_null($editroute) && $editroute['dest_type'] == 'P') {
echo " value=\"{$editroute['dest_id']}\"";
}
echo "\n ></td>\n </tr>";
// Personal Planet
echo "\n <tr>\n <td align=right><font size=2>Personal {$l_tdr_planet} : </font></td>\n <td><input type=radio name=\"ptype2\" value=\"planet\"\n ";
if (!is_null($editroute) && $editroute['dest_type'] == 'L') {
echo " checked";
}
echo '
></td>
<td> <select name=planet_id2>
';
if ($num_planets == 0) {
echo "<option value=none>{$l_tdr_none}</option>";
} else {
$i = 0;
while ($i < $num_planets) {
echo "<option ";
if ($planets[$i]['planet_id'] == $editroute['dest_id']) {
echo "selected ";
}
echo "value=" . $planets[$i]['planet_id'] . ">" . $planets[$i]['name'] . " {$l_tdr_insector} " . $planets[$i]['sector_id'] . "</option>";
$i++;
}
}
// Corp Planet
echo "\n </tr><tr>\n <td align=right><font size=2>Corporate {$l_tdr_planet} : </font></td>\n <td><input type=radio name=\"ptype2\" value=\"corp_planet\"\n ";
if (!is_null($editroute) && $editroute['dest_type'] == 'C') {
echo " checked";
}
echo '
></td>
<td> <select name=corp_planet_id2>
';
if ($num_corp_planets == 0) {
echo "<option value=none>{$l_tdr_none}</option>";
} else {
$i = 0;
while ($i < $num_corp_planets) {
echo "<option ";
if ($planets_corp[$i]['planet_id'] == $editroute['dest_id']) {
echo "selected ";
}
echo "value=" . $planets_corp[$i]['planet_id'] . ">" . $planets_corp[$i]['name'] . " {$l_tdr_insector} " . $planets_corp[$i]['sector_id'] . "</option>";
$i++;
}
}
echo "\n </select>\n </tr>";
echo "\n </select>\n </tr><tr>\n <td> \n </tr><tr>\n <td align=right><font size=2><strong>{$l_tdr_selmovetype} : </strong></font></td>\n <td colspan=2 valign=top><font size=2><input type=radio name=\"move_type\" value=\"realspace\"\n ";
if (is_null($editroute) || !is_null($editroute) && $editroute['move_type'] == 'R') {
echo " checked";
}
echo "\n > {$l_tdr_realspace}  <font size=2><input type=radio name=\"move_type\" value=\"warp\"\n ";
if (!is_null($editroute) && $editroute['move_type'] == 'W') {
echo " checked";
}
echo "\n > {$l_tdr_warp}</font></td>\n </tr><tr>\n <td align=right><font size=2><strong>{$l_tdr_selcircuit} : </strong></font></td>\n <td colspan=2 valign=top><font size=2><input type=radio name=\"circuit_type\" value=\"1\"\n ";
if (is_null($editroute) || !empty($editroute) && $editroute['circuit'] == '1') {
echo " checked";
}
echo "\n > {$l_tdr_oneway} <input type=radio name=\"circuit_type\" value=\"2\"\n ";
if (!is_null($editroute) && $editroute['circuit'] == '2') {
echo " checked";
}
echo "\n > {$l_tdr_bothways}</font></td>\n </tr><tr>\n <td> \n </tr><tr>\n <td><td><td>\n ";
if (is_null($editroute)) {
echo "<input type=submit value=\"{$l_tdr_create}\">";
} else {
echo "<input type=hidden name=editing value={$editroute['traderoute_id']}>";
echo "<input type=submit value=\"{$l_tdr_modify}\">";
}
$l_tdr_returnmenu = str_replace("[here]", "<a href='traderoute.php'>" . $l_here . "</a>", $l_tdr_returnmenu);
echo "\n </table>\n {$l_tdr_returnmenu}<br>\n </form>\n ";
echo "<div style='text-align:left;'>\n";
TEXT_GOTOMAIN();
echo "</div>\n";
include "footer.php";
die;
}
示例5: planetcombat
function planetcombat()
{
global $playerinfo, $ownerinfo, $sectorinfo, $planetinfo, $torpedo_price, $colonist_price, $ore_price, $organics_price, $goods_price, $energy_price;
global $planetbeams, $planetfighters, $planetshields, $planettorps, $attackerbeams, $attackerfighters, $attackershields, $upgrade_factor, $upgrade_cost;
global $attackertorps, $attackerarmor, $torp_dmg_rate, $level_factor, $attackertorpdamage, $start_energy, $min_value_capture, $l_cmb_atleastoneturn;
global $l_cmb_atleastoneturn, $l_cmb_shipenergybb, $l_cmb_shipenergyab, $l_cmb_shipenergyas, $l_cmb_shiptorpsbtl, $l_cmb_shiptorpsatl;
global $l_cmb_planettorpdamage, $l_cmb_beams, $l_cmb_fighters, $l_cmb_shields, $l_cmb_torps;
global $l_cmb_torpdamage, $l_cmb_armor, $l_cmb_you, $l_cmb_planet, $l_cmb_combatflow, $l_cmb_defender, $l_cmb_attackingplanet;
global $l_cmb_youfireyourbeams, $l_cmb_defenselost, $l_cmb_defenselost2, $l_cmb_planetarybeams, $l_cmb_planetarybeams2;
global $l_cmb_youdestroyedplanetshields, $l_cmb_beamsexhausted, $l_cmb_breachedyourshields, $l_cmb_destroyedyourshields;
global $l_cmb_breachedyourarmor, $l_cmb_destroyedyourarmor, $l_cmb_torpedoexchangephase, $l_cmb_nofightersleft;
global $l_cmb_youdestroyfighters, $l_cmb_planettorpsdestroy, $l_cmb_planettorpsdestroy2, $l_cmb_torpsbreachedyourarmor;
global $l_cmb_planettorpsdestroy3, $l_cmb_youdestroyedallfighters, $l_cmb_youdestroyplanetfighters, $l_cmb_fightercombatphase;
global $l_cmb_youdestroyedallfighters2, $l_cmb_youdestroyplanetfighters2, $l_cmb_allyourfightersdestroyed, $l_cmb_fightertofighterlost;
global $l_cmb_youbreachedplanetshields, $l_cmb_shieldsremainup, $l_cmb_fighterswarm, $l_cmb_swarmandrepel, $l_cmb_engshiptoshipcombat;
global $l_cmb_shipdock, $l_cmb_approachattackvector, $l_cmb_noshipsdocked, $l_cmb_yourshipdestroyed, $l_cmb_escapepod;
global $l_cmb_finalcombatstats, $l_cmb_youlostfighters, $l_cmb_youlostarmorpoints, $l_cmb_energyused, $l_cmb_planetdefeated;
global $l_cmb_citizenswanttodie, $l_cmb_youmaycapture, $l_cmb_planetnotdefeated, $l_cmb_planetstatistics;
global $l_cmb_fighterloststat, $l_cmb_energyleft;
global $db, $db_logging;
if ($playerinfo['turns'] < 1) {
echo $l_cmb_atleastoneturn . "<br><br>";
TEXT_GOTOMAIN();
?>
</div></div>
<?php
include "footer.php";
die;
}
// Planetary defense system calculation
$planetbeams = calcplanetbeams();
$planetfighters = $planetinfo['fighters'];
$planetshields = calcplanetshields();
$planettorps = calcplanettorps();
// Attacking ship calculations
$attackerbeams = NUM_BEAMS($playerinfo['beams']);
$attackerfighters = $playerinfo['ship_fighters'];
$attackershields = NUM_SHIELDS($playerinfo['shields']);
$attackertorps = round(pow($level_factor, $playerinfo['torp_launchers'])) * 2;
$attackerarmor = $playerinfo['armor_pts'];
// Now modify player beams, shields and torpedos on available materiel
$start_energy = $playerinfo['ship_energy'];
// Beams
if ($attackerbeams > $playerinfo['ship_energy']) {
$attackerbeams = $playerinfo['ship_energy'];
}
$playerinfo['ship_energy'] = $playerinfo['ship_energy'] - $attackerbeams;
// Shields
if ($attackershields > $playerinfo['ship_energy']) {
$attackershields = $playerinfo['ship_energy'];
}
$playerinfo['ship_energy'] = $playerinfo['ship_energy'] - $attackershields;
// Torpedos
if ($attackertorps > $playerinfo['torps']) {
$attackertorps = $playerinfo['torps'];
}
$playerinfo['torps'] = $playerinfo['torps'] - $attackertorps;
// Setup torp damage rate for both Planet and Ship
$planettorpdamage = $torp_dmg_rate * $planettorps;
$attackertorpdamage = $torp_dmg_rate * $attackertorps;
/*
Build table
*/
?>
<div class="general-table-container">
<?php
echo "<table><tbody>";
echo "<tr>\n\t<td>STATS</td>\n <td>Beams</td>\n <td>Fighters</td>\n <td>Shields</td>\n <td>Torpedoes Warhead Strength</td>\n <td>Armour</td>\n </tr><tr>\n <td><span class=\"table_word_blue\">Your Ship</span></td>\n <td>{$attackerbeams}</td>\n <td>{$attackerfighters}</td>\n <td>{$attackershields}</td>\n <td>{$attackertorpdamage}</td>\n <td>{$attackerarmor}</td>\n </tr><tr>\n <td><span class=\"table_word_orange\">The Planet</span></td>\n <td>{$planetbeams}</td>\n <td>{$planetfighters}</td>\n <td>{$planetshields}</td>\n <td>{$planettorpdamage}</td>\n <td>N/A</td>\n </tr>";
echo "</tbody></table></div>";
// Begin actual combat calculations
$planetdestroyed = 0;
$attackerdestroyed = 0;
echo "<br/>You are now engaging the planet in sector " . $playerinfo[sector] . "!<br/><br/>";
/*
Build table
*/
?>
<div class="general-table-container">
<?php
echo "<table><tbody>";
echo "<tr>";
echo "<td width=\"50%\">You</td>";
echo "<td width=\"50%\">Planet</td>";
echo "</tr>";
echo "<tr><td colspan=\"2\"><span class=\"table_word_yellow\">Firing Your Beams</span></td></tr>";
if ($planetfighters > 0 && $attackerbeams > 0) {
if ($attackerbeams > $planetfighters) {
echo "<tr><td></td><td><span class=\"table_word_orange\">Planetary defense lost " . $planetfighters . " fighters to your beams</span></td></tr>";
$attackerbeams = $attackerbeams - $planetfighters;
$planetfighters = 0;
} else {
$planetfighters = $planetfighters - $attackerbeams;
echo "<tr><td></td><td><span class=\"table_word_orange\">Planetary defense lost " . $planetfighters . " fighters, but there are more coming!</span></td></tr>";
$attackerbeams = 0;
}
}
if ($attackerfighters > 0 && $planetbeams > 0) {
// If there are more beams on the planet than attacker has fighters
if ($planetbeams > round($attackerfighters / 2)) {
// Half the attacker fighters
//.........这里部分代码省略.........
示例6: shipyard_die
function shipyard_die($error_msg)
{
global $l_footer_until_update, $l_footer_players_on_1, $l_footer_players_on_2, $l_footer_one_player_on, $sched_ticks;
echo "<p>$error_msg<p>";
TEXT_GOTOMAIN();
include("footer.php");
die();
}
示例7: zoneedit_die
function zoneedit_die($error_msg)
{
echo "<p>$error_msg<p>";
TEXT_GOTOMAIN();
include("footer.php");
die();
}