Project: * Clean-up (Eclipse cruft, unused files, etc...) * Git-specific changes * Maven POMs clean-up and changes for the build system * Version set to 1.0.0-0 in the development branches * Maven plug-ins updated to latest versions * Very partial dev. documentation added

This commit is contained in:
Emmanuel BENOîT 2011-12-09 08:07:33 +01:00
parent c74e30d5ba
commit 0665a760de
1439 changed files with 1020 additions and 1649 deletions

View file

@ -0,0 +1,28 @@
<#include "../game.ftl">
<#macro page title hidePlanets=false>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Legacy Worlds Beta 6 <@version/> - ${title?xhtml}</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/main.js"></script>
</head>
<body>
<div id="extframe">
<div class="internal" id="intframe">
<!-- Title and planet list -->
<div class="top-centered">
<p style="padding: 22px 0px 0px 0px" id="tc-title">${title?xhtml}</p>
</div>
<div class="cframe full-width"><#nested></div>
</div>
<div class="internal" id="footer">
Copyright (C) 2004-2010, <a title="DeepClone Development" href="http://www.deepclone.com">DeepClone Development</a>
</div>
</div>
</body>
</html>
</#macro>

View file

@ -0,0 +1,44 @@
<#macro page title>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Legacy Worlds Beta 6 <@version/> - ${title?xhtml}</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/main.js"></script>
</head>
<body>
<div id="extframe">
<div class="internal" id="intframe">
<!-- Header -->
<a id="hbutton" href="home" title="Legacy Worlds home page"><span>Legacy Worlds Beta 6 <@version/></span></a>
<div id="version">current version: <@full_version/></div>
<div class="top-centered" id="tc-title">${title?xhtml}</div>
<!-- Log-in box -->
<div id="lbox">
<form method="post" action="login.action">
<div>
E-mail address: <input type="text" name="mail" value="" size="15" maxlength="128" class='input' /><br/>
Password: <input type="password" name="password" value='' size="15" maxlength="128" class='input' /><br/>
<a title="Recover password" href="password-recovery">Forgot your password?</a>
<input type="submit" value='Log in' class='input' />
</div>
</form>
</div>
<!-- Menu -->
<a class="mbutton" id="b0" href="scope" title="Scope of this milestone">Scope</a>
<a class="mbutton" id="b1" href="rules" title="Game rules">Rules</a>
<a class="mbutton" id="b2" href="register" title="Register">Register</a>
<div class="cframe"><#nested></div>
</div>
<div class="internal" id="footer">
Copyright (C) 2004-2010, <a title="DeepClone Development" href="http://www.deepclone.com">DeepClone Development</a>
</div>
</div>
</body>
</html>
</#macro>

View file

@ -0,0 +1,70 @@
<#include "../game.ftl">
<#macro page title hidePlanets=false>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Legacy Worlds Beta 6 <@version/> - ${title?xhtml}</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/main.js"></script>
</head>
<body>
<div id="extframe">
<div class="internal" id="intframe">
<a id="hbutton" href="overview" title="Overview page"><span>Legacy Worlds Beta 6 <@version/></span></a>
<div id="version"><@abbr_gt/>: <@game_time record=data.page.gameTime /> / <@abbr_st/>: ${data.page.serverTime?string("yyyy-MM-dd HH:mm:ss ZZZZZ")}</div>
<!-- Title and planet list -->
<div class="top-centered">
<p id="tc-title">${title?xhtml}</p>
<p>&nbsp;</p>
<#if !hidePlanets>
<#if data.page.planets?size == 0>
<p id="get-new-planet"><a href="get-planet">Get new planet</a></p>
<#else>
<p id="jump-to-planet"><span class="jtp-text">Jump to planet</span>: <span>
<#list data.page.planets as planet>
<a href="planet-${planet.id}">${planet.name?xhtml}</a>
</#list>
</span></p>
</#if>
</#if>
</div>
<div id="lbox" class="game-info">
<strong>${data.page.empire}</strong>
<#if data.page.alliance?has_content>
[<strong>${data.page.alliance}</strong>]
</#if><br/>
<span id="gi-cash">${data.page.cash?string(",##0")}</span> <@abbr_bgc/><br/>
<#if data.page.special?has_content>
<span class="special-info">
<#switch data.page.special>
<#case 'v'>ON VACATION<#break>
<#case 's'>ENTERING VACATION<#break>
<#case 'q'>QUITTING<#break>
</#switch>
</span>
</#if>
<br/>
<a href="account">Account</a> - <a href="logout.action">Log out</a>
</div>
<a class="mbutton" id="b0" href="planets" title="Planets">Planets</a>
<a class="mbutton" id="b1" href="fleets" title="Fleets">Fleets</a>
<a class="mbutton" id="b2" href="map" title="Map of the universe">Map</a>
<a class="mbutton" id="b3" href="alliance" title="Alliance">Alliance</a>
<a class="mbutton" id="b4" href="enemies" title="Manage enemy players and alliances">Enemy list</a>
<a class="mbutton" id="b5" href="messages" title="Messages">Messages</a>
<a class="mbutton" id="b6" href="bugtrack" title="Bug tracking application">Bug tracker</a>
<div class="cframe"><#nested></div>
</div>
<div class="internal" id="footer">
Copyright (C) 2004-2010, <a title="DeepClone Development" href="http://www.deepclone.com">DeepClone Development</a>
</div>
</div>
</body>
</html>
</#macro>

View file

@ -0,0 +1,27 @@
<#macro page title>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Legacy Worlds Beta 6 <@version/> - ${title?xhtml}</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/main.js"></script>
</head>
<body>
<div id="extframe">
<div class="internal" id="intframe">
<!-- Header -->
<a id="hbutton" href="player-session" title="Legacy Worlds home page"><span>Legacy Worlds Beta 6 <@version/></span></a>
<div id="version">current version: <@full_version/></div>
<div class="top-centered" id="tc-title">${title?xhtml}</div>
<div class="cframe full-width offline"><#nested></div>
</div>
<div class="internal" id="footer">
Copyright (C) 2004-2010, <a title="DeepClone Development" href="http://www.deepclone.com">DeepClone Development</a>
</div>
</div>
</body>
</html>
</#macro>

View file

@ -0,0 +1,33 @@
<#macro page title>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Legacy Worlds Beta 6 <@version/> - ${title?xhtml}</title>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/main.js"></script>
</head>
<body>
<div id="extframe">
<div class="internal" id="intframe">
<!-- Header -->
<a id="hbutton" href="home" title="Legacy Worlds home page"><span>Legacy Worlds Beta 6 <@version/></span></a>
<div id="version">current version: <@full_version/></div>
<div class="top-centered" id="tc-title">${title?xhtml}</div>
<!-- Log-in box -->
<div id="lbox">
<br/><br/><br/>
<a href="logout.action">Log out</a>
</div>
<div class="cframe full-width"><#nested></div>
</div>
<div class="internal" id="footer">
Copyright (C) 2004-2010, <a title="DeepClone Development" href="http://www.deepclone.com">DeepClone Development</a>
</div>
</div>
</body>
</html>
</#macro>

View file

@ -0,0 +1,66 @@
<#macro game_time record>
<#if record.years == 1>
1 year,
<#elseif record.years gt 1 >
${record.years?string(",##0")} years,
</#if>
<#if record.weeks == 1>
1 week,
<#elseif record.weeks gt 1 >
${record.weeks?string} weeks,
</#if>
<#if record.days == 1>
1 day
<#elseif record.days gt 1 >
${record.days?string} days,
<#else>
first day,
</#if>
${record.hours?string("00")}:00
</#macro>
<#macro game_duration record>
<#if record.years == 1>
1 year
<#elseif record.years gt 1 >
${record.years?string(",##0")} years
</#if>
<#if record.weeks == 1>
1 week
<#elseif record.weeks gt 1 >
${record.weeks?string} weeks
</#if>
<#if record.days == 1>
1 day
<#elseif record.days gt 1 >
${record.days?string} days
</#if>
<#if record.hours == 1>
1 hour
<#elseif record.hours gt 1 >
${record.hours?string} hours
</#if>
</#macro>
<#macro rl_duration rTime>
<#local rlDays = (rTime / 1440)?floor>
<#local rlHours = ((rTime - rlDays * 1440) / 60)?floor>
<#local rlMinutes = (rTime - rlDays * 1440 - rlHours * 60)>
<#if rlDays gt 0>
<#if rlDays = 1>1 day<#else>${rlDays} days</#if>
</#if>
<#if rlHours gt 0>
<#if rlHours = 1>1 hour<#else>${rlHours} hours</#if>
</#if>
<#if rlMinutes gt 0>
<#if rlMinutes = 1>1 minute<#else>${rlMinutes} minutes</#if>
</#if>
</#macro>
<#macro duration rTime gTime>
<#if data.page.useRLTime>
<@rl_duration rTime=rTime />
<#else>
<span title="<@rl_duration rTime=rTime />"><@game_duration record=gTime /></span>
</#if>
</#macro>
<#macro abbr_bgc><abbr title="billion galactic credits">bgc</abbr></#macro>
<#macro abbr_st><abbr title="Server time">ST</abbr></#macro>
<#macro abbr_gt><abbr title="Time in the game universe">GT</abbr></#macro>

View file

@ -0,0 +1,28 @@
<@page title="Legacy Worlds Beta 6 - Milestone 1">
<p>
Welcome to the first milestone release for Legacy Worlds' Beta 6.
</p>
<p>&nbsp;</p>
<p>
This is not a complete game. In fact, most of Beta 5's advanced features have been left out.
However, it is a good starting point for the development of Beta 6. The complete list of features
included in this release can be found on the <a href="scope">Scope</a> page.
</p>
<p>&nbsp;</p>
<p>
You will find more information about the game itself on the <a href="rules">Rules</a> page. It's
basically the same old thing: build stuff, kill people using the aforementioned stuff. Only the
details have changed.
</p>
<p>&nbsp;</p>
<p>
Now - this is a bit unusual, but because the real goal of this release is to test the system itself,
you are encouraged to create multiple accounts.
</p>
<p>&nbsp;</p>
<p>
While this version may be played independently from Beta 5, it doesn't feature forums (although a bug
reporting system has been included); it is therefore recommended that you
<a href="http://www.legacyworlds.com">join Beta 5</a> anyway.
</p>
</@page>

View file

@ -0,0 +1,8 @@
<@page title="Logged out">
<p>
You have been logged out of Legacy Worlds.
</p>
<p>
Thanks for playing!
</p>
</@page>

View file

@ -0,0 +1,8 @@
<@page title="Invalid credentials">
<p>
The e-mail address and password you entered do not match any existing account.
</p>
<p>
Please try again. If you have forgotten your password, you may use the <a href="password-recovery">password recovery</a> utility.
</p>
</@page>

View file

@ -0,0 +1,8 @@
<@page title="Logged out automatically">
<p>
Your session has expired, and you've been logged out of Legacy Worlds.
</p>
<p>
You need to log in again.
</p>
</@page>

View file

@ -0,0 +1,8 @@
<@page title="Password Recovery Successful">
<p>
Your password recovery request has been successfully processed.
</p>
<p>
You may now log in with the new password you have just set.
</p>
</@page>

View file

@ -0,0 +1,11 @@
<@page title="Account disabled">
<p>
Your account is currently disabled.
</p>
<p>
You can either leave it as it is by <a href="logout.action">logging out</a> or choose to <a href="reactivate.action">re-activate it</a>.
</p>
<p>
Please note that your email address must still be valid if you want to re-activate your account.
</p>
</@page>

View file

@ -0,0 +1,113 @@
<@page title="Rules of the game">
<h3>General</h3>
<p>
The whole game is based on per-minute updates. Because these updates are computed depending on when the game
server was started, they may happen at any time.
</p>
<p>
Because of this, a <em>game time</em> is provided. It corresponds to the amount of updates that were computed.
One "hour" of game time corresponds to an update and, generally speaking, a minute of real-world time.
</p>
<p>
No real attempts at balancing the game were made. It is therefore quite likely that some aspects of the rules
will not work as expected.
</p>
<p>&nbsp;</p>
<h3>Money &amp; research</h3>
<p>
Income is mostly provided by an empire's population. While income and upkeep are displayed for 24h of real-world time,
an empire's cash reserve will increase (or decrease) continuously. The optional <em>Generic assembly line</em> building
provides additional income.
</p>
<p>
Populations also generate research points, which are used to update an empire's research progress. When a
technology reaches 100% of its required research points, it needs to be <em>implemented</em>, which costs
money.
</p>
<p>
Two sets of three technologies are available: <em>civilian technologies</em> provide new buildings, while
<em>military technologies</em> provide new ships.
</p>
<p>
If an empire's cash reserve reach 0 because of a high upkeep, its fleets will begin to degrade. If it does not
own any fleets, then its planet's buildings start to degrade.
</p>
<p>
It is however possible for an empire to reach 0 because of buildings and ships construction. In this case,
no damage will be inflicted, but construction will be slowed down.
</p>
<p>&nbsp;</p>
<h3>Planet management</h3>
<p>
Two types of buildings are available without any technology: <em>ship parts factories</em> (which allow ships to be built)
and <em>defence turrets</em> (which provide stationary defences to your planets).
</p>
<p>
Buildings construction or destruction are not immediate. The speed at which buildings are constructed or destroyed
depend on a planet's population. When building, the monetary cost of buildings is taken from the empire's reserves
at every update.
</p>
<p>
Destroying buildings is much faster than constructing them; in addition, a small proportion of the building's cost
is added back to the empire's cash reserves once the building is destroyed.
</p>
<p>
A planet's happiness is determined by three factors: the amount of jobs provided by the planet's buildings relative
to the planet's population, the stationary defences' power and the amount of planets owned by the empire.
</p>
<p>
Happiness does not change immediately when something affects it. The change is progressive, and its speed depend
on its amplitude and on the planet's total population.
</p>
<p>
When a planet's happiness is below 25%, its citizen go on strike, which reduces the planet's income, production and
defences.
</p>
<p>
Population growth is directly proportional to the planet's happiness.
</p>
<p>&nbsp;</p>
<h3>Fleets and ships</h3>
<p>
Ships are constructed on planets using the same principle as buildings. However, their construction speed is determined
by the planet's military production.
</p>
<p>
Ships have two characteristics: their <em>power</em>, which determine how effective they are in battle, and their
<em>orbit-to-orbit flight time</em>, which determines their speed and the various penalties which may be inflicted
on a fleet (redirection, redeployment, etc).
</p>
<p>
A fleet's power is the sum of each of its ships' power. Its orbit-to-orbit flight time is determined by the slowest
ship in the fleet.
</p>
<p>
Only fleets that have the <em>available</em> status may be moved, split, or merged. In addition, fleets that have
the <em>deploying</em> status do not inflict damage in battle (they do however receive damage). All fleets may be
renamed, disbanded, or switched between offensive and defensive modes, whatever their status is.
</p>
<p>&nbsp;</p>
<h3>Battles</h3>
<p>
A battle starts whenever an attacking fleet is present on a planet, and end when all attacking fleets are gone / have
been destroyed, or when all defensive fleets and planetary defences are gone / have been destroyed. In the latter case,
the attacker with the biggest fleet takes control of the planet at the next update.
</p>
<p>
Battles are updated every minute. Therefore, there are no "battle reports"; instead, a history of the battle and
the events that occured during the battle are provided.
</p>
<p>
A battle's intensity starts at a low level, slowly increasing over time until it reaches full intensity. It determines how
much damage is dealt.
</p>
<p>
Battle damage on both buildings and ships accumulates over time. It is not possible to repair ships or buildings.
</p>
<p>&nbsp;</p>
</@page>

