Changeset 428
- Timestamp:
- Feb 10, 2009, 5:36:46 PM (16 years ago)
- Location:
- beta/pages
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
beta/pages/acc.php
r426 r428 12 12 if ($player -> Check()) 13 13 { 14 $operace = $_POST['operace'];14 15 15 16 if(empty($operace)): 16 17 17 echo "<div align=\"left\">"; 18 18 echo "<b>Menu účtu:</b><br />"; 19 echo "<form method=post action=\"?page= acc.php\"><input type=hidden name=\"operace\" value=\"chmail\"><input type=hidden name=user value='$user'><a href=# onclick=\"document.forms[0].submit();return false\">Změna emailu</a></form><br />";19 echo "<form method=post action=\"?page=chmeil.php\"><input type=hidden name=user value='$user'><a href=# onclick=\"document.forms[0].submit();return false\">Změna emailu</a></form><br />"; 20 20 echo "<a href=\"?page=dontwork\">Změna typu účtu</a><br />"; 21 21 echo "<a href=\"?page=dontwork\">Změna hesla</a><br />"; … … 40 40 echo "<br /><div align=\"right\"><a href=\"?logout\">Odhlásit</a>".$admin."</div>"; 41 41 42 elseif($operace=="chmail"):43 $zmenit = $_POST['zmenit'];44 if(empty($zmenit)):45 echo"<form method=post><p align=center>";46 echo"Starý Email: <input type=text name='star_email'><br />";47 echo"Nový Email: <input type=text name='nov_email'><br />";48 echo"<input type=hidden name=zmenit value='1'>";49 echo"<input type=hidden name=operace value=\"chmail\">";50 echo"<input type=submit value='Změnit'>";51 echo"</form>";52 else:53 $stary_email = $_POST['star_email'];54 $nov_email = $_POST['nov_email'];55 mysql_connect($db_server, $db_user, $db_pass);56 mysql_select_db($db_realmd);57 $email_check = mysql_num_rows(mysql_query("select id from account where username='$user' and email='$stary_email'"));58 if($email_check!=0):59 $email_update = mysql_query("update account set email='$nov_email' where username='$user'");60 if($email_update):61 $info = "<font color=green><strong>Email byl vpořádku změněn!</strong></font>";62 else:63 $info = "<font color=red><strong>Email se nepodařilo změnit!</strong></font>";64 endif;65 else:66 $info = "<font color=red><b>Zadali jste špatný stávající email!</b></font>";67 endif;68 echo"<p align=center>$info<br />";69 echo " <a href=\"?page=acc\"><- Zpět do správy účtu</a>";70 endif;71 72 73 74 75 endif;76 42 } 77 43 else -
beta/pages/chmeil.php
r405 r428 1 1 <?php 2 2 $html -> PrgStart(); 3 $user = $_POST['user']; 3 4 echo " <a href=\"?page=acc\"><- Zpět do správy účtu</a> 4 5 <center><h3>Změna e-mailu</h3></center> … … 9 10 Jméno vašeho účtu : </td> 10 11 <td> 11 <input type=\"text\" name=\"acc1\" ></td>12 <input type=\"text\" name=\"acc1\" value=\"$user\"></td> 12 13 </tr> 13 14 <tr>
Note:
See TracChangeset
for help on using the changeset viewer.