Changeset 365 for trunk/Options.php


Ignore:
Timestamp:
Mar 9, 2010, 11:29:05 AM (15 years ago)
Author:
george
Message:
  • Upraveno: Jména tabulek v databází upraveny na stejná s prvními velkými písmeny.
  • Upraveno: Doplněny SQL uvozovky do mnoha SQL dotazů.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Options.php

    r357 r365  
    1717    $redirecting = $_POST['redirecting'];
    1818
    19    // $Line = mysql_fetch_assoc($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID']));
    2019    if(($_SESSION['Pass'] == $OldPass) and ($NewPass == $NewPass2))
    2120    {
    2221      // Update password
    2322      $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']);
    2524      echo('Heslo změněno!<br />');
    2625    } else echo('<br />Hesla se neshodují!<br />');
    2726   
    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']);
    2928    echo('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User.'</b><br />');
    3029    WriteLog('Úprava nastavení!', LOG_TYPE_USER);
    3130  } else
    3231  {
    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']));   
    3433    echo('<form action="Options.php" method="post">
    3534  <fieldset><legend>Nastavení uživatele</legend>
     
    8685    {
    8786      echo('<option value="'.$LineTeam['Id'].'"');
    88       if ($LineTeam['Id'] == $Line['team']) echo(' selected="selected"');
     87      if ($LineTeam['Id'] == $Line['Team']) echo(' selected="selected"');
    8988        echo('>'.$LineTeam['Name'].'</option>');
    9089    }   
Note: See TracChangeset for help on using the changeset viewer.