View file

@ -0,0 +1,56 @@
<@page title="Scope of this milestone">
<p>
This milestone consists mostly in writing the game's engine and most of the common
administrative functionalities. Because of this, the <a href="rules">game</a> itself
is pretty limited, and so is the interface.
</p>
<p>&nbsp;</p>
<h3>Game server</h3>
<p>
The stand-alone game server runs independently of any interface and is responsible for
all administrative and game functionalities. This release concentrates on:
</p>
<ul>
<li><strong>system basics</strong> - logging, run-time access to game-related "constants",
internationalisation, communications with user interfaces,</li>
<li><strong>accounts</strong> - from registration to preferences to inactivity management,</li>
<li><strong>naming system</strong> - the names of all in-game entities (empires and planets
in this release) are managed through the same sub-system,</li>
<li><strong>bug tracking system</strong> - because it will not be possible to include forums
until much further in the game's development cycle, the bug-tracking system is an essential
tool,</li>
<li><strong>scheduler</strong> - because ticks still need to run, sometimes.</li>
</ul>
<p>&nbsp;</p>
<h3>Server administration</h3>
<p>
Server administration is one of the most important areas for this release, although most
people will (hopefully) never get to see it. It is implemented as a separate user interface
accessing the server through its external communication interface. The administration interface
includes:
</p>
<ul>
<li><strong>privilege system</strong> (not all administrators are equal),</li>
<li><strong>account management</strong>,</li>
<li><strong>game parameters access</strong>,</li>
<li><strong>bug tracker administration</strong>,</li>
<li><strong>names validation</strong>,</li>
<li><strong>log viewer</strong>,</li>
<li><strong>automated error reports</strong>.</li>
</ul>
<p>&nbsp;</p>
<h3>Game and interface</h3>
<p>
While the game does not bring anything really new, it is based on a per-minute update system.
Its interface is probably not really appropriate, as Beta 5's external layout is a bit cramped
when it comes to displaying all required in-game information; it is however temporary.
</p>
<p>
This release is available in two languages - English and French - as the internationalisation
system needs to be tested. However, it is extremely likely that future milestone releases will
only be available in English.
</p>
</@page>

View file

@ -0,0 +1,220 @@
<#macro render_preference pref>
<#switch pref.type>
<#case 'BOOLEAN'>
<@form_select label=pref.name name=pref.id id="pref-${pref.id}">
<@form_option value="0" text="No" selected=( pref.value != "1" )/>
<@form_option value="1" text="Yes" selected=( pref.value == "1" )/>
</@form_select>
<#break>
<#case 'INTEGER'>
<#case 'STRING'>
<@form_text label=pref.name name=pref.id id="pref-${pref.id}" value=pref.value />
<#break>
<#case 'CHOICE'>
<@form_select label=pref.name name=pref.id id="pref-${pref.id}">
<#list pref.choices as choice>
<@form_option value=choice.value text=choice.display selected=( pref.value == choice.value )/>
</#list>
</@form_select>
<#break>
</#switch>
<#if pref.description?has_content>
<@form_extra>${pref.description?xhtml}</@form_extra>
</#if>
</#macro>
<#macro render_prefs_category category>
<@form_part title=category.name />
<#list category.preferences as p>
<@render_preference pref=p />
</#list>
</#macro>
<#macro render>
<@page title="Account">
<@tabs>
<@tab id="prefs" title="Preferences">
<@form name="prefs-form" action="set-preferences" hash="prefs">
<#list data.account.preferences as c>
<@render_prefs_category category=c />
</#list>
<@form_extended_submit label="Change preferences">
<@ff_submit label="Defaults" name="load-default-preferences" />
</@form_extended_submit>
</@form>
</@tab>
<@tab id="basics" title="Identity">
<@form name="lang-form" action="set-language" hash="basics">
<@form_part title="Account language" />
<@form_select name="language" label="Language">
<#list data.account.supportedLanguages.languages as lang>
<@form_option text=lang.name value=lang.id selected=(lang.id == data.account.language) />
</#list>
</@form_select>
<@form_submit label="Update" />
</@form>
<@form name="pwd-form" action="set-password" hash="basics">
<@form_part title="Change password" />
<#if data.authError!false>
<@form_error>Incorrect password</@form_error>
</#if>
<@form_pwd label="Current password" name="current" />
<#switch data.passwordError!"">
<#case "EMPTY">
<@form_error>Empty password.</@form_error>
<#break>
<#case "TOO_WEAK">
<@form_error>This password is too weak.</@form_error>
<#break>
<#case "MISMATCH">
<@form_error>Password field and confirmation field do not match.</@form_error>
<#break>
<#case "PROHIBITED">
<@form_error>You are not allowed to use this password here.</@form_error>
<#break>
<#default>
<@form_extra>At least 6 characters, containing both text and numbers. Bonus points for special characters, spaces, and extremely long passwords.</@form_extra>
</#switch>
<@form_pwd label="Password" name="password" />
<@form_pwd label="Password (confirm)" name="passwordConfirm" />
<@form_submit label="Update" />
</@form>
<#if data.account.mailChange?has_content>
<#local mc = data.account.mailChange>
<#if mc.used>
<@form name="mail-form" action="set-address" hash="basics">
<@form_part title="Change e-mail address" />
<tr class="form-field">
<th>Current address:</th>
<td>${data.account.address?xhtml}</td>
</tr>
<@form_extra>
You will be able to request an e-mail address change at ${mc.until?string("HH:mm:ss (ZZZZZ)")}.
</@form_extra>
</@form>
<#else>
<@form name="mail-form" action="confirm-set-address" hash="basics">
<@form_part title="Change e-mail address" />
<tr class="form-field">
<th>Current address:</th>
<td>${data.account.address?xhtml}</td>
</tr>
<@form_extra>
You are changing your address to <em>${mc.newAddress?xhtml}</em>.<br/>
Your request will expire at ${mc.until?string("HH:mm (ZZZZZ)")}.
</@form_extra>
<#if data.codeError!false>
<@form_error>Incorrect confirmation code</@form_error>
</#if>
<@form_text name="code" id="mail-confirmation-code" value="${data.code!}" maxLength=64 label="Confirmation code" />
<@form_extended_submit label="Change address">
<@ff_submit label="Cancel" name="cancel-set-address" />
</@form_extended_submit>
</@form>
</#if>
<#else>
<@form name="mail-form" action="set-address" hash="basics">
<@form_part title="Change e-mail address" />
<#if data.mailAuthError!false>
<@form_error>Incorrect password</@form_error>
</#if>
<tr class="form-field">
<th>Current address:</th>
<td>${data.account.address?xhtml}</td>
</tr>
<@form_pwd label="Current password" name="password" id="current-2" />
<#switch data.mailError!"">
<#case "EMPTY">
<@form_error>Empty e-mail address.</@form_error>
<#break>
<#case "INVALID">
<@form_error>Invalid e-mail address.</@form_error>
<#break>
<#case "IN_USE">
<@form_error>This e-mail address is already associated with an account.</@form_error>
<#break>
<#case "SEND_FAIL">
<@form_error>Unable to send confirmation code to this address.</@form_error>
<#break>
<#case "MISMATCH">
<@form_error>E-mail address field and confirmation field do not match.</@form_error>
<#break>
<#default>
<@form_extra>The e-mail address <em>MUST</em> exist.</@form_extra>
</#switch>
<@form_text label="E-mail address" maxLength=128 name="mail" value=data.mail! />
<@form_text label="E-mail address (confirm)" maxLength=128 name="mailConfirm" value=data.mail! />
<@form_submit label="Update" />
</@form>
</#if>
</@tab>
<@tab id="status" title="Status">
<@form name="game-credits" action="no-action" hash="status">
<@form_part title="Game credits" />
<tr class="form-field">
<th>Game credits:</th>
<td>${data.account.gameCredits?string(',##0')}</td>
</tr>
<@form_extra>
Game credits cannot be used at this time. They will however be accumulated
throughout the LWB6 development cycle. You obtain them by reporting bugs.
</@form_extra>
</@form>
<@form name="vacation-form" action="toggle-vacation" hash="status">
<@form_part title="Vacation mode" />
<tr class="form-field">
<th>Vacation credits:</th>
<td>${data.account.vacCredits?string(',##0')}</td>
</tr>
<tr class="form-field">
<th>Maximal duration:</th>
<td>
<#if data.account.vacTime?has_content>
approximately <@game_duration record=data.account.vacTime />
<#else>
less than an hour
</#if>
</td>
</tr>
<#if data.account.vacStart?has_content>
<tr class="form-field">
<th>Vacation start:</th>
<td>${data.account.vacStart?string("HH:mm (yyyy-MM-dd ZZZZZ)")}</td>
</tr>
<#if data.page.special == 'v'>
<@form_submit label="Exit vacation mode" />
<#else>
<@form_submit label="Cancel vacation mode" />
</#if>
<#elseif !data.page.special?has_content && data.account.vacTime?has_content>
<@form_submit label="Enter vacation mode" />
</#if>
</@form>
<#if !data.page.special?has_content>
<@form name="quit-form" action="quit" hash="status">
<@form_part title="Quit game" />
<@form_extra>
If you click the button below, your account will be disabled after 24 hours. You will be able to re-enable it for the next 6 months, after which it will be deleted.
</@form_extra>
<@form_text label="Reason for quitting (optional)" name="reason" value="" />
<@form_submit label="Quit game" />
</@form>
<#elseif data.page.special == 'q'>
<@form name="quit-form" action="cancel-quit" hash="status">
<@form_part title="Quit game" />
<@form_extra>
Your account will be disabled at ${data.account.quitGame?string("HH:mm (yyyy-MM-dd ZZZZZ)")}.
</@form_extra>
<@form_submit label="Cancel" />
</@form>
</#if>
</@tab>
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,268 @@
<#macro show_alliance alliance>
<@dt_main>
<@dt_entry title="Tag">${alliance.tag?xhtml}</@dt_entry>
<@dt_entry title="Name">${alliance.name?xhtml}</@dt_entry>
<@dt_entry title="Leader">${alliance.leaderName?xhtml}</@dt_entry>
<@dt_entry title="Planets">${alliance.planets?string(",##0")}</@dt_entry>
<@dt_entry title=""><a href="msg-alliance-${alliance.id}">Send message</a></@dt_entry>
</@dt_main>
</#macro>
<#macro alliance_info_tab>
<@tab id="info" title="Other alliances">
<@form action="alliance-info" name="alliance-info" hash="info">
<@form_text name="tag" id="ai-tag" label="Alliance tag" value=data.requested! maxLength=5 />
<@form_submit label="Get information" />
</@form>
<#if data.info?has_content>
<@show_alliance alliance=data.info />
</#if>
</@tab>
</#macro>
<#macro alliance_creation_tab>
<#if data.creation?has_content>
<#assign tag = data.creation.tag!>
<#assign tagError = data.creation.tagError!>
<#assign name = data.creation.name!>
<#assign nameError = data.creation.nameError!>
<#else>
<#assign tag = "">
<#assign tagError = "">
<#assign name = "">
<#assign nameError = "">
</#if>
<@tab id="create-alliance" title="Create">
<@form action="create-alliance" name="create-alliance" hash="create-alliance">
<#switch tagError>
<#case "EMPTY"><@form_error>Please specify your alliance's tag.</@form_error><#break>
<#case "INVALID"><@form_error>This tag is invalid.</@form_error><#break>
<#case "UNAVAILABLE"><@form_error>This tag is used by another alliance.</@form_error></break>
</#switch>
<@form_text name="tag" id="ca-tag" label="Alliance tag" value=tag maxLength=5 />
<#switch nameError>
<#case "EMPTY"><@form_error>Please specify your alliance's name.</@form_error><#break>
<#case "INVALID"><@form_error>This name is invalid.</@form_error><#break>
</#switch>
<@form_text name="name" id="ca-name" label="Alliance name" value=name maxLength=5 />
<@form_submit label="Create an alliance" />
</@form>
</@tab>
</#macro>
<#macro alliance_join_tab>
<@tab id="join-alliance" title="Join">
<@form action="join-alliance" name="join-alliance" hash="join-alliance">
<#if data.joinFailure?has_content>
<@form_error>Alliance not found.</@form_error>
</#if>
<@form_text name="tag" id="ja-tag" label="Alliance tag" value=data.joinFailure! maxLength=5 />
<@form_submit label="Join this alliance" />
</@form>
</@tab>
</#macro>
<#macro no_alliance>
<#if data.page.special! != 'v'>
<@alliance_join_tab />
<@alliance_creation_tab />
</#if>
</#macro>
<#macro alliance_joining_tab>
<@tab id="join-alliance" title="Request sent">
<@lineform action="cancel-join" hash="join-alliance">
A request to join <strong>${alliance.main.tag?xhtml}</strong> has been sent.
<#if data.page.special! != 'v'>
<@ff_submit label="Cancel" />
</#if>
</@lineform>
<@show_alliance alliance=alliance.main />
</@tab>
</#macro>
<#macro alliance_planets pList>
<@tab id="planets" title="Planets">
<#if pList?size == 0>
<p>There are no planets in the alliance.</p>
<#return>
</#if>
<@listview>
<@lv_line headers=true>
<@lv_column width=80 centered=true>Coordinates</@lv_column>
<@lv_column width=150>Planet</@lv_column>
<@lv_column width=150>Owner</@lv_column>
</@lv_line>
<#list pList as planet>
<#if planet.battle>
<#local bStart = "<span class='enemy-fleet' style='font-weight:bold'>">
<#local bEnd = "</span>">
<#else>
<#local bStart = " ">
<#local bEnd = " ">
</#if>
<@lv_line>
<@lv_column centered=true>${bStart}(${planet.x},${planet.y};${planet.orbit})${bEnd}</@lv_column>
<@lv_column><a href="planet-${planet.id}">${bStart}${planet.name?xhtml}${bEnd}</a></@lv_column>
<@lv_column>${bStart}${planet.owner?xhtml}${bEnd}</@lv_column>
</@lv_line>
<#if planet.battle>
<@lv_line>
<td>&nbsp;</td>
<td colspan="2">
Military situation:
<strong class="own-fleet">${planet.defence?string(",##0")}</strong>
vs.
<strong class="enemy-fleet">${planet.attack?string(",##0")}</strong>
</td>
</@lv_line>
</#if>
</#list>
</@listview>
</@tab>
</#macro>
<#macro alliance_members mList isLeader empty="">
<#if mList?size == 0 && empty != "">
<p>${empty?xhtml}</p>
<#return>
</#if>
<@listview>
<@lv_line headers=true>
<#if isLeader && data.page.special! != 'v'>
<@lv_column width=40 centered=true>&nbsp;</@lv_column>
</#if>
<@lv_column width="x">Empire</@lv_column>
</@lv_line>
<#list mList as member>
<@lv_line>
<#if isLeader && data.page.special! != 'v'>
<@lv_column centered=true>
<#if member.name == data.page.empire>
&nbsp;
<#else>
<input type="checkbox" name="members" value="${member.id}" />
</#if>
</@lv_column>
</#if>
<@lv_column>
<#if member.name == data.page.empire>
${member.name?xhtml}
<#else>
<a href="msg-empire-${member.id}">${member.name?xhtml}</a>
</#if>
</@lv_column>
</@lv_line>
</#list>
</@listview>
</#macro>
<#macro alliance_member_page>
<#local leader = alliance.leader?has_content>
<@tab id="in-alliance" title="Alliance">
<@lineform action="leave-alliance" hash="join-alliance">
You are
<#if alliance.leader?has_content>
the leader
<#else>
a member
</#if>
of <strong>${alliance.main.tag?xhtml}</strong>.
<#if data.page.special! != 'v'>
<@ff_submit label="Leave alliance" />
</#if>
</@lineform>
<@show_alliance alliance=alliance.main />
</@tab>
<@alliance_planets pList=alliance.member.planets />
<@tab id="members" title="Members">
<#if leader && alliance.member.members?size gt 1 && data.page.special! != 'v'>
<form action="kick-members.action#members" method="post">
</#if>
<@alliance_members mList=alliance.member.members isLeader=leader />
<#if leader && alliance.member.members?size gt 1 && data.page.special! != 'v'>
<div class="form-container">
<table><tr><td>
<@ff_submit label="Kick selected members" />
</td></tr></table>
</div>
</form>
<@lineform action="transfer-leadership" hash="members">
Transfer leadership to
<@ff_select id="leadership" name="leadership">
<#list alliance.member.members as member>
<#if member.name != data.page.empire>
<@form_option value=member.id text=member.name />
</#if>
</#list>
</@ff_select>
<@ff_submit label="Confirm" />
</@lineform>
</#if>
</@tab>
<#if leader>
<@tab id="requests" title="Requests">
<#if alliance.leader.requests?size gt 0 && data.page.special! != 'v'>
<form action="manage-requests.action#requests" method="post">
</#if>
<@alliance_members mList=alliance.leader.requests isLeader=true empty="No pending requests" />
<#if alliance.leader.requests?size gt 0 && data.page.special! != 'v'>
<div class="form-container">
<table><tr><td>
<@ff_select id="requests-select" name="action">
<@form_option value="1" text="Accept" />
<@form_option value="0" text="Reject" />
</@ff_select> selected applicants
<@ff_submit label="Confirm" />
</td></tr></table>
</div>
</form>
</#if>
</@tab>
</#if>
</#macro>
<#macro render>
<@page title="Alliance">
<#assign alliance = data.alliance>
<@tabs>
<#if alliance.main?has_content>
<#if alliance.member?has_content>
<@alliance_member_page />
<#else>
<@alliance_joining_tab />
</#if>
<#else>
<@no_alliance />
</#if>
<@alliance_info_tab />
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,12 @@
<#macro render>
<@page title="You've been banned">
<p>You did it. You got yourself banned. Nice work.</p>
<@dt_main>
<@dt_entry width=200 title="Ban date/time">${data.banTime?string("yyyy-MM-dd HH:mm:ss")}</@dt_entry>
<@dt_entry width=200 title="Reason for the ban">${data.banReason?xhtml}</@dt_entry>
</@dt_main>
<#if data.redeemable>
<p>Your empire has not been deleted yet. You may appeal the ban by sending an email to <a href="mailto:staff@legacyworlds.com">the staff</a> within 48h.</p>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,261 @@
<#macro render_header desc>
<div style="text-align:center;margin: 2px 0">
At <a href="planet-${desc.location.id?string('#')}">${desc.location.name?xhtml}</a>
(<strong>${desc.x},${desc.y}</strong>;${desc.orbit})
</div>
</#macro>
<#macro render_navigation id disp>
<form action="battle-${id}-at.action" method="post">
<table style="width:100%;margin: 2px 0">
<tr>
<td style="width: 30px;text-align: right">
<#if disp.previous?has_content>
<a href="battle-${id?string('#')}-at-${disp.previous.ticks?string('#')}">
</#if>
&lt;&lt;
<#if disp.previous?has_content>
</a>
</#if>
</td>
<td style="text-align: center">
<@ff_select id="view-battle-tick" name="tick" style="width:470px">
<#list disp.all as viewable>
<@form_option value="${viewable.ticks?string('#')}" selected=(viewable.ticks == disp.current.ticks)><@game_time record=viewable.gameTime /></@form_option>
</#list>
</@ff_select>
<@ff_submit label="Go" style="width:40px" />
</td>
<td style="width: 30px;text-align: left">
<#if disp.next?has_content>
<a href="battle-${id?string('#')}-at-${disp.next.ticks?string('#')}">
</#if>
&gt;&gt;
<#if disp.next?has_content>
</a>
</#if>
</td>
<td style="width: 30px;text-align: left">
<a href="battle-${id?string('#')}-latest">&gt;&gt;&gt;</a>
</td>
</tr>
</table>
</form>
</#macro>
<#macro render_list_entry mode record type>
<tr class="${mode}-fleet ${type} empire-entry">
<td style="width:16px">&nbsp;</td>
<td style="width:16px" class="ships-expander" title="Show/hide <#if type = "planet">buildings<#else>ships</#if>">&nbsp;</td>
<td style="width:16px">&nbsp;</td>
<td colspan="2">
<#nested>
</td>
<td style="text-align:center">${record.cPower?string(',##0')}</td>
<td style="text-align:center">${record.lPower?string(',##0')}</td>
</tr>
<#list record.ships as shipType>
<tr class="${mode}-fleet ${type} ship-type">
<td style="width:64px" colspan="4">&nbsp;</td>
<td>${shipType.name}</td>
<td style="text-align:center">${shipType.cAmount?string(',##0')}</td>
<td style="text-align:center">${shipType.lAmount?string(',##0')}</td>
</tr>
</#list>
</#macro>
<#macro render_protagonist mode record>
<#if record.ships?has_content>
<@render_list_entry mode=mode record=record type="empire">
<#if record.player.id = 0 || mode = "own">
${record.player.name?xhtml}
<#else>
<a href="msg-empire-${record.player.id}">${record.player.name?xhtml}</a>
</#if>
</@render_list_entry>
</#if>
</#macro>
<#macro render_planet mode record>
<@render_list_entry mode=mode record=record type="planet"><em>( planet )</em></@render_list_entry>
</#macro>
<#macro render_protagonists mode source>
<#if source.players?size = 0>
<#return>
</#if>
<tr class="${mode}-fleet group">
<td style="width:16px" class="forces-expander" title="Show/hide empires">&nbsp;</td>
<td style="width:16px" class="ships-expander" title="Show/hide ships">&nbsp;</td>
<td colspan="3"><#if mode == "allied">Allied<#else>Hostile</#if> forces</td>
<td style="text-align:center">${source.cPower?string(',##0')}</td>
<td style="text-align:center">${source.lPower?string(',##0')}</td>
</tr>
<#list source.ships as shipType>
<tr class="${mode}-fleet group ship-type">
<td style="width:64px" colspan="4">&nbsp;</td>
<td>${shipType.name}</td>
<td style="text-align:center">${shipType.cAmount?string(',##0')}</td>
<td style="text-align:center">${shipType.lAmount?string(',##0')}</td>
</tr>
</#list>
<#list source.players as pRecord>
<@render_protagonist mode=mode record=pRecord />
</#list>
</#macro>
<#macro render_fleets fData>
<@listview>
<tr><th colspan="6" style="text-align:center; font-size: 110%">Forces</th></tr>
<@lv_line headers=true>
<th style="width:16px">&nbsp;</th>
<th style="width:16px">&nbsp;</th>
<th style="width:16px">&nbsp;</th>
<th style="width:16px">&nbsp;</th>
<th>&nbsp;</th>
<@lv_column width=100 centered=true>Current</@lv_column>
<@lv_column width=100 centered=true>Lost</@lv_column>
</@lv_line>
<@render_protagonist mode="own" record=fData.own />
<#if fData.planet.relation == "OWN">
<@render_planet mode="own" record=fData.planet />
</#if>
<@render_protagonists mode="allied" source=fData.friendly />
<#if fData.planet.relation == "ALLIED">
<@render_planet mode="allied" record=fData.planet />
</#if>
<@render_protagonists mode="enemy" source=fData.hostile />
<#if fData.planet.relation == "ENEMY">
<@render_planet mode="enemy" record=fData.planet />
</#if>
<tr class="tip" style="display:none"><td colspan="7" style="text-align:center"><em>Click "*" and "+" to toggle ships/buildings and forces display.</em></td></tr>
</@listview>
</#macro>
<#macro render_event_items items>
<#list items as item>
<@lv_line>
<td>&nbsp;</td>
<td><strong>${item.name}</strong></td>
<td>${item.cAmount?string(",##0")}</td>
</@lv_line>
</#list>
</#macro>
<#macro render_event event>
<#switch event.type>
<#case "RENAME">
<@lv_line>
<td colspan="3">Planet renamed to <strong>${event.name}</strong></td>
</@lv_line>
<#break>
<#case "SWITCH">
<@lv_line>
<td colspan="3">
<#if event.name = data.page.empire>
We have switched to <#if event.hostile>attack<#else>defence</#if>.
<#else>
<strong>${event.name}</strong> has switched mode and is now <#if event.hostile>hostile<#else>friendly</#if>.
</#if>
</td>
</@lv_line>
<#break>
<#case "BUILD">
<@lv_line>
<td colspan="3">
<#if event.planet>
New buildings have been constructed on the planet.
<#elseif event.name = data.page.empire>
Our new fleets have been deployed.
<#else>
<#if event.hostile>Hostile<#else>Friendly</#if> fleets belonging to <strong>${event.name}</strong> have been deployed.
</#if>
</td>
</@lv_line>
<@render_event_items items=event.ships />
<#break>
<#case "DEPART">
<@lv_line>
<td colspan="3">
<#if event.name = data.page.empire>
Our fleets have left orbit.
<#else>
<#if event.hostile>Hostile<#else>Friendly</#if> fleets belonging to <strong>${event.name}</strong> have left orbit.
</#if>
</td>
</@lv_line>
<@render_event_items items=event.ships />
<#break>
<#case "ARRIVE">
<@lv_line>
<td colspan="3">
<#if event.name = data.page.empire>
Our fleets have joined the battle.
<#else>
<#if event.hostile>Hostile<#else>Friendly</#if> fleets belonging to <strong>${event.name}</strong> have joined the battle.
</#if>
</td>
</@lv_line>
<@render_event_items items=event.ships />
<#break>
<#case "DESTROY">
<@lv_line>
<td colspan="3">
<#if event.planet>
Buildings have been destroyed on the planet.
<#elseif event.name = data.page.empire>
Our fleets have been disbanded.
<#else>
<#if event.hostile>Hostile<#else>Friendly</#if> fleets belonging to <strong>${event.name}</strong> have been disbanded.
</#if>
</td>
</@lv_line>
<@render_event_items items=event.ships />
<#break>
<#default>
<@lv_line>
<td colspan="3">
<em>Missing event type "${event.type}" (this is a bug)</em>
</td>
</@lv_line>
<#break>
</#switch>
</#macro>
<#macro render_history hData>
<#if hData?size = 0>
<#return>
</#if>
<@listview>
<tr><th colspan="3" style="text-align:center; font-size: 110%">History</th></tr>
<@lv_line headers=true>
<th style="width:120px;font-size: 1px">&nbsp;</th>
<th style="width:170px;font-size: 1px">&nbsp;</th>
<th style="font-size: 1px">&nbsp;</th>
</@lv_line>
<#list hData as hInterval>
<#if hInterval.end?has_content>
<#if hInterval.battleEnds>
<tr><td colspan="3" style="text-align:center;padding: 5px 0px;font-weight: bold"><em>Battle ended at <@game_time record=hInterval.end.gameTime /></em></td></tr>
<#else>
<tr><td colspan="3" style="text-align:center;padding: 5px 0px;font-weight: bold"><em>No more fleets at this location</em></td></tr>
</#if>
<tr><td colspan="3">&nbsp;</td></tr>
</#if>
<#list hInterval.entries as atTick>
<tr><td colspan="3" style="text-align:center;padding: 5px 0px"><em><@game_time record=atTick.time.gameTime />:</em></td></tr>
<#list atTick.events as event>
<@render_event event=event />
</#list>
<tr><td colspan="3">&nbsp;</td></tr>
</#list>
<#if hInterval.battleBegins>
<tr><td colspan="3" style="text-align:center;padding: 5px 0px;font-weight: bold"><em>Battle started at <@game_time record=hInterval.begin.gameTime /></em></td></tr>
</#if>
</#list>
</@listview>
</#macro>
<#macro render>
<#local bDescription = data.battle.description>
<#local bDisplay = data.battle.display>
<@page title="Battle #${bDescription.id?string(',##0')} at ${bDescription.location.name}">
<@render_header desc=bDescription />
<@render_navigation id=bDescription.id disp=bDisplay />
<p>&nbsp;</p>
<@render_fleets fData=data.battle.ships />
<@render_history hData=data.battle.history />
</@page>
</#macro>

