source: branches/posledni/pages/ucet.php

Last change on this file was 693, checked in by george, 15 years ago
  • Opraveny: Další odkazy na stránky.
File size: 2.3 KB
Line 
1<?php
2
3function ShowMenu()
4{
5 global $html, $player;
6
7 if($player->Check())
8 {
9 echo('<div align="left">'.
10 '<b>Menu účtu:</b><br />'.
11 '<a href="'.$html->Link('/ucet/zmena-emailu/').'">Změna emailu</a><br />'.
12 '<a href="'.$html->Link('/ucet/zmena-typu/').'">Změna typu účtu</a><br />'.
13 '<a href="'.$html->Link('/ucet/zmena-hesla/').'">Změna hesla</a><br />'.
14 '<a href="'.$html->Link('/ucet/nastaveni/').'">Nastavení stránek</a><br />'.
15 '<b>Menu postav:</b><br />'.
16 '<a href="'.$html->Link('/ucet/postavy/').'">Seznam vašich postav</a><br />'.
17 '<a href="'.$html->Link('/ucet/nulovani-xp/').'">Resetování XP</a><br />'.
18 '<a href="'.$html->Link('/ucet/reset-pozice/').'">Resetování pozice</a><br />'.
19 '');
20
21 echo('</div>');
22 if($player->GetGmLvl() > 3)
23 {
24 $admin = ' | <a href="'.$html->Link('/ucet/admin/').'">Administrace</a>';
25 } else
26 {
27 $admin = '';
28 }
29 echo('<br /><div align="right"><a href="'.$html->Link('/ucet/odhlaseni/').'">Odhlásit</a>'.$admin.'</div>');
30 } else
31 {
32 $player->LoginForm();
33 }
34
35}
36
37function ShowList()
38{
39 global $html, $player;
40
41 $html->PrgStart();
42 if(array_key_exists('user', $_POST)) $user = $_POST['user']; else $user = '';
43 if(array_key_exists('pass', $_POST)) $pass = $_POST['pass']; else $pass = '';
44
45
46 if(isset($_POST['login']) and ($_POST['user'] != '') and ($_POST['pass'] != ''))
47 {
48 $player->Login($user, $pass);
49 ShowMenu();
50 } else
51 {
52 ShowMenu();
53 }
54 $html->PrgStop();
55}
56
57if(count($QueryItems) > 1)
58{
59 if($QueryItems[1] == 'zmena-emailu') include('ucet-zmena-emailu.php');
60 else if($QueryItems[1] == 'nastaveni') include('ucet-nastaveni.php');
61 else if($QueryItems[1] == 'reset-pozice') include('ucet-reset-pozice.php');
62 else if($QueryItems[1] == 'nulovani-xp') include('ucet-nulovani-xp.php');
63 else if($QueryItems[1] == 'postavy') include('ucet-postavy.php');
64 else if($QueryItems[1] == 'zmena-typu') include('ucet-zmena-typu.php');
65 else if($QueryItems[1] == 'zmena-hesla') include('ucet-zmena-hesla.php');
66 else if($QueryItems[1] == 'odhlaseni')
67 {
68 if($player->Check())
69 {
70 echo('<center>');
71 $player->Logout();
72 echo('</center>');
73 $include = 0;
74 }
75 } else ShowList();
76} else ShowList();
77
78?>
Note: See TracBrowser for help on using the repository browser.