1
<?php
2
/**
3
 *   File functions:
4
 *   Judge Panel - change rank lawyers and members
5
 *
6
 *   @name                 : sedzia.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.1
10
 *   @since                : 06.03.2006
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
// 
31
32
$title = "Panel Sędziego";
33
require_once("includes/head.php");
34
35
/**
36
* Get the localization for game
37
*/
38
require_once("languages/".$player -> lang."/sedzia.php");
39
40
if ($player -> rank != 'Sędzia') 
41
{
42
    error (YOU_NOT);
43
}
44
45
/**
46
* Assign variables to template and display page
47
*/
48
$smarty -> assign(array("Adda" => ADD_A,
49
    "Asa" => AS_A,
50
    "Rmember" => R_MEMBER,
51
    "Rlawyer" => R_LAWYER,
52
    "Rjudge" => R_JUDGE,
53
    "Aadd" => A_ADD));
54
$smarty -> display ('sedzia.tpl');
55
56
if (isset ($_GET['step']) && $_GET['step'] == 'add') 
57
{
58
    $ranga = $db -> Execute("SELECT rank FROM players WHERE id=".$_POST['aid']);
59
    if ($ranga -> fields['rank'] == 'Member' || $ranga -> fields['rank'] == 'Ławnik' || $ranga -> fields['rank'] == 'Sędzia' || $ranga -> fields['rank'] == 'Prawnik') 
60
    {
61
        $strRank = $db -> qstr($_POST['rank'], get_magic_quotes_gpc());
62
        $db -> Execute("UPDATE players SET rank=".$strRank." WHERE id=".$_POST['aid']);
63
        error (YOU_ADD.$_POST['aid'].AS_A.$_POST['rank']);
64
    }
65
    $ranga -> Close();
66
}
67
68
require_once("includes/foot.php");
69
?>