|
Last change
on this file was 692, checked in by george, 16 years ago |
- Upraveno: Další názvy souborů přejmenovány pro potřeby pěkných URL.
|
|
File size:
1.7 KB
|
| Line | |
|---|
| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | $info = '';
|
|---|
| 4 | $html->PrgStart();
|
|---|
| 5 | if($player->Check())
|
|---|
| 6 | {
|
|---|
| 7 | if(array_key_exists('zmenit', $_POST) and ($_POST['zmenit'] == 1))
|
|---|
| 8 | {
|
|---|
| 9 | $account = $_POST['acc1'];
|
|---|
| 10 | $email1 = $_POST['email1'];
|
|---|
| 11 | $email2 = $_POST['email2'];
|
|---|
| 12 |
|
|---|
| 13 | $db->select_db($Config['Mangos']['DatabaseRealmd']);
|
|---|
| 14 | $DbResult = $db->query('select id from account where username="'.$account.'" and email="'.$email1.'"');
|
|---|
| 15 | if($DbResult->num_rows > 0)
|
|---|
| 16 | {
|
|---|
| 17 | $email_update = $db->query('update account set email="'.$email2.'" where username="'.$account.'"');
|
|---|
| 18 | if($email_update)
|
|---|
| 19 | {
|
|---|
| 20 | $info = '<font color="green"><strong>Email byl vpořádku změněn!</strong></font>';
|
|---|
| 21 | } else
|
|---|
| 22 | {
|
|---|
| 23 | $info = '<font color="red"><strong>Email se nepodařilo změnit!</strong></font>';
|
|---|
| 24 | }
|
|---|
| 25 | } else $info = '<font color=red><b>Zadali jste špatný stávající email nebo neexistující účet!</b></font>';
|
|---|
| 26 | }
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 | echo(' <a href="'.$html->Link('/ucet/').'"><- Zpět do správy účtu</a><br />');
|
|---|
| 30 |
|
|---|
| 31 | echo('<b>'.$info.'</b>
|
|---|
| 32 | <form method="post" action="'.$html->Link('/ucet/zmena-emailu/').'">
|
|---|
| 33 | <center><h3>Změna e-mailu</h3></center>
|
|---|
| 34 |
|
|---|
| 35 | <table align="center">
|
|---|
| 36 | <input type="hidden" name="acc1" value="'.$_SESSION['UserName'].'" />
|
|---|
| 37 | <tr>
|
|---|
| 38 | <td>
|
|---|
| 39 | Starý e-mail : </td>
|
|---|
| 40 | <td>
|
|---|
| 41 | <input type="text" name="email1" autocomplete="off" /></td>
|
|---|
| 42 | </tr>
|
|---|
| 43 | <tr>
|
|---|
| 44 | <td>
|
|---|
| 45 | Nový e-mail : </td>
|
|---|
| 46 | <td>
|
|---|
| 47 | <input type="text" name="email2" autocomplete="off" /></td>
|
|---|
| 48 | </tr>
|
|---|
| 49 | <tr>
|
|---|
| 50 | <td colspan="2" align="right">
|
|---|
| 51 | <input type="hidden" name=zmenit value="1" />
|
|---|
| 52 | <input type="submit" value="Změnit" name="change" /></td>
|
|---|
| 53 | </tr>
|
|---|
| 54 | </table>
|
|---|
| 55 | </form>');
|
|---|
| 56 | } else
|
|---|
| 57 | {
|
|---|
| 58 | $player->LoginForm();
|
|---|
| 59 | }
|
|---|
| 60 | $html->PrgStop();
|
|---|
| 61 |
|
|---|
| 62 | ?>
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.