/
visual.php
425 lines (397 loc) · 25.8 KB
/
visual.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<?php
/****************************************************************************
* Name: visual.php
* Author: Ben Barnes
* Date: 2016-02-20
* Purpose: Visualization functions page
*****************************************************************************/
/********************************
showTitle
html title
********************************/
function showTitle($title) {
require "section1.txt";
echo "\n <title>Worlds: The Game - ".$title."</title>\n </head>\n";
require "section2.txt";
} // showTitle
/********************************
compileMenu
setup menu nav bar
********************************/
function compileMenu($getPage_connection2,$pageType) {
echo " <div id=\"real_content\">\n";
echo " <!-- Fixed navbar -->\n";
echo " <nav class=\"navbar navbar-default navbar-fixed-top\">\n";
echo " <div class=\"container\">\n";
echo " <div class=\"navbar-header\">\n";
echo " <button type=\"button\" class=\"navbar-toggle collapsed\" data-toggle=\"collapse\" data-target=\"#navbar\" aria-expanded=\"false\" aria-controls=\"navbar\">\n";
echo " <span class=\"sr-only\">Toggle navigation</span>\n";
echo " <span class=\"icon-bar\"></span>\n";
echo " <span class=\"icon-bar\"></span>\n";
echo " <span class=\"icon-bar\"></span>\n";
echo " </button>\n";
echo " </div>\n";
echo " <div id=\"navbar\" class=\"navbar-collapse collapse\">\n";
echo " <ul class=\"nav navbar-nav\">\n";
// default login bar
if (isset($_SESSION["login"])) {
if ($_SESSION["login"] == 1) {
if ($pageType == "profile" || $pageType == "settings" || $pageType == "logout") {
echo " <li class=\"dropdown active\">\n";
echo " <a href=\"#\" class=\"dropdown-toggle menu_text\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\"><span class=\"glyphicon glyphicon-user menu_glyph\"></span><br />User <span class=\"caret\"></span></a>\n";
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
if ($pageType == "settings") {
echo " <li class=\"active\"><a class=\"menu_text\" href=\"index.php?page=settings\"><span class=\"glyphicon glyphicon-wrench menu_glyph\"></span> Settings</a></li>\n";
} else {
echo " <li><a class=\"menu_text\" href=\"index.php?page=settings\"><span class=\"glyphicon glyphicon-wrench menu_glyph\"></span> Settings</a></li>\n";
} // else
if ($pageType == "logout") {
echo " <li class=\"active\"><a class=\"menu_text\" href=\"index.php?page=home&action=logout\"><span class=\"glyphicon glyphicon-log-out menu_glyph\"></span> Logout</a></li>\n";
} else {
echo " <li><a class=\"menu_text\" href=\"index.php?page=home&action=logout\"><span class=\"glyphicon glyphicon-log-out menu_glyph\"></span> Logout</a></li>\n";
} // else
echo " </ul>\n";
echo " </li>\n";
} else {
echo " <li class=\"dropdown\">\n";
echo " <a href=\"#\" class=\"dropdown-toggle menu_text\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\"><span class=\"glyphicon glyphicon-user menu_glyph\"></span><br />User <span class=\"caret\"></span></a>\n";
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
echo " <li><a class=\"menu_text\" href=\"index.php?page=settings\"><span class=\"glyphicon glyphicon-wrench menu_glyph\"></span> Settings</a></li>\n";
echo " <li><a class=\"menu_text\" href=\"index.php?page=home&action=logout\"><span class=\"glyphicon glyphicon-log-out menu_glyph\"></span> Logout</a></li>\n";
echo " </ul>\n";
echo " </li>\n";
} // else
if ($pageType == "map") {
echo " <li class=\"dropdown active\">\n";
echo " <a href=\"#\" class=\"dropdown-toggle menu_text\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\"><span class=\"glyphicon glyphicon-th menu_glyph\"></span><br />Map <span class=\"caret\"></span></a>\n";
echo " <ul class=\"spaced_dropdown_menu dropdown-menu\" role=\"menu\">\n";
echo " <li>\n";
echo " <div class=\"well well-sm\">\n";
echo " <form action=\"index.php?page=map\" method=\"get\">\n";
echo " <div class=\"form-group form-group-sm\">\n";
echo " <input type=\"hidden\" name=\"page\" value=\"map\">\n";
if (isset($_SESSION["continent_id"])) {
echo " <label for=\"menu_continentInput\">Continent</label>\n <input name=\"continent\" type=\"text\" class=\"form-control\" id=\"menu_continentInput\" placeholder=\"e.g. 1\" value=\"".$_SESSION["continent_id"]."\"/>\n";
} else {
echo " <label for=\"menu_continentInput\">Continent</label>\n <input name=\"continent\" type=\"text\" class=\"form-control\" id=\"menu_continentInput\" placeholder=\"e.g. 1\" />\n";
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
if (isset($_SESSION["xpos"])) {
echo " <label for=\"menu_xPosInput\">X Position</label>\n <input name=\"xpos\" type=\"text\" class=\"form-control\" id=\"menu_xPosInput\" placeholder=\"e.g. 1\" value=\"".$_SESSION["xpos"]."\" />\n";
} else {
echo " <label for=\"menu_xPosInput\">X Position</label>\n <input name=\"xpos\" type=\"text\" class=\"form-control\" id=\"menu_xPosInput\" placeholder=\"e.g. 1\" />\n";
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
if (isset($_SESSION["ypos"])) {
echo " <label for=\"menu_yPosInput\">Y Position</label>\n <input name=\"ypos\" type=\"text\" class=\"form-control\" id=\"menu_yPosInput\" placeholder=\"e.g. 1\" value=\"".$_SESSION["ypos"]."\" />\n";
} else {
echo " <label for=\"menu_yPosInput\">Y Position</label>\n <input name=\"ypos\" type=\"text\" class=\"form-control\" id=\"menu_yPosInput\" placeholder=\"e.g. 1\" />\n";
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
if (isset($_SESSION["overlay"])) {
echo " <label for=\"menu_overlayInput\">Overlay</label>\n \n";
showOverlayOptions($getPage_connection2);
} else {
echo " <label for=\"menu_overlayInput\">Overlay</label>\n \n";
showOverlayOptions($getPage_connection2);
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
echo " <button onclick=\"loadButton(this)\" id=\"menu_submit\" type=\"submit\" class=\"btn btn-lg btn-primary\">Go</button>\n";
echo " </div>\n";
echo " </form>\n";
echo " </div>\n";
echo " </li>\n";
echo " </ul>\n";
echo " </li>\n";
} else {
echo " <li class=\"dropdown\">\n";
echo " <a href=\"#\" class=\"dropdown-toggle menu_text\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\"><span class=\"glyphicon glyphicon-th menu_glyph\"></span><br />Map <span class=\"caret\"></span></a>\n";
echo " <ul class=\"spaced_dropdown_menu dropdown-menu\" role=\"menu\">\n";
echo " <li>\n";
echo " <div class=\"well well-sm\">\n";
echo " <form action=\"index.php?page=map\" method=\"get\">\n";
echo " <div class=\"form-group form-group-sm\">\n";
echo " <input type=\"hidden\" name=\"page\" value=\"map\">\n";
if (isset($_SESSION["continent_id"])) {
echo " <label for=\"menu_continentInput\">Continent</label>\n <input name=\"continent\" type=\"text\" class=\"form-control\" id=\"menu_continentInput\" placeholder=\"e.g. 1\" value=\"".$_SESSION["continent_id"]."\"/>\n";
} else {
echo " <label for=\"menu_continentInput\">Continent</label>\n <input name=\"continent\" type=\"text\" class=\"form-control\" id=\"menu_continentInput\" placeholder=\"e.g. 1\" />\n";
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
if (isset($_SESSION["xpos"])) {
echo " <label for=\"menu_xPosInput\">X Position</label>\n <input name=\"xpos\" type=\"text\" class=\"form-control\" id=\"menu_xPosInput\" placeholder=\"e.g. 1\" value=\"".$_SESSION["xpos"]."\" />\n";
} else {
echo " <label for=\"menu_xPosInput\">X Position</label>\n <input name=\"xpos\" type=\"text\" class=\"form-control\" id=\"menu_xPosInput\" placeholder=\"e.g. 1\" />\n";
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
if (isset($_SESSION["ypos"])) {
echo " <label for=\"menu_yPosInput\">Y Position</label>\n <input name=\"ypos\" type=\"text\" class=\"form-control\" id=\"menu_yPosInput\" placeholder=\"e.g. 1\" value=\"".$_SESSION["ypos"]."\" />\n";
} else {
echo " <label for=\"menu_yPosInput\">Y Position</label>\n <input name=\"ypos\" type=\"text\" class=\"form-control\" id=\"menu_yPosInput\" placeholder=\"e.g. 1\" />\n";
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
if (isset($_SESSION["overlay"])) {
echo " <label for=\"menu_overlayInput\">Overlay</label>\n \n";
showOverlayOptions($getPage_connection2);
} else {
echo " <label for=\"menu_overlayInput\">Overlay</label>\n \n";
showOverlayOptions($getPage_connection2);
} // else
echo " </div>\n";
echo " <div class=\"form-group form-group-sm\">\n";
echo " <button onclick=\"loadButton(this)\" id=\"menu_submit\" type=\"submit\" class=\"btn btn-lg btn-primary\">Go</button>\n";
echo " </div>\n";
echo " </form>\n";
echo " </div>\n";
echo " </li>\n";
echo " </ul>\n";
echo " </li>\n";
} // else
if ($pageType == "policies") {
echo " <li class=\"more_buttons_main active\"><a class=\"menu_text\" href=\"index.php?page=policies\"><span class=\"glyphicon glyphicon-tasks menu_glyph\"></span><br />Policies</a></li>\n";
} else {
echo " <li class=\"more_buttons_main\"><a class=\"menu_text\" href=\"index.php?page=policies\"><span class=\"glyphicon glyphicon-tasks menu_glyph\"></span><br />Policies</a></li>\n";
} // else
if ($pageType == "trade") {
echo " <li class=\"more_buttons_mobileVisible active\"><a class=\"menu_text\" href=\"index.php?page=trade\"><span class=\"glyphicon glyphicon-transfer menu_glyph\"></span><br />Trade</a></li>\n";
} else {
echo " <li class=\"more_buttons_mobileVisible\"><a class=\"menu_text\" href=\"index.php?page=trade\"><span class=\"glyphicon glyphicon-transfer menu_glyph\"></span><br />Trade</a></li>\n";
} // else
if ($pageType == "organizations") {
echo " <li class=\"more_buttons_mobileVisible active\"><a class=\"menu_text\" href=\"index.php?page=organizations\"><span class=\"glyphicon glyphicon-globe menu_glyph\"></span><br />Orgs</a></li>\n";
} else {
echo " <li class=\"more_buttons_mobileVisible\"><a class=\"menu_text\" href=\"index.php?page=organizations\"><span class=\"glyphicon glyphicon-globe menu_glyph\"></span><br />Orgs</a></li>\n";
} // else
if ($pageType == "forum") {
echo " <li class=\"more_buttons_mobileVisible active\"><a class=\"menu_text\" href=\"index.php?page=forum\"><span class=\"glyphicon glyphicon-comment menu_glyph\"></span><br />Forum</a></li>\n";
} else {
echo " <li class=\"more_buttons_mobileVisible\"><a class=\"menu_text\" href=\"index.php?page=forum\"><span class=\"glyphicon glyphicon-comment menu_glyph\"></span><br />Forums</a></li>\n";
} // else
if ($pageType == "help") {
echo " <li class=\"more_buttons_mobileVisible active\"><a class=\"menu_text\" href=\"index.php?page=help\"><span class=\"glyphicon glyphicon-question-sign menu_glyph\"></span><br />Help</a></li>\n";
} else {
echo " <li class=\"more_buttons_mobileVisible\"><a class=\"menu_text\" href=\"index.php?page=help\"><span class=\"glyphicon glyphicon-question-sign menu_glyph\"></span><br />Help</a></li>\n";
} // else
if ($_SESSION["admin"] == 1) {
echo " <li class=\"more_buttons_mobileVisible admin_button\"><a class=\"menu_text\" href=\"index.php?page=admin\"><span class=\"glyphicon glyphicon-dashboard menu_glyph\"></span><br />Admin</a></li>\n";
} // if
echo " <li class=\"more_buttons_mobileHidden dropdown\">\n";
echo " <a href=\"#\" class=\"dropdown-toggle menu_text\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\"><span class=\"glyphicon glyphicon-plus menu_glyph\"></span><br /> More <span class=\"caret\"></span></a>\n";
echo " <ul class=\"dropdown-menu\" role=\"menu\">\n";
if ($pageType == "policies") {
echo " <li class=\"more_buttons_menu active\"><a class=\"menu_text\" href=\"index.php?page=policies\"><span class=\"glyphicon glyphicon-tasks menu_glyph\"></span> Policies</a></li>\n";
} else {
echo " <li class=\"more_buttons_menu\"><a class=\"menu_text\" href=\"index.php?page=policies\"><span class=\"glyphicon glyphicon-tasks menu_glyph\"></span> Policies</a></li>\n";
} // else
if ($pageType == "trade") {
echo " <li class=\"active\"><a class=\"menu_text\" href=\"index.php?page=trade\"><span class=\"glyphicon glyphicon-transfer menu_glyph\"></span> Trade</a></li>\n";
} else {
echo " <li><a class=\"menu_text\" href=\"index.php?page=trade\"><span class=\"glyphicon glyphicon-transfer menu_glyph\"></span> Trade</a></li>\n";
} // else
if ($pageType == "organizations") {
echo " <li class=\"active\"><a class=\"menu_text\" href=\"index.php?page=organizations\"><span class=\"glyphicon glyphicon-globe menu_glyph\"></span> Orgs</a></li>\n";
} else {
echo " <li><a class=\"menu_text\" href=\"index.php?page=organizations\"><span class=\"glyphicon glyphicon-globe menu_glyph\"></span> Orgs</a></li>\n";
} // else
if ($pageType == "forum") {
echo " <li class=\"active\"><a class=\"menu_text\" href=\"index.php?page=forum\"><span class=\"glyphicon glyphicon-comment menu_glyph\"></span> Forum</a></li>\n";
} else {
echo " <li><a class=\"menu_text\" href=\"index.php?page=forum\"><span class=\"glyphicon glyphicon-comment menu_glyph\"></span> Forum</a></li>\n";
} // else
if ($pageType == "help") {
echo " <li class=\"active\"><a class=\"menu_text\" href=\"index.php?page=help\"><span class=\"glyphicon glyphicon-question-sign menu_glyph\"></span> Help</a></li>\n";
} else {
echo " <li><a class=\"menu_text\" href=\"index.php?page=help\"><span class=\"glyphicon glyphicon-question-sign menu_glyph\"></span> Help</a></li>\n";
} // else
// Admin Controls
if ($_SESSION["admin"] == 1) {
echo " <li class=\"admin_button\"><a class=\"menu_text\" target=\"_blank\" href=\"index.php?page=admin\"><span class=\"glyphicon glyphicon-dashboard menu_glyph\"></span> Admin</a></li>\n";
} // if
echo " </ul>\n";
echo " </li>\n";
echo " <li>\n";
echo " <div id=\"menu_search\" class=\"row menu_login\">\n";
echo " <form action=\"index.php?page=search\" method=\"post\">\n";
echo " <div class=\"col-xs-9 col-sm-9 col-md-9\">\n";
echo " <div class=\"form-group form-group-lg\">\n";
echo " <input data-toggle=\"tooltip\" data-placement=\"bottom\" title=\"Search for any nation or organization here.\" name=\"search\" id=\"search_terms\" type=\"text\" class=\"form-control\" placeholder=\"Enter Search here...\" />\n";
echo " </div>\n";
echo " </div>\n";
echo " <div class=\"col-xs-3 col-sm-3 col-md-3\">\n";
echo " <div class=\"form-group form-group-lg\">\n";
echo " <button onclick=\"loadButton(this)\" id=\"search_submit\" type=\"submit\" class=\"btn btn-lg btn-success\"><span class=\"glyphicon glyphicon-search\"></span></button>\n";
echo " </div>\n";
echo " </div>\n";
echo " </form>\n";
echo " </div>\n";
echo " </li>\n";
} else {
echo " <li>\n";
echo " <form action=\"index.php?page=map\" method=\"post\">\n";
echo " <div class=\"container\">\n";
echo " <div class=\"row\">\n";
echo " <div class=\"col-md-6\">\n";
echo " </div>\n";
echo " <div class=\"col-md-6\">\n";
echo " <div class=\"row\">\n";
echo " <div class=\"col-xs-6 col-sm-3 col-md-4\">\n";
echo " <span class=\"form-group form-group-xs\">\n";
echo " <label for=\"menu_username\">Username</label>\n";
echo " <input name=\"username\" type=\"text\" class=\"form-control\" id=\"menu_username\" placeholder=\"Username\" />\n";
echo " </span>\n";
echo " </div>\n";
echo " <div class=\"col-xs-6 col-sm-3 col-md-4\">\n";
echo " <span class=\"form-group form-group-xs\">\n";
echo " <label for=\"menu_password\">Password</label>\n";
echo " <input name=\"password\" type=\"password\" class=\"form-control\" id=\"menu_password\" placeholder=\"Password\" />\n";
echo " </span>\n";
echo " </div>\n";
echo " <div class=\"col-xs-4 col-sm-1 col-md-2\">\n";
echo " <span class=\"form-group form-group-xs\">\n";
echo " <button onclick=\"loadButton(this)\" id=\"menu_submit\" type=\"submit\" class=\"form-control btn btn-sm btn-success menu_login\"><span class=\"glyphicon glyphicon-log-in\"></span></button>\n";
echo " </span>\n";
echo " </div>\n";
echo " <span class=\"clear\"></span>\n";
echo " </div>\n";
echo " </div>\n";
echo " <span class=\"clear\"></span>\n";
echo " </div>\n";
echo " </div>\n";
echo " </form>\n";
echo " </li>\n";
} // else
} else {
echo " <li>\n";
echo " <form action=\"index.php?page=map\" method=\"post\">\n";
echo " <div class=\"container\">\n";
echo " <div class=\"row\">\n";
echo " <div class=\"col-md-6\">\n";
echo " </div>\n";
echo " <div class=\"col-md-6\">\n";
echo " <div class=\"row\">\n";
echo " <div class=\"col-xs-6 col-sm-3 col-md-4\">\n";
echo " <span class=\"form-group form-group-xs\">\n";
echo " <label for=\"menu_username\">Username</label>\n";
echo " <input name=\"username\" type=\"text\" class=\"form-control\" id=\"menu_username\" placeholder=\"Username\" />\n";
echo " </span>\n";
echo " </div>\n";
echo " <div class=\"col-xs-6 col-sm-3 col-md-4\">\n";
echo " <span class=\"form-group form-group-xs\">\n";
echo " <label for=\"menu_password\">Password</label>\n";
echo " <input name=\"password\" type=\"password\" class=\"form-control\" id=\"menu_password\" placeholder=\"Password\" />\n";
echo " </span>\n";
echo " </div>\n";
echo " <div class=\"col-xs-4 col-sm-1 col-md-2\">\n";
echo " <span class=\"form-group form-group-xs\">\n";
echo " <button onclick=\"loadButton(this)\" id=\"menu_submit\" type=\"submit\" class=\"form-control btn btn-sm btn-success menu_login\"><span class=\"glyphicon glyphicon-log-in\"></span></button>\n";
echo " </span>\n";
echo " </div>\n";
echo " <span class=\"clear\"></span>\n";
echo " </div>\n";
echo " </div>\n";
echo " <span class=\"clear\"></span>\n";
echo " </div>\n";
echo " </div>\n";
echo " </form>\n";
echo " </li>\n";
} // else
echo " </ul>\n";
echo " </div><!--/.nav-collapse -->\n\n";
echo " </div>\n";
echo " </nav>\n";
} // compileMenu
/********************************
showOverlayOptions
visualize overlay menu
********************************/
function showOverlayOptions($getPage_connection2) {
echo " <select id=\"menu_overlayInput\" name=\"overlay\" class=\"dropdown1 btn btn-lg btn-default\">\n";
if ($stmt = $getPage_connection2->prepare("SELECT id,name FROM overlays ORDER BY id ASC")) {
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($r_id,$r_name);
while ($stmt->fetch()) {
$overlayInfo1 = array("id"=>$r_id,"name"=>$r_name);
if (isset($_SESSION["overlay"])) {
if ($_SESSION["overlay"] == strtolower($overlayInfo1["name"])) {
echo " <option class=\"option1\" selected=\"selected\" value=\"".strtolower($overlayInfo1["name"])."\">".$overlayInfo1["name"]."</option>\n";
} else {
echo " <option class=\"option1\" value=\"".strtolower($overlayInfo1["name"])."\">".$overlayInfo1["name"]."</option>\n";
} // else
} else {
echo " <option class=\"option1\" value=\"".strtolower($overlayInfo1["name"])."\">".$overlayInfo1["name"]."</option>\n";
} // else
} // while
$stmt->close();
} else {
} // else
echo " </select>\n";
} // showOverlayOptions
/********************************
showWarning
visualize warning
********************************/
function showWarning($getPage_connection2) {
require "section3.txt";
$warning = "";
$success = "";
if (isset($_SESSION["warning_message"])) {
if (strlen($_SESSION["warning_message"]) >= 1) {
//unset($_POST);
$warning = cleanString($_SESSION["warning_message"],false);
$_SESSION["warning_message"] = "";
unset($_SESSION["warning_message"]);
} else {
$warning = "";
} // else
} else {
$warning = "";
} // else
if (isset($_SESSION["success_message"])) {
if (strlen($_SESSION["success_message"]) >= 1) {
//unset($_POST);
$success = cleanString($_SESSION["success_message"],false);
$_SESSION["success_message"] = "";
unset($_SESSION["success_message"]);
} else {
$success = "";
} // else
} else {
$success = "";
} // else
if (strlen($warning) >= 1) {
echo " <div class=\"alert alert-danger alert-spacer\" role=\"alert\">\n";
echo " <strong>Something went wrong with your request...</strong> <br /> ".$warning."\n";
echo " </div>\n";
} else if (strlen($success) >= 1) {
echo " <div class=\"alert alert-success alert-spacer\" role=\"alert\">\n";
echo " <strong>Your request has been processed...</strong> <br /> ".$success."\n";
echo " </div>\n";
} // else if
unset($warning);
unset($success);
} // showWarning
/********************************
showPageTitle
visualize page title
********************************/
function showPageTitle($getPage_connection2,$pageTitle,$showNation) {
if ($showNation === true) {
$nationInfo = getNationInfo($getPage_connection2,$_SESSION["nation_id"]);
echo " <div class=\"page-header spacing-from-menu\">\n";
echo " <h1>".$pageTitle." - ".$nationInfo["name"]."</h1>\n";
echo " </div>\n\n";
} else {
echo " <div class=\"page-header spacing-from-menu\">\n";
echo " <h1>".$pageTitle."</h1>\n";
echo " </div>\n\n";
}
} // showPageTitle
?>