}
}
if ($do == 'changerulerplanet') {
	$rulername = secureData($_POST['rulername']);
	$planetname = secureData($_POST['planetname']);
	if (!$rulername || !$planetname) { $error = 108; }
	if (getCurrentTick() > 1500) { $error = 109; }
	if ((getIdByRulername($rulername)) && ($rulername != $playerdata['rulername'])) { $error = 110; }
	if ((getIdByPlanetname($planetname)) && ($planetname != $playerdata['planetname'])) { $error = 111; }
	if ($error < 100) {
		$sql_updrp = "UPDATE $table[players] SET `rulername` = '$rulername', `planetname` = '$planetname' WHERE `id` = '$playerdata[id]'";
		mysql_query($sql_updrp) or die(mysql_error());
		$error = 4;
	}
}
$playerdata = getPlayerdata($playerdata['id']);
switch($error) {
	case 0:
		$msg = "Succesfully changed password";
		break;
	case 1:
		$msg = "Succesfully changed galaxy and took 30% of your resources.";
		break;
	case 2:
		$msg = "Succesfully created new alliance. You can find the alliance password on the administration page.<br>If you were a member of any other alliance, the membership has been dropped.";
		break;
	case 3:
		$msg = "Succesfully joined the specified alliance.<br>If you were a member of any other alliance, the membership has been dropped.";
		break;
	case 4:
		$msg = 'Succesfully updated ruler- & planetname.';
Пример #2
0
<?
require_once('global.inc.php');

if (!$user->checklogin()) {
	include('goto.login.php');
	die();
}

$player_id = $_SESSION['uid'];
$playerdata = getPlayerdata($player_id);
updatePlayerLoginData($player_id, $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_HOST']);
?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Imperial-Battle | Navigation</title>
<link href="css/default.css" rel="stylesheet" type="text/css">
<base target="hoofd">
</head>

<body bgcolor="#223137" background="img/menu_bg.gif" style="background-repeat: no-repeat">
		<table border="0" cellpadding="0" cellspacing="0" width="100%" height="19">
			<tr>
				<td background="img/bg_balk.jpg" style="border: 1px solid #3C5762">
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
					<tr>
						<td align="center">&nbsp;<b><?echo stripslashes($playerdata['rulername']);?></b> of <b><?echo stripslashes($playerdata['planetname']);?></b></td>
					</tr>
				</table>
				</td>
:<?php 
echo $z;
?>
)<?}?></td>
		<td width="65%" background="img/border/B.gif"><img border="0" src="img/border/B.gif" width="16" height="15"></td>
		<td width="3%" valign="bottom"><img border="0" src="img/border/R_B.gif" width="20" height="15"></td>
	</tr>
	<tr>
		<td width="2%" background="img/border/L.gif">&nbsp;</td>
		<td width="95%" height="100%" valign="top" colspan="2">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td valign="top">
						<?
						if ($do == 'globalscan') {
							$globalscan = getPlayerdata($target_id);
						?>
						<table border="0" width="800">
							<tr>
								<td width="400" background="img/bg_balk.jpg" colspan="2"><b>Regular information</b></td>
								<td width="400" background="img/bg_balk.jpg" colspan="2"><b>Resource information</b></td>
							</tr>
							<tr>
								<td width="150">Coordinates:</td>
								<td width="250"><?php 
echo $x;
?>
:<?php 
echo $y;
?>
:<?php 
Пример #4
0
            <td width="696" height="100%" valign="top" colspan="2">
            	<table border="0" cellpadding="2" cellspacing="1" width="800">
	            	<tr>           
	            		<td background="img/bg_balk.jpg"><b>Offer</b></td>
	            		<td width="200" background="img/bg_balk.jpg" ><b>Price</b></td>
	            		<td width="75" background="img/bg_balk.jpg" ><b>Player</b></td>
	            		<td width="75" background="img/bg_balk.jpg" align="center">&nbsp;</td>
	           		</tr>                                                
					<?

					$sql_orderdata = "SELECT `id`, `player_id`, `steel`, `crystal`, `erbium`, `titanium` FROM `$table[market]` WHERE status = 1 ORDER by id";
					$rec_orderdata = mysql_query($sql_orderdata);

					$i = 0;
					while ($res_orderdata = mysql_fetch_assoc($rec_orderdata)) {
						$player = getPlayerdata($res_orderdata['player_id']);
					?>
					<form method="POST" action="main.php?mod=market&act=market&order_id=<?php 
echo $res_orderdata['id'];
?>
">
					<tr bgcolor="#24485a">
						<input type="hidden" value="<?php 
echo $res_orderdata['id'];
?>
" name="order_id">
						<input type="hidden" value="<?php 
echo $res_orderdata['player_id'];
?>
" name="seller_id">
						<input type="hidden" value="<?php