<%if request("act")="ok" then%> <% name=request.Form("name") Response.Cookies("ciduppname")=name zhanshi=request("zhanshi") Response.Cookies("ciduppzhanshi")=zhanshi jg=request("jg") y=request("y") m=request("m") d=request("d") mins=request("min") h=request("h") birthyear=request("birthyear") Response.Cookies("ciduppyear")=birthyear sex=request("sex") Response.Cookies("ciduppsex")=sex phn=request("pai") gsarrage=request("guishen") scpf=request("scpf") df=request("df") zhouye=request("zhouye") Pf=request("pf") Nyangli=y&"年"&m&"月"&d&"日"&h&"时"&mins&"分" sex=request("sex") if birthyear>y then response.Write("输入有误,返回重新开始") response.end end if %> <%'年命 dys=(birthyear-1924)mod 12 dys=(dys+12) mod 12 tys=(birthyear-1924)mod 10 tys=(tys+10)mod 10 ygzs=tg(tys)&dz(dys) call xunkong(ygzs,yxks,yxss) 'response.write yxss suishu=y-birthyear+1 if sex then hntg=(2+suishu-1) mod 10 hndz=(dzorder(yxss)+suishu)mod 12 else hntg=(9+suishu-1) mod 10 hndz=(dzorder(yxss)-4+suishu)mod 12 end if hangn=tg(hntg)&dz(hndz) 'response.write hangn&suishu %> <%dates=y&"-"&m&"-"&d Ytime=dates&" "&h&":"&m&":00" if not isdate(dates) then response.write dates&"不是一个合法的日期" response.end end if 'response.write ytime call sizhu(y,m,d,h,mins,ygz,mgz,dgz,tgz) call form_load(ytime,ntime,cyue,cri,cyear) call makejq(ytime,prejq,nextjq) call xunkong(ygz,yxk,yxs) call xunkong(mgz,mxk,mxs) call xunkong(dgz,dxk,dxs) call xunkong(hgz,hxk,hxs) nJQ=RIGHT(NEXTjQ,2) %> <% '月将 select case njq case "雨水","惊蛰" yuej="亥" case "春分","清明" yuej="戌" case "谷雨","立夏" yuej="酉" case "小满","芒种" yuej="申" case "夏至","小暑" yuej="未" case "大暑","立秋" yuej="午" case "处暑","白露" yuej="巳" case "秋分","寒露" yuej="辰" case "霜降","立冬" yuej="卯" case "小雪","大雪" yuej="寅" case "冬至","小寒" yuej="丑" case "大寒","立春" yuej="子" end select '月将 %> <%dim tianpan(11) yjorder=Dzorder(yuej) szorder=Dzorder(tgz) xd=yjorder-szorder szindex=(1-szorder+12)mod 12 szindex=(szindex+yjorder-1)mod 12 for i=0 to 11 iindex =(szindex+12+i-1) mod 12 tianpan(i)=dz(iindex) next shizhi=right(tgz,1) %> <%'四课 select case left(dgz,1) case "甲" Jk="寅" case "乙" Jk="辰" case "丙","戊" Jk="巳" case "丁","己" Jk="未" case "庚" Jk="申" case "辛" Jk="戌" case "壬" Jk="亥" case "癸" Jk="丑" end select jk1index=dzorder(jk) mod 12 jk3index=dzorder(dgz) mod 12 Jk1=tianpan(jk1index) jk2index=dzorder(jk1)mod 12 jk2=tianpan(jk2index) jk3=tianpan(jk3index) jk4index=dzorder(jk3)mod 12 jk4=tianpan(jk4index) %> <% '贵神 szorders=dzorder(tgz) if zhouye=2 then if szorders>=4 and szorders<10 then zhouye=1 else zhouye=0 end if end if '默认的昼夜选择 'response.Write(szorders) dim guishens(11) if gsarrage then select case left(dgz,1) case "甲","戊","庚" if zhouye then startGs="丑" else startGs="未" end if case "乙","己" if zhouye then startGs="子" else startGs="申" end if'寅申乡 case "丙","丁" if zhouye then startGs="亥" else startGs="酉" end if'"巳"酉 case "壬","癸" if zhouye then startGs="巳" else startGs="亥" end if'巳亥 case "辛" if zhouye then startGs="午" else startGs="寅" end if'午虎 end select else select case left(dgz,1) case "甲" if zhouye then startGs="未" else startGs="丑" end if case "戊","庚" if zhouye then startGs="丑" else startGs="未" end if case "乙" if zhouye then startGs="申" else startGs="子" end if'寅申乡 case "己" if zhouye then startGs="子" else startGs="申" end if'寅申乡 case "丙" if zhouye then startGs="酉" else startGs="亥" end if'"巳"酉 case "丁" if zhouye then startGs="亥" else startGs="酉" end if'"巳"酉 case "壬" if zhouye then startGs="卯" else startGs="巳" end if'巳亥 case "癸" if zhouye then startGs="巳" else startGs="卯" end if'巳亥 case "辛" if zhouye then startGs="寅" else startGs="午" end if'午虎 end select end if for i=0 to 11 '找出在天盘的编号 if tianpan(i)=startGs then exit for end if next 'response.Write(startGs&i) '确定顺序 if i>=0 and i<=5 then orders=1 else orders=0 end if if orders then for j=0 to 11 select case j case 0,4,9 guishens((i+j)mod 12)=left(guishen(j),1) case 1,2,3,5,6,7,8,10,11 guishens((i+j)mod 12)=right(guishen(j),1) end select next else for j=0 to 11 select case j case 0,4,9 guishens((i-j+12)mod 12)=left(guishen(j),1) case 1,2,3,5,6,7,8,10,11 guishens((i-j+12)mod 12)=right(guishen(j),1) end select next end if %> <%'四课贵神 'response.write jk1index gs1=guishens(jk1index) gs2=guishens(jk2index) gs3=guishens(jk3index) gs4=guishens(jk4index) %> <%'三传 'response.write dgz schang=(tgorder(dgz)-1)*6+round(dzorder(dgz)/2) 'response.write (round(3/2)) 'response.write schang 'response.end scorder=(szorder-yjorder+13)mod 12 if scorder=0 then scorder=12 end if set fo=server.createobject("scripting.filesystemobject") path=server.mappath("temp\sanchuan.txt") set fn=fo.opentextfile(path) for i=1 to schang-1 fn.skipline next str=fn.readline 'response.Write("dd"&scorder&"
"&schang&"
") 'response.Write(str) ScStr=split(str,",") sanchuan=trim(ScStr(scorder)) chuan1=mid(sanchuan,2,1) chuan2=mid(sanchuan,3,1) chuan3=mid(sanchuan,4,1) 'response.Write(sanchuan) for i= 0 to 11 if tianpan(i)=chuan1 then chuan1index=i end if if tianpan(i)=chuan2 then chuan2index=i end if if tianpan(i)=chuan3 then chuan3index=i end if next scgs1=guishens(chuan1index) scgs2=guishens(chuan2index) scgs3=guishens(chuan3index) %> <%'三传天干,和起时辰法相同 C1tgIndex=dzorder(chuan1)-1 C2tgindex=dzorder(chuan2)-1 C3tgindex=dzorder(chuan3)-1 'response.Write(c1tgindex&c2tgindex) riganorder=tgorder(dgz)-1 if riganorder>4 then ryindex=(riganorder-4)*2-2 else ryindex=(riganorder+1)*2-2 end if if scpf then '时旬遁干【排法 c1tgindexl=(c1tgindex+ryindex)mod 10 c2tgindexl=(c2tgindex+ryindex)mod 10 c3tgindexl=(c3tgindex+ryindex)mod 10 tg1=tg(c1tgindexl) tg2=tg(c2tgindexl) tg3=tg(c3tgindexl) else '日旬遁干 'response.write dxs rtgindex=tgorder(dxs)-1 rdzindex=dzorder(dxs)-1 c1tgindex=(c1tgindex-rdzindex+12)mod 12 c2tgindex=(c2tgindex-rdzindex+12)mod 12 c3tgindex=(c3tgindex-rdzindex+12)mod 12 if c1tgindex<10 then tg1=tg(c1tgindex) else tg1="  " end if if c2tgindex<10 then tg2=tg(c2tgindex) else tg2="  " end if if c3tgindex<10 then tg3=tg(c3tgindex) else tg3="  " end if end if %> <%'六亲 rtgorder=tgorder(dgz) rtg=round((rtgorder)/2+0.01) 'response.write round(rtg) 'response.write rtg&rtgorder 'response.write rtg 'response.write rtgorder select case chuan1 case "寅","卯" b1=1 case "巳","午" b1=2 case "辰","戌","丑","未" b1=3 case "申","酉" b1=4 case "亥","子" b1=5 end select select case chuan2 case "寅","卯" b2=1 case "巳","午" b2=2 case "辰","戌","丑","未" b2=3 case "申","酉" b2=4 case "亥","子" b2=5 end select select case chuan3 case "寅","卯" b3=1 case "巳","午" b3=2 case "辰","戌","丑","未" b3=3 case "申","酉" b3=4 case "亥","子" b3=5 end select 'response.write rtg LqIndex1=(rtg-b1+5)mod 5 LqIndex2=(rtg-b2+5)mod 5 LqIndex3=(rtg-b3+5)mod 5 LQ1=LIUQIN(LqIndex1) LQ2=LIUQIN(LqIndex2) LQ3=LIUQIN(LqIndex3) %>
<%if phn=1 then%> <%end if%>

  
  六壬是用阴阳五行占卜吉凶的一种术数。六壬与遁甲、太乙合称三式。五行以水为首,十天干中,壬、癸分别为阳水、阴水。舍阴取阳,六十甲子中壬有六个(壬申、壬午、壬辰、壬寅、壬子、壬戌),称为六壬。六壬有六十四课,以刻有干支的天盘、地盘相叠,转动天盘后得出所值的干支及时辰,判明吉凶。
  《四库未收书提要》载录了宋代祝泌的《六壬大古》,并介绍云:“是编《宋志》不著录,郑樵《通志略》所列六壬,多至八十二家。焦宏《经籍志》凡八十九家,钱遵王《述古堂书目》凡一十八家,皆无是册,盖佚已久矣。此从宋刻本依样影抄,卷首有泌边书序及六壬起例。案泌云六壬立名,古今不宣其旨,惟《周礼·哲蔟氏》掌覆夭鸟之巢以方书十日、十二辰、十二月、十二岁、二十八星之号,即壬盘之体,三代之壬书,惟此一证,与术家以五行始于水,水生于一,成于六之说异。”
  六壬是我国古典数术之一,与奇门、太乙并称为三式,因土为万物之母,水为万物之源,五行以水为一,且六十花甲子中六个壬故称为六壬。
   其法以月将加时辰,立四课,排三传,观阴阳,辩生克,以决吉凶成败。

        
六壬排课结果

 姓名:<%=request("name")%> 年份:<%=request("birthyear")%> 性别: <% if request("sex")=1 then response.Write("男") else response.Write("女") end if %> 占事:<%=zhanshi%>
 公历:<%=NYANGLI%> 农历:<%=ntime%>
 节气:<%=nextjq%>
 干支:<%=ygz%>  <%=mgz%>  <%=dgz%>  <%=tgz%> 月将:<%=yuej%>将
 旬空: <% response.write yxk %>  <%=mxk%>  <%=dxk%>  <%=hxk%>
 年命:<%=ygzs%>
 行年:<%=hangn%>
  <%=guishens(6)%>  <%=guishens(7)%>  <%=guishens(8)%>  <%=guishens(9)%>   
  <%=tianpan(6)%>  <%=tianpan(7)%>  <%=tianpan(8)%>  <%=tianpan(9)%>   
<%=guishens(5)%>  <%=tianpan(5)%>      <%=tianpan(10)%> <%=guishens(10)%>
<%=guishens(4)%> <%=tianpan(4)%>      <%=tianpan(11)%>  <%=guishens(11)%>
  <%=tianpan(3)%>  <%=tianpan(2)%>  <%=tianpan(1)%>  <%=tianpan(0)%>   
  <%=guishens(3)%>  <%=guishens(2)%>  <%=guishens(1)%>  <%=guishens(0)%>   

<%=gs4%> <%=gs3%> <%=gs2%> <%=gs1%>
<%=jk4%> <%=jk3%> <%=jk2%> <%=jk1%>
<%=jk3%> <%=right(dgz,1)%> <%=jk1%> <%=left(dgz,1)%>
<%=lq1%>  <%=tg1%>  <%=chuan1%>  <%=scgs1%>
<%=lq2%>  <%=tg2%>  <%=chuan2%>  <%=scgs2%>
<%=lq3%>  <%=tg3%>  <%=chuan3%>  <%=scgs3%>

<%else%>
 

    六壬在线排盘系统

 

 姓名: 出生时间: 性别: 占事:
 公历时间: 分   排行年
       
 贵人运行: 自动 时旬遁干 日旬遁干
 


 
<%end if%>