Warning: Constant BID_WIN already defined in /customers/f/1/b/clairexcentrieck.nl/httpd.www/wp-content/plugins/wp-auctions/wp_auctionsjs.php on line 21
Warning: Constant BID_LOSE already defined in /customers/f/1/b/clairexcentrieck.nl/httpd.www/wp-content/plugins/wp-auctions/wp_auctionsjs.php on line 22
Warning: Constant BIN_WIN already defined in /customers/f/1/b/clairexcentrieck.nl/httpd.www/wp-content/plugins/wp-auctions/wp_auctionsjs.php on line 23
Warning: Cannot modify header information - headers already sent by (output started at /customers/f/1/b/clairexcentrieck.nl/httpd.www/wp-content/plugins/wp-auctions/wp_auctionsjs.php:21) in /customers/f/1/b/clairexcentrieck.nl/httpd.www/wp-content/plugins/wp-auctions/wp_auctionsjs.php on line 25
// Popup front-end code
// This code needs to be refactored to consolidate all the similar routines
// AJAX Functions
// Functions are all seperate so we could do different funky stuff with each
var ajax_auction_loading = false;
var ajax_bid_loading = false;
var ajax_other_loading = false;
function ajax_auctions_loading(on) {
if (on) {
ajax_auction_loading = true;
// do funky stuff here
} else {
// clear funky stuff here
ajax_auction_loading = false;
}
}
function ajax_bids_loading(on) {
if (on) {
ajax_bid_loading = true;
// do funky stuff here
} else {
// clear funky stuff here
ajax_bid_loading = false;
}
}
//Ajax.Responders.register({
// onCreate: function(){ Element.show('spinner')},
// onComplete: function(){Element.hide('spinner')}
//});
function ajax_others_loading(on) {
if (on) {
ajax_other_loading = true;
// do funky stuff here
} else {
// clear funky stuff here
ajax_other_loading = false;
}
}
function process_bin(BIN_price) {
// make up replacement text and hidden field
new_string = BIN_price + "(B.I.N. Price)";
new_string = new_string + ""
new_string = new_string + ""
jQuery('#wp-bin-manip').html(new_string);
}
function swap_image(url) {
jQuery('#wp-image-p').fadeOut("slow",function() {
jQuery('#wp-image-p').html('');
} );
jQuery('#wp-image-p').fadeIn();
}
function ajax_auction_request() {
// retreive form data
var auction_id = jQuery("input#formauctionid").val();
var currencysymbol = jQuery("input#currencysymbol").val();
if (ajax_auction_loading) return false;
ajax_auctions_loading ( true );
// new jQuery AJAX routine
jQuery.ajax ({
cache: false,
type: "POST",
url: 'https://www.clairexcentrieck.nl/wp-content/plugins/wp-auctions/wp_auctions.php?queryauction',
data : {
auction_ID : auction_id,
_ajax_nonce: '075ba27109'
},
error: function(request,textStatus,errorThrown) {
alert((request.status!=406? ' WP_Auction Error '+request.status+' : '+request.statusText+'\n' : '')+request.responseText);
},
success: function(request, status) {
ajax_auctions_loading(false);
if (status!="success") alert (status); //"return"
// update auction on screen
auction_details = request.split('|');
// process BIN if there is one (note: only if auction isn't closed)
extraBIN = "";
BIN_price = auction_details[11];
if (BIN_price != 0 && auction_details[8] != 0) {
extraBIN = "B.I.N. price: " + currencysymbol + BIN_price + "";
}
// process extra images if there are any
extraimages = '';
thumbnails = '';
thisimage = 1;
for(var i=0;i<3;i++) {
if (auction_details[12+i] != '') {
if (extraimages != '') {extraimages = extraimages + ", "; }
swapurl = 'Javascript:swap_image("' + auction_details[12+i] + '")';
extraimages = extraimages + "#" + thisimage++ + ""
}
}
// if we DO have extra images, let's append the main image to the end of the list
if (extraimages != '' && auction_details[7] != "") {
swapurl = 'Javascript:swap_image("' + auction_details[7] + '")';
extraimages = "More Images: " + extraimages + ", #" + thisimage + ""
// now let's prep the thumbnails
if (auction_details[18] != '') {
thumbs = auction_details[18].split('^');
for ( i = 0; i < thumbs.length; i++) {
if (thumbs[i].length > 0) {
if ( i < thumbs.length - 1) {
swapurl = 'Javascript:swap_image("' + auction_details[12+i-1] + '")';
} else {
swapurl = 'Javascript:swap_image("' + auction_details[7] + '")'; // special treatment for last one
}
thumbnails = thumbnails + "
";
}
}
//thumbnails = '
More Images:
' + thumbnails; } } // reset value field to form (in case previous BIN messed with this) jQuery('#wp-bin-manip').html(''); // deal with Fixed Price BINs if (auction_details[6] == 0) { process_bin(BIN_price); jQuery('#wp_startb').html("Starting Bid: B.I.N. price below"); jQuery('#wp-extrainfo').html(""); buttoncaption = "Buy Now"; } else { jQuery('#wp_startb').html("Starting Bid: " + currencysymbol+auction_details[6]); jQuery('#wp-extrainfo').html('Bid ' + currencysymbol + auction_details[15] + ' or higher'); buttoncaption = "Bid Now"; } jQuery('#wp-description-p').html(auction_details[2]); //jQuery('#wp-otherimages-p').html(thumbnails); jQuery('#tc-heading-p').html(auction_details[1]); jQuery('#wp_price').html("Current Bid: " + currencysymbol + auction_details[3]); if (auction_details[7] == "") { auction_details[7]='https://www.clairexcentrieck.nl/wp-content/plugins/wp-auctions//requisites/wp-popup-def.gif' } jQuery('#wp-image-p').fadeOut("slow",function() { jQuery('#wp-image-p').html(''+other_details[i*6+2]+'
Current Bid: '+other_details[i*6+5]+'
Current Bid: '+other_details[i*6+6]+'