mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-01 16:17:13 +00:00
finish hero_full.php
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<Files ~ "\.tpl$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</Files>
|
||||
@@ -0,0 +1,458 @@
|
||||
<?php
|
||||
// Temp
|
||||
|
||||
$eigen = $database->getCoor($village->wid);
|
||||
|
||||
$from = array('x'=>$eigen['x'], 'y'=>$eigen['y']);
|
||||
|
||||
$to = array('x'=>$coor['x'], 'y'=>$coor['y']);
|
||||
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Temp
|
||||
|
||||
$ckey= $generator->generateRandStr(6);
|
||||
|
||||
|
||||
if (!isset($process['t1']) || $process['t1'] == ''){ $t1='0'; }else{ $t1=$process['t1']; }
|
||||
if (!isset($process['t2']) || $process['t2'] == ''){ $t2='0'; }else{ $t2=$process['t2']; }
|
||||
if (!isset($process['t3']) || $process['t3'] == ''){ $t3='0'; }else{ $t3=$process['t3']; if ($session->tribe == 3){ $scout=1; } }
|
||||
if (!isset($process['t4']) || $process['t4'] == ''){ $t4='0'; }else{ $t4=$process['t4']; if ($session->tribe == 1 || $session->tribe == 2 || $session->tribe == 4 || $session->tribe == 5){ $scout=1;} }
|
||||
if (!isset($process['t5']) || $process['t5'] == ''){ $t5='0'; }else{ $t5=$process['t5']; }
|
||||
if (!isset($process['t6']) || $process['t6'] == ''){ $t6='0'; }else{ $t6=$process['t6']; }
|
||||
if (!isset($process['t7']) || $process['t7'] == ''){ $t7='0'; }else{ $t7=$process['t7']; }
|
||||
if (!isset($process['t8']) || $process['t8'] == ''){ $t8='0'; }else{ $t8=$process['t8']; }
|
||||
if (!isset($process['t9']) || $process['t9'] == ''){ $t9='0'; }else{ $t9=$process['t9']; }
|
||||
if (!isset($process['t10']) || $process['t10'] == ''){ $t10='0'; }else{ $t10=$process['t10']; }
|
||||
if (!isset($process['t11']) || $process['t11'] == ''){ $t11='0'; }else{ $t11=$process['t11']; $showhero=1;}
|
||||
if ($session->tribe == 3){
|
||||
$totalunits =$process['t1']+$process['t2']+$process['t4']+$process['t5']+$process['t6']+$process['t7']+$process['t8']+$process['t9']+$process['t10']+$process['t11'];
|
||||
|
||||
}else{
|
||||
$totalunits =$process['t1']+$process['t2']+$process['t3']+$process['t5']+$process['t6']+$process['t7']+$process['t8']+$process['t9']+$process['t10']+$process['t11'];
|
||||
}
|
||||
if ($scout==1 && $totalunits==0) {
|
||||
if ($process['c'] != 2){
|
||||
$process['c'] = 1;
|
||||
}
|
||||
}
|
||||
$id = $database->addA2b($ckey,time(),$process['0'],$t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9,$t10,$t11,$process['c']);
|
||||
|
||||
|
||||
|
||||
if ($process['c']==1){
|
||||
|
||||
$actionType = "Scout";
|
||||
|
||||
}else if ($process['c']==2){
|
||||
|
||||
$actionType = "Reinforcement";
|
||||
|
||||
}elseif ($process['c']==3){
|
||||
|
||||
$actionType = "Normal attack";
|
||||
|
||||
}else{
|
||||
|
||||
$actionType = "Raid";
|
||||
|
||||
}
|
||||
|
||||
$uid = $session->uid;
|
||||
|
||||
$tribe = $session->tribe;
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
?>
|
||||
|
||||
<h1><?php echo $actionType." to ".$process[1]; ?></h1>
|
||||
<form method="post" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $process[0]; ?>&c=<?php echo $generator->getMapCheck($process[0]); ?>"><?php echo $process[1]; ?> (<?php echo $coor['x']; ?>|<?php echo $coor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $process['2']; ?>"><?php echo $database->getUserField($process['2'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><?php echo $process[1]; ?></td>
|
||||
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>"><?php echo $actionType." to ".$process['1']; ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody class="units">
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
<?php
|
||||
for($i=$start;$i<=($end);$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u$i\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
} if ($process['t11'] != ''){
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit uhero\" title=\"Hero\" alt=\"Hero\" /></td>";
|
||||
|
||||
}?>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Troops</th>
|
||||
|
||||
<td <?php if (!isset($process['t1']) || $process['t1'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t1'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t2']) || $process['t2'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t2'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t3']) || $process['t3'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t3'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t4']) || $process['t4'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t4'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t5']) || $process['t5'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t5'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t6']) || $process['t6'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t6'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t7']) || $process['t7'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t7'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t8']) || $process['t8'] == ''){ echo "class=\"none\">0"; }else{ $kata='1'; echo ">".$process['t8'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t9']) || $process['t9'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t9'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t10']) || $process['t10'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t10'];} ?></td>
|
||||
|
||||
<?php if (!isset($process['t11']) || $process['t11'] == ''){ echo ""; }else{ echo "<td>".$process['t11']."</td>";} ?>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<?php if ($process['c']==1){
|
||||
|
||||
?>
|
||||
<tbody class="options">
|
||||
<tr>
|
||||
<th>Options</th>
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>"><input class="radio" name="spy" value="1" checked="checked" type="radio">Scout resources and troops<br>
|
||||
<input class="radio" name="spy" value="2" type="radio">Scout defences and troops </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if(isset($kata) AND $process['c']!='2'){?><tr>
|
||||
|
||||
<?php if($process['c']=='3'){ ?><tbody class="cata">
|
||||
<tr>
|
||||
<th>Destination:</th>
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>">
|
||||
|
||||
<select name="ctar1" class="dropdown">
|
||||
<option value="0">Random</option>
|
||||
<?php if($building->getTypeLevel(35) == 0){
|
||||
if($building->getTypeLevel(16) >= 5) { ?>
|
||||
<optgroup label="Resources">
|
||||
<option value="1">Woodcutter</option>
|
||||
<option value="2">Clay Pit</option>
|
||||
<option value="3">Iron Mine</option>
|
||||
<option value="4">Cropland</option>
|
||||
<option value="5">Sawmill</option>
|
||||
<option value="6">Brickyard</option>
|
||||
|
||||
<option value="7">Iron Foundry</option>
|
||||
<option value="8">Grain Mill</option>
|
||||
<option value="9">Bakery</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 3) { ?>
|
||||
<optgroup label="Infrastructure">
|
||||
<option value="10">Warehouse</option>
|
||||
<option value="11">Granary</option>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<option value="15">Main building</option>
|
||||
<option value="17">Marketplace</option>
|
||||
<option value="18">Embassy</option>
|
||||
<option value="24">Townhall</option>
|
||||
<option value="25">Residence</option>
|
||||
<option value="26">Palace</option>
|
||||
<option value="27">Treasury</option>
|
||||
<option value="28">Trade office</option>
|
||||
<?php } ?>
|
||||
<option value="38">Great warehouse</option>
|
||||
<option value="39">Great granary</option>
|
||||
<option value="40">Wonder of the World</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<optgroup label="Military">
|
||||
<option value="12">Blacksmith</option>
|
||||
<option value="13">Armoury</option>
|
||||
<option value="14">Tournament square</option>
|
||||
<option value="16">Rally point</option>
|
||||
<option value="19">Barracks</option>
|
||||
<option value="20">Stable</option>
|
||||
<option value="21">Workshop</option>
|
||||
|
||||
<option value="22">Academy</option>
|
||||
<option value="29">Great barracks</option>
|
||||
<option value="30">Great stable</option>
|
||||
<option value="37">Hero's mansion</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<?php if($building->getTypeLevel(16) == 20) { ?>
|
||||
<select name="ctar2" class="dropdown">
|
||||
<option value="0">-</option>
|
||||
<option value="99">Random</option>
|
||||
<?php if($building->getTypeLevel(16) >= 5) { ?>
|
||||
<optgroup label="Resources">
|
||||
<option value="1">Woodcutter</option>
|
||||
<option value="2">Clay Pit</option>
|
||||
<option value="3">Iron Mine</option>
|
||||
<option value="4">Cropland</option>
|
||||
<option value="5">Sawmill</option>
|
||||
<option value="6">Brickyard</option>
|
||||
|
||||
<option value="7">Iron Foundry</option>
|
||||
<option value="8">Grain Mill</option>
|
||||
<option value="9">Bakery</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 3) { ?>
|
||||
<optgroup label="Infrastructure">
|
||||
<option value="10">Warehouse</option>
|
||||
<option value="11">Granary</option>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<option value="15">Main building</option>
|
||||
<option value="17">Marketplace</option>
|
||||
<option value="18">Embassy</option>
|
||||
<option value="24">Townhall</option>
|
||||
<option value="25">Residence</option>
|
||||
<option value="26">Palace</option>
|
||||
|
||||
<option value="27">Treasury</option>
|
||||
<option value="28">Trade office</option>
|
||||
<?php } ?>
|
||||
<option value="38">Great warehouse</option>
|
||||
<option value="39">Great granary</option>
|
||||
<option value="40">Wonder of the World</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<optgroup label="Military">
|
||||
<option value="12">Blacksmith</option>
|
||||
<option value="13">Armoury</option>
|
||||
<option value="14">Tournament square</option>
|
||||
<option value="16">Rally point</option>
|
||||
<option value="19">Barracks</option>
|
||||
<option value="20">Stable</option>
|
||||
<option value="21">Workshop</option>
|
||||
|
||||
<option value="22">Academy</option>
|
||||
<option value="29">Great barracks</option>
|
||||
<option value="30">Great stable</option>
|
||||
<option value="37">Hero's mansion</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php }?>
|
||||
|
||||
<span class="info">(will be attacked by catapult(s))</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody><?PHP
|
||||
}}
|
||||
else if($process['c']=='4')
|
||||
{
|
||||
?><tbody class="infos">
|
||||
<th>Destination:</th>
|
||||
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>">
|
||||
<?PHP
|
||||
|
||||
echo"Warning: Catapult will <b>ONLY</b> shoot with a normal attack (they dont shoot with raids!)";
|
||||
?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?PHP
|
||||
}
|
||||
?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
|
||||
<th>Arrived:</th>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
$speeds = array();
|
||||
|
||||
$scout = 1;
|
||||
|
||||
//find slowest unit.
|
||||
|
||||
for($i=1;$i<=11;$i++)
|
||||
|
||||
{
|
||||
|
||||
if (isset($process['t'.$i]))
|
||||
|
||||
{
|
||||
|
||||
if( $process['t'.$i] != '' && $process['t'.$i] > 0)
|
||||
|
||||
{
|
||||
|
||||
if ($i<11)
|
||||
$speeds[] = ${'u'.(($session->tribe-1)*10+$i)}['speed'];
|
||||
else
|
||||
{
|
||||
//$uid
|
||||
$q = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = $uid";
|
||||
$result = mysql_query($q);
|
||||
$hero_f=mysql_fetch_array($result);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = ${'u'.$hero_unit}['speed'];
|
||||
}
|
||||
|
||||
if($i != 4)
|
||||
|
||||
$scout = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($scout)
|
||||
|
||||
$process['c'] = 1;
|
||||
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>">
|
||||
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
|
||||
<div class="at">at <span id="tp2"> <?php echo $generator->procMtime(date('U')+$time,9)?></span><span> hours</span></div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<input name="timestamp" value="<?php echo time(); ?>" type="hidden">
|
||||
|
||||
<input name="timestamp_checksum" value="<?php echo $ckey; ?>" type="hidden">
|
||||
|
||||
<input name="ckey" value="<?php echo $id; ?>" type="hidden">
|
||||
|
||||
<input name="id" value="39" type="hidden">
|
||||
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="3" type="hidden">
|
||||
|
||||
<?php
|
||||
if($database->hasBeginnerProtection($process['0'])==1) {
|
||||
echo"<b>User presently has beginners protection</b>";
|
||||
} else {
|
||||
?>
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok"
|
||||
|
||||
class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
<?php } ?>
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,448 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
// Temp
|
||||
|
||||
$eigen = $database->getCoor($village->wid);
|
||||
|
||||
$from = array('x'=>$eigen['x'], 'y'=>$eigen['y']);
|
||||
|
||||
$to = array('x'=>$coor['x'], 'y'=>$coor['y']);
|
||||
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Temp
|
||||
|
||||
$ckey= $generator->generateRandStr(6);
|
||||
|
||||
|
||||
if (!isset($process['t1']) || $process['t1'] == ''){ $t1='0'; }else{ $t1=$process['t1']; }
|
||||
if (!isset($process['t2']) || $process['t2'] == ''){ $t2='0'; }else{ $t2=$process['t2']; }
|
||||
if (!isset($process['t3']) || $process['t3'] == ''){ $t3='0'; }else{ $t3=$process['t3']; $scout=1; }
|
||||
if (!isset($process['t4']) || $process['t4'] == ''){ $t4='0'; }else{ $t4=$process['t4']; }
|
||||
if (!isset($process['t5']) || $process['t5'] == ''){ $t5='0'; }else{ $t5=$process['t5']; }
|
||||
if (!isset($process['t6']) || $process['t6'] == ''){ $t6='0'; }else{ $t6=$process['t6']; }
|
||||
if (!isset($process['t7']) || $process['t7'] == ''){ $t7='0'; }else{ $t7=$process['t7']; }
|
||||
if (!isset($process['t8']) || $process['t8'] == ''){ $t8='0'; }else{ $t8=$process['t8']; }
|
||||
if (!isset($process['t9']) || $process['t9'] == ''){ $t9='0'; }else{ $t9=$process['t9']; }
|
||||
if (!isset($process['t10']) || $process['t10'] == ''){ $t10='0'; }else{ $t10=$process['t10']; }
|
||||
if (!isset($process['t11']) || $process['t11'] == ''){ $t11='0'; }else{ $t11=$process['t11']; }
|
||||
$totalunits =$process['t1']+$process['t2']+$process['t4']+$process['t5']+$process['t6']+$process['t7']+$process['t8']+$process['t9']+$process['t10']+$process['t11'];
|
||||
if ($scout==1 && $totalunits==0) {
|
||||
|
||||
$process['c'] = 1;
|
||||
|
||||
}
|
||||
$id = $database->addA2b($ckey,time(),$process['0'],$t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9,$t10,$t11,$process['c']);
|
||||
|
||||
|
||||
|
||||
if ($process['c']==1){
|
||||
|
||||
$actionType = "Scout";
|
||||
|
||||
}else if ($process['c']==2){
|
||||
|
||||
|
||||
$actionType = "Normal attack";
|
||||
|
||||
}else{
|
||||
|
||||
$actionType = "Raid";
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<h1><?php echo $actionType." to ".$process[1]; ?></h1>
|
||||
|
||||
<form method="post" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $process[0]; ?>&c=<?php echo $generator->getMapCheck($process[0]); ?>"><?php echo $process[1]; ?> (<?php echo $coor['x']; ?>|<?php echo $coor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $process['2']; ?>"><?php echo $database->getUserField($process['2'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
|
||||
<td><?php echo $process[1]; ?></td>
|
||||
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>"><?php echo $actionType." to ".$process['1']; ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody class="units">
|
||||
|
||||
<tr>
|
||||
|
||||
<td></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u41" title="Pikeman" alt="Pikeman"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u42" title="Thorned Warrior" alt="Thorned Warrior"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u43" title="Guardsman" alt="Guardsman></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u44" title="Bird of Prey" alt="Bird of Prey"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u45" title="Axerider" alt="Axerider"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u46" title="Natarian Knight" alt="Natarian Knight"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u47" title="War Elephant" alt="War Elephant"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u48" title="Balista" alt="Balista"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u49" title="Natarian Emperor" alt="Natarian Emperor"></td>
|
||||
|
||||
<td><img src="img/x.gif" class="unit u50" title="Settler" alt="Settler"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Troops</th>
|
||||
|
||||
<td <?php if (!isset($process['t1']) || $process['t1'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t1'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t2']) || $process['t2'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t2'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t3']) || $process['t3'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t3'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t4']) || $process['t4'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t4'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t5']) || $process['t5'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t5'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t6']) || $process['t6'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t6'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t7']) || $process['t7'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t7'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t8']) || $process['t8'] == ''){ echo "class=\"none\">0"; }else{ $kata='1'; echo ">".$process['t8'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t9']) || $process['t9'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t9'];} ?></td>
|
||||
|
||||
<td <?php if (!isset($process['t10']) || $process['t10'] == ''){ echo "class=\"none\">0"; }else{ echo ">".$process['t10'];} ?></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<?php if ($process['c']==1){
|
||||
|
||||
?>
|
||||
<tbody class="options">
|
||||
<tr>
|
||||
<th>Options</th>
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>"><input class="radio" name="spy" value="1" checked="checked" type="radio">Scout resources and troops<br>
|
||||
<input class="radio" name="spy" value="2" type="radio">Scout defences and troops </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if(isset($kata) AND $process['c']!='2'){?><tr>
|
||||
|
||||
<?php if($process['c']=='3'){ ?><tbody class="cata">
|
||||
<tr>
|
||||
<th>Destination:</th>
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>">
|
||||
<?php if($building->getTypeLevel(16) == 20) { ?>
|
||||
<select name="ctar2" class="dropdown">
|
||||
<option value="0">Random</option>
|
||||
<?php if($building->getTypeLevel(16) >= 5) { ?>
|
||||
<optgroup label="Resources">
|
||||
<option value="0">Woodcutter</option>
|
||||
<option value="0">Clay Pit</option>
|
||||
<option value="0">Iron Mine</option>
|
||||
<option value="0">Cropland</option>
|
||||
<option value="5">Sawmill</option>
|
||||
<option value="6">Brickyard</option>
|
||||
|
||||
<option value="7">Iron Foundry</option>
|
||||
<option value="8">Grain Mill</option>
|
||||
<option value="9">Bakery</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 3) { ?>
|
||||
<optgroup label="Infrastructure">
|
||||
<option value="10">Warehouse</option>
|
||||
<option value="11">Granary</option>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<option value="15">Main building</option>
|
||||
<option value="17">Marketplace</option>
|
||||
<option value="18">Embassy</option>
|
||||
<option value="24">Townhall</option>
|
||||
<option value="25">Residence</option>
|
||||
<option value="26">Palace</option>
|
||||
|
||||
<option value="27">Treasury</option>
|
||||
<option value="28">Trade office</option>
|
||||
<?php } ?>
|
||||
<option value="38">Great warehouse</option>
|
||||
<option value="39">Great granary</option>
|
||||
<option value="40">Wonder of the World</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<optgroup label="Military">
|
||||
<option value="12">Blacksmith</option>
|
||||
<option value="13">Armoury</option>
|
||||
<option value="14">Tournament square</option>
|
||||
<option value="16">Rally point</option>
|
||||
<option value="19">Barracks</option>
|
||||
<option value="20">Stable</option>
|
||||
<option value="21">Workshop</option>
|
||||
|
||||
<option value="22">Academy</option>
|
||||
<option value="29">Great barracks</option>
|
||||
<option value="30">Great stable</option>
|
||||
<option value="37">Hero's mansion</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<?php }?>
|
||||
<select name="ctar1" class="dropdown">
|
||||
<option value="0">Random</option>
|
||||
<?php if($building->getTypeLevel(16) >= 5) { ?>
|
||||
<optgroup label="Resources">
|
||||
<option value="0">Woodcutter</option>
|
||||
<option value="0">Clay Pit</option>
|
||||
<option value="0">Iron Mine</option>
|
||||
<option value="0">Cropland</option>
|
||||
<option value="5">Sawmill</option>
|
||||
<option value="6">Brickyard</option>
|
||||
|
||||
<option value="7">Iron Foundry</option>
|
||||
<option value="8">Grain Mill</option>
|
||||
<option value="9">Bakery</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 3) { ?>
|
||||
<optgroup label="Infrastructure">
|
||||
<option value="10">Warehouse</option>
|
||||
<option value="11">Granary</option>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<option value="15">Main building</option>
|
||||
<option value="17">Marketplace</option>
|
||||
<option value="18">Embassy</option>
|
||||
<option value="24">Townhall</option>
|
||||
<option value="25">Residence</option>
|
||||
<option value="26">Palace</option>
|
||||
|
||||
<option value="27">Treasury</option>
|
||||
<option value="28">Trade office</option>
|
||||
<?php } ?>
|
||||
<option value="38">Great warehouse</option>
|
||||
<option value="39">Great granary</option>
|
||||
<option value="40">Wonder of the World</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
<?php if($building->getTypeLevel(16) >= 10) { ?>
|
||||
<optgroup label="Military">
|
||||
<option value="12">Blacksmith</option>
|
||||
<option value="13">Armoury</option>
|
||||
<option value="14">Tournament square</option>
|
||||
<option value="16">Rally point</option>
|
||||
<option value="19">Barracks</option>
|
||||
<option value="20">Stable</option>
|
||||
<option value="21">Workshop</option>
|
||||
|
||||
<option value="22">Academy</option>
|
||||
<option value="29">Great barracks</option>
|
||||
<option value="30">Great stable</option>
|
||||
<option value="37">Hero's mansion</option>
|
||||
</optgroup>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<span class="info">(will be attacked by catapult(s))</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody><?PHP
|
||||
}
|
||||
else if($process['c']=='4')
|
||||
{
|
||||
?><tbody class="infos">
|
||||
<th>Destination:</th>
|
||||
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>">
|
||||
<?PHP
|
||||
|
||||
echo"Warning: Catapult will <b>ONLY</b> shoot with a normal attack (they dont shoot with raids!)";
|
||||
?>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?PHP
|
||||
}
|
||||
?>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Arrived:</th>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$att_tribe = 3;
|
||||
|
||||
$start = ($att_tribe == 1)? 1 : (($att_tribe == 2)? 11: 21);
|
||||
|
||||
$end = ($att_tribe == 1)? 10 : (($att_tribe == 2)? 20: 30);
|
||||
|
||||
$speeds = array();
|
||||
|
||||
$scout = 1;
|
||||
|
||||
//find slowest unit.
|
||||
|
||||
for($i=1;$i<=10;$i++)
|
||||
|
||||
{
|
||||
|
||||
if (isset($process['t'.$i]))
|
||||
|
||||
{
|
||||
|
||||
if( $process['t'.$i] != '' && $process['t'.$i] > 0)
|
||||
|
||||
{
|
||||
|
||||
$speeds[] = ${'u'.(($session->tribe-5)*10+$i)}['speed'];
|
||||
|
||||
if($i != 4)
|
||||
|
||||
$scout = 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($scout)
|
||||
|
||||
$process['c'] = 1;
|
||||
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<td colspan="<?php if($process['t11'] != ''){ echo"11"; }else{ echo"10"; } ?>">
|
||||
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
|
||||
<div class="at">at <span id="tp2"> <?php echo $generator->procMtime(date('U')+$time,9)?></span><span> hours</span></div>
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
<input name="timestamp" value="<?php echo time(); ?>" type="hidden">
|
||||
|
||||
<input name="timestamp_checksum" value="<?php echo $ckey; ?>" type="hidden">
|
||||
|
||||
<input name="ckey" value="<?php echo $id; ?>" type="hidden">
|
||||
|
||||
<input name="id" value="39" type="hidden">
|
||||
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="3" type="hidden">
|
||||
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok"
|
||||
|
||||
class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
$founder = $database->getVillage($village->wid);
|
||||
$newvillage = $database->getMInfo($_GET['id']);
|
||||
$eigen = $database->getCoor($village->wid);
|
||||
$from = array('x'=>$eigen['x'], 'y'=>$eigen['y']);
|
||||
$to = array('x'=>$newvillage['x'], 'y'=>$newvillage['y']);
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($from,$to,300,0)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<pre>';
|
||||
echo '</pre>';
|
||||
?>
|
||||
<h1>Found new village</h1>
|
||||
<form method="POST" action="build.php">
|
||||
<input type="hidden" name="a" value="new" />
|
||||
<input type="hidden" name="c" value="5" />
|
||||
<input type="hidden" name="s" value="<?php echo $_GET['id']; ?>" />
|
||||
<input type="hidden" name="id" value="39" />
|
||||
<input type="hidden" name="timestamp" value="<?php echo $time; ?>" />
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="role"><a href="karte.php?d=<?php echo $founder['0']; ?>&c=<?php echo $generator->getMapCheck($founder['0']); ?>"><?php echo $session->username; ?></a></td><td colspan="10"><a href="karte.php?d=<?php echo $newvillage['id']; ?>&c=<?php echo $generator->getMapCheck($newvillage['0']) ?>">Found new village (<?php echo $newvillage['x']; ?>|<?php echo $newvillage['y']; ?>)</a></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="units">
|
||||
<tr>
|
||||
<th> </th>
|
||||
<?php for($i=($session->tribe-1)*10+1;$i<=$session->tribe*10;$i++) {
|
||||
echo "<td><img src=\"img/x.gif\" class=\"unit u".$i."\" title=\"".$technology->getUnitName($i)."\" alt=\"".$technology->getUnitName($i)."\" /></td>";
|
||||
} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Troops</th>
|
||||
<?php for($i=1;$i<=9;$i++) {
|
||||
echo "<td class=\"none\">0</td>";
|
||||
} ?>
|
||||
<td>3</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Duration</th>
|
||||
<td colspan="10"><img class="clock" src="img/x.gif" alt="Duration" title="Duration" /> <?php echo $generator->getTimeFormat($time); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Resources</th>
|
||||
<td colspan="10">
|
||||
<img class="r1" src="img/x.gif" alt="Lumber" title="Wood" />750 |
|
||||
<img class="r2" src="img/x.gif" alt="Clay" title="Clay" />750 |
|
||||
<img class="r3" src="img/x.gif" alt="Iron" title="Iron" />750 |
|
||||
<img class="r4" src="img/x.gif" alt="Crop" title="Crop" />750</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="btn">
|
||||
<?php
|
||||
$mode = CP;
|
||||
$total = count($database->getProfileVillages($session->uid));
|
||||
$need_cps = ${'cp'.$mode}[$total+1];
|
||||
$cps = $session->cp;
|
||||
|
||||
if($cps >= $need_cps) {
|
||||
?>
|
||||
<input type="image" value="ok" name="s1" id="btn_ok" class="dynamic_img" alt="OK" src="img/x.gif" onclick="this.disabled=true;this.form.submit();"/>
|
||||
<?php
|
||||
} else {
|
||||
print "$cps/$need_cps culture points";
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<table id="coords" cellpadding="1" cellspacing="1">
|
||||
<input type="hidden" name="disabledr" value="<?php echo $disabledr; ?>">
|
||||
<input type="hidden" name="disabled" value="<?php echo $disabled; ?>">
|
||||
<tbody><tr>
|
||||
<td class="sel">
|
||||
|
||||
<label>
|
||||
<input class="radio" name="c" <?php if (!$checked) {?> checked=checked <?php }?>value="2" type="radio" <?php echo $disabledr; ?>>
|
||||
Reinforcement
|
||||
</label>
|
||||
</td>
|
||||
<td class="vil">
|
||||
<span>Village:</span>
|
||||
<input class="text" name="dname" value="" maxlength="20" type="text" >
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sel">
|
||||
<label>
|
||||
<input class="radio" name="c" value="3" type="radio" <?php echo $disabled; ?>>
|
||||
Normal attack
|
||||
</label>
|
||||
</td>
|
||||
<td class="or">
|
||||
|
||||
or </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sel">
|
||||
<label>
|
||||
<input class="radio" name="c" <?php echo $checked; ?> value="4" type="radio">
|
||||
Raid
|
||||
</label>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['z'])){
|
||||
$coor = $database->getCoor($_GET['z']);
|
||||
}
|
||||
else{
|
||||
$coor['x'] = "";
|
||||
$coor['y'] = "";
|
||||
}
|
||||
?>
|
||||
<td class="target">
|
||||
<span>x:</span>
|
||||
<input class="text" name="x" value="<?php echo $coor['x']; ?>" maxlength="4" type="text">
|
||||
<span>y:</span>
|
||||
<input class="text" name="y" value="<?php echo $coor['y']; ?>" maxlength="4" type="text">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
|
||||
<input value="ok" name="s1" id="btn_ok" class="dynamic_img" src="img/x.gif" alt="OK" type="image" onclick="this.disabled=true;this.form.submit();">
|
||||
</form>
|
||||
<p class="error"><?php echo $form->getError("error"); ?></p>
|
||||
</div>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
|
||||
$fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']);
|
||||
$toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']);
|
||||
?>
|
||||
|
||||
<h1>Send units back</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $generator->getBaseID($fromcoor['x'],$fromcoor['y']); ?>&c=<?php echo $generator->getMapCheck($generator->getBaseID($fromcoor['x'],$fromcoor['y'])); ?>"><?php echo $to['name']; ?> (<?php echo $fromcoor['x']; ?>|<?php echo $fromcoor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $to['owner']; ?>"><?php echo $database->getUserField($to['owner'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="10">Send units back to <?php echo $to['name']; ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u1" src="img/x.gif" title="Legionnaire" alt="Legionnaire"> <input class="text" <?php if ($enforce['u1']<=0) {echo ' disabled="disabled"';}?> name="t1" value="<?php echo $enforce['u1']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u1'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u4" src="img/x.gif" title="Equites Legati" alt="Equites Legati"> <input class="text" <?php if ($enforce['u4']<=0) {echo ' disabled="disabled"';}?> name="t4" value="<?php echo $enforce['u4']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u4'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u7" src="img/x.gif" title="Battering Ram" alt="Battering Ram"> <input class="text" <?php if ($enforce['u7']<=0) {echo ' disabled="disabled"';}?> name="t7" value="<?php echo $enforce['u7']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u7'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u9" src="img/x.gif" title="Senator" alt="Senator"> <input class="text" <?php if ($enforce['u9']<=0) {echo ' disabled="disabled"';}?> name="t9" value="<?php echo $enforce['u9']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u9'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u2" src="img/x.gif" title="Praetorian" alt="Praetorian"> <input class="text" <?php if ($enforce['u2']<=0) {echo ' disabled="disabled"';}?> name="t2" value="<?php echo $enforce['u2']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u2'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u5" src="img/x.gif" title="Equites Imperatoris" alt="Equites Imperatoris"> <input class="text" <?php if ($enforce['u5']<=0) {echo ' disabled="disabled"';}?> name="t5" value="<?php echo $enforce['u5']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u5'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="regular"><img class="unit u8" src="img/x.gif" title="Fire Catapult" alt="Fire Catapult"> <input class="text" <?php if ($enforce['u8']<=0) {echo ' disabled="disabled"';}?> name="t8" value="<?php echo $enforce['u8']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u8'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u10" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($enforce['u10']<=0) {echo ' disabled="disabled"';}?> name="t10" value="<?php echo $enforce['u10']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u10'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u3" src="img/x.gif" title="Imperian" alt="Imperian"> <input class="text" <?php if ($enforce['u3']<=0) {echo ' disabled="disabled"';}?> name="t3" value="<?php echo $enforce['u3']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u3'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u6" src="img/x.gif" title="Equites Caesaris" alt="Equites Caesaris"> <input class="text" <?php if ($enforce['u6']<=0) {echo ' disabled="disabled"';}?> name="t6" value="<?php echo $enforce['u6']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u6'].")</span></td>";
|
||||
if($enforce['hero']>0){
|
||||
?>
|
||||
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrived:</th>
|
||||
|
||||
<?php
|
||||
$att_tribe = $database->getUserField($to['owner'],'tribe',0);
|
||||
$start = ($att_tribe-1)*10+1;
|
||||
$end = ($att_tribe*10);
|
||||
$speeds = array();
|
||||
//find slowest unit.
|
||||
for($i=$start;$i<=$end;$i++)
|
||||
{
|
||||
if (isset($enforce['u'.$i]))
|
||||
{
|
||||
if($enforce['u'.$i]!='' && $enforce['u'.$i]>0)
|
||||
{
|
||||
//$speeds[] = $unitspeeds[$i-2];
|
||||
$speeds[] = ${'u'.$i}['speed'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$to['owner']."";
|
||||
$resulth = mysql_query($qh);
|
||||
$hero_f=mysql_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
}
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<td colspan="10">
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<input name="ckey" value="<?php echo $ckey; ?>" type="hidden">
|
||||
<input name="id" value="39" type="hidden">
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="8" type="hidden">
|
||||
|
||||
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
|
||||
$fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']);
|
||||
$toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']);
|
||||
?>
|
||||
|
||||
<h1>Send units back</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $generator->getBaseID($fromcoor['x'],$fromcoor['y']); ?>&c=<?php echo $generator->getMapCheck($generator->getBaseID($fromcoor['x'],$fromcoor['y'])); ?>"><?php echo $to['name']; ?> (<?php echo $fromcoor['x']; ?>|<?php echo $fromcoor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $to['owner']; ?>"><?php echo $database->getUserField($to['owner'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="10">Send units back to <?php echo $to['name']; ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u11" src="img/x.gif" title="Clubswinger" alt="Clubswinger"> <input class="text" <?php if ($enforce['u11']<=0) {echo ' disabled="disabled"';}?> name="t1" value="<?php echo $enforce['u11']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u11'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u14" src="img/x.gif" title="Scout" alt="Scout"> <input class="text" <?php if ($enforce['u14']<=0) {echo ' disabled="disabled"';}?> name="t4" value="<?php echo $enforce['u14']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u14'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u17" src="img/x.gif" title="Ram" alt="Ram"> <input class="text" <?php if ($enforce['u17']<=0) {echo ' disabled="disabled"';}?> name="t7" value="<?php echo $enforce['u17']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u17'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u19" src="img/x.gif" title="Chief" alt="Chief"> <input class="text" <?php if ($enforce['u19']<=0) {echo ' disabled="disabled"';}?> name="t9" value="<?php echo $enforce['u19']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u19'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u12" src="img/x.gif" title="Spearman" alt="Spearman"> <input class="text" <?php if ($enforce['u12']<=0) {echo ' disabled="disabled"';}?> name="t2" value="<?php echo $enforce['u12']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u12'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u15" src="img/x.gif" title="Paladin" alt="Paladin"> <input class="text" <?php if ($enforce['u15']<=0) {echo ' disabled="disabled"';}?> name="t5" value="<?php echo $enforce['u15']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u15'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="regular"><img class="unit u18" src="img/x.gif" title="Catapult" alt="Catapult"> <input class="text" <?php if ($enforce['u18']<=0) {echo ' disabled="disabled"';}?> name="t8" value="<?php echo $enforce['u18']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u18'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u20" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($enforce['u20']<=0) {echo ' disabled="disabled"';}?> name="t10" value="<?php echo $enforce['u20']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u20'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u13" src="img/x.gif" title="Axeman" alt="Axeman"> <input class="text" <?php if ($enforce['u13']<=0) {echo ' disabled="disabled"';}?> name="t3" value="<?php echo $enforce['u13']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u13'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u16" src="img/x.gif" title="Teutonic Knight" alt="Teutonic Knight"> <input class="text" <?php if ($enforce['u16']<=0) {echo ' disabled="disabled"';}?> name="t6" value="<?php echo $enforce['u16']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u16'].")</span></td>";
|
||||
if($enforce['hero']>0){
|
||||
?>
|
||||
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrived:</th>
|
||||
|
||||
<?php
|
||||
$att_tribe = $database->getUserField($to['owner'],'tribe',0);
|
||||
$start = ($att_tribe-1)*10+1;
|
||||
$end = ($att_tribe*10);
|
||||
$speeds = array();
|
||||
//find slowest unit.
|
||||
for($i=$start;$i<=$end;$i++)
|
||||
{
|
||||
if (isset($enforce['u'.$i]))
|
||||
{
|
||||
if($enforce['u'.$i]!='' && $enforce['u'.$i]>0)
|
||||
{
|
||||
//$speeds[] = $unitspeeds[$i-2];
|
||||
$speeds[] = ${'u'.$i}['speed'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$to['owner']."";
|
||||
$resulth = mysql_query($qh);
|
||||
$hero_f=mysql_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
}
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<td colspan="10">
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<input name="ckey" value="<?php echo $ckey; ?>" type="hidden">
|
||||
<input name="id" value="39" type="hidden">
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="8" type="hidden">
|
||||
|
||||
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
|
||||
$fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']);
|
||||
$toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']);
|
||||
?>
|
||||
|
||||
<h1>Send units back</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $generator->getBaseID($fromcoor['x'],$fromcoor['y']); ?>&c=<?php echo $generator->getMapCheck($generator->getBaseID($fromcoor['x'],$fromcoor['y'])); ?>"><?php echo $to['name']; ?> (<?php echo $fromcoor['x']; ?>|<?php echo $fromcoor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $to['owner']; ?>"><?php echo $database->getUserField($to['owner'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="10">Send units back to <?php echo $to['name']; ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u21" src="img/x.gif" title="Phalanx" alt="Phalanx"> <input class="text" <?php if ($enforce['u21']<=0) {echo ' disabled="disabled"';}?> name="t1" value="<?php echo $enforce['u21']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u21'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u24" src="img/x.gif" title="Theutates Thunder" alt="Theutates Thunder"> <input class="text" <?php if ($enforce['u24']<=0) {echo ' disabled="disabled"';}?> name="t4" value="<?php echo $enforce['u24']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u24'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u27" src="img/x.gif" title="Ram" alt="Ram"> <input class="text" <?php if ($enforce['u27']<=0) {echo ' disabled="disabled"';}?> name="t7" value="<?php echo $enforce['u27']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u27'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u29" src="img/x.gif" title="Chieftain" alt="Chieftain"> <input class="text" <?php if ($enforce['u29']<=0) {echo ' disabled="disabled"';}?> name="t9" value="<?php echo $enforce['u29']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u29'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u22" src="img/x.gif" title="Swordsman" alt="Swordsman"> <input class="text" <?php if ($enforce['u22']<=0) {echo ' disabled="disabled"';}?> name="t2" value="<?php echo $enforce['u22']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u22'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u25" src="img/x.gif" title="Druidrider" alt="Druidrider"> <input class="text" <?php if ($enforce['u25']<=0) {echo ' disabled="disabled"';}?> name="t5" value="<?php echo $enforce['u25']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u25'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="regular"><img class="unit u28" src="img/x.gif" title="Trebuchet" alt="Trebuchet"> <input class="text" <?php if ($enforce['u28']<=0) {echo ' disabled="disabled"';}?> name="t8" value="<?php echo $enforce['u26']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u28'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u30" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($enforce['u30']<=0) {echo ' disabled="disabled"';}?> name="t10" value="<?php echo $enforce['u30']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u30'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u23" src="img/x.gif" title="Pathfinder" alt="Pathfinder"> <input class="text" <?php if ($enforce['u23']<=0) {echo ' disabled="disabled"';}?> name="t3" value="<?php echo $enforce['u23']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u23'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u26" src="img/x.gif" title="Haeduan" alt="Haeduan"> <input class="text" <?php if ($enforce['u26']<=0) {echo ' disabled="disabled"';}?> name="t6" value="<?php echo $enforce['u26']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u26'].")</span></td>";
|
||||
if($enforce['hero']>0){
|
||||
?>
|
||||
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrived:</th>
|
||||
|
||||
<?php
|
||||
$att_tribe = $database->getUserField($to['owner'],'tribe',0);
|
||||
$start = ($att_tribe-1)*10+1;
|
||||
$end = ($att_tribe*10);
|
||||
$speeds = array();
|
||||
//find slowest unit.
|
||||
for($i=$start;$i<=$end;$i++)
|
||||
{
|
||||
if (isset($enforce['u'.$i]))
|
||||
{
|
||||
if($enforce['u'.$i]!='' && $enforce['u'.$i]>0)
|
||||
{
|
||||
//$speeds[] = $unitspeeds[$i-2];
|
||||
$speeds[] = ${'u'.$i}['speed'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$to['owner']."";
|
||||
$resulth = mysql_query($qh);
|
||||
$hero_f=mysql_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
}
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<td colspan="10">
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<input name="ckey" value="<?php echo $ckey; ?>" type="hidden">
|
||||
<input name="id" value="39" type="hidden">
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="8" type="hidden">
|
||||
|
||||
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
|
||||
$fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']);
|
||||
$toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']);
|
||||
?>
|
||||
|
||||
<h1>Send units back</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $generator->getBaseID($fromcoor['x'],$fromcoor['y']); ?>&c=<?php echo $generator->getMapCheck($generator->getBaseID($fromcoor['x'],$fromcoor['y'])); ?>"><?php echo $to['name']; ?> (<?php echo $fromcoor['x']; ?>|<?php echo $fromcoor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $to['owner']; ?>"><?php echo $database->getUserField($to['owner'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="10">Send units back to <?php echo $to['name']; ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u31" src="img/x.gif" title="Clubswinger" alt="Clubswinger"> <input class="text" <?php if ($enforce['u31']<=0) {echo ' disabled="disabled"';}?> name="t1" value="<?php echo $enforce['u31']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u31'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u34" src="img/x.gif" title="Scout" alt="Scout"> <input class="text" <?php if ($enforce['u14']<=0) {echo ' disabled="disabled"';}?> name="t4" value="<?php echo $enforce['u14']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u34'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u37" src="img/x.gif" title="Ram" alt="Ram"> <input class="text" <?php if ($enforce['u17']<=0) {echo ' disabled="disabled"';}?> name="t7" value="<?php echo $enforce['u17']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u37'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u39" src="img/x.gif" title="Chief" alt="Chief"> <input class="text" <?php if ($enforce['u19']<=0) {echo ' disabled="disabled"';}?> name="t9" value="<?php echo $enforce['u19']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u39'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u32" src="img/x.gif" title="Spearman" alt="Spearman"> <input class="text" <?php if ($enforce['u12']<=0) {echo ' disabled="disabled"';}?> name="t2" value="<?php echo $enforce['u12']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u32'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u35" src="img/x.gif" title="Paladin" alt="Paladin"> <input class="text" <?php if ($enforce['u15']<=0) {echo ' disabled="disabled"';}?> name="t5" value="<?php echo $enforce['u15']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u35'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="regular"><img class="unit u38" src="img/x.gif" title="Catapult" alt="Catapult"> <input class="text" <?php if ($enforce['u18']<=0) {echo ' disabled="disabled"';}?> name="t8" value="<?php echo $enforce['u18']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u38'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u40" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($enforce['u20']<=0) {echo ' disabled="disabled"';}?> name="t10" value="<?php echo $enforce['u20']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u40'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u33" src="img/x.gif" title="Axeman" alt="Axeman"> <input class="text" <?php if ($enforce['u13']<=0) {echo ' disabled="disabled"';}?> name="t3" value="<?php echo $enforce['u13']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u33'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u36" src="img/x.gif" title="Teutonic Knight" alt="Teutonic Knight"> <input class="text" <?php if ($enforce['u16']<=0) {echo ' disabled="disabled"';}?> name="t6" value="<?php echo $enforce['u16']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u36'].")</span></td>";
|
||||
if($enforce['hero']>0){
|
||||
?>
|
||||
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrived:</th>
|
||||
|
||||
<?php
|
||||
$att_tribe = $database->getUserField($to['owner'],'tribe',0);
|
||||
$start = ($att_tribe-1)*10+1;
|
||||
$end = ($att_tribe*10);
|
||||
$speeds = array();
|
||||
//find slowest unit.
|
||||
for($i=$start;$i<=$end;$i++)
|
||||
{
|
||||
if (isset($enforce['u'.$i]))
|
||||
{
|
||||
if($enforce['u'.$i]!='' && $enforce['u'.$i]>0)
|
||||
{
|
||||
//$speeds[] = $unitspeeds[$i-2];
|
||||
$speeds[] = ${'u'.$i}['speed'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$to['owner']."";
|
||||
$resulth = mysql_query($qh);
|
||||
$hero_f=mysql_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
}
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<td colspan="10">
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<input name="ckey" value="<?php echo $ckey; ?>" type="hidden">
|
||||
<input name="id" value="39" type="hidden">
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="8" type="hidden">
|
||||
|
||||
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
$to = $database->getVillage($enforce['from']);
|
||||
$fromcoor = $database->getCoor($enforce['from']);
|
||||
$tocoor = $database->getCoor($enforce['vref']);
|
||||
|
||||
$fromCor = array('x'=>$tocoor['x'], 'y'=>$tocoor['y']);
|
||||
$toCor = array('x'=>$fromcoor['x'], 'y'=>$fromcoor['y']);
|
||||
?>
|
||||
|
||||
<h1>Send units back</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php">
|
||||
|
||||
<table id="short_info" cellpadding="1" cellspacing="1">
|
||||
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Destination:</th>
|
||||
|
||||
<td><a href="karte.php?d=<?php echo $generator->getBaseID($fromcoor['x'],$fromcoor['y']); ?>&c=<?php echo $generator->getMapCheck($generator->getBaseID($fromcoor['x'],$fromcoor['y'])); ?>"><?php echo $to['name']; ?> (<?php echo $fromcoor['x']; ?>|<?php echo $fromcoor['y']; ?>)</a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Owner:</th>
|
||||
|
||||
<td><a href="spieler.php?uid=<?php echo $to['owner']; ?>"><?php echo $database->getUserField($to['owner'],'username',0); ?></a></td>
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="10">Send units back to <?php echo $to['name']; ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u41" src="img/x.gif" title="Pikeman" alt="Pikeman"> <input class="text" <?php if ($enforce['u41']<=0) {echo ' disabled="disabled"';}?> name="t1" value="<?php echo $enforce['u41']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u41'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u44" src="img/x.gif" title="Bird of Prey" alt="Bird of Prey"> <input class="text" <?php if ($enforce['u44']<=0) {echo ' disabled="disabled"';}?> name="t4" value="<?php echo $enforce['u44']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u44'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u47" src="img/x.gif" title="War Elephant" alt="War Elephant"> <input class="text" <?php if ($enforce['u47']<=0) {echo ' disabled="disabled"';}?> name="t7" value="<?php echo $enforce['u47']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u47'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u49" src="img/x.gif" title="Natarian Emperor" alt="Natarian Emperor"> <input class="text" <?php if ($enforce['u49']<=0) {echo ' disabled="disabled"';}?> name="t9" value="<?php echo $enforce['u49']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u49'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u42" src="img/x.gif" title="Thorned Warrior" alt="Thorned Warrior"> <input class="text" <?php if ($enforce['u42']<=0) {echo ' disabled="disabled"';}?> name="t2" value="<?php echo $enforce['u42']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u42'].")</span></td>";
|
||||
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u45" src="img/x.gif" title="Axerider" alt="Axerider"> <input class="text" <?php if ($enforce['u45']<=0) {echo ' disabled="disabled"';}?> name="t5" value="<?php echo $enforce['u45']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u45'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="regular"><img class="unit u48" src="img/x.gif" title="Balista" alt="Balista"> <input class="text" <?php if ($enforce['u48']<=0) {echo ' disabled="disabled"';}?> name="t8" value="<?php echo $enforce['u48']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u48'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u40" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($enforce['u50']<=0) {echo ' disabled="disabled"';}?> name="t10" value="<?php echo $enforce['u50']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u50'].")</span></td>";
|
||||
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u43" src="img/x.gif" title="Guardsman" alt="Guardsman"> <input class="text" <?php if ($enforce['u3']<=0) {echo ' disabled="disabled"';}?> name="t3" value="<?php echo $enforce['u3']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u3'].")</span></td>";
|
||||
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u46" src="img/x.gif" title="Natarian Knight" alt="Natarian Knight"> <input class="text" <?php if ($enforce['u6']<=0) {echo ' disabled="disabled"';}?> name="t6" value="<?php echo $enforce['u6']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['u6'].")</span></td>";
|
||||
if($enforce['hero']>0){
|
||||
?>
|
||||
<td class="line-last large"><img class="unit uhero" src="img/x.gif" title="Hero" alt="Hero"> <input class="text" name="t11" value="<?php echo $enforce['hero']; ?>" maxlength="6" type="text">
|
||||
<?php
|
||||
echo"<span class=\"none\">(".$enforce['hero'].")</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
<table class="troop_details" cellpadding="1" cellspacing="1">
|
||||
<tbody class="infos">
|
||||
<tr>
|
||||
<th>Arrived:</th>
|
||||
|
||||
<?php
|
||||
$att_tribe = $session->tribe;
|
||||
$start = ($att_tribe-1)*10+1;
|
||||
$end = ($att_tribe*10);
|
||||
$speeds = array();
|
||||
//find slowest unit.
|
||||
for($i=$start;$i<=$end;$i++)
|
||||
{
|
||||
if (isset($enforce['u'.$i]))
|
||||
{
|
||||
if($enforce['u'.$i]!='' && $enforce['u'.$i]>0)
|
||||
{
|
||||
//$speeds[] = $unitspeeds[$i-2];
|
||||
$speeds[] = ${'u'.$i}['speed'];
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($enforce['hero']>0){
|
||||
$qh = "SELECT * FROM ".TB_PREFIX."hero WHERE uid = ".$to['owner']."";
|
||||
$resulth = mysql_query($qh);
|
||||
$hero_f=mysql_fetch_array($resulth);
|
||||
$hero_unit=$hero_f['unit'];
|
||||
$speeds[] = $GLOBALS['u'.$hero_unit]['speed'];
|
||||
}
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($session->uid,2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($village->wid,2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($session->uid,2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($fromCor,$toCor,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<td colspan="10">
|
||||
<div class="in">in <?php echo $generator->getTimeFormat($time); ?></div>
|
||||
<div class="at">at <span id="tp2"> <?php echo date("H:i:s",time()+$time)?></span><span> hours</span></div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<input name="ckey" value="<?php echo $ckey; ?>" type="hidden">
|
||||
<input name="id" value="39" type="hidden">
|
||||
<input name="a" value="533374" type="hidden">
|
||||
<input name="c" value="8" type="hidden">
|
||||
|
||||
|
||||
<p class="btn"><input value="ok" name="s1" id="btn_ok" class="dynamic_img " src="img/x.gif" alt="OK" type="image" onclick="if (this.disabled==false) {document.getElementsByTagName('form')[0].submit();} this.disabled=true;" onLoad="this.disabled=false;"></p>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
$slots = $_POST['slot'];
|
||||
$lid = $_POST['lid'];
|
||||
$tribe = $_POST['tribe'];
|
||||
$getFLData = $database->getFLData($lid);
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = ".$lid." order by id asc";
|
||||
$array = $database->query_return($sql);
|
||||
foreach($array as $row){
|
||||
$sql1 = mysql_fetch_array(mysql_query("SELECT * FROM ".TB_PREFIX."units WHERE vref = ".$getFLData['wref']));
|
||||
$sid = $row['id'];
|
||||
$wref = $row['towref'];
|
||||
$t1 = $row['t1'];$t2 = $row['t2'];$t3 = $row['t3'];$t4 = $row['t4'];$t5 = $row['t5'];
|
||||
$t6 = $row['t6'];$t7 = $row['t7'];$t8 = $row['t8'];$t9 = $row['t9'];$t10 = $row['t10'];
|
||||
$t11 = 0;
|
||||
$villageOwner = $database->getVillageField($wref,'owner');
|
||||
$userAccess = $database->getUserField($villageOwner,'access',0);
|
||||
if($userAccess != '0' && $userAccess != '8' && $userAccess != '9'){
|
||||
if($tribe == 1){ $uname = "u"; } elseif($tribe == 2){ $uname = "u1"; } elseif($tribe == 3){ $uname = "u2"; }elseif($tribe == 4){ $uname = "u3"; }else {$uname = "u4"; }
|
||||
if($tribe == 1){ $uname1 = "u1"; } elseif($tribe == 2){ $uname1 = "u2"; } elseif($tribe == 3){ $uname1 = "u3"; }elseif($tribe == 4){ $uname1 = "u4"; }else {$uname1 = "u5"; }
|
||||
if($tribe == 1){ $uname2 = ""; } elseif($tribe == 2){ $uname2 = "1"; } elseif($tribe == 3){ $uname2 = "2"; }elseif($tribe == 4){ $uname2 = "3"; }else {$uname2 = "4"; }
|
||||
if($sql1[$uname.'1']>=$t1 && $sql1[$uname.'2']>=$t2 && $sql1[$uname.'3']>=$t3 && $sql1[$uname.'4']>=$t4 && $sql1[$uname.'5']>=$t5 && $sql1[$uname.'6']>=$t6 && $sql1[$uname.'7']>=$t7 && $sql1[$uname.'8']>=$t8 && $sql1[$uname.'9']>=$t9 && $sql1[$uname1.'0']>=$t10 && $sql1['hero']>=$t11){
|
||||
if($_POST['slot'.$sid]=='on'){
|
||||
$ckey = $generator->generateRandStr(6);
|
||||
$id = $database->addA2b($ckey,time(),$wref,$t1,$t2,$t3,$t4,$t5,$t6,$t7,$t8,$t9,$t10,$t11,4);
|
||||
|
||||
$data = $database->getA2b($ckey, time());
|
||||
|
||||
$eigen = $database->getCoor($getFLData['wref']);
|
||||
$from = array('x'=>$eigen['x'], 'y'=>$eigen['y']);
|
||||
$ander = $database->getCoor($data['to_vid']);
|
||||
$to = array('x'=>$ander['x'], 'y'=>$ander['y']);
|
||||
$start = ($tribe-1)*10+1;
|
||||
$end = ($tribe*10);
|
||||
|
||||
$speeds = array();
|
||||
$scout = 1;
|
||||
|
||||
//find slowest unit.
|
||||
for($i=1;$i<=10;$i++){
|
||||
if ($data['u'.$i]){
|
||||
if($data['u'.$i] != '' && $data['u'.$i] > 0){
|
||||
if($unitarray) { reset($unitarray); }
|
||||
$unitarray = $GLOBALS["u".(($tribe-1)*10+$i)];
|
||||
$speeds[] = $unitarray['speed'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$artefact = count($database->getOwnUniqueArtefactInfo2($getFLData['owner'],2,3,0));
|
||||
$artefact1 = count($database->getOwnUniqueArtefactInfo2($getFLData['wref'],2,1,1));
|
||||
$artefact2 = count($database->getOwnUniqueArtefactInfo2($getFLData['owner'],2,2,0));
|
||||
if($artefact > 0){
|
||||
$fastertroops = 3;
|
||||
}else if($artefact1 > 0){
|
||||
$fastertroops = 2;
|
||||
}else if($artefact2 > 0){
|
||||
$fastertroops = 1.5;
|
||||
}else{
|
||||
$fastertroops = 1;
|
||||
}
|
||||
$time = round($generator->procDistanceTime($from,$to,min($speeds),1)/$fastertroops);
|
||||
$foolartefact = $database->getFoolArtefactInfo(2,$village->wid,$seesion->uid);
|
||||
if(count($foolartefact) > 0){
|
||||
foreach($foolartefact as $arte){
|
||||
if($arte['bad_effect'] == 1){
|
||||
$time *= $arte['effect2'];
|
||||
}else{
|
||||
$time /= $arte['effect2'];
|
||||
$time = round($time);
|
||||
}
|
||||
}
|
||||
}
|
||||
if($data['u7'] > 0){
|
||||
$ctar1 = 99;
|
||||
}else{
|
||||
$ctar1 = 0;
|
||||
}
|
||||
$ctar2 = 0;
|
||||
$abdata = $database->getABTech($getFLData['wref']);
|
||||
$reference = $database->addAttack(($getFLData['wref']),$data['u1'],$data['u2'],$data['u3'],$data['u4'],$data['u5'],$data['u6'],$data['u7'],$data['u8'],$data['u9'],$data['u10'],$data['u11'],$data['type'],$ctar1,$ctar2,0,$abdata['b1'],$abdata['b2'],$abdata['b3'],$abdata['b4'],$abdata['b5'],$abdata['b6'],$abdata['b7'],$abdata['b8']);
|
||||
$totalunits = $data['u1']+$data['u2']+$data['u3']+$data['u4']+$data['u5']+$data['u6']+$data['u7']+$data['u8']+$data['u9']+$data['u10']+$data['u11'];
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'1'), array($data['u1']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'2'), array($data['u2']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'3'), array($data['u3']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'4'), array($data['u4']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'5'), array($data['u5']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'6'), array($data['u6']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'7'), array($data['u7']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'8'), array($data['u8']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'9'), array($data['u9']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array($uname2.'10'), array($data['u10']), array(0));
|
||||
$database->modifyUnit($getFLData['wref'], array('hero'), array($data['u11']), array(0));
|
||||
|
||||
$database->addMovement(3,$getFLData['wref'],$data['to_vid'],$reference,time(),($time+time()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
header("Location: build.php?id=39&t=99");
|
||||
?>
|
||||
@@ -0,0 +1,104 @@
|
||||
<h1>Send Troops</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
|
||||
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u1" src="img/x.gif" title="Legionnaire" onclick="document.snd.t1.value=''; return false;" alt="Legionnaire"> <input class="text" <?php if ($village->unitarray['u1']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u1']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u1']."; return false;\">(".$village->unitarray['u1'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u4" src="img/x.gif" title="Equites Legati" alt="Equites Legati"> <input class="text" <?php if ($village->unitarray['u4']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u4']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u4']."; return false;\">(".$village->unitarray['u4'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u7" src="img/x.gif" title="Battering Ram" alt="Battering Ram"> <input class="text" <?php if ($village->unitarray['u7']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u7']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u7']."; return false;\">(".$village->unitarray['u7'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u9" src="img/x.gif" title="Senator" alt="Senator"> <input class="text" <?php if ($village->unitarray['u9']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u9']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u9']."; return false;\">(".$village->unitarray['u9'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u2" src="img/x.gif" title="Praetorian" alt="Praetorian"> <input class="text" <?php if ($village->unitarray['u2']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u2']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u2']."; return false;\">(".$village->unitarray['u2'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u5" src="img/x.gif" title="Equites Imperatoris" alt="Equites Imperatoris"> <input class="text" <?php if ($village->unitarray['u5']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u5']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u5']."; return false;\">(".$village->unitarray['u5'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="regular"><img class="unit u8" src="img/x.gif" title="Fire Catapult" alt="Fire Catapult"> <input class="text" <?php if ($village->unitarray['u8']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u8']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u8']."; return false;\">(".$village->unitarray['u8'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u10" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($village->unitarray['u10']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u10']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u10']."; return false;\">(".$village->unitarray['u10'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u3" src="img/x.gif" title="Imperian" alt="Imperian"> <input class="text" <?php if ($village->unitarray['u3']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u3']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u3']."; return false;\">(".$village->unitarray['u3'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u6" src="img/x.gif" title="Equites Caesaris" alt="Equites Caesaris"> <input class="text" <?php if ($village->unitarray['u6']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u6']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u6']."; return false;\">(".$village->unitarray['u6'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"><?php
|
||||
if ($village->unitarray['hero']>0){
|
||||
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
|
||||
}
|
||||
?></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<h1>Send Troops</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
|
||||
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u11" src="img/x.gif" title="Clubswinger" onclick="document.snd.t1.value=''; return false;" alt="Clubswinger"> <input class="text" <?php if ($village->unitarray['u11']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u11']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u11']."; return false;\">(".$village->unitarray['u11'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u14" src="img/x.gif" title="Scout" alt="Scout"> <input class="text" <?php if ($village->unitarray['u14']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u14']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u14']."; return false;\">(".$village->unitarray['u14'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u17" src="img/x.gif" title="Ram" alt="Ram"> <input class="text" <?php if ($village->unitarray['u17']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u17']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u17']."; return false;\">(".$village->unitarray['u17'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u19" src="img/x.gif" title="Chief" alt="Chief"> <input class="text" <?php if ($village->unitarray['u19']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u19']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u19']."; return false;\">(".$village->unitarray['u19'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u12" src="img/x.gif" title="Spearman" alt="Spearman"> <input class="text" <?php if ($village->unitarray['u12']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u12']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u12']."; return false;\">(".$village->unitarray['u12'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u15" src="img/x.gif" title="Paladin" alt="Paladin"> <input class="text" <?php if ($village->unitarray['u15']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u15']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u15']."; return false;\">(".$village->unitarray['u15'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="regular"><img class="unit u18" src="img/x.gif" title="Catapult" alt="Catapult"> <input class="text" <?php if ($village->unitarray['u18']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u18']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u18']."; return false;\">(".$village->unitarray['u18'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u20" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($village->unitarray['u20']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u20']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u20']."; return false;\">(".$village->unitarray['u20'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u13" src="img/x.gif" title="Axeman" alt="Axeman"> <input class="text" <?php if ($village->unitarray['u13']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u13']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u13']."; return false;\">(".$village->unitarray['u13'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u16" src="img/x.gif" title="Teutonic Knight" alt="Teutonic Knight"> <input class="text" <?php if ($village->unitarray['u16']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u16']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u16']."; return false;\">(".$village->unitarray['u16'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"><?php
|
||||
if ($village->unitarray['hero']>0){
|
||||
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
|
||||
}
|
||||
?></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<h1>Send Troops</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="1278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
|
||||
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u21" src="img/x.gif" title="Phalanx" onclick="document.snd.t1.value=''; return false;" alt="Phalanx"> <input class="text" <?php if ($village->unitarray['u21']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u21']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u21']."; return false;\">(".$village->unitarray['u21'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u24" src="img/x.gif" title="Theutates Thunder" alt="Theutates Thunder"> <input class="text" <?php if ($village->unitarray['u24']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u24']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u24']."; return false;\">(".$village->unitarray['u24'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u27" src="img/x.gif" title="Ram" alt="Ram"> <input class="text" <?php if ($village->unitarray['u27']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u27']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u27']."; return false;\">(".$village->unitarray['u27'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u29" src="img/x.gif" title="Chieftain" alt="Chieftain"> <input class="text" <?php if ($village->unitarray['u29']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u29']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u29']."; return false;\">(".$village->unitarray['u29'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u22" src="img/x.gif" title="Swordsman" alt="Swordsman"> <input class="text" <?php if ($village->unitarray['u22']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u22']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u22']."; return false;\">(".$village->unitarray['u22'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u25" src="img/x.gif" title="Druidrider" alt="Druidrider"> <input class="text" <?php if ($village->unitarray['u25']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u25']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u25']."; return false;\">(".$village->unitarray['u25'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="regular"><img class="unit u28" src="img/x.gif" title="Trebuchet" alt="Trebuchet"> <input class="text" <?php if ($village->unitarray['u28']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u28']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u28']."; return false;\">(".$village->unitarray['u28'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u30" src="img/x.gif" title="Settler" alt="Settler"> <input class="text" <?php if ($village->unitarray['u30']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u30']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u30']."; return false;\">(".$village->unitarray['u30'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u23" src="img/x.gif" title="Pathfinder" alt="Pathfinder"> <input class="text" <?php if ($village->unitarray['u23']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u23']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u23']."; return false;\">(".$village->unitarray['u23'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u26" src="img/x.gif" title="Haeduan" alt="Haeduan"> <input class="text" <?php if ($village->unitarray['u26']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u26']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u26']."; return false;\">(".$village->unitarray['u26'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"><?php
|
||||
if ($village->unitarray['hero']>0){
|
||||
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
|
||||
}
|
||||
?></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<h1>Send Troops</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="3278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
|
||||
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u31" src="img/x.gif" title="<?php echo U31; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U31; ?>"> <input class="text" <?php if ($village->unitarray['u31']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u31']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u31']."; return false;\">(".$village->unitarray['u31'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u34" src="img/x.gif" title="<?php echo U34; ?>" alt="<?php echo U34; ?>"> <input class="text" <?php if ($village->unitarray['u34']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u34']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u34']."; return false;\">(".$village->unitarray['u34'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u37" src="img/x.gif" title="<?php echo U37; ?>" alt="<?php echo U37; ?>"> <input class="text" <?php if ($village->unitarray['u37']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u37']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u37']."; return false;\">(".$village->unitarray['u37'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u39" src="img/x.gif" title="<?php echo U39; ?>" alt="<?php echo U39; ?>"> <input class="text" <?php if ($village->unitarray['u39']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u39']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u39']."; return false;\">(".$village->unitarray['u39'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u32" src="img/x.gif" title="<?php echo U32; ?>" alt="<?php echo U32; ?>"> <input class="text" <?php if ($village->unitarray['u32']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u32']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u32']."; return false;\">(".$village->unitarray['u32'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u35" src="img/x.gif" title="<?php echo U35; ?>" alt="<?php echo U35; ?>"> <input class="text" <?php if ($village->unitarray['u35']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u35']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u35']."; return false;\">(".$village->unitarray['u35'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="regular"><img class="unit u38" src="img/x.gif" title="<?php echo U38; ?>" alt="<?php echo U38; ?>"> <input class="text" <?php if ($village->unitarray['u38']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u38']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u38']."; return false;\">(".$village->unitarray['u38'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u40" src="img/x.gif" title="<?php echo U40; ?>" alt="<?php echo U40; ?>"> <input class="text" <?php if ($village->unitarray['u40']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u40']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u40']."; return false;\">(".$village->unitarray['u40'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u33" src="img/x.gif" title="<?php echo U33; ?>" alt="<?php echo U33; ?>"> <input class="text" <?php if ($village->unitarray['u33']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u33']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u33']."; return false;\">(".$village->unitarray['u33'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u36" src="img/x.gif" title="<?php echo U36; ?>" alt="<?php echo U36; ?>"> <input class="text" <?php if ($village->unitarray['u36']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u36']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u36']."; return false;\">(".$village->unitarray['u36'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"><?php
|
||||
if ($village->unitarray['hero']>0){
|
||||
echo "<img class=\"unit uhero\" src=\"img/x.gif\" title=\"Hero\" alt=\"Hero\"> <input class=\"text\" name=\"t11\" value=\"\" maxlength=\"6\" type=\"text\"> ";
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t11.value=".$village->unitarray['hero']."; return false;\">(".$village->unitarray['hero'].")</a></td>";
|
||||
}
|
||||
?></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
<h1>Send Troops</h1>
|
||||
|
||||
<form method="POST" name="snd" action="a2b.php"><input name="timestamp" value="3278280730" type="hidden"> <input name="timestamp_checksum" value="597fa8" type="hidden"> <input name="b" value="1" type="hidden">
|
||||
|
||||
|
||||
<table id="troops" cellpadding="1" cellspacing="1">
|
||||
<tbody><tr>
|
||||
<td class="line-first column-first large"><img class="unit u41" src="img/x.gif" title="<?php echo U41; ?>" onclick="document.snd.t1.value=''; return false;" alt="<?php echo U41; ?>"> <input class="text" <?php if ($village->unitarray['u41']<=0) {echo ' disabled="disabled"';}?> name="t1" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u41']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t1.value=".$village->unitarray['u41']."; return false;\">(".$village->unitarray['u41'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="line-first large"><img class="unit u44" src="img/x.gif" title="<?php echo U44; ?>" alt="<?php echo U44; ?>"> <input class="text" <?php if ($village->unitarray['u44']<=0) {echo ' disabled="disabled"';}?> name="t4" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u44']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t4.value=".$village->unitarray['u44']."; return false;\">(".$village->unitarray['u44'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-first regular"><img class="unit u47" src="img/x.gif" title="<?php echo U47; ?>" alt="<?php echo U47; ?>"> <input class="text" <?php if ($village->unitarray['u47']<=0) {echo ' disabled="disabled"';}?> name="t7" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u47']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t7.value=".$village->unitarray['u47']."; return false;\">(".$village->unitarray['u47'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<td class="line-first column-last small"><img class="unit u49" src="img/x.gif" title="<?php echo U49; ?>" alt="<?php echo U49; ?>"> <input class="text" <?php if ($village->unitarray['u49']<=0) {echo ' disabled="disabled"';}?> name="t9" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u49']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t9.value=".$village->unitarray['u49']."; return false;\">(".$village->unitarray['u49'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="column-first large"><img class="unit u42" src="img/x.gif" title="<?php echo U42; ?>" alt="<?php echo U42; ?>"> <input class="text" <?php if ($village->unitarray['u42']<=0) {echo ' disabled="disabled"';}?> name="t2" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u42']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t2.value=".$village->unitarray['u42']."; return false;\">(".$village->unitarray['u42'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
|
||||
<td class="large"><img class="unit u45" src="img/x.gif" title="<?php echo U45; ?>" alt="<?php echo U45; ?>"> <input class="text" <?php if ($village->unitarray['u45']<=0) {echo ' disabled="disabled"';}?> name="t5" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u45']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t5.value=".$village->unitarray['u45']."; return false;\">(".$village->unitarray['u45'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="regular"><img class="unit u48" src="img/x.gif" title="<?php echo U48; ?>" alt="<?php echo U48; ?>"> <input class="text" <?php if ($village->unitarray['u48']<=0) {echo ' disabled="disabled"';}?> name="t8" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u48']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t8.value=".$village->unitarray['u48']."; return false;\">(".$village->unitarray['u48'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="column-last small"><img class="unit u50" src="img/x.gif" title="<?php echo U50; ?>" alt="<?php echo U50; ?>"> <input class="text" <?php if ($village->unitarray['u50']<=0) {echo ' disabled="disabled"';}?> name="t10" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u50']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t10.value=".$village->unitarray['u50']."; return false;\">(".$village->unitarray['u50'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="line-last column-first large"><img class="unit u43" src="img/x.gif" title="<?php echo U43; ?>" alt="<?php echo U43; ?>"> <input class="text" <?php if ($village->unitarray['u43']<=0) {echo ' disabled="disabled"';}?> name="t3" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u43']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t3.value=".$village->unitarray['u43']."; return false;\">(".$village->unitarray['u43'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last large"><img class="unit u46" src="img/x.gif" title="<?php echo U46; ?>" alt="<?php echo U46; ?>"> <input class="text" <?php if ($village->unitarray['u46']<=0) {echo ' disabled="disabled"';}?> name="t6" value="" maxlength="6" type="text">
|
||||
<?php
|
||||
if ($village->unitarray['u46']>0){
|
||||
echo "<a href=\"#\" onclick=\"document.snd.t6.value=".$village->unitarray['u46']."; return false;\">(".$village->unitarray['u46'].")</a></td>";
|
||||
}else{
|
||||
echo "<span class=\"none\">(0)</span></td>";
|
||||
}
|
||||
?>
|
||||
<td class="line-last regular"></td>
|
||||
<td class="line-last column-last"></td> </tr>
|
||||
</tbody></table>
|
||||
|
||||
Reference in New Issue
Block a user