Example #1
0
     if ($can_add_directly) {
         printf(__("Auction reactivated successfully. Auction id is %d", "wdm-ultimate-auction"), $post_id);
     } else {
         echo wdm_auction_listing_charge($post_id, $auction_title, $amt, $currency_code, 'be');
     }
 } else {
     update_post_meta($post_id, 'wdm-auth-key', md5(time() . rand()));
     if (isset($_POST["start_date"]) && !empty($_POST["start_date"])) {
         add_post_meta($post_id, 'wdm_creation_time', date($_POST["start_date"]));
     } else {
         add_post_meta($post_id, 'wdm_creation_time', date("Y-m-d H:i:s", time()));
     }
     if ($can_add_directly) {
         printf(__("Auction created successfully. Auction id is %d", "wdm-ultimate-auction"), $post_id);
     } else {
         echo wdm_auction_listing_charge($post_id, $auction_title, $amt, $currency_code, 'be');
     }
 }
 echo "</strong></p></div>";
 if (isset($_POST["start_date"]) && !empty($_POST["start_date"])) {
     $temp = term_exists('scheduled', 'auction-status');
     wp_set_post_terms($post_id, $temp["term_id"], 'auction-status');
     update_post_meta($post_id, 'wdm_creation_time', date($_POST["start_date"]));
 } else {
     $temp = term_exists('live', 'auction-status');
     wp_set_post_terms($post_id, $temp["term_id"], 'auction-status');
 }
 update_post_meta($post_id, 'wdm_product_image_gallery', $_POST["product_image_gallery"]);
 /**
  * Update Digital product File
  */
         $add_user_auction .= '</div>';
     }
 } else {
     update_post_meta($post_id, 'wdm-auth-key', md5(time() . rand()));
     if (isset($_POST["start_date"]) && !empty($_POST["start_date"])) {
         add_post_meta($post_id, 'wdm_creation_time', date($_POST["start_date"]));
     } else {
         add_post_meta($post_id, 'wdm_creation_time', date("Y-m-d H:i:s", time()));
     }
     if ($can_add_directly) {
         $add_user_auction .= '<div class="wdm_auc_user_notice_suc">';
         $add_user_auction .= sprintf(__("Auction created successfully. Auction id is %d", "wdm-ultimate-auction"), $post_id);
         $add_user_auction .= '</div>';
     } else {
         $add_user_auction .= '<div class="wdm_auc_user_notice_chg">';
         $add_user_auction .= wdm_auction_listing_charge($post_id, $auction_title, $amt, $currency_code, 'fe');
         $add_user_auction .= '</div>';
     }
 }
 if (isset($_POST["start_date"]) && !empty($_POST["start_date"])) {
     $temp = term_exists('scheduled', 'auction-status');
     wp_set_post_terms($post_id, $temp["term_id"], 'auction-status');
     update_post_meta($post_id, 'wdm_creation_time', date($_POST["start_date"]));
 } else {
     $temp = term_exists('live', 'auction-status');
     wp_set_post_terms($post_id, $temp["term_id"], 'auction-status');
 }
 update_post_meta($post_id, 'wdm_product_image_gallery', $_POST["product_image_gallery"]);
 //update options
 for ($u = 1; $u <= 4; $u++) {
     update_post_meta($post_id, "wdm-image-" . $u, $_POST["auction_image_" . $u]);