var datetimeserver= new Date( 1743718349000 ).getTime();
var localtime = new Date().getTime();
$(document).ready(function() {
$('.popoverl').popover({
trigger: 'hover',
'placement': 'left'
});
$('[data-toggle="popover"]').popover({
trigger: 'hover',
'container': 'body',
'placement': 'top'
});
$('.slideshow').fancybox({
prevEffect: 'none',
nextEffect: 'none',
nextClick: true,
helpers: {
thumbs: {
width: 120,
height: 120
},
overlay: {
locked: false
}
}
});
get_sell_update();
//updateTime();
setInterval("updateTime();", 500);
setInterval("get_sell_update();", 15000);
var showChar = 300; // How many characters are shown by default
var ellipsestext = "...";
var moretext = "Zeige mehr >";
var lesstext = "Zeige weniger";
/*
$('.more').each(function() {
var content = $(this).html();
content = $(this).text();
if(content.length > showChar) {
var c = content.substr(0, showChar);
var h = content.substr(showChar, content.length - showChar);
var html = c + '' + ellipsestext+ ' ' + h + ' ' + moretext + '';
$(this).html(html);
}
});
*/
$(".morelink").click(function(){
if($(this).hasClass("less")) {
$(this).removeClass("less");
$(this).html(moretext);
} else {
$(this).addClass("less");
$(this).html(lesstext);
}
$(this).parent().prev().toggle();
$(this).prev().toggle();
return false;
});
} );
function updateTime() {
var tempString="";
var tempID="";
var beendeID="";
var d = new Date();
//console.log(d);
$( ".myid" ).each(function(index) {
tempID=$(this).val();
var d = new Date($( "#endtime"+$(this).val() ).val()* 1000);
var tempString=get_time_diff(d);
if(tempString=='-1'){
beendeID=tempID;
if($("#price"+$(this).val()).val()!='Beendet!'){
//$("#price"+beendeID).val('Beendet!');
$.get( "/mode/buy.form.php?sell_id="+$(this).val(), function( data,status,xhr ) {
$( "#"+data.match(/(myDivForm\d+)/gi)[0] ).html( data );
});
}
//return true;
//get_sell_update();
}else{
if($(this).val() ==51){
console.log($( "#updatetime"+$(this).val() ) );
}
$( "#updatetime"+$(this).val() ).html(get_time_diff(d));
}
});
}
function get_time_diff( datetime )
{
//console.log(datetime);
var datetime = typeof datetime !== 'undefined' ? datetime : "2014-01-01 01:02:03.123456";
var datetime = new Date( datetime ).getTime();
var now = new Date().getTime();
if( isNaN(datetime) )
{
return "";
}
//console.log( datetime + " " + now);
var milisec_diff = datetime - now + (localtime - datetimeserver);
if(milisec_diff<=0) return "-1";
/*
if (datetime < now) {
return "-1";
//var milisec_diff = now - datetime + (localtime - datetimeserver);
}else{
//return "-1";
var milisec_diff = datetime - now + (localtime - datetimeserver);
}
*/
var days = Math.floor(milisec_diff / 1000 / 60 / (60 * 24));
var date_diff = new Date( milisec_diff );
//alert (date_diff);
milisec_diff = milisec_diff/1000;
var seconds = Math.floor(milisec_diff % 60);
milisec_diff = milisec_diff/60;
var minutes = Math.floor(milisec_diff % 60);
milisec_diff = milisec_diff/60;
var hours = Math.floor(milisec_diff % 24);
var days = Math.floor(milisec_diff/24);
//console.log(days + " Tage : "+ hours + " Std : " + minutes + " Min : " + seconds + " Sek");
//return days + " Tage "+ hours + " Std " + minutes + " Min " + seconds + " Sek";
return days + " Tage : "+ hours + " Std : " + minutes + " Min : " + seconds + " Sek";
}
function get_sell_update() {
$.get(
'get_sell_update.php',
{
nc: new Date().getTime()
},
function(data) {
$('#updateout').html(data);
}
);
}
function minBid(id,minval){
if($('#price'+id).val()
Sind Sie sicher?
Sind Sie sicher?