Changeset 365 for trunk/Options.php
- Timestamp:
- Mar 9, 2010, 11:29:05 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Options.php
r357 r365 17 17 $redirecting = $_POST['redirecting']; 18 18 19 // $Line = mysql_fetch_assoc($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID']));20 19 if(($_SESSION['Pass'] == $OldPass) and ($NewPass == $NewPass2)) 21 20 { 22 21 // Update password 23 22 $Salt = GetPasswordSalt(); 24 $Database->SQLCommand('UPDATE user SET pass = sha1(CONCAT(sha1("'.$NewPass.'"), "'.$Salt.'")), Salt="'.$Salt.'" WHERE ID= '.$_SESSION['UserID']);23 $Database->SQLCommand('UPDATE `User` SET `Pass` = sha1(CONCAT(sha1("'.$NewPass.'"), "'.$Salt.'")), `Salt`="'.$Salt.'" WHERE `ID` = '.$_SESSION['UserID']); 25 24 echo('Heslo změněno!<br />'); 26 25 } else echo('<br />Hesla se neshodují!<br />'); 27 26 28 $Database->SQLCommand('UPDATE user SET Email = "'.$Email.'", Language = "'.$Language.'", redirecting = "'.$redirecting.'" WHERE ID= '.$_SESSION['UserID']);27 $Database->SQLCommand('UPDATE `User` SET `Email` = "'.$Email.'", `Language` = "'.$Language.'", `Redirecting` = "'.$redirecting.'" WHERE `ID` = '.$_SESSION['UserID']); 29 28 echo('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User.'</b><br />'); 30 29 WriteLog('Úprava nastavení!', LOG_TYPE_USER); 31 30 } else 32 31 { 33 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM user WHERE ID= '.$_SESSION['UserID']));32 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$_SESSION['UserID'])); 34 33 echo('<form action="Options.php" method="post"> 35 34 <fieldset><legend>Nastavení uživatele</legend> … … 86 85 { 87 86 echo('<option value="'.$LineTeam['Id'].'"'); 88 if ($LineTeam['Id'] == $Line[' team']) echo(' selected="selected"');87 if ($LineTeam['Id'] == $Line['Team']) echo(' selected="selected"'); 89 88 echo('>'.$LineTeam['Name'].'</option>'); 90 89 }
Note:
See TracChangeset
for help on using the changeset viewer.