Пример #1
0
 function display_event_espresso_categories($event_category_id = "null", $css_class = NULL)
 {
     global $wpdb;
     if ($event_category_id != "null") {
         $display_recurrence_event = true;
         //If set to true, the event page will display recurring events.
         $sql = "SELECT e.*, c.category_name, c.category_desc, c.display_desc FROM " . EVENTS_DETAIL_TABLE . " e ";
         $sql .= " JOIN " . EVENTS_CATEGORY_REL_TABLE . " r ON r.event_id = e.id ";
         $sql .= " JOIN " . EVENTS_CATEGORY_TABLE . " c ON  c.id = r.cat_id ";
         $sql .= " WHERE c.category_identifier = '" . $event_category_id . "' ";
         $sql .= $display_recurrence_event == false ? " AND e.recurrence_id = '0' " : '';
         $sql .= " ORDER BY date(start_date), id ASC";
         event_espresso_get_event_details($sql, $css_class);
         //This function is located below
     }
 }
function display_event_espresso_date_max($max_days = "null")
{
    global $wpdb;
    //$org_options = get_option('events_organization_settings');
    //$event_page_id =$org_options['event_page_id'];
    if ($max_days != "null") {
        if ($_REQUEST['show_date_max'] == '1') {
            foreach ($_REQUEST as $k => $v) {
                ${$k} = $v;
            }
        }
        $max_days = $max_days;
        $sql = "SELECT * FROM " . EVENTS_DETAIL_TABLE . " WHERE ADDDATE('" . date('Y-m-d') . "', INTERVAL " . $max_days . " DAY) >= start_date AND start_date >= '" . date('Y-m-d') . "' AND is_active = 'Y' ORDER BY date(start_date)";
        event_espresso_get_event_details($sql);
        //This function is called from the event_list.php file which should be located in your templates directory.
    }
}
 function display_event_espresso_categories($event_category_id = "null")
 {
     global $wpdb;
     if ($event_category_id != "null") {
         $sql = "SELECT e.*, c.category_name, c.category_desc, c.display_desc FROM " . EVENTS_DETAIL_TABLE . " e ";
         $sql .= " JOIN " . EVENTS_CATEGORY_REL_TABLE . " r ON r.event_id = e.id ";
         $sql .= " JOIN " . EVENTS_CATEGORY_TABLE . " c ON  c.id = r.cat_id ";
         $sql .= " WHERE c.category_identifier = '" . $event_category_id . "' ";
         $sql .= " AND is_active = 'Y' ";
         $sql .= " AND event_status != 'D' ";
         $sql .= " AND event_status != 'S' ";
         $sql .= " AND start_date >= '" . date('Y-m-d') . "' ";
         $sql .= " AND e.registration_start <= '" . date('Y-m-d') . "' ";
         $sql .= " AND e.registration_end >= '" . date('Y-m-d') . "' ";
         $sql .= " ORDER BY date(start_date), id ASC";
         event_espresso_get_event_details($sql);
     }
 }
 function display_event_espresso_categories($event_category_id = "null")
 {
     global $wpdb;
     if ($event_category_id != "null") {
         $sql = "SELECT e.*, c.category_name, c.category_desc, c.display_desc FROM " . EVENTS_DETAIL_TABLE . " e ";
         $sql .= " JOIN " . EVENTS_CATEGORY_REL_TABLE . " r ON r.event_id = e.id ";
         $sql .= " JOIN " . EVENTS_CATEGORY_TABLE . " c ON  c.id = r.cat_id ";
         $sql .= " WHERE c.category_identifier = '" . $event_category_id . "' ";
         $sql .= " AND is_active = 'Y' ";
         $sql .= " AND event_status != 'D' ";
         //Removing this line allows you to show events that may have expired
         //$sql .= " AND start_date >= '".date ( 'Y-m-d' )."' ";
         //These lines are used to show events within a registration start and end period
         $sql .= " AND e.registration_start <= '" . date('Y-m-d') . "' ";
         $sql .= " AND e.registration_end >= '" . date('Y-m-d') . "' ";
         //This line orders the events by date
         $sql .= " ORDER BY date(start_date), id ASC";
         //This function outputs the event listings
         event_espresso_get_event_details($sql);
     }
 }
