[READ-ONLY] Mirror of https://github.com/andrioid/travian.scrolls.org. Retired project. I got a bit overly engaged in an online game called Travian.
2.5 kB
80 lines
1
2<?php
3 foreach ($Servers as $i=>$each_server) {
4 list($tmp_country, $tmp_name) = explode('_', $each_server['name']);
5 $ServerList[] = array(
6 'name' => $tmp_name,
7 'orgname' => $each_server['name'],
8 'dumpfile' => $each_server['dumpfile'],
9 'sid' => $i,
10 'country' => $tmp_country,
11 );
12 }
13 usort($ServerList, "srt_sid");
14?>
15 <?php include("topbanner.php"); ?>
16 <div id="top_bar">
17 <form method="get">
18 <div id="top_section">
19 <?php if (isset($_GET['x']) AND $_GET['x'] == NULL) {
20 ?><div id="focusborder">
21 <?php } else { ?>
22 <div>
23 <?php } ?>
24 <strong>Coordinates</strong><br>
25 X <input class="coord" type=text name="x" value="<?php echo $_GET['x']; ?>">
26 Y <input class="coord" type=text name="y" value="<?php echo $_GET['y']; ?>">
27 </div>
28 </div>
29 <div id="top_section">
30 <strong>Server</strong><br>
31 <select class="server" name="sid">
32 <?php foreach ($ServerList as $i=>$server) {
33 if ($server['sid'] == $sid) {
34 printf("<option id=\"%s\" SELECTED value=\"%d\">%s</option>", $server['country'], $server['sid'], $server['name'].".travian.".$server['country']);
35 $ServerURL = $server['name'].".travian.".$server['country'];
36 } else {
37 printf("<option id=\"%s\" value=\"%d\">%s</option>", $server['country'], $server['sid'], $server['name'].".travian.".$server['country']);
38 }
39 }
40 ?>
41 </select>
42 </div>
43 <div id="top_section">
44 <strong>Speed</strong><br>
45 <input type=text class="coord" name="speed" value="<?php printf("%d", $_GET['speed']); ?>">
46 </div>
47 <div id="top_section">
48 <strong>Tmt. Square</strong><br>
49 <select name="tsq">
50 <?php
51 for ($i = 0; $i<=20; $i++) {
52 if ($i == $_GET['tsq']) {
53 printf("<option SELECTED value=\"%d\">%d</option>", $i, $i);
54 } else {
55 printf("<option value=\"%d\">%d</option>", $i, $i);
56 }
57 }
58 ?>
59 </select>
60 </div>
61 <div id="top_section">
62 <strong>Alliance(s)</strong><br>
63 <input id="textfield" type=text name="a" value="<?php echo $_GET['a']; ?>">
64 </div>
65 <div id="top_section">
66 <strong>Player(s)</strong><br>
67 <input id="textfield" type=text name="p" value="<?php echo $_GET['p']; ?>">
68 </div>
69 <div id="top_section">
70 <strong>Min. v. size</strong><br>
71 <input type=text name="size" class=coord value="<?php printf("%d", $_GET['size']); ?>">
72 </div>
73
74 <div id="top_section">
75 <br>
76 <input id="submit" type=submit>
77 </div>
78 </div><br style="clear: right;">
79 <input type=hidden name="wl" value="<?php echo $_GET['wl']; ?>">
80</form>