Location: PHPKode > projects > phlyMail Lite > phlymail/handlers/calendar/sendto.php
<?php
/**
 * Receive something from another handler
 * @package phlyMail Nahariya 4.0+ Default branch
 * @subpackage Handler Calendar
 * @copyright 2006-2009 phlyLabs, Berlin (http://phlylabs.de)
 * @version 4.0.1 2009-04-18
 */
// Only valid within phlyMail
if (!defined('_IN_PHM_')) die();

$srchdl = preg_replace('![^a-zA-Z_]!', '', $_REQUEST['source']);
require_once($_PM_['path']['handler'].'/'.$srchdl.'/api.php');
$toload = 'api_'.$srchdl;
$API = new $toload($_PM_, $_SESSION['phM_uid']);
$srcinfo = $API->sendto_fileinfo($_REQUEST['resid']);
$raw = $API->sendto_sendinit($_REQUEST['resid']);

require_once(dirname(__FILE__).'/driver.mysql.php');
$cDB = new calendar_driver($_SESSION['phM_uid']);
$eventTypes = $cDB->get_event_types();

// Parse the event data
$event = parse_icaldata($raw);
if (false === $event) {
    $error = 'No parsable event data';
} else {
    define('FROM_SENDTO', 1);
    if ($event['starts']) {
        $event['start_d']  = date('d', $event['starts']);
        $event['start_m']  = date('m', $event['starts']);
        $event['start_y']  = date('Y', $event['starts']);
        $event['start_h']  = date('H', $event['starts']);
        $event['start_mi'] = date('i', $event['starts']);
    }
    if ($event['ends']) {
        $event['end_d']  = date('d', $event['ends']);
        $event['end_m']  = date('m', $event['ends']);
        $event['end_y']  = date('Y', $event['ends']);
        $event['end_h']  = date('H', $event['ends']);
        $event['end_mi'] = date('i', $event['ends']);
    }
    require(dirname(__FILE__).'/edit_event.php');
}
?>
Return current item: phlyMail Lite