-
Notifications
You must be signed in to change notification settings - Fork 2
/
healer.php
88 lines (70 loc) · 2.63 KB
/
healer.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
<?php
// ===========================================================================
// Healer {healer.php}
// ===========================================================================
// ---------------------------------------------------------------------------
// Version: 1.1
// Modified: 2005-11-13
// Author(s): zoltarx
// ---------------------------------------------------------------------------
// ===========================================================================
// This file is a part of Galaxy Forces project.
// ===========================================================================
$index = 'control';
$auth = true;
require('include/header.php');
$back = getvar('back');
$page = abs(getvar('page'));
if (!$back) $back = 'control.php';
$back .= "?rid=$rid";
if ($page) $back .= "&page=$page";
$pagename = $Lang['GalacticHospital'];
// ===========================================================================
// ERROR PAGE
// ===========================================================================
if ($errors) {
tablebegin("<font class=\"error\">${Lang['Error']}!</font>", '400');
echo "\t\t<h3>${Lang['ErrorProblems']}</h3><font class=\"error\">$errors</font><br />";
echo "<a href=\"javascript:history.back(1)\">${Lang['GoBack']} >></a><br /><br />";
tableend("$pagename");
}
elseif (checkplace('healer')) {
tablebegin($pagename, 500);
if ($action == 'heal') {
?> <br /><font class="h3"><?php echo $Lang['FullyHealed']; ?><br />
<br />
<?php
sound('healed');
}
else {
subbegin();
?> <center>
<font class="h3"><?php echo $Lang['HospitalWelcome']; ?></font><br />
<br />
<font class="result"><?php echo $Lang['HospitalDescription']; ?></font><br />
<br />
<?php
if ($Player['hp'] < $Player['hpmax']) {
$cost = round($places['healer']['parameters'] * ($Player['hpmax'] - $Player['hp']) * 20);
?> <b><?php echo $Lang['HealCost']; ?></b>: <font class="minus"><?php echo div($cost); ?></font> [!]<br />
<br />
<a href="healer.php?action=heal"><?php echo $Lang['Heal']; ?> >></a><br />
<?php
sound('healer');
}
else {
sound('healer1');
echo "\t${Lang['YouDontNeedHealing']}<br /><br />\n";
}
subbreak();
tableimg("images/bw.gif", 168, 168, 'gallery/places/healer.jpg', 160, 160, '', 'right');
subend();
}
tableend("<a href=\"$back\">${Lang['GoBack']} >></a>");
}
else {
tablebegin($Lang['GalacticHospital'], 500);
echo "\t\t<br />\n\t\t${Lang['NotAvailable']}<br />\n\t\t<br />\n";
tableend("<a href=\"$back\">${Lang['GoBack']} >></a>");
}
require('include/footer.php');