'events', 'description' => __('A widget to display your upcoming events.', 'events') ); /* Widget control settings. */ $control_options = array( 'width' => 300, 'height' => 350, 'id_base' => 'events-widget' ); /* Create the widget. */ $this->WP_Widget( 'events-widget', __('Event Registration Widget', 'events'), $widget_options, $control_options ); } function widget($args, $instance ) { extract( $args ); global $wpdb; /* Our variables from the widget settings. */ $title = apply_filters('widget_title', $instance['title'] ); /* Before widget (defined by themes). */ echo $before_widget; /* Display the widget title if one was input (before and after defined by themes). */ if ( $title ) echo $before_title . $title . $after_title; $events_detail_tbl = get_option('events_detail_tbl'); $curdate = date("Y-m-d"); $org_options = get_option('events_organization_settings'); $paypal_cur =$org_options['currency_format']; $event_page_id =$org_options['event_page_id']; $sql = "SELECT * FROM ". $events_detail_tbl . " WHERE is_active='yes' AND start_date >= '".date ( 'Y-m-d' )."' ORDER BY date(start_date)"; $result = mysql_query ($sql); ?>
__('Upcoming Events', 'events') ); $instance = wp_parse_args( (array) $instance, $defaults ); ?>