Changeset 49 for trunk/Options.php
- Timestamp:
- Jan 30, 2009, 10:33:08 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
SqlTranslate.zip
-
Property svn:ignore
set to
-
trunk/Options.php
r43 r49 2 2 include('includes/global.php'); 3 3 4 if (Licence(0)) { 4 if(Licence(LICENCE_USER)) 5 { 6 $User = @$_SESSION['User']; 5 7 6 $User = @$_SESSION['User']; 7 8 if (array_key_exists('Email', $_POST)) { 8 if(array_key_exists('Email', $_POST)) 9 { 9 10 $Email = $_POST['Email']; 10 11 $OldPass = $_POST['OldPass']; … … 14 15 15 16 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID'])); 16 if (($Line['pass'] == $OldPass) and ($NewPass == $NewPass2)) { 17 if(($Line['pass'] == $OldPass) and ($NewPass == $NewPass2)) 18 { 17 19 $Database->SQLCommand("UPDATE user SET pass = '$NewPass' WHERE ID = ".$_SESSION['UserID']); 18 echo 'Heslo změněno!<br />';19 } else echo '<br />Hesla se neshodují!<br />';20 echo('Heslo změněno!<br />'); 21 } else echo('<br />Hesla se neshodují!<br />)'); 20 22 $Database->SQLCommand("UPDATE user SET Email = '$Email', Language = '$Language' WHERE ID = ".$_SESSION['UserID']); 21 echo 'Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User.'</b><br />';23 echo('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User.'</b><br />'); 22 24 WriteLog('Úprava nastavení!', 3); 23 } else { 25 } else 26 { 24 27 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID'])); 25 ?> 26 <form action="Options.php" method="post"> 28 echo('<form action="Options.php" method="post"> 27 29 <table> 28 30 <tr> 29 31 <td>Email: </td> 30 <td><input type="text" name="Email" value=" <?php echo $Line['Email']; ?>"></td>32 <td><input type="text" name="Email" value="'.$Line['Email'].'" /></td> 31 33 </tr> 32 34 <tr> 33 35 <td>Původní heslo: </td> 34 <td><input type="password" name="OldPass" ></td>36 <td><input type="password" name="OldPass" /></td> 35 37 </tr> 36 38 <tr> 37 39 <td>Nové heslo: </td> 38 <td><input type="password" name="NewPass" ></td>40 <td><input type="password" name="NewPass" /></td> 39 41 </tr> 40 42 <tr> 41 43 <td>Nové heslo pro potvrzení: </td> 42 <td><input type="password" name="NewPass2" ></td>44 <td><input type="password" name="NewPass2" /></td> 43 45 </tr> 44 46 <tr> 45 47 <td>Normálně budu překládat do: </td> 46 <td><?php WriteLanguages($Line['Language']); ?></td> 48 <td>'); 49 WriteLanguages($Line['Language']); 50 echo('</td> 47 51 </tr> 48 52 <tr> 49 <th><input type="submit" value="Uložit" ></th>53 <th><input type="submit" value="Uložit" /></th> 50 54 </tr> 51 55 </table> 52 </form> 53 54 55 <?php 56 </form>'); 56 57 } 57 58 } else echo 'Nejste přihlášený!';
Note:
See TracChangeset
for help on using the changeset viewer.