Location: PHPKode > projects > PhpBlock > A9.8/modules/dungeon/dungeonbodycontent.inc.php
<div id="main"></div>
<?php
textdomain("dungeon");

if($locIsDebugActivated) {
?>
<div id="footer">
<table>
	<tr valign="top">
		<td>
		<form name="debugform" id="debugform"><textarea rows="10" cols="80"
			name="debug1">
                </textarea> <textarea rows="10" cols="80" name="debug2">
                </textarea> <textarea rows="10" cols="80" name="debug3">
                </textarea></form>
	</tr>
</table>
</div>
	<?php
}
?>
<div id="messagesInnerContent">
	<div id="messagesInnerContentSendMessage"></div>
	<div><?php echo gettext("get messages from");?>
		<select id='filterPlayer'
			onchange="refreshMessagesPanel(this.options[this.selectedIndex].value)">
			<option value="0"><?php echo gettext("anyone");?></option>
			<option value="-1"><?php echo gettext("system");?></option>
			<option value="-2"><?php echo gettext("all players");?></option>
			<option value="-3"><?php echo gettext("average important messages");?></option>
			<option value="-4"><?php echo gettext("important messages");?></option>
			<?php
			echoOptionsWithPlayerNameAndPlayerId();
			?>
		</select>
	</div>
	<!-- messagesInnerContentWrapped height is set threw javascript in showfirst method -->
	<div id="messagesInnerContentWrapped" style="overflow: auto;">
		<div id="messagesInnerContentMessageList"></div>
	</div>
</div>
<div id="alliancePanelInnerContent">
</div>
<div id="optionPanelInnerContent">
	<?php echo gettext("Choose your language")?>
	<p>
	<select onchange="javascript:changeInterfaceLanguage(this.options[this.selectedIndex].value)">
<?php
		dungeonEchoAvailableLanguage($locPlayer->getLanguage());
?>
	</select>
	</p>
<!-- 	
	<?php echo gettext("Your alliance color on the interface")?>
	<p>
	<select>
		<option>&nbsp;</option>
	</select>
	</p>
	<p>
	<?php echo gettext("Other alliance color on the interface");?>
	<select>
		<option>&nbsp;</option>
	</select>
	</p>
	 -->
</div>
<div id="realObjectListInnerContent">
<div class="float_right">
	<table border=0>
		<tr>
			<td> 
			<input
				type='button' value='update' onclick='updatePlayerObjectList()' />
			<select
				onchange="globalObjectList.setListWithName(this.options[this.selectedIndex].value)">
				<option value="unit"><?php echo gettext("Unit")?></option>
				<option value="block"><?php echo gettext("Block")?></option>
			</select>
			</td>
			<td rowspan="2">
<?php
$locListActionTab1 = array(
			'image/actiontab/move.png', Constante::$ACTION_MOVE_OBJECT,
			gettext('move'),
			);
echoActionUnit($locListActionTab1);
?>
			</td>
			<td rowspan="2">
<?php
$locListActionTab1 = array(
			'image/actiontab/stop.png', Constante::$ACTION_STOP_OBJECT,
			gettext('stop')
			);
echoActionUnit($locListActionTab1);
?>
			</td>
			<!-- 
			<td rowspan="2">
<?php
$locListActionTab2 = array(
			'image/actiontab/searchtrap.png', DungeonConstante::$ACTION_OBJECT_SEARCH_TRAP,
			gettext('find a trap'),
			);
echoActionUnit($locListActionTab2);
?>
			</td> -->
			<td rowspan="2">
<?php
$locListActionTab2 = array(
			'image/actiontab/objectdig.png', DungeonConstante::$ACTION_OBJECT_DIG,
			gettext('dig')
			);
echoActionUnit($locListActionTab2);
?>
			</td>
			<td rowspan="2">
<?php
$locListActionTab3 = array(
			'image/actiontab/killunit.png', DungeonConstante::$ACTION_KILL_OBJECT,
			gettext('disband unit')
			);
