论坛风格切换切换到宽版
  • 18阅读
  • 4回复

备份 [复制链接]

上一主题 下一主题
离线北斗星
 

只看楼主 倒序阅读 使用道具 楼主   发表于: 2022-03-11
if (strpos('甲乙寅卯辰',$b)!==false){
            return 9;
                }else if(strpos('丙丁壬癸巳午亥子丑',$b)!==false){
            return 6;
                }else if(strpos('庚辛戊己申酉戌未',$b)!==false){
            return 3;
                }else{
                        return 0;
                }
离线北斗星

只看该作者 沙发   发表于: 2022-03-11
$query=$db->query("SELECT ss,gan,de,yy,shuxing FROM one_hee order by id asc");
        $i=1;
        while($rs=$db->fetch_array($query)){
                echo '<td><p>'.$re['t'.$i.'']."</p><p >".$rs['yy'].$rs['shuxing']."</p>";
                //echo $rs['gan'];
                //echo count_wz($one,$rs['gan'])."|".count_wz($two,$rs['de'])."|".substr_count($three,$rs['ss'])."|";
                //echo substr_count($one,$rs['gan'])."|".$rs['de'].n_get($rs['de'],$two).$two."|".substr_count($three,$rs['ss'])."|";
                //echo $rs['ss']."(含".$rs['gan'].$rs['de']."和纳音".$rs['yy'].$rs['shuxing'].") ";
                //$n=(int)(n_get($rs['gan'],$one)+n_get($rs['de'],$two)+n_get($rs['ss'],$three));
                $n=(int)(count_cs($one,$rs['gan'])+count_cs($two,$rs['de'])+substr_count($three,$rs['ss']));
                //echo $n."个,";
                //echo " 系数为:";
                //$x= $n*($_DCACHE['wanglist'.$s.''][$rs['shuxing']]);
                $x = $count_u = count_cs_num($one,$rs['gan'],$mday) + count_cs_num($two,$rs['de'],$mday) + substr_count($three,$rs['ss'])*3*($_DCACHE['wanglist'.$s.''][$rs['shuxing']]);
                //echo $x;
                //$m=n_get($rs['gan'],$four);
                $m = count_wz($four,$rs['gan']);
                //echo $m;
                //echo "|".$m.$rs['gan'];
                //$y=n_cang1($rs['gan'],$two,$_DCACHE['wanglist'.$s.'']);
                $y=n_cang_s($rs['gan'],$two,$_DCACHE['wanglist'.$s.'']);
              
                //echo "|".$y;
                echo "<p>". ($x + $y).'</p>';
                echo "<p>". count_wz($one,$rs['gan'])."<br>".count_wz($two,$rs['de'])."<br>".count_wz($three,$rs['ss']).'<br>'.$n.'个,系数:'.$x.'</p>';
                echo "<p>". $m.' 系数:'.$y.'</p>';
                echo '</td>';
              
              
        $i++;
        }
离线北斗星

只看该作者 板凳   发表于: 2022-03-11
$haha1 = $haha2 = $haha3 = $haha4 = $haha5 = 0;
echo '<table>';
$arr = array('十神','五行','命局','干纳音','藏干');
$uhee = json_decode2($hee);
for($j=0;$j<count($arr);$j++){
      
        if ($j==0){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        echo '<td>'.$re['t'.($i+1).''].'</td>';
                }
                echo '</tr>';
        }
        if ($j==1){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        echo '<td>'.$uhee[$i]['yy'].$uhee[$i]['shuxing'].'</td>';
                }
                echo '</tr>';
        }
        if ($j==2){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                         $x = count_cs_num($one,$uhee[$i]['gan'],$mday) + count_cs_num($two,$uhee[$i]['de'],$mday) + substr_count($three,$uhee[$i]['ss'])*3*($_DCACHE['wanglist'.$s.''][$uhee[$i]['shuxing']]);
                         $y=n_cang_s($uhee[$i]['gan'],$two,$_DCACHE['wanglist'.$s.'']);
                        //echo '<td>'.$x+$y.'</td>';
                        echo '<td>'.($x + $y).'</td>';
                        if ($i<=1){
                                $haha1=$haha1+$x+$y;
                        }
                        if ($i>=2 && $i<4){
                                $haha2=$haha2+$x+$y;
                        }
                        if ($i>=4 && $i<6){
                                $haha3=$haha3+$x+$y;
                        }
                        if ($i>=6 && $i<8){
                                $haha4=$haha4+$x+$y;
                        }
                        if ($i>=8 && $i<10){
                                $haha5=$haha5+$x+$y;
                        }
                }
                echo '</tr>';
        }
        if ($j==3){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        $n = (int)(count_cs($one,$uhee[$i]['gan'])+count_cs($two,$uhee[$i]['de'])+substr_count($three,$uhee[$i]['ss']));
                        $x = count_cs_num($one,$uhee[$i]['gan'],$mday) + count_cs_num($two,$uhee[$i]['de'],$mday) + substr_count($three,$uhee[$i]['ss'])*3*($_DCACHE['wanglist'.$s.''][$uhee[$i]['shuxing']]);
                        echo '<td>'. count_wz($one,$uhee[$i]['gan'])."<br>".count_wz($two,$uhee[$i]['de'])."<br>".count_wz($three,$uhee[$i]['ss']).'<br>'.$n.'个,系数:'.$x.'</td>';
                }
                echo '</tr>';
        }
        if ($j==4){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        $y=n_cang_s($uhee[$i]['gan'],$two,$_DCACHE['wanglist'.$s.'']);
                        echo '<td>'.count_wz($four,$uhee[$i]['gan']).' 系数:'.$y.'</td>';
                }
                echo '</tr>';
        }
      
      
}
echo '</table>';
离线北斗星