View file

@ -0,0 +1,62 @@
<#macro render_battles battles page pages>
<#if pages gt 1>
<table style="width:100%;margin: 2px 0">
<tr>
<td style="width: 30px;text-align: right">
<#if page gt 0>
<a href="battles-${page - 1}">
</#if>
&lt;&lt;
<#if page gt 0>
</a>
</#if>
</td>
<td style="text-align: center">
Page ${page + 1} / ${pages}
</td>
<td style="width: 30px;text-align: left">
<#if page lt pages - 1>
<a href="battles-${page + 1}">
</#if>
&gt;&gt;
<#if page lt pages - 1>
</a>
</#if>
</td>
</tr>
</table>
</#if>
<@listview>
<@lv_line headers=true>
<@lv_column width=60 centered=true>#</@lv_column>
<@lv_column width="x">Location</@lv_column>
<@lv_column width=80 centered=true>&nbsp;</@lv_column>
<@lv_column width=125 centered=true>Joined</@lv_column>
<@lv_column width=125 centered=true>Finished</@lv_column>
</@lv_line>
<#list battles as battle>
<@lv_line>
<@lv_column centered=true><a href="battle-${battle.id?string('#')}-latest">${battle.id?string(',##0')}</a></@lv_column>
<@lv_column>${battle.location.name?xhtml}</@lv_column>
<@lv_column centered=true>(${battle.x},${battle.y};${battle.orbit})</@lv_column>
<@lv_column centered=true><@game_time record=battle.first.gameTime /></@lv_column>
<@lv_column centered=true>
<#if battle.last?has_content>
<@game_time record=battle.last.gameTime />
<#else>
<em>In progress</em>
</#if>
</@lv_column>
</@lv_line>
</#list>
</@listview>
</#macro>
<#macro render>
<@page title="Battles">
<#if data.pages == 0>
<p>We have not taken part in any battle</p>
<#else>
<@render_battles battles=data.list page=data.currentPage pages=data.pages />
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,136 @@
<#include "bugsTabs.ftl">
<#macro render_navigation current count total qString>
<table style="width:100%;margin: 2px 0">
<tr>
<td style="width: 30px;text-align: right">
<#if current gt 0>
<a href="bugtrack?${qString}&amp;first=${current - count}">
</#if>
&lt;&lt;
<#if current gt 0>
</a>
</#if>
</td>
<td style="text-align: center">
<#if total gt 1>
${total?string(',##0')} entries found.
<#elseif total = 1>
1 entry found.
<#else>
No entries found.
</#if>
</td>
<td style="width: 30px;text-align: left">
<#if current lt total - count>
<a href="bugtrack?${qString}&amp;first=${current + count}">
</#if>
&gt;&gt;
<#if current lt total - count>
</a>
</#if>
</td>
</tr>
</table>
</#macro>
<#macro render>
<#if data.ownOnly>
<#local ownOnly = "1">
<#else>
<#local ownOnly = "0">
</#if>
<#local qString = "status=${data.status!'x'}&amp;own=${ownOnly}" >
<@page title="Bug tracker">
<#-- Tabs -->
<@bugTabs selected="bugsList" qString="${qString}&amp;first=${data.first}" />
<#-- Selection -->
<div class="form-container">
<form action="bugtrack" method="get">
<table>
<tr><td>
List
<@ff_select id="sel-own" name="own">
<@form_option value="0">all</@form_option>
<@form_option value="1" selected=(data.ownOnly)>my own</@form_option>
</@ff_select>
reports with the following status:
<@ff_select id="sel-stat" name="status">
<@form_option value="x">(indifferent)</@form_option>
<@form_option value="PENDING" selected=((data.status!"") = 'PENDING')>pending validation</@form_option>
<@form_option value="OPEN" selected=((data.status!"") = 'OPEN')>being handled</@form_option>
<@form_option value="RESOLVED" selected=((data.status!"") = 'RESOLVED')>fixed</@form_option>
<@form_option value="WONT_FIX" selected=((data.status!"") = 'WONT_FIX')>won't fix</@form_option>
<@form_option value="NOT_A_BUG" selected=((data.status!"") = 'NOT_A_BUG')>not a bug</@form_option>
</@ff_select>
<@ff_submit label="Search" />
</td></tr>
</table>
</form>
</div>
<#-- Navigation -->
<@render_navigation current=data.first count=data.count total=data.entries qString=qString />
<#-- List of bugs -->
<#if data.reports?size gt 0>
<@listview>
<@lv_line headers=true>
<@lv_column centered=true width=60>#</@lv_column>
<@lv_column width="x">Title</@lv_column>
<#if !( data.status?has_content )>
<@lv_column width=130 centered=true>Status</@lv_column>
</#if>
<@lv_column width=150 centered=true>Last update</@lv_column>
</@lv_line>
<#list data.reports as report>
<#if !data.ownOnly && report.initialSubmitter.userId?has_content && !report.initialSubmitter.admin && report.initialSubmitter.name = data.page.empire>
<#local eClass="own-fleet">
<#else>
<#local eClass="">
</#if>
<@lv_line class=eClass>
<@lv_column centered=true>${report.reportId?string(",##0")}</@lv_column>
<@lv_column><a href="bug-${report.reportId}?${qString}&amp;first=${data.first}">${report.title}</a></@lv_column>
<#if !( data.status?has_content )>
<@lv_column centered=true><@bugStatus status=report.status /></@lv_column>
</#if>
<@lv_column centered=true>
<#if report.updated>
<strong>
</#if>
${report.lastUpdate?string("yyyy-MM-dd HH:mm:ss")}
<#if report.updated>
</strong>
</#if>
</@lv_column>
</@lv_line>
<@lv_line class=eClass>
<#if data.status?has_content>
<td colspan="2">
<#else>
<td colspan="3">
</#if>
&nbsp;</td>
<@lv_column centered=true>
by
<#if report.latestSubmitter.admin>
<span style="color:#ffafaf">
</#if>
${report.latestSubmitter.name}
<#if report.latestSubmitter.admin>
</span>
</#if>
</@lv_column>
</@lv_line>
</#list>
</@listview>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,57 @@
<#include "bugsTabs.ftl">
<#macro render>
<#if data.query.ownOnly>
<#local ownOnly = "1">
<#else>
<#local ownOnly = "0">
</#if>
<#local qString = "status=${data.query.status!'x'}&amp;own=${ownOnly}" >
<@page title="Report bug">
<@bugTabs selected="bugsReport" qString="${qString}&amp;first=${data.query.first}" />
<h3 style="padding:0;text-align:center">READ THIS BEFORE REPORTING BUGS</h3>
<p>
So, you've found something that doesn't work or that seems to be behaving in an unexpected manner.
Nice, that's the reason why this version has been made public.
</p>
<p>
However, are you sure that what you have found is really a bug? If you'd been playing Beta 5 in
the past, there are many things that no longer work in the same way. Make sure you've read the
<a href="rules">rules</a> and <a href="scope">milestone information</a> first.
</p>
<p>
Once you've read this documentation and haven't found any clue related to your problem, well,
it's either a bug or something missing in these pages. In any case, it should be reported.
Use the form below for that. Make sure the title is <strong>as clear as possible</strong>
(it should indicate the nature of the problem) and that the description is as thorough as you
can make it.
</p>
<p>
Thanks for helping!
</p>
<@form action="report-bug" hash="report-form">
<tr id="report-form" style="display:none"><td colspan="2">
<input type="hidden" name="status" value="${(data.query.status!'x')?xhtml}" />
<input type="hidden" name="own" value="${ownOnly}" />
<input type="hidden" name="first" value="${data.query.first}" />
</td></tr>
<#switch data.titleError!"">
<#case "EMPTY"><@form_error>Please specify the report's title</@form_error><#break>
<#case "INVALID"><@form_error>Title should be at least 10 characters long</@form_error><#break>
</#switch>
<@form_text label="Title" name="title" value=data.title!"" maxLength=127 />
<#switch data.descriptionError!"">
<#case "EMPTY"><@form_error>Please specify the bug's description</@form_error><#break>
<#case "INVALID"><@form_error>Description should be at least 30 characters long</@form_error><#break>
</#switch>
<@form_text label="Description" name="description" value=data.description!"" multiline=true maxLength=10 />
<@form_submit label="Post bug report" />
</@form>
</@page>
</#macro>

