Example #1
0
 // no fees are due and your not editing the auction so add to the auction count
 if (!($system->SETTINGS['fees'] == 'y' && $system->SETTINGS['fee_type'] == 2 && $fee > 0) && $_SESSION['SELL_action'] != 'edit') {
     // update recursive categories
     update_cat_counters(true, $_SESSION['SELL_sellcat1'], $_SESSION['SELL_sellcat2']);
 }
 // fees are due and you are editing the auction so remove the auction count
 if (!$addcounter && $_SESSION['SELL_action'] == 'edit') {
     // update recursive categories
     update_cat_counters(false, $_SESSION['SELL_sellcat1'], $_SESSION['SELL_sellcat2']);
 }
 // if editing the auction and the categories have been changed
 if ($_SESSION['SELL_action'] == 'edit' && ($_SESSION['SELL_sellcat1'] != $_SESSION['SELL_original_sellcat1'] || $_SESSION['SELL_sellcat2'] != $_SESSION['SELL_original_sellcat2'])) {
     if ($_SESSION['SELL_sellcat1'] != $_SESSION['SELL_original_sellcat1'] || $_SESSION['SELL_sellcat2'] != $_SESSION['SELL_original_sellcat2']) {
         // remove the old category count and add to the new one
         update_cat_counters(false, $_SESSION['SELL_sellcat1'], $_SESSION['SELL_sellcat2']);
         update_cat_counters(true, $_SESSION['SELL_original_sellcat1'], $_SESSION['SELL_original_sellcat2']);
     }
 }
 $UPLOADED_PICTURES = isset($_SESSION['UPLOADED_PICTURES']) ? $_SESSION['UPLOADED_PICTURES'] : array();
 // remove old images if any
 if (is_dir($upload_path . $auction_id)) {
     if ($dir = opendir($upload_path . $auction_id)) {
         while (($file = readdir($dir)) !== false) {
             if (is_file($upload_path . $auction_id . '/' . $file)) {
                 unlink($upload_path . $auction_id . '/' . $file);
             }
         }
         closedir($dir);
     }
 }
 // Create pictures gallery if any
Example #2
0
 } elseif (!$addcounter && $_SESSION['SELL_action'] == 'edit') {
     $query = "UPDATE " . $DBPrefix . "counters SET auctions = auctions - 1";
     $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__);
 }
 if (!($system->SETTINGS['fees'] == 'y' && $system->SETTINGS['fee_type'] == 2 && $fee > 0) && $_SESSION['SELL_action'] != 'edit') {
     // update recursive categories
     update_cat_counters(true, $_SESSION['SELL_sellcat1']);
     if (isset($_SESSION['SELL_sellcat2']) && !empty($_SESSION['SELL_sellcat2'])) {
         update_cat_counters(true, $_SESSION['SELL_sellcat2']);
     }
 }
 if (!$addcounter && $_SESSION['SELL_action'] == 'edit') {
     // update recursive categories
     update_cat_counters(false, $_SESSION['SELL_sellcat1']);
     if (isset($_SESSION['SELL_sellcat2']) && !empty($_SESSION['SELL_sellcat2'])) {
         update_cat_counters(false, $_SESSION['SELL_sellcat2']);
     }
 }
 $UPLOADED_PICTURES = isset($_SESSION['UPLOADED_PICTURES']) ? $_SESSION['UPLOADED_PICTURES'] : array();
 // remove old images if any
 if (is_dir($upload_path . $auction_id)) {
     if ($dir = opendir($upload_path . $auction_id)) {
         while (($file = readdir($dir)) !== false) {
             if (is_file($upload_path . $auction_id . '/' . $file)) {
                 unlink($upload_path . $auction_id . '/' . $file);
             }
         }
         closedir($dir);
     }
 }
 // Create pictures gallery if any