Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package WordPress
- * @subpackage WPEX WordPress Framework
- * Template Name: HomeBK
- */
- //get template header
- get_header(); ?>
- <div id="home-wrap" class="clearfix">
- <?php
- //get tempalte path
- $template_path = get_template_directory();
- //show tagline if setting isn't empty
- if(of_get_option('home_tagline')) { ?>
- <div id="home-tagline" class="clearfix">
- <?php
- //tagline content
- echo of_get_option('home_tagline'); ?>
- </div>
- <!-- /home-tagline -->
- <?php }
- //show highlights if not disabled
- //require_once( $template_path . '/includes/home-highlights.php');
- //show recent portfolio if not disabled
- if(of_get_option('home_portfolio')) {
- // require_once( $template_path . '/includes/home-portfolio.php');
- }
- ?>
- <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/circle_hover/css/common.css" />
- <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/circle_hover/css/style3.css" />
- <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/circle_hover/js/modernizr.custom.79639.js"></script>
- <div class="clearfix">
- <div class="bg" style="width: 100%; float: left;">
- <section class="main">
- <ul class="ch-grid">
- <li>
- <div class="ch-item">
- <div class="ch-info">
- <h3>Register</h3>
- <p>Register for free and get points</p>
- </div>
- <div class="ch-thumb ch-img-1">
- <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/user.png" />
- <h3>Register</h3>
- @free
- </div>
- </div>
- </li>
- <li>
- <div class="ch-item">
- <div class="ch-info">
- <h3>Shop</h3>
- <p>follow our link to visit partners & shop as usual
- <a href="http://ipri.me/homebk/#portfolio-wrap">View partners</a></p>
- </div>
- <div class="ch-thumb ch-img-2">
- <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/shopping_cart.png" />
- <h3>Shop</h3>
- @anywhere
- </div>
- </div>
- </li>
- <li>
- <div class="ch-item">
- <div class="ch-info">
- <h3>Earn</h3>
- <p>Earn points for you spends at partner stores</p>
- </div>
- <div class="ch-thumb ch-img-3">
- <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/money_bag.png" />
- <h3>Earn</h3>
- @cashback
- </div>
- </div>
- </li>
- <li>
- <div class="ch-item">
- <div class="ch-info">
- <h3>Bonus</h3>
- <p>Accumulate bonus points for visting & sharing everyday</p>
- </div>
- <div class="ch-thumb ch-img-4">
- <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/treasure_chest.png" />
- <h3>Bonus</h3>
- @social
- </div>
- </div>
- </li>
- <li>
- <div class="ch-item">
- <div class="ch-info">
- <h3>Redeem</h3>
- <p>Redeem your points for cashback & vouchers</p>
- </div>
- <div class="ch-thumb ch-img-5">
- <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/trophy.png" />
- <h3>Redeem</h3>
- @vouchers / cashback
- </div>
- </div>
- </li>
- </ul>
- </section>
- </div>
- <div class="bg" style="width: 100%; float: left; padding: 1% 0% 1% 0.5%;">
- <div style="width: 25%; float: left; margin-left: 2%">
- <div style="
- position: absolute;
- width: 5%;
- height: 5%;
- margin-left: -2%;
- z-index: 100;
- "><img src="http://ipri.me/img/offer.png">
- </div>
- <?php echo do_shortcode('[layerslider id="2"]'); ?>
- </div>
- <div class="top-middle">
- <!-- this is the structure required for initing the tabs -->
- <div class="wp-tabs wpui-light wpui-tabs-vertical">
- <!-- add class wpui-tabs-vertical to the above line for vertical tabs -->
- <!-- First tab's name -->
- <h3 class="wp-tab-title">Top Colleges</h3>
- <!-- First tab's contents -->
- <div class="wp-tab-content datagrid">
- <table><tbody><thead><tr><th>Campus</th><th>Points</th><th>Users</th></tr></thead>
- <?php
- global $wpdb;
- $result = $wpdb->get_results("SELECT * from (Select campus,sum(pot_total) as pts, count(id) as cnt FROM `wp_pointsummary` group by campus)a where campus not in ('Others','IIT XYZ') order by pts desc limit 5");
- foreach ( $result as $row ){
- if(round($row->pts,0)<10000)
- {$pts = round($row->pts,0)*10;}
- else {$pts = round($row->pts,0);}
- if(round($row->cnt,0)<100)
- {$cnt = ($row->cnt)*5;}
- else {$cnt = $row->cnt;}
- echo '<tr><td>'.$row->campus.'</td><td>'.$pts.'</td><td>'.$cnt.'</td></tr>';
- }
- ?>
- </table>
- </div><!-- end first tab -->
- <!-- Like so, Second tab -->
- <h3 class="wp-tab-title">Top Users</h3>
- <div class="wp-tab-content">
- Coming Soon
- </div>
- <h3 class="wp-tab-title">Top Merchants</h3>
- <div class="wp-tab-content">
- Coming Soon
- </div>
- <h3 class="wp-tab-title">Top Companies</h3>
- <div class="wp-tab-content">
- Coming Soon
- </div>
- </div><!-- end div.wp-tabs -->
- </div>
- <div style="width: 25%; float: right;margin-right: 1%;">
- <div style="
- position: absolute;
- width: 5%;
- height: 5%;
- margin-left: -2%;
- z-index: 100;
- "><img src="http://ipri.me/img/greatdeal.png">
- </div>
- <?php echo do_shortcode('[layerslider id="3"]'); ?>
- </div>
- </div>
- </div>
- <?php
- $args = array('post_type'=>'partner', 'post_status' => 'publish',
- 'posts_per_page' => -1);
- $posts = get_posts($args);
- ?>
- <div id="filtertest" style="margin-top: 7%;">
- <ul id="filters" class="option-set filter" data-option-key="filter">
- <li>Filter: </li>
- <?php $categories = get_terms( 'profile'); foreach ($categories as $cat) { ?>
- <li><a href="#"<?php if ($cat->slug == 'partner') {?> class="show-subnav filter-item" <?php } else
- {?>class="close-subnav filter-item <?php if ( $cat->slug == 'featured'){echo 'active';} ?> " <?php }?>id="<?php echo $cat->slug; ?>"
- data-filter=".<?php echo $cat->slug; ?>"><?php echo $cat->name; ?></a></li>
- <?php } ?>
- <li><a href="#" data-filter="*" id="showall" class="selected close-subnav filter-item">Show All</a></li>
- </ul>
- </div>
- <div class="post full-width clearfix bg">
- <div id="portfolio-wrap" class="clearfix">
- <div class="portfolio-content">
- <?php
- //start loop
- foreach($posts as $post) :
- setup_postdata($post);
- //get featured image
- $thumb = get_post_thumbnail_id();
- $img_url = wp_get_attachment_url($thumb,'full'); //get full URL to image
- //crop image//resize & crop the image
- //show entry only if it has a featured image
- ?>
- <article class="portfolio-item sum_partner port-file <?php $post_cats = get_the_terms( $post->ID, 'profile' ); foreach( $post_cats as $category ) { echo $category->slug.' ';} ?>" data-category="partner">
- <div class="grid-4 partner_mn ">
- <a class="" href="<?php if(do_shortcode(types_render_field("llinq"))==''){ echo get_permalink();} else{ echo do_shortcode(types_render_field("llinq"));} ?>" target="_blank" rel="portfolio"
- >
- <div class="logo_partner"><?php the_post_thumbnail(array(105)); ?></div>
- <div class="type_partner"><?php echo types_render_field("saldesc"); ?></div>
- <div class="point_partner pts_num"> <?php echo types_render_field("point"); ?></div>
- <div class="desc_partner">points per <?php echo types_render_field("saletype") ;?></div>
- </a>
- <div class="ul_partner">
- <a href="<?php if(do_shortcode(types_render_field("llinq"))==''){ echo get_permalink();} else{ echo do_shortcode(types_render_field("llinq"));} ?>" target="_blank" style="display: inline" class="wpex-icon-external-link"> Unique Link </a> <a href="<?php echo get_permalink(); ?>" target="_blank" style="display: inline" class="wpex-icon-link"> Read more...</a>
- </div>
- <div class="ul_partner" style="
- font-weight: bolder;
- ">
- <?php the_title() ?>
- </div>
- </div>
- </article>
- <?php
- endforeach;
- ?>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.isotope.min.js"></script>
- <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/isotope_init.js"></script>
- <?php
- //show recent blog posts if not disabled
- if(of_get_option('home_blog')) {
- require_once( $template_path . '/includes/home-blog.php');
- }
- ?>
- </div><!-- /home-wrap -->
- <?php
- //get template footer
- get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement