Esempio n. 1
0
<?php

//Include Configuration
require_once dirname(__FILE__) . '/../../../../wp-load.php';
require_once dirname(__FILE__) . '/../classes/base.class.php';
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect();
global $dpProEventCalendar, $wpdb, $table_prefix;
if (!is_numeric($_GET['event_id']) || $_GET['event_id'] <= 0 || !is_numeric($_GET['date']) || $_GET['date'] <= 0) {
    die;
}
$event_id = $_GET['event_id'];
$date = $_GET['date'];
$event_date = date('Y-m-d', $_GET['date']);
$dpProEventCalendar = new DpProEventCalendar(false);
$calendar_id = $dpProEventCalendar->getCalendarByEvent($event_id);
if (!$calendar_id) {
    die;
}
$dpProEventCalendar->setCalendar($calendar_id);
if (!$dpProEventCalendar->calendar_obj->ical_active) {
    die;
}
$limit = $dpProEventCalendar->calendar_obj->ical_limit;
if (!is_numeric($limit) || $limit <= 0) {
    $limit = '';
}
$event = $dpProEventCalendar->getEventData($event_id);
$event_date .= ' ' . substr($event->date, 11);
//timezone
$tz = get_option('timezone_string');