Changeset 188 for administrace/user.php


Ignore:
Timestamp:
Jan 1, 2008, 3:22:42 PM (17 years ago)
Author:
george
Message:

Přidáno: Zobrazení jména uživatele a odkaz na odhlášení.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • administrace/user.php

    r186 r188  
    1414    {
    1515      $_SESSION['UserId'] = 0;
     16      $_SESSION['UserName'] = '';
    1617    }
    1718    $_SESSION['Time'] = time();
     
    2425    global $Database;
    2526    $Database->select_db('realmd');
    26     $DbResult = $Database->select('account', 'Id', '(gmlevel > 0) AND (username = "'.$Username.'") AND (I = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))');
     27    $DbResult = $Database->select('account', 'Id,username', '(gmlevel > 0) AND (username = "'.$Username.'") AND (I = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))');
    2728    if($DbResult->num_rows > 0)
    2829    { 
    2930      $User = $DbResult->fetch_array();
    3031      $_SESSION['UserId'] = $User['Id'];
     32      $_SESSION['UserName'] = $User['username'];
    3133      echo('Byl jste pøihlá¹en.<br>');
    3234    } else {
Note: See TracChangeset for help on using the changeset viewer.