View file

@ -0,0 +1,18 @@
<#macro bugTab href title selected>
<a class="tab-button<#if selected> selected-tab</#if>" href="${href}">${title}</a>
</#macro>
<#macro bugTabs selected qString>
<div class="tab-buttons">
<@bugTab href="bugtrack?${qString}" title="List bugs" selected=( selected = 'bugsList' ) />
<@bugTab href="report-bug?${qString}" title="Report bug" selected=( selected = 'bugsReport' ) />
</div>
</#macro>
<#macro bugStatus status>
<#switch status>
<#case "PENDING">pending validation<#break>
<#case "OPEN">being handled<#break>
<#case "RESOLVED">fixed<#break>
<#case "WONT_FIX">won't fix<#break>
<#case "NOT_A_BUG">not a bug<#break>
</#switch>
</#macro>

View file

@ -0,0 +1,124 @@
<#include "bugsTabs.ftl" />
<#macro render_submitter s>
<#if s.admin>
<span style="color:#ffafaf">
<#elseif s.userId?has_content && s.name = data.page.empire>
<span style="color:#afffaf">
</#if>
${s.name?xhtml}
<#if s.admin || ( s.userId?has_content && s.name = data.page.empire )>
</span>
</#if>
</#macro>
<#macro render_event e>
<div style="text-align:center; padding:10px 10px">
${e.timestamp?string("yyyy-MM-dd HH:mm:ss")} - <@render_submitter s=e.submitter />
<#nested>
</div>
</#macro>
<#macro render_report_event e>
<@render_event e=e>
posted bug report #<strong>${e.id?string(",##0")}</strong>
</@render_event>
<h3 style="margin:0;text-align:center;padding:0 0 10px 0">${e.title}</h3>
<div style="margin: 0 40px 20px 40px">
${e.contents}
</div>
</#macro>
<#macro render_status_event e>
<@render_event e=e>
set the report's status to <strong><@bugStatus status=e.status /></strong>
</@render_event>
</#macro>
<#macro render_visibility_event e>
<@render_event e=e>
set the report's visibility to <strong><#if e.visible>public<#else>private</#if></strong>
</@render_event>
</#macro>
<#macro render_merge_event e>
<@render_event e=e>
merged current bug report with bug report #<strong>${e.mergedId?string(",##0")}</strong>
</@render_event>
</#macro>
<#macro render_comment_event e>
<@render_event e=e>
posted a comment
<#if !e.visible>
<em>(moderation pending)</em>
</#if>
</@render_event>
<div style="margin: 0 40px 20px 40px">
${e.contents}
</div>
</#macro>
<#macro render>
<#if data.query.ownOnly>
<#local ownOnly = "1">
<#else>
<#local ownOnly = "0">
</#if>
<#local qString = "status=${data.query.status!'x'}&amp;own=${ownOnly}" >
<@page title="Bug #${data.report.reportId?string(',##0')} - ${data.report.title}" hidePlanets=true>
<#-- Tabs -->
<@bugTabs selected="" qString="${qString}&amp;first=${data.query.first}" />
<#-- Bug info -->
<@dt_main>
<@dt_entry title="Status"><@bugStatus status=data.report.status /></@dt_entry>
<@dt_entry title="Public"><#if data.report.visible>Yes<#else>No</#if></@dt_entry>
<@dt_entry title="Initially reported">
${data.report.posted?string("yyyy-MM-dd HH:mm:ss")}
by <@render_submitter s=data.report.initialSubmitter />
</@dt_entry>
<@dt_entry title="Latest update">
${data.report.lastUpdate?string("yyyy-MM-dd HH:mm:ss")}
by <@render_submitter s=data.report.latestSubmitter />
</@dt_entry>
</@dt_main>
<#-- List events -->
<#local mayPost = false>
<#list data.events as event>
<hr/>
<#local mayPost = ( mayPost || ( !event.submitter.admin && event.submitter.userId?has_content && event.submitter.name = data.page.empire ) )>
<#switch event.type>
<#case 'INIT'>
<@render_report_event e=event />
<#break>
<#case 'STATUS'>
<@render_status_event e=event />
<#break>
<#case 'COMMENT'>
<@render_comment_event e=event />
<#break>
<#case 'VISIBILITY'>
<@render_visibility_event e=event />
<#break>
<#case 'MERGE'>
<@render_merge_event e=event />
<#break>
</#switch>
</#list>
<#-- Comment form -->
<#if mayPost && ( data.report.status = 'OPEN' || data.report.status = 'PENDING' )>
<hr id="post-comment"/>
<@form action="bug-${data.report.reportId}-comment" hash="post-comment">
<tr style="display:none">
<td colspan="2">
<input type="hidden" name="status" value="${data.query.status!"x"}" />
<input type="hidden" name="own" value="${ownOnly}" />
<input type="hidden" name="first" value="${data.query.first}" />
</td>
</tr>
<#switch data.commentError!"">
<#case "EMPTY"><@form_error>You should type a comment before posting a comment.</@form_error><#break>
<#case "INVALID"><@form_error>Comments must be at least 30 characters long.</@form_error><#break>
</#switch>
<@form_text label="New comment" name="comment" multiline=true maxLength=6 value=data.comment!"" />
<@form_submit label="Post comment" />
</@form>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,27 @@
<#macro render>
<@page title="Legacy Worlds chat">
<applet code="IRCApplet.class" archive="irc.jar,pixx.jar" codebase="pjirc" width="100%" height="100%">
<param name="CABINETS" value="irc.cab,securedirc.cab,pixx.cab" />
<param name="nick" value="${(data.page.empire?replace(' ' , '_'))?xhtml}" />
<param name="alternatenick" value="LW-Player-???" />
<param name="name" value="${data.page.empire?xhtml}" />
<param name="host" value="irc.legacyworlds.com" />
<param name="gui" value="pixx" />
<param name="quitmessage" value="Destination - outer space!" />
<param name="fingerreply" value="Legacy Worlds player" />
<param name="userinforeply" value="Legacy Worlds player" />
<param name="style:bitmapsmileys" value="false"/>
<param name="pixx:highlight" value="true"/>
<param name="pixx:highlightnick" value="true"/>
<param name="pixx:showconnect" value="false" />
<param name="pixx:showchanlist" value="false" />
<param name="pixx:showabout" value="false" />
<param name="pixx:showhelp" value="false" />
<param name="command1" value="/join #deepclone" />
<param name="command2" value="/join #legacy" />
</applet>
</@page>
</#macro>

View file