Пример #5
0
 function display_event_espresso_categories($event_category_id = "null", $css_class = NULL)
 {
     global $wpdb;
     if ($event_category_id != "null") {
         $display_recurrence_event = true;
         //If set to true, the event page will display recurring events.
         $sql = "SELECT e.*, c.category_name, c.category_desc, c.display_desc, c.category_identifier, ese.start_time, ese.end_time, p.event_cost  ";
         isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y' ? $sql .= ", v.name venue_name, v.address venue_address, v.city venue_city, v.state venue_state, v.zip venue_zip, v.country venue_country, v.meta venue_meta " : '';
         $sql .= " FROM " . EVENTS_DETAIL_TABLE . " e ";
         $sql .= " JOIN " . EVENTS_CATEGORY_REL_TABLE . " r ON r.event_id = e.id ";
         $sql .= " JOIN " . EVENTS_CATEGORY_TABLE . " c ON  c.id = r.cat_id ";
         $sql .= " JOIN " . EVENTS_START_END_TABLE . " ese ON ese.event_id= e.id ";
         $sql .= " JOIN " . EVENTS_PRICES_TABLE . " p ON p.event_id=e.id ";
         isset($org_options['use_venue_manager']) && $org_options['use_venue_manager'] == 'Y' ? $sql .= " LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " r ON r.event_id = e.id LEFT JOIN " . EVENTS_VENUE_TABLE . " v ON v.id = r.venue_id " : '';
         $sql .= " WHERE c.category_identifier = '" . $event_category_id . "' ";
         $sql .= $display_recurrence_event == false ? " AND e.recurrence_id = '0' " : '';
         $sql .= " AND e.event_status != 'D' ";
         $sql .= " GROUP BY e.id  ORDER BY date(start_date), id ASC";
         event_espresso_get_event_details($sql, $css_class);
         //This function is located below
     }
 }
Пример #6
0
function event_espresso_pagination()
{
    do_action('action_hook_espresso_log', __FILE__, __FUNCTION__, '');
    event_espresso_require_template('event_list.php');
    $_REQUEST['use_wrapper'] = false;
    event_espresso_get_event_details($_REQUEST);
    die;
}
Пример #7
0
 function display_event_espresso_categories($event_category_id = NULL, $css_class = NULL)
 {
     event_espresso_get_event_details(array('category_identifier' => $event_category_id, 'css_class' => $css_class));
 }
Пример #8
0
 function espresso_venue_event_list_sc($atts)
 {
     global $wpdb;
     global $load_espresso_scripts;
     $load_espresso_scripts = true;
     //This tells the plugin to load the required scripts
     if (empty($atts)) {
         return 'No venue id supplied!';
     }
     extract($atts);
     if (isset($id) && $id > 0) {
         $atts = array_merge($atts, array('venue_id' => $id, 'use_venue_id' => true));
     }
     //		$order_by = (isset($order_by) && $order_by != '') ? " ORDER BY " . $order_by . " ASC " : " ORDER BY name, id ASC ";
     //		$limit = $limit > 0 ? " LIMIT 0," . $limit . " " : '';
     //
     //		if (isset($id) && $id > 0) {
     //			$sql = "SELECT e.*, ev.name venue_name, ese.start_time, ese.end_time, p.event_cost ";
     //			$sql .= " FROM " . EVENTS_DETAIL_TABLE . " e ";
     //			$sql .= " LEFT JOIN " . EVENTS_VENUE_REL_TABLE . " vr ON e.id = vr.event_id ";
     //			$sql .= " LEFT JOIN " . EVENTS_VENUE_TABLE . " ev ON vr.venue_id = ev.id  ";
     //			$sql .= " LEFT JOIN " . EVENTS_START_END_TABLE . " ese ON ese.event_id= e.id ";
     //			$sql .= " LEFT JOIN " . EVENTS_PRICES_TABLE . " p ON p.event_id=e.id ";
     //			$sql .= " WHERE e.event_status != 'D' AND e.is_active = 'Y' AND ev.id = '" . $id . "' ";
     //
     //			$sql .= $order_by;
     //			$sql .= $limit;
     //			//echo $sql;
     //
     //			$wpdb->get_results($sql);
     //			$num_rows = $wpdb->num_rows;
     //			if ($num_rows > 0) {
     //
     //				$name_before = isset($name_before) ? $name_before : '<p class="venue_name">';
     //				$name_after = isset($name_after) ? $name_after : '</p>';
     //
     //				$venue_name = $wpdb->last_result[0]->venue_name;
     //template located in event_list_dsiplay.php
     ob_start();
     //echo $sql;
     //echo $name_before . $venue_name . $name_after;
     event_espresso_get_event_details($atts);
     $buffer = ob_get_contents();
     ob_end_clean();
     return $buffer;
     //} else {
     //				return 'No events in this venue';
     //			}
     //		}
 }