晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
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/public_html/crm/libraries/jquery/timepicker/lib/ |
Upload File : |
$(function() {
$('.datepair input.date').each(function(){
var $this = $(this);
$this.datepicker({
'dateFormat': 'm/d/yy',
'autoclose': true
});
if ($this.hasClass('start') || $this.hasClass('end')) {
$this.on('changeDate change', doDatepair);
}
});
$('.datepair input.time').each(function() {
var $this = $(this);
var opts = { 'showDuration': true, 'timeFormat': 'g:ia', 'scrollDefaultNow': true };
if ($this.hasClass('start') || $this.hasClass('end')) {
opts.onSelect = doDatepair;
}
$this.timepicker(opts);
});
$('.datepair').each(initDatepair);
function initDatepair()
{
var container = $(this);
var startDateInput = container.find('input.start.date');
var endDateInput = container.find('input.end.date');
var dateDelta = 0;
if (startDateInput.length && endDateInput.length) {
var startDate = new Date(startDateInput.val());
var endDate = new Date(endDateInput.val());
dateDelta = endDate.getTime() - startDate.getTime();
container.data('dateDelta', dateDelta);
}
var startTimeInput = container.find('input.start.time');
var endTimeInput = container.find('input.end.time');
if (startTimeInput.length && endTimeInput.length) {
var startInt = startTimeInput.timepicker('getSecondsFromMidnight');
var endInt = endTimeInput.timepicker('getSecondsFromMidnight');
container.data('timeDelta', endInt - startInt);
if (dateDelta < 86400000) {
endTimeInput.timepicker('option', 'minTime', startInt);
}
}
}
function doDatepair()
{
var target = $(this);
if (target.val() == '') {
return;
}
var container = target.closest('.datepair');
if (target.hasClass('date')) {
updateDatePair(target, container);
} else if (target.hasClass('time')) {
updateTimePair(target, container);
}
}
function updateDatePair(target, container)
{
var start = container.find('input.start.date');
var end = container.find('input.end.date');
if (!start.length || !end.length) {
return;
}
var startDate = new Date(start.val());
var endDate = new Date(end.val());
var oldDelta = container.data('dateDelta');
if (oldDelta && target.hasClass('start')) {
var newEnd = new Date(startDate.getTime()+oldDelta);
end.val(newEnd.format('m/d/Y'));
end.datepicker('update');
return;
} else {
var newDelta = endDate.getTime() - startDate.getTime();
if (newDelta < 0) {
newDelta = 0;
if (target.hasClass('start')) {
end.val(startDate.format('m/d/Y'));
end.datepicker('update');
} else if (target.hasClass('end')) {
start.val(endDate.format('m/d/Y'));
start.datepicker('update');
}
}
if (newDelta < 86400000) {
var startTimeVal = container.find('input.start.time').val();
if (startTimeVal) {
container.find('input.end.time').timepicker('option', {'minTime': startTimeVal});
}
} else {
container.find('input.end.time').timepicker('option', {'minTime': null});
}
container.data('dateDelta', newDelta);
}
}
function updateTimePair(target, container)
{
var start = container.find('input.start.time');
var end = container.find('input.end.time');
if (!start.length || !end.length) {
return;
}
var startInt = start.timepicker('getSecondsFromMidnight');
var endInt = end.timepicker('getSecondsFromMidnight');
var oldDelta = container.data('timeDelta');
var dateDelta = container.data('dateDelta');
if (target.hasClass('start') && (!dateDelta || dateDelta < 86400000)) {
end.timepicker('option', 'minTime', startInt);
}
var endDateAdvance = 0;
var newDelta;
if (oldDelta && target.hasClass('start')) {
// lock the duration and advance the end time
var newEnd = (startInt+oldDelta)%86400;
if (newEnd < 0) {
newEnd += 86400;
}
end.timepicker('setTime', newEnd);
newDelta = newEnd - startInt;
} else if (startInt !== null && endInt !== null) {
newDelta = endInt - startInt;
} else {
return;
}
container.data('timeDelta', newDelta);
if (newDelta < 0 && (!oldDelta || oldDelta > 0)) {
// overnight time span. advance the end date 1 day
var endDateAdvance = 86400000;
} else if (newDelta > 0 && oldDelta < 0) {
// switching from overnight to same-day time span. decrease the end date 1 day
var endDateAdvance = -86400000;
}
var startInput = container.find('.start.date');
var endInput = container.find('.end.date');
if (startInput.val() && !endInput.val()) {
endInput.val(startInput.val());
endInput.datepicker('update');
dateDelta = 0;
container.data('dateDelta', 0);
}
if (endDateAdvance != 0) {
if (dateDelta || dateDelta === 0) {
var endDate = new Date(endInput.val());
var newEnd = new Date(endDate.getTime() + endDateAdvance);
endInput.val(newEnd.format('m/d/Y'));
endInput.datepicker('update');
container.data('dateDelta', dateDelta + endDateAdvance);
}
}
}
});
// Simulates PHP's date function
Date.prototype.format=function(format){var returnStr='';var replace=Date.replaceChars;for(var i=0;i<format.length;i++){var curChar=format.charAt(i);if(replace[curChar]){returnStr+=replace[curChar].call(this);}else{returnStr+=curChar;}}return returnStr;};Date.replaceChars={shortMonths:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],longMonths:['January','February','March','April','May','June','July','August','September','October','November','December'],shortDays:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],longDays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],d:function(){return(this.getDate()<10?'0':'')+this.getDate();},D:function(){return Date.replaceChars.shortDays[this.getDay()];},j:function(){return this.getDate();},l:function(){return Date.replaceChars.longDays[this.getDay()];},N:function(){return this.getDay()+1;},S:function(){return(this.getDate()%10==1&&this.getDate()!=11?'st':(this.getDate()%10==2&&this.getDate()!=12?'nd':(this.getDate()%10==3&&this.getDate()!=13?'rd':'th')));},w:function(){return this.getDay();},z:function(){return"Not Yet Supported";},W:function(){return"Not Yet Supported";},F:function(){return Date.replaceChars.longMonths[this.getMonth()];},m:function(){return(this.getMonth()<9?'0':'')+(this.getMonth()+1);},M:function(){return Date.replaceChars.shortMonths[this.getMonth()];},n:function(){return this.getMonth()+1;},t:function(){return"Not Yet Supported";},L:function(){return(((this.getFullYear()%4==0)&&(this.getFullYear()%100!=0))||(this.getFullYear()%400==0))?'1':'0';},o:function(){return"Not Supported";},Y:function(){return this.getFullYear();},y:function(){return(''+this.getFullYear()).substr(2);},a:function(){return this.getHours()<12?'am':'pm';},A:function(){return this.getHours()<12?'AM':'PM';},B:function(){return"Not Yet Supported";},g:function(){return this.getHours()%12||12;},G:function(){return this.getHours();},h:function(){return((this.getHours()%12||12)<10?'0':'')+(this.getHours()%12||12);},H:function(){return(this.getHours()<10?'0':'')+this.getHours();},i:function(){return(this.getMinutes()<10?'0':'')+this.getMinutes();},s:function(){return(this.getSeconds()<10?'0':'')+this.getSeconds();},e:function(){return"Not Yet Supported";},I:function(){return"Not Supported";},O:function(){return(-this.getTimezoneOffset()<0?'-':'+')+(Math.abs(this.getTimezoneOffset()/60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()/60))+'00';},P:function(){return(-this.getTimezoneOffset()<0?'-':'+')+(Math.abs(this.getTimezoneOffset()/60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()/60))+':'+(Math.abs(this.getTimezoneOffset()%60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()%60));},T:function(){var m=this.getMonth();this.setMonth(0);var result=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,'$1');this.setMonth(m);return result;},Z:function(){return-this.getTimezoneOffset()*60;},c:function(){return this.format("Y-m-d")+"T"+this.format("H:i:sP");},r:function(){return this.toString();},U:function(){return this.getTime()/1000;}};