1

我在 joomla 做会议室预订项目。(即jevents)。创建预订邮件后,应自动通过日历约会发送给团队成员。

为此,我使用了生成 ics 文件下方的代码,但我需要将其更改为自动过程。专家可以给出想法或步骤来完成这个模块。

<?php
header("Content-Type: text/Calendar");
header("Content-Disposition: inline; filename=alert.ics"); /* for ics file */

/*$year = $_POST['year'];
$month = $_POST['month'];
$day = $_POST['day'];
$time = $_POST['time'] . '00';
$summary = $_POST['summary'];*/

$year = '2012'; /* year */
$month = '11'; /* month */
$day = '30'; /* day */
$time = '12:00'; /* time of the events */
$summary = 'Treat in Chennai Five Star Hotel';

echo "BEGIN:VCALENDAR\n";
echo "VERSION:2.0\n";
echo "PRODID:-//YourSite//NONSGML YourSite//EN\n";
echo "METHOD:PUBLISH\n"; // required by Outlook
echo "BEGIN:VEVENT\n";
echo "UID:".date('Ymd').'T'.date('His')."-".rand()."-www.vrv.it\n"; // required by Outlook
echo "DTSTAMP:".date('Ymd').'T'.date('His')."\n"; // required by Outlook
echo "DTSTART:$year"."$month"."$day"."T"."$time\n"; //20120824T093200 (Datetime format required) 
echo "SUMMARY:$summary\n"; /* summary */
echo "DESCRIPTION: this is just a test\n"; /* Description */
echo "END:VEVENT\n";
echo "END:VCALENDAR\n";
?>
4

0 回答 0