八字综合测算网整站源码程序/黄历/灵签/排盘/算命/生肖星座/日历网/周公解梦
/***
*月黄道吉日 月日历
作者:奥顺互联 微信:kkmp326
https://s24.gvyun.com/huangli/huangli/yuehuangdao/nian/2024/yue/6
*/
public function yuehuangdao() {
$site = get_config();
$nian = $_GET['nian'];
$yue = $_GET['yue'];
$ri = 1;
$title = $nian.'年'.$yue.'月黄道吉日查询('.$nian.'年'.$yue.'月黄道吉日一览表)';
$keywords = $nian.'年'.$yue.'月黄道吉日查询,'.$nian.'年'.$yue.'月黄道吉日一览表';
$description = $nian.'年'.$yue.'月黄道吉日查询,'.$nian.'年'.$yue.'月黄道吉日一览表';
$solarxx = Solar::fromYmd($nian, $yue, $ri);
$lunarxx = $solarxx->getLunar();
$nonglinian = $lunarxx->getYearInChinese();
$nongliyue = $lunarxx->getMonthInChinese();
$nextyueobj = $solarxx->nextMonth(1);
$preyueobj = $solarxx->nextMonth(-1);
$nextnian = $nextyueobj->getYear();
$nextyue = $nextyueobj->getMonth();
$prenian = $preyueobj->getYear();
$preyue = $preyueobj->getMonth();
$solarm = SolarMonth::fromYm($nian, $yue);
$solararr = $solarm->getDays();
$tianshu = count($solararr);
foreach($solararr as $k=>$v){
$lunar1[$k] = $v->getLunar();
$huangheiarr[$k] = $lunar1[$k]->getDayTianShenType();
if($huangheiarr[$k] == '黄道'){
$daylistarr[] = $v;
}
}
foreach($daylistarr as $k=>$v){
$lunar2[$k] = $v->getLunar();
$gongliy[$k] = $v->getYear();
$gonglim[$k] = $v->getMonth();
$gonglid[$k] = $v->getDay();
$nongli[$k] = $lunar2[$k]->toString();//农历
$zhou[$k] = '星期'.$lunar2[$k]->getWeekInChinese();
$shierzhishen[$k] = $lunar2[$k]->getDayTianShen();
$chong[$k] = $lunar2[$k]->getChongDesc().'煞'.$lunar2[$k]->getSha();
$nianganzhi[$k] = $lunar2[$k]->getYearInGanZhi();
$yueganzhi[$k] = $lunar2[$k]->getMonthInGanZhi();
$riganzhi[$k] = $lunar2[$k]->getDayInGanZhi();
$yijieguo[$k] = $lunar2[$k]->getDayYi();
foreach($yijieguo[$k] as $kk=>$vv){
$yijieguohtml[$k] .= $vv.' ';
}
$jieguohuangdao[$k] = array('gonglinian'=>$gongliy[$k],'gongliyue'=>$gonglim[$k],'gongliri'=>$gonglid[$k],'nianganzhi'=>$nianganzhi[$k],'yueganzhi'=>$yueganzhi[$k],'riganzhi'=>$riganzhi[$k],'yijieguohtml'=>$yijieguohtml[$k],'nongli'=>$nongli[$k],'shierzhishen'=>$shierzhishen[$k],'chong'=>$chong[$k],'week'=>$zhou[$k]);
}
$huangdaotianshu = count($daylistarr);
foreach($solararr as $k=>$v){
$lunar3[$k] = $v->getLunar();
$gongliy3[$k] = $v->getYear();
$gonglim3[$k] = $v->getMonth();
$gonglid3[$k] = $v->getDay();
$nongli3[$k] = $lunar3[$k]->toString();//农历
$zhou3[$k] = '星期'.$lunar3[$k]->getWeekInChinese();
$shengxiao3[$k] = $lunar3[$k]->getYearShengXiaoByLiChun();//生肖
$shierzhishen3[$k] = $lunar3[$k]->getDayTianShen();
$chong3[$k] = $lunar3[$k]->getChongDesc().'煞'.$lunar3[$k]->getSha();
$nianganzhi3[$k] = $lunar3[$k]->getYearInGanZhi();
$yueganzhi3[$k] = $lunar3[$k]->getMonthInGanZhi();
$riganzhi3[$k] = $lunar3[$k]->getDayInGanZhi();
$yijieguo3[$k] = $lunar3[$k]->getDayYi();
$jijieguo3[$k] = $lunar3[$k]->getDayJi();
foreach($yijieguo3[$k] as $kk=>$vv){
$yijieguohtml3[$k] .= '<span>'.$vv.'</span>';
}
foreach($jijieguo3[$k] as $kk=>$vv){
$jijieguohtml3[$k] .= '<span>'.$vv.'</span>';
}
$jieguolist[$k] = array('gonglinian'=>$gongliy3[$k],'gongliyue'=>$gonglim3[$k],'gongliri'=>$gonglid3[$k],'nianganzhi'=>$nianganzhi3[$k],'yueganzhi'=>$yueganzhi3[$k],'riganzhi'=>$riganzhi3[$k],'yijieguohtml'=>$yijieguohtml3[$k],'jijieguohtml'=>$jijieguohtml3[$k],'nongli'=>$nongli3[$k],'shierzhishen'=>$shierzhishen3[$k],'chong'=>$chong3[$k],'week'=>$zhou3[$k],'sx'=>$shengxiao3[$k]);
}
/
$yy = date('Y',time());
$nn = date('n',time());
$jj = date('j',time());
$solar = Solar::fromYmd($yy, $nn, $jj);
$lunar = $solar->getLunar();
$xz = $solar->getXingZuo().'座';
$gongli = $nn.'月'.$jj.'日';
$chnianyueri = $lunar->toString();//农历
$sx = $lunar->getYearShengXiaoByLiChun();//生肖
$yganzhi = $lunar->getYearInGanZhi();
$nganzhi = $lunar->getMonthInGanZhi();
$jganzhi = $lunar->getDayInGanZhi();
//print_r($yganzhi);
$jyi = $lunar->getDayYi();
$jji = $lunar->getDayJi();
foreach($jyi as $k=>$v){
$jyihtml .= $v.'.';
}
//print_r($jyihtml);
foreach($jji as $k=>$v){
$jjihtml .= $v.'.';
}
/
$mtargetDomain = "ms24.gvyun.com"; // 手机端域名
if($_SERVER['HTTP_HOST']==$mtargetDomain){
include template('mobile','yuehuangdao');
}else{
include template('huangli','yuehuangdao');
}
}