function checkAuctionDates($month_start, $day_start, $year_start, $month_stop, $day_stop, $year_stop) { global $lang; checkAuctionDatesStart($month_start, $day_start, $year_start); if ($month_stop > 12 || $month_stop < 1 || $month_start > 12 || $month_start < 1) { message_die(GENERAL_MESSAGE, 1 . $lang['auction_invalid_date']); } // End if if ($day_stop > 31 || $day_stop < 1 || $day_start > 31 || $day_start < 1) { message_die(GENERAL_MESSAGE, 2 . $lang['auction_invalid_date']); } // End if if ($month_stop == 2 || $month_stop == 4 || $month_stop == 6 || $month_stop == 9 || $month_stop == 11) { if ($day_stop > 30) { message_die(GENERAL_MESSAGE, 3 . $lang['auction_invalid_date']); } // End if } // End if if ($month_start == 2 || $month_start == 4 || $month_start == 6 || $month_start == 9 || $month_start == 11) { if ($day_start > 30) { message_die(GENERAL_MESSAGE, 4 . $lang['auction_invalid_date']); } // End if } // End if if ($year_start == $year_stop && $month_start > $month_stop) { message_die(GENERAL_MESSAGE, 5 . $lang['auction_invalid_date']); } // End if if ($year_start == $year_stop && $month_start == $month_stop && $day_start > $day_stop) { message_die(GENERAL_MESSAGE, 6 . $lang['auction_invalid_date']); } // End if }
if ($HTTP_POST_VARS['auction_offer_direct_sell_price'] < 0) { message_die(GENERAL_MESSAGE, $lang['auction_offer_direct_sell_amount_not_negative']); } else { $auction_offer_price += doubleval($auction_config_data['auction_offer_cost_direct_sell']); } } $auction_offer_price += doubleval($auction_config_data['auction_offer_cost_basic']); // BEGIN DATE-Handling if (empty($HTTP_POST_VARS['time_start_now'])) { if ($HTTP_POST_VARS['time_to_end_dd'] == 0) { checkAuctionDates($HTTP_POST_VARS['auction_offer_time_start_m'], $HTTP_POST_VARS['auction_offer_time_start_d'], $HTTP_POST_VARS['auction_offer_time_start_y'], $HTTP_POST_VARS['auction_offer_time_stop_m'], $HTTP_POST_VARS['auction_offer_time_stop_d'], $HTTP_POST_VARS['auction_offer_time_stop_y']); // Day +1 ???????? Dont know why so far - maybe the timezone $auction_offer_time_stop = mktime(0, 0, 0, $HTTP_POST_VARS['auction_offer_time_stop_m'], $HTTP_POST_VARS['auction_offer_time_stop_d'] + 1, $HTTP_POST_VARS['auction_offer_time_stop_y']); $auction_offer_time_start = mktime(0, 0, 0, $HTTP_POST_VARS['auction_offer_time_start_m'], $HTTP_POST_VARS['auction_offer_time_start_d'] + 1, $HTTP_POST_VARS['auction_offer_time_start_y']); } else { checkAuctionDatesStart($HTTP_POST_VARS['auction_offer_time_start_m'], $HTTP_POST_VARS['auction_offer_time_start_d'], $HTTP_POST_VARS['auction_offer_time_start_y']); $auction_offer_time_start = mktime(0, 0, 0, $HTTP_POST_VARS['auction_offer_time_start_m'], $HTTP_POST_VARS['auction_offer_time_start_d'] + 1, $HTTP_POST_VARS['auction_offer_time_start_y']); $auction_offer_time_stop = DateAdd('d', $HTTP_POST_VARS['time_to_end_dd'], $auction_offer_time_start); } } else { if ($HTTP_POST_VARS['time_to_end_dd'] == 0) { checkAuctionDatesStop($HTTP_POST_VARS['auction_offer_time_stop_m'], $HTTP_POST_VARS['auction_offer_time_stop_d'], $HTTP_POST_VARS['auction_offer_time_stop_y']); $auction_offer_time_start = time(); $auction_offer_time_stop = mktime(0, 0, 0, $HTTP_POST_VARS['auction_offer_time_stop_m'], $HTTP_POST_VARS['auction_offer_time_stop_d'] + 1, $HTTP_POST_VARS['auction_offer_time_stop_y']); } else { $auction_offer_time_start = time(); $auction_offer_time_stop = DateAdd('d', $HTTP_POST_VARS['time_to_end_dd'], time()); } } // END DATE-Handling $pic_upload = 0;