Current Path : /var/test/www/ooareogundevinitiative/wp-content/themes/pain/ |
Current File : /var/test/www/ooareogundevinitiative/wp-content/themes/pain/single-paindonations.php |
<?php get_header(); ?> <?php $jwstheme_options = $GLOBALS['jwstheme_options']; $tb_show_page_title = isset($jwstheme_options['tb_post_show_page_title']) ? $jwstheme_options['tb_post_show_page_title'] : 1; $tb_show_page_breadcrumb = isset($jwstheme_options['tb_post_show_page_breadcrumb']) ? $jwstheme_options['tb_post_show_page_breadcrumb'] : 1; $tb_post_show_post_nav = (int) isset($jwstheme_options['tb_post_show_post_nav']) ? $jwstheme_options['tb_post_show_post_nav']: 1; jwstheme_title_bar($tb_show_page_title, $tb_show_page_breadcrumb, $tb_post_show_post_nav); $currency = apply_filters('tb_currency', TBDonationsPageSetting::$currency); $tb_currency = get_option('tb_currency', 'USD'); $symbol_position = get_option('symbol_position', 0); $symbol = $currency[$tb_currency]['symbol']; $result = apply_filters('tb_getmetadonors', get_the_ID()); $goal = get_post_meta(get_the_ID(),'tbdonations_goals',true); $tbdonations_location = get_post_meta(get_the_ID(), 'tbdonations_location', true); $current_date = current_time('d M o'); $start_date = get_the_date('d M o', get_the_ID()); if(strtotime($start_date) < strtotime($current_date)) $start_date = $current_date; $end_date = get_post_meta(get_the_ID(),'tbdonations_endday',true); $end_date_col = strtotime($end_date); $days_left = round((strtotime($end_date) - strtotime($start_date))/86400); $width = '100'; if($result['raised'] < $goal){ $width = round($result['raised']*100/$goal, 2); } ?> <div class="main-content jw-donation-article"> <div class="row"> <div class="container"> <!-- Start Content --> <div class="col-md-9 content jw-donation"> <?php while ( have_posts() ) : the_post(); $donation_id = get_the_ID(); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="jw-donation-item"> <div class="jw-header"> <?php if (has_post_thumbnail()) the_post_thumbnail('jwstheme_custom_blog_single_size'); ?> <div class="jw-header-inner"> <span class="jw-location"><?php echo esc_attr($tbdonations_location); ?></span> <div class="content-bottom"> <h3 class="jw-title"><?php the_title(); ?></h3> <h6 class="date-time"> <?php echo __('Starting ', 'pain').$start_date.'<span class= "space"> - </span>'.__('Closing ', 'pain').date( 'd M o', $end_date_col ); ?> </h6> <div class="donate-meta"> <div class="donation-money"> <?php if($symbol_position != 1) { $raised_item = $symbol.number_format($result['raised']); $goal_item = $symbol.number_format($goal); } else { $raised_item = number_format($result['raised']).$symbol; $goal_item = number_format($goal).$symbol; } echo '<span class="box_money raised">'.__('Donation Raise: ', 'pain').'<span class="amount">'.$raised_item.'</span></span>'.'<span class="line_box"></span>'.'<span class="box_money goal">'.__('Donation Goal: ', 'pain').'<span class="amount">'.$goal_item.'</span></span>' ?> </div> <?php echo do_shortcode('[tbdonations_form donation_id='.get_the_ID().' label_btn="'.__('Donate Now', 'pain').'" ]'); ?> </div> </div> <div class="donation-result hidden-xs"> <div class="donation-result-innner"> <span class="donate_percent"><?php echo esc_html($width)?>%</span> <span class="donate_donors"><i class="fa fa-heart"></i><?php echo esc_html($result['donors'])?> Donors</span> </div> </div> </div> </div> <div class="jw-content"> <?php the_content(); ?> </div> <div class="tags-causes"> <?php /*$terms = get_terms_per_post_type( 'tbdonationtag', array( 'post_type' => 'tbdonations' ) ); ?> <ul> <?php foreach ( $terms as $term ) { ?> <li><a href="<?php echo get_tag_link($term->term_id); ?>"> <?php echo "$term->name"; ?></a> </li> <?php } ?> </ul> <?php */ ?> </div> </div> </article> <?php endwhile; ?> </div> <!-- End Content --> <!-- Start Right Sidebar --> <div class="col-md-3 sidebar-right"> <?php if (is_active_sidebar('jwstheme-main-sidebar')) { dynamic_sidebar('jwstheme-main-sidebar'); } ?> </div> <!-- End Right Sidebar --> </div> </div> </div> <?php get_footer(); ?>