Advertisement
Guest User

Untitled

a guest
Sep 16th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.77 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  
  5.  * @package WordPress
  6.  
  7.  * @subpackage WPEX WordPress Framework
  8.  
  9.  * Template Name: HomeBK
  10.  
  11.  */
  12.  
  13.  
  14.  
  15. //get template header
  16.  
  17. get_header(); ?>
  18.  
  19.  
  20.  
  21. <div id="home-wrap" class="clearfix">
  22.  
  23. <?php
  24.  
  25. //get tempalte path
  26.  
  27. $template_path = get_template_directory();
  28.  
  29.  
  30.  
  31. //show tagline if setting isn't empty
  32.  
  33. if(of_get_option('home_tagline')) { ?>
  34.  
  35. <div id="home-tagline" class="clearfix">
  36.  
  37.     <?php
  38.  
  39.     //tagline content
  40.  
  41.     echo of_get_option('home_tagline'); ?>
  42.  
  43. </div>
  44.  
  45. <!-- /home-tagline -->
  46.  
  47. <?php }
  48.  
  49.  
  50.  
  51. //show highlights if not disabled
  52.  
  53. //require_once( $template_path . '/includes/home-highlights.php');
  54.  
  55.  
  56.  
  57.  
  58.  
  59. //show recent portfolio if not disabled
  60.  
  61. if(of_get_option('home_portfolio')) {
  62.  
  63. //  require_once( $template_path . '/includes/home-portfolio.php');
  64.  
  65. }
  66.  
  67. ?>
  68.  
  69. <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/circle_hover/css/common.css" />
  70.  
  71. <link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri(); ?>/circle_hover/css/style3.css" />
  72. <script type="text/javascript" src="<?php echo get_template_directory_uri(); ?>/circle_hover/js/modernizr.custom.79639.js"></script>
  73.  
  74.  
  75.  
  76.  
  77. <div class="clearfix">
  78.  
  79.  <div class="bg" style="width: 100%; float: left;">        
  80.     <section class="main">
  81.            
  82.                 <ul class="ch-grid">
  83. <li>
  84.                         <div class="ch-item">
  85.                             <div class="ch-info">
  86.                                 <h3>Register</h3>
  87.                                 <p>Register for free and get points</p>
  88.                             </div>
  89.                             <div class="ch-thumb ch-img-1">
  90.                                 <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/user.png" />
  91.                                 <h3>Register</h3>
  92.                                 @free
  93.                             </div>
  94.                         </div>
  95.                     </li>          
  96.  
  97.         <li>
  98.                         <div class="ch-item">  
  99.                             <div class="ch-info">
  100.                                 <h3>Shop</h3>
  101.                                 <p>follow our link to visit partners & shop as usual
  102.                                 <a href="http://ipri.me/homebk/#portfolio-wrap">View partners</a></p>
  103.                             </div>
  104.                             <div class="ch-thumb ch-img-2">
  105.                                 <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/shopping_cart.png" />
  106.                                 <h3>Shop</h3>
  107.                                 @anywhere
  108.                             </div>
  109.                         </div>
  110.                     </li>
  111.                     <li>
  112.                         <div class="ch-item">
  113.                             <div class="ch-info">
  114.                                 <h3>Earn</h3>
  115.                                 <p>Earn points for you spends at partner stores</p>
  116.                             </div>
  117.                             <div class="ch-thumb ch-img-3">
  118.                                 <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/money_bag.png" />
  119.                                 <h3>Earn</h3>
  120.                                          @cashback
  121.                             </div> 
  122.                         </div>
  123.                     </li>
  124.                     <li>
  125.                         <div class="ch-item">
  126.                             <div class="ch-info">
  127.                                 <h3>Bonus</h3>
  128.                                 <p>Accumulate bonus points for visting & sharing everyday</p>
  129.                             </div>
  130.                             <div class="ch-thumb ch-img-4">
  131.                                 <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/treasure_chest.png" />
  132.                                 <h3>Bonus</h3>
  133.                                 @social
  134.                             </div>
  135.                         </div>
  136.                     </li>
  137.         <li>
  138.                         <div class="ch-item">
  139.                             <div class="ch-info">
  140.                                 <h3>Redeem</h3>
  141.                                 <p>Redeem your points for cashback & vouchers</p>
  142.                             </div>
  143.                             <div class="ch-thumb ch-img-5">
  144.                                 <img src="<?php echo get_template_directory_uri(); ?>/circle_hover/images/icons/trophy.png" />
  145.                                 <h3>Redeem</h3>
  146.                                 @vouchers / cashback
  147.                             </div>
  148.                         </div>
  149.                     </li>
  150.                    
  151.            
  152.                 </ul>
  153.                
  154.             </section>
  155.  
  156.  
  157.  </div>
  158.  
  159.  
  160.  
  161.  <div class="bg" style="width: 100%; float: left; padding: 1% 0% 1% 0.5%;">
  162.  
  163.  <div style="width: 25%; float: left; margin-left: 2%">
  164.  
  165. <div style="
  166.  
  167.     position: absolute;
  168.  
  169.     width: 5%;
  170.  
  171.     height: 5%;
  172.  
  173.     margin-left: -2%;
  174.  
  175.     z-index: 100;
  176.  
  177. "><img src="http://ipri.me/img/offer.png">
  178.  
  179. </div>
  180.  
  181. <?php echo do_shortcode('[layerslider id="2"]'); ?>
  182.  
  183.  </div>
  184. <div class="top-middle">
  185.  <!-- this is the structure required for initing the tabs -->
  186. <div class="wp-tabs wpui-light wpui-tabs-vertical">
  187. <!-- add class   wpui-tabs-vertical  to the above line for vertical tabs -->
  188.  
  189.     <!-- First tab's name -->
  190.     <h3 class="wp-tab-title">Top Colleges</h3>
  191.     <!-- First tab's contents -->
  192.     <div class="wp-tab-content datagrid">
  193.     <table><tbody><thead><tr><th>Campus</th><th>Points</th><th>Users</th></tr></thead>
  194.      <?php
  195.     global $wpdb;
  196.  
  197.      $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");
  198.  
  199.     foreach ( $result as $row ){
  200.   if(round($row->pts,0)<10000)
  201.     {$pts = round($row->pts,0)*10;}
  202.     else {$pts = round($row->pts,0);}
  203.   if(round($row->cnt,0)<100)
  204.     {$cnt = ($row->cnt)*5;}
  205.     else {$cnt = $row->cnt;}
  206.   echo '<tr><td>'.$row->campus.'</td><td>'.$pts.'</td><td>'.$cnt.'</td></tr>';
  207. }
  208.  
  209. ?>
  210. </table>
  211.     </div><!-- end first tab -->
  212.  
  213.       <!-- Like so, Second tab -->
  214.       <h3 class="wp-tab-title">Top Users</h3>
  215.       <div class="wp-tab-content">
  216.             Coming Soon
  217.        </div>
  218. <h3 class="wp-tab-title">Top Merchants</h3>
  219.       <div class="wp-tab-content">
  220.             Coming Soon
  221.        </div>
  222. <h3 class="wp-tab-title">Top Companies</h3>
  223.       <div class="wp-tab-content">
  224.             Coming Soon
  225.        </div>
  226. </div><!-- end div.wp-tabs -->
  227. </div>
  228.  
  229.  <div style="width: 25%; float: right;margin-right: 1%;">
  230.  
  231. <div style="
  232.  
  233.     position: absolute;
  234.  
  235.     width: 5%;
  236.  
  237.     height: 5%;
  238.  
  239.     margin-left: -2%;
  240.  
  241.     z-index: 100;
  242.  
  243. "><img src="http://ipri.me/img/greatdeal.png">
  244.  
  245. </div>
  246.  
  247. <?php echo do_shortcode('[layerslider id="3"]'); ?>
  248.  
  249.  </div>
  250.  
  251. </div>
  252.  
  253. </div>
  254.  
  255. <?php
  256.  
  257. $args = array('post_type'=>'partner',  'post_status' => 'publish',
  258.  
  259.   'posts_per_page' => -1);
  260.  
  261. $posts = get_posts($args);
  262.  
  263.     ?>
  264.  
  265. <div id="filtertest" style="margin-top: 7%;">
  266.  
  267.  
  268.  
  269. <ul id="filters" class="option-set filter" data-option-key="filter">
  270.  
  271.     <li>Filter: </li>
  272.  
  273.     <?php $categories =  get_terms( 'profile'); foreach ($categories as $cat) { ?>
  274.  
  275.     <li><a href="#"<?php if ($cat->slug == 'partner') {?> class="show-subnav filter-item" <?php } else
  276.  
  277.     {?>class="close-subnav filter-item <?php if ( $cat->slug == 'featured'){echo 'active';} ?> " <?php }?>id="<?php echo $cat->slug; ?>"
  278.  
  279.             data-filter=".<?php echo $cat->slug; ?>"><?php echo $cat->name; ?></a></li>
  280.  
  281.     <?php } ?>
  282.  
  283.     <li><a href="#" data-filter="*" id="showall" class="selected close-subnav filter-item">Show All</a></li>
  284.  
  285. </ul>
  286.  
  287.     </div>
  288.  
  289.  
  290.  
  291. <div class="post full-width clearfix bg">
  292.  
  293.  
  294.  
  295.     <div id="portfolio-wrap" class="clearfix">
  296.  
  297.         <div class="portfolio-content">
  298.  
  299.  
  300.  
  301. <?php
  302.  
  303. //start loop
  304.  
  305. foreach($posts as $post) :
  306.  
  307. setup_postdata($post);
  308.  
  309. //get featured image
  310.  
  311. $thumb = get_post_thumbnail_id();
  312.  
  313. $img_url = wp_get_attachment_url($thumb,'full'); //get full URL to image
  314.  
  315.  
  316.  
  317. //crop image//resize & crop the image
  318.  
  319.  
  320.  
  321. //show entry only if it has a featured image
  322.  
  323.  
  324.  
  325. ?>
  326.  
  327.  
  328.  
  329. <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">
  330.  
  331.         <div class="grid-4 partner_mn ">   
  332.  
  333.     <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"
  334.  
  335.     >
  336.  
  337.  
  338.  
  339.         <div class="logo_partner"><?php the_post_thumbnail(array(105)); ?></div>
  340.  
  341.         <div class="type_partner"><?php echo types_render_field("saldesc"); ?></div>
  342.  
  343.         <div class="point_partner pts_num"> <?php echo types_render_field("point"); ?></div>
  344.  
  345.         <div class="desc_partner">points per <?php echo types_render_field("saletype") ;?></div>
  346.  
  347.     </a>
  348.  
  349. <div class="ul_partner">
  350.  
  351.     <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  &nbsp;  &nbsp;</a> <a href="<?php echo get_permalink();  ?>"  target="_blank" style="display: inline" class="wpex-icon-link">  Read more...</a>
  352.  
  353. </div>
  354.  
  355. <div class="ul_partner" style="
  356.  
  357.     font-weight: bolder;
  358.  
  359. ">
  360.  
  361. <?php the_title() ?>
  362.  
  363. </div>
  364.  
  365. </div>
  366.  
  367.  
  368.  
  369. </article>
  370.  
  371. <?php
  372.  
  373.  endforeach;
  374.  
  375. ?>
  376.  
  377.  
  378.  
  379. </div>
  380.  
  381.  
  382.  
  383. </div>
  384.  
  385. </div>
  386.  
  387.  
  388. <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.isotope.min.js"></script>
  389.  
  390. <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/isotope_init.js"></script>
  391.  
  392.  
  393.  
  394.  
  395. <?php
  396.  
  397. //show recent blog posts if not disabled
  398.  
  399. if(of_get_option('home_blog')) {
  400.  
  401.     require_once( $template_path . '/includes/home-blog.php');
  402.  
  403. }
  404.  
  405. ?>
  406.  
  407.  
  408.  
  409. </div><!-- /home-wrap -->  
  410.  
  411. <?php
  412.  
  413. //get template footer
  414.  
  415. get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement