Source

Selador / einheiten.php

<?php
//check the page we are on

$no_reload = 1;

require_once("php/base/world.inc.php");
require_once("php/base.php");
require_once("php/event.php");
require_once ("unitmap.php");

require_once("units/units_functions.php");
$f = getPage($_REQUEST, $me);
require_once("units/units_calculations.php");

require_once("headers.php");
echo '<script src="scripts/units.js" type="text/javascript"></script>';
require_once ("styles/php/base_design-".$_SESSION['theme'].".php");
require_once("blocked.php");



echo '<div id="contentbox">';

//units in this town
if ($f == 1) //works
{
	echo '<div id="onecolumn">';
	require_once("units/units_in_town.php");
	echo '</div>';
}

//units on their way
if ($f == 2)  //fixme
{
	echo '<div id="onecolumn">';

	//user might want to cancel a troop movement
	if (isset($_GET['a'] ))
		abortUnitMovement ($_REQUEST, $me, $gui);
	require_once("units/units_movements.php");
	echo '</div>';

}

//user wants to send units
if (($f == 4) || ($f == 3)) //works
{
	require_once("units/units_send.php");
}

//recruit units
if ($f == 5) //works
{
	echo '<div id="onecolumn">';

	//user might want to delete a building queue entry
	if ($_GET['deleteBuildingQueue'] ==true)
		deleteBuildingQueueEntry ($me, $gui) ;

	require_once("units/units_recruit.php");
	echo '</div>';

}


$me->activevillage->update_stamp ();

require_once("footer.php");

?>