海南湛江那邊七星彩排列五的程序開發代碼

最近忙公司的事,今天發佈者幾天修復了一些bug,和增長了一些功能,還有作了一個不錯的模板。html

1.交易明細功能
2.修復結算功能
3.支持千萬級別數據開獎
4.修復下單速度
5.新增會員,代理模板
6.升級開獎期號功能,更簡單
................
申明,本代碼相關程序,只做爲學習和研究使用,不得用於任何商業或者其餘使用,因其產生其餘問題,有使用者承擔!
有什麼問題能夠直接Q我便可:3053723033    ajax

第一篇 :https://blog.csdn.net/weixin_...
第二篇 :https://blog.csdn.net/weixin_...
第三篇 :https://blog.csdn.net/weixin_...
第四篇:https://blog.csdn.net/weixin_...
第五篇:https://blog.csdn.net/weixin_...json

第六篇:https://blog.csdn.net/weixin_...post

第七篇:https://blog.csdn.net/weixin_...學習

第八篇:https://blog.csdn.net/weixin_...ui

第九篇:https://blog.csdn.net/weixin_...spa

 

增長了一個交易明細功能.net

這個是視圖部分代理

<admintpl file="header" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">交易明細</a></li>
        </ul>
        <form class="well form-search" method="post">            
            明細類型: 
            <select name="liqtype" class="bankSel cpKind userInput">
                            <option value="0" <if condition="$get[liqtype] eq 0">selected</if>>所有摘要</option>
                            <option value="1" <if condition="$get[liqtype] eq 1">selected</if>>充值入款</option>
                            <option value="3" <if condition="$get[liqtype] eq 3">selected</if>>提現扣款</option>
                            <option value="4" <if condition="$get[liqtype] eq 4">selected</if>>投注扣款</option>
                            <option value="5" <if condition="$get[liqtype] eq 5">selected</if>>投注返點</option>
                            <option value="2" <if condition="$get[liqtype] eq 2">selected</if>>獎金派送</option>
                            <option value="6" <if condition="$get[liqtype] eq 6">selected</if>>提現退回</option>
                            <option value="7" <if condition="$get[liqtype] eq 7">selected</if>>活動禮金</option>
                            <option value="8" <if condition="$get[liqtype] eq 8">selected</if>>追號中止</option>
                            <option value="9" <if condition="$get[liqtype] eq 9">selected</if>>誤存提出</option>
                            <option value="11" <if condition="$get[liqtype] eq 11">selected</if>>人工存入</option>
                            <option value="12" <if condition="$get[liqtype] eq 12">selected</if>>其餘優惠</option>
                            <option value="17" <if condition="$get[liqtype] eq 17">selected</if>>投注撤單</option>
                            <option value="30" <if condition="$get[liqtype] eq 30">selected</if>>代理明細</option>
                        </select> &nbsp;&nbsp;
            會員帳號:
            <input type="text" name="user_login" style="width: 200px;" value="{$get.user_login}"  placeholder="請輸入會員帳號">
            時間:
            <input type="text" name="start_time" class="js-datetime" value="{$get.start_time|default=''}" style="width: 120px;" autocomplete="off">-
            <input type="text" class="js-datetime" name="end_time" value="{$get.end_time|default=''}" style="width: 120px;" autocomplete="off"> &nbsp; &nbsp;
            <input type="submit" class="btn btn-primary js-ajax-submit" value="搜索" />
        </form>
            <table class="table table-hover table-bordered table-list">
                <thead>
                    <tr>
                        <th width="50">流水號</th>
                        <th>會員</th>
                        <th>時間</th>
                        <th>摘要</th>
                        <th>金額</th>
                        <th>餘額</th>
                        <th>備註</th>
                    </tr>
                </thead>
                <tbody>
                <foreach name="record" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.uid|user_login}</td>
                        <td>{$vo.actiontime|date='Y-m-d',###}</td>
                        <td>{$vo.liqtype|liqtype=###}</td>
                        <td>{$vo.coin}</td>
                        <td>{$vo.usercoin}</td>
                        <td>{$vo.info}</td>
                    </tr>
                </foreach>
 
 
                </tbody>
 
            </table>
            <div class="pagination">{$page}</div>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    
</body>
</html>

升級開獎期號code

function gettime($time,$endtime){
    //計算出本月全部的期數
     for($i=$time;$i<$endtime;$i){
         $da = date("w",$i);
         if($da==0||$da==2||$da==5){
             $qishu=getnows($i)['hm']+1;
             $res['time'][$qishu]=date('Y-m-d',$i);
             $res['qishu'][]=$qishu;
         }
         $i=$i+86400;
     }
 
     return $res;
}
function getnows($time){
    $type=M('type')->where(array('id'=>'1'))->find(); 
    $dataxx=M('data')->where(array('type'=>'1'))->order('time desc')->find();
    $data['PeriodsStatus']=(int)$type['enable'];
    $timelist=explode(',',$type[data]);
    $days=$timelist[2];
    $chunjie=$timelist[3];
 
    $week = date('W',$time)*3-3;
    $da = date("w",$time);
 
    if((time()-$days*24*3600)<=$chunjie){
        $num=$week;
    }else{
        $num=$week-3;
    }
 
    if($da==0||$da>5){
        $num=$num+2;
    }elseif($da<=2){
        $num=$num;
    }elseif($da<=5){
        $num=$num+1;
    }
 
    if(($da==0||$da==2||$da==5)&&time()>=strtotime(date('Y-m-d 20:30:00'))){
        $num=$num;
    }
    $hm=$num;
    if($num<100){
        $hm='0'.$hm;
    }
    if($num<10){
        $hm='0'.$hm;
    }
    $result['hm']=$dataxx['number']+1;
    //$result['hm']=date('y').$hm;
    return $result;
}
function getnow($id,$dd=0){
        $type=M('type')->where(array('id'=>'1'))->find(); 
        $dataxx=M('data')->where(array('type'=>'1'))->order('time desc')->find();
        $data['PeriodsStatus']=(int)$type['enable'];
        $timelist=explode(',',$type['data']);
        
        $days=$timelist[2];
        $chunjie=$timelist[3];
        $time=time();//strtotime(date('2018-05-31'))
        $week = date('W',$time)*3-3;
        $da = date("w",$time);
        
 
        if((time()-$days*24*3600)<=strtotime($chunjie)){
            $num=$week;
            //exit(var_dump(strtotime($chunjie)));
        }else{
            $num=$week-3;
            //exit(var_dump(strtotime($chunjie)));
        }
        
 
        if($da==0||$da>5){
            $num=$num+2;
        }elseif($da<=2){
            $num=$num;
        }elseif($da<=5){
            $num=$num+1;
        }
 
        if(($da==0||$da==2||$da==5)&&time()>=strtotime(date('Y-m-d 20:30:00'))){
            $num=$num+1;
        }
        
        $week1=date('Y-m-d',strtotime("-".($da?$da -1 : 6).' days'));
        $week0=strtotime(date('Y-m-d 20:30:00',strtotime("$week1 +6 days")));
        $weeks0=strtotime(date('Y-m-d 20:30:00',strtotime("$week1 -1 days")));//上週日
        $week2=strtotime(date('Y-m-d 20:30:00',strtotime("$week1 +1 days")));
        $weeks2=strtotime(date('Y-m-d 20:30:00',strtotime("$week1 +8 days")));//下週二
        $week5=strtotime(date('Y-m-d 20:30:00',strtotime("$week1 +4 days")));
        
        if(time()>=strtotime(date('Y-m-d 20:30:00'))){
            if($da>=5){
                $result['OpenDt']=$week5+$timelist[1];
                $result['DrawDt']=$week5-$timelist[0];
                $result['CloseDt']=$week0-$timelist[0];
            }elseif($da>=2){
                $result['OpenDt']=$week2+$timelist[1];
                $result['DrawDt']=$week2-$timelist[0];
                $result['CloseDt']=$week5-$timelist[0];
            }elseif($da==0){
                $result['OpenDt']=$week0+$timelist[1];
                $result['DrawDt']=$week0-$timelist[0];
                $result['CloseDt']=$weeks2-$timelist[0];
            }elseif($da==1){
                $result['OpenDt']=$weeks0+$timelist[1];
                $result['DrawDt']=$weeks0-$timelist[0];
                $result['CloseDt']=$week2-$timelist[0];
            }
        }else{
            if($da==5){
                $result['OpenDt']=$week2+$timelist[1];
                $result['DrawDt']=$week2-$timelist[0];
                $result['CloseDt']=$week5-$timelist[0];
            }elseif($da==2){
                $result['OpenDt']=$weeks0+$timelist[1];
                $result['DrawDt']=$weeks0-$timelist[0];
                $result['CloseDt']=$week2-$timelist[0];
            }elseif($da==0){
                $result['OpenDt']=$week5+$timelist[1];
                $result['DrawDt']=$week5-$timelist[0];
                $result['CloseDt']=$week0-$timelist[0];
            }elseif($da>5){
                $result['OpenDt']=$week5+$timelist[1];
                $result['DrawDt']=$week5-$timelist[0];
                $result['CloseDt']=$week0-$timelist[0];
            }elseif($da>2){
                $result['OpenDt']=$week2+$timelist[1];
                $result['DrawDt']=$week2-$timelist[0];
                $result['CloseDt']=$week5-$timelist[0];
            }else{
                $result['OpenDt']=$weeks0+$timelist[1];
                $result['DrawDt']=$weeks0-$timelist[0];
                $result['CloseDt']=$week2-$timelist[0];
            }
        }
        $result['OpenDt']=date('Y-m-d H:i:s',$result['OpenDt']);
        $result['DrawDt']=date('Y-m-d H:i:s',$result['DrawDt']);
        $result['CloseDt']=date('Y-m-d H:i:s',$result['CloseDt']);
        $hm=$num+$dd-3;
          if($hm<100){
            $hm='0'.$hm;
          }
          if($hm<10){
            $hm='0'.$hm;
          }
          $result['now']=time();
          $result['hm']=$dataxx['number']+1;
          //$result['hm']=date('Y').$hm;
 
        $result['day']=0;
        return $result;
 
         
}
function storexx($id,$BetNumber,$PeriodsNumber){
        $map2['uid']=$id;
        $map2['BetNumber']=$BetNumber;
        $map2['PeriodsNumber']=$PeriodsNumber;
        $store=M('bets')->where($map2)->sum('BetAmount');
        return $store+0;
}
function storexx2($id,$playid,$PeriodsNumber){
        $map2['uid']=$id;
        $map2['playedId']=$playid;
        $map2['PeriodsNumber']=$PeriodsNumber;
        $store=M('bets')->where($map2)->sum('BetAmount');
        return $store+0;
}
 
 
function getodds2($played,$number=0){
 
    $list=explode('/',$played);
 
 
    if(count($list)==1){
        $bonusprop=$list[0];
    }
    else{
        $number=$number;
        $nlist=str_split($number);
        $c=array_count_values($nlist);
        $cfnum=count($nlist)-count($c);
        $bonusprop=$list[$cfnum];
        $cbonusprop=$clist[$cfnum];
    }
    return (float)($bonusprop);
}
function getodds1($played,$number=0){
 
    $list=explode('/',$played['bonusprop']);
 
 
    if(count($list)==1){
        $bonusprop=$list[0];
        $cbonusprop=$clist[0];
    }
    else{
        $number=$number;
        $nlist=str_split($number);
        $c=array_count_values($nlist);
        $cfnum=count($nlist)-count($c);
        $bonusprop=$list[$cfnum];
        $cbonusprop=$clist[$cfnum];
    }
    return (float)($bonusprop);
}
function getodds($played,$user,$number=0){
    $commission=json_decode($user['commission'],true);
    $sjcommission=json_decode($user['sjcommission'],true);
    $list=explode('/',$played['bonusprop']);
    $clist=explode('/',$played['cbonusprop']);
    if(count($list)==1){
        $bonusprop=$list[0];
        $cbonusprop=$clist[0];
    }
    else{
        $number=$number;
        $nlist=str_split($number);
        $c=array_count_values($nlist);
        $cfnum=count($nlist)-count($c);
        $bonusprop=$list[$cfnum];
        $cbonusprop=$clist[$cfnum];
    }
    return (float)($bonusprop-$cbonusprop*$sjcommission[$played['bettypeid']]['Commission']);
}
 
function getoddsup($played,$user,$number=0){
    $commission=json_decode($user['commission'],true);
    $sjcommission=json_decode($user['sjcommission'],true);
    $list=explode('/',$played['bonusprop']);
    $clist=explode('/',$played['cbonusprop']);
    if(count($list)==1){
        $bonusprop=$list[0];
        $cbonusprop=$clist[0];
    }
    else{
        $number=$number;
        $nlist=str_split($number);
        $c=array_count_values($nlist);
        $cfnum=count($nlist)-count($c);
        $bonusprop=$list[$cfnum];
        $cbonusprop=$clist[$cfnum];
    }
    return (float)($cbonusprop*$sjcommission[$played['bettypeid']]['Commission']);
}

新增會員模板

新增代理部分

相關文章
相關標籤/搜索