Changeset 389 for administrace/user.php
- Timestamp:
- Oct 8, 2008, 12:42:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
administrace/user.php
r317 r389 4 4 { 5 5 var $SessionTimeout = 30; // minutes 6 6 7 7 function Check() 8 8 { … … 20 20 return($_SESSION['UserId'] != 0); 21 21 } 22 22 23 23 function Login($Username, $Password) 24 24 { … … 27 27 $DbResult = $Database->select('account', 'Id,username', '(gmlevel > 0) AND (username = "'.$Username.'") AND (sha_pass_hash = SHA1(CONCAT(UCASE("'.$Username.'"),":",UCASE("'.$Password.'"))))'); 28 28 if($DbResult->num_rows > 0) 29 { 29 { 30 30 $User = $DbResult->fetch_array(); 31 31 $_SESSION['UserId'] = $User['Id']; 32 32 $_SESSION['UserName'] = $User['username']; 33 echo('Byl jste p øihlá¹en.<br>');33 echo('Byl jste přihlášen.<br>'); 34 34 } else { 35 echo('P øístup nepovolen!<br>');36 } 35 echo('Přístup nepovolen!<br>'); 36 } 37 37 } 38 38 39 39 function Logout() 40 40 { 41 41 $_SESSION['UserId'] = 0; 42 echo('Byl jste odhlá ¹en.<br>');42 echo('Byl jste odhlášen.<br>'); 43 43 } 44 44 }
Note:
See TracChangeset
for help on using the changeset viewer.