@ -0,0 +1,98 @@
<#macro enemy_tab eList alliances>
<#if alliances>
<#local tabId = "alliances">
<#local addAction = "alliance">
<#local tabTitle = "Alliances">
<#local emptyText = "No enemy alliances.">
<#local nameLen = 5>
<#if data.alliance?has_content & data.alliance>
<#local error = data.error>
<#local defName = data.name>
</#if>
<#else>
<#local tabId = "empires">
<#local addAction = "empire">
<#local tabTitle = "Empires">
<#local emptyText = "No enemy empires.">
<#local nameLen = 20>
<#if data.alliance?has_content & !data.alliance>
<#local error = data.error>
<#local defName = data.name>
</#if>
</#if>
<@tab id=tabId title=tabTitle>
<#if eList?size == 0>
<p>${emptyText}</p>
<#else>
<form action="remove-enemy-${tabId}.action#${tabId}" method="post">
<@listview>
<@lv_line headers=true>
<#if data.page.special! != 'v'>
<@lv_column width=40 centered=true>&nbsp;</@lv_column>
</#if>
<@lv_column width="x">${tabTitle}</@lv_column>
</@lv_line>
<#list eList as enemy>
<@lv_line>
<#if data.page.special! != 'v'>
<@lv_column centered=true><input type="checkbox" name="id" value="${enemy.id}" /></@lv_column>
</#if>
<@lv_column>
<#if alliances><a href="msg-alliance-${enemy.id}">[<#else><a href="msg-empire-${enemy.id}"></#if>${enemy.name?xhtml}<#if alliances>]</#if></a>
</@lv_column>
</@lv_line>
</#list>
</@listview>
<#if data.page.special! != 'v'>
<div class="form-container">
<table><tr><td>
<@ff_submit label="Remove selected enemies" />
</td></tr></table>
</div>
</#if>
</form>
</#if>
<#if data.page.special! != 'v'>
<#if error?has_content>
<@standalone_error>
<#switch error>
<#case "INVALID"><#if alliances>Alliance<#else>Empire</#if> not found.<#break>
<#case "BANNED">
<#if alliances>
Feeling Mordred-ish today, are we?
<#else>
There's a medical term for that - schizophrenia.
</#if>
<#break>
<#case "UNAVAILABLE">
This <#if alliances>alliance<#else>empire</#if> is already in your enemy list.
<#break>
</#switch>
</@standalone_error>
</#if>
<@lineform action="add-enemy-${addAction}" hash=tabId>
New enemy: <@ff_text id="name-${addAction}" name="name" value=defName! maxLength=nameLen size=(nameLen+1) />
<@ff_submit label="Add" />
</@lineform>
</#if>
</@tab>
</#macro>
<#macro render>
<@page title="Enemy list">
<@tabs>
<@enemy_tab eList=data.empires alliances=false />
<@enemy_tab eList=data.alliances alliances=true />
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,261 @@
<#macro render_fleet_ships rType id ships>
<table>
<tr>
<th class="ships-type">Ship class</th>
<th class="ships-amount">Quantity</th>
<th class="ships-power">Power</th>
</tr>
<#list ships as ship>
<tr>
<td class="ships-type">${ship.name}</td>
<td class="ships-amount">${ship.amount?string(',##0')}</td>
<td class="ships-power">${ship.power?string(',##0')}</td>
</tr>
</#list>
</table>
</#macro>
<#macro render_static_fleet_details rType fleet>
<tr class="${rType} fleet-ships" id="fleet-${fleet.id}-ships">
<td>&nbsp;</td>
<td colspan="5">
<div style="float:right">
<@render_fleet_ships rType="own-fleet" id=fleet.id ships=fleet.ships />
</div>
<div style="width:">
<@dt_main>
<#if fleet.status != 'AVAILABLE'>
<@dt_entry title="Penalty">
<@duration rTime=fleet.penalty gTime=fleet.gamePenalty />
</@dt_entry>
</#if>
<@dt_entry abbr="OOFT" title="Orbit-to-orbit flight time">
<@duration rTime=fleet.flightTime gTime=fleet.gameFlightTime />
</@dt_entry>
</@dt_main>
</div>
</td>
</tr>
</#macro>
<#macro render_fleets_at location owners>
<#list owners as owner>
<#switch owner.relation>
<#case 'OWN'>
<#local rType = 'own-fleet'>
<#local mode = location.attacking >
<#break>
<#case 'ALLIED'>
<#local rType = 'allied-fleet'>
<#local mode = location.attacking >
<#break>
<#case 'ENEMY'>
<#local rType = 'enemy-fleet'>
<#local mode = ! location.attacking >
<#break>
</#switch>
<#list owner.fleets as fleet>
<tr class="${rType} fleet-details" id="fleet-${fleet.id}">
<td class="selector">
<#if owner.relation == 'OWN' && data.page.special! != 'v'>
<input type="checkbox" name="selection" value="${fleet.id}" />
<#else>
&nbsp;
</#if>
</td>
<td class="name">
<#if fleet.name?has_content && fleet.name != "">
${fleet.name?xhtml}
<#else>
<em>(unnamed fleet)</em>
</#if>
</td>
<td>
<#if owner.relation = 'OWN'>
${owner.name?xhtml}
<#else>
<a href="msg-empire-${owner.id}">${owner.name?xhtml}</a>
</#if>
</td>
<td class="mode">
<#if mode><abbr title="Attacking">A</abbr><#else><abbr title="Defending">D</abbr></#if>
</td>
<td class="power">${fleet.power?string(',##0')}</td>
<td class="status">
<#if fleet.status == 'AVAILABLE'>
<abbr title="This fleet is available, it can be given any order.">AVL</abbr>
<#else>
<#switch fleet.status>
<#case 'DEPLOYING'><abbr title="This fleet is undergoing its initial deployment from the space docks.">DPL</abbr><#break>
<#case 'REDEPLOYING'><abbr title="This fleet is re-deploying after arrival or mode change.">RDP</abbr><#break>
</#switch>
</#if>
</td>
</tr>
<@render_static_fleet_details rType=rType fleet=fleet />
</#list>
</#list>
</#macro>
<#macro render_static_fleets locations>
<#list locations as location>
<table class="fleets-planet">
<tr>
<td class="pic"><img src="img/pp/s/${location.picture}.png" alt="${location.name?xhtml}" /></td>
<th class="planet-name"><a href="planet-${location.id}">${location.name?xhtml}</a> (<strong>${location.x},${location.y}</strong>;<strong>${location.orbit}</strong>)</th>
<td class="planet-data">Population: <strong>${location.population?string(",##0")}</strong></td>
<td class="planet-data">
<#if location.attacking>
<span class="enemy-fleet">
<#elseif location.own>
<span class="own-fleet">
<#else>
<span class="allied-fleet">
</#if>
Defence: <strong>${location.defence?string(",##0")}</strong>
</span>
</td>
</tr>
<tr>
<td colspan="4">
<#if location.fleetOwners?size == 0>
<p>No fleets at this location.</p>
<#else>
<table class="fleets-list">
<tr class="header">
<td class="selector">&nbsp;</td>
<th class="name">Fleet name</th>
<th class="owner">Owner</th>
<th class="mode"><abbr title="Fleet mode">M</abbr></th>
<th class="power"><abbr title="Fleet power">P</abbr></th>
<th class="status"><abbr title="Fleet status">S</abbr></th>
</tr>
<@render_fleets_at location=location owners=location.fleetOwners />
</table>
</#if>
</td>
</tr>
<#if location.onVacation!false>
<tr><td colspan="4" style="padding:2px">Vacation mode enabled</td></tr>
<#elseif location.battle?has_content && location.battle.hostile gt 0>
<tr><td colspan="4" style="padding:2px">
Battle - <span class="own-fleet">${location.battle.friendly?string(',##0')}</span> vs. <span class="enemy-fleet">${location.battle.hostile?string(',##0')}</span> -
<a href="battle-${location.battle.id}-latest">Details</a>
</td></tr>
</#if>
</table>
</#list>
</#macro>
<#macro render_moving_fleet_details fleet>
<tr class="own-fleet fleet-ships" id="fleet-${fleet.id}-ships">
<td>&nbsp;</td>
<td colspan="6">
<div style="float:right">
<@render_fleet_ships rType="own-fleet" id=fleet.id ships=fleet.ships />
</div>
<div style="width:">
<@dt_main>
<@dt_entry title="Source"><a href="planet-${fleet.source.id}">${fleet.source.name?xhtml}</a></@dt_entry>
<@dt_entry title="Status">
<#if fleet.status == 'AVAILABLE'>
<abbr title="This fleet is available, it can be given any order.">AVL</abbr>
<#else>
<abbr title="This fleet is changing course.">RDR</abbr> -
<@duration rTime=fleet.penalty gTime=fleet.gamePenalty />
</#if>
</@dt_entry>
<@dt_entry title="Time to target"><@duration rTime=fleet.timeLeft gTime=fleet.gameTimeLeft /></@dt_entry>
<@dt_entry title="Coordinates">(${fleet.currentX?string("0.00")};${fleet.currentY?string("0.00")})</@dt_entry>
<@dt_entry title="Nearest planet">
<#if fleet.nearest?has_content>
<a href="planet-${fleet.nearest.id}">${fleet.nearest.name?xhtml}</a>
<#else>
<em>in outer space</em>
</#if>
</@dt_entry>
<@dt_entry abbr="OOFT" title="Orbit-to-orbit flight time">
<@duration rTime=fleet.flightTime gTime=fleet.gameFlightTime />
</@dt_entry>
</@dt_main>
</div>
</td>
</tr>
</#macro>
<#macro render_moving_fleet fleet>
<tr class="own-fleet fleet-details" id="fleet-${fleet.id}">
<td class="selector">
<#if data.page.special! != 'v'>
<input type="checkbox" name="selection" value="${fleet.id}" />
<#else>
&nbsp;
</#if>
</td>
<td class="name" colspan="2">
<#if fleet.name?has_content && fleet.name != "">
${fleet.name?xhtml}
<#else>
<em>(unnamed fleet)</em>
</#if>
</td>
<td class="mode">
<#if fleet.attacking><abbr title="Attacking">A</abbr><#else><abbr title="Defending">D</abbr></#if>
</td>
<td class="power">${fleet.power?string(',##0')}</td>
<td class="timeleft"><@duration rTime=fleet.eta gTime=fleet.gameEta /></td>
<td class="destination"><a href="planet-${fleet.destination.id}">${fleet.destination.name?xhtml}</a></td>
</tr>
<@render_moving_fleet_details fleet=fleet />
</#macro>
<#macro render_moving_fleets fleets>
<#if fleets?size != 0>
<table class="fleets-moving">
<tr>
<th class="mv-header">Moving fleets</th>
</tr>
<tr>
<td>
<table class="fleets-list">
<tr>
<td class="selector">&nbsp;</td>
<th class="name" colspan="2">Fleet name</th>
<th class="mode"><abbr title="Fleet mode">M</abbr></th>
<th class="power"><abbr title="Fleet power">P</abbr></th>
<th class="timeleft"><abbr title="Estimated time to arrival">ETA</abbr></th>
<th class="destination">Destination</th>
</tr>
<#list fleets as fleet>
<@render_moving_fleet fleet=fleet />
</#list>
</table>
</td>
</tr>
</table>
</#if>
</#macro>
<#macro render>
<@page title="Fleets">
<#local locations = data.fleets.locations>
<#local mFleets = data.fleets.moving>
<#if locations?size == 0 && mFleets?size == 0>
<p>You do not own any fleets or planets.</p>
<#else>
<div style="font-style: italic; text-align:center; padding: 0 0 10px 0">Click a fleet's name to see composition and details</div>
<form method="post" action="fleets.action">
<@render_static_fleets locations=locations />
<@render_moving_fleets fleets=mFleets />
<#if data.page.special! != 'v'>
<div id="fleet-actions">
<input type="submit" class="input" name="rename" value="Rename" title="Rename selected fleets" />
&nbsp;
<input type="submit" class="input" name="move" value="Move / redirect" title="Move or redirect selected fleets, if they are available." />
&nbsp;
<input type="submit" class="input" name="setAttack" value="Attack" title="Set selected fleets to attack mode." />
<input type="submit" class="input" name="setDefend" value="Defend" title="Set selected fleets to defence mode." />
&nbsp;
<input type="submit" class="input" name="merge" value="Merge" title="Merge selected fleets, if they are available." />
<input type="submit" class="input" name="split" value="Split" title="Split selected fleet into two or more fleets." />
&nbsp;
<input type="submit" class="input" name="disband" value="Disband" title="Destroy selected fleets." />
</div>
</#if>
</form>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,137 @@
<#macro render_fleet fleet>
<td class="selector"><input type="checkbox" name="selection" value="${fleet.id}" checked="checked" /></td>
<td class="name">
<#if fleet.name?has_content && fleet.name != "">
${fleet.name?xhtml}
<#else>
<em>(unnamed fleet)</em>
</#if>
</td>
<td class="power">${fleet.power?string(',##0')}</td>
<td class="fltime"><@duration rTime=fleet.flightTime gTime=fleet.gameFlightTime /></td>
<td class="status">
<#switch fleet.status>
<#case 'DEPLOYING'><abbr title="This fleet is undergoing its initial deployment from the space docks.">DPL</abbr><#break>
<#case 'REDEPLOYING'><abbr title="This fleet is re-deploying after arrival or mode change.">RDP</abbr><#break>
<#case 'REDIRECTING'><abbr title="This fleet is changing course.">RDP</abbr><#break>
<#case 'AVAILABLE'><abbr title="This fleet is available, it can be given any order.">AVL</abbr><#break>
</#switch>
</td>
<td class="cloc">
(${fleet.x?string("0.00")};${fleet.y?string("0.00")})<br/>
<#if fleet.nearest?has_content>
<#if fleet.atPlanet>At<#else>Near</#if>
<a href="planet-${fleet.nearest.id}">${fleet.nearest.name?xhtml}</a>
<#else>
In outer space
</#if>
</td>
</#macro>
<#macro render_selected_fleets fleets>
<h3>Selected fleets</h3>
<table class="selected-fleets">
<tr>
<td class="selector">&nbsp;</td>
<th class="name">Name</th>
<th class="power"><abbr title="Fleet power">P</abbr></th>
<th class="fltime"><abbr title="Orbit-to-orbit flight time">FT</abbr></th>
<th class="status"><abbr title="Fleet status">S</abbr></th>
<th class="cloc">Location</th>
</tr>
<#list fleets as fleet>
<tr>
<@render_fleet fleet=fleet />
</tr>
</#list>
</table>
</#macro>
<#macro render_move_fleets>
<h3>New orders</h3>
<#if data.error>
<@standalone_error>This planet does not exist.</@standalone_error>
</#if>
<p>
Move selected fleets to
<@ff_text name="destination" id="destination" value="${data.destination!?xhtml}" maxLength=20 size=21 />
for
<@ff_select name="mode" id="mode">
<@form_option text="defence" selected=( !data.mode!false ) value="0" />
<@form_option text="attack" selected=( data.mode!false ) value="1" />
</@ff_select>
&nbsp;
<@ff_submit label="Ok" />
<@ff_submit label="Cancel" name="cancel" />
</p>
</#macro>
<#macro render_rename_fleets>
<h3>Rename fleets</h3>
<#if data.error>
<@standalone_error>This name is invalid.</@standalone_error>
</#if>
<p>
Rename selected fleets to
<@ff_text name="name" id="name" value="${data.name!?xhtml}" maxLength=40 size=21 />
&nbsp;
<@ff_submit label="Ok" />
<@ff_submit label="Cancel" name="cancel" />
</p>
</#macro>
<#macro render_set_fleets_mode>
<h3>Set fleets mode</h3>
<p>
Assign selected fleets to
<#if data.attack>attack<#else>defence</#if>?
&nbsp;
<@ff_submit label="Yes" />
<@ff_submit label="No" name="cancel" />
</p>
<input type="hidden" name="attack" value="<#if data.attack>1<#else>0</#if>" />
</#macro>
<#macro render_disband_fleets>
<h3>Disband fleets</h3>
<p>
Are you sure?
&nbsp;
<@ff_submit label="Yes" />
<@ff_submit label="No" name="cancel" />
</p>
</#macro>
<#macro render>
<#switch dataType>
<#case 'MoveFleetsResponse'>
<#local title="Move fleets">
<#local action="move-fleets.action">
<#break>
<#case 'RenameFleetsResponse'>
<#local title="Rename fleets">
<#local action="rename-fleets.action">
<#break>
<#case 'SetFleetsModeResponse'>
<#local title="Set fleets mode">
<#local action="set-fleets-mode.action">
<#break>
<#case 'DisbandFleetsResponse'>
<#local title="Disband fleets">
<#local action="disband-fleets.action">
<#break>
</#switch>
<@page title=title>
<form action="${action}" method="post">
<@render_selected_fleets fleets=data.fleets />
<#switch dataType>
<#case 'MoveFleetsResponse'>
<@render_move_fleets />
<#break>
<#case 'RenameFleetsResponse'>
<@render_rename_fleets />
<#break>
<#case 'SetFleetsModeResponse'>
<@render_set_fleets_mode />
<#break>
<#case 'DisbandFleetsResponse'>
<@render_disband_fleets />
<#break>
</#switch>
</form>
</@page>
</#macro>

View file

@ -0,0 +1,17 @@
<#macro render>
<@page title="Get new planet">
<p>Hordes of drooling barbarians invaded your empire, slaughtering your women and raping your cattle?</p>
<p>Well, fear no more! You will be able to get a brand new planet.</p>
<p>Please note that doing this will disband your fleets.</p>
<@form action="get-planet" name="get-planet">
<#switch data.error!>
<#case "EMPTY"><@form_error>Please select a planet name.</@form_error><#break>
<#case "INVALID"><@form_error>Invalid planet name.</@form_error><#break>
<#case "UNAVAILABLE"><@form_error>This planet name is unavailable.</@form_error><#break>
<#case "BANNED"><@form_error>This planet name has been banned.</@form_error><#break>
</#switch>
<@form_text name="name" label="New planet's name" value=data.name! />
<@form_submit label="Get planet" />
</@form>
</@page>
</#macro>

View file

@ -0,0 +1,16 @@
<#macro render><@page title="Server under maintenance">
<@dt_main title="The server is currently under maintenance.">
<@dt_entry title="Maintenance mode activated">${data.start?string("yyyy-MM-dd HH:mm")}</@dt_entry>
<@dt_entry title="Current server time">${data.current?string("yyyy-MM-dd HH:mm")}</@dt_entry>
<@dt_entry title="Planned end of maintenance">
<#if data.late>
<span style="color: #ff0000;font-weight:bold">
</#if>
${data.end?string("yyyy-MM-dd HH:mm")}
<#if data.late>
</span>
</#if>
</@dt_entry>
<@dt_entry title="Reason">${data.reason?xhtml}</@dt_entry>
</@dt_main>
</@page></#macro>