echoActionUnit($locListActionTab3);
?>
			</td>
		</tr>
		<tr>
			<td>
			<?php echo gettext("center")?>
			<input type='CHECKBOX' title='autocenter'
				checked onchange='globalObjectList.setAutoCenter(this.checked)' />
			<?php echo gettext("select")?>
			<input type='CHECKBOX' title='autoselect' checked
				onchange='globalObjectList.setAutoSelect(this.checked)' />
			<img class="clickable"
				width="20" title='Previous' src='image/actiontab/left.png'
				onclick='globalObjectList.getCurrentObjectList().previous();' /> 
			<img class="clickable"
				width="20" title='Next' src='image/actiontab/right.png'
				onclick='globalObjectList.getCurrentObjectList().next();' /> 
			</td>
			
<?php
function echoActionUnit($locListActionTab) {
	for($i=0; $i < count($locListActionTab); $i+=3) {
		$locSrcImageText = $locListActionTab[$i];
		echo "<div";
		echo " ";
		echo " id='objectMapActionsDiv".$locListActionTab[$i+1]."'";
		echo " class='clickable selectableCurrentAction' "; 
		echo " onclick=\"javascript:";
		if($locListActionTab[$i+1]==DungeonConstante::$ACTION_KILL_OBJECT
				||$locListActionTab[$i+1]==Constante::$ACTION_STOP_OBJECT) {
			echo "clickOnActionForSelected(event, 'objectMapActions', ".$locListActionTab[$i+1].")";
		} else {
			echo "clickOnAction(event, ".$locListActionTab[$i+1].", C_SEND_TARGET_ZONE_AND_SELECTED);";
			echo " changeCurrentSelectable(this);";
		}
		echo ';">';
		
		if("" <> $locSrcImageText) {
			echo "<img width='".Constante::$ZONE_IMAGE_SIZE."' height='".Constante::$ZONE_IMAGE_SIZE."' src='$locSrcImageText' ";
			echo " title='".$locListActionTab[$i+2]."'/>";
		} else {
			echo $locListActionTab[$i+2];
		}
		echo "	<div id='objectMapActionsValue".$locListActionTab[$i+1]."'></div>";
		echo "</div>";
	}
}?>
			</td>
		</tr>
		<tr>
			<td colspan="5">
				<select id="realObjectListInnerContentList"
					onchange="globalObjectList.getCurrentObjectList().setIndex(this.selectedIndex)">
				</select>
			</td>
		</tr>
	</table>
</div>
<div id="realObjectListInnerContentDescription"></div>
</div>
<div id="incomeInnerContent"></div>
<div id="tickerInnerContent"></div>
<div id="strategicMapInnerContent"></div>
<div id="rankingInnerContent"></div>
<div 
	id="maintaskbarInnerContent"><?php echo gettext("good")?> 
	<input type='number' name='playergood' size='6' id='playergood' value='updating' />
	<?php echo gettext("evil")?>
	<input type='number' name='playerevil' size='4' id='playerevil' value='updating' />
	<?php echo $locPlayer->playerName;?>
	<select style="width: 5em"
		onchange='changeAlpha(this.options[this.selectedIndex].value)'>
	<option value="127"><?php echo gettext("No color")?></option>
	<?php
	for($i=10; $i <= 100; $i+=10) {
		$locAlpha = (int)(127*(100-$i)/100.0);
		echo "<option value=\"$locAlpha\"";
		if(30 == $i) {
			echo " selected ";
		}
		echo ">$i%</option>;";
	}
	?>
</select> <!--zoom <input type='number' size='3' id='zoom' value='' onchange='changeZoom()'/>-->
<input type='submit' id='updatemode' value=<?php echo gettext("rock")?>
	onclick='changeRockUpdateSatus()' /> <input type='submit'
	id='showMessage' value='<?php echo gettext("message")?>'
	onclick='togglePanelUpdatedWithURL("messagesPanel");' /> <input
	type='submit' id='showIncome' value='<?php echo gettext("income")?>'
	onclick='togglePanelUpdatedWithURL("incomePanel");' /> <input
	type='submit' id='showTicker' value='<?php echo gettext("ticker")?>'
	onclick='togglePanelUpdatedWithURL("tickerPanel");' /> <?php if($locIsDebugActivated) { echo "<input type='submit' value='update' onclick='resetImages()'/>"; }?>
