Added full source code

This commit is contained in:
Emmanuel BENOîT 2016-01-10 11:01:49 +01:00
commit 33f8586698
1377 changed files with 123808 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<h1>Legacy Worlds Administrative Tools</h1>
<?php
$page = $args['subpage'];
$data = $args['data'];
include("admin/en/$page.inc");
?>

View file

@ -0,0 +1,61 @@
<form action="?" method="POST">
<input type="hidden" name="c" value="a" />
<h2>Select an account</h2>
<p>
Name of the account to manage:
<input type="text" name="an" value="<?=utf8entities($data['account'])?>" size="17" maxlength="16" />
<input name="sa" value="Select account" type="submit" />
<?php
if ($data['notfound']) {
print "<br/><span style='color:red; font-weight: bold'>Account not found.</span>";
} elseif ($data['admin']) {
?>
<br/><span style='color:red; font-weight: bold'>Administrative account, no changes allowed.</span>
<?php
} elseif ($data['account'] != '') {
?>
</p>
<h2>Manage account</h2>
<p>
Account status: <b><?=$data['status']?></b>
</p>
<p>
Account email address:
<input type="text" name="ma" value="<?=utf8entities($data['email'])?>" size="32" maxlength="128" />
<input type="submit" name="mma" value="Change mail address" />
<?
switch ($data['mailerr']) :
case -1: print "<br/><span style='color:green; font-weight: bold'>Address changed</span>"; break;
case 1: print "<br/><span style='color:red; font-weight: bold'>Invalid address</span>"; break;
case 2: print "<br/><span style='color:red; font-weight: bold'>Address already used by account "
. utf8entities($data['oacc']) . "</span>"; break;
case 3: print "<br/><span style='color:red; font-weight: bold'>Database error</span>"; break;
endswitch;
?>
</p>
<p>
Account password:
<input type="text" name="pw" value="<?=utf8entities($data['password'])?>" size="32" maxlength="64" />
<input type="submit" name="mpw" value="Change password" />
<?
switch ($data['passerr']) :
case -1: print "<br/><span style='color:green; font-weight: bold'>Password updated</span>"; break;
case 1: print "<br/><span style='color:red; font-weight: bold'>Password too short (min 4 characters)</span>"; break;
case 2: print "<br/><span style='color:red; font-weight: bold'>Database error</span>"; break;
endswitch;
}
?>
</p>
<?php
if (!is_null($data['conf_code'])) {
?>
<p>
Confirmation code: <i><?=$data['conf_code']?></i>
</p>
<?php
}
?>
</form>

View file

@ -0,0 +1,87 @@
<h2>Pending kick requests</h2>
<table class="list">
<tr>
<th style="text-align:left;width:15%">Account name</th>
<th style="text-align:left;width:15%">Requested by</th>
<th style="text-align:left;width:15%">Date</th>
<th style="text-align:left">Reason</th>
<th style="text-align:left;width:15%">Actions</th>
</tr>
<?php
if (empty($data['lists'][0])) {
echo "<tr><td colspan='5' style='text-align:center'>No pending kick requests</td></tr>";
} else {
foreach ($data['lists'][0] as $r) {
$pn = handler::$h->accounts->call('getUser', $r['to_kick']);
$an = handler::$h->accounts->call('getUser', $r['requested_by']);
echo "<tr><td>" . utf8entities($pn['name']) . "</td><td>" . utf8entities($an['name'])
. "</td><td>" . gmstrftime("%Y-%m-%d %H:%M:%S", $r['requested_at'])
. "</td><td>" . utf8entities($r['reason']) . "</td><td>";
if ($r['requested_by'] == $_SESSION['userid']) {
echo "<a href='?c=kl&i={$r['id']}&a=0'>Cancel</a>";
} else {
echo "<a href='?c=kl&i={$r['id']}&a=0'>Reject</a> - <a href='?c=kl&i={$r['id']}&a=1'>Kick player</a>";
}
echo "</td></tr>\n";
}
}
?>
</table>
<h2>Accepted kick requests</h2>
<table class="list">
<tr>
<th style="text-align:left;width:15%">Account name</th>
<th style="text-align:left;width:15%">Requested by</th>
<th style="text-align:left;width:15%">Date</th>
<th style="text-align:left">Reason</th>
<th style="text-align:left;width:15%">Validated by</th>
</tr>
<?php
if (empty($data['lists'][1])) {
echo "<tr><td colspan='5' style='text-align:center'>No accepted kick requests</td></tr>";
} else {
foreach ($data['lists'][1] as $r) {
$pn = handler::$h->accounts->call('getUser', $r['to_kick']);
$an = handler::$h->accounts->call('getUser', $r['requested_by']);
$vn = handler::$h->accounts->call('getUser', $r['examined_by']);
echo "<tr><td>" . utf8entities($pn['name']) . "</td><td>" . utf8entities($an['name'])
. "</td><td>" . gmstrftime("%Y-%m-%d %H:%M:%S", $r['requested_at'])
. "</td><td>" . utf8entities($r['reason']) . "</td><td>"
. utf8entities($vn['name']) . "</td></tr>\n";
}
}
?>
</table>
<h2>Rejected kick requests</h2>
<table class="list">
<tr>
<th style="text-align:left;width:15%">Account name</th>
<th style="text-align:left;width:15%">Requested by</th>
<th style="text-align:left;width:15%">Date</th>
<th style="text-align:left">Reason</th>
<th style="text-align:left;width:15%">Rejected by</th>
</tr>
<?php
if (empty($data['lists'][2])) {
echo "<tr><td colspan='5' style='text-align:center'>No rejected requests</td></tr>";
} else {
foreach ($data['lists'][2] as $r) {
$pn = handler::$h->accounts->call('getUser', $r['to_kick']);
$an = handler::$h->accounts->call('getUser', $r['requested_by']);
$vn = handler::$h->accounts->call('getUser', $r['examined_by']);
echo "<tr><td>" . utf8entities($pn['name']) . "</td><td>" . utf8entities($an['name'])
. "</td><td>" . gmstrftime("%Y-%m-%d %H:%M:%S", $r['requested_at'])
. "</td><td>" . utf8entities($r['reason']) . "</td><td>"
. utf8entities($vn['name']) . "</td></tr>\n";
}
}
?>
</table>

View file

@ -0,0 +1,49 @@
<h2>Request a kick</h2>
<p>
Please indicate the name of the player to be kicked as well as the reason why the player should be kicked in the form below.<br/>
The player will only be kicked after another administrator confirms it.
</p>
<?php
if ($data['error'] != 0) {
echo "<p style='font-weight:bold;color:red'>";
switch($data['error']) :
case 1:
echo "Account not found.";
break;
case 2:
echo "Please specify a reason (&gt;10 characters).";
break;
case 3:
echo "This player is already on the list of pending kicks.";
break;
default:
echo "Unknown error.";
break;
endswitch;
echo "</p>";
}
?>
<form method="POST" action="?">
<input type="hidden" name="c" value="k" />
<input type="hidden" name="kr" value="1" />
<table>
<tr>
<th style="text-align:left;width:200px;padding:0px 0px 0px 40px">Player to kick:</th>
<td><input style="width:50%" maxlength="15" type="text" name="p" value="<?=preg_replace('/"/', '&quot;', $data['name'])?>" /></td>
</tr>
<tr>
<th style="text-align:left;padding:0px 0px 0px 40px">Reason:</th>
<td><textarea style="width:50%" name="r"><?=utf8entities($data['reason'])?></textarea></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td>&nbsp;</td>
<td>
<input style="font-weight:bold;border-color:white;border-style:solid;border-width:1px;color:white;background-color:red" type="submit" value="Request kick" />
<input style="border-color:white;border-style:solid;border-width:1px;color:white;background-color:green" type="submit" name="cancel" value="Cancel" />
</td>
</tr>
</table>
</form>

View file

@ -0,0 +1,47 @@
<h2><?=$data['id'] ? "Edit" : "Add"?> category</h2>
<form action="?" method="POST">
<input type="hidden" name="c" value="lk" />
<input type="hidden" name="ac" value="<?=$data['id'] ? 2 : 0?>" />
<input type="hidden" name="r" value="1" />
<?php
if ($data['id']) {
?>
<input type="hidden" name="cid" value="<?=$data['id']?>" />
<?php
}
?>
<table style="width:80%;padding:0px 0px 0px 30px">
<tr>
<td style="font-weight:bold;padding:0px 10px 0px 0px">Name:</td>
<td><input type="text" name="title" size="40" value="<?=utf8entities($data['title'])?>" /></td>
</tr>
<?php
if ($data['error'] && $data['error'] < 4) {
echo "<tr><td>&nbsp;</td><td><b>";
switch ($data['error']) :
case 1: echo "This title is too short"; break;
case 2: echo "This title is too long"; break;
case 3: echo "There is already such a category"; break;
endswitch;
echo "</b></td></tr>\n";
}
?>
<tr>
<td style="vertical-align:top;font-weight:bold;padding:0px 10px 0px 0px">Description:</td>
<td><textarea name="desc" rows="5" cols="40"><?=utf8entities($data['desc'])?></textarea></td>
</tr>
<?php
if ($data['error'] == 4) {
echo "<tr><td>&nbsp;</td><td><b>This description is too short.</b></td></tr>\n";
}
?>
<tr>
<td style="text-align:right;padding:0px 5px 0px 0px">
<input type="submit" value="<?=$data['id'] ? "Modify" : "Add"?> category" style="color:white;border-color:white;background-color:green" />
</td>
<td style="padding:0px 0px 0px 5px">
<input type="submit" name="cancel" value="Cancel" style="color:white;border-color:white;background-color:red" />
</tr>
</table>
</form>

View file

@ -0,0 +1,42 @@
<?php
echo "<h2>Links and categories</h2>";
if (!count($data)) {
echo "<p>There are no categories. Click <a href='?c=lk&ac=0'>here</a> to add one.</p>";
return;
}
$hasAccount = (is_array($_SESSION) && !is_null($_SESSION['userid']));
for ($i=0;$i<count($data);$i++) {
echo "<p style='margin:10px 0px 5px 20px;text-align:justify'><b><u>" . utf8entities($data[$i]['title']) . "</u></b>";
if (!is_null($data[$i]['description'])) {
echo "<br/>" . preg_replace('/\n/', '<br/>', utf8entities($data[$i]['description']));
}
echo "<br/><a href='?c=lk&ac=1&cid={$data[$i]['id']}'>Add link</a> - <a href='?c=lk&ac=2&cid={$data[$i]['id']}'>Edit</a>";
echo " - <a onclick='return confirm(\"Are you sure you want to delete this category?\")' href='?c=lk&ac=3&cid={$data[$i]['id']}'>Delete</a>";
if ($i > 0) {
echo " - <a href='?c=lk&ac=4&cid={$data[$i]['id']}'>Move up</a>";
}
if ($i < count($data) - 1) {
echo " - <a href='?c=lk&ac=5&cid={$data[$i]['id']}'>Move down</a>";
}
echo "</p>";
echo "<ul style='margin:0px 30px 0px 60px'>";
if (!count($data[$i]['links'])) {
echo "<li><i>No links in this category.</i></li>";
} else {
foreach ($data[$i]['links'] as $l) {
echo "<li><a href='{$l['url']}' target='_blank' title=\"" . utf8entities($l['title']) . "\"><u>" . utf8entities($l['title']) . "</u></a>";
if (!is_null($l['description'])) {
echo "<br/>" . preg_replace('/\n/', '<br/>', utf8entities($l['description']));
}
echo "<br/><a href='?c=lk&ac=10&lid={$l['id']}'>Edit</a> - <a onclick='return confirm(\"Are you sure you want to delete this link?\")' href='?c=lk&ac=11&lid={$l['id']}'>Delete</a>";
echo "<br/>&nbsp;</li>";
}
}
echo "</ul>";
}
echo "<p style='margin:10px 0px 5px 20px;text-align:justify'><a href='?c=lk&ac=0'>Add category</a></p>";
?>

View file

