本文整理汇总了PHP中vCal::setLocation方法的典型用法代码示例。如果您正苦于以下问题:PHP vCal::setLocation方法的具体用法?PHP vCal::setLocation怎么用?PHP vCal::setLocation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vCal
的用法示例。
在下文中一共展示了vCal::setLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: vcal
/**
* offers the vcal/ical functonality
*
* @todo Not yet working
*
* @author Lybegard Karl-Olof
* @since 0.9
*/
function vcal()
{
$mainframe =& JFactory::getApplication();
$task = JRequest::getWord('task');
$id = JRequest::getInt('id');
$user_offset = $mainframe->getCfg('offset_user');
//get Data from model
$model =& $this->getModel('Details', 'RedEventModel');
$model->setId((int) $id);
$row = $model->getDetails();
$Start = mktime(strftime('%H', strtotime($row->times)), strftime('%M', strtotime($row->times)), strftime('%S', strtotime($row->times)), strftime('%m', strtotime($row->dates)), strftime('%d', strtotime($row->dates)), strftime('%Y', strtotime($row->dates)), 0);
$End = mktime(strftime('%H', strtotime($row->endtimes)), strftime('%M', strtotime($row->endtimes)), strftime('%S', strtotime($row->endtimes)), strftime('%m', strtotime($row->enddates)), strftime('%d', strtotime($row->enddates)), strftime('%Y', strtotime($row->enddates)), 0);
require_once JPATH_COMPONENT_SITE . DS . 'classes' . DS . 'vcal.class.php';
$v = new vCal();
$v->setTimeZone($user_offset);
$v->setSummary($row->venue . '-' . $row->catname . '-' . $row->full_title);
$v->setDescription($row->datdescription);
$v->setStartDate($Start);
$v->setEndDate($End);
$v->setLocation($row->street . ', ' . $row->plz . ', ' . $row->city . ', ' . $row->country);
$v->setFilename((int) $row->did);
if ($task == 'vcal') {
$v->generateHTMLvCal();
} else {
$v->generateHTMLiCal();
}
}