$fee_data = get_fee($minimum_bid, false); $fee = $fee_data[0]; $fee_data = $fee_data[1]; if ($_SESSION['SELL_action'] == 'edit') { updateauction(1); } if ($_SESSION['SELL_action'] == 'relist') { remove_bids($_SESSION['SELL_auction_id']); // incase they've not already been removed updateauction(2); } if ($_SESSION['SELL_action'] == 'edit' || $_SESSION['SELL_action'] == 'relist') { $auction_id = $_SESSION['SELL_auction_id']; } else { // insert auction addauction(); $auction_id = $db->lastInsertId(); //print_r($db); $_SESSION['SELL_auction_id'] = $auction_id; } $addcounter = true; // work out & add fee if ($system->SETTINGS['fees'] == 'y') { $feeupdate = false; // attach the new invoice to users account addoutstanding(); // deal with the auction if ($system->SETTINGS['fee_type'] == 2 && $fee > 0) { $query = "UPDATE " . $DBPrefix . "auctions SET suspended = 9 WHERE id = :auction_id"; $params = array(); $params[] = array(':auction_id', $auction_id, 'int');
$userrec = mysql_fetch_assoc($result); if (md5($MD5_PREFIX . $_POST['password']) != $userrec['password'] && $system->SETTINGS['usersauth'] == 'y') { $ERR = "ERR_026"; } else { if ($userrec['suspended'] > 0) { $ERR = "ERR_618"; } } if ($ERR != "ERR_") { $_SESSION['action'] = 2; } else { // set time back to GMT $a_starts = $a_starts - $system->tdiff; $a_ends = $a_starts + $duration * 24 * 60 * 60; // insert auction $query = addauction(); if ($_SESSION['SELL_action'] == "edit") { $query = updateauction(1); } if ($_SESSION['SELL_action'] == "relist") { $query = updateauction(2); } $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); if ($_SESSION['SELL_action'] == "edit" || $_SESSION['SELL_action'] == "relist") { $auction_id = $TPL_auction_id = $_SESSION['SELL_auction_id']; } else { $sql = "SELECT LAST_INSERT_ID() as id"; $res_ = mysql_query($sql); $system->check_mysql($res_, $sql, __LINE__, __FILE__); $auction_id = mysql_result($res_, 0, 'id');