* Plugin Name: GLM Associate - Events Add-On
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 1.7.23
+ * Version: 1.7.24
* Author: Chuck Scott
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* @package glmMembersDatabaseEventsAddOn
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.7.23
+ * @version 1.7.24
*/
// Check that we're being called by WordPress.
* so that we're sure the other add-ons see an up to date
* version from this plugin.
*/
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.7.23');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.7.24');
define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.14');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
$index = 0;
$pdf->ezSetY( $this->pdf_top_y );
+// echo '<pre>$_REQUEST: ' . print_r( $_REQUEST, true ) . '</pre>';
foreach ( $events as $eventId => $event ) {
$lineCount = 1;
$eventTopY = $pdfY;
$eventDates = '';
$recCounter = 0;
foreach ( $event['recurrences'] as $rec ) {
+ if ( isset( $_REQUEST['glm_event_from'] ) ) {
+ $startingTime = strtotime( $_REQUEST['glm_event_from'] );
+ }
+ // echo '<pre>$startingTime: ' . print_r( $startingTime, true ) . '</pre>';
+ if ( isset( $_REQUEST['glm_event_from'] ) ) {
+ $endingTime = strtotime( $_REQUEST['glm_event_to'] );
+ }
+ // echo '<pre>$endingTime: ' . print_r( $endingTime, true ) . '</pre>';
+ if ( $startingTime && $endingTime && ( $rec['from_date']['timestamp'] > $endingTime || $rec['to_date']['timestamp'] < $startingTime ) ) {
+ continue;
+ }
+ if ( $startingTime && !$endingTime && $rec['to_date']['timestamp'] < $startingTime ) {
+ continue;
+ }
+ if ( !$startingTime && $endingTime && $rec['from_date']['timestamp'] > $endingTime ) {
+ continue;
+ }
if ( $rec['name'] && !in_array( $rec['name'], array( 'Imported', 'Imported Event Schedule') ) ) {
$eventDates .= $rec['name'] . ' ';
}