只看该作者 地板   发表于: 2022-03-11
/*$query=$db->query("SELECT ss,gan,de,yy,shuxing FROM one_hee order by id asc");
$i=1;
while($rs=$db->fetch_array($query)){
        echo $re['t'.$i.'']." ";
        //echo $rs['gan'];
        echo count_wz($one,$rs['gan'])."|".count_wz($two,$rs['de'])."|".substr_count($three,$rs['ss'])."|";
        //echo substr_count($one,$rs['gan'])."|".$rs['de'].n_get($rs['de'],$two).$two."|".substr_count($three,$rs['ss'])."|";
        echo $rs['ss']."(含".$rs['gan'].$rs['de']."和纳音".$rs['yy'].$rs['shuxing'].") ";
        //$n=(int)(n_get($rs['gan'],$one)+n_get($rs['de'],$two)+n_get($rs['ss'],$three));
        $n=(int)(count_cs($one,$rs['gan'])+count_cs($two,$rs['de'])+substr_count($three,$rs['ss']));
        echo $n."个,";
        echo " 系数为:";
        //$x= $n*($_DCACHE['wanglist'.$s.''][$rs['shuxing']]);
        $x = $count_u = count_cs_num($one,$rs['gan'],$mday) + count_cs_num($two,$rs['de'],$mday) + substr_count($three,$rs['ss'])*3*($_DCACHE['wanglist'.$s.''][$rs['shuxing']]);
        echo $x;
        echo "。  ";
        //$m=n_get($rs['gan'],$four);
        $m = count_wz($four,$rs['gan']);
        echo $m;
        //echo "|".$m.$rs['gan'];
        //$y=n_cang1($rs['gan'],$two,$_DCACHE['wanglist'.$s.'']);
        $y=n_cang_s($rs['gan'],$two,$_DCACHE['wanglist'.$s.'']);
      
        echo "|".$y;
        echo " 总系数为:". ($x + $y);
        echo "<br>";
        if ($i>=1 && $i<3){
                $haha1=$haha1+$x+$y;
        }
        if ($i>=3 && $i<5){
                $haha2=$haha2+$x+$y;
        }
        if ($i>=5 && $i<7){
                $haha3=$haha3+$x+$y;
        }
        if ($i>=7 && $i<9){
                $haha4=$haha4+$x+$y;
        }
        if ($i>=9 && $i<11){
                $haha5=$haha5+$x+$y;
        }
$i++;
}*/
//echo '<table><tr><td><p>十神</p><p>五行</p><p>命局</p><p><br>干纳音<br><br><br></p><p>藏干</p></td>';
离线北斗星

只看该作者 4楼  发表于: 2022-03-11
$uhee = json_decode2($hee);
for($j=0;$j<count($arr);$j++){
      
        if ($j==0){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        echo '<td>'.$re['t'.($i+1).''].'</td>';
                }
                echo '</tr>';
        }
        if ($j==1){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        echo '<td>'.$uhee[$i]['yy'].$uhee[$i]['shuxing'].'</td>';
                }
                echo '</tr>';
        }
        if ($j==2){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                         $x = count_cs_num($one,$uhee[$i]['gan'],$mday) + count_cs_num($two,$uhee[$i]['de'],$mday) + substr_count($three,$uhee[$i]['ss'])*3*($_DCACHE['wanglist'.$s.''][$uhee[$i]['shuxing']]);
                         $y=n_cang_s($uhee[$i]['gan'],$two,$_DCACHE['wanglist'.$s.'']);
                        //echo '<td>'.$x+$y.'</td>';
                        echo '<td>'.($x + $y).'</td>';
                        if ($i<=1){
                                $haha1=$haha1+$x+$y;
                        }
                        if ($i>=2 && $i<4){
                                $haha2=$haha2+$x+$y;
                        }
                        if ($i>=4 && $i<6){
                                $haha3=$haha3+$x+$y;
                        }
                        if ($i>=6 && $i<8){
                                $haha4=$haha4+$x+$y;
                        }
                        if ($i>=8 && $i<10){
                                $haha5=$haha5+$x+$y;
                        }
                }
                echo '</tr>';
        }
        if ($j==3){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        $n = (int)(count_cs($one,$uhee[$i]['gan'])+count_cs($two,$uhee[$i]['de'])+substr_count($three,$uhee[$i]['ss']));
                        $x = count_cs_num($one,$uhee[$i]['gan'],$mday) + count_cs_num($two,$uhee[$i]['de'],$mday) + substr_count($three,$uhee[$i]['ss'])*3*($_DCACHE['wanglist'.$s.''][$uhee[$i]['shuxing']]);
                        echo '<td>'. count_wz($one,$uhee[$i]['gan'])."<br>".count_wz($two,$uhee[$i]['de'])."<br>".count_wz($three,$uhee[$i]['ss']).'<br>'.$n.'个,系数:'.$x.'</td>';
                }
                echo '</tr>';
        }
        if ($j==4){
                echo '<tr><td>'.$arr[$j].'</td>';
                for($i=0;$i<count($uhee);$i++){
                        $y=n_cang_s($uhee[$i]['gan'],$two,$_DCACHE['wanglist'.$s.'']);
                        echo '<td>'.count_wz($four,$uhee[$i]['gan']).' 系数:'.$y.'</td>';
                }
                echo '</tr>';
        }
      
      
}
快速回复
限100 字节
如果您在写长篇帖子又不马上发表,建议存为草稿
 
上一个 下一个