-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgalaxy_map3d.php
executable file
·77 lines (65 loc) · 2.25 KB
/
galaxy_map3d.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
// 3D Galaxy Map
//
// The second line MUST be the name of the command that is to be shown in the command list.
//
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2 of the License, or (at your
// option) any later version.
//
// File: galaxy_map3d.php
include ("config/config.php");
include("languages/$langdir/lang_galaxy3d.inc");
include ("languages/$langdir/lang_galaxy_local.inc");
get_post_ifset("arm, turns");
if (checklogin())
{
$template_object->enable_gzip = 0;
include ("footer.php");
die();
}
$title = $l_g3d_title;
if($playerinfo['template'] == '' or !isset($playerinfo['template'])){
$templatename = $default_template;
}else{
$templatename = $playerinfo['template'];
}
include ("header.php");
if($base_template[basename($_SERVER['PHP_SELF'])] == 1){
include ("globals/base_template_data.inc");
}
else
{
$template_object->assign("title", $title);
$template_object->assign("templatename", $templatename);
}
if($arm == '')
$selected = "selected";
else $selected = "";
$armdropdown = "<option value=\"\" $selected>All</option>\n";
for($i = 0; $i < $spiral_galaxy_arms; $i++){
if($arm == $i and $arm != '')
$selected = "selected";
else $selected = "";
$armdropdown .= "<option value=\"". $i ."\" $selected>". $i ."</option>\n";
}
if($turns != '')
{
$shipspeed = mypw($level_factor, $shipinfo['engines']);
$distance = number($turns * $shipspeed);
}
$template_object->assign("l_submit", $l_submit);
$template_object->assign("l_glxy_turns", $l_glxy_turns);
$template_object->assign("l_glxy_select", $l_glxy_select);
$template_object->assign("distance", $distance);
$template_object->assign("turns", $turns);
$template_object->assign("armdropdown", $armdropdown);
$template_object->assign("spiral_galaxy_arms", $spiral_galaxy_arms);
$template_object->assign("arm", $arm);
$template_object->assign("l_g3d_wait", $l_g3d_wait);
$template_object->assign("shipsector", $shipinfo['sector_id']);
$template_object->assign("gotomain", $l_global_mmenu);
$template_object->display($templatename."galaxy3d.tpl");
include ("footer.php");
?>