<select
	onchange='if(this.selectedIndex > 0) {
    		if(toggleLevelObjects(this.selectedIndex-1)) {
    			this.options[this.selectedIndex].text = "<?php echo gettext("Hide level")?> "+ (this.selectedIndex-1);
    		} else {
    			this.options[this.selectedIndex].text = "<?php echo gettext("Show level")?> "+ (this.selectedIndex-1);
    		}
    		this.selectedIndex=0;
    	}'>
	<option><?php echo gettext("Show/Hide")?></option>
	<option><?php echo gettext("Hide level")?> 0</option>
	<option><?php echo gettext("Hide level")?> 1</option>
	<option><?php echo gettext("Hide level")?> 2</option>
</select> <input type='text' id='currentpos' value='' size="11"
	onchange="if(!centerToZoneWithTextualCoord($(this).val())) {setCurrentPos();}" />
<input type='submit' id='showHelper' value='<?php echo gettext("Helper")?>'
	onclick='togglePanel("helperPanel");' />
<input type='submit' id='showStrategicMap' value='<?php echo gettext("Map")?>'
	onclick='togglePanel("strategicMapPanel");' />
<input type='submit' id='showRanking' value='<?php echo gettext("Ranking")?>'
	onclick='togglePanel("rankingPanel");' />
<input type='submit' id='showAlliance' value='<?php echo gettext("Alliance")?>'
	onclick='togglePanelUpdatedWithURL("alliancePanel");' />
<input type='submit' id='showOptions' value='<?php echo gettext("Options")?>'
	onclick='togglePanel("optionPanel");' />
</div>
<div id="rememberpositionInnerContent"><select id='positionList'
	size='5' WIDTH="100%" style="width:100%" multiple='multiple'
	onclick='javascript:centerToZoneWithSelect(event, wdgId("positionList"))'>
</select><br>
<input type='button' value='<?php echo gettext("Remove")?>'
	onclick='javascript:removeOptionSelected(wdgId("positionList"));' /> <input
	type='button' value='Add' onclick='javascript:appendCurrentPosition();' />
</div>
<div id="playerInfoInnerContent"><textarea id='playerInfoT1' wrap='on'
	multiple rows='23'></textarea></div>