@ -0,0 +1,65 @@
<h2><?=$data['id'] ? "Edit" : "Add"?> link</h2>
<form action="?" method="POST">
<input type="hidden" name="c" value="lk" />
<input type="hidden" name="ac" value="<?=$data['id'] ? 10 : 1?>" />
<input type="hidden" name="r" value="1" />
<?php
if ($data['id']) {
?>
<input type="hidden" name="lid" value="<?=$data['id']?>" />
<?php
} else {
?>
<input type="hidden" name="cid" value="<?=$data['cid']?>" />
<?php
}
?>
<table style="width:80%;padding:0px 0px 0px 30px">
<tr>
<td style="font-weight:bold;padding:0px 10px 0px 0px">Name:</td>
<td><input type="text" name="title" size="40" value="<?=utf8entities($data['title'])?>" /></td>
</tr>
<?php
if ($data['error'] && $data['error'] < 3) {
echo "<tr><td>&nbsp;</td><td><b>";
switch ($data['error']) :
case 1: echo "This title is too short"; break;
case 2: echo "This title is too long"; break;
endswitch;
echo "</b></td></tr>\n";
}
?>
<tr>
<td style="font-weight:bold;padding:0px 10px 0px 0px">URL:</td>
<td><input type="text" name="url" size="40" value="<?=utf8entities($data['url'])?>" /></td>
</tr>
<?php
if ($data['error'] >= 3 && $data['error'] <= 5) {
echo "<tr><td>&nbsp;</td><td><b>";
switch ($data['error']) :
case 3: echo "This URL is invalid"; break;
case 4: echo "The server could not be found"; break;
case 5: echo "The URL is already in the DB"; break;
endswitch;
echo "</b></td></tr>\n";
}
?>
<tr>
<td style="vertical-align:top;font-weight:bold;padding:0px 10px 0px 0px">Description:</td>
<td><textarea name="desc" rows="5" cols="40"><?=utf8entities($data['desc'])?></textarea></td>
</tr>
<?php
if ($data['error'] == 6) {
echo "<tr><td>&nbsp;</td><td><b>This description is too short.</b></td></tr>\n";
}
?>
<tr>
<td style="text-align:right;padding:0px 5px 0px 0px">
<input type="submit" value="<?=$data['id'] ? "Modify" : "Add"?> link" style="color:white;border-color:white;background-color:green" />
</td>
<td style="padding:0px 0px 0px 5px">
<input type="submit" name="cancel" value="Cancel" style="color:white;border-color:white;background-color:red" />
</tr>
</table>
</form>

View file

@ -0,0 +1,19 @@
<?php
echo "<h2>Broken links report</h2>";
if (!count($data)) {
echo "<p>No broken links have been reported.</p>";
return;
}
echo "<ul>";
foreach ($data as $link) {
echo "<li>Link <b>" . utf8entities($link['title']) . "</b> to <a href='{$link['url']}' target='_blank'>"
. utf8entities($link['url']) . "</a> in category " . utf8entities($link['category']['title']) . "<br/>"
. "Reported by: <b>" . join('</b> - <b>', $link['reporters']) . "</b><br/>"
. "<a href='?c=lkr&id={$link['id']}&dr=1'>Remove report</a> - "
. "<a onclick='return confirm(\"Please confirm that you want to remove this link\")' href='?c=lkr&id={$link['id']}&dl=1'>Remove link</a><br/>&nbsp;</li>";
}
echo "</ul>";
?>

View file

@ -0,0 +1,31 @@
<h2>Accept submission</h2>
<p>
You are about to accept the following submission:
</p>
<ul>
<li>Title: <b><?=utf8entities($data['sub']['title'])?></b></li>
<li>URL: <b><?=utf8entities($data['sub']['url'])?></b></li>
<?php
if ($data['sub']['description'] != '') {
echo " <li>Description: <b>" . utf8entities($data['sub']['description']) . "</b></li>\n";
}
?>
</ul>
<form action="?" method="GET">
<input type="hidden" name="c" value="lks" />
<input type="hidden" name="su" value="<?=utf8entities($data['sub']['url'])?>" />
<input type="hidden" name="sid" value="<?=$data['sub']['submitted_by']?>" />
<p>
Select the category into which the link should be added:
<select name="cid">
<option value="">---------------------------------------</option>
<?php
foreach ($data['cats'] as $cat) {
echo "<option value='{$cat['id']}'>" . utf8entities($cat['title']) . "</option>\n";
}
?>
</select><br/>
<input type="submit" value="Add link" style="color:white;border-color:white;background-color:green" />
<input type="submit" name="cancel" value="Cancel" style="color:white;border-color:white;background-color:red" />
</p>
</form>

View file

@ -0,0 +1,25 @@
<?php
echo "<h2>Submitted links</h2>";
if (!count($data)) {
echo "<p>No links have been submitted.</p>";
return;
}
echo "<ul>";
foreach ($data as $link => $entries) {
echo "<li>Link to <a target='_blank' href='$link'>" . utf8entities($link) . "</a>:<ul>";
foreach ($entries as $entry) {
echo "<li>Submitted by <b>{$entry['submitter']}</b> as <b>{$entry['title']}</b><br/>";
if ($entry['description'] != '') {
echo "Description: <b>{$entry['description']}</b>";
} else {
echo "No description";
}
echo "<br/><a href='?c=lks&su=" . urlencode($link) . "&sid={$entry['sid']}'>Accept entry</a></li>";
}
echo "<li><a onclick='return confirm(\"Are you sure?\")' href='?c=lks&su=" . urlencode($link) . "'>Delete entry</a></ul></li>";
}
echo "</ul>";
?>

View file

@ -0,0 +1,30 @@
<h2>Main administrative tools</h2>
<p>
<a href="?c=m">Manual update</a><br/>
Tool that updates the manual from the XML files on the server.<br/>
<b>Warning</b>: this tool is very resource-consuming; please don't run it unless you have a good reason to.
</p>
<p>
<a href="?c=a">Account management</a><br/>
This tool allows operations such as changing an account's email address or password.
</p>
<p>
<a href="?c=k">Request player kick</a><br/>
Request that a player be banned from the game. Another admin will have to validate your request.<br/>
<a href="?c=kl">Manage kicks</a><br/>
Display the list of pending, accepted and rejected kick requests, and validate pending requests.
</p>
<p>
<u>Link management:</u> <a href="?c=lk">Links &amp; categories</a> - <a href='?c=lkr'>Reports</a> - <a href='?c=lks'>Submissions</a><br/>
Different tools to manage the main page's links.
</p>
<h2>Beta 5 administrative tools</h2>
<p>
<a href="?c=p">Planet names</a><br/>
Planet names moderation tools to spot planets with insulting or "politically incorrect" names.
</p>
<p>
<a href="?c=s">Admin spam</a><br/>
Sends a message to all players.
</p>

View file

@ -0,0 +1,98 @@
<?php
function printOption($value, $text, $cVal) {
return "<option value='$value'" . ($cVal === $value ? " selected='selected'" : "") . ">" . utf8entities($text) . "</option>";
}
function printPrompt($id) {
$prompts = array(
"You are about to send this planet a warning regarding its name.",
"You are about to validate this planet name.",
"You are about to reset this planet."
);
return " onclick='return confirm(\"{$prompts[$id]}\\nPlease confirm.\")'";
}
?>
<h2>Planet names</h2>
<form action="?" method="GET">
<input type="hidden" name="c" value="p" />
<table style="width:90%;margin: 0 4%">
<tr>
<td style="text-align:center;width:50%">List: <select name="m" onchange="this.form.submit()">
<?=printOption("r", "Unmoderated", $data['mode'])?>
<?=printOption("o", "Validated", $data['mode'])?>
<?=printOption("p", "Pending", $data['mode'])?>
<?=printOption("w", "Renamed after warning", $data['mode'])?>
</select></td>
<td style="text-align:center"><?php
if ($data['pages'] == 0) {
echo "&nbsp;";
} else {
echo "Page <select name='p' onchange='this.form.submit()'>";
for ($i=0;$i<$data['pages'];$i++) {
echo printOption($i, $i+1, $data['page']);
}
echo "</select> / {$data['pages']}";
}
?></td>
</tr>
<tr>
<?php
if (count($data['list'])) {
?>
<td colspan='2'><table class='list'>
<tr>
<th style='text-align:left;width:33%'>Planet name</th>
<th style='text-align:left;width:33%'>Owner</th>
<th style='text-align:left;width:34%'>Actions</th>
</tr>
<?php
for ($i=0;$i<count($data['list']);$i++) {
$planet = $data['list'][$i];
?>
<tr>
<td><a href="planet?id=<?=$planet['id']?>"><?=utf8entities($planet['name'])?></a></td>
<td><?php
if (is_null($planet['owner'])) {
echo "(neutral)";
} else {
echo "<a href='message?a=c&ct=0&id={$planet['owner']}'>" . utf8entities($planet['oname']) . "</a>";
}
?></td>
<td>
<a target='_blank' href="map?menu=p&ctr=<?=$planet['id']?>">Centre map</a><?php
if ($data['mode'] == 'r' || $data['mode'] == 'o') {
if (is_null($planet['owner'])) {
echo " - <a href='?c=p&m=r&p={$data['page']}&pc=r&id={$planet['id']}'" . printPrompt(2) . ">Reset</a>\n";
} else {
echo " - <a href='?c=p&m=r&p={$data['page']}&pc=w&id={$planet['id']}'" . printPrompt(0) . ">Send warning</a>\n";
}
if ($data['mode'] == 'r') {
echo " - <a href='?c=p&m=r&p={$data['page']}&pc=v&id={$planet['id']}'" . printPrompt(1) . ">Validate</a>\n";
}
} elseif ($data['mode'] != 'p') {
echo " - <a href='?c=p&m=r&p={$data['page']}&pc=r&id={$planet['id']}'>Reset</a>\n";
if ($data['mode'] == 'w') {
echo " - <a href='?c=p&m=r&p={$data['page']}&pc=v&id={$planet['id']}'" . printPrompt(1) . ">Validate</a>\n";
}
}
?>
</td>
</tr>
<?php
}
?>
</table></td>
<?php
} else {
echo " <td colspan='2' style='text-align:center'>No planets in this list.</td>\n";
}
?>
</tr>
</table>
</form>

View file

@ -0,0 +1,55 @@
<h2>Send admin spam</h2>
<p>
Type the spam in the form below. You can use forum tags inside the spam.<br/>
Use the "Preview" button to check on your spam before sending it.<br/>
If you need to send the spam to all players within all active games, check the "Send in all games" box.
</p>
<form action="?" method='post'>
<input type='hidden' name='c' value='s' />
<a name='box'></a>
<table cellspacing="0" cellpadding="0" style="width: 75%">
<tr><td colspan='3'>&nbsp;</td></tr>
<?
$errs = array('Subject is too short.', 'Subject is too long.', 'Contents are too short.', 'Contents are too long.');
if ($data['err']) {
echo " <tr><td>&nbsp;</td><th style='text-align:left;color:red'>" . $errs[$data['err']-1]
. "</th><td>&nbsp;</td></tr>";
}
?>
<tr>
<th style="width:10%;text-align:right"><label for="sub" accesskey="s">Subject:</label></th>
<td colspan="2"><input type='text' id="sub" name='sub' style="width:90%" value="<?=utf8entities($data['sub'], ENT_QUOTES)?>" maxlength="100" size='60' /></td>
</tr>
<tr>
<th style="vertical-align:top;width:10%;text-align:right"><label for="txt" accesskey="t">Text:</label></th>
<td colspan="2"><textarea name='txt' id="txt" style="width:90%" rows='15'><?=utf8entities($data['txt'])?></textarea></td>
</tr>
<tr>
<th style="width:10%;text-align:right">Options:</th>
<td colspan="2">
<input type='checkbox' name='ag' id="eag" value='1'<?=$data['ag']?" checked='checked'":""?> /> <label for="eag" accesskey="a">Send in all games</label>
</td>
</tr>
<tr><td colspan='3'>&nbsp;</td></tr>
<tr>
<td>&nbsp;</td>
<td colspan='2' class='butt'>
<input type='submit' name='e' value='Spam, spam, spam' accesskey="g" />
<input type='submit' name='p' value='Preview' accesskey="p" />
<input type='submit' name='cc' value='Cancel' accesskey="c" />
</td>
</tr>
<?php
if ($data['prev'] != "") {
echo " <tr><td rowspan='3'>&nbsp;</td><td>&nbsp;</td><td rowspan='3'>&nbsp;</td></tr>\n";
echo " <tr><th style='text-align:left'>Preview - " . utf8entities($data['sub']) . "</th></tr>\n";
echo " <tr><td style='border: 1px solid #3f3f3f;padding: 4px'>" . $data['prev'] . "</td></tr>\n";
}
?>
</table>
</form>

View file

@ -0,0 +1,2 @@
<div id='allinit' style="display: none; visibility: hidden;"><?=$args?></div>
<div id="allpage"></div>

View file

@ -0,0 +1,21 @@
<form action="?" onSubmit="return false"><table cellpadding="0" cellspacing="0">
<tr>
<td class="pc5">&nbsp;</td>
<td class="pc45" id="allies">&nbsp;</td>
<td class="pc45">
<h1>Players who trust you</h1>
<div id="rallies">&nbsp;</div>
</td>
<td style="width:5%;vertical-align:top"><a href="manual?p=allies">Help</a></td>
</tr>
<tr><td colspan='4'>&nbsp;</td></tr>
<tr>
<td class="pc5">&nbsp;</td>
<td class="pc90" colspan="2">
<h1>Trusted Allies blacklist</h1>
<div id="bans">&nbsp;</div>
</td>
<td class="pc5">&nbsp;</td>
</tr>
</table></form>
<div id='alinit' style="display: none; visibility: hidden;"><?=$args?></div>

View file

