<meta name='keywords' content='八字排盘,四柱排盘,八字排盘系统,在线八字排盘,排八字,在线排八字,八字,命理,国学,算卦,排盘,易经,六十四卦,奇门,命运,运势,测算,姻缘,婚姻'/><meta charset='UTF-8'>
<meta name='Description' content='可提供八字排盘免费详批，八字排盘算命是一种根据八字用天干地支表示人出生的年、月、日、时，依照查四柱间之五行生克制化、刑冲会合为推命重点，生辰八字排盘免费查询，小到性格、大到发展都能够从这上面看出端倪一二，八字在线排盘，让你提前知晓一生命格。'/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>五格反推系统</title>
<a href='/' style='text-decoration:none;' target='_blank'><h2 style='text-align:center;color:#CC0000;'>五格反推系统</h2></a>
<style>.overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;}.loader{width:50px;height:50px;border:5px solid lightgray;border-top-color:dodgerblue;border-radius:50%;animation:spin 1s infinite linear;}@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}</style>
<div class="overlay" id="overlay" style="display:none;">
<div class="loader"></div>
</div>
<link type='text/css' href='date/smcsss.css' rel='stylesheet'/>
<table class='form-table' border='0' align='center' cellpadding='1' cellspacing='1'>
<tr>
<td class='tdleft tdbg'><div>
指定姓名：<input required='true' name='name' oninput='getValue(event);' autocomplete='off' type='text' id='name' size='6' maxlength="2" placeholder="请输入姓氏" ><input required='true' name='namee' oninput='getValue(event);' autocomplete='off' type='text' id='namee' size='6' maxlength="2" placeholder="请输入名字" >
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
指定天格：<select name="tg" id="tg" ><option value='0'>不指定</option><option value='金'>金</option><option value='木'>木</option><option value='水'>水</option><option value='火'>火</option><option value='土'>土</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
指定人格：<select name="dg" id="dg" ><option value='0'>不指定</option><option value='金'>金</option><option value='木'>木</option><option value='水'>水</option><option value='火'>火</option><option value='土'>土</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
指定地格：<select name="rg" id="rg" ><option value='0'>不指定</option><option value='金'>金</option><option value='木'>木</option><option value='水'>水</option><option value='火'>火</option><option value='土'>土</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
指定总格：<select name="zg" id="zg" ><option value='0'>不指定</option><option value='金'>金</option><option value='木'>木</option><option value='水'>水</option><option value='火'>火</option><option value='土'>土</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
指定外格：<select name="wg" id="wg" ><option value='0'>不指定</option><option value='金'>金</option><option value='木'>木</option><option value='水'>水</option><option value='火'>火</option><option value='土'>土</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
指定吉凶：<select name="jx" id="jx" ><option value='0'>不指定</option><option value='吉'>吉</option><option value='平'>平</option><option value='凶'>凶</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
起名喜好：<select name="xs" id="xs" ><option value='0'>单姓</option><option value='1'>双姓</option></select><select name="ms" id="ms" onchange="getValue()" ><option value='0'>双名</option><option value='1'>单名</option></select><select name="sex" id="sex" ><option value='3'>男</option><option value='2'>女</option></select>
</div></td>
</tr>
<tr>
<td class='tdleft tdbg'><div>
最大取得条数:<select name="maxts" id="maxts" ><option value='1'>10</option><option value='2'>20</option><option value='3'>30</option><option value='4'>40</option><option value='5'>50</option></select>
</div></td>
</tr>
</table>
<table class='form-table' border='0' align='center' cellpadding='1' cellspacing='1'>
<div align='center'>
<input type='button' value='开始推演' class='sub_m' onclick="pd()"/>
</div>
</table>
<div id='jd'></div><br><div id='td'></div>
<script>
function g(){
name=document.getElementById('name').value;
tg=document.getElementById('tg').value;
dg=document.getElementById('dg').value;
rg=document.getElementById('rg').value;
zg=document.getElementById('zg').value;
wg=document.getElementById('wg').value;
ms=document.getElementById('ms').value;
namee=document.getElementById('namee').value;
jx=document.getElementById('jx').value;
sex=document.getElementById('sex').value;
xs=document.getElementById('xs').value;
maxts=document.getElementById('maxts').value;
nameg=document.getElementById('name');
tgg=document.getElementById('tg');
dgg=document.getElementById('dg');
rgg=document.getElementById('rg');
zgg=document.getElementById('zg');
wgg=document.getElementById('wg');
msg=document.getElementById('ms');
nameeg=document.getElementById('namee');
jxg=document.getElementById('jx');
sexg=document.getElementById('sex');
xsg=document.getElementById('xs');
overlay=document.getElementById("overlay");
}
function getValue(){
g();
if(ms!='1'&&namee!=''){
const value=event.target.value;
event.target.value=value.replace(/[^\u4e00-\u9fa5]/g,'').slice(0,2);
}
//判断

if(name==''){
tgg.disabled=false;
}else{
tgg.disabled=true;
tgg.selectedIndex=0;
}//判断姓是否为空
function CNa(i){var match=i.match(/[\u4e00-\u9fa5]/g);
return match?match.length:0;}//获取输入框长度
var CNx=CNa(name);
if(CNx==1){
xsg.disabled=true;
xsg.selectedIndex=0;
}else if(CNx==2){
xsg.disabled=true;
xsg.selectedIndex=1;
}else{
xsg.disabled=false;}
//判断自定义单姓双姓
var CNm=CNa(namee);
if(CNm==1){
msg.disabled=true;
//sexg.disabled=true;
rgg.disabled=true;
dgg.disabled=true;
msg.selectedIndex=1;
rgg.selectedIndex=0;
dgg.selectedIndex=0;
}else if(CNm==2){
msg.disabled=true;
//sexg.disabled=true;
rgg.disabled=true;
dgg.disabled=true;
msg.selectedIndex=0;
rgg.selectedIndex=0;
dgg.selectedIndex=0;
}else{
msg.disabled=false;
//sexg.disabled=false;
rgg.disabled=false;
dgg.disabled=false;
}
//判断自定义单名双名
if(CNx!=0&&CNm!=0){
tgg.disabled=true;
rgg.disabled=true;
dgg.disabled=true;
zgg.disabled=true;
wgg.disabled=true;
jxg.disabled=true;
jxg.selectedIndex=0;
zgg.selectedIndex=0;
wgg.selectedIndex=0;
}else{
jxg.disabled=false;
zgg.disabled=false;
wgg.disabled=false;
}
//判断姓名是否输全
if(ms=='1'){
wgg.selectedIndex=0;
wgg.disabled=true;
}else{
wgg.disabled=false;
}

}
function pd(){
g();
styles='';
if(tg!='0'){styles+="<style>.tg{background-color:orange;}</style>";}
if(dg!='0'){styles+="<style>.dg{background-color:orange;}</style>";}
if(rg!='0'){styles+="<style>.rg{background-color:orange;}</style>";}
if(zg!='0'){styles+="<style>.zg{background-color:orange;}</style>";}
if(wg!='0'){styles+="<style>.wg{background-color:orange;}</style>";}
if(jx!='0'){styles+="<style>.jx{background-color:orange;}</style>";}
document.getElementById("td").innerHTML='';
overlay.style.display="flex";
function createXmlHttp(){
if(window.XMLHttpRequest){
xmlHttp=new XMLHttpRequest()
}else{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
}}
var urls="api.php?SYLX=SCWG&name="+name+"&tg="+tg+"&dg="+dg+"&rg="+rg+"&zg="+zg+"&wg="+wg+"&ms="+ms+'&namee='+namee+'&jx='+jx+'&sex='+sex+'&xs='+xs+'&maxts='+maxts+'&mmmm='+Date.now();
createXmlHttp();
xmlHttp.open("GET",urls,true);
xmlHttp.onreadystatechange=function writeSource(){
if(xmlHttp.readyState==4){
overlay.style.display="none";
var scc=JSON.parse(xmlHttp.responseText);
csss='';
if(scc['errmsg']==0){
csss+="<table style='width:100%'><tr><th style='width:16%'>姓名</th><th style='width:16%'>繁体</th><th style='width:11%'>天格</th><th style='width:11%'>人格</th><th style='width:11%'>地格</th><th style='width:11%'>总格</th><th style='width:11%'>外格</th><th style='width:7%'>三才</th></tr>";
for(var i=0;i<Object.keys(scc).length-3;i++){
var e=scc[i];
csss+="<tr><td>"+e["name"]+"</td><td>"+e[0]+"</td><td class='tg'>"+e[3][0]+e[2][0]+"</td><td class='dg'>"+e[3][1]+e[2][1]+"</td><td class='rg'>"+e[3][2]+e[2][2]+"</td><td class='zg'>"+e[3][3]+e[2][3]+"</td><td class='wg'>"+e[3][4]+e[2][4]+"</td><td class='jx' onclick='td("+e['js']+")'>"+e['jx']+"</td></tr>";
}
csss+="</table>";
}else{
csss+='该轮算力负载已达100%，查无结果，请重试或升级算力。<br>';
}
csss+='运算负载:'+scc['ysfz']+'%';
document.getElementById("jd").innerHTML =styles+csss;
xmlHttp.responseText=null;}};
xmlHttp.send(null);}
function td(json){
var abs='';
for(var key in json){
if(json.hasOwnProperty(key)){
var value=json[key];
abs+=value+'<br>';
}
}
document.getElementById("td").innerHTML=abs+'<br><br><br>';
}
</script>
<br><br>
<?php include 'footer.php'; ?>