<div id="mapactionsInnerContent"><?php
$locPlayerBlockIdList = Block::getAllBlocksId($locPlayerId);
if(count($locPlayerBlockIdList) == 0) {
	$locListActionTab = array();
	/*
	 array_push($locListActionTab, 'image/actiontab/begindungeon.png');
	 array_push($locListActionTab, DungeonConstante::$ACTION_DUNGEON_PLAYER_START);
	 array_push($locListActionTab, 'Become a dungeon master and conquer your first block');
	 array_push($locListActionTab, 'image/actiontab/beginhuman.png', DungeonConstante::$ACTION_HUMAN_PLAYER_START);
	 array_push($locListActionTab, 'Become a human knight and conquer your first block');
	 */
} else {
	/*
	 * Unused because this is auto now :)
	 'image/zonegoldexploited.png', DungeonConstante::$ACTION_EXPLOIT_GOLD,
	 'begin exploitation of gold mine',
	 'image/zonegold.png', DungeonConstante::$ACTION_STOP_EXPLOIT_GOLD,
	 'stop exploitation of gold mine',
	 * */
	$locListActionTab = array(
	'image/actiontab/noaction.png', Constante::$ACTION_NO_ACTION,
	gettext('no action'),
	/*'image/actiontab/conquer.png', DungeonConstante::$ACTION_CONQUER_BLOCK,
	gettext('conquer one block where you have troops'),
	'image/actiontab/release.png', DungeonConstante::$ACTION_RELEASE_BLOCK,
	gettext('release one of your block'),
	($locPlayer->playerType == DungeonConstante::$PLAYER_TYPE_HUMAN_KNIGHT?
	'image/zonebarracksurface.png':
	'image/zonebarrackunderground.png'),
	DungeonConstante::$ACTION_BUILD_BARRACK,
	gettext("buy a barrack")." (".getCostString(DungeonConstante::$ACTION_BUY_BARRACK_COST).", ".gettext("cost shame instead power if you have no barrack").")",
	*/
	'image/zoneundergroundroad.png', DungeonConstante::$ACTION_BUILD_ROAD,
	gettext('build a road on an empty zone').' ('.getCostString(DungeonConstante::$ACTION_BUILD_ROAD_COST).')',
	'image/zoneunderground.png', DungeonConstante::$ACTION_BLOCK_DIG,
	gettext('dig around one of your block').' ('.getCostString(DungeonConstante::$ACTION_DIG_COST).')',
	'image/zonestone.png', DungeonConstante::$ACTION_BUILD_STONE,
	gettext('build a stone to reinforce your rooms').' ('.getCostString(DungeonConstante::$ACTION_BUY_STONE_COST).')',
	'image/zonerock.png', DungeonConstante::$ACTION_BUILD_ROCK,
	gettext('build a rock to fill an empty zone').' ('.getCostString(DungeonConstante::$ACTION_BUY_ROCK_COST).')',
	'image/zonedoor.png', DungeonConstante::$ACTION_BUILD_DOOR,
	gettext('build a door').' ('.getCostString(DungeonConstante::$ACTION_BUILD_DOOR_COST).')',
	'image/zonestair.png', DungeonConstante::$ACTION_BUILD_STAIR,
	gettext('build a stair').' ('.getCostString(DungeonConstante::$ACTION_BUILD_STAIR_COST).')',
//	'image/object/trap.png', DungeonConstante::$ACTION_BUILD_TRAP,
//	gettext('build a trap').' ('.getCostString(DungeonConstante::$ACTION_BUY_TRAP_COST).')',
	'image/zonebarrackunderground.png', DungeonConstante::$ACTION_BUILD_MONSTER_NEST,
	gettext('build a monster nest near ennemies base').' ('.getCostString(DungeonConstante::$ACTION_BUY_MONSTER_NEST_COST).' evil points)',
	
	'image/actiontab/lava.png', DungeonConstante::$ACTION_LAVA_SPELL,
	gettext('lava against units and population').' ('.getCostString(DungeonConstante::$ACTION_BUY_LAVA_SPELL_COST).' evil points)',
	
	'image/actiontab/zizany.png', DungeonConstante::$ACTION_ZIZANY_SPELL,
	gettext('zizany spell against units').' ('.getCostString(DungeonConstante::$ACTION_BUY_ZIZANY_SPELL_COST).' evil points)',
	
	'image/actiontab/release.png', DungeonConstante::$ACTION_DISBAND_SPELL,
	gettext('disband units which returns to home'),
	
	'image/actiontab/recruit.png', DungeonConstante::$ACTION_RECRUIT_SPELL,
	gettext('recruit units from population'),
	
	ObjectManager::getInstance()->getImageURL(32, array(DungeonConstante::$REAL_OBJECT_INFO_VALUE_RALLY_POINT_IMAGE, "l1")), 
	DungeonConstante::$ACTION_BUILD_RALLY_POINT_1,
	gettext('build a low rally point for your units'),
	ObjectManager::getInstance()->getImageURL(32, array(DungeonConstante::$REAL_OBJECT_INFO_VALUE_RALLY_POINT_IMAGE, "l2")), 
	DungeonConstante::$ACTION_BUILD_RALLY_POINT_2,
	gettext('build a low/medium rally point for your units'),
	ObjectManager::getInstance()->getImageURL(32, array(DungeonConstante::$REAL_OBJECT_INFO_VALUE_RALLY_POINT_IMAGE, "l5")), 
	DungeonConstante::$ACTION_BUILD_RALLY_POINT_5,
	gettext('build a medium rally point for your units'),
	ObjectManager::getInstance()->getImageURL(32, array(DungeonConstante::$REAL_OBJECT_INFO_VALUE_RALLY_POINT_IMAGE, "l7")), 
	DungeonConstante::$ACTION_BUILD_RALLY_POINT_7,
	gettext('build a medium/high rally point for your units'),
	ObjectManager::getInstance()->getImageURL(32, array(DungeonConstante::$REAL_OBJECT_INFO_VALUE_RALLY_POINT_IMAGE, "l10")),
	DungeonConstante::$ACTION_BUILD_RALLY_POINT_10,
	gettext('build a high rally point for your units'),
	);
	/*
	if($locPlayer->playerType == DungeonConstante::$PLAYER_TYPE_DUNGEON_MASTER) {
		array_push($locListActionTab, 'image/object/grunt.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_GRUNT);
		array_push($locListActionTab, gettext('recruit a grunt').' ('.getCostString(DungeonConstante::$ACTION_BUY_GRUNT_COST).')');

		array_push($locListActionTab, 'image/object/warork.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_WARORK);
		array_push($locListActionTab, gettext('recruit a war ork').' ('.getCostString(DungeonConstante::$ACTION_BUY_WAR_ORK_COST).')');

		array_push($locListActionTab, 'image/object/minerork.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_MINERORK);
		array_push($locListActionTab, gettext('recruit an ork miner').' ('.getCostString(DungeonConstante::$ACTION_BUY_MINER_ORK_COST).')');

		array_push($locListActionTab, 'image/treasure5.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_TREASURE);
		array_push($locListActionTab, gettext('buy an empty treasure room to stock gold').' ('.getCostString(DungeonConstante::$ACTION_BUY_TREASURE_COST).')');
	} else if($locPlayer->playerType == DungeonConstante::$PLAYER_TYPE_HUMAN_KNIGHT) {
		array_push($locListActionTab, 'image/object/soldier.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_SOLDIER);
		array_push($locListActionTab, gettext('recruit a soldier').' ('.getCostString(DungeonConstante::$ACTION_BUY_SOLDIER_COST).')');

		array_push($locListActionTab, 'image/object/knight.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_KNIGHT);
		array_push($locListActionTab, gettext('recruit a knight').' ('.getCostString(DungeonConstante::$ACTION_BUY_KNIGHT_COST).')');

		array_push($locListActionTab, 'image/object/miner.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_MINER);
		array_push($locListActionTab, gettext('recruit a miner').' ('.getCostString(DungeonConstante::$ACTION_BUY_MINER_COST).')');

		array_push($locListActionTab, 'image/city5.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_CITY);
		array_push($locListActionTab, gettext('buy an empty city to stock gold').' ('.getCostString(DungeonConstante::$ACTION_BUY_CITY_COST).')');
	} else {
		array_push($locListActionTab, 'image/object/skeleton.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_SKELETON);
		array_push($locListActionTab, gettext('recruit a skeleton').' ('.getCostString(DungeonConstante::$ACTION_BUY_SKELETON_COST).')');

		array_push($locListActionTab, 'image/object/spectre.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_SPECTRE);
		array_push($locListActionTab, gettext('recruit a spectre').' ('.getCostString(DungeonConstante::$ACTION_BUY_SPECTRE_COST).')');

		array_push($locListActionTab, 'image/object/deadworm.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_DEAD_WORM);
		array_push($locListActionTab, gettext('recruit a dead worm').' ('.getCostString(DungeonConstante::$ACTION_BUY_DEADWORM_COST).')');

		array_push($locListActionTab, 'image/necropolis5.png');
		array_push($locListActionTab, DungeonConstante::$ACTION_BUILD_NECROPOLIS);
		array_push($locListActionTab, gettext('buy an empty necropolis to stock gold').' ('.getCostString(DungeonConstante::$ACTION_BUY_NECROPOLIS_COST).')');
	}
*/
}

