$user = mysql_fetch_assoc(db_query('SELECT *, (online_zeit between TIMESTAMPADD(Minute, -15, now()) and now()) as online FROM user WHERE id = '.$userid));
* Gibt den wirklichen Geldbetrag des Users zurück (Abzug von Auktions-Aktionen)
* @param user id
*/
function getRelevantMoney($userid) {
$user = getUser($userid);
$auktionensumme = mysql_fetch_assoc(mysql_query('SELECT SUM(aktuellesgebot) as summe FROM auktion WHERE bieter = ' . $user['id'] . ' GROUP BY bieter'));
$auktionensumme = $auktionensumme['summe'];
if ($auktionensumme == 0) {
$money = $user[geld];
} else {
$money = $user['geld'] - $auktionensumme;
}
return $money;
}
14 years ago
function checkSessionPasswort($userid, $password){
$sql = 'SELECT passwort from user where id = \''.$userid.'\'';
function checkCookiePassword($username, $password){
$sql = 'SELECT passwort from user where nickname = \''.$username.'\'';
$row = mysql_fetch_assoc(mysql_query($sql));
if($row['passwort'] != null){
return $password == $row['passwort'];
} else{
return false;
}
}
function checkLoginPassword($username, $password){
$sql = 'SELECT SHA1(AES_ENCRYPT(\''.$password.'\',\''.$GLOBALS['PW_AES_KEY'].'\')) as encrypt_password, passwort from user where nickname = \''.$username.'\'';