@ -0,0 +1,25 @@
<table><tr>
<td class='div2'>
<h1>Private Messages</h1>
<p><a href='message?a=c' <?=tooltip('Click here to go to the form to compose a new private message')?>>Compose Message</a></p>
<h2>Default Folders</h2>
<p>
<a href='message?a=f&f=I' <?=tooltip('Click here to go to your inbox folder')?>>Inbox</a>: <span id="msg0"> </span><br/>
<a href='message?a=f&f=T' <?=tooltip('Click here to go to your internal transmissions folder')?>>Internal Transmissions</a>: <span id="msg1"> </span><br/>
<a href='message?a=f&f=O' <?=tooltip('Click here to go to your outbox folder')?>>Outbox</a>: <span id="msg2"> </span>
</p>
<h2>Custom Folders</h2>
<p>
<span id='cflist'></span><br/>
<a href='message?a=mf' <?=tooltip('Click here to go to the custom folders management page')?>>Manage Custom Folders</a>
</p>
</td><td style="width:45%">
<h1>Forums</h1>
<h2>General forums</h2>
<p id="gforums"></p>
<div id="aforums"></div>
</td><td>
<a href="manual?p=communications_page">Help</a>
</td>
</tr></table>
<div style="display:none;visibility:hidden"><form action="?" onsubmit="return false"><textarea id="init-data"><?=$args?></textarea></form></div>

View file

@ -0,0 +1,25 @@
<table>
<tr>
<td class='div2'>
<h1>Alliance</h1>
<div id="alliance"></div>
</td>
<td class='pc45'>
<h1>Scientific Assistance</h1>
<p id="rsass">&nbsp;</p>
<h1>Allies &amp; Enemies</h1>
<p>
<span id="allies">&nbsp;</span><br/>
<a href="allies"<?=tooltip('Click here to go to the trusted allies management page')?>>Manage allies</a> - <a href="enemylist" <?=tooltip('Click here to go to the enemies management page')?>>Manage enemies</a>
</p>
<h1>Private Messages</h1>
<p>
<a href="message?a=f&f=I" <?=tooltip('Click here to go to your inbox in the messaging system')?>>Messages</a>: <b id="pm">&nbsp;</b> (<b id="pmn">&nbsp;</b> new)<br/>
<a href="message?a=f&f=T" <?=tooltip('Click here to go to the internal transmissions folder of the messaging system')?>>Internal Transmissions</a>: <b id="it">&nbsp;</b> (<b id="itn">&nbsp;</b> new)<br/>
<a href="message?a=c" <?=tooltip('Click here to go to the new message form and prepare a new message to be sent')?>>Compose</a> a message
</p>
</td>
<td style="vertical-align:top"><a href="manual?p=diplomacy_page">Help</a></td>
</tr>
</table>
<div id='dinit' style="display: none; visibility: hidden;"><?=$args?></div>

View file

@ -0,0 +1,73 @@
<div style="display:none;visibility:hidden"><form action="?" onsubmit="return false"><textarea id="init-data"><?=$args?></textarea></form></div>
<table>
<tr>
<td class='div2'>
<h1>Planets</h1>
<h2>Overview</h2>
<p>
Planets owned: <b id='plcnt'></b><br/>
Average happiness: <span id='plahap'></span><br/>
Average corruption: <span id='placor'></span><br/>
Total population: <b id='plpop'></b><br/>
Average population: <span id='plapop'></span><br/>
Total factories: <b id='plfct'></b><br/>
Average factories: <span id='plafct'></span><br/>
Total turrets: <b id='pltrt'></b><br/>
Average turrets: <span id='platrt'></span><br/>
<span id='platt'></span>
<a href='planets' <?=tooltip('Click here to go to the main planets page')?>>Planet list</a>
</p>
<h2>Quick links</h2>
<p id='pllst'></p>
<h1>Research</h1>
<h2>Budget</h2>
<p>
Fundamental research: <b id='rsbf'></b> (<b id='rspf'></b> points/day)<br/>
Military research: <b id='rsbm'></b> (<b id='rspm'></b> points/day)<br/>
Civilian research: <b id='rsbc'></b> (<b id='rspc'></b> points/day)<br/>
<a href='research' <?=tooltip('Click here to go to the research management page')?>>Manage research</a>
</p>
<div id="rsst"></div>
</td>
<td class='pc45'>
<h1>Money</h1>
<p>
Total income: &euro;<b id='minc'>&nbsp;</b><br/>
Daily profits: &euro;<b id='mprof'>&nbsp;</b><br/>
<a href='money' <?=tooltip('Click here to go to the money page')?>>Details ...</a>
<h1>Fleets</h1>
<h2>Overview</h2>
<p>
Total fleet power: <b id='fltot'></b><br/>
Fleet upkeep: &euro;<b id='flupk'></b><br/>
Number of fleets: <b id='flcnt'></b><br/>
Fleets engaged in battle: <b id='flbat'></b><br/>
<a href='fleets' <?=tooltip('Click here to go to the fleets management page')?>>View fleets</a>
</p>
<h2>Fleets at home</h2>
<p>
Number of fleets: <b id='flhcnt'></b><br/>
Fleets engaged in battle: <b id='flhbat'></b>
</p>
<h2>Other fleets</h2>
<p>
Fleets on foreign planets: <b id='flocnt'></b><br/>
Fleets engaged in battle: <b id='flobat'></b><br/>
Moving fleets: <b id='flomv'></b><br/>
Fleets waiting in Hyperspace: <b id='flowt'></b>
</p>
<h2>Statistics</h2>
<p>
GA ships: <b id='flgas'></b><br/>
Fighters: <b id='flfgt'></b><br/>
Cruisers: <b id='flcru'></b><br/>
Battle cruisers: <b id='flbcr'></b><br/>
Total ships: <b id='flsht'></b>
</p>
</td>
<td style="width:5%;text-align:left;vertical-align:top;">
<a href="manual?p=empire_overview">Help</a>
</td>
</tr>
</table>

View file

@ -0,0 +1,25 @@
<form action="?" onSubmit="return false"><table cellspacing="0" cellpadding="0">
<tr>
<td class="pc5">&nbsp;</td>
<td class="pc45">
<h1>Player Enemy List</h1>
<p>
New enemy:
<input type="text" <?=tooltip('Use this textfield to type in the name of the enemy player to add to your list')?> name="nepl" id="nepl" value="" size="16" maxlength="15" />
<input type="button" <?=tooltip('Click here to add this player to your enemy list')?> name="addpl" value="Add" onClick="addPlayer();return false" />
</p>
<div id="epldiv"></div>
</td>
<td class="pc45">
<h1>Alliance Enemy List</h1>
<p>
New enemy:
<input type="text" <?=tooltip('Use this textfield to type in the tag of the enemy alliance to add to your list')?> name="neal" id="neal" value="" size="6" maxlength="5" />
<input type="button" <?=tooltip('Click here to add this alliance to your enemy list')?> name="addal" value="Add" onClick="addAlliance();return false" />
</p>
<div id="ealdiv"></div>
</td>
<td class="pc5" style="vertical-align:top"><a href="manual?p=enemies">Help</a></td>
</tr>
</table></form>
<div id='elinit' style="display: none; visibility: hidden;"><?=$args?></div>

View file

@ -0,0 +1,2 @@
<div id='finit' style="display: none; visibility: hidden;"><?=$args?></div>
<div id='fpage'>&nbsp;</div>

View file

@ -0,0 +1,72 @@
<?
function drawForumsMenu($mode,$fList)
{
?>
<table cellspacing="0" cellpadding="0">
<tr><td colspan="3">&nbsp;</td></tr>
<tr><th colspan="3">Forums</th></tr>
<tr><td colspan="3" style="text-align:right;padding:0px 15px 0px 0px"><a style="color:white;text-decoration:underline" href="manual?p=bugs">Help</a></td></tr>
<tr>
<td class="mmspc" rowspan="2">&nbsp;</td>
<td colspan="2"><a href='?cmd=o' <?=tooltip('Click here to display the forums overview')?>><?=($mode=='o')?"<i>":""?>Overview<?=($mode=='o')?"</i>":""?></a></td>
</tr>
<tr><td colspan="2"><a href='?cmd=l' <?=tooltip('Click here to display the latest messages in all forums')?>><?=($mode=='l')?"<i>":""?>Latest messages<?=($mode=='l')?"</i>":""?></a></td></tr>
<tr><td colspan="3">&nbsp;</td></tr>
<?
foreach ($fList as $cid => $cat)
{
$sel1 = ($mode == "C#$cid");
$selL = ($mode == "L#$cid");
$sel = $sel1 || $selL;
if (!$sel && substr($mode,0,4) == "F#".$cat['type']."#")
{
for ($i=0;!$sel&&$i<count($cat['forums']);$i++)
$sel = (substr($mode,4) == $cat['forums'][$i]['id']);
}
$au = 0;
if (!$sel)
for ($i=0;$i<count($cat['forums']);$i++)
$au += $cat['forums'][$i]['unread'];
$cb = $au ? '<b>' : ''; $ceb = $au ? " ($au)</b>" : '';
echo '<tr><td class="mmspc" rowspan="'.(2+($sel?count($cat['forums']):0)).'">&nbsp;</td>';
echo "<td colspan='2'><a href='?cmd=".urlencode("C#$cid")."' ".tooltip('Click here to display this forums category main page').">$cb".($sel1?"<i>":"").utf8entities($cat['title']);
echo ($sel1?"</i>":"")."$ceb</a></td></tr>\n";
if ($sel)
foreach ($cat['forums'] as $f)
{
$au = $f['unread'];
$cb = $au ? '<b>' : ''; $ceb = $au ? " ($au)</b>" : '';
$fid = "F#".$cat['type']."#".$f['id'];
$selF = ($mode == $fid);
echo "<tr><td class='mmspc'>&nbsp;</td>";
echo " <td><a href='?cmd=".urlencode($fid)."' ".tooltip('Click here to display the contents of this forum').">$cb".($selF?"<i>":"").utf8entities($f['title']).($selF?"</i>":"")."$ceb</a></td>";
echo "</tr>\n";
}
echo '<tr><td class="mmspc">&nbsp;</td>';
echo "<td><a href='?cmd=".urlencode("L#$cid")."' ".tooltip('Click here to display the latest messages this forums category').">".($selL?"<i>":"").'Latest messages'.($selL?"</i>":"")."</a></td></tr>\n";
echo "<tr><td colspan='3'>&nbsp;</td>\n";
}
?>
<tr>
<td class="mmspc" rowspan="2">&nbsp;</td>
<td colspan="2"><a href='?cmd=s' <?=tooltip('Click here to go to the forums search page')?>><?=($mode=='s')?"<i>":""?>Search forums<?=($mode=='s')?"</i>":""?></a></td>
</tr>
<tr><td colspan="3">&nbsp;</td>
<tr><th colspan="3"><a href="message" <?=tooltip('click here to go to the messaging system page')?>>Messages</a></th></tr>
</table>
<?
}
$sp = $args['sp'];
$args = $args['d'];
include("forums/en/$sp.inc");
?>

View file

@ -0,0 +1,67 @@
<?
$cat = $args['all'][$args['id']];
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('C#'.$args['id'], $args['all']); ?>
</td>
<td>
<table cellspacing='0' cellpadding='0'><tr>
<td class="pc50"><h1><?=utf8entities($cat['title'])?></h1></td>
<td class='maar'><a href="?cmd=<?=urlencode('MC#'.$cat['type']."#".$cat['id'])?>" <?=tooltip('Click here to mark all topics in the forums belonging to this category as read')?>>Mark forums as read</a></td>
</tr></table>
<p><?
if ($cat['desc'] != '')
echo preg_replace('/\n/', '<br/>', utf8entities($cat['desc']));
else if ($cat['type'] == 'A')
echo "<p>These are the forums of the alliance called <b>".utf8entities($cat['title'])."</b></p>";
else
echo "&nbsp;";
echo "</p>\n";
if (count($cat['forums']))
{
echo "<table cellspacing='0' cellpadding='0' class='fcf'>\n";
echo "<tr><td class='fst' colspan='2'>&nbsp;</td><th class='fnm'>Forum name</th>";
echo "<th class='fnt'>Topics</th><th class='fnp'>Posts</th><th class='flpl'>Last post</th></tr>\n";
for ($i=0;$i<count($cat['forums']);$i++)
{
echo "<tr><td class='fst' rowspan='2'>&nbsp;</td>";
$pic = config::$main['staticurl'] . "/beta5/pics/" . ($cat['forums'][$i]['unread'] > 0 ? 'un' : '') . 'read.gif';
echo "<td class='fst' rowspan='2'><img src='$pic' alt='FIXME' /></td>";
echo "<td class='fnm'><a href='?cmd=".urlencode("F#".$cat['type']."#".$cat['forums'][$i]['id'])."' ".tooltip('Click here to go to this forum topics list page')." >";
echo utf8entities($cat['forums'][$i]['title']) . "</a></td>";
echo "<td class='fnt'>" . $cat['forums'][$i]['topics'] . "</td>";
echo "<td class='fnp'>" . $cat['forums'][$i]['posts'] . "</td>";
echo "<td class='flpl' rowspan='2'>&nbsp;";
$l = $cat['forums'][$i]['last'];
if (is_null($l))
echo "No Posts";
else
{
echo "Last post by <b>" . utf8entities($l['author']) . "</b><br/>";
echo preg_replace('/ /', '&nbsp;', gmstrftime("%H:%M:%S on %d/%m/%Y", $l['moment']));
}
echo "</td>";
echo "</tr>\n<tr><td colspan='3'><p>";
if ($cat['forums'][$i]['description'] != '')
echo preg_replace('/\n/', '<br/>', utf8entities($cat['forums'][$i]['description']));
else
echo "&nbsp;";
echo "</p></td></tr>\n";
}
echo "</table>";
}
else
echo "<p>There are no forums in this category.</p>";
?>
</td>
</tr>
</table>