for($i=0; $i < count($locListActionTab); $i+=3) {
	echo "<img src='".$locListActionTab[$i]."'";
	echo " class='clickable selectableCurrentAction' width='".Constante::$ZONE_IMAGE_SIZE."' height='".Constante::$ZONE_IMAGE_SIZE."'"; 
	echo " onclick=\"javascript:clickOnAction(event,".$locListActionTab[$i+1].",C_SEND_ONLY_TARGET_ZONE);";
	echo " changeSelectImage(event,'objectMapActions','currentActionObject','image/actiontab/noaction.png');";
	echo " changeCurrentSelectable(this);";
	echo "\"";
	echo " title='".$locListActionTab[$i+2]."'";
	echo ' />';
}
?><img class='clickable' title='UP' src='image/actiontab/up.png'
<?php echo " width='".Constante::$ZONE_IMAGE_SIZE."' height='".Constante::$ZONE_IMAGE_SIZE."'";?>
	onclick='gloMap.zVision(1)' /> 
	<img class='clickable' title='DOWN'
<?php echo " width='".Constante::$ZONE_IMAGE_SIZE."' height='".Constante::$ZONE_IMAGE_SIZE."'";?>
	src='image/actiontab/down.png' onclick='gloMap.zVision(-1)' /></div>
	
