当前位置: 首页 > news >正文

仿先卜php阴盘奇门排盘的算法简述以及php的代码实现开源支持二开

介绍

阴盘奇门,是奇门遁甲的一种,奇门遁甲分阴盘阳盘,阴盘最最近比较流行的一种方式 ,区别于传统排盘,判断较准,排盘更清晰简洁。

有如下几大步骤:

1.排四柱

2.定局数

3.定阴阳

4.排地盘三奇六仪

5.定值符值使

6.布天盘三奇六仪

7.排天盘九星

8.排神盘八神

9.排人盘八门

10.排隐干

11.找马星

12.定空亡

13.移星换半

 global $empire, $dbtbpre, $class_r, $public_r, $post, $addon_name, $addon_set, $xppset, $ga;$datestr = $sa['datestr'];$xydata = json_decode(file_get_contents(lsk::afPath('data/ypqm/xydata.php')), true);//星运数据$time = strtotime($datestr);$year = date('Y', $time);$month = date('m', $time);$day = date('d', $time);$hour = date('H', $time);$minutes = date('i', $time);$seconds = date('s', $time);$solar = Solar::fromYmdHms($year, $month, $day, $hour, $minutes, $seconds);$lunar = Lunar::fromSolar($solar);$bashen = '符,蛇,阴,六,白,玄,地,天';$bashenList = explode(',', $bashen);//默认的,按顺序排就行了。$jiuxing = '蓬,任,冲,辅,英,芮,柱,心';$jiuxingList = explode(',', $jiuxing);//默认的,按顺序排就行了。$bamen = '休,生,伤,杜,景,死,惊,开';$bamenList = explode(',', $bamen);//默认的,按顺序排就行了。$sqly = '戊,己,庚,辛,壬,癸,丁,丙,乙';$sqlyList = explode(',', $sqly);//默认的,按顺序排就行了。$xslist = array('甲子' => '戊', '甲戌' => '己', '甲申' => '庚', '甲午' => '辛', '甲辰' => '壬', '甲寅' => '癸',);$mrlist = array(1 => array('short' => '坎', 'title' => '坎一宫', 'zhistr' => '子', 'st_kw' => 0),2 => array('short' => '坤', 'title' => '坤二宫', 'zhistr' => '未申', 'st_kw' => 0),3 => array('short' => '震', 'title' => '震三宫', 'zhistr' => '卯', 'st_kw' => 0),4 => array('short' => '巽', 'title' => '巽四宫', 'zhistr' => '辰巳', 'st_kw' => 0),5 => array('short' => '中', 'title' => '中五宫', 'zhistr' => '', 'st_kw' => 0),6 => array('short' => '乾', 'title' => '乾六宫', 'zhistr' => '戌亥', 'st_kw' => 0),7 => array('short' => '兑', 'title' => '兑七宫', 'zhistr' => '酉', 'st_kw' => 0),8 => array('short' => '艮', 'title' => '艮八宫', 'zhistr' => '丑寅', 'st_kw' => 0),9 => array('short' => '离', 'title' => '离九宫', 'zhistr' => '午', 'st_kw' => 0),);$golist = $mrlist;foreach ($golist as $kk => $vv) {$vv['maxing'] = 0;$vv['shenpan'] = array('bashen' => '');$vv['tianpan'] = array('jiuxing' => '', 'sqly' => '');$vv['dipan'] = array('sqly' => '');$vv['renpan'] = array('bamen' => '');$vv['kw'] = 0;//是否空亡宫$vv['yingan'] = '';$golist[$kk] = $vv;}//1.排四柱$yearInfo = array('gan' => $lunar->getYearGan(),'zhi' => $lunar->getYearZhi(),'xun' => $lunar->getYearXun(),'zhiIndex' => $lunar->getYearZhiIndex(),'ganIndex' => $lunar->getYearGanIndex());$yearInfo['xunshou'] = $yearInfo['xun'] . $xslist[$yearInfo['xun']];$yearInfo['ly'] = $xslist[$yearInfo['xun']];$monthInfo = array('gan' => $lunar->getMonthGan(),'zhi' => $lunar->getMonthZhi(),'xun' => $lunar->getMonthXun(),'zhiIndex' => $lunar->getMonthZhiIndex(),'ganIndex' => $lunar->getMonthGanIndex());$monthInfo['xunshou'] = $monthInfo['xun'] . $xslist[$monthInfo['xun']];$monthInfo['ly'] = $xslist[$monthInfo['xun']];$dayInfo = array('gan' => $lunar->getDayGan(),'zhi' => $lunar->getDayZhi(),'xun' => $lunar->getDayXun(),'zhiIndex' => $lunar->getDayZhiIndex(),'ganIndex' => $lunar->getDayGanIndex());$dayInfo['xunshou'] = $dayInfo['xun'] . $xslist[$dayInfo['xun']];$dayInfo['ly'] = $xslist[$dayInfo['xun']];$hourInfo = array('gan' => $lunar->getTimeGan(),'zhi' => $lunar->getTimeZhi(),'kw' => $lunar->getTimeXunKong(),'xun' => $lunar->getTimeXun(),'zhiIndex' => $lunar->getTimeZhiIndex(),'ganIndex' => $lunar->getTimeGanIndex());$hourInfo['xunshou'] = $hourInfo['xun'] . $xslist[$hourInfo['xun']];$hourInfo['ly'] = $xslist[$hourInfo['xun']];$nlinfo = array('year' => $lunar->getYear(),'month' => $lunar->getMonth(),'day' => $lunar->getDay(),'yearCn' => $lunar->getYearInChinese(),'monthCn' => $lunar->getMonthInChinese(),'dayCn' => $lunar->getDayInChinese(),'datestrCn' => $lunar->toString());$nlinfo['datestr'] = $nlinfo['year'] . '-' . str_pad($nlinfo['month'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($nlinfo['day'], 2, '0', STR_PAD_LEFT) . ' ' . $hour . ':' . $minutes . ':' . $seconds;

更多代码私我


http://www.mrgr.cn/news/28063.html

相关文章:

  • Nuxt.js 应用中的 schema:written 事件钩子详解
  • 1、C语言学习专栏介绍
  • React Query在现代前端开发中的应用
  • Python学习26天
  • 11-通信图建模测试
  • 单元测试、集成测试、系统测试有什么区别
  • Python进阶————迭代器与生成器
  • 《浔川社团官方联合会入驻 CSDN 公告》
  • java定时任务
  • 共享内存的理解
  • GDB调试
  • 【JAVA】
  • Linux驱动编程 - platform平台设备驱动总线
  • Linux:vim编辑技巧
  • 优思学院|质量工程师在APQP中具体做哪些工作?
  • Linux基础开发环境(git的使用)
  • PCIe进阶之TL:Completion Rules TLP Prefix Rules
  • 【计算机毕设-大数据方向】基于Hadoop的在线教育平台数据分析可视化系统的设计与实现
  • 微服务实战系列之玩转Docker(十五)
  • 代码随想录训练营第34天|dp前置转移
  • Unity多国语言支持
  • 改进RRT*的路径规划算法
  • 让水凝胶不再怕溶胀:一步浸泡,拥有抗溶胀 “盔甲”
  • 【第12章】SpringBoot之SpringBootActuator服务监控(上)
  • 克隆虚拟机,xshell无法传文件,windows无法ping克隆虚拟机,已解决
  • Pandas缺失值处理