View file

@ -0,0 +1,11 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('', $args); ?>
</td>
<td>
<h1>Category Not Found</h1>
<p>The category you wish to view no longer exists.</p>
</td>
</tr>
</table>

View file

@ -0,0 +1,146 @@
<?
$f = $args['forum'];
$fid = 'F#'.$f['ctype']."#".$f['id'];
list($tPPage,$page,$nPages) = $args['details'];
$mod = $f['mod'];
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu($fid, $args['cats']); ?>
</td>
<td>
<table cellspacing='0' cellpadding='0'><tr>
<td class="pc50"><h1><?=utf8entities($f['title'])?></h1></td>
<td class='maar'><a href="?cmd=<?=urlencode('MF#'.$f['ctype']."#".$f['id'])?>&pg=<?=$page?>" <?=tooltip('Click here to mark all topics in this forum as read')?>>Mark topics as read</a></td>
</tr></table>
<?
if ($f['description'] != '')
echo "<p>" . preg_replace('/\n/', '<br/>', utf8entities($f['description'])) . "</p>\n";
?>
<form action="?" method="post">
<input type="hidden" name="cmd" value="<?=$fid?>" />
<input type="hidden" name="pg" value="<?=$page?>" />
<table cellspacing="0" cellpadding="0" class="fcmd"><tr>
<td><?
if ($f['user_post'] || $f['mod'])
echo "<a href='?cmd=n&f=".urlencode($fid)."' ".tooltip('Click here to go to the new topic form and post a new topic').">New topic</a>";
else
echo "Only moderators can create topics";
?></td>
<td>
Display <span <?=tooltip('Use this drop down list to choose the number of topics to display on each page')?>><select name="tpp" onChange="form.submit()"><?
for ($i=1;$i<6;$i++)
{
echo "<option value='" . ($i * 10) . "'";
if ($i*10 == $tPPage)
echo " selected='selected'";
echo ">" . ($i*10) . "</option>";
}
?></select></span> topics per page
</td>
<td <?=tooltip('Use this drop down list to choose the page of topics to display')?>>Page <?
if ($nPages <= 1)
echo "1 / 1";
else
{
echo "<select name='pg' onChange='form.submit()'>";
for ($i=0;$i<$nPages;$i++)
echo "<option value='$i'" . ($page == $i ? " selected='selected'" : "") . ">" . ($i+1) . "</option>";
echo "</select> / $nPages";
}
?></td>
</tr></table>
<table cellspacing="0" cellpadding="0" class="ftop">
<?
if ($f['topics'] == 0)
echo "<tr><td class='fem'>This forum is empty.</tr></td>\n";
else
{
echo "<tr><th class='tpic'>&nbsp;</th>";
if ($mod)
echo "<th class='tpic'>&nbsp;</th>";
echo "<th class='tnm'>Topic</th><th class='trp'>Replies</th>";
echo "<th class='tps'>First Post</th><th class='tps'>Last Post</th></tr>\n";
$topics = $args['topics'];
for ($i=0;$i<count($topics);$i++)
{
echo "<tr>";
if ($mod)
echo "<td class='tpic'><input " . tooltip('Use this checkbox to select this topic') . " type='checkbox' id='msel$i' name='msel[]' value='" . $topics[$i]['id'] . "' /></td>";
$pic = config::$main['staticurl'] . "/beta5/pics/" . ($topics[$i]['read'] ? '' : 'un') . 'read';
if ($topics[$i]['sticky'])
$pic .= '_sticky';
$pic .= '.gif';
$text = ($topics[$i]['read'] ? 'Read' : 'Unread') . ($topics[$i]['sticky'] ? " sticky" : "") . " topic";
echo "<td class='tpic'><img src='$pic' alt='$text' /></td>";
echo "<td class='tnm'><a href='?cmd=".urlencode("T#".$f['ctype']."#".$topics[$i]['id'])."' " . tooltip('Click here to diplay the posts in this topic') . ">";
// FIXME: poll icon
echo utf8entities($topics[$i]['title']) . "</a></td>";
echo "<td class='trp'>" . $topics[$i]['posts'] . "</td>";
echo "<td class='tps'>" . gmstrftime('%H:%M:%S on %d/%m/%Y', $topics[$i]['moment']) . " by ";
if ($topics[$i]['author_id'] != '')
echo "<a href='message?a=c&ct=0&id=".$topics[$i]['author_id']."' ". tooltip('Click here to send a message to the author of this topic') . " >".utf8entities($topics[$i]['author'])."</a>";
else
echo "<b>".utf8entities($topics[$i]['author'])."</b>";
echo "</td><td class='tps'>" . gmstrftime('%H:%M:%S on %d/%m/%Y', $topics[$i]['last_moment']) . " by ";
if ($topics[$i]['last_author_id'] != '')
echo "<a href='message?a=c&ct=0&id=".$topics[$i]['last_author_id']."' ". tooltip('Click here to send a message to author of the last post in this topic') . " >".utf8entities($topics[$i]['last_author'])."</a>";
else
echo "<b>".utf8entities($topics[$i]['last_author'])."</b>";
echo "</td></tr>";
}
}
?>
</table>
<?
if ($mod && count($topics))
{
?>
<table cellspacing="0" cellpadding="0" class="fcmd"><tr>
<td>
<input <?=tooltip('Click here to delete the selected topics')?> type="submit" name="dt" value="Delete" onClick="return confirmDelete()" />
<input <?=tooltip('Click here to go to switch sticky status on the selected topics')?> type="submit" name="st" value="Switch sticky" onClick="return confirmSticky()" />
</td>
<td>
<?
$mf = array();
foreach ($args['cats'] as $cid => $cat) {
if ($cat['type'] == 'A' && $f['ctype'] != 'A' || $cat['type'] != 'A' && $f['ctype'] == 'A')
continue;
foreach ($cat['forums'] as $cf)
if ($cf['id'] != $f['id'] && $cf['mod'])
array_push($mf, $cf);
}
if (!count($mf))
echo "&nbsp;";
else
{
echo "<input type='submit' " . tooltip('Click here to move the selected topics to the chosen forum') . " name='mt' value='Move' onClick='return confirmMove()' /> to forum ";
echo"<span " . tooltip('use this drop down list to choose the forum to which to move the selected topics') . " ><select name='mdest' id='mdest'><option value=''>---------</option>";
foreach ($mf as $cf)
echo "<option value='" . $cf['id'] . "'>" . utf8entities($cf['title']) . "</option>";
echo "</select></span>";
}
?></td>
</tr></table>
<?
}
?>
</form>
</td>
</tr>
</table>

View file

@ -0,0 +1,11 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('', $args); ?>
</td>
<td>
<h1>Permission Denied</h1>
<p>You are not allowed to post in this forum; only its moderators can do so.</p>
</td>
</tr>
</table>

View file

@ -0,0 +1,11 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('', $args); ?>
</td>
<td>
<h1>Forum Not Found</h1>
<p>The forum you wish to browse no longer exists.</p>
</td>
</tr>
</table>

View file

@ -0,0 +1,98 @@
<?
if ($args['cat'] == '')
{
$mode = 'l';
$title = 'Latest Messages in All Forums';
}
else
{
$mode = 'L#' . $args['cat'];
$title = $args['cats'][$args['cat']]['title'] . ": Latest Messages";
}
list($mPPage,$page) = $args['details'];
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu($mode, $args['cats']); ?>
</td>
<td>
<h1><?=utf8entities($title)?></h1>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='<?=$mode?>' />
<input type='hidden' name='pg' value='<?=$page?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td><?=($page > 0) ? ("<a href='?cmd=".urlencode($mode)."&pg=".($page - 1)."' ".tooltip('Click here to go to the previous page of the latest messages in this forums category'). " >") : ""?>&lt;- Previous page<?=($page > 0) ? "</a>" : ""?></td>
<td>Display <span <?=tooltip('Use this drop down list to choose the number of messages to diplay on each page')?> ><select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> posts per page</td>
<td><?=(count($args['posts'])==$mPPage+1)?("<a href='?cmd=".urlencode($mode)."&pg=".($page+1)."' ".tooltip('Click here to go to the next page of the latest messages in this forums category'). " >"):""?>Next page -&gt;<?=(count($args['posts'])==$mPPage+1)?"</a>":""?></td>
</tr>
</table>
</form>
<?
$p = $args['posts'];
$nbp = min($mPPage,count($p));
if ($nbp == 0)
echo "<center><b>No posts were found.</b></center>";
else
{
for ($i=0;$i<$nbp;$i++)
{
echo "<table cellspacing='0' cellpadding='0' class='ftp'>";
echo "<tr><th class='pfor'>";
if ($args['cat'] == '')
echo utf8entities($p[$i]['cname'] . " > ");
echo utf8entities($p[$i]['fname']) . "</th>";
echo "<td class='cmd' rowspan='3'><a href='?cmd=".urlencode("F#".$p[$i]['rctype']."#".$p[$i]['fid'])."'".tooltip('Click here to go to the main page of the forum in which this message was posted'). " >View forum</a><br/>";
echo "<a href='?cmd=".urlencode("T#".$p[$i]['rctype']."#".$p[$i]['tid'])."'".tooltip('Click here to go to go to the page of the topic in which this message was posed'). " >View topic</a><br/>";
echo "<a href='?cmd=".urlencode("R#".$p[$i]['rctype']."#".$p[$i]['id'])."&q=0'".tooltip('Click here to go to the compose form and reply to this message'). " >Reply</a> - ";
echo "<a href='?cmd=".urlencode("R#".$p[$i]['rctype']."#".$p[$i]['id'])."&q=1'".tooltip('Click here to go to the compose form and reply to this message by quoting it'). " >Quote</a>\n";
echo "</td></tr>\n";
echo "<tr><th>" . utf8entities($p[$i]['title']) . "</th></tr>\n";
echo "<tr><td>Posted <b>" . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['moment']);
echo "</b> by ".(is_null($p[$i]['pid'])?'<b>':('<a href="message?a=c&ct=0&id='.$p[$i]['pid'].'"'.tooltip('Click here to go to the compose form and send a private message to the author of this post'). ' >'));
echo $p[$i]['author'].(is_null($p[$i]['pid'])?'</b>':'</a>')."</td>";
echo "</tr>\n";
echo "<tr><td colspan='2'>" . $p[$i]["contents"] . "</td></tr>\n";
if ($p[$i]['edited'] != 0)
{
echo "<tr><td class='edit' colspan='2'>Edited by ";
echo (is_null($p[$i]['edit_id']) ? '<b>' : ('<a href="message?a=c&ct=0&id='.$p[$i]['edit_id'].'"'.tooltip('Click here to go to the compose form and send a private message to the player who last edited this post'). ' >')) . utf8entities($p[$i]['edited_by']);
echo (is_null($p[$i]['edit_id']) ? '</b>' : '</a>'). " at " . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['edited']) . "</td></tr>";
}
echo "</table>\n";
}
?>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='<?=$mode?>' />
<input type='hidden' name='pg' value='<?=$page?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td><?=($page > 0) ? ("<a href='?cmd=".urlencode($mode)."&pg=".($page - 1)."'".tooltip('Click here to go to the previous page of the latest messages in this forums category'). ">") : ""?>&lt;- Previous page<?=($page > 0) ? "</a>" : ""?></td>
<td>Display <span <?=tooltip('Use this drop down list to choose the number of messages to diplay on each page')?> ><select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> posts per page</td>
<td><?=(count($args['posts'])==$mPPage+1)?("<a href='?cmd=".urlencode($mode)."&pg=".($page+1)."'".tooltip('Click here to go to the next page of the latest messages in this forums category'). " >"):""?>Next page -&gt;<?=(count($args['posts'])==$mPPage+1)?"</a>":""?></td>
</tr>
</table>
</form>
<?
}
?>
</td>
</tr>
</table>

View file

