This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmap.php
54 lines (41 loc) · 1.44 KB
/
map.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
require_once('inc/user.inc.php');
pageStart();
print "<h1>Star Map</h1>\n";
if(isset($print)) {
$map_url = 'img/' . $db_name . '_maps/psm_full.png';
} elseif(isset($find)) {
db("select count(star_id) from ${db_name}_stars");
$max_sect = dbr();
if($find < 1 || $find > $max_sect[0] || !$find) {
$rs = "<p><a href=\"javascript: history.back()\">Back</a>";
print_header("Error");
echo "That system does not exist. Try searching for systems between <b>1</b> and <b>$max_sect[0]</b>.";
print_footer();
exit;
} elseif($allow_search_map == 0) {
print_page('Error', "Admin has turned off search facility.");
} else {
$map_url = "star_find.php?sys1=$user[location]&sys2=" . (int)$find;
}
} else {
$map_url = 'img/' . $db_name . '_maps/sm_full.png';
}
if(isset($print)) {
$link_url = "<a href='map.php'>Normal Map</a> - ";
} else {
$link_url = "<a href='map.php?print=1'>Printable Map</a> - ";
}
if($allow_search_map == 1){
echo "<form action=\"map.php\" method=\"get\"><b>Find system: </b><input type='text' size=4 name='find'> <input type='submit' value='Search'></form><br>";
}
print <<<END
<p><img src="$map_url" alt="Complete map of the known universe" /></p>
END;
if($wormholes == 1){
echo "Key:<br>Wormholes:<br><font color=#FFFF44>Yellow Lines</font> represent One-Way Wormholes.<br><font color=#00FF00>Green Lines</font> Show Two Way Wormholes.<p>";
}
echo $key_text;
echo $link_url;
pageStop('Map of the known universe');
?>