while ($query->have_posts()) {
     $query->the_post();
     $post_type = get_post_type();
     if ($post_type == 'special') {
         $post_type = get_field('day');
     } else {
         if ($post_type == 'sport') {
             $post_type = get_field('day');
         } else {
         }
     }
     $post_type = ucwords($post_type);
     echo '<span class="post-type">' . $post_type . '</span>';
     echo '<div class="featured-left">';
     echo '<a href="' . get_permalink() . '">' . get_the_post_thumbnail() . '</a>';
     show_type();
     echo '<div class="featured-post-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></div>';
     echo the_field('show_description');
     echo '<br />';
     next_show();
     echo '<a class="buy-button" href="' . get_field("tickets_url") . '" target="_blank"><img src="wp-content/themes/responsive/core/images/buy-tickets-button.png" /></a>';
     global $nextshow;
     $status1 = get_field('show_status_' . $nextshow);
     $statusAll = get_field("show_status");
     if ($status1) {
         $status = $status1;
     } else {
         $status = $statusAll;
     }
     echo '<div class="show_status">' . $status . '</div>';
     echo '</div>';
Beispiel #2
0
function laterMonth($type, $months)
{
    $today = date('Ymd');
    $date = DateTime::createFromFormat('Ymd', $today);
    $year = $date->format('Y');
    $month = $date->format('m');
    $day = $date->format('d');
    $month = $month + $months;
    if ($month > 12) {
        $month = $month - 12;
    }
    $month_2 = DateTime::createFromFormat('n', $month);
    $month = $month_2->format('m');
    if ($month == '01') {
        $prevMonth = '12';
        $prevYear = $year - 1;
    } else {
        $prevMonth = $month;
        $prevYear = $year;
    }
    $nextMonth = $month + 1;
    $nextMonth = sprintf("%02s", $nextMonth);
    $prevMonth = $month - 1;
    $prevMonth = sprintf("%02s", $prevMonth);
    $sub_month_start = $prevYear . $prevMonth . '01';
    $add_month_end = $year . $nextMonth . '31';
    $next_month_start = $year . $month . '01';
    $next_month_end = $year . $month . '31';
    $args = array('post_type' => $type, 'posts_per_page' => 5, 'meta_query' => array('relation' => 'OR', array('key' => 'publish_start_date', 'value' => array($sub_month_start, $add_month_end), 'type' => 'numeric', 'compare' => 'BETWEEN'), array('key' => 'publish_end_date', 'value' => array($sub_month_start, $add_month_end), 'type' => 'numeric', 'compare' => 'BETWEEN')));
    $currentShows = array();
    $the_query = new WP_Query($args);
    if ($the_query->have_posts()) {
        while ($the_query->have_posts()) {
            $the_query->the_post();
            $post_type = get_post_type();
            if ($post_type == 'special') {
                $post_type = get_field('day');
            } else {
                if ($post_type == 'sport') {
                    $post_type = get_field('day');
                } else {
                }
            }
            $post_type = ucwords($post_type);
            echo '<div class="grid col-300 empty-check">';
            echo '<div class="show-third">';
            echo '<a href="' . get_permalink() . '">';
            the_post_thumbnail();
            echo '</a>';
            show_type();
            $shows = array();
            for ($i = 1; $i <= 13; $i++) {
                $shows[$i] = get_field('date_' . $i);
            }
            $show_x = DateTime::createFromFormat('Ymd', $shows[1]);
            $first_show = $show_x->format('l, M j');
            echo '<span class="first-show">Starting ' . $first_show . '</span>';
            echo '<div class="show-title"><a href="' . get_permalink() . '">' . get_the_title() . '</a></div>';
            echo the_field('show_description');
            echo '<br /><a class="show-more" href="' . get_permalink() . '">Tell me more&nbsp;&raquo;</a>';
            foreach ($shows as $show) {
                if ($show) {
                    if ($next_month_start <= $show && $show <= $next_month_end) {
                        $show1 = DateTime::createFromFormat('Ymd', $show);
                        $show = $show1->format('l, M j');
                        echo '<p class="show-show">' . $show . '</p>';
                    }
                }
            }
            echo '</div></div>';
        }
    }
    wp_reset_query();
}
Beispiel #3
0
function show_content($hand, $final = FALSE)
{
    echo '<div id="content">' . "\n";
    show_hand($hand);
    if ($final) {
        show_type($hand);
    } else {
        show_draw_button();
    }
    echo '</div>';
}
Beispiel #4
0
    }
    if (substr($key, 0, 6) == 'dltype' && $USER['permissions'] & $LAYOUT) {
        printheader($httptitle, "", './includes/js/tablemanage.js');
        $modarray = explode('_', $key);
        include './includes/type_inc.php';
        del_type($db, $edit_type, $modarray[1], $tableinfo);
        show_type($db, $edit_type, "", $tableinfo->name);
        printfooter();
        exit;
    }
}
if ($edit_type && $USER['permissions'] & $LAYOUT) {
    printheader($httptitle, "", './includes/js/tablemanage.js');
    include './includes/type_inc.php';
    $assoc_name = get_cell($db, $tableinfo->desname, label, associated_table, $edit_type);
    show_type($db, $edit_type, $assoc_name, $tableinfo->name);
    printfooter();
    exit;
}
if ($md == 'edit') {
    printheader($httptitle, '', './includes/js/editview.js');
} else {
    printheader($httptitle);
}
navbar($USER['permissions']);
// provide a means to hyperlink directly to a record
if ($showid && !$jsnewwindow) {
    if (function_exists('plugin_show')) {
        plugin_show($db, $tableinfo, $showid, $USER, $system_settings, false);
    } else {
        show_g($db, $tableinfo, $showid, $USER, $system_settings, true, false, false, $viewid);