Advertisement
rejuancse

single-fixtured

Jan 23rd, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 58.03 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php
  4. $blogtime = current_time( 'mysql' );
  5. $match_date = get_post_meta(get_the_ID(),'themeum_datetime',true);
  6.  
  7. $datetime1  = new DateTime($blogtime);
  8. $datetime2  = new DateTime($match_date);
  9. $interval   = $datetime1->diff($datetime2);
  10.  
  11. if($interval->invert == '0'){ ?>
  12.     <div class="club-profile">
  13.         <div class="container match-result-wrapper" style="margin-top: 30px">
  14.             <div class="row">
  15.                 <?php get_template_part('lib/sub-header');
  16.                 $image_banner  = wp_get_attachment_url(get_post_thumbnail_id(get_the_ID()));  ?>
  17.                 <div class="col-sm-12 club-profile-wrap">
  18.                     <div class="themeum-match-banner league-banner" style="background-image:url(<?php echo $image_banner; ?>); background-size: cover; background-position: 50% 50%;padding:40px 0 50px">
  19.                         <!-- Next Match Title -->
  20.                         <div class="next-match-title text-center">
  21.                             <?php if(count($posts) >= 1): ?>
  22.                                 <span class="league-title"><?php _e('Next Match','themeum-core'); ?></span>
  23.                             <?php else: ?>
  24.                                 <span class="league-title"><?php single_term_title(); ?></span>
  25.                             <?php endif; ?>
  26.                         </div>
  27.                         <!-- End Title -->
  28.                         <?php $match_date = get_post_meta(get_the_ID(),'themeum_datetime',true); ?>
  29.  
  30.                         <!-- Upcoming Match Countdown -->
  31.                         <div class="match-counter-class text-center" data-date="'<?php echo esc_attr($match_date);?>">
  32.                           <div id="upcoming-match-countdown">
  33.                               <div class="countdown-section">
  34.                                   <span class="first-item counter-days"></span>
  35.                                   <span class="countdown-text"><?php esc_html_e('Days', 'calcio') ?></span>
  36.                               </div> <!-- Day End -->
  37.                               <div class="countdown-section">
  38.                                   <span class="counter-hours"></span>
  39.                                   <span class="countdown-text"><?php esc_html_e('Hours', 'calcio') ?></span>
  40.                               </div> <!-- Hour End -->
  41.                               <div class="countdown-section">
  42.                                   <span class="counter-minutes"></span>
  43.                                   <span class="countdown-text"><?php esc_html_e('Minutes', 'calcio') ?></span>
  44.                               </div> <!-- Minutes End -->
  45.                               <div class="countdown-section">
  46.                                   <span class="counter-seconds"></span>
  47.                                   <span class="countdown-text"><?php esc_html_e('Seconds', 'calcio') ?></span>
  48.                               </div> <!-- Second End -->
  49.                           </div>
  50.                         </div>
  51.                         <!-- End match Countdown -->
  52.                     </div>
  53.                 </div>
  54.  
  55.                 <?php if ( have_posts() ) : the_post(); ?>
  56.                     <?php
  57.                         # Club Name
  58.                        $team_1_group    = get_post_meta(get_the_ID(),'team_1_group',true);
  59.                         $team_2_group    = get_post_meta(get_the_ID(),'team_2_group',true);
  60.                         $match_result_group    = get_post_meta(get_the_ID(),'match_result_group',true);
  61.                         $venue  = get_post_meta( get_the_ID(), 'match_venue', true );
  62.                     ?>
  63.                     <div class="club-name-list">
  64.                         <div class="club-one-wrap col-xs-12 col-sm-5 col-md-5">
  65.                             <div class="matech-team pull-right">
  66.                                 <div class="icon-left">
  67.                                     <?php if( isset($team_1_group['themeum_club_name1']) ): ?>
  68.                                         <img width="61" src="<?php echo themeum_logo_url_by_id($team_1_group['themeum_club_name1']); ?>" alt="<?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?>">
  69.                                     <?php endif; ?>
  70.                                 </div>
  71.                                 <div class="title">
  72.                                     <?php if( isset($team_1_group['themeum_club_name1']) ): ?>
  73.                                         <h4><?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?></h4>
  74.                                     <?php endif; ?>
  75.                                 </div>
  76.                             </div>
  77.                         </div>
  78.                         <?php if(count($posts) >= 1): ?>
  79.                             <div class="col-xs-12 col-sm-2 col-md-2 score match-time">
  80.                                 <p class="time"><?php echo date_i18n("d M Y h:i A", strtotime($match_date)); ?></p>
  81.                                 <p class="venue"><?php echo $venue; ?></p>
  82.                             </div>
  83.                         <?php endif; ?>
  84.                         <!-- Team Two Result -->
  85.                         <div class="club-one-wrap col-xs-12 col-sm-5 col-md-5">
  86.                             <div class="matech-team pull-left">
  87.                                 <div class="icon-right">
  88.                                     <?php if( isset($team_2_group['themeum_club_name2']) ): ?>
  89.                                         <img width="61" src="<?php echo themeum_logo_url_by_id($team_2_group['themeum_club_name2']); ?>" alt="<?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?>">
  90.                                     <?php endif; ?>
  91.                                 </div>
  92.                                 <div class="title">
  93.                                     <?php if( isset($team_2_group['themeum_club_name2']) ): ?>
  94.                                         <h4><?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?></h4>
  95.                                     <?php endif; ?>
  96.                                 </div>
  97.                             </div>
  98.                         </div>
  99.                         <!-- Team Two Result End -->    
  100.                     </div> <!--match-banner-->
  101.  
  102.                     <div class="match-details">
  103.                         <div class="container">
  104.                             <div class="row">
  105.                                 <div class="match-details-inner">      
  106.                                     <?php
  107.                                     $queried_object = get_queried_object();
  108.                                     $league_id[] = $queried_object;
  109.                                     $tournament_name =get_terms('tournament'); ?>
  110.  
  111.                                     <div class="fixture-teams-list">
  112.                                         <?php foreach ($tournament_name as $value) {
  113.                                             $args = array(
  114.                                                 'post_type'       => 'fixture-result',
  115.                                                 'tax_query'       => array(
  116.                                                     array(
  117.                                                         'taxonomy' => 'tournament',
  118.                                                         'terms'    =>$value->term_id
  119.                                                     ),    
  120.                                                 ),
  121.                                             );
  122.  
  123.                                             $posts  = get_posts($args);
  124.  
  125.                                             $team_1_group     = get_post_meta( get_the_ID(),'team_1_group',true );
  126.                                             $team_2_group     = get_post_meta( get_the_ID(),'team_2_group',true );
  127.                                             $home_ground      = get_post_meta( get_the_ID(),'themeum_home_ground',true );
  128.                                             $datetime         = get_post_meta( get_the_ID(),'themeum_datetime',true );
  129.                                             $gmt              = get_post_meta( get_the_ID(),'themeum_gmt',true ); ?>
  130.  
  131.                                             <div class="fixture-team-inner clearfix">
  132.                                                 <div class="col-xs-4 col-sm-4 team-one padding-wrap">
  133.                                                     <a href="<?php echo get_the_permalink($team_1_group['themeum_club_name1']); ?>">
  134.                                                       <?php if($team_1_group['themeum_club_name1'] != ''){ ?>
  135.                                                           <img width="40" class="pull-left" src="<?php echo esc_url(themeum_logo_url_by_id($team_1_group['themeum_club_name1'])); ?>" alt="<?php echo esc_attr(themeum_get_title_by_id($team_1_group['themeum_club_name1'])); ?>">
  136.                                                         <?php }
  137.                                                         if($team_1_group['themeum_club_name1'] != ''){ ?>
  138.                                                           <h4 class="team-name"><?php echo esc_attr(themeum_get_title_by_id($team_1_group['themeum_club_name1'])); ?></h4>
  139.                                                         <?php } ?>
  140.                                                     </a>  
  141.                                                 </div>
  142.  
  143.                                                 <div class="col-xs-4 col-sm-4 status text-center">
  144.                                                     <?php if ($datetime) { ?>
  145.                                                           <span><?php echo date_i18n("M d, Y, h:i a", strtotime($datetime)); ?></span>
  146.                                                     <?php } ?>
  147.  
  148.                                                     <?php if($home_ground != '' ){ ?>
  149.                                                           <span><?php echo esc_attr(themeum_get_title_by_id($home_ground)); ?></span>
  150.                                                     <?php } ?>
  151.                                                 </div>
  152.  
  153.                                                 <div class="col-xs-4 col-sm-4 team-two text-right padding-wrap">
  154.                                                     <a href="<?php echo get_the_permalink($team_2_group['themeum_club_name2']); ?>">
  155.                                                         <?php if($team_2_group['themeum_club_name2'] != ''){ ?>
  156.                                                         <img width="40" class="pull-right" src="<?php echo esc_url(themeum_logo_url_by_id($team_2_group['themeum_club_name2'])); ?>" alt="<?php echo esc_attr(themeum_get_title_by_id($team_2_group['themeum_club_name2'])); ?>">
  157.                                                         <?php }
  158.                                                         if($team_2_group['themeum_club_name2'] != ''){ ?>
  159.                                                             <h4 class="team-name"><?php echo esc_attr(themeum_get_title_by_id($team_2_group['themeum_club_name2'])); ?></h4>
  160.                                                         <?php } ?>
  161.                                                     </a>
  162.                                                 </div>
  163.                                             </div>
  164.                                         <?php } ?>  
  165.                                     </div>    
  166.                                 </div>    
  167.                             </div>
  168.                         </div>
  169.                     </div>
  170.                 <?php endif; ?>
  171.             </div>
  172.         </div>
  173.     </div>
  174. <?php } else { ?>
  175.     <?php if ( have_posts() ) : the_post(); ?>
  176.         <?php
  177.             function themeum_league_cat_list( $id, $cat ){
  178.                 $output = array();
  179.                 $term_list = get_the_terms($id,$cat);
  180.                 if(is_array($term_list)){
  181.                     foreach ($term_list as $value) {
  182.                         $output[] = $value->name;
  183.                     }
  184.                     $output = implode(",", $output);
  185.                 }
  186.                 return $output;
  187.             }
  188.             # Date With GMT Value
  189.            $datetime    = get_post_meta(get_the_ID(),'themeum_datetime',true);
  190.             $gmt         = get_post_meta(get_the_ID(),'themeum_gmt',true);
  191.             $sports_date = '';
  192.             if($datetime != ''){
  193.                 $sports_date = date_format(date_create($datetime), 'd M Y h:i A').' '.$gmt;
  194.             }
  195.  
  196.             # Club Name
  197.            $team_1_group    = get_post_meta(get_the_ID(),'team_1_group',true);
  198.             $team_2_group    = get_post_meta(get_the_ID(),'team_2_group',true);
  199.             $match_result_group    = get_post_meta(get_the_ID(),'match_result_group',true);
  200.  
  201.             # Goal and Timing
  202.            $goal_timing_group          = get_post_meta(get_the_ID(),'goal_timing_group',true);
  203.             $goal_timing_group_extra    = get_post_meta(get_the_ID(),'goal_extra_timing',true);
  204.  
  205.             # Match timeline
  206.            $match_timeline    = get_post_meta(get_the_ID(),'match_timeline',true);
  207.  
  208.             # Match Substitutes
  209.            $substitutes    = get_post_meta(get_the_ID(),'match_substitutes',true);
  210.         ?>
  211.  
  212.         <section id="main">
  213.             <div class="container match-result-wrapper" style="margin-top: 30px">  
  214.                 <?php get_template_part('lib/sub-header'); ?>  
  215.                 <div class="row">
  216.                     <div class="col-sm-12 club-profile-wrap">  
  217.                         <?php
  218.                         $attach_id = get_post_thumbnail_id();
  219.                         if( $attach_id ){
  220.                         echo '<div class="match-banner-result-wrap" style="background-image:url('.wp_get_attachment_url(get_post_thumbnail_id()).');background-size: cover; background-position: 50% 50%;padding:40px 0 40px">';
  221.                         }else{ ?>
  222.                         <div class="match-banner-result-wrap" style="background-image:url(<?php echo get_template_directory_uri().'/images/match-banner.jpg';?>);background-size: cover;background-position: 50% 50%;padding:40px 0 40px">
  223.                         <?php } ?>
  224.                             <div class="match-league-title text-center">
  225.                                 <p><?php echo themeum_league_cat_list( get_the_ID(), 'league' ); ?> - <?php echo date_i18n("d M Y", strtotime($sports_date)); ?></p>
  226.                                 <p><?php echo date_i18n("h:i A", strtotime($sports_date)).' '.$gmt; ?></p>
  227.                             </div> <!-- match-league-title -->
  228.                            
  229.                             <div class="goal-timeline hidden-xs">
  230.                                 <?php
  231.                                     $timing = get_post_meta(get_the_ID(),'goal_timing_group',true);
  232.                                     $li_builder_1 = $li_builder_2 = $li_builder_3 = '';
  233.                                    
  234.                                         foreach ($timing as $value) {
  235.                                             if (isset($value['themeum_time_of_goal'])) {
  236.                                             $goal_time = $value['themeum_time_of_goal'];
  237.                                                 if( $goal_time <= 45 ){
  238.                                                     $li_builder_1 .= '<li style="left:'.floor((100/45)*$goal_time).'%" class="team1 goal">';
  239.                                                     if (isset($value['themeum_goal_player'])) {
  240.                                                         $li_builder_1 .= '<span class="time">'.themeum_get_title_by_id($value['themeum_goal_player']).' '.$goal_time.'"</span>';
  241.                                                     }
  242.                                                     $li_builder_1 .= '</li>';
  243.                                                 }
  244.                                                 if( $goal_time > 45 ){
  245.                                                     if( $goal_time > 90 ){
  246.                                                         $li_builder_2 .= '<li style="left:100%" class="team1 goal">';
  247.                                                         if (isset($value['themeum_goal_player'])) {
  248.                                                             $li_builder_2 .= '<span class="time">'.themeum_get_title_by_id($value['themeum_goal_player']).' '.$goal_time.'"</span>';
  249.                                                         }
  250.                                                         $li_builder_2 .= '</li>';
  251.                                                     }else{
  252.                                                         $li_builder_2 .= '<li style="left:'.floor((100/90)*$goal_time).'%" class="team1 goal">';
  253.                                                         if (isset($value['themeum_goal_player'])) {
  254.                                                             $li_builder_2 .= '<span class="time">'.themeum_get_title_by_id($value['themeum_goal_player']).' '.$goal_time.'"</span>';
  255.                                                         }
  256.                                                         $li_builder_2 .= '</li>';
  257.                                                     }
  258.                                                 }
  259.                                             }
  260.                                         }
  261.  
  262.                                         $extra_timing = get_post_meta( get_the_ID(),'goal_extra_timing',true );
  263.                                         $total_timing = get_post_meta( get_the_ID(),'themeum_extra_time',true );
  264.  
  265.                                         if(is_array( $extra_timing )){
  266.                                             if(!empty( $extra_timing )){
  267.                                                 if( $total_timing != "" && $total_timing != 0 ){
  268.                                                     foreach ($extra_timing as $value) {
  269.  
  270.                                                         if( $value['themeum_extra_time_of_goal'] != '' ){
  271.                                                             $li_builder_3 .= '<li style="left:'.floor((100/$total_timing)*$value['themeum_extra_time_of_goal']).'%" class="team1 goal">';
  272.                                                                 $li_builder_3 .= '<span class="time">'.themeum_get_title_by_id($value['themeum_extra_goal_player']).' '.( 90+$value['themeum_extra_time_of_goal'] ).'"</span>';
  273.                                                             $li_builder_3 .= '</li>';
  274.                                                         }
  275.  
  276.                                                     }
  277.                                                 }
  278.                                             }
  279.                                         }
  280.  
  281.  
  282.  
  283.                                         echo '<span class="timeline-time">00"</span>';
  284.                                         echo '<ul class="goal-timeline1">';
  285.                                             echo $li_builder_1;
  286.                                         echo '</ul>';
  287.  
  288.  
  289.  
  290.                                         echo '<span class="timeline-time">45"</span>';
  291.                                         echo '<ul class="goal-timeline2">';
  292.                                             echo $li_builder_2;
  293.                                         echo '</ul>';
  294.                                         echo '<span class="timeline-time">90"</span>';
  295.  
  296.                                         if(isset($total_timing)){
  297.                                             if( $total_timing != '' ){
  298.                                                 echo '<div class="extra-time-goal">';
  299.                                                     echo '<span class="timeline-titme">+</span>';
  300.                                                     echo '<ul class="goal-timeline2">';
  301.                                                         echo $li_builder_3;
  302.                                                     echo '</ul>';
  303.                                                     echo '<span class="timeline-titme">'.$total_timing.'"</span>';
  304.                                                 echo '</div>';        
  305.                                             }
  306.                                         }
  307.  
  308.                                        
  309.                                 ?>
  310.                             </div> <!-- Goal Time Line -->  
  311.                         </div><!-- match-banner-result-wrap -->
  312.  
  313.                         <div class="leagure-result-cont">
  314.                             <!-- Team One Result -->
  315.                             <div class="col-xs-12 col-sm-3 match-team-left">
  316.                                 <div class="goal-count media">
  317.                                     <div class="team-one-img">
  318.                                         <img src="<?php echo esc_url(get_template_directory_uri().'/images/football-icon.png'); ?>" alt="<?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?>">
  319.                                     </div>
  320.                                     <div class="media-body text-left">
  321.                                         <ul>
  322.                                         <?php
  323.                                         $goal1 = $goal2 = 0;
  324.                                         if(is_array($goal_timing_group)){
  325.                                            
  326.                                             foreach ($goal_timing_group as $value){
  327.                                                 if (isset($value['themeum_select_team'])) {
  328.                                                     if($value['themeum_select_team'] == 'value1'){
  329.                                                         $goal1++;
  330.                                                         if (isset($value['themeum_goal_player'])) {
  331.                                                             $player_name = themeum_get_title_by_id($value['themeum_goal_player']);
  332.                                                             if( $value['themeum_goal_player'] != '' ){
  333.                                                                 echo "<li>".$player_name." ".$value['themeum_time_of_goal']."'</li>";
  334.                                                             }
  335.                                                         }
  336.  
  337.                                                     }
  338.  
  339.                                                     if($value['themeum_select_team'] == 'value2'){
  340.                                                         $goal2++;
  341.                                                     }
  342.                                                 }
  343.                                             }
  344.  
  345.  
  346.                                             if(is_array( $goal_timing_group_extra )){
  347.                                                 if(!empty($goal_timing_group_extra)){
  348.                                                     foreach ($goal_timing_group_extra as $value) {
  349.                                                         if(isset($value['themeum_extra_select_team'])){
  350.                                                             if(isset($value['themeum_extra_time_of_goal'])){        
  351.                                                                 if($value['themeum_extra_goal_player'] != ''){
  352.                                                                    
  353.                                                                     $player_name = themeum_get_title_by_id($value['themeum_extra_goal_player']);
  354.                                                                     if( $value['themeum_extra_select_team'] == 'value1' ){
  355.                                                                         echo "<li>".$player_name." ".$value['themeum_extra_time_of_goal']."'</li>";
  356.                                                                         $goal1++;
  357.                                                                     }
  358.                                                                 }
  359.                                                             }
  360.                                                             if($value['themeum_extra_select_team'] == 'value2'){ $goal2++; }
  361.                                                         }
  362.                                                     }
  363.                                                 }
  364.                                             }
  365.  
  366.  
  367.                                         }
  368.                                         ?>
  369.                                         </ul>        
  370.                                     </div>
  371.                                 </div>
  372.                             </div>
  373.  
  374.                             <div class="col-xs-12 col-sm-2 match-team-left">
  375.                                 <div class="match-team text-center">
  376.                                     <div class="team-img-one icon-left">
  377.                                         <?php if( isset($team_1_group['themeum_club_name1']) ): ?>
  378.                                             <img width="61" src="<?php echo themeum_logo_url_by_id($team_1_group['themeum_club_name1']); ?>" alt="<?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?>">
  379.                                         <?php endif; ?>
  380.                                     </div>
  381.                                     <div class="title">
  382.                                         <?php if( isset($team_1_group['themeum_club_name1']) ): ?>
  383.                                             <h4><?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?></h4>
  384.                                         <?php endif; ?>
  385.                                     </div>
  386.                                 </div>
  387.                             </div>
  388.                             <!-- Team One Result End -->
  389.  
  390.                             <div class="col-xs-12 col-sm-2 score">
  391.                                 <span><?php $total_goal = get_post_meta( get_the_ID(), 'themeum_goal_count', true); echo $total_goal; ?></span>
  392.                             </div>
  393.  
  394.                             <!-- Team Two Result -->
  395.                             <div class="col-xs-12 col-sm-2 match-team-right">
  396.                                 <div class="match-team text-center">
  397.                                     <div class="team-img-one icon-right">
  398.                                         <?php if( isset($team_2_group['themeum_club_name2']) ): ?>
  399.                                             <img width="61" src="<?php echo themeum_logo_url_by_id($team_2_group['themeum_club_name2']); ?>" alt="<?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?>">
  400.                                         <?php endif; ?>
  401.                                     </div>
  402.                                     <div class="title">
  403.                                         <?php if( isset($team_2_group['themeum_club_name2']) ): ?>
  404.                                             <h4><?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?></h4>
  405.                                         <?php endif; ?>
  406.                                     </div>
  407.                                    
  408.                                 </div>
  409.                             </div>
  410.                             <!-- Team Two Result End -->
  411.  
  412.  
  413.                             <div class="col-xs-12 col-sm-3 match-team-right">
  414.                                 <div class="goal-count2 media">
  415.                                     <div class="team-img-wrap pull-right">
  416.                                         <div class="team-two-img">
  417.                                             <img src="<?php echo esc_url(get_template_directory_uri().'/images/football2.png'); ?>" alt="<?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?>">
  418.                                         </div>
  419.                                     </div>
  420.                                     <div class="team-two-player pull-right">
  421.                                         <ul>
  422.                                             <?php
  423.                                             if(is_array($goal_timing_group)){
  424.                                                
  425.                                                 foreach ($goal_timing_group as $value){
  426.                                                     if (isset($value['themeum_select_team'])) {
  427.                                                         if($value['themeum_select_team'] == 'value2'){
  428.                                                             if (isset($value['themeum_goal_player'])) {
  429.                                                                 $player_name = themeum_get_title_by_id($value['themeum_goal_player']);
  430.                                                                 if( $value['themeum_goal_player'] != '' ){
  431.                                                                     echo "<li>".$player_name." ".$value['themeum_time_of_goal']."'</li>";
  432.                                                                 }
  433.                                                             }
  434.                                                         }
  435.                                                     }
  436.                                                 }
  437.  
  438.  
  439.  
  440.                                                 if(is_array( $goal_timing_group_extra )){
  441.                                                     if(!empty($goal_timing_group_extra)){
  442.                                                         foreach ($goal_timing_group_extra as $value) {
  443.                                                             if(isset($value['themeum_extra_select_team'])){
  444.                                                                 if($value['themeum_extra_select_team'] == 'value2'){
  445.                                                                     $player_name = themeum_get_title_by_id($value['themeum_extra_goal_player']);
  446.                                                                     if( $value['themeum_extra_select_team'] == 'value2' ){
  447.                                                                         echo "<li>".$player_name." ".$value['themeum_extra_time_of_goal']."'</li>";
  448.                                                                     }
  449.                                                                 }
  450.                                                             }
  451.                                                         }
  452.                                                     }
  453.                                                 }
  454.  
  455.  
  456.                                             }
  457.                                             ?>
  458.                                         </ul>
  459.                                     </div>
  460.                                    
  461.                                 </div>
  462.                             </div>
  463.                         </div>
  464.  
  465.                     </div> <!-- blog-top-slide-wrap -->  
  466.                 </div> <!-- match-banner-result-wrap -->  
  467.             </div> <!--container-->
  468.  
  469.             <div class="match-details">
  470.                 <div class="container">
  471.                     <div class="match-details-inner">
  472.                         <div class="match-details-tab" role="tabpanel">
  473.                             <!-- Nav tabs -->
  474.                             <ul class="nav nav-tabs match-details-tab-nav" role="tablist">
  475.                                 <li role="presentation" class="active"><a href="#match-stats" aria-controls="match-stats" role="tab" data-toggle="tab"><?php _e('Match Stats','themeum-core');?></a></li>
  476.                                 <li role="presentation"><a href="#timeline" aria-controls="timeline" role="tab" data-toggle="tab"><?php _e('Timeline','themeum-core');?></a></li>
  477.                                 <li role="presentation"><a href="#team" aria-controls="team" role="tab" data-toggle="tab"><?php _e('Team','themeum-core');?></a></li>
  478.                                 <li role="presentation"><a href="#substitutes" aria-controls="substitutes" role="tab" data-toggle="tab"><?php _e('Substitutes','themeum-core');?></a></li>
  479.                                 <li role="presentation"><a href="#match_comments" aria-controls="match_comments" role="tab" data-toggle="tab"><?php _e('Comments','themeum-core');?></a></li>
  480.                             </ul>
  481.  
  482.                             <!-- Tab panes -->
  483.                             <div class="container tab-content match-details-tab-content">
  484.                                 <div role="tabpanel" class="tab-pane fade in active" id="match-stats">
  485.                                     <div class="match-status">
  486.                                         <div class="row">
  487.                                             <div class="col-xs-12 col-sm-5">
  488.                                                 <div class="match-details-team media">
  489.                                                     <div class="pull-left">
  490.                                                     <?php if( isset($team_1_group['themeum_club_name1']) ): ?>
  491.                                                         <?php if( $team_1_group['themeum_club_name1'] != '' ): ?>
  492.                                                             <img width="61" src="<?php echo themeum_logo_url_by_id($team_1_group['themeum_club_name1']); ?>" alt="<?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?>">
  493.                                                         <?php endif; ?>
  494.                                                     <?php endif; ?>
  495.                                                     </div>
  496.                                                     <div class="media-body">
  497.                                                     <?php if( isset($team_1_group['themeum_club_name1']) ): ?>
  498.                                                         <?php if( $team_1_group['themeum_club_name1'] != '' ): ?>
  499.                                                             <h4><?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?></h4>
  500.                                                         <?php endif; ?>
  501.                                                     <?php endif; ?>
  502.                                                         <span>
  503.                                                         <?php if( isset($team_1_group['themeum_formation1']) ): ?>
  504.                                                             <?php if( $team_1_group['themeum_formation1'] != '' ): ?>
  505.                                                                 <?php echo $team_1_group['themeum_formation1']; ?>
  506.                                                             <?php endif; ?>
  507.                                                         <?php endif; ?>
  508.                                                         </span>
  509.                                                     </div>
  510.                                                 </div>
  511.                                             </div>
  512.  
  513.                                             <div class="col-xs-12 col-sm-2 vs">
  514.                                                 <span> VS </span>
  515.                                             </div>
  516.  
  517.                                             <div class="col-xs-12 col-sm-5">
  518.                                                 <div class="match-details-team media text-right">
  519.                                                     <div class="pull-right">
  520.                                                     <?php if( isset($team_2_group['themeum_club_name2']) ): ?>
  521.                                                         <?php if( $team_2_group['themeum_club_name2'] != '' ): ?>
  522.                                                             <img width="61" src="<?php echo themeum_logo_url_by_id($team_2_group['themeum_club_name2']); ?>" alt="<?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?>">
  523.                                                         <?php endif; ?>
  524.                                                     <?php endif; ?>
  525.                                                     </div>
  526.                                                     <div class="media-body">
  527.                                                     <?php if( isset($team_2_group['themeum_club_name2']) ): ?>
  528.                                                         <?php if( $team_2_group['themeum_club_name2'] != '' ): ?>
  529.                                                             <h4><?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?></h4>
  530.                                                         <?php endif; ?>
  531.                                                     <?php endif; ?>
  532.                                                         <span>
  533.                                                         <?php if( isset($team_2_group['themeum_formation2']) ): ?>
  534.                                                             <?php if( $team_2_group['themeum_formation2'] != '' ): ?>
  535.                                                                 <?php echo $team_2_group['themeum_formation2']; ?>
  536.                                                             <?php endif; ?>
  537.                                                         <?php endif; ?>
  538.                                                         </span>
  539.                                                     </div>
  540.                                                 </div>
  541.                                             </div>
  542.                                         </div>  <!--row-->    
  543.  
  544.                                         <div class="row">
  545.                                             <div class="col-xs-12">
  546.                                                 <div class="match-status-info clearfix">
  547.                                                    
  548.                                                     <div class="match-status-list clearfix">
  549.                                                         <ul>
  550.                                                             <?php
  551.                                                             if(is_array($match_result_group)){
  552.                                                                 foreach ($match_result_group as $value) {
  553.                                                                     if(isset($value['themeum_team1_data'])){
  554.                                                                         $thmselect = '';
  555.                                                                         if (isset($value['themeum_select'])) {
  556.                                                                             $thmselect = $value['themeum_select'];
  557.                                                                         }
  558.                                                                     echo '<li class="clearfix text-center"><span class="count pull-left">'.$value['themeum_team1_data'].'</span><span class="status">'.$thmselect.'</span> <span class="count pull-right">'.$value['themeum_team2_data'].'</span></li>';
  559.                                                                     }
  560.                                                                 }
  561.                                                             }
  562.                                                             ?>
  563.                                                         </ul>
  564.                                                     </div>
  565.                                                 </div> <!--match-status-info-->  
  566.                                             </div> <!--col-xs-12-->  
  567.                                         </div> <!--row-->
  568.  
  569.                                     </div>  <!--match-status-->                      
  570.                                 </div> <!--match-status-->  
  571.  
  572.  
  573.                                 <div role="tabpanel" class="tab-pane fade" id="timeline">
  574.                                     <div class="match-timeline">
  575.                                         <?php
  576.                                         if(is_array($match_timeline)){
  577.                                             foreach ($match_timeline as $value){
  578.                                                 if(isset($value['themeum_timeline_time'])){
  579.                                                     if(isset($value['themeum_player'])){
  580.                                                         $player_name = '';
  581.                                                         if($value['themeum_player'] != ''){
  582.                                                             $player_name = themeum_get_title_by_id($value['themeum_player']);
  583.                                                         }
  584.                                                     }
  585.                                                     echo '<div class="row">';
  586.                                                         echo '<div class="match-timeline-inner clearfix">';
  587.                                                             echo '<div class="col-xs-3 col-sm-2 time">'.$value['themeum_timeline_time'].'<sub>'.__('min','themeum-core').'</sub></div>';
  588.                                                             if(isset($value['themeum_select'])){
  589.                                                                 echo '<div class="col-xs-6 col-sm-9 status">'.$value['themeum_select'].' <span>'.$player_name.'</span></div>';
  590.                                                             }
  591.                                                             echo '<div class="col-xs-3 col-sm-1 match-status-icon '.themeum_class_name($value["themeum_select"]).'"></div>';
  592.                                                         echo '</div>';
  593.                                                     echo '</div>';
  594.                                                 }
  595.                                             }
  596.                                         }
  597.                                         ?>                                                              
  598.                                     </div>
  599.                                 </div> <!--timeline-->  
  600.  
  601.  
  602.                                 <div role="tabpanel" class="tab-pane fade" id="team">
  603.                                     <div class="match-team">
  604.                                         <div class="row">
  605.                                             <div class="col-xs-12 col-sm-6">
  606.                                                 <div class="match-details-team media">
  607.                                                     <div class="pull-left">
  608.                                                         <?php if( $team_1_group['themeum_club_name1'] != '' ): ?>
  609.                                                             <img width="61" src="<?php echo themeum_logo_url_by_id($team_1_group['themeum_club_name1']); ?>" alt="<?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?>">
  610.                                                         <?php endif; ?>
  611.                                                     </div>
  612.                                                     <div class="media-body">
  613.                                                         <?php if( $team_1_group['themeum_club_name1'] != '' ): ?>
  614.                                                             <h4><?php echo themeum_get_title_by_id($team_1_group['themeum_club_name1']); ?></h4>
  615.                                                         <?php endif; ?>
  616.                                                         <span>
  617.                                                             <?php if( $team_1_group['themeum_formation1'] != '' ): ?>
  618.                                                                 <?php echo $team_1_group['themeum_formation1']; ?>
  619.                                                             <?php endif; ?>
  620.                                                         </span>
  621.                                                     </div>
  622.                                                 </div>
  623.                                             </div>
  624.  
  625.                                             <div class="col-xs-12 col-sm-6">
  626.                                                 <div class="match-details-team media text-right">
  627.                                                     <div class="pull-right">
  628.                                                         <?php if( $team_2_group['themeum_club_name2'] != '' ): ?>
  629.                                                             <img width="61" src="<?php echo themeum_logo_url_by_id($team_2_group['themeum_club_name2']); ?>" alt="<?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?>">
  630.                                                         <?php endif; ?>
  631.                                                     </div>
  632.                                                     <div class="media-body">
  633.                                                         <?php if( $team_2_group['themeum_club_name2'] != '' ): ?>
  634.                                                             <h4><?php echo themeum_get_title_by_id($team_2_group['themeum_club_name2']); ?></h4>
  635.                                                         <?php endif; ?>
  636.                                                         <span>
  637.                                                             <?php if( $team_2_group['themeum_formation2'] != '' ): ?>
  638.                                                                 <?php echo $team_2_group['themeum_formation2']; ?>
  639.                                                             <?php endif; ?>
  640.                                                         </span>
  641.                                                     </div>
  642.                                                 </div>
  643.                                             </div>
  644.                                         </div> <!--row-->      
  645.  
  646.                                         <div class="match-teams clearfix">
  647.                                            
  648.                                         <?php  
  649.                                         $total_count = 0;
  650.                                         $playlist1 = $playlist2 = $team1data = $team2data = array();
  651.  
  652.                                         if(isset($team_1_group['themeum_player_list1'])){
  653.                                             $playlist1      = $team_1_group['themeum_player_list1'];
  654.                                             $team1data      = themeum_player_info($playlist1);
  655.                                             $total_count    = count($playlist1);
  656.                                         }
  657.  
  658.                                         if(isset($team_2_group['themeum_player_list2'])){
  659.                                             $playlist2 = $team_2_group['themeum_player_list2'];
  660.                                             $team2data = themeum_player_info($playlist2);
  661.                                             if( count($playlist2)> $total_count ){
  662.                                                 $total_count = count($playlist2);
  663.                                             }
  664.                                         }
  665.                                        
  666.                                         for ($i=0; $i<$total_count; $i++){
  667.                                             echo '<div class="row match-team-inner">';
  668.                                                 echo '<div class="col-xs-12 col-sm-6">';
  669.                                                     echo '<div class="team-overlay clearfix">';
  670.                                                         if(isset($team1data[$i]['image'])){  
  671.                                                             if( $team1data[$i]['image'] != '' ){
  672.                                                                 echo '<img width="40" class="left" src="'.$team1data[$i]['image'].'" alt="'.__('image','themeum-core').'">';
  673.                                                             }else{
  674.                                                                 echo '<img class="left" src="'.get_template_directory_uri().'/images/football2.png" alt="'.__('image','themeum-core').'">';
  675.                                                             }
  676.                                                         }
  677.                                                         if(isset($team1data[$i]['name'])){
  678.                                                             echo '<h4>';
  679.                                                                 echo $team1data[$i]['name'];
  680.                                                             echo '</h4>';
  681.                                                         }
  682.  
  683.                                                         if(isset($team1data[$i])){
  684.                                                             echo '<div class="player-overlay">';
  685.                                                                echo '<div class="team-overlay-inner">';
  686.                                                                     echo '<div class="player-image-wrap">';
  687.                                                                         if(isset($team1data[$i]['fullimage'])){
  688.                                                                             if( $team1data[$i]['fullimage'] != '' ){
  689.                                                                                 echo '<img src="'.$team1data[$i]['fullimage'].'" alt="'.__('image','themeum-core').'">';
  690.                                                                             }else{
  691.                                                                                 echo '<img class="left" src="'.get_template_directory_uri().'/images/football2.png" alt="'.__('image','themeum-core').'">';
  692.                                                                             }
  693.                                                                         }else{
  694.                                                                             echo '<img class="left" src="'.get_template_directory_uri().'/images/football2.png" alt="'.__('image','themeum-core').'">';
  695.                                                                         }
  696.                                                                        // echo '<img src="'.get_template_directory_uri().'/images/palyer-team.png"> ';
  697.                                                                     echo '</div>    ';
  698.                                                                     echo '<div class="player-name-inner">';
  699.                                                                         echo '<h4>';
  700.                                                                             if(isset($team1data[$i]['name'])){ echo $team1data[$i]['name']; }
  701.                                                                         echo '</h4>';
  702.                                                                        echo '<span>';
  703.                                                                             if(isset($team1data[$i]['position'])){ echo $team1data[$i]['position']; }
  704.                                                                        echo '</span>';
  705.                                                                         if(isset($team1data[$i]['url'])){ echo '<div class="more"><a href="'.$team1data[$i]["url"].'"><i class="fa fa-long-arrow-right"></i></a></div>'; }
  706.                                                                         else{ echo '<div class="more"><a href="#"><i class="fa fa-long-arrow-right"></i></a></div>'; }
  707.                                                                        
  708.                                                                     echo '</div>';
  709.                                                                     echo '<ul>';
  710.                                                                             if(isset($team1data[$i]['other'])){
  711.                                                                                 if(is_array($team1data[$i]['other'])){
  712.                                                                                     foreach ( $team1data[$i]['other'] as $value) {
  713.                                                                                         echo '<li><span class="payer-info">'.$value["themeum_information_level"].':</span><span>'.$value["themeum_information_data"].'</span></li>';
  714.                                                                                     }
  715.                                                                                 }
  716.                                                                             }
  717.                                                                    echo '</ul>';
  718.                                                                echo '</div>';
  719.                                                            echo '</div>';
  720.                                                         }
  721.  
  722.                                                     echo '</div>';
  723.                                                 echo '</div>';
  724.  
  725.  
  726.  
  727.                                                 echo '<div class="col-xs-12 col-sm-6 text-right">';
  728.                                                     echo '<div class="team-overlay clearfix">';
  729.                                                         echo '<h4>';
  730.                                                             if(isset($team2data[$i]['name'])){ echo $team2data[$i]['name']; }
  731.                                                         echo '</h4>';
  732.                                                         if(isset($team2data[$i]['image'])){
  733.                                                             if( $team2data[$i]['image'] != '' ){
  734.                                                                 echo '<img width="40" class="right" src="'.$team2data[$i]['image'].'" alt="'.__('image','themeum-core').'">';
  735.                                                             }else{
  736.                                                                 echo '<img class="right" src="'.get_template_directory_uri().'/images/football2.png" alt="'.__('image','themeum-core').'">';
  737.                                                             }
  738.                                                         }
  739.                                                        echo '</div>';
  740.                                                 echo '</div>';
  741.                                             echo '</div>';
  742.                                         }
  743.                                         ?>
  744.                                                                        
  745.                                         </div>
  746.                                     </div>
  747.                                 </div> <!--match team-->
  748.  
  749.                                 <div role="tabpanel" class="tab-pane fade" id="substitutes">
  750.                                     <div class="match-team-substitues">
  751.                                        
  752.  
  753.                                         <?php
  754.                                             foreach ($substitutes as $value) {
  755.                                                 echo '<div class="match-substitues-inner clearfix">';
  756.                                                     echo '<div class="row">';
  757.                                                     if (isset($value['themeum_timeline_time'])) {
  758.                                                         echo '<div class="col-xs-2 col-sm-2 time">'.$value["themeum_timeline_time"].' <sub>min</sub></div>';
  759.                                                     }
  760.                                                         echo '<div class="col-xs-8 col-sm-8 subs-players">';
  761.                                                             echo '<h4 class="subs-payer-out">'.themeum_get_title_by_id($value["themeum_player_in"]).' in<i class="fa fa-mail-forward"></i></h4>';
  762.                                                             echo '<h4 class="subs-payer-in">'.themeum_get_title_by_id($value["themeum_player_out"]).' out<i class="fa fa-mail-reply"></i></h4>';
  763.                                                         echo '</div>';
  764.                                                         echo '<div class="col-xs-2 col-sm-2 text-right">';
  765.                                                         if (isset($value['themeum_select_team'])) {
  766.                                                             if($value["themeum_select_team"]=="value1"){
  767.                                                                 echo '<img width="61" src="'.themeum_logo_url_by_id($team_1_group['themeum_club_name1']).'" alt="'.__('image','themeum-core').'">';
  768.                                                             }else{
  769.                                                                 echo '<img width="61" src="'.themeum_logo_url_by_id($team_2_group['themeum_club_name2']).'" alt="'.__('image','themeum-core').'">';
  770.                                                             }
  771.                                                         }
  772.                                                         echo '</div>';
  773.                                                     echo '</div>';
  774.                                                 echo '</div>';
  775.                                             }
  776.                                         ?>
  777.  
  778.                                     </div>
  779.                                 </div> <!--match-team-substitues-->
  780.  
  781.                                 <div role="tabpanel" class="tab-pane fade" id="match_comments">
  782.                                
  783.                                     <div class="match-comments">
  784.                                         <div class="row">
  785.                                             <div class="col-xs-12 match-comment-inner">
  786.        
  787.                                             <?php
  788.                                             if ( comments_open() || get_comments_number() ) {
  789.                                                 comments_template();
  790.                                                 }
  791.                                             ?>    
  792.                                              </div>                                    
  793.  
  794.                                         </div>                          
  795.                                     </div>
  796.  
  797.                                 </div> <!--match-comments-->
  798.                             </div>
  799.                         </div>
  800.                     </div> <!--match-details-inner-->
  801.                 </div> <!--container-->
  802.             </div> <!--match-details-->
  803.         </section> <!--/#main-->
  804.     <?php endif; ?>
  805. <?php } ?>
  806.  
  807. <?php get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement