1 | <?php
|
---|
2 |
|
---|
3 | $html->PrgStart();
|
---|
4 |
|
---|
5 | echo('<form action="" method="post">
|
---|
6 | <center><h3>Změna typu účtu</h3></center>
|
---|
7 | <table border="0" align="center">
|
---|
8 | <tr><td width="50px"><font face="verdana" size="2"><b>Účet :</b></font></td>
|
---|
9 | <td><input type="textbox" name="aa" class="textinput" /></td></tr>
|
---|
10 | <tr><td><font face="verdana" size="2"><b>Heslo :</b></font></td>
|
---|
11 | <td><input type="password" name="ab" class="textinput" /></td></tr>
|
---|
12 | <tr><td></td><td><select name="vyber" class="textinput">
|
---|
13 | <option value="wotlk">WotLK datadisk</option>
|
---|
14 | <option value="tbc">TBC datadisk</option>
|
---|
15 | <option value="wow">bez datadisku</option></select>
|
---|
16 | <tr><td><input type="submit" name="ac" value="odeslat" /></td><td>
|
---|
17 | </table></form>');
|
---|
18 |
|
---|
19 | $Expansion = array(0 => 'Klasický', 1 => 'The Burning Crusade', 2 => 'Wrath of the Litch King');
|
---|
20 |
|
---|
21 | if(array_key_exists('aa', $_POST))
|
---|
22 | if(array_key_exists('ab', $_POST))
|
---|
23 | if(array_key_exists('vyber', $_POST))
|
---|
24 | {
|
---|
25 | $account= @$_POST['aa'];
|
---|
26 | $heslo= @$_POST['ab'];
|
---|
27 | $vyber = @$_POST['vyber'];
|
---|
28 |
|
---|
29 | if($account != '' || $heslo != '')
|
---|
30 | {
|
---|
31 | $db->select_db($Config['Mangos']['DatabaseRealmd']);
|
---|
32 |
|
---|
33 | $user2 = strtoupper($account);
|
---|
34 | $pass = strtoupper($heslo);
|
---|
35 | $i = SHA1($user2.':'.$pass);
|
---|
36 |
|
---|
37 | $data = $db->query('SELECT id FROM `account` WHERE username="'.$account.'" AND sha_pass_hash="'.$i.'" LIMIT 0,1');
|
---|
38 |
|
---|
39 | $id = $data->fetch_assoc();
|
---|
40 | if($id['id'] == '')
|
---|
41 | {
|
---|
42 | die('<font face="verdana" size="2" color="red">Špatně zadané údaje účtu.</font>');
|
---|
43 | }
|
---|
44 |
|
---|
45 | switch($vyber)
|
---|
46 | {
|
---|
47 | case 'wotlk':
|
---|
48 | $nastaveni = 2;
|
---|
49 | break;
|
---|
50 | case 'tbc':
|
---|
51 | $nastaveni = 1;
|
---|
52 | break;
|
---|
53 | case 'wow':
|
---|
54 | $nastaveni = 0;
|
---|
55 | break;
|
---|
56 | }
|
---|
57 |
|
---|
58 | $querko = $db->query('UPDATE `account` SET `expansion` = '.$nastaveni.' WHERE `username` = "'.$account.'"');
|
---|
59 | if($nastaveni == 1)
|
---|
60 | {
|
---|
61 | echo('<br /><font face="verdana" size="2" color="DarkGreen">datadisk The Burning Crusade byl pro účet '.$account.' úspěšně zapnut.</font><br />');
|
---|
62 | } elseif($nastaveni == 2)
|
---|
63 | {
|
---|
64 | echo('<br /><font face="verdana" size="2" color="DarkGreen">datadisk Wrath of the Litch King byl pro účet '.$account.' úspěšně zapnut.</font><br />');
|
---|
65 | } else
|
---|
66 | {
|
---|
67 | echo('<br /><font face="verdana" size="2" color="DarkGreen">Veškeré datadisky byly pro účet '.$account.' úspěšně vypnuty.</font><br />');
|
---|
68 | }
|
---|
69 | } else echo('<br /><font face="verdana" size="2" color="red">Zadejte vaše jméno a heslo.</font><br />');
|
---|
70 | }
|
---|
71 |
|
---|
72 | $html->PrgStop();
|
---|
73 | ?>
|
---|