+++ /dev/null
-<?php
-
-/**
- * export.php
- *
- */
-
-require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH . '/data/dataEvents.php';
-require_once GLM_MEMBERS_EVENTS_PLUGIN_PATH . '/models/front/events/baseAction.php';
-
-/**
- * GLmMembersFront_event_detail
- *
- * @uses GlmDataEvents
- * @package GlmMemberEvents
- * @version 0.0.1
- * @copyright Copyright (c) 2010 All rights reserved.
- * @author Steve Sutton <steve@gaslightmedia.com>
- * @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
- */
-class GLmMembersFront_events_export extends GlmMembersFront_events_baseAction
-{
- /**
- * modelAction
- *
- * @param bool $actionData Action Data passed to the modelAction
- *
- * @access public
- * @return void
- */
-
-
-
- public function modelAction($actionData = false)
- {
- header("Content-Type: text/Calendar");
-header("Content-Disposition: inline; filename=calendar.ics");
-
-echo "BEGIN:VCALENDARn";
-echo "PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//ENn";
-echo "VERSION:2.0n";
-echo "METHOD:PUBLISHn";
-echo "X-MS-OLK-FORCEINSPECTOROPEN:TRUEn";
-
-echo "BEGIN:VEVENTn";
-echo "CLASS:PUBLICn";
-echo "CREATED:$createdn";
-echo "DESCRIPTION:Description of the Event Goes Heren";
-echo "DTSTAMP:20120715T190000n";
-echo "DTSTART:20120715T190000n";
-echo "DTEND:20120715T210000n";
-echo "LAST-MODIFIED:0101T000000n";
-echo "LOCATION:Location_of_Eventn";
-echo "PRIORITY:5n";
-echo "SEQUENCE:0n";
-echo "SUMMARY;LANGUAGE=en-us:Summary Messagen";
-echo "TRANSP:OPAQUEn";
-echo "UID:$random_numbern"; // UID just needs to be some random number. I used rand() in PHP.
-echo "X-MICROSOFT-CDO-BUSYSTATUS:BUSYn";
-echo "X-MICROSOFT-CDO-IMPORTANCE:1n";
-echo "X-MICROSOFT-DISALLOW-COUNTER:FALSEn";
-echo "X-MS-OLK-ALLOWEXTERNCHECK:TRUEn";
-echo "X-MS-OLK-AUTOFILLLOCATION:FALSEn";
-echo "X-MS-OLK-CONFTYPE:0n";
-
-//Here is where you set the reminder for the event.
-echo "BEGIN:VALARMn";
-echo "TRIGGER:-PT1440Mn";
-echo "ACTION:DISPLAYn";
-echo "DESCRIPTION:Reminder - Reminder Text Goes Heren";
-
-echo "END:VALARMn";
-echo "END:VEVENTn";
-echo "END:VCALENDARn";
-// $status = null;
-// $action = '';
-// $settings = $event = array();
-//
-// if ( isset($_REQUEST['glm_event_from']) ) {
-// $fromDate = filter_var($_REQUEST['glm_event_from'], FILTER_SANITIZE_STRING);
-// } else {
-// $fromDate = date('m/d/Y');
-// }
-// $this->dateRange = "start_time >= '{$fromDate}'";
-//
-// if ( isset($_REQUEST['eventId']) && $eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) {
-// $search = true;
-// $action = 'event-detail';
-// } else {
-// $search = true;
-// $action = 'event-detail';
-// $eventslug = get_query_var( 'eventslug' );
-// //echo '<pre>$eventslug: ' . print_r($eventslug, true) . '</pre>';
-// $sql = "
-// SELECT id
-// FROM ".GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX. "events
-// WHERE name_slug = '$eventslug'";
-// $eventId = $this->wpdb->get_var($sql);
-// }
-//
-// $fileName = $eventslug . "ics";
-//
-// $categories = $this->getCategories();
-// $eventIcs = $this->getModelEventData($eventId);
-// $times = $eventIcs['times'];
-// foreach($times as $time){
-// $start = $time['start_time']['timestamp'];
-// }
-//// echo '<pre>', print_r($eventIcs = $this->getModelEventData($eventId)), '</pre>';
-//// echo '<pre>', print_r($eventIcs['times']), '</pre>';
-//
-// // note that we are using "H" instead of "g" because iCalendar's Time format
-// // requires 24-hour time (see RFC 5545 section 3.3.12 for info).
-// function dateToCal($timestamp) {
-// return date('Ymd\THis\Z', $timestamp);
-// }
-// echo dateToCal($start);
-// // Escapes a string of characters
-// function escapeString($string) {
-// return preg_replace('/([\,;])/','\\\$1', $string);
-// }
-//
-// // for shareThis url and title variables in its span tag
-// $permalink = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
-// $title = get_the_title();
-// $templateData = array(
-// 'siteBaseUrl' => GLM_MEMBERS_EVENTS_SITE_BASE_URL,
-// 'currentUrl' => $_SERVER['HTTP_REFERER'],
-// 'categories' => $categories,
-// 'fromDate' => $fromDate,
-// 'event' => $event,
-// 'permalink' => $permalink,
-// 'title' => $title,
-// 'icsFile' => $icsFile,
-// 'mainImgUrl' => GLM_MEMBERS_PLUGIN_MEDIA_URL . '/images/large/'
-// );
-//
-// error_reporting(E_ALL ^ E_NOTICE);
-// return array(
-// 'status' => $status,
-// 'menuItemRedirect' => false,
-// 'modelRedirect' => false,
-// 'view' => 'front/events/export.html',
-// 'data' => $templateData,
-// 'settings' => $settings
-// );
-
- }
-}
-
-