Ich habe mir den anti-sniper mod in meiner Auktion eingebaut. das bewirkt, dass die Auktion verlängert wird, falls jemand in der letzten Minute (oder Stunde) bietet. Die Auktion endet dann immer erst eine Stunde nach dem letzten Gebot.
Nur leider funktioniert das nicht so, wie es sollte. Es funktioniert zwar richtig, falls jemand in der letzten Stunde bietet. Falls jemand aber früher bietet, etwa 2 Tage vor Ablauf der Auktion, dann ednet plötzlich die Auktion schon eine Stunde nach Abgabe dieses Gebotes.
Der Mod besteht nur aus diesem Schnipsel
Code: Alles auswählen
//Anti Sniper
$sql = "SELECT auction_offer_time_stop FROM " . AUCTION_OFFER_TABLE . "
WHERE PK_auction_offer_id = " . $HTTP_GET_VARS[POST_AUCTION_OFFER_URL];
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select stop time', '', __LINE__, __FILE__, $sql);
}
//The time period specified below, 3600, is equal to 1 hour. You can change the first value to indicate the time period before auction end that you want the script to extend for if bid during. So if you want the auction to extend if someone bids in last five minutes then first number would be 300. Second number is the actual amount of time to extend the auction.
if ((auction_offer_time_stop - time()) < 3600)
{
$sql = "UPDATE " . AUCTION_OFFER_TABLE . " SET auction_offer_time_stop =
" . (time() + 3600) . " WHERE PK_auction_offer_id = " . $HTTP_GET_VARS[POST_AUCTION_OFFER_URL];
}
$db->sql_query($sql);
Es scheint so, als würde die IF-Anweisung einfach ignoriert werden:
if ((auction_offer_time_stop - time()) < 3600)
und der Befehl auf jeden Fall durchgeführt werden..
Die Datenbank und die Tabellen sind richtig.
Ist dieser IF-Befehl vielleicht falsch geschrieben? Oder woran kann das liegen? Leider kann ich kein PHP

Danke für die Hilfe!