代码拉取完成,页面将自动刷新
同步操作将从 @HuangBingGui/dtBig 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "cp";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("连接失败: " . $conn->connect_error);
}
if(!isset($_GET["b_qi"])){
$_GET["b_qi"]=0;
}
if(!isset($_GET["f"])){
$_GET["f"]="";
}
$sql =
"select hao ,w ,min(qi) ,max(qi) ,count(*) "
." from"
." (select * from cp order by qi desc limit ".$_GET["b_qi"].",".$_GET["qi"].") as t"
." group by w "
." having count(*)>=".$_GET["count"]
." order by max(qi) desc";
$result = $conn->query($sql);
if(isset($_GET["b_qi"])){
$top1=$_GET["b_qi"]-1;
}else{
$top1=0;
}
$sql_top1="select hao ,w ,min(qi) ,max(qi) ,count(*) "
." from"
." (select * from cp order by qi desc limit ".$top1.",".$_GET["qi"].") as t"
." group by w "
." order by max(qi) desc";
//." #having count(*)>=".$_GET["count"]
if($top1>=0){
$result_top1 = $conn->query($sql_top1);
}
$sql_top100="select * from cp order by qi desc limit ".($top1+1).",".$_GET["qi"];
$result_top100 = $conn->query($sql_top100);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>大数据人工智能策略预测</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
padding:2px;
}
.jumbotron {
padding: 4px 10px 4px 10px;
}
</style>
</head>
<body>
<h3 style="text-align: center;display:<?php echo $_GET['f']; ?>">大数据人工智能策略预测</h3>
<nav class="navbar navbar-default" role="navigation">
<div class="navbar-header">
<form class="navbar-form navbar-left" role="search">
<div class="input-group">
<span class="input-group-addon">周期</span>
<input type="text" name="qi" class="form-control" placeholder="推荐100近周期数;" value="<?php echo $_GET['qi']; ?>">
</div>
<div class="input-group">
<span class="input-group-addon">上几期</span>
<input type="text" name="b_qi" class="form-control" placeholder="推荐0开始期;" value="<?php echo $_GET['b_qi']; ?>">
</div>
<div class="input-group" style="display:<?php echo $_GET['f']; ?>">
<span class="input-group-addon">剔除次数</span>
<input type="text" name="count" class="form-control" placeholder="推荐2剔除次数;" value="<?php echo $_GET['count']; ?>">
</div>
<button type="submit" class="btn btn-default">预测</button>
<input type="text" name="f" style="display:none" class="form-control" value="<?php echo $_GET['f']; ?>">
</form>
</div>
</nav>
<?php
$dr="";
$gr="";
for($i=0;$i<100;$i++){
if($i<=9){
$gr=$gr."0".$i."xx、";
}else{
$gr=$gr.$i."xx、";
}
if($i%10==0 && $i!=0){
$gr=$gr."<br>";
}
}
if ($result->num_rows > 0) {
$i=0;
while($row = $result->fetch_assoc()) {
$i=$i+1;
$dr=$dr.$row["w"]."xx"."、";
if($i%10==0){
$dr=$dr."<br>";
}
$gr=str_replace($row["w"]."xx、","",$gr);
}
} else {
echo "0 结果";
}
$gr=str_replace("<br>","",$gr);
$dr=str_replace("<br>","",$dr);
?>
<div class="jumbotron">
<h4>报告(高)(推荐):<?php echo (100-$result->num_rows)/100; ?></h4>
<h4>剔除次数<?php echo $_GET['count']; ?></h4>
<?php echo $gr; ?>
</div>
<div class="jumbotron">
<h4>报告(专业):</h4>
<h4>剔除次数<?php echo $_GET['count']; ?></h4>
<?php
if($top1>=0){
if ($result_top1->num_rows > 0){
$row_top1 = $result_top1->fetch_assoc();
$row_now_w=$row_top1["w"]."xx、";
if($_GET["count"]>=$row_top1["count(*)"]){
$win="肉!";
$win_color="red";
}else{
$win="素!";
$win_color="green";
}
echo "<h4 class=''>"
//color:".$win_color.";font-size: 20px;
."<span style='color:".$win_color."'>".$win."-</span>"
."<span>" . $row_top1["hao"]."-</span>"
. "<span>" . $row_top1["w"]."xxx"."-</span>"
. "<span>" .$row_top1["min(qi)"] ."-</span>"
."<span>" .$row_top1["max(qi)"]."-</span>"
."<span style='display:". $_GET['f']."'>" .$row_top1["count(*)"]."</span>"
."</h4><br>";
}else{
echo "<tr class=''><td>没有开奖!</td></tr><br>";
$row_top1["w"]="00";
$win="没有!";
}
}
else{
echo "<tr class=''><td>没有开奖!</td></tr><br>";
$row_top1["w"]="00";
$win="没有!";
}
$i=0;
echo "<tr class=''><td colspan='6'>(推荐)近20期:";
$gr20=$gr;
$gr_top1=$gr;
$row_top1_data="";
while($row_top100 = $result_top100->fetch_assoc()) {
$i=$i+1;
if($row_top1 && $i==1){
$row_top1_data=$row_top100["w"];
}
echo $row_top100["w"]."xx-"."、";
$gr20=str_replace($row_top100["w"]."xx、","",$gr20);
$gr20=str_replace("<br>","",$gr20);
if($i==20){
break;
}
}
echo "<br>剔除结果:<div>".$gr20."</div>";
if($win=="肉!"){
if(stripos($gr20, $row_now_w)>-1){
echo "剔除"."<span style='color:red'>"."肉!</span><br>";
}else{
echo "剔除"."<span style='color:green'>"."素!</span><br>";
}
}
echo "</td></tr>";
echo "<br><tr class=''><td colspan='6'>(可选)上期前1-2位:";
echo substr($row_top1_data,0,1)."-".substr($row_top1_data,1,1);
$gr_top1=str_replace("、".substr($row_top1_data,0,1),"、剔除",$gr_top1);
$gr_top1=str_replace(substr($row_top1_data,1,1)."xx、","剔除xx、",$gr_top1);
echo "<br>剔除结果:<div>".$gr_top1."</div>";
if($win=="肉!"){
if(stripos($gr_top1, $row_now_w)>-1){
echo "剔除"."<span style='color:red'>"."肉!</span><br>";
}else{
echo "剔除"."<span style='color:green'>"."素!</span><br>";
}
}
echo "</td></tr>";
echo "<br><tr class=''><td colspan='6'>(可选)上期前1-2位,再剔除前20期:";
echo substr($row_top1_data,0,1)."-".substr($row_top1_data,1,1);
$gr20=str_replace("、".substr($row_top1_data,0,1),"、剔除",$gr20);
$gr20=str_replace(substr($row_top1_data,1,1)."xx、","剔除xx、",$gr20);
echo "<br>剔除结果:<div>".$gr20."</div>";
if($win=="肉!"){
if(stripos($gr20, $row_now_w)>-1){
echo "剔除"."<span style='color:red'>"."肉!</span><br>";
}else{
echo "剔除"."<span style='color:green'>"."素!</span><br>";
}
}
echo "</td></tr>";
?>
</div>
<div class="jumbotron">
<h4>报告(低):<?php echo $result->num_rows/100; ?><br><?php echo $dr; ?></h4>
</div>
<div class="jumbotron">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>行号</th>
<th>5位数</th>
<th>前2位</th>
<th>最早期</th>
<th>最近期</th>
<th style="display:<?php echo $_GET['f']; ?>">次数</th>
</tr>
</thead>
<tbody>
<?php
$result = $conn->query($sql);
if(!isset($_GET["id"])){
$_GET['f']="";
}
if ($result->num_rows > 0) {
$i=0;
while($row = $result->fetch_assoc()) {
$i=$i+1;
echo "<tr class=''>"
."<td>" . $i."</td>"
."<td>" . $row["hao"]."</td>"
. "<td>" . $row["w"]."xxx"."</td>"
. "<td>" .$row["min(qi)"] ."</td>"
."<td>" .$row["max(qi)"]."</td>"
."<td style='display:". $_GET['f']."'>" .$row["count(*)"]."</td>"
."</tr>";
}
} else {
echo "0 结果";
}
$conn->close();
?>
</tbody>
</table>
</div>
<div class="jumbotron">
<div>1、Ctrl+C复制到excel;</div>
<div>2、截屏保存!</div>
</div>
</body>
</html>;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。