$current_time = strtotime(date("Y-m-d H:i:s")); $data['sold_out'] = null; if ($next_date <= $current_time) { $max_price = get_maxprice($post_id); if ($max_price == 0) { $next_new_time = $next_date + 60 * 5; $new_date = date("Y-m-d H:i:s", $next_new_time); update_post_meta($post_id, "expire_time", $new_date); } else { update_post_meta($post_id, "sold_out", "yes"); $win_data = get_winner_data($post_id); $win_user_id = $win_data['uid']; $msg = "You win product with your bid " . $win_data['price']; $headers = 'From: Online Auction <*****@*****.**>' . "\r\n"; $attachments = ""; $data['sold_out'] = 1; $data['winner_price'] = $win_data['price']; $data['winner_uid'] = $win_data['uid']; $data['winner_name'] = get_the_author_meta("first_name", $win_user_id) . " " . get_the_author_meta("last_name", $win_user_id); } } $data['max_bid_userid'] = 1; $data['number_of_bids'] = get_number_of_bids($post_id); $data['max_bid'] = get_maxprice($post_id); $data['get_nextbid_price'] = get_nextbid_price($post_id); $data['post_view'] = getPostViews($post_id); echo json_encode($data); ?>
<ul class="list-group"> <li class="list-group-item item1"></li> <li class="list-group-item item1"> <strong>ID: #90<?php echo get_the_ID(); ?> </strong> </li> <li class="list-group-item item1"> <i class="fa fa-search bidhistoryicon"></i> Bids: <strong> <span id="number_of_bids"><?php echo get_number_of_bids($post_id); ?> </span> </strong> <span class="pull-right"> <small>Highest</small>: <i class="fa fa-user"></i> <a href="http://at1.wlthemes.com/author/demo/">demo</a> </span> </li> <li class="list-group-item item3"> <span class="pull-right"> <i class="fa fa-line-chart"></i> <span style="float: right;" id="post_view"> <?php echo $post_view; ?> </span> </span> Condition: <strong><?php
echo get_the_content(); ?> " ><span ><?php echo get_the_title(); ?> </span></a> </span> </h3> <div class="row"> <div class="col-md-6 col-sm-6 col-xs-6"> <b>$<?php echo get_field("base_price"); ?> </b> </div> <div class="col-md-6 col-sm-6 col-xs-6 text-right"> <span class="bids"><?php echo get_number_of_bids(get_the_ID()); ?> bids</span> </div> </div> <div class="line1"></div> <?php $cudate = get_post_meta($post_id, "expire_time", true); $next_date = strtotime($cudate); $ndd = date("Y-m-d H:i:s", $next_date); $current_time = strtotime(date("Y-m-d H:i:s")); if ($next_date > $current_time) { ?> <span id='timeleft_<?php echo get_the_ID();