1 | <?php |
---|
2 | require_once("common/admin/admin_menu.php"); |
---|
3 | |
---|
4 | $colours =array("ArmyGreen" , |
---|
5 | "CoolGray" , |
---|
6 | "DarkOpaque" , |
---|
7 | "Desert" , |
---|
8 | "Revelations" , |
---|
9 | "RevelationsII" , |
---|
10 | "Silver" , |
---|
11 | "Stealth" , |
---|
12 | "SteelGray" , |
---|
13 | "Trinity" , |
---|
14 | "Gold" , |
---|
15 | "Red" , |
---|
16 | "Blue" , |
---|
17 | "Green" , |
---|
18 | "Yellow" , |
---|
19 | "LightBlue" , |
---|
20 | "Black" ); |
---|
21 | |
---|
22 | $p_styles =array("Windowed" , |
---|
23 | "OldWindow" , |
---|
24 | "Border" , |
---|
25 | "Faded" ); |
---|
26 | |
---|
27 | $s_styles =array("ring" , |
---|
28 | "square" , |
---|
29 | "round" , |
---|
30 | "backglowing" ); |
---|
31 | |
---|
32 | $a_styles =array("solid" , |
---|
33 | "transparent" ); |
---|
34 | |
---|
35 | |
---|
36 | if ($_POST['submit']) |
---|
37 | { |
---|
38 | $data = ",2tag"; |
---|
39 | if($_POST['ftag']) {$data .=",ftag";} |
---|
40 | if($_POST['dtag']) {$data .=",dtag";} |
---|
41 | if($_POST['otag']) {$data .=",otag";} |
---|
42 | if($_POST['2fit']) {$data .=",2fit";} |
---|
43 | if($_POST['ffit']) {$data .=",ffit";} |
---|
44 | if($_POST['dfit']) {$data .=",dfit";} |
---|
45 | if($_POST['ofit']) {$data .=",ofit";} |
---|
46 | config::set('fittingxp_data', $data); |
---|
47 | config::set('fittingxp_colour',$_POST['panel_colour']); |
---|
48 | config::set('fittingxp_style',$_POST['panel_style']); |
---|
49 | if ($_POST['panel_colour'] == 'Black') |
---|
50 | { |
---|
51 | config::set('fittingxp_themedir','panel/black'); |
---|
52 | } |
---|
53 | else |
---|
54 | { |
---|
55 | config::set('fittingxp_themedir','panel'); |
---|
56 | } |
---|
57 | config::set('fittingxp_item_style',$_POST['panel_show_style']); |
---|
58 | config::set('fittingxp_ammo_style',$_POST['panel_ammo_style']); |
---|
59 | if($_POST['lgreen']) |
---|
60 | { |
---|
61 | config::set('fittingxp_dropped_colour','#006000'); |
---|
62 | } |
---|
63 | else |
---|
64 | { |
---|
65 | config::set('fittingxp_dropped_colour','#004000'); |
---|
66 | |
---|
67 | } |
---|
68 | $html .= "Settings Saved"; |
---|
69 | } |
---|
70 | |
---|
71 | $page = new Page("Settings - Fitting XP version 3.5"); |
---|
72 | |
---|
73 | $colour = config::get('fittingxp_colour'); |
---|
74 | $d_colour = config::get('fittingxp_dropped_colour'); |
---|
75 | $style = config::get('fittingxp_style'); |
---|
76 | $i_style = config::get('fittingxp_item_style'); |
---|
77 | $a_style = config::get('fittingxp_ammo_style'); |
---|
78 | $data = config::get('fittingxp_data'); |
---|
79 | $html .= "<div class=block-header2>Ship Details Options</div>"; |
---|
80 | $html .= "<form id=options name=options method=post action=>"; |
---|
81 | $html .= "<table class=kb-table width=\"360\" border=\"0\" cellspacing=\"1\">"; |
---|
82 | $html .= "<tr><td><b>Show Faction Tag:</b></td><td><input type=checkbox name=ftag id=ftag"; |
---|
83 | if (strpos($data,"ftag")) |
---|
84 | { |
---|
85 | $html .= " checked=\"checked\""; |
---|
86 | } |
---|
87 | $html .= "></td></tr>"; |
---|
88 | $html .= "<tr><td><b>Show Deadspace Tag:</b></td><td><input type=checkbox name=dtag id=dtag"; |
---|
89 | if (strpos($data,"dtag")) |
---|
90 | { |
---|
91 | $html .= " checked=\"checked\""; |
---|
92 | } |
---|
93 | $html .= "></td></tr>"; |
---|
94 | $html .= "<tr><td width=300><b>Show Officer Tag:</b></td><td><input type=checkbox name=otag id=otag"; |
---|
95 | if (strpos($data,"otag")) |
---|
96 | { |
---|
97 | $html .= " checked=\"checked\""; |
---|
98 | } |
---|
99 | $html .= "></td></tr>"; |
---|
100 | $html .= "<tr><td><b>Use Lighter Green for Dropped Items:</b></td><td><input type=checkbox name=lgreen id=lgreen"; |
---|
101 | if ($d_colour == '#006000') |
---|
102 | { |
---|
103 | $html .= " checked=\"checked\""; |
---|
104 | } |
---|
105 | $html .= "></td></tr></table><br>"; |
---|
106 | |
---|
107 | |
---|
108 | $html .= "<div class=block-header2>Fitting Panel Options</div>"; |
---|
109 | |
---|
110 | |
---|
111 | $html .= "<table class=kb-table width=\"360\" border=\"0\" cellspacing=\"1\">"; |
---|
112 | |
---|
113 | $html .= "<tr><td width=300><b>Panel Colour:</b></td><td>"; |
---|
114 | $html.='<select name="panel_colour">'; |
---|
115 | foreach($colours as $select) |
---|
116 | { |
---|
117 | $html .='<option value="'.$select.'"'; |
---|
118 | if($select == $colour) |
---|
119 | { |
---|
120 | $html .= ' selected="selected"'; |
---|
121 | } |
---|
122 | $html .='>'.$select.'</option>'; |
---|
123 | } |
---|
124 | $html .="</select></td></tr>"; |
---|
125 | |
---|
126 | $html .= "<tr><td width=300><b>Panel Style:</b></td><td width=60>"; |
---|
127 | $html.='<select name="panel_style">'; |
---|
128 | foreach($p_styles as $sts) |
---|
129 | { |
---|
130 | $html .='<option value="'.$sts.'"'; |
---|
131 | if($sts == $style) |
---|
132 | { |
---|
133 | $html .= ' selected="selected"'; |
---|
134 | } |
---|
135 | $html .='>'.$sts.'</option>'; |
---|
136 | } |
---|
137 | $html .="</select></td></tr>"; |
---|
138 | |
---|
139 | $html .= "<tr><td width=300><b>Highlight Item Style:</b></td><td>"; |
---|
140 | $html.='<select name="panel_show_style">'; |
---|
141 | foreach($s_styles as $show) |
---|
142 | { |
---|
143 | $html .='<option value="'.$show.'"'; |
---|
144 | if($show == $i_style) |
---|
145 | { |
---|
146 | $html .= ' selected="selected"'; |
---|
147 | } |
---|
148 | $html .='>'.$show.'</option>'; |
---|
149 | } |
---|
150 | $html .="</select></td></tr>"; |
---|
151 | |
---|
152 | $html .= "<tr><td width=300><b>Highlight Ammo Background</b></td><td>"; |
---|
153 | $html.='<select name="panel_ammo_style">'; |
---|
154 | foreach($a_styles as $ammo) |
---|
155 | { |
---|
156 | $html .='<option value="'.$ammo.'"'; |
---|
157 | if($ammo == $a_style) |
---|
158 | { |
---|
159 | $html .= ' selected="selected"'; |
---|
160 | } |
---|
161 | $html .='>'.$ammo.'</option>'; |
---|
162 | } |
---|
163 | $html .="</select></td></tr>"; |
---|
164 | |
---|
165 | $html .= "<tr><td width=300><b>Highlight T2 Items:</b></td><td><input type=checkbox name=2fit id=2fit"; |
---|
166 | if (strpos($data,"2fit")) |
---|
167 | { |
---|
168 | $html .= " checked=\"checked\""; |
---|
169 | } |
---|
170 | $html .= "></td></tr>"; |
---|
171 | $html .= "<tr><td><b>Highlight Faction Items:</b></td><td><input type=checkbox name=ffit id=ffit"; |
---|
172 | if (strpos($data,"ffit")) |
---|
173 | { |
---|
174 | $html .= " checked=\"checked\""; |
---|
175 | } |
---|
176 | $html .= "></td></tr>"; |
---|
177 | $html .= "<tr><td><b>Highlight Deadspace Items:</b></td><td><input type=checkbox name=dfit id=dfit"; |
---|
178 | if (strpos($data,"dfit")) |
---|
179 | { |
---|
180 | $html .= " checked=\"checked\""; |
---|
181 | } |
---|
182 | $html .= "></td></tr>"; |
---|
183 | $html .= "<tr><td><b>Highlight Officer Items:</b></td><td><input type=checkbox name=ofit id=ofit"; |
---|
184 | if (strpos($data,"ofit")) |
---|
185 | { |
---|
186 | $html .= " checked=\"checked\""; |
---|
187 | } |
---|
188 | $html .= "></td></tr></table>"; |
---|
189 | |
---|
190 | $html .= "<table class=kb-subtable><tr><td width=120></td><td colspan=3 ><input type=submit name=submit value=\"Save\"></td></tr>"; |
---|
191 | $html .= "</table>"; |
---|
192 | |
---|
193 | $html .= "</form>"; |
---|
194 | |
---|
195 | $page->setContent($html); |
---|
196 | $page->addContext($menubox->generate()); |
---|
197 | $page->generate(); |
---|
198 | ?> |
---|