@ -0,0 +1,61 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('o', $args); ?>
</td>
<td>
<h1>Forums Overview</h1>
<?
foreach ($args as $cid => $cat)
{
echo "<table cellspacing='0' cellpadding='0' class='fcat'>\n";
echo "<tr class='hdr'><th class='hdr'><a href='?cmd=".urlencode("C#$cid")."'" . tooltip('Click here to go to the main page of this forum category') . ">";
echo utf8entities($cat['title']) . "</a></th><td class='ctype'>(" . ($cat['type'] == "A" ? "alliance" : "general") . ")</td></tr>\n";
echo "<tr><td colspan='2'>";
if ($cat['desc'] != "")
echo "<p>" . preg_replace('/\n/', '<br/>', utf8entities($cat['desc'])) . "</p>\n";
else
echo "&nbsp;";
echo "</td></tr>\n";
if (count($cat['forums']))
{
echo "<tr><td colspan='2'><table cellspacing='0' cellpadding='0' class='fcf'>\n";
echo "<tr><td class='fst'>&nbsp;</td><th class='fnm'>Forum name</th>";
echo "<th class='fnt'>Topics</th><th class='fnp'>Posts</th><th class='flp'>Last post</th></tr>\n";
for ($i=0;$i<count($cat['forums']);$i++)
{
$pic = config::$main['staticurl'] . "/beta5/pics/" . ($cat['forums'][$i]['unread'] > 0 ? 'un' : '') . 'read.gif';
echo "<tr><td class='fst' rowspan='2'><img src='$pic' alt='FIXME' /></td>";
echo "<td class='fnm'><a href='?cmd=".urlencode("F#".$cat['type']."#".$cat['forums'][$i]['id'])."'" . tooltip('Click here to go to the main page of this forum') . ">";
echo utf8entities($cat['forums'][$i]['title']) . "</a></td>";
echo "<td class='fnt' rowspan='2'>" . $cat['forums'][$i]['topics'] . "</td>";
echo "<td class='fnp' rowspan='2'>" . $cat['forums'][$i]['posts'] . "</td>";
echo "<td class='flp' rowspan='2'>&nbsp;";
$l = $cat['forums'][$i]['last'];
if (is_null($l))
echo "No Posts";
else
{
echo "Last post by <b>" . utf8entities($l['author']) . "</b><br/>";
echo preg_replace('/ /', '&nbsp;', gmstrftime("%H:%M:%S on %d/%m/%Y", $l['moment']));
}
echo "</td>";
echo "</tr>\n<tr><td><p>";
if ($cat['forums'][$i]['description'] != '')
echo preg_replace('/\n/', '<br/>', utf8entities($cat['forums'][$i]['description']));
else
echo "&nbsp;";
echo "</p></td></tr>\n";
}
echo "</table></td></tr>";
}
echo "</table>\n";
}
?>
</td>
</tr>
</table>

View file

@ -0,0 +1,118 @@
<?
$f = $args['forum'];
if ($args['cmd'] == 'n')
$title = utf8entities($f['title'])." - New Topic";
else if (substr($args['cmd'],0,2) == 'R#')
$title = "Reply to '" . utf8entities($args['posts'][0]['title']) . "'";
else if (substr($args['cmd'],0,2) == 'E#')
$title = "Editing '" . utf8entities($args['post']['title']) . "'";
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('F#'.$args['cfid'], $args['cats']); ?>
</td>
<td>
<h2><?=$title?></h2>
<form action="?#box" method='post'>
<input type='hidden' name='cmd' value='<?=$args['cmd']?>' />
<input type='hidden' name='f' value='F#<?=$args['cfid']?>' />
<input type='hidden' name='ref' value='<?=$args['ref']?>' />
<input type='hidden' name='uid' value='<?=$args['uid']?>' />
<a name='box'></a>
<table cellspacing="0" cellpadding="0" class="fpost">
<tr><td colspan='3'>&nbsp;</td></tr>
<?
$errs = array('Subject is too short.', 'Subject is too long.', 'Contents are too short.', 'Contents are too long.');
if ($args['err'])
echo "<tr><td>&nbsp;</td><th class='err'>" . $errs[$args['err']-1] . "</th><td>&nbsp;</td></tr>";
?>
<tr>
<th><label for="sub" accesskey="s"><?=$args['cmd'] == 'n' ? "Topic title" : "Subject"?>:</label></th>
<td colspan="2"><input <?=tooltip('Use this text field to type in or modify the subject of your post')?> type='text' id="sub" name='sub' value="<?=utf8entities($args['sub'], ENT_QUOTES)?>" maxlength="100" size='60' /></td>
</tr>
<tr>
<th><label for="txt" accesskey="t">Text:</label></th>
<td <?=tooltip('Use this text area to type in or modify your message')?> ><textarea name='txt' id="txt" cols='60' rows='15'><?=utf8entities($args['txt'])?></textarea></td>
<td id="jszone">&nbsp;</td>
</tr>
<tr>
<th>Options:</th>
<td colspan="2">
<input <?=tooltip('Use this checkbox to enable / disable graphical smileys')?> type='checkbox' name='sm' id="esm" value='1'<?=$args['sm']?" checked='checked'":""?> /> <label for="esm" accesskey="e">Enable graphical smileys</label>
<input <?=tooltip('Use this checkbox to enable / disable forum tags')?> type='checkbox' name='fc' id="efc" value='1'<?=$args['fc']?" checked='checked'":""?> /> <label for="efc" accesskey="f">Enable forum tags</label>
</td>
</tr>
<?
if ($args['sst'])
{
?>
<tr>
<th>Sticky topic:</th>
<td colspan="2">
<input <?=tooltip('Use this checkbox to change the sticky status of the post')?> type='checkbox' name='st' id="est" value='1'<?=$args['st']?" checked='checked'":""?> /> <label for="est" accesskey="y">Enable sticky topic</label>
</td>
</tr>
<?
}
?>
<tr><td colspan='3'>&nbsp;</td></tr>
<tr><td>&nbsp;</td><td colspan='2' class='butt'>
<input <?=tooltip('Click here to post your message')?> type='submit' name='e' value='Submit' accesskey="g" />
<input <?=tooltip('Click here to preview your message as it will be displayed in the forums')?> type='submit' name='p' value='Preview' accesskey="p" />
<input <?=tooltip('Click here to cancel your changes and go back to the previous page')?> type='submit' name='c' value='Cancel' accesskey="c" />
</td></tr>
<?php
if ($args['prev'] != "")
{
echo " <tr><td rowspan='3'>&nbsp;</td><td>&nbsp;</td><td rowspan='3'>&nbsp;</td></tr>\n";
echo " <tr><th class='hdprev'>Preview - " . utf8entities($args['sub']) . "</th></tr>\n";
echo " <tr><td class='prev'>" . $args['prev'] . "</td></tr>\n";
}
if (is_array($args['posts']))
{
echo " <tr><td rowspan='3'>&nbsp;</td><td>&nbsp;</td><td rowspan='3'>&nbsp;</td></tr>\n";
echo " <tr><th class='hdprev'>Replying to ...</th></tr>\n";
echo " <tr><td>";
$p = $args['posts'];
for ($i=0;$i<count($p);$i++)
{
echo "<table cellspacing='0' cellpadding='0' class='ftp'>";
echo "<tr><th>" . utf8entities($p[$i]['title']) . "</td></tr>\n";
echo "<tr><td>Posted <b>" . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['moment']);
echo "</b> by <b>".$p[$i]['author']."</b></td>";
echo "</td></tr>\n";
echo "<tr><td>" . $p[$i]["html"] . "</td></tr>\n";
echo "</table>\n";
}
echo "</td></tr>\n";
}
else if (is_array($args['post']))
{
echo " <tr><td rowspan='3'>&nbsp;</td><td>&nbsp;</td><td rowspan='3'>&nbsp;</td></tr>\n";
echo " <tr><th class='hdprev'>Original post</th></tr>\n";
echo " <tr><td>";
$p = $args['post'];
echo "<table cellspacing='0' cellpadding='0' class='ftp'>";
echo "<tr><th>" . utf8entities($p['title']) . "</td></tr>\n";
echo "<tr><td>Posted <b>" . gmstrftime("%H:%M:%S on %d/%m/%Y", $p['moment']);
echo "</b> by <b>".$p['author']."</b></td>";
echo "</td></tr>\n";
echo "<tr><td>" . $p["html"] . "</td></tr>\n";
echo "</table>\n";
echo "</td></tr>\n";
}
?>
</table>
</form>
</td>
</tr>
</table>

View file

@ -0,0 +1,11 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('', $args); ?>
</td>
<td>
<h1>Post Not Found</h1>
<p>The post you wish to edit no longer exists.</p>
</td>
</tr>
</table>

View file

@ -0,0 +1,76 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('s', $args['cats']); ?>
</td>
<td>
<h1>Search the Forums</h1>
<form action="?" method="post">
<input type="hidden" name="cmd" value="s" />
<table cellspacing="0" cellpadding="0" class="fsrc">
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<th>Text:</th>
<td><input <?=tooltip('Use this text field to type in the string you wish to search for in the forums')?> type="text" name="stxt" value="<?=utf8entities($args['sparm']['text'], ENT_QUOTES)?>" size='40' /></td>
</tr>
<tr><td>&nbsp;</td><td>Note: use the '*' character for partial matches</td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<th>Search in:</th>
<td>
<input <?=tooltip('Use this radio button to search in post titles only')?> type="radio" name="sin" value="0"<?=$args['sparm']['whole']?'':' checked="checked"'?> id="sin0" /> <label for="sin0">Post titles</label>
<input <?=tooltip('Use this radio button to search in whole posts')?> type="radio" name="sin" value="1"<?=$args['sparm']['whole']?' checked="checked"':''?> id="sin1" /> <label for="sin1">Whole posts</label>
</td>
</tr>
<tr>
<th>Forum:</th>
<td <?=tooltip('Use this drop down list to select in which forums to search')?> ><select name="sif"><option value="">All Available Forums</option><?
foreach ($args['cats'] as $cid => $cat)
{
$ctype = $cat['type'] . "#";
foreach ($cat['forums'] as $f)
{
$id = $ctype . $f['id'];
echo "<option value='$id'" . ($args['sparm']['fid']==$id ? " selected='selected'" : "") . ">";
echo utf8entities($cat['title'] . " - " . $f['title']) . "</option>";
}
}
?></select></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<th>Sort by:</th>
<td <?=tooltip('Use this drop down list to select a sort criteria for the retrieved posts')?> ><select name="sst">
<?php
$st = array('Post Time', 'Post Title');
for ($i=0;$i<count($st);$i++)
echo "<option value='$i'" . ($args['sparm']['stype'] == $i ? " selected='selected'" : "") . ">" . $st[$i] . "</option>";
?>
</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input <?=tooltip('Use this radio button to use an ascending ordering of the retrieved posts')?> type="radio" name="sor" value="0"<?=$args['sparm']['sord']?'':' checked="checked"'?> id="sor0" /> <label for="sor0">Ascending</label>
<input <?=tooltip('Use this radio button to use a descending ordering of the retrieved posts')?> type="radio" name="sor" value="1"<?=$args['sparm']['sord']?' checked="checked"':''?> id="sor1" /> <label for="sor1">Descending</label>
</td>
</tr>
<tr>
<th>Display results:</th>
<td>
<input <?=tooltip('Use this radio button to display whole posts')?> type="radio" name="srp" value="0"<?=$args['sparm']['resd']?'':' checked="checked"'?> id="srp0" /> <label for="srp0">As posts</label>
<input <?=tooltip('Use this radio button to display only the topics of the retrieved posts')?> type="radio" name="srp" value="1"<?=$args['sparm']['resd']?' checked="checked"':''?> id="srp1" /> <label for="srp1">As topics</label>
</td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<tr><td>&nbsp;</td><td><input <?=tooltip('Click here to launch the search')?> type="submit" name="s" value="Search" /></td>
</tr>
</table>
</form>
</td>
</tr>
</table>

View file

