Discuz教程网

[代码修改] 烛光社区二级导航美化插件

[复制链接]
authicon dly 发表于 2011-1-11 13:26:30 | 显示全部楼层 |阅读模式
截图61.jpg
纯代码,自己加


  1. <style type="text/css">  
  2. #dzf{padding:15px 0;line-height:160%}
  3. #dzf p{width:321px;text-indent:70px;background:url(/static/image/common/ad.png) no-repeat 10px 2px}
  4. .dzfbl{border-left:1px solid #FFF}
  5. .dzfbr{border-right:1px solid #DDD}
  6. #dzf em{display:block;color:#D3DFDF}
  7. #dzf .xg2{color:#666}
  8. #dzf em a{color:#369}
  9. </style>
  10. <p class="z dzfbr">
  11.         <a href="forum.php?mod=viewthread&tid=1054" target="_blank" class="xw1">烛光社区管理人员申请专用帖</a>
  12.         <em class="xg2"><span id="liveclock" style"=width: 109px; height: 15px"></span>
  13. <SCRIPT language=javascript>
  14. function www_helpor_net()
  15. {
  16. var Digital=new Date()
  17. var hours=Digital.getHours()
  18. var minutes=Digital.getMinutes()
  19. var seconds=Digital.getSeconds()

  20. if(minutes<=9)
  21. minutes="0"+minutes
  22. if(seconds<=9)
  23. seconds="0"+seconds
  24. myclock="现在时刻:<font size='4' face='Arial black'>"+hours+":"+minutes+":"+seconds+"</font>"
  25. if(document.layers){document.layers.liveclock.document.write(myclock)
  26. document.layers.liveclock.document.close()
  27. }else if(document.all)
  28. liveclock.innerHTML=myclock
  29. setTimeout("www_helpor_net()",1000)
  30. }
  31. www_helpor_net();
  32. //-->
  33. </SCRIPT></em>
  34.         <em><a href="forum.php?mod=viewthread&tid=2">烛光社区服务条款</a> — <a href="forum.php?mod=viewthread&tid=1053">发帖帮助</a> — <a href="forum.php?mod=viewthread&tid=1055">发帖规定</a></em>
  35. </p>
  36. <p class="z dzfbr dzfbl" style="background-position:10px -85px">
  37.         <a class="xw1" target="_blank" href="forum.php?mod=viewthread&tid=1052">烛光社区免责声明</a>
  38.         <em class="xg2"><html>

  39. <head>
  40. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  41. <title>单行带农历的日期时间代码</title>
  42. </head>

  43. <body>
  44. <SCRIPT language=JavaScript>
  45. <!--
  46. function CalConv()
  47. {
  48.         FIRSTYEAR = 1998;
  49.         LASTYEAR = 2031;

  50.         today = new Date();
  51.         SolarYear = today.getFullYear();
  52.         SolarMonth = today.getMonth() + 1;
  53.         SolarDate = today.getDate();
  54.         Weekday = today.getDay();
  55.         LunarCal = [
  56. new tagLunarCal( 27, 5, 3, 43, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1 ),
  57. new tagLunarCal( 46, 0, 4, 48, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1 ), /* 88 */
  58. new tagLunarCal( 35, 0, 5, 53, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1 ), /* 89 */
  59. new tagLunarCal( 23, 4, 0, 59, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  60. new tagLunarCal( 42, 0, 1, 4, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  61. new tagLunarCal( 31, 0, 2, 9, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0 ),
  62. new tagLunarCal( 21, 2, 3, 14, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1 ), /* 93 */
  63. new tagLunarCal( 39, 0, 5, 20, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1 ),
  64. new tagLunarCal( 28, 7, 6, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1 ),
  65. new tagLunarCal( 48, 0, 0, 30, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1 ),
  66. new tagLunarCal( 37, 0, 1, 35, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1 ), /* 97 */
  67. new tagLunarCal( 25, 5, 3, 41, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
  68. new tagLunarCal( 44, 0, 4, 46, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1 ),
  69. new tagLunarCal( 33, 0, 5, 51, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ),
  70. new tagLunarCal( 22, 4, 6, 56, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ), /* 101 */
  71. new tagLunarCal( 40, 0, 1, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 ),
  72. new tagLunarCal( 30, 9, 2, 7, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
  73. new tagLunarCal( 49, 0, 3, 12, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1 ),
  74. new tagLunarCal( 38, 0, 4, 17, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0 ), /* 105 */
  75. new tagLunarCal( 27, 6, 6, 23, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1 ),
  76. new tagLunarCal( 46, 0, 0, 28, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0 ),
  77. new tagLunarCal( 35, 0, 1, 33, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ),
  78. new tagLunarCal( 24, 4, 2, 38, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1 ), /* 109 */
  79. new tagLunarCal( 42, 0, 4, 44, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 ),
  80. new tagLunarCal( 31, 0, 5, 49, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0 ),
  81. new tagLunarCal( 21, 2, 6, 54, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1 ),
  82. new tagLunarCal( 40, 0, 0, 59, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1 ), /* 113 */
  83. new tagLunarCal( 28, 6, 2, 5, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0 ),
  84. new tagLunarCal( 47, 0, 3, 10, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1 ),
  85. new tagLunarCal( 36, 0, 4, 15, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1 ),
  86. new tagLunarCal( 25, 5, 5, 20, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0 ), /* 117 */
  87. new tagLunarCal( 43, 0, 0, 26, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1 ),
  88. new tagLunarCal( 32, 0, 1, 31, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0 ),
  89. new tagLunarCal( 22, 3, 2, 36, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0 ) ];
  90. /* 民國年每月之日數 all by www.qpsh.com*/
  91. SolarCal = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ];

  92. /* 民國年每月之累積日數, 平年與閏年 */
  93. SolarDays = [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365, 396, 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366, 397 ];
  94.         
  95.         
  96.         if ( SolarYear <= FIRSTYEAR || SolarYear > LASTYEAR ) return 1;
  97.         sm = SolarMonth - 1;
  98.                 if ( sm < 0 || sm > 11 ) return 2;
  99.                 leap = GetLeap( SolarYear );
  100.         if ( sm == 1 )
  101.                 d = leap + 28;
  102.         else
  103.                 d = SolarCal[sm];
  104.         if ( SolarDate < 1 || SolarDate > d ) return 3;
  105.         y = SolarYear - FIRSTYEAR;
  106.         acc = SolarDays[ leap*14 + sm ] + SolarDate;
  107.         kc = acc + LunarCal[y].BaseKanChih;
  108.         Kan = kc % 10;
  109.         Chih = kc % 12;
  110.         
  111.         Age = kc % 60;
  112.         if ( Age < 22 )
  113.                 Age = 22 - Age;
  114.         else
  115.                 Age = 82 - Age;
  116.         
  117.         if ( acc <= LunarCal[y].BaseDays ) {
  118.                 y--;
  119.                 LunarYear = SolarYear - 1;
  120.                 leap = GetLeap( LunarYear );
  121.                 sm += 12;
  122.                 acc = SolarDays[leap*14 + sm] + SolarDate;
  123.          }
  124.         else
  125.                 LunarYear = SolarYear;
  126.                         l1 = LunarCal[y].BaseDays;
  127.         for ( i=0; i<13; i++ ) {
  128.                 l2 = l1 + LunarCal[y].MonthDays + 29;
  129.                 if ( acc <= l2 ) break;
  130.                 l1 = l2;
  131.          }
  132.         LunarMonth = i + 1;
  133.         LunarDate = acc - l1;
  134.         im = LunarCal[y].Intercalation;
  135.         if ( im != 0 && LunarMonth > im ) {
  136.                 LunarMonth--;
  137.                 if ( LunarMonth == im ) LunarMonth = -im;
  138.          }
  139.         if ( LunarMonth > 12 ) LunarMonth -= 12;
  140. today=new Date();
  141. function initArray(){
  142. this.length=initArray.arguments.length
  143. for(var i=0;i<this.length;i++)
  144. this[i+1]=initArray.arguments }
  145. var d=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
  146. document.write("", today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日&nbsp;",d[today.getDay()+1],"");

  147. months = ["一","二","三","四","五","六","七","八","九","十","十一","十二"];

  148. days = ["初一","初二","初三","初四","初五","初六","初七","初八","初九","初十","十一","十二","十三","十四","十五","十六","十七","十八","十九","二十","廿一","廿二","廿三","廿四","廿五","廿六","廿七","廿八","廿九","三十"];

  149.          document.write( "&nbsp;农历"+months[LunarMonth-1]+"月" + days[LunarDate-1] + "");

  150. return 0;
  151. }
  152. /* 求此民國年是否為閏年, 返回 0 為平年, 1 為閏年 */
  153. function GetLeap( year )
  154. {
  155. if ( year % 400 == 0 )
  156. return 1;
  157. else if ( year % 100 == 0 )
  158. return 0;
  159. else if ( year % 4 == 0 )
  160. return 1;
  161. else
  162. return 0;
  163. }
  164. function tagLunarCal( d, i, w, k, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13) {
  165. this.BaseDays = d; /* 到民國 1 月 1 日到農曆正月初一的累積日數 */
  166. this.Intercalation = i; /* 閏月月份. 0==此年沒有閏月 */
  167. this.BaseWeekday = w; /* 此年民國 1 月 1 日為星期幾再減 1 */
  168. this.BaseKanChih = k; /* 此年民國 1 月 1 日之干支序號減 1 */
  169. this.MonthDays = [ m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ]; /* 此農曆年每月之大小, 0==小月(29日), 1==大月(30日) */
  170. }
  171. //-->
  172. </SCRIPT>
  173. <a target=_blank href=wnl.htm><FONT color=#2b68a7><SCRIPT>CalConv();</SCRIPT></FONT></a>
  174. </body>

  175. </html></em>
  176.         <em><a target="_blank" href="./wishpl/wish.php">许愿漂流</a> — <a target="_blank" href="./xyl/">许愿林</a> - <a target="_blank" href="./youxiang.htm">网速查询与邮箱登录</a></em>
  177. </p>
  178. <p class="z dzfbr dzfbl" style="background-position:10px -165px">
  179.         <a href="forum.php?mod=viewthread&tid=120" target="_blank" class="xw1">送给所有来到烛光岁月的朋友</a>
  180.         <em><iframe name="weather_inc" src="http://tianqi.xixik.com/cframe/11" width="195" height="15" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe></em>
  181.         <em><a target="_blank" href="./tuya/">社区涂鸦<a> — </a><a target="_blank" href="./flash万年历.swf">实用万年历</a></em></em>
  182. </p>
  183. </div>


复制代码






上一篇:普通交际技巧
下一篇:【Discuz X1.5】快速回到顶部和底部、向上滚动、返回、登录QQ的网页右边按钮
authicon test 发表于 2011-1-20 09:58:22 | 显示全部楼层
其实我一直觉得楼主的品味不错!呵呵!1314学习网太棒了!
authicon tk1y 发表于 2011-2-11 11:02:03 | 显示全部楼层
既然你诚信诚意的推荐了,那我就勉为其难的看看吧!1314学习网不走平凡路。
authicon 8397192 发表于 2011-2-12 20:38:32 | 显示全部楼层
看看学习下支持下
authicon  楼主| dly 发表于 2011-2-12 20:55:26 | 显示全部楼层
回复 8397192 的帖子

谢谢
authicon 空心邂逅 发表于 2011-2-13 14:04:42 | 显示全部楼层
楼主发贴辛苦了,谢谢楼主分享!我觉得1314学习网是注册对了!
authicon hurq1 发表于 2011-2-14 18:09:53 | 显示全部楼层
楼主发贴辛苦了,谢谢楼主分享!我觉得1314学习网是注册对了!
authicon 腐朽年华 发表于 2011-2-16 17:20:53 | 显示全部楼层
韩国富与贵回家不过
authicon 雪舞 发表于 2011-2-18 16:44:01 | 显示全部楼层
咕~~(╯﹏╰)b咕~~(╯﹏╰)b
authicon biergaimu 发表于 2011-2-28 14:10:05 | 显示全部楼层
楼主发贴辛苦了,谢谢楼主分享!我觉得1314学习网是注册对了!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-2 18:33

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表