Changeset 63 for trunk/includes
- Timestamp:
- Feb 5, 2009, 8:30:59 AM (16 years ago)
- Location:
- trunk/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global.php
r61 r63 151 151 if(!array_key_exists('UserID', $_SESSION)) $_SESSION['UserID'] = ''; 152 152 if(!array_key_exists('User', $_SESSION)) $_SESSION['User'] = 'NotRegistred'; 153 if(!array_key_exists('Pass', $_SESSION)) $_SESSION['Pass'] = ''; 153 154 154 155 // Přihlášení … … 156 157 { 157 158 $_SESSION['User'] = $_POST['LoginUser']; 158 $_SESSION['Pass'] = $_POST['LoginPass'];159 $_SESSION['Pass'] = sha1($_POST['LoginPass']); 159 160 160 161 $Line = mysql_fetch_array($Database->SQLCommand("SELECT * FROM user WHERE LOWER(user) = LOWER('".$_SESSION['User']."') AND pass = '".$_SESSION['Pass']."'")); … … 205 206 </tr> 206 207 <tr> 207 <td colspan="2" class="page-bottom">Autoři: maron (maron2@centrum.cz), chronos');208 <td colspan="2" class="page-bottom">Autoři: maron, chronos <a href="http://wowpreklad.zdechov.net/trac/wowpreklad/browser/trunk">Zdrojové soubory</a>'); 208 209 echo(' </td></tr> 209 210 </table> -
trunk/includes/global_function.php
r61 r63 71 71 if($Licence == -1) return(true); 72 72 else 73 if(isset($_SESSION['User']) and $_SESSION['User'] <> '')73 if(isset($_SESSION['User']) and ($_SESSION['User'] <> '') and ($_SESSION['UserID'] != '')) 74 74 { 75 75 // $User = $_SESSION['User']; 76 76 $Pass = $_SESSION['Pass']; 77 $Line = mysql_fetch_array($Database->SQLCommand( "SELECT * FROM user WHERE ID = ".$_SESSION['UserID']."78 AND GM >= $Licence AND pass = '$Pass'"));77 $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM user WHERE ID = '.$_SESSION['UserID'].' 78 AND GM >= '.$Licence.' AND pass = "'.$Pass.'"')); 79 79 // echo "SELECT * FROM user WHERE ID = ".$_SESSION['UserID']." AND GM <= $Licence AND pass = '$Pass'"; 80 80 return($Line); … … 83 83 return(false); 84 84 } 85 } 86 87 function MysqlDateTimeToTime($Time) 88 { 89 $Parts = explode(' ', $Time); 90 $DateParts = explode('-', $Parts[0]); 91 $TimeParts = explode(':', $Parts[1]); 92 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]); 93 return($Result); 85 94 } 86 95
Note:
See TracChangeset
for help on using the changeset viewer.