PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /home/trave494/chappellefoodauctionmall.online/wp-content/themes/PennyTheme/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : /home/trave494/chappellefoodauctionmall.online/wp-content/themes/PennyTheme/single-auction.php |
<?php /*project theme v1.2 */ function pennyTheme_colorbox_stuff() { echo '<link media="screen" rel="stylesheet" href="'.get_bloginfo('template_url').'/css/colorbox.css" />'; /*echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>'; */ ?> <script> var $ = jQuery; $(document).ready(function(){ $("a[rel='image_gal1']").colorbox(); $("a[rel='image_gal2']").colorbox(); }); </script> <?php } add_action('wp_head','pennyTheme_colorbox_stuff'); global $current_user; get_currentuserinfo(); $uid = $current_user->ID; global $wpdb; get_header(); ?> <div class="clear10"></div> <div id="content"> <?php if(function_exists('bcn_display')) { echo '<div class="my_box3"><div class="padd10">'; bcn_display(); echo '</div></div><div class="clear10"></div>'; } ?> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <?php $ending = get_post_meta(get_the_ID(), "ending", true); $views = get_post_meta(get_the_ID(), "views", true); $views = $views + 1; update_post_meta(get_the_ID(), "views", $views); $pid = get_the_ID(); $rnd = rand(1,999); $rets_price = get_post_meta(get_the_ID(), 'retail_price', true); $retail_price = PennyTheme_get_show_price($rets_price); $time_increase = get_post_meta(get_the_ID(), 'time_increase', true); $price_increase = get_post_meta(get_the_ID(), 'price_increase', true); $current_bid = PennyTheme_get_show_price(get_post_meta(get_the_ID(), 'current_bid', true)); $closed = get_post_meta(get_the_ID(), 'closed', true); $time_increase = get_post_meta(get_the_ID(), 'time_increase', true); $bidding_ended = 0; $ending = get_post_meta(get_the_ID(), 'ending', true); $sec = get_post_meta(get_the_ID(), 'ending', true) - current_time('timestamp',0); if($sec < 0) $bidding_ended = 1; //if($closed == "0") $bidding_ended = 1; //------------ $hgb = PennyTheme_get_highest_bid_owner_obj($pid); $highest_bidder = PennyTheme_get_highest_bid_owner($pid); $user = get_userdata($highest_bidder); if($highest_bidder == false) $$highest_bidder = "0"; else $highest_bidder = $user->user_login; //------------ ?> <div class="my_box3"> <div class="padd10"> <div class="box_title auction_page_title"><h1><?php the_title() ?></h1></div> <div class="box_content"> <div class="auction-page-image-holder"> <img class="img_class" src="<?php echo PennyTheme_get_first_post_image(get_the_ID(), 320, 220); ?>" alt="<?php the_title(); ?>" /> <?php $arr = PennyTheme_get_post_images(get_the_ID(), 4); if($arr) { echo '<ul class="image-gallery" style="padding-top:10px">'; foreach($arr as $image) { echo '<li><a href="'.PennyTheme_generate_thumb($image, -1,600).'" rel="image_gal1"><img src="'.PennyTheme_generate_thumb($image, 72,60).'" class="img_class" /></a></li>'; } echo '</ul>'; } //else { echo __('No images.') ;} ?> </div> <div class="auction-page-details-holder"> <?php $buy_now = get_post_meta(get_the_ID(), 'buy_now', true); if(is_numeric($buy_now) and !empty($buy_now)) { ?> <div class="auction-current-price"> <div class="padd10"> <ul> <li> <h3><?php _e("Buy Now","PennyTheme"); ?>:</h3> <p><?php echo pennytheme_get_show_price($buy_now); ?></p> </li> </ul> </div> </div> <div class="clear5"></div> <div class="auction-current-bidnow"> <a href="<?php bloginfo('siteurl'); ?>/?a_action=buy_now&pid=<?php the_ID(); ?>" class="mm_bid_mm_buy" rel="<?php the_ID(); ?>"><?php _e("BUY NOW",'PennyTheme'); ?></a> </div> <div class="clear5"></div> <?php } ?> <div class="auction-current-price"> <div class="padd10"> <ul> <li> <h3><?php _e("Current Price","PennyTheme"); ?>:</h3> <p><span id="my-current-price_<?php the_ID(); ?>_<?php echo $rnd; ?>"><?php echo $current_bid; ?></span></p> </li> </ul> </div> </div> <div class="clear5"></div> <div class="auction-current-time2" > <div class="auction-current-time" id="my-auction-time_<?php the_ID(); ?>_<?php echo $rnd; ?>"><?php if($bidding_ended != 1): echo $sec; endif; ?></div></div> <div class="clear5"></div> <div class="auction-current-bidnow"> <?php if($bidding_ended == 1): _e('Bidding Ended','PennyTheme'); else: ?> <input type="hidden" class="my-total-ids-no-delete" value="<?php the_ID(); ?>_<?php echo $rnd; ?>" /> <a href="#" class="mm_bid_mm" rel="<?php the_ID(); ?>"><?php _e("BID NOW",'PennyTheme'); ?></a> <?php endif; ?> </div> <div class="clear5"></div> <div class="clear5"></div> <div class="auction-bid-increases"> <?php printf(__("Each bid increases the auction price by %s", ""), PennyTheme_get_show_price($price_increase)); ?> </div> <div class="clear5_1"></div> <div class="auction-bid-increases" id="hghbdif" style="padding:4px"><input type="hidden" value="<?php echo $hgb->id; ?>" id="highest-bidder-bid-id" /> <?php _e("Highest bidder",'PennyTheme'); ?>: <strong><span id="highest_bidder_<?php the_ID(); ?>_<?php echo $rnd; ?>"> <?php echo $highest_bidder; ?></span></strong> </div> <div class="clear10"></div> <div class="auction-other-dets"> <div class="padd10"> <ul> <?php if(!empty($rets_price)): ?> <li> <h3><?php _e("Retail Price",'PennyTheme'); ?>:</h3> <p><?php echo $retail_price; ?></p> </li> <?php endif; ?> <li> <h3><?php printf(__("Timer increase",'PennyTheme'), $savings); ?>:</h3> <p><?php echo sprintf(__("%s seconds"), $time_increase); ?></p> </li> </ul> </div> </div> <!-- #### --> </div> </div> </div> </div> <div class="clear10"></div> <!-- ####################### --> <div class="my_box3"> <div class="padd10"> <div class="box_title"><?php echo __("Description","PennyTheme"); ?></div> <div class="box_content description"> <p><?php the_content(); ?></p> </div> </div> </div> <div class="clear10"></div> <!-- ####################### --> <div class="my_box3"> <div class="padd10"> <div class="box_title"><?php echo __("Image Gallery",'PennyTheme'); ?></div> <div class="box_content"> <?php $arr = PennyTheme_get_post_images(get_the_ID()); if($arr) { echo '<ul class="image-gallery">'; foreach($arr as $image) { echo '<li><a href="'.PennyTheme_generate_thumb($image, -1,600).'" class="cboxElement" rel="image_gal2"><img src="'.PennyTheme_generate_thumb($image, 100,80).'" class="img_class" /></a></li>'; } echo '</ul>'; } else { echo __('No images.','PennyTheme') ;} ?> </div> </div> </div> <!-- ####################### --> <?php endwhile; // end of the loop. ?> </div> <?php echo '<div id="right-sidebar" class="page-sidebar">'; echo '<ul class="xoxo">'; ?> <li class="widget-container widget_text" id="ad-other-details"> <h3 class="widget-title"><?php _e("Bidding List",'PennyTheme'); ?></h3> <p > <div id="my_bid_list"> <?php $closed = get_post_meta($pid, 'closed', true); $post = get_post($pid); global $wpdb; $bids = "select * from ".$wpdb->prefix."penny_bids where pid='$pid' order by id DESC limit 13"; $res = $wpdb->get_results($bids); if(count($res) > 0) { echo '<table width="100%">'; echo '<thead><tr>'; echo '<th>'.__('Username','PennyTheme').'</th>'; echo '<th>'.__('Bid Amount','PennyTheme').'</th>'; // echo '<th>'.__('Date Made','PennyTheme').'</th>'; echo '</tr></thead><tbody>'; //------------- foreach($res as $row) { $user = get_userdata($row->uid); echo '<tr>'; echo '<th>'.$user->user_login.'</th>'; echo '<th>'.PennyTheme_get_show_price($row->bid).'</th>'; // echo '<th>'.date("d-M-Y H:i:s", $row->date_made).'</th>'; echo '</tr>'; } echo '</tbody></table>'; } else _e("No bids placed yet.",'PennyTheme'); ?> </div> </p> </li> <li class="widget-container widget_text"> <h3 class="widget-title"><?php _e("Watch List",'PennyTheme'); ?></h3> <p class="watch-list"> <?php if(is_user_logged_in()) { global $current_user; get_currentuserinfo(); $uid = $current_user->ID; if(PennyTheme_check_if_pid_is_in_watchlist(get_the_ID(), $uid) == false) $isIn_watchlist = 0; else $isIn_watchlist = 1; } else { $isIn_watchlist = 0; } if($isIn_watchlist == 1): ?> <a class="rem-to-watchlist" rel="<?php the_ID(); ?>" href="<?php bloginfo('siteurl') ?>/?remove_from_watchlist=<?php the_ID() ?>&ret_url=<?php echo urlencode(PennyTheme_curPageURL()); ?>"><?php _e('Remove from watchlist','PennyTheme'); ?></a> <?php else: ?> <a class="add-to-watchlist" rel="<?php the_ID(); ?>" href="<?php bloginfo('siteurl') ?>/?add_to_watchlist=<?php the_ID() ?>&ret_url=<?php echo urlencode(PennyTheme_curPageURL()); ?>"><?php _e('Add to watchlist','PennyTheme'); ?></a> <?php endif; ?> </p> </li> <li class="widget-container widget_text"> <h3 class="widget-title"><?php _e("Bid Assistant",'PennyTheme'); ?></h3> <p > <?php global $wpdb, $current_user; get_currentuserinfo(); if(isset($_GET['delete_this'])): if(is_user_logged_in()): if($_GET['delete_this'] == $current_user->ID): $sql = "delete from ".$wpdb->prefix."penny_assistant where pid='$pid' AND uid='{$current_user->ID}'"; $wpdb->query($sql); endif; endif; endif; global $wpdb; if(isset($_POST['set_bid_assistant'])) { if(is_user_logged_in()) { $uid = $current_user->ID; $cr = trim($_POST['max_credits']); $sj = "select * from ".$wpdb->prefix."penny_assistant where pid='$pid' And uid='$uid'"; $r = $wpdb->get_results($sj); if(count($r) == 0) { $tm = current_time('timestamp',0); $sj = "insert into ".$wpdb->prefix."penny_assistant (pid,uid,date_made,credits_start,credits_current) values('$pid','$uid','$tm','$cr','$cr')"; $wpdb->query($sj); //PennyTheme_set_after_set_credits_to_use($pid); } else { $row = $r[0]; $sql = "update ".$wpdb->prefix."penny_assistant set credits_start='$cr', credits_current='$cr' where id='{$row->id}' "; $wpdb->query($sql); //PennyTheme_set_after_set_credits_to_use($pid); } //check if im the highest bidder ? $wpdb->query('SET autocommit=1'); PennyTheme_set_after_set_credits_to_use($pid); //------------------------- } else { echo __('You need to login to use the bid assistant!','PennyTheme').'<br/>'; } } global $wpdb, $current_user; get_currentuserinfo(); $showfrm = 1; if(is_user_logged_in()) { $sk = "select * from ".$wpdb->prefix."penny_assistant where pid='$pid' And uid='$uid'"; $r = $wpdb->get_results($sk); if(count($r) > 0) { $showfrm = 0; $rhm = $r[0]; } $crcr = get_user_meta($current_user->ID, 'user_credits',true); echo 'Your credits: <span class="balance2">'.$crcr.'</span> <br/>'; } ?> <?php //if($showfrm == 1): ?> <form method="post"> <?php echo __('Credits to use','PennyTheme'); ?>: <input type="text" size="4" name="max_credits" /> <input type="submit" name="set_bid_assistant" value="Submit" /> </form> <?php //endif; ?> <?php if($showfrm == 0): ?> <br/> <?php if(PennyTheme_using_permalinks()) { $slnk = get_permalink($pid).'?delete_this='.$current_user->ID; } else $slnk = get_permalink($pid).'&delete_this='.$current_user->ID; echo '<input type="hidden" id="my_pid_pid" value="'.$pid.'"/>'; echo sprintf(__('You have the bid assistant live with this auction.<br/><br/> Max credits: %s<br/> Credits Used: <span class="credits-used">%s</span><br/><br/> <a href="%s">Delete This</a>', 'PennyTheme'), $rhm->credits_start, ($rhm->credits_start - $rhm->credits_current) , $slnk ); ?> <?php endif; ?> </p> </li> <li class="widget-container widget_text" id="ad-other-details"> <h3 class="widget-title"><?php _e("Share Options",'PennyTheme'); ?></h3> <p> <div class="add-this"> <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a> <a class="addthis_counter addthis_bubble_style"></a> </div> <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4df68b4a2795dcd9"></script> <!-- AddThis Button END --> </div> </p> </li> <?php dynamic_sidebar( 'auction-widget-area' ); echo '</ul>'; echo '</div>'; //classified theme v 6 get_footer(); ?>