@ -0,0 +1,86 @@
<?
$mPPage = $args['sparm']['perpage'];
$page = $args['sparm']['page'];
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('s', $args['cats']); ?>
</td>
<td>
<h1>Search results</h1>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='s' />
<input type='hidden' name='pg' value='<?=$page?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td><?=($page > 0) ? ("<a href='?cmd=s&pg=".($page - 1)."' " .tooltip('Click here to go to the previous page of retrieved posts') . " >") : ""?>&lt;- Previous page<?=($page > 0) ? "</a>" : ""?></td>
<td>Display <span <?=tooltip('Use this drop down list to select the number of posts to display on each page')?>><select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> posts per page</td>
<td><?=(count($args['posts'])==$mPPage+1)?("<a href='?cmd=s&pg=".($page+1)."' " .tooltip('Click here to go to the next page of retrieved posts') . " >"):""?>Next page -&gt;<?=(count($args['posts'])==$mPPage+1)?"</a>":""?></td>
</tr>
</table>
</form>
<?
$p = $args['posts'];
$nbp = min($mPPage,count($p));
if ($nbp == 0)
echo "<center><b>No posts were found.</b></center>";
else
{
for ($i=0;$i<$nbp;$i++)
{
echo "<table cellspacing='0' cellpadding='0' class='ftp'>";
echo "<tr><th class='pfor'>" . utf8entities($p[$i]['cname'] . " > " . $p[$i]['fname']) . "</th>";
echo "<td class='cmd' rowspan='3'><a href='?cmd=".urlencode("F#".$p[$i]['rctype']."#".$p[$i]['fid'])."' " .tooltip('Click here to go to the main page of the forum in which that message was posted') . " >View forum</a><br/>";
echo "<a href='?cmd=".urlencode("T#".$p[$i]['rctype']."#".$p[$i]['tid'])."' " .tooltip('Click here to go to the page of the topic in which that message was posted') . " >View topic</a><br/>";
echo "<a href='?cmd=".urlencode("R#".$p[$i]['rctype']."#".$p[$i]['id'])."&q=0' " .tooltip('Click here to go to the compose form and reply to this post') . " >Reply</a> - ";
echo "<a href='?cmd=".urlencode("R#".$p[$i]['rctype']."#".$p[$i]['id'])."&q=1' " .tooltip('Click here to go to the compose form and reply to this post with included quotations') . " >Quote</a>\n";
echo "</td></tr>\n";
echo "<tr><th>" . utf8entities($p[$i]['title']) . "</td></tr>\n";
echo "<tr><td>Posted <b>" . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['moment']);
echo "</b> by ".(is_null($p[$i]['pid'])?'<b>':('<a href="message?a=c&ct=0&id='.$p[$i]['pid'].'" ' .tooltip('Click here to go to the compose form and send a private message to the author of this post') . ' >'));
echo $p[$i]['author'].(is_null($p[$i]['pid'])?'</b>':'</a>')."</td>";
echo "</td></tr>\n";
echo "<tr><td colspan='2'>" . $p[$i]["contents"] . "</td></tr>\n";
if ($p[$i]['edited'] != 0)
{
echo "<tr><td class='edit' colspan='2'>Edited by ";
echo (is_null($p[$i]['edit_id']) ? '<b>' : ('<a href="message?a=c&ct=0&id='.$p[$i]['edit_id'].'"' .tooltip('Click here to go to the compose form and send a private message to the author of this post') . ' >')) . utf8entities($p[$i]['edited_by']);
echo (is_null($p[$i]['edit_id']) ? '</b>' : '</a>'). " at " . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['edited']) . "</td></tr>";
}
echo "</table>\n";
}
?>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='s' />
<input type='hidden' name='pg' value='<?=$page?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td><?=($page > 0) ? ("<a href='?cmd=s&pg=".($page - 1)."'" .tooltip('Click here to go to the previous page of retrieved posts') . " >") : ""?>&lt;- Previous page<?=($page > 0) ? "</a>" : ""?></td>
<td>Display <span <?=tooltip('Use this drop down list to select the number of posts to display on each page')?><select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> posts per page</td>
<td><?=(count($args['posts'])==$mPPage+1)?("<a href='?cmd=s&pg=".($page+1)."'" .tooltip('Click here to go to the next page of retrieved posts') . " >"):""?>Next page -&gt;<?=(count($args['posts'])==$mPPage+1)?"</a>":""?></td>
</tr>
</table>
</form>
<?
}
?>
</td>
</tr>
</table>

View file

@ -0,0 +1,92 @@
<?
$mPPage = $args['sparm']['perpage'];
$page = $args['sparm']['page'];
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('s', $args['cats']); ?>
</td>
<td>
<h1>Search results</h1>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='s' />
<input type='hidden' name='pg' value='<?=$page?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td><?=($page > 0) ? ("<a href='?cmd=s&pg=".($page - 1)."' " .tooltip('Click here to go to the previous page of retrieved topics') . " >") : ""?>&lt;- Previous page<?=($page > 0) ? "</a>" : ""?></td>
<td>Display<span <?=tooltip('Use this drop down list to select the number of topics to display on each page')?>> <select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> topics per page</td>
<td><?=(count($args['topics'])==$mPPage+1)?("<a href='?cmd=s&pg=".($page+1)."' " .tooltip('Clickhere to go to the next page of retrieved topics') . " >"):""?>Next page -&gt;<?=(count($args['topics'])==$mPPage+1)?"</a>":""?></td>
</tr>
</table>
</form>
<?
$p = $args['topics'];
$nbp = min($mPPage,count($p));
if ($nbp == 0)
echo "<center><b>No posts were found.</b></center>";
else
{
echo '<table cellspacing="0" cellpadding="0" class="ftop">';
echo "<tr><th class='tpic'>&nbsp;</th>";
echo "<th class='tnm'>Topic</th><th class='trp'>Replies</th>";
echo "<th class='tps'>First Post</th><th class='tps'>Last Post</th></tr>\n";
for ($i=0;$i<count($p);$i++)
{
echo "<tr>";
$pic = config::$main['staticurl'] . "/beta5/pics/" . ($p[$i]['read'] ? '' : 'un') . 'read';
if ($p[$i]['sticky']) {
$pic .= '_sticky';
}
$pic .= '.gif';
$text = ($p[$i]['read'] ? 'Read' : 'Unread') . ($p[$i]['sticky'] ? " sticky" : "") . " topic";
$id = $p[$i]['rctype'] . "#" . $p[$i]['id'];
echo "<td class='tpic'><img src='$pic' alt='$text' /></td>";
echo "<td class='tnm'><a href='?cmd=".urlencode("T#$id")."' " .tooltip('Click here to go to the page of the topic containing the search string') . " >";
// FIXME: poll icon
echo utf8entities($p[$i]['title']) . "</a><br/>Forum: ";
echo "<a href='?cmd=".urlencode("C#".$p[$i]['rctype']."#".$p[$i]['catid']) . "' " .tooltip('Click here to go to main page of the category of forums in which the post containing the search string was posted') . " >" . utf8entities($p[$i]['catname']) . "</a> &gt; ";
echo "<a href='?cmd=".urlencode("F#".$p[$i]['rctype']."#".$p[$i]['fid']) . "' " .tooltip('Click here to go to main page of the forum in which the post containing the search string was posted') . " >" . utf8entities($p[$i]['fname']) . "</a></td>";
echo "<td class='trp'>" . ($p[$i]['nitems'] - 1) . "</td>";
echo "<td class='tps'>" . gmstrftime('%H:%M:%S on %d/%m/%Y', $p[$i]['moment']) . " by ";
if ($p[$i]['author_id'] != '')
echo "<a href='message?a=c&ct=0&id=".$p[$i]['author_id']."' " .tooltip('Click here to go to compose page and send a private message to the author of the first post ') . " >".utf8entities($p[$i]['author'])."</a>";
else
echo "<b>".utf8entities($p[$i]['author'])."</b>";
echo "</td><td class='tps'>" . gmstrftime('%H:%M:%S on %d/%m/%Y', $p[$i]['last_moment']) . " by ";
if ($p[$i]['last_author_id'] != '')
echo "<a href='message?a=c&ct=0&id=".$p[$i]['last_author_id']."' " .tooltip('Click here to go to compose page and send a private message to the author of the last post ') . " >".utf8entities($p[$i]['last_author'])."</a>";
else
echo "<b>".utf8entities($p[$i]['last_author'])."</b>";
echo "</td></tr>";
}
?>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='s' />
<input type='hidden' name='pg' value='<?=$page?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td><?=($page > 0) ? ("<a href='?cmd=s&pg=".($page - 1) . "' " .tooltip('Click here to go to the previous page of retrieved topics') . "> ") : ""?>&lt;- Previous page<?=($page > 0) ? "</a>" : ""?></td>
<td>Display <span <?=tooltip('Use this drop down list to select the number of topics to display on each page')?>><select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> topics per page</td>
<td><?=(count($args['topics'])==$mPPage+1)?("<a href='?cmd=s&pg=".($page+1)."' " .tooltip('Clickhere to go to the next page of retrieved topics') . " >"):""?>Next page -&gt;<?=(count($args['topics'])==$mPPage+1)?"</a>":""?></td>
</tr>
</table>
</form>
<?
}
?>
</td>
</tr>
</table>

View file

@ -0,0 +1,102 @@
<?
$f = $args['forum'];
$t = $args['topic'];
$fid = 'F#'.$f['ctype']."#".$f['id'];
list($mPPage,$page,$nPages,$threaded,$reverse) = $args['details'];
?>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu($fid, $args['cats']); ?>
</td>
<td>
<h1><?=utf8entities($t['title'])?></h1>
<form method='post' action='?'>
<input type='hidden' name='cmd' value='T#<?=$f['ctype'].'#'.$t['id']?>' />
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td>Display <span <?=tooltip('Use this drop down list to select the number of posts to display on each page')?>><select name='mpp' onChange="submit();"><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$mPPage?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></span> posts per page</td>
<td><?php
if ($nPages > 1)
{
echo "Page <span" .tooltip('Use this drop down list to select the page of posts to display') . "><select name='pg' onChange='submit();'>";
for ($i=0;$i<$nPages;$i++)
echo "<option" . ($i==$page?" selected='selected'":"") . ">".($i+1)."</option>";
echo "</select></span> / " . $nPages;
}
else
echo "Page 1 / 1";
?></td>
</tr>
</table>
<?
$p = $args['posts'];
for ($i=0;$i<count($p);$i++)
{
$d = min($p[$i]['depth'], 20);
if ($d)
echo "<table cellspacing='0' cellpadding='0'><tr><td class='ftd$d'>&nbsp;</td><td>\n";
echo "<table cellspacing='0' cellpadding='0' class='ftp'>";
echo "<tr><th>" . utf8entities($p[$i]['title']) . "</th>";
echo "<td rowspan='2' class='cmd'>";
echo "<a href='?cmd=".urlencode("R#".$f['ctype']."#".$p[$i]['id'])."&q=0'".tooltip('Click here to go to the compose form and reply to this message'). " >Reply</a> - ";
echo "<a href='?cmd=".urlencode("R#".$f['ctype']."#".$p[$i]['id'])."&q=1'".tooltip('Click here to go to the compose form and reply to this message by quoting it'). " >Quote</a>\n";
if ($f['mod'] || $p[$i]['mine'])
{
echo "<br/>";
echo "<a href='?cmd=".urlencode("E#".$f['ctype']."#".$p[$i]['id'])."'".tooltip('Click here to go to the compose form and make changes to this post'). " >Edit</a>";
if ($p[$i]['id'] != $t['fpid'] || $f['mod'])
{
echo " - <a href='?cmd=".urlencode("D#".$f['ctype']."#".$p[$i]['id'])."'".tooltip('Click here to delete this post'). " onClick='return confirm";
echo ($p[$i]['id'] != $t['fpid']) ? 'DPost' : 'DTopic';
echo "();'>Delete</a>\n";
}
}
echo "</td></tr>";
echo "<tr><td>Posted <b>" . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['moment']);
echo "</b> by ".(is_null($p[$i]['pid'])?'<b>':('<a href="message?a=c&ct=0&id='.$p[$i]['pid'].'"'.tooltip('Click here to go to the compose form and send a private message to the author of this post'). ' >'));
echo $p[$i]['author'].(is_null($p[$i]['pid'])?'</b>':'</a>')."</td>";
echo "</tr>\n";
echo "<tr><td colspan='2'>" . $p[$i]["contents"] . "</td></tr>\n";
if ($p[$i]['edited'] != 0)
{
echo "<tr><td class='edit' colspan='2'>Edited by ";
echo (is_null($p[$i]['edit_id']) ? '<b>' : ('<a href="message?a=c&ct=0&id='.$p[$i]['edit_id'].'" '.tooltip('Click here to go to the compose form and send a private message to the last person who edited this post'). ' >')) . utf8entities($p[$i]['edited_by']);
echo (is_null($p[$i]['edit_id']) ? '</b>' : '</a>'). " at " . gmstrftime("%H:%M:%S on %d/%m/%Y", $p[$i]['edited']) . "</td></tr>";
}
echo "</table>\n";
if ($d)
echo "</td></tr></table>\n";
}
?>
<table cellspacing="0" cellpadding="0" class="fcmd">
<tr>
<td>Display mode: <span <?=tooltip('Use this drop down list to choose the display mode (threaded or linear)')?> ><select name='thr' onChange="submit();">
<option value='0'>Linear</option>
<option value='1'<?=$threaded?" selected='selected'":""?>>Threaded</option>
</select></span></td>
<td>Messages order:<span <?=tooltip('Use this drop down list to choose the messages order (newest or oldest first)')?> > <select name='ord' onChange="submit();">
<option value='0'>Oldest first</option>
<option value='1'<?=$reverse?" selected='selected'":""?>>Newest first</option>
</select></span></td>
</tr>
</table>
</form>
</td>
</tr>
</table>

View file

@ -0,0 +1,11 @@
<table cellspacing="0" cellpadding="0">
<tr>
<td class="mmenu">
<? drawForumsMenu('', $args); ?>
</td>
<td>
<h1>Topic Not Found</h1>
<p>The topic you wish to view no longer exists.</p>
</td>
</tr>
</table>

View file

@ -0,0 +1,14 @@
<table cellspacing="0" cellpadding="0" style="width:97%;margin:0% 0% 0% 1%">
<tr>
<td style="border-style:solid;border-color:white;border-width:0px 1px 0px 0px;width:300px">
<?php
include('manual/en/header.inc');
?>
</td>
<td style="padding:0px 0px 0px 20px">
<?
include("manual/en/" . handler::$h->subPage . ".inc");
?>
</td>
</tr>
</table>

View file

