Line | |
---|
1 | <?php
|
---|
2 | $html -> PrgStart();
|
---|
3 |
|
---|
4 | if ($player -> Check())
|
---|
5 | {
|
---|
6 | $zmenit = $_POST['zmenit'];
|
---|
7 | if($zmenit==1){
|
---|
8 | include("inc/db.php");
|
---|
9 | $account = $_POST['acc1'];
|
---|
10 | $typ = $_POST['typ'];
|
---|
11 |
|
---|
12 |
|
---|
13 | mysql_connect($db_server, $db_user, $db_pass);
|
---|
14 | mysql_select_db($db_realmd);
|
---|
15 | $acc_check = mysql_num_rows(mysql_query("select id from account where username='$account'"));
|
---|
16 | if($acc_check!=0):
|
---|
17 | $typ_update = mysql_query("update account set tbc='$typ' where username='$account'");
|
---|
18 | if($typ_update):
|
---|
19 | $info = "<font color=green><strong>Typ accountu byl vpořádku změněn!</strong></font>";
|
---|
20 | else:
|
---|
21 | $info = "<font color=red><strong>Typ accontu se nepodařilo změnit!</strong></font>";
|
---|
22 | endif;
|
---|
23 | else:
|
---|
24 | $info = "<font color=red><b>Zadali jste neexistujici account!</b></font>";
|
---|
25 | endif;
|
---|
26 | }
|
---|
27 |
|
---|
28 |
|
---|
29 | echo " <a href=\"?page=acc\"><- Zpět do správy účtu</a><br />
|
---|
30 |
|
---|
31 | <b>$info</b>
|
---|
32 | <form method=post action=\"?page=chtyp\">
|
---|
33 | <center><h3>Změna typu accountu</h3></center>
|
---|
34 |
|
---|
35 | <table align=\"center\">
|
---|
36 | <tr>
|
---|
37 | <td>
|
---|
38 | Jméno vašeho účtu : </td>
|
---|
39 | <td valign=middle>
|
---|
40 | <input type=\"text\" name=\"acc1\">
|
---|
41 | ".$_SESSION["UserName"]."</td>
|
---|
42 | </tr>
|
---|
43 | <tr>
|
---|
44 | <td>
|
---|
45 | Typ Acc : </td>
|
---|
46 | <td>
|
---|
47 | <select name=\"typ\">
|
---|
48 | <option value=1>Normální WoW
|
---|
49 | <option value=2>Datadisk The Buning Crusade
|
---|
50 | </select></td>
|
---|
51 | </tr>
|
---|
52 | <tr>
|
---|
53 | <td colspan=\"2\" align=\"right\">
|
---|
54 | <input type=hidden name=zmenit value='1'>
|
---|
55 | <input type=\"submit\" value=\"Změnit\" name=\"change\"></td>
|
---|
56 | </tr>
|
---|
57 | </table>
|
---|
58 | </form>
|
---|
59 | ";
|
---|
60 | }
|
---|
61 | else
|
---|
62 | {
|
---|
63 | $player -> LoginForm();
|
---|
64 | }
|
---|
65 |
|
---|
66 | $html -> PrgStop();
|
---|
67 | ?>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.