<!--#include file="conn.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/getuc.asp"-->
<%dim str1,str2,str3,bihua1,bihua2,bihua3,bihua
str1=mid(request("str1"),1,1)
str2=mid(request("str2"),1,1)
str3=mid(request("str3"),1,1)
%>
<html>
<head>
<title>测字算命,电脑测字,诸葛神数</title>
<META name=keywords content="测字算命,电脑测字,诸葛神数">
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style type="text/css">
<!--
BODY{
scrollbar-face-color: #d4d0c8;
scrollbar-highlight-color:#D4D0C8 ;
scrollbar-shadow-color:#d6d6d6 ;
scrollbar-3dlight-color:#e6e6e6 ;
scrollbar-arrow-color:#006699  ;
scrollbar-track-color:#dfdfdf ;
scrollbar-darkshadow-color: #808080; 
}
A:link {font-family:"Verdana",  "宋体"; COLOR: #000000;  font-size: 12px;  TEXT-DECORATION: none }
A:visited {font-family: "Verdana", "宋体";	COLOR: #000000; FONT-SIZE:12px; TEXT-DECORATION: none }
A:active {font-family: "Verdana", "宋体"; COLOR: #000099; FONT-SIZE: 12px; TEXT-DECORATION: none }
A:hover {font-family: "Verdana", "宋体"; COLOR: #dd0000>; FONT-SIZE: 12px; TEXT-DECORATION: underline }
.smallTxt{FONT-SIZE: 11px; FONT-FAMILY: "Tahoma","Arial","sans-serif"}
.style3 {FONT-SIZE: 14px; FONT-FAMILY: "Tahoma","Arial","sans-serif"; }
.style4 {color: #CCCCCC}
-->
</style>
<SCRIPT language=JavaScript>
<!--
function submitchecken() {
	if (document.zhuge.str1.value == "") {
		alert("第一个输入框请输入一个汉字。");
		document.zhuge.str1.focus();
		return false;
		}
	if (document.zhuge.str2.value == "") {
		alert("第二个输入框请输入一个汉字。");
		document.zhuge.str2.focus();
		return false;
		}
	if (document.zhuge.str3.value == "") {
		alert("第三个输入框请输入一个汉字。");
		document.zhuge.str3.focus();
		return false;
		}
	if (document.zhuge.str1.value.length > 1) {
		alert("第一个输入框只能输入一个字");
		document.zhuge.str1.focus();
		return false;
		}
	if (document.zhuge.str2.value.length > 1) {
		alert("第二个输入框只能输入一个字");
		document.zhuge.str2.focus();
		return false;
		}
	if (document.zhuge.str3.value.length > 1) {
		alert("第三个输入框只能输入一个字");
		document.zhuge.str3.focus();
		return false;
		}
	re="请重新输入！";
	return true;
	}
//-->
</SCRIPT>
</head>
<body>
<table width="100%" height="95%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#C0DBEF">
<tr bgcolor="#EFF8FE">
<td height="50" align="center"><span class="style3"><a href="cezi.asp"><font color="cc6600"><span class="style3">诸葛神数</span></font></a>(<a href="cezi.asp"><span class="style3"><font color="#0066CC">诸葛灵签</font></span></a>)<a href="cezi.asp"><span class="style3">测字算命</span></a>系统</span></td>
</tr>
<tr bgcolor="#EFF8FE">
<td bgcolor="#EFF8FE"><br><p><span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;诸葛神数相传是三国时代刘备的军师诸葛亮所作。</span></p>
  <p><span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;根据历史记载，诸葛亮上懂天文，下晓地理，料事如神，用兵用人，皆恰到好处。
  
</span></p>
  <p><span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;诸葛亮每遇难题，必暗自用一种独到的占卜法。心要诚，手要净，焚香向天祷告，然后，在纸上写三个字。这三个字，即是天灵与人心灵交流，也就是说，你的心事已得上天了解，而上天会对你作出指示。所以万万不可存「玩一玩」的心态。</span></p>
  <p><span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;诸葛神数，共三百八十四爻，谶语句法，长短不一，寓意深远，对占卜者的思路，有很大的启发作用，特别是那些正陷于彷徨迷惘中的人，更有一种拨开云雾，重见天日的豁然开朗感觉。因此这是可以作为判断吉凶，决定进退，是选择趋吉避凶的指南针。</span></p>
  <p><span class="style3">&nbsp;&nbsp;&nbsp;&nbsp;特别说明：无论输入简体中文还是繁体中文，笔画数均按繁体笔画数计算。</span></p>
  </td>
</tr>
<form name="zhuge" method="post" action="" onSubmit="return submitchecken();">
<tr bgcolor="#EFF8FE">
<td height="30" align="center" valign="middle" bgcolor="#EFF8FE">
  <span class="style3">  您想测哪三个简体中文汉字?
  <input name="str1" type="text" id="str1" onKeypress="if ((event.keyCode != 13 && event.keyCode < 160)) event.returnValue = false;">
  <span class="style4">和</span>
  <input name="str2" type="text" id="str2" onKeypress="if ((event.keyCode != 13 && event.keyCode < 160)) event.returnValue = false;">
  <span class="style4">和</span>  
  <input name="str3" type="text" id="str3" onKeypress="if ((event.keyCode != 13 && event.keyCode < 160)) event.returnValue = false;">
  <input type="submit" name="Submit" value="提交">
  </span>
</td>
</tr>
</form>
<%
if str1<>"" and str2<>"" and str3<>"" then
bihua1=(getnum(str1) mod 10)
if bihua1=0 then
bihua1=1
end if
bihua2=(getnum(str2) mod 10)
if bihua2=0 then
bihua2=1
end if
bihua3=(getnum(str3) mod 10)
if bihua3=0 then
bihua3=1
end if
bihua1=cstr(bihua1)
bihua2=cstr(bihua2)
bihua3=cstr(bihua3)
bihua=bihua1&bihua2&bihua3
bihua=int(bihua)
do while bihua>=384
bihua=bihua-384
loop
if bihua<=9 then
bihua=cstr(bihua)
bihua="0"&"0"&bihua
else
if bihua<=99 then
bihua=cstr(bihua)
bihua="0"&bihua
end if
end if
bihua=cstr(bihua)
%>
<%
'计算诸葛神数
on error resume next
dim sqlzhuge,zhugetitle,zhugecontent
sqlzhuge="select * from zhuge where id='"&bihua&"'"
set rszhuge=conn.execute(sqlzhuge)
if not (rszhuge.bof and rszhuge.eof) then
zhugetitle=rszhuge("title")
zhugecontent=rszhuge("content")
end if
%>
<tr bgcolor="#EFF8FE">
<td align="center" valign="middle" bgcolor="#EFF8FE">
<span class="style3">
<%="<br>您输入的三个汉字为：<font color=blue>"&str1&"&nbsp;"&str2&"&nbsp;"&str3&"</font><br><br>"%>
<%="<font color=cc6600>卦语：</font><br><br>"&zhugetitle&"<br><br>"%>
<%="<font color=cc6600>释义：</font><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&zhugecontent&"<br><br>"%>
</span>
</td>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<%else%>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<%end if%>
<%
'输出
If Err Then
response.Write "诸葛神数查询内容出错!"
err.Clear
Response.End
End If
%>