@ -0,0 +1,68 @@
<div style="margin:1px 1px 30px 1px;padding:0;width:100%">
<?php
$manual = handler::$h->lib->call('getStructure', 'en');
$txt = array('Top', 'Up', 'Previous', 'Next');
if (!is_null(handler::$h->page)) {
$pid = handler::$h->page['id'];
$navLinks = handler::$h->lib->call('getNavLinks', $pid);
for ($i=0;$i<4;$i++) {
$t = is_null($navLinks[$i]) ? "" : "<a href='?p={$navLinks[$i]}'>";
$t .= $txt[$i] . (is_null($navLinks[$i]) ? "" : "</a>");
$navLinks[$i] = $t;
}
} else {
$pid = null;
$navLinks = $txt;
}
$size = 15 + prefs::get('main/font_size', 2) * 3;
?>
<form action="?" method="POST">
<table style="width:98%;margin:0% 0% 0% 1%">
<tr>
<td style="width:33%">&nbsp;</td>
<td style="width:34%;text-align:center"><?=$navLinks[0]?></td>
<td style="width:33%">&nbsp;</td>
</tr>
<tr>
<td><?=$navLinks[2]?></td>
<td style="text-align:center"><?=$navLinks[1]?></td>
<td style="text-align:right"><?=$navLinks[3]?></td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr>
<th style="text-align:right"><input type="submit" value="Search:" /></th>
<td colspan='2'><input type="text" name="ss" value="<?=preg_replace('/"/', '&quot;', handler::$h->searchText)?>" style="width:90%" /></td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
<tr><td colspan="3"><h3 style="margin:0;padding:0">Contents</h3></td></tr>
</table>
<div id="manual">
<?
function dumpManualStructure(&$sections, $depth) {
$br = false;
foreach ($sections as $id => $sd) {
if ($br) {
echo "<br/>";
} else {
$br = true;
}
if ($depth > 0) {
echo str_repeat('&nbsp;', $depth * 2);
}
echo " <a href='?p={$sd['name']}'>" . utf8entities($sd['title']) . "</a>";
if (count($sd['subs'])) {
echo "<br/>";
dumpManualStructure($sd['subs'], $depth + 1);
}
}
}
dumpManualStructure($manual, 0);
?>
</div>
</form>
</div>

View file

@ -0,0 +1,5 @@
<h1>Page not found!</h1>
<p>
The page you were looking for could not be found in the manual. Maybe the manual
has been updated in the meantime.
</p>

View file

@ -0,0 +1,108 @@
<?php
function drawContents (&$list) {
$st = input::$IE ? "margin:0px 0px 0px 20px" : "margin:0px 0px 0px -15px";
$kl = array_keys($list);
foreach ($kl as $k) {
echo "<li><a href='#{$list[$k]['name']}'>{$list[$k]['title']}</a>";
if (count($list[$k]['subsections'])) {
echo "<ul style='$st'>";
drawContents($list[$k]['subsections']);
echo "</ul>";
}
echo "</li>";
}
}
function displayLinks($text) {
$l = explode('<mlink ', $text);
$nText = array_shift($l);
while (count($l)) {
$t = preg_replace('/^\s*to=[\'"]/', '', array_shift($l));
$toName = preg_replace('/^([A-Za-z0-9_\-]+)[\'"]>(.*\n)*.*/', '\1', $t);
$toName = preg_replace('/\s/', '', $toName);
$t = preg_replace('/^[A-Za-z0-9_\-]+[\'"]>/', '', $t);
$secId = handler::$h->lib->call('getSectionId', handler::$h->lang, $toName);
$link = "";
if (!is_null($secId)) {
$pageId = handler::$h->lib->call('getPageId', $secId);
if (!is_null($pageId)) {
$lt = handler::$h->lib->call('readSectionRecord', $secId);
if ($pageId == handler::$h->page['id']) {
$link = "<a href='#{$lt['name']}'>";
} else {
$pg = handler::$h->lib->call('readSectionRecord', $pageId);
$link = "<a href='?c=0&p={$pg['name']}#{$lt['name']}'>";
}
}
}
$nText .= $link . preg_replace('/^(.*)<\/mlink>(.*\n)*.*/', '\1', $t) . ($link != '' ? "</a>" : "")
. preg_replace('/^.*<\/mlink>/', '', $t);
}
return $nText;
}
function drawSecTitle(&$section, $depth) {
$pgLink = "";
if ($section['linkto'] != "") {
$pageId = handler::$h->lib->call('getPageId', $section['linkto']);
if (!is_null($pageId)) {
$lt = handler::$h->lib->call('readSectionRecord', $section['linkto']);
if ($pageId == handler::$h->page['id']) {
$pgLink = " (<a href='#{$lt['name']}'>view</a>)";
} else {
$pg = handler::$h->lib->call('readSectionRecord', $pageId);
$pgLink = " (<a href='?c=0&p={$pg['name']}#{$lt['name']}'>view</a>)";
}
}
}
$mDepth = ($depth - 2) * 10;
echo "<table style='width:95%;margin:0;padding:0'><tr><td style='width:85%'><a name='{$section['name']}'></a><h$depth"
. " style='padding:0;margin:5px 0px 5px {$mDepth}px'>{$section['title']}$pgLink</h$depth>"
. "</td><td style='text-align:right'><a href='#" . handler::$h->page['name'] . "'>Top</a></td></tr></table>";
}
function drawSections (&$list, $depth = 2) {
$kl = array_keys($list);
foreach ($kl as $k) {
if ($depth == 2) {
echo "<hr/>";
}
drawSecTitle($list[$k], $depth);
if ($list[$k]['contents'] != '') {
echo "<div class='mansection'>" . displayLinks($list[$k]['contents']) . "</div>";
}
if (count($list[$k]['subsections'])) {
drawSections($list[$k]['subsections'], $depth + 1);
}
}
}
if (is_null(handler::$h->page)) {
include('manual_notfound.en.inc');
return;
}
?>
<a name="<?=handler::$h->page['name']?>"></a>
<h1 style="margin:0;padding:0"><?=handler::$h->page['title']?></h1>
<?
if (count(handler::$h->page['subsections'])) {
$st = input::$IE ? "margin:0px 0px 0px 30px" : "margin:0px 0px 0px -15px";
echo "<div class='mansection'><b>Contents:</b><ul style='$st'>";
drawContents(handler::$h->page['subsections']);
echo "</ul></div>";
drawSections(handler::$h->page['subsections']);
}
?>

View file

@ -0,0 +1,24 @@
<h1>Search results for '<i><?=utf8entities($args['text'])?></i>'</h1>
<?php
if (empty($args['results'])) {
echo "<p>Sorry, no results were found.</p>\n";
} else {
$c = count($args['results']);
echo "<p><b>$c</b> result" . ($c > 1 ? "s were" : " was") . " found:</p>";
echo "<div class='mansection'><ol>";
$error = false;
foreach ($args['results'] as $p) {
$pData = handler::$h->lib->call('readSectionRecord', $p);
if (is_null($pData)) {
$error = true;
continue;
}
echo "<li><a href='?p={$pData['name']}'>{$pData['title']}</a></li>";
}
echo "</ol>";
if ($error) {
echo "<b>Some results could not be displayed because of a database error.</b>";
}
echo "</div>";
}
?>

View file

@ -0,0 +1,3 @@
<div id='gametype' style="visibility: hidden; display:none"><?=(int) input::$game->params['victory']?></div>
<div id='jsmap'>
</div>

View file

@ -0,0 +1,19 @@
<?php
if (is_array($args)) {
?>
<form action="?" method="post" onSubmit="return false;"><table cellspacing='0' cellpadding='0'>
<tr>
<td id='mkppsel'>&nbsp;</td>
<td style="width:5%;vertical-align:top"><a href="manual?p=marketplace">Help</a></td>
</tr>
<tr><td id='mkppage' colspan="2">
&nbsp;
</td></tr>
</table></form>
<div id='mkpfpage' style="display: none; visibility: hidden;"><?=$args['page']?></div>
<div id='mkpinit' style="display: none; visibility: hidden;"><?=$args['pdata']?></div>
<?php
} else {
echo "<center><br/>Your account has been created too recently for you to use this feature.<br/>You must wait for $args more day".($args>1?"s":"").".</center>";
}
?>

View file

@ -0,0 +1,4 @@
<div id='jsmsgflist' style="display: none; visibility: hidden;"><?=$args['flist']?></div>
<div id='jsmsginit' style="display: none; visibility: hidden;"><?=$args['dinit']?></div>
<div id='jsmsg'>
</div>

View file

@ -0,0 +1,30 @@
<table cellspacing='0' cellpadding='0'>
<tr>
<td class='div2'>
<h1>Current Funds</h1>
<p>Your empire has <b id='cfunds'></b>.</p>
</td>
<td rowspan='2' class='pc45'>
<h1>Daily Profits</h1>
<p>
<a href='#pinc' <?=tooltip('Click here to go to the planets profits and loss section of the page')?>>Planet Income:</a> <b id='pinc'></b><br/>
<a href='#fukp' <?=tooltip('Click here to go to fleets upkeep section of the pahe')?>>Fleet Upkeep:</a> <b id='fupk'></b><br/>
<b>Daily Profits: &euro;<span id='dprof'></span></b>
</p>
</td>
<td rowspan="2" style="width:5%;vertical-align:top"><a href="manual?p=money">Help</a></td>
</tr>
<tr>
<td class='div2'>
<div id='transfer'>&nbsp;</div>
</td>
</tr>
<tr><td colspan='3'><hr/></td></tr>
<tr><td colspan='3'><a name='pinc'></a><h1>Planet Profit and Loss</h1></td></tr>
<tr><td colspan='3' id='planets'></td></tr>
<tr><td colspan='3'><hr/></td></tr>
<tr><td colspan='3'><a name='fukp'></a><h1>Fleet Upkeep Expenses</h1></td></tr>
<tr><td colspan='3' id='fleets'></td></tr>
</table>

View file

@ -0,0 +1,6 @@
<h1>Getting a new planet</h1>
<p>
In this specific game, it is just impossible to get a new planet this way.<br/>
You either need to take a planet using your fleets (provided you have any left),
or to get someone to sell you or give you a planet.
</p>

View file

@ -0,0 +1,45 @@
<?php
if ($args === false)
{
?>
<h1>You Evil, Evil Man</h1>
<p>
You already have a planet, or many of these. Now begone!
</p>
<?php
}
elseif ($args['ok'])
{
?>
<h1>New Planet Assigned!</h1>
<p>
Your new planet, <a href='planet?id=<?=$args['id']?>'><?=utf8entities($args['name'])?></a>, has been assigned to your empire!<br/>
<br/>
<a href="planets">View the Planet List</a>
</p>
<?php
}
else
{
echo "<h1>Get a New Planet</h1>";
echo "<form method='post' action='?'><p>";
echo "Please type the name of your new planet in the field below, then click OK to get the planet.<br/><br/>";
if ($args['err'])
{
echo "<span id='plerror'>";
switch ($args['err']) :
case 1: echo "This planet name is too long (maximum 15 characters)"; break;
case 2: echo "This planet name is incorrect (letters, numbers, spaces and _.@-+'/ only)"; break;
case 3: echo "Spaces are not allowed at the beginning or at the end of the planet's name"; break;
case 4: echo "Multiple spaces are not allowed"; break;
case 5: echo "This planet name is too short (minimum 2 characters)"; break;
case 6: echo "A planet by that name already exists"; break;
endswitch;
echo ".</span><br/>";
}
echo "Name of your new planet: <input type='text' name='name' value=\"".utf8entities($args['name'],ENT_QUOTES)."\" size='20' maxlength='15' /> ";
echo "<input type='submit' value='OK' /><br/><br/>";
echo "Please note that getting a new planet will disband all of your fleets and place you under protection from the Peacekeepers.";
echo "</p></form>";
}

View file

@ -0,0 +1,2 @@
<div id='overview'></div>
<div style="display:none;visibility:hidden"><form action="?" onsubmit="return false"><textarea id="init-data"><?=$args?></textarea></form></div>

View file

@ -0,0 +1,18 @@
<table cellspacing='0' cellpadding='0'>
<tr><td colspan='3'><table cellspacing='0' cellpadding='0' class='phdr'><tr>
<td class='pimg' id='pimg'>&nbsp;</td>
<td class='pttl'><h1 id='plname'> </h1><p id="plactions">&nbsp;</p></td>
<td class='psel'><form action='?' method='get'>
<input type='hidden' name='oid' id='oid' value='<?=$args['id']?>' />
Select planet: <span id='psel'></span> -
<a href='planets'>Planet list</a> -
<a href='manual?p=planet'>Help</a>
</form></td>
</tr></table></td></tr>
<tr><td colspan='3'>&nbsp;</td></tr>
<tr><td colspan='div20'>&nbsp;</td><td id='pldesc'>
</td><td colspan='div20'>&nbsp;</tr>
</table>

View file

@ -0,0 +1,5 @@
<h1>Planet not found</h1>
<p>
The planet you are looking for could not be found.<br/>
Insert witty pun here.
</p>

View file

@ -0,0 +1,2 @@
<div id='jsplanets'>
</div>

View file

