diff --git a/README.md b/README.md
index c565ff7..e5bb914 100644
--- a/README.md
+++ b/README.md
@@ -3,4 +3,11 @@ emlog 定时发布插件
定时自动发布保存为草稿的日志。
-[插件主页](http://xiaosong.org/share/auto-pub-plugin-update)
\ No newline at end of file
+使用方法:
+--------------------
+1. 通过后台安装插件;
+2. 将你要预发布的文章统统写好但不要点发布,而是保存成草稿;
+3. 在插件后台去设置插件的触发条件和设置你要发布文章的时间,并保存;
+4. 木有了~元芳,对于此插件,你怎么看?
+
+[插件主页](http://xiaosong.org/share/new-version-automatically-publish-plugin-released)
\ No newline at end of file
diff --git a/autopub.php b/autopub.php
index bd2ab2b..b4b0611 100644
--- a/autopub.php
+++ b/autopub.php
@@ -1,35 +1,55 @@
$(function(){$.get("'.BLOG_URL.'?plugin=autopub");})'."\n";
+}
+function autopubPhp(){
+ echo ''."\n";
+}
+
+function doPub(){
+ $DB = MySql::getInstance();
+ $CACHE = Cache::getInstance();
+ $autopub = unserialize(Option::get('autopub'));
+ $sql = "SELECT gid, content FROM ".DB_PREFIX."blog where hide ='y' order by date DESC";
+ $result = $DB->query($sql);
+ while($row = $DB->fetch_array($result)){
+ $key = 'post-'.$row['gid'];
+ if (isset($autopub[$key])) {
+ $pub_time = $autopub[$key];
+ if (time() >= $pub_time) {
+ $autopubCopyRight = '';
+ $condition = strpos($row['content'], $autopubCopyRight) === false ? ",content = '".addslashes($row['content'].$autopubCopyRight)."'" : "";
+ $sql_do = "UPDATE ".DB_PREFIX."blog SET hide = 'n',date = '".$pub_time."'".$condition." WHERE gid='".$row['gid']."'";
+ $DB->query($sql_do);
+ doAction('save_log', $row['gid']);
+ unset($autopub[$key]);
}
}
}
- return true;
+ Option::updateOption('autopub', serialize($autopub));
+ $CACHE->updateCache();
}
-function autopub(){
- echo ''."\n";
-}
-
-if (!dir_is_empty(AUTOPUB_CACHE_DIR)) {
- emLoadJQuery();
- addAction('index_footer', 'autopub');
- addAction('adm_footer', 'autopub');
+$autopubArray = unserialize(Option::get('autopub'));
+if (count($autopubArray) > 1) {
+ if (isset($autopubArray['trigger']) && $autopubArray['trigger'] == 'ajax') {
+ emLoadJQuery();
+ addAction('index_footer', 'autopubAjax');
+ addAction('adm_footer', 'autopubAjax');
+ } else if (isset($autopubArray['trigger']) && $autopubArray['trigger'] == 'php') {
+ addAction('adm_footer', 'autopubPhp');
+ }
}
function autopub_menu() {
diff --git a/autopub_callback.php b/autopub_callback.php
new file mode 100644
index 0000000..a868c00
--- /dev/null
+++ b/autopub_callback.php
@@ -0,0 +1,33 @@
+query("SELECT 1 FROM ".DB_PREFIX."options WHERE option_name='autopub'");
+ if (!$DB->num_rows($is_exist_option)) {
+ $DB->query("INSERT INTO ".DB_PREFIX."options (option_name, option_value) VALUES('autopub', '".serialize(array())."')");
+ }
+ $cacheDir = EMLOG_ROOT.'/content/plugins/autopub/cache/';
+ $sql = "SELECT gid FROM ".DB_PREFIX."blog where hide ='y' order by date DESC";
+ $result = $DB->query($sql);
+ $autopub = array();
+ while ($row = $DB->fetch_array($result)) {
+ if (file_exists($cacheDir.$row['gid'].'.php')) {
+ include_once($cacheDir.$row['gid'].'.php');
+ $pub_time = emStrtotime($year.'-'.$month.'-'.$day.' '.$hour.':'.$minute.':'.$second);
+ $key = 'post-'.$row['gid'];
+ $autopub[$key] = $pub_time;
+ unlink($cacheDir.$row['gid'].'.php');
+ }
+ }
+ emDeleteFile($cacheDir);
+ Option::updateOption('autopub', serialize($autopub));
+ $CACHE = Cache::getInstance();
+ $CACHE->updateCache('options');
+}
+
+?>
\ No newline at end of file
diff --git a/autopub_cron.php b/autopub_cron.php
new file mode 100644
index 0000000..1567865
--- /dev/null
+++ b/autopub_cron.php
@@ -0,0 +1,21 @@
+
\ No newline at end of file
diff --git a/autopub_cron_pid.php b/autopub_cron_pid.php
new file mode 100644
index 0000000..e69de29
diff --git a/autopub_setting.php b/autopub_setting.php
index d41a05a..174a526 100644
--- a/autopub_setting.php
+++ b/autopub_setting.php
@@ -1,75 +1,91 @@
query($sql);
$i = 1;
- while($row = $DB->fetch_array($result)){
- if(file_exists(AUTOPUB_CACHE_DIR.$row['gid'].'.php')){
- include_once(AUTOPUB_CACHE_DIR.$row['gid'].'.php');
- }else{
- $year = $month = $day = $hour = $minute = $second = '';
+ while ($row = $DB->fetch_array($result)) {
+ $key = 'post-'.$row['gid'];
+ if (isset($autopubArray[$key])) {
+ $pub_time = gmdate('Y-m-d H:i:s', $autopubArray[$key] + $timezone * 3600);
+ } else {
+ $pub_time = '';
}
$output .= '
';
$i++;
}
- if(empty($output)){
- $output = '暂无待发布日志!请将待发布日志保存为草稿!
';
+ if (empty($output)) {
+ $output = '暂无待发布日志!请将待发布日志保存为草稿!
';
}
echo $output;
}
?>
+
+
自动发布
插件设置完成
-插件设置失败,请填写合理日期!年月日必填
+插件设置失败
-
";
- $file = AUTOPUB_CACHE_DIR.$gid.'.php';
- if($year != 0 && $month != 0 && $day != 0){
- @ $fp = fopen($file, 'wb') OR emMsg('读取文件失败,如果您使用的是Unix/Linux主机,请修改/content/plugins/autopub/cache/目录的权限为777。如果您使用的是Windows主机,请联系管理员,将该文件设为everyone可写');
- @ $fw = fwrite($fp,$data) OR emMsg('写入文件失败,如果您使用的是Unix/Linux主机,请修改/content/plugins/autopub/cache/目录的权限为777。如果您使用的是Windows主机,请联系管理员,将该文件设为everyone可写');
- fclose($fp);
- }else{
- return false;
+ $autopubArray = unserialize(Option::get('autopub'));
+ if (!isset($autopubArray['trigger'])) {
+ $autopubArray['trigger'] = 'ajax';
}
-}
+ $trigger = isset($_POST['trigger']) ? trim($_POST['trigger']) : $autopubArray['trigger'];
+ $autopubArray['trigger'] = $trigger;
+ $run = EMLOG_ROOT.'/content/plugins/autopub/autopub_cron_pid.php';
+ clearstatcache();
+ if ($trigger == 'php') {
+ if (!file_exists($run)) {
+ $fp = fopen($run, 'wb') OR emMsg('读取文件失败,如果您使用的是Unix/Linux主机,请修改文件/content/plugins/autopub/的权限为755或777。如果您使用的是Windows主机,请联系管理员,将该文件设为everyone可写');
+ fclose($fp);
+ }
+ } else {
+ unlink($run);
+ }
+ if (isset($_GET['pub'])) {
+ $gid = isset($_GET['pub']) ? intval($_GET['pub']) : -1;
+ $pubTime = isset($_POST['pubTime']) ? trim($_POST['pubTime']) : '';
+ if ($gid > 0 && !empty($pubTime)) {
+ $key = 'post-'.$gid;
+ $autopubArray[$key] = emStrtotime($pubTime);
+ } else {
+ return false;
+ }
+ }
+ Option::updateOption('autopub', serialize($autopubArray));
+ $CACHE = Cache::getInstance();
+ $CACHE->updateCache('options');
}
\ No newline at end of file
diff --git a/autopub_show.php b/autopub_show.php
index ac005a8..f3f5bb8 100644
--- a/autopub_show.php
+++ b/autopub_show.php
@@ -1,24 +1,13 @@
query($sql);
-while($row = $DB->fetch_array($result)){
- if(file_exists(AUTOPUB_CACHE_DIR.$row['gid'].'.php')){
- include_once(AUTOPUB_CACHE_DIR.$row['gid'].'.php');
- $pub_time = emStrtotime($year.'-'.$month.'-'.$day.' '.$hour.':'.$minute.':'.$second);
- $autopubCopyRight = '(此文通过emlog自动发布插件发布)
';
- $content = $row['content'].$autopubCopyRight;
- if(time() > $pub_time){
- $sql_do = "UPDATE ".DB_PREFIX."blog SET hide = 'n',date = '".$pub_time."',content = '".addslashes($content)."' WHERE gid='".$row['gid']."'";
- $DB->query($sql_do);
- $CACHE->updateCache();
- doAction('save_log', $row['gid']);
- unlink(AUTOPUB_CACHE_DIR.$row['gid'].'.php');
- }
- }
+$isAjax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strstr($_SERVER['HTTP_X_REQUESTED_WITH'], 'XMLHttpRequest')) ? 1 : 0;
+if ($isAjax) {
+ doPub();
+ exit();
}
+emDirect(BLOG_URL);
?>
\ No newline at end of file
diff --git a/cache/.gitattributes b/cache/.gitattributes
deleted file mode 100644
index 412eeda..0000000
--- a/cache/.gitattributes
+++ /dev/null
@@ -1,22 +0,0 @@
-# Auto detect text files and perform LF normalization
-* text=auto
-
-# Custom for Visual Studio
-*.cs diff=csharp
-*.sln merge=union
-*.csproj merge=union
-*.vbproj merge=union
-*.fsproj merge=union
-*.dbproj merge=union
-
-# Standard to msysgit
-*.doc diff=astextplain
-*.DOC diff=astextplain
-*.docx diff=astextplain
-*.DOCX diff=astextplain
-*.dot diff=astextplain
-*.DOT diff=astextplain
-*.pdf diff=astextplain
-*.PDF diff=astextplain
-*.rtf diff=astextplain
-*.RTF diff=astextplain
diff --git a/cache/.gitignore b/cache/.gitignore
deleted file mode 100644
index 3ec67dc..0000000
--- a/cache/.gitignore
+++ /dev/null
@@ -1,162 +0,0 @@
-#################
-## Eclipse
-#################
-
-*.pydevproject
-.project
-.metadata
-bin/
-tmp/
-*.tmp
-*.bak
-*.swp
-*~.nib
-local.properties
-.classpath
-.settings/
-.loadpath
-
-# External tool builders
-.externalToolBuilders/
-
-# Locally stored "Eclipse launch configurations"
-*.launch
-
-# CDT-specific
-.cproject
-
-# PDT-specific
-.buildpath
-
-
-#################
-## Visual Studio
-#################
-
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-
-# User-specific files
-*.suo
-*.user
-*.sln.docstates
-
-# Build results
-[Dd]ebug/
-[Rr]elease/
-*_i.c
-*_p.c
-*.ilk
-*.meta
-*.obj
-*.pch
-*.pdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.vspscc
-.builds
-*.dotCover
-
-## TODO: If you have NuGet Package Restore enabled, uncomment this
-#packages/
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opensdf
-*.sdf
-
-# Visual Studio profiler
-*.psess
-*.vsp
-
-# ReSharper is a .NET coding add-in
-_ReSharper*
-
-# Installshield output folder
-[Ee]xpress
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish
-
-# Others
-[Bb]in
-[Oo]bj
-sql
-TestResults
-ClientBin
-stylecop.*
-~$*
-*.dbmdl
-Generated_Code #added for RIA/Silverlight projects
-
-# Backup & report files from converting an old project file to a newer
-# Visual Studio version. Backup files are not needed, because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-
-
-
-############
-## Windows
-############
-
-# Windows image file caches
-Thumbs.db
-
-# Folder config file
-Desktop.ini
-
-
-#############
-## Python
-#############
-
-*.py[co]
-
-# Packages
-*.egg
-*.egg-info
-dist
-build
-eggs
-parts
-bin
-var
-sdist
-develop-eggs
-.installed.cfg
-
-# Installer logs
-pip-log.txt
-
-# Unit test / coverage reports
-.coverage
-.tox
-
-#Translations
-*.mo
-
-#Mr Developer
-.mr.developer.cfg
-
-# Mac crap
-.DS_Store
diff --git a/lhgcalendar.min.js b/lhgcalendar.min.js
new file mode 100644
index 0000000..b250c8d
--- /dev/null
+++ b/lhgcalendar.min.js
@@ -0,0 +1,6 @@
+/*!
+ * lhgcore Calendar Plugin v3.0.0
+ * Date : 2012-03-13 10:35:11
+ * Copyright (c) 2009 - 2012 By Li Hui Gang
+ */
+eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(F(a,b,c){F p(a){B b=a.3o||a.3p;C b>=48&&b<=57||b>=37&&b<=40||b==8||b==46}F q(a){B b=J,c={"M+":b.1m()+1,"d+":b.1d(),"h+":b.1y()%12==0?12:b.1y()%12,"H+":b.1y(),"m+":b.25(),"s+":b.26(),"q+":3q.3r((b.1m()+3)/3),w:"3s".N(b.2G()),S:b.3t()};/(y+)/.1j(a)&&(a=a.G(1n.$1,(b.1z()+"").27(4-1n.$1.X)));R(B d 2H c)(K 1n("("+d+")")).1j(a)&&(a=a.G(1n.$1,1n.$1.X==1?c[d]:("3u"+c[d]).27((""+c[d]).X)));C a}F r(b,c){F p(b,c){3v=a.2n(b);I(b==="")C;C c=c.G(/1A/,2I).G(/2J/,2K).G(/1B/,2L).G(/M/,2M).G(/1C/,2N).G(/d/,2O).G(/2o/,2P).G(/H/,2Q).G(/2p/,2R).G(/m/,2S).G(/2q/,2T).G(/s/,2U),c=K 1n("^"+c+"$"),d=c,c.1j(b)}F q(a){B b=[],c=0,d;1o=a.N("1A"),1o<0&&(1o=a.N("2J")),1o>=0&&(b[c]=1o,c++),1p=a.N("1B"),1p<0&&(1p=a.N("M")),1p>=0&&(b[c]=1p,c++),1q=a.N("1C"),1q<0&&(1q=a.N("d")),1q>=0&&(b[c]=1q,c++),1r=a.N("2o"),1r<0&&(1r=a.N("H")),1r>=0&&(b[c]=1r,c++),1s=a.N("2p"),1s<0&&(1s=a.N("m")),1s>=0&&(b[c]=1s,c++),1t=a.N("2q"),1t<0&&(1t=a.N("s")),1t>=0&&(b[c]=1t,c++),d=[1o,1p,1q,1r,1s,1t];R(c=0;cb[j+1]){B e=b[j];b[j]=b[j+1],b[j+1]=e}R(c=0;c=0?f[h[0]+1]:e.1z(),k=h[1]>=0?f[h[1]+1]-1:e.1m(),l=h[2]>=0?f[h[2]+1]:e.1d(),m=h[3]>=0?f[h[3]+1]:e.1y(),n=h[4]>=0?f[h[4]+1]:e.25(),o=h[5]>=0?f[h[5]+1]:e.26(),g=K O(i,k,l,m,n,o);C g.1d()==l?g:e}C e}F s(b,c,d){B e=K O;C/%/.1j(b)?(d=d||0,b=b.G(/%y/,e.1z()).G(/%M/,e.1m()+1).G(/%d/,e.1d()+d).G(/%H/,e.1y()).G(/%m/,e.25()).G(/%s/,e.26()).G(f,"0$1")):/^#[\\w-]+$/.1j(b)&&(b=a.2n(a(b)[0].L),b.X>0&&c&&(b=q.1D(r(b,c),"1A-1B-1C"))),b}B d=b.3x,e,f=/\\b(\\w)\\b/g,g=!!b.3y,h=g&&!b.3z,i=a(b),k="3A"+(K O).3B(),l=F(a,b){B c=a.X,e;R(;b2X>\':"",n=\'<1b E="3Q" 1Q="0" 1R="0" 1S="0"><1F><1e E="3V"><1b 16="29%" 1R="0" 1S="0" 1Q="0"><1G E="3X" 1T="4" L=""/>\\3Y<1G E="44" 1T="4" L=""/>\\451b><1e E="49" P="1c:1H;"><1b 16="29%" 1R="1" 1S="0" 1Q="0"><2a E="4a">\\4c\\4e\\4g2a><1F E="4h">1F>1b>1e>1e><1e E="4i"><1b 1R="1" 1S="0" 1Q="0"><2a>\\4j\\4k\\4l\\4m\\4n\\4o\\4p2a><1F E="4q">1F>1b>1e><1e E="4r"><1b 16="29%" 1R="0" 1S="0" 1Q="0">\\4u\\4v<1G E="4x" 1T="2"/>:<1G E="4y" 1T="2"/>:<1G E="4z" 1T="2"/>\\4C\\4D1b>1e>1F>1b>\'+m;4I{d.4J("4K",!1,!0)}4L(o){}(F(a){B b=d.1I("4M");b.Z=l+"4N/2s.2w",b.4O="4P",a.1k(b)})(d.2t("4Q")[0]);B t=F(a){a=a||{};B b=t.35;R(B d 2H b)a[d]===c&&(a[d]=b[d]);C e?e.2b(a):K t.1U.2b(a)};t.1U=t.36={4R:t,2b:F(b){B c=J,d,g=c.2x(),i,j;C c.1V=b,c.13=d=c.13||c.38(),c.1J=g.4S||g.2c,c.2d=b.28?a(b.28)[0]:c.1J,b.39?d.2y[0].P.1c="":d.2y[0].P.1c="1H",b.1K&&(b.1K=s(b.1K,b.2z,b.2A?1:0)),b.1L&&(b.1L=s(b.1L,b.2z,b.2A?-1:0)),i=a.2n(c.2d.L),i.X>0?j=r(i,b.1M):j=K O,d.2e[0].L=(j.1y()+"").G(f,"0$1"),d.2f[0].L=(j.25()+"").G(f,"0$1"),d.2g[0].L=(j.26()+"").G(f,"0$1"),a("1G",d.2y[0]).4T({4U:b.1M.N("H")>=0?!1:!0}),c.1f(j).3a().3b(c.1J),h&&a("#2Y").2w({3c:d.15[0].2h+"1u"}),e||(d.15[0].P.16=d.15[0].3d+"1u",c.3e(),e=c),c},1f:F(a,b){B c=J,e=c.13,g,h,i,j=[],k,l,m=c.1V,n,o,p,q=0,r;c.U=k=a.1z(),c.V=l=a.1m()+1,c.Q=b||a.1d(),e.1v[0].L=k,e.1g[0].L=l,g=(K O(k,l-1,1)).2G(),h=(K O(k,l-1,0)).1d(),i=(K O(k,l,0)).1d();R(B t=0;t=i+g||m.1K&&m.1K>r||m.1L&&m.1L=0)c.1W(p,j[q]);W I(m.1w){R(B v=0,w=m.1w.X;v\'+c+"",b.1x[k+"D"]=c+"",c===J.Q&&a(b).4W("4X")):b.2j=c+""},1X:F(a,b){B c=J.13,e,f,g=d.3f();R(B h=0;h<4;h++){e=d.1I("T");R(B i=0;i<3;i++)f=d.1I("A"),f.2j=\'\'+(b?b[a]:a)+"",e.1k(f),b?f.1x[k+"M"]=a:f.1x[k+"Y"]=a,a++;g.1k(e)}2D(c.1N[0].1x)c.1N[0].3h(c.1N[0].1x);C c.1N[0].1k(g),J},2E:F(){J.13.1O[0].P.1c="3i"},1P:F(){J.13.1O[0].P.1c="1H"},3b:F(){B b=J,c=b.13,d,e=a(b.1J).2k(),f=e.1E+b.1J.2h,g=i.16(),h=i.3c(),j=i.4Y(),k=i.4Z(),l=c.15[0].3d,m=c.15[0].2h;C f+m>h+k&&(f=e.1E-m-2),e.17+l>g+j&&(e.17-=l),c.15.2w({17:e.17+"1u",1E:f+"1u"}),d=c.1g.2k().1E+c.1g[0].2h,c.1O[0].P.1E=d-f+"1u",b},38:F(){B b=d.1I("1e");b.P.50="2Z:32;1c:1H;z-33:"+J.1V.3j+";",b.2j=n;B c,e=0,f={15:a(b)},g=b.2t("*"),h=g.X;R(;e=0)C c;a=a.3k}C 1a},2F:F(b){b=1h(b,10);B c=J,d=c.1V,e=c.13,f=K O(c.U,c.V-1,b);I(d.1M.N("H")>=0){B g=1h(e.2e[0].L,10),h=1h(e.2f[0].L,10),i=1h(e.2g[0].L,10);f=K O(c.U,c.V-1,b,g,h,i)}c.Q=b,d.1Y&&d.1Y.1D(c),c.2d.L=q.1D(f,d.1M);I(d.1Z){B j=d.1M.N("H")>=0?"1A-1B-1C 2o:2p:2q":"1A-1B-1C";a(d.1Z)[0].L=q.1D(f,j)}c.2l()},3e:F(){B b=J,c=b.13;c.15.1i("2m",F(d){B e=d.2c;I(e[k+"D"])b.2F(e[k+"D"]);W I(e===c.59[0])b.1f(K O(b.U,b.V-2),b.Q);W I(e===c.5a[0])b.1f(K O(b.U,b.V),b.Q);W I(e===c.5b[0])b.1f(K O(b.U-1,b.V-1),b.Q);W I(e===c.5c[0])b.1f(K O(b.U+1,b.V-1),b.Q);W I(e===c.5d[0]){B f=K O;b.U=f.1z(),b.V=f.1m()+1,b.Q=f.1d(),b.2F(b.Q)}W I(e===c.5e[0]){B g=b.1V;g.1Y&&(b.U="",b.V="",b.Q="",g.1Y.1D(b)),b.2d.L="",b.2l(),g.1Z&&(a(g.1Z)[0].L="")}W{I(e===c.1g[0]){B h=["5f","5g","5h","5i","5j","5k","5l","5m","5n","10","11","12"],i=c.1g.2k().17-1h(c.15[0].P.17,10);C c.1g[0].3l(),c.3m[0].P.1c="1H",c.1O[0].P.17=i+"1u",b.1X(0,h).2E(),!1}I(e===c.1v[0]){B i=c.1v.2k().17-1h(c.15[0].P.17,10);C c.1v[0].3l(),c.3m[0].P.1c="",c.1O[0].P.17=i+"1u",b.1X(b.U-4).2E(),!1}B f=K O,j=c.1g[0].L||f.1m()+1,l=c.1v[0].L||f.1z();b.1f(K O(l,j-1),b.Q)}C b.1P(),!1}),c.1O.1i("2m",F(d){B e=d.2c;I(e[k+"M"]>=0)c.1g[0].L=e[k+"M"]+1,b.1f(K O(b.U,e[k+"M"]),b.Q).1P();W I(e[k+"Y"])c.1v[0].L=e[k+"Y"],b.1f(K O(e[k+"Y"],b.V-1),b.Q).1P();W I(e===c.5o[0]){B f=a("a",c.1N[0])[0][k+"Y"];b.1X(f-12)}W I(e===c.5p[0]){B f=a("a",c.1N[0])[0][k+"Y"];b.1X(f+12)}W e===c.5q[0]&&b.1P();C!1}),c.1g.1i("24",p),c.1v.1i("24",p),c.2e.1i("24",p),c.2f.1i("24",p),c.2g.1i("24",p),a(d).1i("2m",F(a){a.2c!==b.1J&&b.2l().1P()})},3a:F(){C J.13.15[0].P.1c="3i",J},2l:F(){C J.13.15[0].P.1c="1H",J},1d:F(a){B b=J,c=b.13,d=1h(c.2e[0].L,10),e=1h(c.2f[0].L,10),f=1h(c.2g[0].L,10);I(b.U===""&&b.V===""&&b.Q==="")C"";5r(a){1l"y":C b.U;1l"M":C b.V;1l"d":C b.Q;1l"H":C d;1l"m":C e;1l"s":C f;1l"5s":C b.U+"-"+b.V+"-"+b.Q;1l"5t":C b.U+"-"+b.V+"-"+b.Q+" "+d+":"+e+":"+f}}},t.1U.2b.36=t.1U,t.5u=F(a,b){C q.1D(a,b)},t.35={28:1a,1M:"1A-1B-1C",1K:1a,1L:1a,39:!0,2z:1a,2C:1a,1Y:1a,1Z:1a,1w:1a,3g:!1,3j:5v,2A:!1,5w:1a},a.1U.3n=F(a,b){C b=b||"2m",J.1i(b,F(){C t(a),!1}),J},b.2s=a.3n=t})(J.5x||J.5y,J)',62,345,'||||||||||||||||||||||||||||||||||||td|var|return||class|function|replace||if|this|new|value||indexOf|Date|style|day|for||tr|year|month|else|length||href||||DOM||wrap|width|left|javascript|void|null|table|display|getDate|div|_draw|im|parseInt|bind|test|appendChild|case|getMonth|RegExp|yi|Mi|di|Hi|mi|si|px|iy|disDate|firstChild|getHours|getFullYear|yyyy|MM|dd|call|top|tbody|input|none|createElement|evObj|minDate|maxDate|format|lbox|ymlist|_hideList|border|cellspacing|cellpadding|maxlength|fn|config|_setCell|_drawList|onSetDate|real|||||keypress|getMinutes|getSeconds|substr|id|100|thead|_init|target|inpE|hour|minute|second|offsetHeight|db|innerHTML|offset|hide|click|trim|HH|mm|ss|src|lhgcalendar|getElementsByTagName|align|center|css|_getEvent|foot|targetFormat|noToday|push|disWeek|while|_showList|_setDate|getDay|in|y4|yy|y2|M2|M1|d2|d1|H2|H1|m2|m1|s2|s1|lastIndexOf|break|iframe|lhgcal_frm|position|||absolute|index|0px|setting|prototype||_getDOM|btnBar|show|_offset|height|offsetWidth|_addEvent|createDocumentFragment|enDate|removeChild|block|zIndex|caller|select|ybar|calendar|keyCode|charCode|Math|floor|0123456|getMilliseconds|00|sting|exec|document|ActiveXObject|XMLHttpRequest|JCA|getTime|querySelector|getAttribute|script|hideFocus|true|frameborder|about|blank|filter|progid|DXImageTransform|Microsoft|Alpha|opacity|lcui_border|lcui_lt|lcui_t|lcui_rt|lcui_l|lcui_head|cui_pm|cui_im|u6708|cui_nm||cui_py||60|cui_iy|u5e74||cui_ny||cui_ymlist|cui_ybar|cui_pybar|u00ab|cui_cybar|u00d7|cui_nybar|u00bb|cui_lbox|lcui_body|u65e5|u4e00|u4e8c|u4e09|u56db|u4e94|u516d|cui_db|cui_foot|lcui_today|cui_tbtn|u4eca|u5929|lcui_time|cui_hour|cui_minute|cui_second|lcui_empty|cui_dbtn|u6e05|u7a7a|lcui_r|lcui_lb|lcui_b|lcui_rb|try|execCommand|BackgroundImageCache|catch|link|skins|rel|stylesheet|head|constructor|srcElement|attr|disabled|reverse|addClass|cui_today|scrollLeft|scrollTop|cssText|className|split|cui_|body|event|arguments||Event|pm|nm|py|ny|tbtn|dbtn|01|02|03|04|05|06|07|08|09|pybar|nybar|cybar|switch|date|dateTime|formatDate|1978|linkageObj|jQuery|lhgcore'.split('|'),0,{}));
\ No newline at end of file
diff --git a/skins/default/calendar.gif b/skins/default/calendar.gif
new file mode 100644
index 0000000..7a51986
Binary files /dev/null and b/skins/default/calendar.gif differ
diff --git a/skins/default/default_s.gif b/skins/default/default_s.gif
new file mode 100644
index 0000000..915cd9f
Binary files /dev/null and b/skins/default/default_s.gif differ
diff --git a/skins/default/default_s2.gif b/skins/default/default_s2.gif
new file mode 100644
index 0000000..35240d8
Binary files /dev/null and b/skins/default/default_s2.gif differ
diff --git a/skins/lhgcalendar.css b/skins/lhgcalendar.css
new file mode 100644
index 0000000..7ac53cd
--- /dev/null
+++ b/skins/lhgcalendar.css
@@ -0,0 +1,51 @@
+/*!
+ * lhgcore Calendar Plugin StyleSheet
+ * Copyright (c) 2009 - 2012 By Li Hui Gang
+ */
+
+.lcui_border{ font:12px/1.333 tahoma,arial,\5b8b\4f53,sans-serif;background-color:#fff; }
+
+.lcui_lt,.lcui_rt,.lcui_lb,.lcui_rb,.lcui_l,.lcui_r,.cui_py,.cui_ny,.cui_pm,.cui_nm{ width:3px;background:url(default/default_s.gif) no-repeat; }
+
+.lcui_lt,.lcui_rt{ height:10px; }
+.lcui_lt{ background-position:-65px 0; }
+.lcui_rt{ background-position:-69px 0; }
+.lcui_lb,.lcui_rb{ height:3px; }
+.lcui_lb{ background-position:-65px -11px; }
+.lcui_rb{ background-position:-69px -11px; }
+
+.lcui_l,.lcui_r{ background-repeat:repeat-y; }
+.lcui_l{ background-position:-73px 0; }
+.lcui_r{ background-position:-77px 0; }
+
+.lcui_t,.lcui_b{ background:url(default/default_s2.gif) repeat-x;font-size:0; }
+.lcui_t{ background-position:0 0; }
+.lcui_b{ background-position:0 -10px; }
+
+.lcui_head{ padding:5px 8px 3px; }
+.lcui_body thead{ text-align:center;color:#0597db;font:14px "幼圆",Tahoma,Arial,sans-serif;font-weight:bold;height:18px; }
+
+.cui_py{ display:block;width:9px;height:16px;background-position:-25px 0; }
+.cui_ny{ display:block;width:9px;height:16px;background-position:-35px 0; }
+.cui_iy{ width:40px;margin:0;padding:0;border:1px solid #eee;height:14px;font:12px tahoma,arial;cursor:pointer;text-align:center;_vertical-align:middle;margin-right:2px; }
+
+.cui_pm{ display:block;width:9px;height:16px;background-position:-45px 0; }
+.cui_nm{ display:block;width:9px;height:16px;background-position:-55px 0; }
+.cui_im{ width:20px;margin:0;padding:0;border:1px solid #eee;height:14px;font:12px tahoma,arial;cursor:pointer;text-align:center;_vertical-align:middle;margin-right:2px; }
+
+.cui_db td{ background-color:#f7f7f7;color:#999;font:11px verdana,arial,sans-serif;cursor:default;height:20px;width:24px;text-align:center; }
+.cui_db a{ color:#000;text-decoration:none;display:block;height:20px;line-height:20px;width:24px;cursor:default; }
+.cui_db a:hover,.cui_today{ background:#f3f3f3 url(default/default_s.gif) no-repeat;background-position:0 0; }
+
+.cui_foot{ padding:2px 0 1px 0;_padding:1px 0 0; }
+.lcui_today,.lcui_empty{ width:44px; }
+.cui_tbtn,.cui_dbtn{ display:block;border:1px solid #999;color:#000;text-decoration:none;background-color:#f2f2f2;width:38px;height:17px;line-height:17px;line-height:20px\0; }
+.cui_tbtn:hover,.cui_dbtn:hover{ border:1px solid #0a246a;background-color:#c2cbe0; }
+.lcui_time input{margin:0;padding:0;border:1px solid #999;width:20px;height:17px;font:11px Verdana,Arial;text-align:center;background-color:#f2f2f2;line-height:17px;}
+
+.cui_ymlist{ position:absolute;border:1px solid #0093d1;background-color:#fff;width:120px; }
+.cui_lbox a{ display:block;padding:3px 0;background:#f7f7f7;text-decoration:none;cursor:default;color:#000;text-align:center;font:11px verdana,arial,sans-serif; }
+.cui_lbox a:hover{ background:#3991d1;color:#fff; }
+
+.cui_ybar{ background-color:#f7f7f7; }
+.cui_ybar a{ display:block;text-decoration:none;text-align:center;color:#000; }