View file

@ -0,0 +1,83 @@
<#macro render_system system tags>
<td class="map-system">
<#list system.planets as planet>
<#if tags>
<#if planet.tag?has_content>
<#assign vName = "[${planet.tag}]">
<#else>
<#assign vName = "N/A">
</#if>
<#else>
<#assign vName = planet.name>
</#if>
<#if planet.tag?has_content>
<#assign vTitle = " [${planet.tag}]" >
<#else>
<#assign vTitle = "" >
</#if>
<#if planet.relation?has_content>
<#switch planet.relation>
<#case "OWN">
<#assign lStyle = "class='own-planet'" >
<#break>
<#case "ALLIED">
<#assign lStyle = "class='allied-planet'" >
<#break>
<#case "ENEMY">
<#assign lStyle = "class='enemy-planet'" >
<#break>
</#switch>
<#elseif planet.tag?has_content>
<#assign lStyle = "class='other-planet'" >
<#else>
<#assign lStyle = "" >
</#if>
<div class="map-planet">
<img src="img/pp/s/${planet.picture}.png" alt="${planet.name?xhtml}${vTitle?xhtml}" />
<a href="planet-${planet.id}" ${lStyle} title="View planet ${planet.name?xhtml}${vTitle?xhtml}">${vName?xhtml}</a>
</div>
</#list>
</td>
</#macro>
<#macro render_map size systems tags>
<table class="map map-${size}">
<#list systems as row>
<tr>
<#list row as system>
<#if system?has_content>
<@render_system system=system tags=tags />
<#else>
<td class="map-empty"><div>(unexplored)</div></td>
</#if>
</#list>
</tr>
</#list>
</table>
</#macro>
<#macro render>
<@page title="Map">
<@lineform action="move-map">
Coordinates: ( <@ff_text name="x" id="x" maxLength=4 size=5 value=data.x?string /> ;
<@ff_text name="y" id="y" maxLength=4 size=5 value=data.y?string /> )
Size: <@ff_select id="sz" name="sz">
<#list data.sizes as size>
<@form_option text=size value=size_index selected=( size_index == data.sizeOrdinal ) />
</#list>
</@ff_select>
<@ff_submit label="Centre map" />
</@lineform>
<@tabs>
<@tab id="names" title="Planets">
<@render_map size=data.sizeOrdinal systems=data.systems tags=false />
</@tab>
<@tab id="alliances" title="Alliances">
<@render_map size=data.sizeOrdinal systems=data.systems tags=true />
</@tab>
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,115 @@
<#macro render_navigation message inbox>
<#if inbox>
<#local link="inbox-message-">
<#else>
<#local link="outbox-message-">
</#if>
<table style="width:100%;margin: 2px 0">
<tr>
<td style="width: 30px;text-align: right">
<#if message.previous?has_content>
<a href="${link}${message.previous}">
</#if>
&lt;&lt;
<#if message.previous?has_content>
</a>
</#if>
</td>
<td style="text-align: center">
<#if inbox>
<a href="inbox-from-${message.id}">Received messages</a>
<#else>
<a href="outbox-from-${message.id}">Sent messages</a>
</#if>
</td>
<td style="width: 30px;text-align: left">
<#if message.next?has_content>
<a href="${link}${message.next}">
</#if>
&gt;&gt;
<#if message.next?has_content>
</a>
</#if>
</td>
</tr>
</table>
</#macro>
<#macro render>
<#if data.inbox>
<#local title="Received messages">
<#local timeTtl="Received">
<#else>
<#local title="Sent messages">
<#local timeTtl="Sent">
</#if>
<#switch data.message.type>
<#case 'INTERNAL'>
<#local mColor="#ffffaf">
<#break>
<#case 'ADMINISTRATOR'>
<#local mColor="#ffafaf">
<#break>
<#case 'ALLIANCE'>
<#local mColor="#afafff">
<#break>
<#case 'EMPIRE'>
<#local mColor="#afafaf">
<#break>
</#switch>
<@page title=title>
<@render_navigation message=data.message inbox=data.inbox />
<@dt_main>
<@dt_entry width=100 title="From">
<#if data.inbox>
<span style="color:${mColor};font-weight:bold">
</#if>
${data.message.sender!}
<#if data.inbox>
</span>
</#if>
</@dt_entry>
<@dt_entry width=100 title="To">
<#if !data.inbox>
<span style="color:${mColor};font-weight:bold">
</#if>
${data.message.receiver!}
<#if !data.inbox>
</span>
</#if>
</@dt_entry>
<@dt_entry width=100 title=timeTtl>
<@abbr_gt />: <@game_time record=data.message.gameTime /> / <@abbr_st />: ${data.message.time?string("yyyy-MM-dd HH:mm:ss")}
</@dt_entry>
<#if data.message.unread>
<@dt_entry width=100 title="">New!</@dt_entry>
</#if>
</@dt_main>
<@listview><@lv_line headers=true><th colspan="2" style="font-size:1px">&nbsp;</th></@lv_line></@listview>
<h3 style="margin:0;text-align:center;padding:0 0 10px 0">${data.message.title}</h3>
<div style="margin: 0 40px 20px 40px">
${data.message.contents}
</div>
<@listview><@lv_line headers=true><th colspan="2" style="font-size:1px">&nbsp;</th></@lv_line></@listview>
<@lineform action="message">
<input type="hidden" name="inbox" value="<#if data.inbox>1<#else>0</#if>" />
<input type="hidden" name="id" value="${data.message.id}" />
<#if data.message.previous?has_content>
<#local afterDelete = data.message.previous>
<#elseif data.message.next?has_content>
<#local afterDelete = data.message.next>
<#else>
<#local afterDelete = "x">
</#if>
<input type="hidden" name="next" value="${afterDelete}" />
<@ff_submit label="Delete message" name="delete" />
<#if data.inbox && data.message.type != 'INTERNAL'>
<@ff_submit label="Compose reply" name="reply" />
</#if>
</@lineform>
</@page>
</#macro>

View file

@ -0,0 +1,125 @@
<#include "messageTabs.ftl" />
<#macro render_navigation current total inbox>
<#if inbox>
<#local link="inbox-">
<#else>
<#local link="outbox-">
</#if>
<table style="width:100%;margin: 2px 0">
<tr>
<td style="width: 30px;text-align: right">
<#if current gt 0>
<a href="${link}${current - 1}">
</#if>
&lt;&lt;
<#if current gt 0>
</a>
</#if>
</td>
<td style="text-align: center">
<#if total gt 0>
Page ${current + 1} / ${total}
<#elseif inbox>
No messages received.
<#else>
No messages sent.
</#if>
</td>
<td style="width: 30px;text-align: left">
<#if current lt total - 1>
<a href="${link}${current + 1}">
</#if>
&gt;&gt;
<#if current lt total - 1>
</a>
</#if>
</td>
</tr>
</table>
</#macro>
<#macro render>
<#if data.inbox>
<#local title="Received messages">
<#local tab="inbox">
<#else>
<#local title="Sent messages">
<#local tab="outbox">
</#if>
<@page title=title>
<@messageTabs selected=tab />
<@render_navigation current=data.cPage total=data.pages inbox=data.inbox />
<#if data.messages?size gt 0>
<form action="messages.action" method="post">
<div style="display:none">
<input type="hidden" name="inbox" value="<#if data.inbox>1<#else>0</#if>" />
<input type="hidden" name="page" value="${data.cPage}" />
</div>
<@listview>
<@lv_line headers=true>
<@lv_column width=16 centered=true><span title="Click here to invert the current selection" id="message-box-selector">&nbsp;</span></@lv_column>
<@lv_column width="x">Subject</@lv_column>
<@lv_column width=150 centered=true><#if data.inbox>From<#else>To</#if></@lv_column>
<@lv_column width=150 centered=true><#if data.inbox>Received<#else>Sent</#if></@lv_column>
</@lv_line>
<#list data.messages as message>
<#switch message.type>
<#case 'INTERNAL'>
<#local mType="int-msg">
<#break>
<#case 'ADMINISTRATOR'>
<#local mType="admin-msg">
<#break>
<#case 'ALLIANCE'>
<#local mType="alliance-msg">
<#break>
<#case 'EMPIRE'>
<#local mType="empire-msg">
<#break>
</#switch>
<#if ! message.read>
<#local mType = "${mType} unread-msg">
</#if>
<@lv_line class=mType>
<@lv_column centered=true>
<input type="checkbox" name="selection" value="${message.id}" class="input message-selection" />
</@lv_column>
<@lv_column><a href="<#if data.inbox>inbox<#else>outbox</#if>-message-${message.id}">${message.title}</a></@lv_column>
<@lv_column centered=true>${message.sender!}</@lv_column>
<@lv_column centered=true>${message.time?string("yyyy-MM-dd HH:mm:ss")}</@lv_column>
</@lv_line>
</#list>
</@listview>
<#if data.inbox>
<div class="form-container">
With
<@ff_select name="target" id="target">
<@form_option value="0">selected</@form_option>
<@form_option value="1">all</@form_option>
</@ff_select>
messages:
<@ff_select name="action" id="action">
<@form_option value="r">mark as read</@form_option>
<@form_option value="u">mark as unread</@form_option>
<@form_option value="d">delete</@form_option>
</@ff_select>
<@ff_submit label="Go" />
</div>
<#else>
<div class="form-container">
<input type="hidden" name="action" value="d" />
Delete
<@ff_select name="target" id="target">
<@form_option value="0">selected</@form_option>
<@form_option value="1">all</@form_option>
</@ff_select>
messages <@ff_submit label="Go" />
</div>
</#if>
</form>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,11 @@
<#macro messageTab href title selected=false eClass="">
<a class="tab-button<#if selected> selected-tab</#if><#if eClass != ''> ${eClass}</#if>" href="${href}">${title}</a>
</#macro>
<#macro messageTabs selected>
<div class="tab-buttons">
<@messageTab href="messages" title="Received" selected=( selected = 'inbox' ) />
<@messageTab href="outbox" title="Sent" selected=( selected = 'outbox' ) />
<@messageTab href="compose-message" title="Compose" selected=( selected = 'compose' ) />
<@messageTab href="chat" title="Chat" eClass="open-chat-button" />
</div>
</#macro>

View file

@ -0,0 +1,62 @@
<#include "messageTabs.ftl" />
<#macro render>
<@page title="Recipients">
<@messageTabs selected="compose" />
<@tabs>
<#if data.empires?size gt 0>
<@tab id="empires" title="Empires">
<table style="width:98%">
<#list data.empires as empire>
<#if empire_index % 3 == 0>
<tr><td style="text-align:center;width: 34%">
<#else>
<td style="text-align:center;width: 33%">
</#if>
<a style="margin: 5px 20px;padding: 4px" href="msg-empire-${empire.id}">${empire.name?xhtml}</a></td>
<#if empire_index % 3 == 2></tr></#if>
</#list>
<#if data.empires?size % 3 == 1>
<td>&nbsp;</td><td>&nbsp;</td></tr>
<#elseif data.empires?size % 3 == 2>
<td>&nbsp;</td></tr>
</#if>
</table>
</@tab>
</#if>
<#if data.alliances?size gt 0>
<@tab id="alliances" title="Alliances">
<@listview>
<#list data.alliances as alliance>
<@lv_line>
<td style="width: 100px; text-align:right"><a href="msg-alliance-${alliance.id}">[${alliance.tag?xhtml}]</a>&nbsp;&nbsp;</td>
<td>${alliance.name}</td>
</@lv_line>
</#list>
</@listview>
</@tab>
</#if>
<#if data.admins?size gt 0>
<@tab id="admins" title="Administrators">
<@listview>
<#list data.admins as admin>
<@lv_line>
<td style="width: 100px; text-align:right"><a href="msg-admin-${admin.id}">${admin.name?xhtml}</a>&nbsp;&nbsp;</td>
<td>
<#list admin.privileges as priv>
<abbr title="${priv.description?xhtml}">${priv}</abbr>
</#list>
</td>
</@lv_line>
<tr><td colspan="2">&nbsp;</td></tr>
</#list>
</@listview>
</@tab>
</#if>
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,82 @@
<#include "messageTabs.ftl" />
<#macro render>
<#if data.replyTo?has_content>
<#local title="Reply to message">
<#else>
<#local title="Compose new message">
</#if>
<@page title=title>
<@messageTabs selected="compose" />
<div class="form-container">
<form action="send-message.action" method="post">
<#if data.replyTo?has_content>
<input name="rtInbox" type="hidden" value="<#if data.inbox>1<#else>0</#if>" />
<input name="rtId" type="hidden" value="${data.replyTo.id}" />
</#if>
<table>
<#if data.timingError>
<@form_error>Not so fast! Wait a few seconds before trying again.</@form_error>
</#if>
<#-- Message recipient -->
<#if data.targetError>
<@form_error>Message recipient not found.</@form_error>
</#if>
<@form_select label="Recipient type" name="toType">
<@form_option value="EMPIRE" selected=( data.messageType = 'EMPIRE' )>Empire</@form_option>
<@form_option value="ALLIANCE" selected=( data.messageType = 'ALLIANCE' )>Alliance</@form_option>
<@form_option value="ADMINISTRATOR" selected=( data.messageType = 'ADMINISTRATOR' )>Administrator</@form_option>
</@form_select>
<@form_text label="Recipient name" name="toName" maxLength=48 value=data.target />
<#if (data.target == "")>
<tr><td>&nbsp;</td><td><a href="message-targets">Select from list...</a></td></tr>
</#if>
<#-- Subject -->
<#if data.titleError>
<@form_error>Subject is too short (min.: 2 characters)</@form_error>
</#if>
<@form_text label="Subject" name="title" maxLength=64 value=data.title />
<#-- Body -->
<#if data.contentsError>
<@form_error>Contents are too short (min.: 2 characters)</@form_error>
</#if>
<@form_text label="Contents" name="contents" value=data.contents multiline=true maxLength=10 />
<@form_extended_submit label="Send message">
<@ff_submit label="Cancel" name="cancel" />
</@form_extended_submit>
</table>
</form>
</div>
<#-- Original message -->
<#if data.replyTo?has_content>
<@listview><@lv_line headers=true><th colspan="2" style="font-size:1px">&nbsp;</th></@lv_line></@listview>
<@dt_main>
<@dt_entry width=100 title="">Original message:</@dt_entry>
<@dt_entry width=100 title="From">
${data.replyTo.sender!}
</@dt_entry>
<@dt_entry width=100 title="To">
${data.replyTo.receiver!}
</@dt_entry>
<@dt_entry width=100 title="Received">
<@abbr_gt />: <@game_time record=data.replyTo.gameTime /> / <@abbr_st />: ${data.replyTo.time?string("yyyy-MM-dd HH:mm:ss")}
</@dt_entry>
</@dt_main>
<@listview><@lv_line headers=true><th colspan="2" style="font-size:1px">&nbsp;</th></@lv_line></@listview>
<h3 style="margin:0;text-align:center;padding:0 0 10px 0">${data.replyTo.title}</h3>
<div style="margin: 0 40px 20px 40px">
${data.replyTo.contents}
</div>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,9 @@
<#macro render><@page title="Server off-line">
<p>The game server could not be reached.</p>
<p>
It may be under maintenance, or it may have crashed. In any case, the staff will receive a notification of the problem.
</p>
<p>
Sorry for the inconvenience.
</p>
</@page></#macro>

View file