@ -0,0 +1,201 @@
<?php
function makeOpt($a,$n,$v)
{
$t = "<option value='$v'";
if ($a[$n] == $v)
$t .= " selected='selected'";
$t .= ">";
return $t;
}
?>
<form method='post' action='?'>
<table cellspacing="0" cellpadding="0">
<tr>
<td class="pc5" rowspan="7">&nbsp;</td>
<td class="pc45">
<table class="prefs">
<tr><td class="psec" colspan="2"><h1>Account</h1></td></tr>
<?php
if (!is_null($args['err1']))
echo "<tr><td class='err' colspan='2'>The address you entered is invalid, please correct it.</td></tr>\n";
?>
<tr>
<th class="div2">E-mail address:</th>
<td class="div2"><input type='text' name='mail' <?=tooltip('Use this text field to type in your email address')?> class='txt' value="<?=is_null($args['err1'])?$args['mail']:$args['err1']?>" size="35" maxlength="128" /></td>
</tr>
<tr><td colspan='2'
<?php
if (!is_null($args['err2']))
{
echo " class='err'>";
switch ($args['err2']) :
case 1: echo "A database access error has occured"; break;
case 2: echo "The current password is incorrect"; break;
case 3: echo "The new password and its confirmation are different"; break;
case 4: echo "The new password is too short (minimum 4 characters)"; break;
case 5: echo "The new password is too long (maximum 64 characters)"; break;
case 6: echo "The new password must be different from your user name"; break;
endswitch;
}
else
echo " class='note'>Please leave these fields empty if you do not intend to change your password.";
?></td></tr>
<tr>
<th>Current password:</th>
<td><input type='password' class='txt' name='opass' <?=tooltip('Use this text field to type in your current password')?>/></td>
</tr>
<tr>
<th>New password:</th>
<td><input type='password' class='txt' name='npass' <?=tooltip('Use this text field to type in your new password')?>/></td>
</tr>
<tr>
<th>Confirm new password:</th>
<td><input type='password' class='txt' name='cpass' <?=tooltip('Use this text field to confirm your new password')?>/></td>
</tr>
</table>
</td>
<td class="pc45">
<table class="prefs">
<tr><td class="psec" colspan="2">
<table style="width:100%;padding:0;margin:0"><tr>
<td style="vertical-align:top"><h1>Display</h1></td>
<td style="text-align:right;vertical-align:top"><a href="manual?p=preferences">Help</a></td>
</tr></table>
</td></tr>
<tr>
<th class="div2">Language:</th>
<td class="div2" <?=tooltip('Use this drop down list to choose the language to use')?>><select name='lang' >
<?=makeOpt($args,'lang','en')?>English</option>
</select></td>
</tr><tr>
<th>Font size:</th>
<td <?=tooltip('Use this drop down list to select the font size')?>><select name='fs'>
<?=makeOpt($args,'fs',0)?>tiny</option>
<?=makeOpt($args,'fs',1)?>small</option>
<?=makeOpt($args,'fs',2)?>normal</option>
<?=makeOpt($args,'fs',3)?>big</option>
<?=makeOpt($args,'fs',4)?>huge</option>
</select></td>
</tr><tr>
<th>Tooltips:</th>
<td <?=tooltip('Use this drop down list to set up tooltips delays')?>><select name='tt'>
<?=makeOpt($args,'tt',0)?>Disabled</option>
<?=makeOpt($args,'tt',1)?>0.5 second</option>
<?=makeOpt($args,'tt',2)?>1 second</option>
<?=makeOpt($args,'tt',3)?>1.5 second</option>
<?=makeOpt($args,'tt',4)?>2 seconds</option>
<?=makeOpt($args,'tt',5)?>2.5 seconds</option>
<?=makeOpt($args,'tt',6)?>3 seconds</option>
</select></td>
</tr><tr>
<th>Theme:</th>
<td <?=tooltip('Use this drop down list to choose your interface theme')?>><select name='thm'>
<?=makeOpt($args,'thm','default')?>LegacyWorlds Beta 5</option>
<?=makeOpt($args,'thm','invert')?>Beta 5 Reversed</option>
<?=makeOpt($args,'thm','classic')?>LegacyWorlds Classic</option>
<?=makeOpt($args,'thm','cripes')?>That Other Theme</option>
</select></td>
</tr><tr>
<th>Colour scheme:</th>
<td <?=tooltip('Use this drop down list to choose the colour scheme to use')?>><select name='col'>
<?=makeOpt($args,'col','red')?>red</option>
<?=makeOpt($args,'col','green')?>green</option>
<?=makeOpt($args,'col','blue')?>blue</option>
<?=makeOpt($args,'col','grey')?>grey</option>
<?=makeOpt($args,'col','purple')?>purple</option>
<?=makeOpt($args,'col','yellow')?>yellow</option>
</select></td>
</tr>
</table>
</td>
<td class="pc5" rowspan="7">&nbsp;</td>
</tr>
<tr><td colspan="2"><hr/></td></tr>
<tr><td colspan="2">
<table class="prefs">
<tr><td class="psec" colspan='4'><h1>Forums</h1></td></tr>
<tr>
<th class="div4">Topics/page:</th>
<td class="div4" <?=tooltip('Use this drop down list to choose the number oftopics to display on each forum page')?>><select name='tpp'><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$args['tpp']?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></td>
<th class="div4">Messages/page:</th>
<td class="div4" <?=tooltip('Use this drop down list to choose the number ofmessages to display on each topic page')?>><select name='mpp'><?php
for ($i=1;$i<6;$i++)
echo "<option" . ($i*10==$args['mpp']?" selected='selected'":"") . ">" . ($i*10) . "</option>";
?></select></td>
</tr>
<tr>
<th>Graphical smileys:</th>
<td <?=tooltip('Use this drop down list to enable / disable graphical smileys in the forums')?>><select name='gsm' >
<option value='0'>Disabled</option>
<option value='1'<?=$args['gsm']?" selected='selected'":""?>>Enabled</option>
</td>
<th>Forum tags:</th>
<td <?=tooltip('Use this drop down list to enable / disable forum tags - those are necessary to handle text modifiers')?>><select name='gft'>
<option value='0'>Disabled</option>
<option value='1'<?=$args['gft']?" selected='selected'":""?>>Enabled</option>
</td>
</tr>
<tr>
<th>Display mode:</th>
<td <?=tooltip('Use this drop down list to choose between linear and threaded displays')?>><select name='fdm'>
<option value='0'>Linear</option>
<option value='1'<?=$args['fdm']?" selected='selected'":""?>>Threaded</option>
</td>
<th>Messages order:</th>
<td <?=tooltip('Use this drop down list to choose messager ordering criteria')?>><select name='fmo'>
<option value='0'>Oldest first</option>
<option value='1'<?=$args['fmo']?" selected='selected'":""?>>Newest first</option>
</td>
</tr>
<tr>
<th>Signature:</th>
<td colspan='3' <?=tooltip('Use this text area to type in your signature for your posts in the forums ')?>><textarea name='fsig'><?=utf8entities($args['fsig'])?></textarea></td>
</tr>
</table>
</td></tr>
<tr><td colspan="2"><hr/></td></tr>
<tr><td colspan="2" class='buttons'>
<input type='submit' value='Update preferences' <?=tooltip('Click here to update your preferences')?>/>
<input type='reset' value='Restore previous values' <?=tooltip('Click here to cancel your changes and restore the previous values')?> />
</td></tr>
<?
if ($args['lok']) {
?>
<tr><td colspan="2"><hr/></td></tr>
<tr><td colspan="2">
<h1>Leave Game</h1>
<p>
<?
if (is_null($args['quit']))
{
?>
Click the button bellow to leave this game. Please note that it will not close your account; it will simply quit the current game. You will have 24 hours after you click the button to cancel your action; after that, your planets will be made neutral, your fleets will be destroyed, your private messages erased, etc...<br/><br/>
You will still be able to access the other games you're playing, and you'll be able to start playing any other game from the Account page.<br/><br/><input type='submit'<?=tooltip('Click here to leave this Legacy Worlds Game')?> name='quit' value='Leave <?=$args['name']?>' />
<?
} else {
echo "You have decided to leave {$args['name']}. Your player information will be destroyed in ";
$tl = 86400 + $args['quit'] - time();
$h = ($tl - $tl % 3600) / 3600;
if ($h > 0)
echo "<b>$h</b> hour" . ($h>1 ? 's' : '');
$tl -= $h * 3600;
$m = ($tl - $tl % 60) / 60;
if ($m > 0)
echo ($h != 0 ? ' and ' : '') . "<b>$m</b> minute" . ($m>1 ? 's' : '');
$tl -= $m * 60;
?>
unless you decide to cancel this action by clicking the button below.<br/><br/><input type='submit' name='quit' <?=tooltip('Click here to cancel your request to leave this game')?> value='Do NOT leave <?=$args['name']?>' />
<?
}
}
?>
</p>
</td></tr>
</table>
</form>

View file

@ -0,0 +1,10 @@
<div id='pinit' style="display: none; visibility: hidden;"><?=$args?></div>
<form action="?" onSubmit="return false"><table cellspacing='0' cellpadding='0'>
<tr>
<td id='prmenu' style="width:95%">&nbsp;</td>
<td style="width:5%;vertical-align:top"><a href="manual?p=probes">Help</a></td>
</tr>
<tr><td id='prpage' colspan="2">
&nbsp;
</td></tr>
</table></form>

View file

@ -0,0 +1,10 @@
<table cellspacing='0' cellpadding='0'>
<tr>
<td id='rkpsel' style="width:95%">&nbsp;</td>
<td style="width:5%;vertical-align:top"><a href="manual?p=rankings">Help</a></td>
</tr>
<tr><td id='rkpage' colspan='2'>
&nbsp;
</td></tr>
</table>
<div id='rkinit' style="display: none; visibility: hidden;"><?=$args?></div>

View file

@ -0,0 +1,10 @@
<h1>Fool!</h1>
<p>
Begone!
</p>
<p>
Now!
</p>
<p>
You are not wanted here!
</p>

View file

@ -0,0 +1,9 @@
<table cellspacing='0' cellpadding='0'>
<tr>
<td id='respsel' style="width:95%">&nbsp;</td>
<td style="width:5%;vertical-align:middle"><a href="manual?p=technology">Help</a></td>
</tr>
<tr><td id='respage' colspan="2">
&nbsp;
</td></tr>
</table>

View file

@ -0,0 +1 @@
<div style="display:none;visibility:hidden"><form action="?" onsubmit="return false"><textarea id="init-data"><?=$args?></textarea></form></div><div id="page-contents">&nbsp;</div>

View file

@ -0,0 +1,24 @@
<table>
<tr>
<td style="width:95%">
<?php
$now = time();
$dt = array($now);
foreach ($args as $tid => $td)
{
if (!$td['game'])
continue;
echo "<h1>" . utf8entities($td['name']) . "</h1>";
echo "<p>" . utf8entities($td['description']) . "</p>";
echo "<div id='tick$tid'>&nbsp;</div>";
echo "<p>&nbsp;</p>";
array_push($dt, "$tid#" . $td['first'] . "#" . $td['interval'] . "#" . $td['last']);
}
?>
</td>
<td style="width:5%;vertical-align:top"><a href="manual?p=ticks">Help</a></td>
</tr>
</table>
<div id='tickinit' style="display: none; visibility: hidden;"><?=join('#',$dt)?></div>

View file

@ -0,0 +1,38 @@
<div style="display:none;visibility:hidden"><form action="?" onsubmit="return false"><textarea id="init-data"><?=$args?></textarea></form></div>
<table>
<tr>
<td class="div2">
<h1>Universe Information</h1>
<h2>Galaxy</h2>
<p>
Planets: <b id="npl"> </b><br/>
Neutral planets: <b id="nnpl"> </b><br/>
Systems occupied by nebulas: <b id="nnsys"> </b><br/>
Average turrets/planet: <b id="avgt"> </b><br/>
Average factories/planet: <b id="avgf"> </b>
</p>
<p><a href="map" <?=tooltip('Click here to go to the map page')?>>View maps</a></p>
</td>
<td class="pc45">
<h1>Ticks</h1>
<p>
<span id="ticks">&nbsp;</span>
<br/>
<a href="ticks" <?=tooltip('Click here to go to the ticks page')?>>More details...</a>
</p>
<h1>Rankings</h1>
<p>
You are ranked <b id="genrank"> </b> with <b id="genpts"> </b> points.<br/>
Your financial ranking is <b id="finrank"> </b> (<b id="finpts"> </b> points).<br/>
Your civilization ranking is <b id="civrank"> </b> (<b id="civpts"> </b> points).<br/>
Your military ranking is <b id="milrank"> </b> (<b id="milpts"> </b> points).<br/>
Your inflicted damage ranking is <b id="idrank"> </b> (<b id="idpts"> </b> points).<br/>
<span id="rndrank"> </span><br/>
There are <b id="rknplayers"> </b> players in the rankings.<br/>
<br/>
<a href="rank" <?=tooltip('Click here to go to the rankings page')?>>More details...</a>
</p>
</td>
<td style="width:5%;vertical-align:top"><a href="manual?p=universe_page">Help</a></td>
</tr>
</table>