<div id="helperInnerContent"><?php
function helperEchoImageIcone($parPathToImage) {
	echo "<img  width=\"32px\" height=\"32px\" src=\"$parPathToImage\"/>";
}
?>
<h1 align=center><?php echo gettext("Welcome in Dungeon")?></h1>
<a href="<?php echo DungeonConstante::$RULES_URL;?>">Rules in details</a>
<!-- 
<h2>Map movement and short cut</h2>
<ul>
	<li>
	<p><i>left button</i> press left button and move your mouse to move the
	map.</p>
	</li>
	<li>
	<p><i>SHIFT+SPACE</i> hide interface (allow equally to move map).</p>
	</li>
	<li>
	<p><i>ALT</i> or <i>CTRL</i>: unselectionned current selectionned unit.</p>
	</li>
	<li>
	<p><i>i</i> or <i>right click</i>: to get information on a zone or a
	unit you have to press <i>i</i> and to click on object. Information
	will be shown in the information panel.</p>
	</li>
	<li>
	<p>Button <?php helperEchoImageIcone("image/actiontab/up.png")?> and <?php helperEchoImageIcone("image/actiontab/down.png")?>
	are used to go upper or lower in the game.</p>
	</li>
	<li>
	<p><i>CTRL+M</i> hide/show messages.</p>
	</li>
</ul>
-->
<h2>Game basis</h2>
This game is a slow game, you have to play around each two days. So
don't panic if your unit does not move immediately. Send order and wait
the server confirmation, if your unit has action point then it move
immediately. If it doesn't have then wait two days and watch the
evolution.
<!-- <h2>Beginning</h2>
<p>You have to find and exploit gold mine ! So first watch around your
base to find this: <?php helperEchoImageIcone("image/zonegold.png")?>.</p>
<p>Next you have to move your unit to the block where gold mine is.</p>
<p>To move your unit you have to select it (click on it), and to click
on <?php helperEchoImageIcone("image/actiontab/move.png")?> and to click
on the map.</p>
<h2>Dig</h2>
<h3>Dig with power</h3>
<p>To dig with your power, select this: <?php helperEchoImageIcone("image/actiontab/blockdig.png")?>
and click on target rock zone you want to dig.</p>
<h3>Dig with unit</h3>
<p>To dig with your selected unit <?php helperEchoImageIcone("image/actiontab/objectdig.png")?>
and click near it.</p>
 -->
<h2>Contact</h2>
<p>If you have any question send a mail to <a
	href="mailto:hide@address.com">Wizmerhill</a>.</p>
</div>
Return current item: PhpBlock