if ($serverSaveHour == 0) { $serverSaveHour = 23; } else { $serverSaveHour--; } $timeInfo['tm_hour'] = $serverSaveHour; $timeInfo['tm_min'] = 55; $timeInfo['tm_sec'] = 0; $difference = mktime($timeInfo['tm_hour'], $timeInfo['tm_min'], $timeInfo['tm_sec'], (int) $timeInfo['tm_mon'] + 1, $timeInfo['tm_mday'], (int) $timeInfo['tm_year'] + 1900) - $timeNow; if ($difference < 0) { $difference += 86400; } $auctionEnd = time() + $difference + ($auctionDaysDefault - 1) * 86400; } } $house->setBidEnd($auctionEnd); } $house->save(); $main_content .= $goodInfoStart . 'Your offer is now highest on auction. Current price for house is <b>' . $house->getLastBid() . ' gold</b>, your maximum price is <b>' . $house->getBid() . ' gold</b>. Character <b>' . htmlspecialchars($bidder->getName()) . '</b> from your account will get house, if you win.' . $goodInfoEnd; // udalo sie przebic, wiec nie pokazuje formularza $bidded = true; } else { if ($bid >= $house->getLastBid()) { $house->setLastBid($bid); $house->save(); } $main_content .= $badInfoStart . 'Your offer of ' . $bid . ' gold is too low.' . $badInfoEnd; } } else { $main_content .= $badInfoStart . 'Character <b>' . htmlspecialchars($bidder->getName()) . '</b> does not have enough money on bank account. Please login again <b>in game</b> to update your bank balance.' . $badInfoEnd; }