1
<?php
2
/**
3
 *   File functions:
4
 *   Forest menu
5
 *
6
 *   @name                 : las.php
7
 *   @copyright            : (C) 2004,2005,2006 Vallheru Team based on Gamers-Fusion ver 2.5
8
 *   @author               : thindil <thindil@users.sourceforge.net>
9
 *   @version              : 1.3
10
 *   @since                : 14.09.2007
11
 *
12
 */
13
14
//
15
//
16
//       This program is free software; you can redistribute it and/or modify
17
//   it under the terms of the GNU General Public License as published by
18
//   the Free Software Foundation; either version 2 of the License, or
19
//   (at your option) any later version.
20
//
21
//   This program is distributed in the hope that it will be useful,
22
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
23
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
//   GNU General Public License for more details.
25
//
26
//   You should have received a copy of the GNU General Public License
27
//   along with this program; if not, write to the Free Software
28
//   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
//
30
// $Id: las.php 673 2006-10-05 15:32:49Z thindil $
31
32
$title = 'Las Krętych Ścieżek';
33
$title1 = $title;
34
require_once('includes/head.php');
35
36
/**
37
* Set the language
38
*/
39
require_once('languages/'.$player -> lang.'/las.php');
40
41
if($player -> location != 'Las')
42
{
43
    error (NOT_IN, RET_LOC);
44
}
45
46
$smarty -> assign('Message', '');
47
48
if ($player -> hp < 1)
49
{
50
    if (isset($_GET['action']) && $_GET['action'] == 'back')
51
    {
52
        $db -> Execute('UPDATE `players` SET `miejsce`=\'Altara\' WHERE `id`='.$player -> id);
53
        error (PL_DEAD.'<a href="hospital.php">'.A_HERE.'</a>.');
54
    }
55
    if (isset($_GET['action']) && $_GET['action'] == 'hermit')
56
    {
57
        $crneed = (75 * $player -> level);
58
        require_once('includes/counttime.php');
59
        $arrTime = counttime();
60
        $strTime = $arrTime[0].$arrTime[1];
61
        $smarty -> assign(array('Goldneed' => $crneed,
62
                                'Waittime' => $strTime));
63
        if (isset($_GET['action2']) && $_GET['action2'] == 'resurect')
64
        {
65
            require_once('includes/resurect.php');
66
            $smarty -> assign('Message', YOU_RES.$pdpr.LOST_EXP);
67
        }
68
        if (isset($_GET['action2']) && $_GET['action2'] == 'wait')
69
        {
70
            $smarty -> assign('Message', WAIT_INFO);
71
        }
72
    }
73
}
74
75
/**
76
* Initialization of variables
77
*/
78
if (!isset($_GET['action']))
79
{
80
    $_GET['action'] = '';
81
}
82
if (!isset($_GET['action2']))
83
{
84
    $_GET['action2'] = '';
85
}
86
87
/**
88
* Assign variables to template and display page
89
*/
90
$smarty -> assign('Health', $player -> hp);
91
$smarty -> display ('las.tpl');
92
93
require_once('includes/foot.php');
94
?>