@ -0,0 +1,118 @@
<#macro render>
<@page title="Empire">
<#assign ov = data.overview >
<#assign rs = data.research >
<@tabs>
<@tab id="overview" title="Overview">
<@left_column>
<#assign nplanets = data.page.planets?size>
<@dt_main title="Fleets &amp; planets">
<@dt_entry title="Number of planets">${nplanets?string(",##0")}</@dt_entry>
<@dt_entry title="Total population">${ov.population?string(",##0")}</@dt_entry>
<@dt_entry title="Average happiness"><@happiness value=data.overview.avgHappiness /></@dt_entry>
<@dt_entry title="Total fleet power">${ov.fleetPower?string(",##0")}</@dt_entry>
</@dt_main>
<@dt_main title="Battles">
<#if data.battles?size gt 0>
<@dt_status>We are involved in the following battle(s):</@dt_status>
<#list data.battles as battle>
<@dt_status><a href="battle-${battle.id}-latest">${battle.location.name?xhtml}</a>
(${battle.x},${battle.y};${battle.orbit})</@dt_status>
</#list>
<#else>
<@dt_status>We are not involved in any battle at the moment.</@dt_status>
</#if>
<@dt_status>
<a href="battles">View all battles</a>
</@dt_status>
</@dt_main>
</@left_column>
<@right_column>
<@dt_main title="Money">
<@dt_entry title="Cash reserves">${data.page.cash?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Planet income">${ov.planetIncome?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Planet upkeep">${ov.planetUpkeep?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Fleet upkeep">${ov.fleetUpkeep?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Investments">${ov.investment?string(",##0")} <@abbr_bgc/></@dt_entry>
</@dt_main>
<@dt_main title="Messages">
<@dt_status>
<#if ov.newMessages == 0>
No new messages.
<#elseif ov.newMessages == 1>
You have <a href="messages">a new message</a>.
<#else>
You have <a href="messages">${ov.newMessages} new messages</a>.
</#if>
</@dt_status>
<@dt_status>
<a href="compose-message">Compose a message</a>
</@dt_status>
</@dt_main>
</@right_column>
</@tab>
<@tab id="research" title="Research">
<#if rs?size == 0>
<p>Our scientists are still settling in.</p>
</#if>
<#list rs as research>
<div>
<h3>${research.name?xhtml}</h3>
<p>${research.description?xhtml}</p>
<@left_column>
<#if research.implemented?size == 0>
<p>No usable technologies.</p>
<#else>
<@dt_main>
<#list research.implemented as tech>
<@dt_status>
${tech.name?xhtml}
<div class="auto-hide">${tech.description?xhtml}</div>
</@dt_status>
</#list>
</@dt_main>
</#if>
</@left_column>
<#if research.current?has_content>
<@right_column>
<@dt_main>
<@dt_status>
Current research: <strong>${research.current.name?xhtml}</strong>
<p>
${research.current.description?xhtml}
</p>
</@dt_status>
<@dt_entry title="Progress">${research.current.researched}%</@dt_entry>
<#if research.current.cost?has_content>
<@dt_entry title="Cost">${research.current.cost?string(",##0")} <@abbr_bgc/></@dt_entry>
<#if data.page.cash gte research.current.cost && data.page.special! != 'v'>
<@dt_status><form action="implement-${research.id}.action#research" method="post">
<div><@ff_submit label="Implement technology" /></div>
</form></@dt_status>
</#if>
</#if>
</@dt_main>
</@right_column>
</#if>
</div>
</#list>
</@tab>
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,69 @@
<#macro render>
<@page title="Password recovery">
<@tabs>
<@tab title="Request password recovery" id="request-recovery">
<#if data.sent?has_content>
<p>An email has been sent to your address, <strong>${data.mail?xhtml}</strong></p>
<p>It contains a one-time authentication code you can use to change your password.</p>
<p>The authentication code will expire in one hour, and you will not be able to request another code until it expires.</p>
<#else>
<@form name="req-pwd-recovery" action="request-password-recovery">
<#switch data.status!>
<#case "INVALID_INPUT">
<@form_error>Invalid e-mail address.</@form_error>
<#break>
<#case "ACCOUNT_NOT_FOUND">
<@form_error>Unknown e-mail address.</@form_error>
<#break>
<#case "ACCOUNT_STATUS">
<@form_error>The account's status prevents password recovery.</@form_error>
<#break>
<#case "RECOVERY_IN_PROGRESS">
<@form_error>A password recovery request has been made within the last hour.</@form_error>
<#break>
<#case "MAIL_ERROR">
<@form_error>Unable to send e-mail.</@form_error>
<#break>
</#switch>
<@form_text label="E-mail address" name="mail" id="req-mail" value=data.mail! maxLength=128 />
<@form_submit label="Request password recovery" extraClass="" />
</@form>
</#if>
</@tab>
<@tab id="confirm-recovery" title="Confirm password recovery">
<@form name="conf-pwd-recovery" action="confirm-password-recovery" hash="confirm-recovery">
<#switch data.cStatus!>
<#case "INVALID_MAIL">
<@form_error>Invalid e-mail address.</@form_error>
<#break>
<#case "NOT_FOUND">
<@form_error>Unknown e-mail address or code.</@form_error>
<#break>
<#case "ACCOUNT_STATUS">
<@form_error>The account's status prevents password recovery.</@form_error>
<#break>
<#case "WEAK_PASSWORD">
<@form_error>New password too weak.</@form_error>
<#break>
<#case "MISMATCH_PASSWORD">
<@form_error>Password and password confirmation did not match.</@form_error>
<#break>
<#case "PROHIBITED">
<@form_error>You may not use this password.</@form_error>
<#break>
</#switch>
<@form_text label="E-mail address" name="mail" id="conf-mail" value=data.cMail! maxLength=128 />
<@form_text label="Confirmation code" name="code" id="conf-code" value=data.cCode! maxLength=64 />
<@form_pwd label="New password" name="password" id="conf-pwd1" />
<@form_pwd label="Confirm new password" name="passwordConfirm" id="conf-pwd2" />
<@form_submit label="Set new password" />
</@form>
</@tab>
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,329 @@
<#macro render>
<#if ! data.basic?has_content>
<@page title="Planet not found">
<p>This planet does not exist.</p>
</@page>
<#return>
</#if>
<@page title="Planet ${data.basic.name}">
<#if data.ownershipError>
<@standalone_error>Unfortunately, we no longer control this planet.</@standalone_error>
</#if>
<@tabs>
<@tab id="general" title="General">
<div>
<div style="float:right; padding: 3px">
<img src="img/pp/l/${data.basic.picture}.png" style="border: 1px solid white" alt="${data.basic.name?xhtml}" />
</div>
<@left_column width=250>
<@dt_main>
<@dt_entry title="Coordinates">(<strong>${data.basic.x},${data.basic.y}</strong>;<strong>${data.basic.orbit}</strong>)</@dt_entry>
<#if data.basic.alliance?has_content>
<@dt_entry title="Alliance"><strong>${data.basic.alliance}</strong></@dt_entry>
<#else>
<@dt_blank />
</#if>
<#if data.orbit?has_content>
<@dt_entry title="Population"><strong>${data.orbit.population?string(",##0")}</strong></@dt_entry>
<@dt_entry title="Stationary defence"><strong>${data.orbit.defencePoints?string(",##0")}</strong></@dt_entry>
</#if>
<#if data.own?has_content>
<@dt_entry title="Happiness"><@happiness value=data.own.happiness /> <@happiness_change value=data.own.hChange /></@dt_entry>
<@dt_entry title="Income"><strong>${data.own.income?string(",##0")}</strong> <@abbr_bgc/></@dt_entry>
<@dt_entry title="Upkeep"><strong>${data.own.upkeep?string(",##0")}</strong> <@abbr_bgc/></@dt_entry>
</#if>
</@dt_main>
</@left_column>
<@right_column width=250>
<#if data.orbit?has_content>
<@dt_main>
<#if data.orbit.ownFleet gt 0>
<@dt_entry title="Own fleet power"><span style="color: #afffaf">${data.orbit.ownFleet?string(",##0")}</span></@dt_entry>
<#else>
<@dt_blank />
</#if>
<#if data.orbit.friendlyFleet gt 0>
<@dt_entry title="Friendly fleet power"><span style="color: #afafff">${data.orbit.friendlyFleet?string(",##0")}</span></@dt_entry>
<#else>
<@dt_blank />
</#if>
<#if data.orbit.hostileFleet gt 0>
<@dt_entry title="Hostile fleet power"><span style="color: #ffafaf">${data.orbit.hostileFleet?string(",##0")}</span></@dt_entry>
<#else>
<@dt_blank />
</#if>
<#if data.orbit.battle?has_content>
<@dt_entry title=""><a href="battle-${data.orbit.battle}-latest">View battle</a></@dt_entry>
<#else>
<@dt_blank />
</#if>
<@dt_blank /><@dt_blank /><@dt_blank /><@dt_blank /><@dt_blank />
</@dt_main>
</#if>
</@right_column>
</div>
<#if data.own?has_content>
<#if data.own.status.renamePossible && data.page.special! != 'v'>
<#switch data.renameError!>
<#case "EMPTY"><@standalone_error>Please specify a name.</@standalone_error><#break>
<#case "INVALID"><@standalone_error>Invalid planet name.</@standalone_error><#break>
<#case "UNAVAILABLE"><@standalone_error>This planet name already exists.</@standalone_error><#break>
<#case "BANNED"><@standalone_error>This name is banned.</@standalone_error><#break>
</#switch>
<@lineform action="planet-${data.id}-rename" name="rename" hash="general">
<#if data.renamingTo?has_content>
<#assign newName = data.renamingTo!>
</#if>
Rename planet to <@ff_text name="name" id="rename-name" maxLength=20 size=21 value=newName! />
<@ff_submit label="Rename planet" />
</@lineform>
</#if>
<#if data.own.status.abandonPossible && data.page.special! != 'v'>
<@lineform action="planet-${data.id}-abandon" name="abandon" hash="general">
<@ff_submit label="Abandon planet" />
</@lineform>
<#elseif data.own.status.abandonTime gt 0>
<@lineform action="planet-${data.id}-cancel-abandon" name="abandon" hash="general">
Abandoning planet in <strong><@duration rTime=data.own.status.abandonTime gTime=data.own.status.abandonGameTime /></strong>
&nbsp;
<#if data.page.special! != 'v'>
<@ff_submit label="Cancel" />
</#if>
</@lineform>
</#if>
</#if>
</@tab>
<#if data.orbit?has_content>
<#if data.orbit.buildings?size gt 0 || data.own?has_content>
<@tab id="buildings" title="Buildings">
<#if data.orbit.buildings?size gt 0>
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Building</@lv_column>
<@lv_column width=50 centered=true>Amount</@lv_column>
<#if data.own?has_content>
<@lv_column width=150 centered=true>Production</@lv_column>
<@lv_column width=50 centered=true>Jobs</@lv_column>
<@lv_column width=100 centered=true>Upkeep</@lv_column>
</#if>
</@lv_line>
<#list data.orbit.buildings as building>
<@lv_line>
<@lv_column>
${building.name?xhtml}
<#if data.own?has_content>
<div class="auto-hide">${building.description?xhtml}</div>
</#if>
</@lv_column>
<@lv_column centered=true>${building.amount?string(",##0")}</@lv_column>
<#if data.own?has_content>
<@lv_column centered=true>
${building.output?string(",##0")}
<#switch building.produces>
<#case "CASH">ind. production<#break>
<#case "DEF">defence<#break>
<#case "WORK">mil. output<#break>
<#case "POP">growth<#break>
</#switch>
</@lv_column>
<@lv_column centered=true>${building.jobs?string(",##0")}</@lv_column>
<@lv_column centered=true>${building.upkeep?string(",##0")} <@abbr_bgc/></@lv_column>
</#if>
</@lv_line>
</#list>
</@listview>
<#else>
<@dt_main><@dt_status>No buildings on this planet.</@dt_status></@dt_main>
</#if>
<#if data.own?has_content>
<#if data.page.special! != 'v'>
<#if data.own.civQueue.appendPossible>
<@lineform name="build-civ" action="planet-${data.id}-build-civ" hash="buildings">
Build <@ff_text name="amount" id="civ-build-amount" size=5 maxLength=4 value="" />
<@ff_select name="type" id="civ-build-type">
<@form_option value="0" text="(building type)" />
<#list data.own.bBuildings as building>
<@form_option value=building.id text=building.name />
</#list>
</@ff_select>
<@ff_submit label="Add to queue" />
</@lineform>
<div id="buildings-types">
<#list data.own.bBuildings as building>
<div class="building-type" id="building-type-${building.id}">
<@dt_main>
<@dt_status>${building.description?xhtml}</@dt_status>
<@dt_entry title="Cost">${building.cost?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Upkeep">${building.upkeep?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Time to build">
<#if building.time?has_content>
<@duration rTime=building.time gTime=building.gameTime />
<#else>
<span style="color:#ffafaf;font-weight:bold" title="Don't even try.">N/A</span>
</#if>
</@dt_entry>
<@dt_entry title="Jobs">${building.workers?string(",##0")}</@dt_entry>
<@dt_entry title="Production">${building.output?string(",##0")}
<#switch building.prodType>
<#case "CASH">ind. production<#break>
<#case "DEF">defence<#break>
<#case "WORK">mil. output<#break>
<#case "POP">growth<#break>
</#switch>
</@dt_entry>
</@dt_main>
</div>
</#list>
</div>
<#if data.orbit.buildings?size gt 0>
<#if data.destructionFailed!false>
<@standalone_error>Trying to destroy too many buildings</@standalone_error>
</#if>
<@lineform name="destroy" action="planet-${data.id}-destroy" hash="buildings">
Destroy <@ff_text name="amount" id="civ-destroy-amount" size=5 maxLength=4 value="" />
<@ff_select name="type" id="civ-destroy-type">
<@form_option value="0" text="(building type)" />
<#list data.orbit.buildings as building>
<@form_option value=building.id text=building.name />
</#list>
</@ff_select>
<@ff_submit label="Add to queue" />
</@lineform>
</#if>
</#if>
</#if>
<#if data.own.civQueue.items?size gt 0>
<#if data.page.special! != 'v'>
<@lineform name="flush-civ-queue" action="planet-${data.id}-flush-civ" hash="buildings">
Remove all items from the build queue (investments will be lost)
<@ff_submit label="Flush" />
</@lineform>
</#if>
<@listview>
<@lv_line headers=true>
<@lv_column width=80 centered=true>Amount</@lv_column>
<@lv_column width="x">Nature</@lv_column>
<@lv_column width=200 centered=true>Time</@lv_column>
<@lv_column width=70 centered=true>Investment</@lv_column>
</@lv_line>
<#list data.own.civQueue.items as qItem>
<@lv_line>
<@lv_column centered=true>${qItem.amount?string(",##0")}</@lv_column>
<@lv_column>${qItem.name} <#if qItem.destroy>(destruction)<#else>(construction)</#if></@lv_column>
<@lv_column centered=true>
<#if qItem.timeLeft?has_content>
<@duration rTime=qItem.timeLeft gTime=qItem.gameTimeLeft />
<#else>
<span style="color:#ffafaf;font-weight:bold" title="The human race will be long gone when this finishes building.">N/A</span>
</#if>
</@lv_column>
<@lv_column centered=true>${qItem.invested?string(",##0")} <@abbr_bgc/></@lv_column>
</@lv_line>
</#list>
</@listview>
</#if>
</#if>
</@tab>
</#if>
<#if data.own?has_content>
<@tab id="ships" title="Shipyards">
<#if data.page.special! != 'v'>
<#if data.own.milQueue.appendPossible>
<@lineform name="build-mil" action="planet-${data.id}-build-mil" hash="ships">
Build <@ff_text name="amount" id="mil-build-amount" size=5 maxLength=4 value="" />
<@ff_select name="type" id="mil-build-type">
<@form_option value="0" text="(ship type)" />
<#list data.own.bShips as ship>
<@form_option value=ship.id text=ship.name />
</#list>
</@ff_select>
<@ff_submit label="Add to queue" />
</@lineform>
<div id="ships-types">
<#list data.own.bShips as ship>
<div class="ship-type" id="ship-type-${ship.id}">
<@dt_main>
<@dt_status>${ship.description?xhtml}</@dt_status>
<@dt_entry title="Cost">${ship.cost?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Upkeep">${ship.upkeep?string(",##0")} <@abbr_bgc/></@dt_entry>
<@dt_entry title="Time to build">
<#if ship.time?has_content>
<@duration rTime=ship.time gTime=ship.gameTime />
<#else>
<span style="color:#ffafaf;font-weight:bold" title="Don't even try.">N/A</span>
</#if>
</@dt_entry>
<@dt_entry title="Power">${ship.power?string(",##0")}</@dt_entry>
<@dt_entry abbr="OOFT" title="Orbit-to-orbit flight time">
<@duration rTime=ship.flightTime gTime=ship.gameFlightTime />
</@dt_entry>
</@dt_main>
</div>
</#list>
</div>
</#if>
</#if>
<#if data.own.milQueue.items?size gt 0>
<#if data.page.special! != 'v'>
<@lineform name="flush-mil-queue" action="planet-${data.id}-flush-mil" hash="ships">
Remove all items from the build queue (investments will be lost)
<@ff_submit label="Flush" />
</@lineform>
</#if>
<@listview>
<@lv_line headers=true>
<@lv_column width=80 centered=true>Amount</@lv_column>
<@lv_column width="x">Ship</@lv_column>
<@lv_column width=200 centered=true>Time</@lv_column>
<@lv_column width=70 centered=true>Investment</@lv_column>
</@lv_line>
<#list data.own.milQueue.items as qItem>
<@lv_line>
<@lv_column centered=true>${qItem.amount?string(",##0")}</@lv_column>
<@lv_column>${qItem.name}</@lv_column>
<@lv_column centered=true>
<#if qItem.timeLeft?has_content>
<@duration rTime=qItem.timeLeft gTime=qItem.gameTimeLeft />
<#else>
<span style="color:#ffafaf;font-weight:bold" title="The human race will be long gone when this finishes building.">N/A</span>
</#if>
</@lv_column>
<@lv_column centered=true>${qItem.invested?string(",##0")} <@abbr_bgc/></@lv_column>
</@lv_line>
</#list>
</@listview>
</#if>
</@tab>
</#if>
</#if>
</@tabs>
</@page>
</#macro>

View file

@ -0,0 +1,167 @@
<#macro render>
<@page title="Planets">
<#assign pl = data.planets>
<#if pl?size == 0>
<p>We no longer own any planet.</p>
<p><a href="get-planet">Get a new planet?</a></p>
<#else>
<@tabs>
<@tab id="general" title="General">
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Name</@lv_column>
<@lv_column width=90 centered=true>Coordinates</@lv_column>
<@lv_column width=90 centered=true>Happiness</@lv_column>
<@lv_column width=90 right=true>Population</@lv_column>
</@lv_line>
<#list pl as planet>
<@lv_line>
<@lv_column><a href="planet-${planet.id}">${planet.name?xhtml}</a></@lv_column>
<@lv_column centered=true>(${planet.x},${planet.y};${planet.orbit})</@lv_column>
<@lv_column centered=true><@happiness value=planet.happiness /></@lv_column>
<@lv_column right=true>${planet.population?string(",##0")}</@lv_column>
</@lv_line>
</#list>
</@listview>
</@tab>
<@tab id="eco" title="Economy">
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Name</@lv_column>
<@lv_column width=110 right=true>Income</@lv_column>
<@lv_column width=110 right=true>Upkeep</@lv_column>
<@lv_column width=110 right=true>Profit</@lv_column>
</@lv_line>
<#list pl as planet>
<@lv_line>
<@lv_column><a href="planet-${planet.id}">${planet.name?xhtml}</a></@lv_column>
<@lv_column right=true>${planet.income?string(",##0")} <@abbr_bgc /></@lv_column>
<@lv_column right=true>${planet.upkeep?string(",##0")} <@abbr_bgc /></@lv_column>
<@lv_column right=true>
<#if planet.upkeep gt planet.income>
<span style="color: red">
</#if>
${( planet.income - planet.upkeep )?string(",##0")} <@abbr_bgc />
<#if planet.upkeep gt planet.income>
</span>
</#if>
</@lv_column>
</@lv_line>
</#list>
</@listview>
</@tab>
<@tab id="prod" title="Production">
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Name</@lv_column>
<@lv_column width=90 right=true>Military</@lv_column>
<@lv_column width=90 right=true>Industrial</@lv_column>
<@lv_column width=90 right=true>Growth inc.</@lv_column>
</@lv_line>
<#list pl as planet>
<@lv_line>
<@lv_column><a href="planet-${planet.id}#buildings">${planet.name?xhtml}</a></@lv_column>
<@lv_column right=true>${planet.militaryProduction?string(",##0")}</@lv_column>
<@lv_column right=true>${planet.industrialProduction?string(",##0")}</@lv_column>
<@lv_column right=true>${planet.growthProduction?string(",##0")}</@lv_column>
</@lv_line>
</#list>
</@listview>
</@tab>
<@tab id="cons" title="Construction">
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Name</@lv_column>
<@lv_column width=200 centered=true>Current queue item</@lv_column>
<@lv_column width=90 right=true>Investment</@lv_column>
</@lv_line>
<#list pl as planet>
<@lv_line>
<@lv_column><a href="planet-${planet.id}#buildings">${planet.name?xhtml}</a></@lv_column>
<@lv_column centered=true>
<#if planet.civAmount = 0>
<em>N/A</em>
<#else>
<strong>${planet.civAmount?string(",##0")}</strong>x
${planet.civName?xhtml}
<#if planet.civDestroy>
(destruction)
<#else>
(construction)
</#if>
</#if>
</@lv_column>
<@lv_column right=true>${planet.civInvestment?string(",##0")} <@abbr_bgc /></@lv_column>
</@lv_line>
</#list>
</@listview>
</@tab>
<@tab id="ships" title="Shipyards">
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Name</@lv_column>
<@lv_column width=200 centered=true>Current queue item</@lv_column>
<@lv_column width=90 right=true>Investment</@lv_column>
</@lv_line>
<#list pl as planet>
<@lv_line>
<@lv_column><a href="planet-${planet.id}#ships">${planet.name?xhtml}</a></@lv_column>
<@lv_column centered=true>
<#if planet.milAmount = 0>
<em>N/A</em>
<#else>
<strong>${planet.milAmount?string(",##0")}</strong>x
${planet.milName?xhtml}
</#if>
</@lv_column>
<@lv_column right=true>${planet.milInvestment?string(",##0")} <@abbr_bgc /></@lv_column>
</@lv_line>
</#list>
</@listview>
</@tab>
<@tab id="mil" title="Military">
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Name</@lv_column>
<@lv_column width=90 right=true>Stationary</@lv_column>
<@lv_column width=90 right=true>Own fleets</@lv_column>
<@lv_column width=90 right=true>Friendly</@lv_column>
<@lv_column width=90 right=true>Hostile</@lv_column>
</@lv_line>
<#list pl as planet>
<@lv_line>
<@lv_column>
<#if planet.battle?has_content>
<a href="battle-${planet.battle}-latest"><span style="color:red">
</#if>
${planet.name?xhtml}
<#if planet.battle?has_content>
</span></a>
</#if>
</@lv_column>
<@lv_column right=true><span class="own-fleet">${planet.fpStatic?string(",##0")}</span></@lv_column>
<@lv_column right=true><span class="own-fleet">${planet.fpOwn?string(",##0")}</span></@lv_column>
<@lv_column right=true><span class="allied-fleet">${planet.fpFriendly?string(",##0")}</span></@lv_column>
<@lv_column right=true><span class="enemy-fleet">${planet.fpHostile?string(",##0")}</span></@lv_column>
</@lv_line>
</#list>
</@listview>
</@tab>
</@tabs>
</#if>
</@page>
</#macro>

View file

@ -0,0 +1,24 @@
<#macro render>
<#if data.success>
<@page title="Account re-activation">
<p>
Your account was successfully re-activated. The confirmation code was sent to <strong>${data.address}</strong>.
</p>
<p>
One you've received this e-mail, please proceed to the <a href="validate-account">confirmation page</a>.
</p>
</@page>
<#else>
<@page title="Account re-activation failed">
<p>
An error occurred while trying to send an e-mail to your address, <strong>${data.address}</strong>.
</p>
<p>
If your address is still valid, you might want to wait a bit and then <a href="reactivate.action">try again</a>.
</p>
<p>
Or the server might be on crack, in which case you should drop <a href="mailto:staff@legacyworlds.com">the staff</a> a line.
</p>
</@page>
</#if>
</#macro>

View file

@ -0,0 +1,56 @@
<#macro render>
<@page title="Register">
<@form name="register" action="register">
<#switch data.mailError!"">
<#case "EMPTY">
<@form_error>Empty e-mail address.</@form_error>
<#break>
<#case "INVALID">
<@form_error>Invalid e-mail address.</@form_error>
<#break>
<#case "IN_USE">
<@form_error>This e-mail address is already associated with an account.</@form_error>
<#break>
<#case "SEND_FAIL">
<@form_error>Unable to send confirmation code to this address.</@form_error>
<#break>
<#case "MISMATCH">
<@form_error>E-mail address field and confirmation field do not match.</@form_error>
<#break>
<#default>
<@form_extra>The e-mail address <em>MUST</em> exist.</@form_extra>
</#switch>
<@form_text label="E-mail address" maxLength=128 name="mail" value=data.mail! />
<@form_text label="E-mail address (confirm)" maxLength=128 name="mailConfirm" value=data.mail! />
<#switch data.passwordError!"">
<#case "EMPTY">
<@form_error>Empty password.</@form_error>
<#break>
<#case "TOO_WEAK">
<@form_error>This password is too weak.</@form_error>
<#break>
<#case "MISMATCH">
<@form_error>Password field and confirmation field do not match.</@form_error>
<#break>
<#default>
<@form_extra>At least 6 characters, containing both text and numbers. Bonus points for special characters, spaces, and extremely long passwords.</@form_extra>
</#switch>
<@form_pwd label="Password" name="password" />
<@form_pwd label="Password (confirm)" name="passwordConfirm" />
<@form_select name="language" label="Language">
<#if dataType == "ListLanguagesResponse">
<#assign lList = data.languages>
<#else>
<#assign lList = data.supportedLanguages.languages>
</#if>
<#list lList as lang>
<@form_option text=lang.name value=lang.id selected=(lang.id == language) />
</#list>
</@form_select>
<@form_submit label="Register" />
</@form>
</@page>
</#macro>

View file

@ -0,0 +1,13 @@
<#macro render>
<@page title="Accound created">
<p>
Your account has been successfully created.
</p>
<p>
An e-mail containing its confirmation code has been sent to your address, <strong>${data.mail?xhtml}</strong>.
</p>
<p>
Once you have received it, you will be able to log in and confirm your account.
</p>
</@page>
</#macro>

View file

@ -0,0 +1,40 @@
<#macro render>
<@page title="Split fleet">
<form action="split-fleet.action" method="post">
<div>
<input type="hidden" name="fleet" value="${data.initialFleet.id}" />
<#if data.shipsError>
<@standalone_error>Invalid amount(s) of ships or resulting fleets</@standalone_error>
</#if>
<@listview>
<@lv_line headers=true>
<@lv_column width="x">Ship type</@lv_column>
<@lv_column width=150>Initial amount</@lv_column>
<@lv_column width=150>Amount in new fleet</@lv_column>
</@lv_line>
<#list data.ships as ships>
<@lv_line headers>
<@lv_column>${ships.name}</@lv_column>
<@lv_column>${ships.amount?string(",##0")}</@lv_column>
<@lv_column>
<@ff_text name="ships_${ships.id}" id="ships-${ships.id}" value=ships.selectedAmount />
</@lv_column>
</@lv_line>
</#list>
</@listview>
<#if data.nameError>
<@standalone_error>Invalid fleet name.</@standalone_error>
</#if>
<p>
Create
<@ff_text name="nFleets" id="n-fleets" value=data.nFleets size=3 maxLength=2 />
new fleet(s) named
<@ff_text name="name" id="name" value=data.name size=20 maxLength=40 />
&nbsp;
<@ff_submit label="Ok" />
<@ff_submit label="Cancel" name="cancel" />
</p>
</div>
</form>
</@page>
</#macro>

View file

@ -0,0 +1 @@
<#macro render><#if dataType == "HashMap"><#include "../static/${data.name}.ftl" /><#else><#include "../static/${data}.ftl" /></#if></#macro>

View file

@ -0,0 +1,50 @@
<#macro render>
<@page title="Account validation">
<@form action="validation" name="validation">
<@form_extra>
Before you can proceed any further, you need to validate your account using the confirmation code that was e-mailed to you.<br/>
You will also be able to select the names of your empire and first planet.
</@form_extra>
<#if data.wrongToken>
<@form_error>Incorrect confirmation code.</@form_error>
</#if>
<@form_text label="Confirmation code" value=data.token! name="token" maxLength=64 />
<#switch data.empireError!>
<#case "EMPTY"><@form_error>Please select an empire name.</@form_error><#break>
<#case "INVALID"><@form_error>Invalid empire name.</@form_error><#break>
<#case "UNAVAILABLE"><@form_error>This empire name is unavailable.</@form_error><#break>
<#case "BANNED"><@form_error>This empire name has been banned.</@form_error><#break>
</#switch>
<#if data.previousEmpires?size == 0>
<@form_text label="Empire name" value=data.empire! name="empire" maxLength=20 />
<tr style="display:none"><td colspan="2"><input type="hidden" name="old" value="" /></td></tr>
<#else>
<@form_select name="old" label="Re-use empire name">
<#list data.previousEmpires as oldName>
<@form_option text=oldName selected=( oldName == data.empire! ) />
</#list>
</@form_select>
<@form_extra>Leave this blank if you want to re-use a previous empire name.</@form_extra>
<#if ! data.previousEmpires?seq_contains(data.empire!)>
<#assign empValue = data.empire!>
</#if>
<@form_text name="empire" label="New empire name" value=empValue! maxLength=20 />
</#if>
<#switch data.planetError!>
<#case "EMPTY"><@form_error>Please select a planet name.</@form_error><#break>
<#case "INVALID"><@form_error>Invalid planet name.</@form_error><#break>
<#case "UNAVAILABLE"><@form_error>This planet name is unavailable.</@form_error><#break>
<#case "BANNED"><@form_error>This planet name has been banned.</@form_error><#break>
</#switch>
<@form_text name="planet" label="Planet name" value=data.planet! maxLength=20 />
<@form_submit label="Join the game" />
</@form>
</@page>
</#macro>