1
<?php
2
/**
3
 *   File functions:
4
 *   Staff panel - give immunity, send players to jail etc.
5
 *
6
 *   @name                 : staff.php
7
 *   @copyright            : (C) 2004,2005,2006,2007 Vallheru Team based on Gamers-Fusion ver 2.5
8
 *   @author               : thindil <thindil@users.sourceforge.net>
9
 *   @author               : eyescream <tduda@users.sourceforge.net>
10
 *   @version              : 1.4
11
 *   @since                : 17.04.2007
12
 *
13
 */
14
15
//
16
//
17
//       This program is free software; you can redistribute it and/or modify
18
//   it under the terms of the GNU General Public License as published by
19
//   the Free Software Foundation; either version 2 of the License, or
20
//   (at your option) any later version.
21
//
22
//   This program is distributed in the hope that it will be useful,
23
//   but WITHOUT ANY WARRANTY; without even the implied warranty of
24
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25
//   GNU General Public License for more details.
26
//
27
//   You should have received a copy of the GNU General Public License
28
//   along with this program; if not, write to the Free Software
29
//   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
30
//
31
// $Id$
32
33
$title = 'Panel Administracyjny';
34
require_once('includes/head.php');
35
36
/**
37
* Get the localization for game
38
*/
39
require_once('languages/'.$player -> lang.'/staff.php');
40
41
if ($player -> rank != 'Staff' && $player -> rank != 'Admin')
42
{
43
    error (YOU_NOT);
44
}
45
46
if (isset($_GET['view']))
47
{
48
    $arrView = array('takeaway', 'clearc', 'czat', 'jail', 'innarchive', 'banmail', 'addtext', 'changenick');
49
    $intKey = array_search($_GET['view'], $arrView);
50
    if ($intKey !== false)
51
    {
52
        require_once('includes/admin/'.$arrView[$intKey].'.php');
53
    }
54
}
55
56
/**
57
* Initialization of variables
58
*/
59
if (!isset($_GET['view']))
60
{
61
    $_GET['view'] = '';
62
    $smarty -> assign(array('Panelinfo' => PANEL_INFO,
63
                            'Anews' => A_NEWS,
64
                            'Atake' => A_TAKE,
65
                            'Aclear' => A_CLEAR,
66
                            'Achat' => A_CHAT,
67
                            'Ajail' => A_JAIL,
68
                            'Aaddnews' => A_ADD_NEWS,
69
                            'Ainnarchive' => A_INNARCHIVE,
70
                            'Abanmail' => A_BAN_MAIL,
71
                            'Achangenick' => A_CHANGE_NICK));
72
}
73
74
if (!isset($_GET['action']))
75
{
76
    $_GET['action'] = '';
77
}
78
79
/**
80
* Assign variables to template and display page
81
*/
82
$smarty -> assign(array('View' => $_GET['view'],
83
                        'Action' => $_GET['action']));
84
$smarty -> display('staff.tpl');
85
86
require_once('includes/foot.php');
87
?>