Changeset 426 for beta/pages/acc.php
- Timestamp:
- Feb 10, 2009, 3:09:21 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
beta/pages/acc.php
r405 r426 3 3 4 4 $html -> PrgStart(); 5 $user = $_POST['user']; 6 $pass = $_POST['pass']; 5 7 6 8 if (isset($_POST["login"]) AND $_POST["user"] != "" AND $_POST["pass"] != "") 7 {$player -> Login($ _POST["user"],$_POST["pass"]);}9 {$player -> Login($user,$pass);} 8 10 else 9 11 { 10 12 if ($player -> Check()) 11 13 { 14 $operace = $_POST['operace']; 15 16 if(empty($operace)): 12 17 echo "<div align=\"left\">"; 13 18 echo "<b>Menu účtu:</b><br />"; 14 echo "< a href=\"?page=chmeil\">Změna e-mailu</a><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 />"; 15 20 echo "<a href=\"?page=dontwork\">Změna typu účtu</a><br />"; 16 21 echo "<a href=\"?page=dontwork\">Změna hesla</a><br />"; … … 34 39 } 35 40 echo "<br /><div align=\"right\"><a href=\"?logout\">Odhlásit</a>".$admin."</div>"; 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; 36 76 } 37 77 else
Note:
See TracChangeset
for help on using the changeset viewer.