예제 #1
0
파일: sell.php 프로젝트: lavsurgut/autoauc2
         $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');
         $TPL_auction_id = $_SESSION['SELL_auction_id'] = $auction_id;
     }
     $UPLOADED_PICTURES = $_SESSION['UPLOADED_PICTURES'];
     // remove old images if any
     if (is_dir($upload_path . $auction_id)) {
예제 #2
0
파일: sell.php 프로젝트: laughingpain/WeBid
 $_SESSION['SELL_description'] = htmLawed($_SESSION['SELL_description'], $conf);
 $payment_text = implode(', ', $payment);
 // set time back to GMT
 $a_starts = empty($start_now) || $_SESSION['SELL_action'] == 'edit' ? $a_starts - $system->tdiff : time();
 $a_ends = $a_starts + $duration * 24 * 60 * 60;
 // get fee
 $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
예제 #3
0
파일: sell.php 프로젝트: Nozlaf/WeBid
 // finalise start and end times
 $a_starts = empty($start_now) || !$caneditstartdate ? $a_starts : $dt->currentDatetime();
 if ($custom_end == 0) {
     $start_datetime = new DateTime($a_starts, $dt->timezone);
     $start_datetime->add(new DateInterval('P' . $duration . 'D'));
     $a_ends = $start_datetime->format('Y-m-d H:i:s');
 }
 // get fee
 $fee_data = get_fee($minimum_bid, false);
 $fee = $fee_data[0];
 $fee_data = $fee_data[1];
 $requires_premoderation = false;
 // check the auction has not been submitted already
 if (!isset($_SESSION['SELL_submitted'][$_SESSION['SELL_hash']]) || !$_SESSION['SELL_submitted'][$_SESSION['SELL_hash']]) {
     if ($_SESSION['SELL_action'] == 'edit') {
         updateauction();
         $auction_id = $_SESSION['SELL_auction_id'];
     } else {
         // insert auction
         addauction();
         $auction_id = $db->lastInsertId();
         //print_r($db);
         $_SESSION['SELL_auction_id'] = $auction_id;
         if ($system->SETTINGS['use_moderation'] && $system->SETTINGS['auction_moderation']) {
             switch ($system->SETTINGS['new_auction_moderation']) {
                 case 1:
                     $requires_premoderation = true;
                     $query = "UPDATE `" . $DBPrefix . "auctions` SET `suspended` = 1 WHERE id = :auction_id";
                     $params = array();
                     $params[] = array(':auction_id', $auction_id, 'int');
                     $db->query($query, $params);