Source

Selador / merchant / merchant_info.php

<?php
calcMerchants();
?>
<table class="border" >
	<tr>
		<th class="bold">
			Infos:
		</th>
	</tr>
	<tr>
		<td>
			<?php echo "H&auml;ndler vorhanden: ".prettynumber((($me->activevillage->merchants)-$merchants_gone))."/".prettynumber($me->activevillage->merchants)."<br>"; ?>
		</td>
	</tr>
	<tr>
		<td class="iterate">
			Jeder Deiner H&auml;ndler kann <?php echo $me->merchant_cap ?>  Rohstoffe tragen
		</td>
	</tr>
	<tr>
		<td>
			Gesamttragekapazit&auml;t: <?php echo prettynumber(((($me->activevillage->merchants)-$merchants_gone)*($me->merchant_cap))) ?>
		</td>
	</tr>
	<tr>
		<td class="iterate">
			H&auml;ndlergeschwindigkeit: <?php echo prettynumber((int)($me->merchant_speed * WORLD_MERCH_SPEED)) ?> Felder pro Stunde
		</td>
	</tr>
</table>


<?php
	if (count ($othermerchants) >= 1)
	{
		echo '<table class="border">';
		echo '<tr><th class="bold">Ankommende H&auml;ndler:</th></tr>';
		foreach ($gui->others_transports as $merchantid => $time)
		{
			$gui->displayedtimers++;
			echo "<tr><td>Transport von <a href=\"land.php?z=".calc_z ($othermerchants[$merchantid]['from_x'], $othermerchants[$merchantid]['from_y'])."\">".stripslashes($othermerchants[$merchantid]['from_vill'])."</a></td></tr>";
			echo '<tr class="iterate"><td><img src="styles/'.$_SESSION['theme'].'/holz.gif" title="Holz" width="18" alt="holz"> '.$othermerchants[$merchantid]['ress1'].", <img src=\"styles/".$_SESSION['theme']."/stein.gif\" width=\"18\" title=\"Stein\" alt=\"Stein\"> ".$othermerchants[$merchantid]['ress2'];
			echo ",<img src=\"styles/".$_SESSION['theme']."/eisen.gif\" width=\"18\" title=\"Eisen\" alt=\"Eisen\">  ".$othermerchants[$merchantid]['ress3'].", <img src=\"styles/".$_SESSION['theme']."/gold.gif\" title=\"Gold\" alt=\"Gold\"width=\"18\" > ".$othermerchants[$merchantid]['ress4'];
			echo ", in <span id=\"timer".$gui->displayedtimers."\">".external_calcdur ($time)."</span>";
		}
		echo "</table>";
	}


	if (count ($mymerchants) >= 1)
	{
		echo '<table class="border">';
		echo '<tr><th class="bold">Eigene H&auml;ndler:</th></tr>';
		foreach ($gui->my_transports as $merchantid => $time)
		{
			$thismerchant = $mymerchants[$merchantid];
			// $time = $gui->my_transports[$merchantid];
			if (1 == $thismerchant['flag'])
			{
				$gui->displayedtimers++;
				echo "<tr><td>R&uuml;ckkehr aus <a href=\"land.php?z=".calc_z ($thismerchant['to_x'], $thismerchant['to_y'])."\">".stripslashes($thismerchant['to_vill'])."</a></td></tr>";
				echo "<tr class=\"iterate\"><td>in <span id=\"timer".$gui->displayedtimers."\">".external_calcdur ($time)."</span></td></tr>";
			}
			else
			{
				$gui->displayedtimers++;
				echo "<tr><td>Transport nach <a href=\"land.php?z=".calc_z ($thismerchant['to_x'], $thismerchant['to_y'])."\">".stripslashes($thismerchant['to_vill'])."</a></td></tr>";
				echo "<tr class=\"iterate\"><td><img src=\"styles/".$_SESSION['theme']."/holz.gif\" width=\"18\" title=\"Holz\" alt=\"holz\"> ".$thismerchant['ress1'].", <img src=\"styles/".$_SESSION['theme']."/stein.gif\" title=\"Stein\" alt=\"Stein\" width=\"18\"> ".$thismerchant['ress2'];
				echo ", <img src=\"styles/".$_SESSION['theme']."/eisen.gif\" title=\"Eisen\" alt=\"Eisen\" width=\"18\">  ".$thismerchant['ress3'].", <img src=\"styles/".$_SESSION['theme']."/gold.gif\" title=\"Gold\" alt=\"Gold\" width=\"18\"> ".$thismerchant['ress4'];
				echo ", in <span id=\"timer".$gui->displayedtimers."\">".external_calcdur ($time)."</span></td></tr>";
			}
		}
		echo "</table>";
	}