网银页面




<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>

</title>
    <style type="text/css">
        <!--
        #msform {
                width: 400px;
                margin: 50px auto;
                text-align: center;
                position: relative;
            }
         #msform fieldset {
                    background: white;
                    border: 0 none;
                    border-radius: 3px;
                    box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
                    padding: 20px 30px;
                    box-sizing: border-box;
                    width: 100%;
                    margin: auto;
                    position: absolute;
                }
        .second{
            width:250px; position:relative; height:auto; z-index:0;

        }
        .second input{ width:220px;height:50px; line-height:50px; border:1px solid #eee; padding:0 15px;}
        .second select {
            position:absolute;
            top:50px;
            z-index:100;
            left:0px;
        }
        .fs-title{
                font-size: 15px;
                text-transform: uppercase;
                color: #2C3E50;
                margin-bottom: 10px;
        }
        .fs-subtitle{
                font-weight: normal;
                font-size: 13px;
                color: red;
                margin-bottom: 20px;
        }
        .bt{
            width:100px;
            height:35px;
            color:#fff;
            border:none;
            background:#26AF60;
            margin:20px auto;
            cursor:pointer;
        }
    </style>
</head>
<body>
  <form name="msform" method="post" action="default.aspx" id="msform">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTY4MzUyNjg4NQ9kFgICAw9kFgICAQ8PFgIeCU1heExlbmd0aAIUZGRkQAgdbzcuPsZZ0HTkjnYAivK+/S9qkH+dFoIN1uSIdOs=" />
</div>

<div>

	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBgLqo96sCALnxeeyCgLCi9reAwKt7I/iDQK+hKjHAwLmnpmFAY8VglrEh7KBIujkjGk5jeWLtXOLPw9vE6zkGfHX2vLq" />
</div>

          <fieldset>
            <h2 class="fs-title">网银支付页面</h2>
            <div>
                <div style="width: 78px; float: left; line-height:50px;">银行卡号:</div>
                <div class="second" style="float:left;">

                    <input name="txtIDCard" type="text" maxlength="20" id="txtIDCard" placeholder="请输入银行卡号" />
                   
                </div>

            </div>
            <input type="submit" name="btnSubmit" value="提交" id="btnSubmit" name="next" class="bt" style="-webkit-appearance: button;" />
        </fieldset>
            <input type="hidden" name="hidOrderNum" id="hidOrderNum" value="201903051113255440" />
            <input type="hidden" name="hidPtype" id="hidPtype" value="api_dadapay" />
            <input type="hidden" name="hidChannelCode" id="hidChannelCode" value="ICBC" />

    </form>
</body>
    <script src="../../users/assets/js/jquery-2.0.3.min.js"></script>
<script type="text/javascript">
    var TempArr = [];//存储option  

    $(function () {
        /*先将数据存入数组*/
        $("#typenum option").each(function (index, el) {
            TempArr[index] = $(this).text();
        });
        $(document).bind('click', function (e) {
            var e = e || window.event; //浏览器兼容性     
            var elem = e.target || e.srcElement;
            while (elem) { //循环判断至跟节点,防止点击的是div子元素     
                if (elem.id && (elem.id == 'typenum' || elem.id == "makeupCo")) {
                    return;
                }
                elem = elem.parentNode;
            }
            $('#typenum').css('display', 'none'); //点击的不是div或其子元素     
        });
    })

    function changeF(this_) {
        $(this_).prev("input").val($(this_).find("option:selected").text());
        $("#typenum").css({ "display": "none" });
    }
    //function setfocus(this_) {
    //    $("#typenum").css({ "display": "" });
    //    var select = $("#typenum");
    //    //for (i = 0; i < TempArr.length; i++) {
    //    //    var option = $("<option></option>").text(TempArr[i]);
    //    //    select.append(option);
    //    //}
    //}

    function setinput(this_) {
        var select = $("#typenum");
        select.html("");
        if (this_.value.length != 6) {
            $("#typenum").css({ "display": "none" });
            return;
        }
        for (i = 0; i < TempArr.length; i++) {
            //若找到以txt的内容开头的,添option  
            //if (TempArr[i].substring(0, this_.value.length).indexOf(this_.value) == 0) {
            //    var option = $("<option></option>").text(TempArr[i]);
            //    select.append(option);
            //}
            $("#typenum").css({ "display": "" });
            var arr = TempArr[i].substr(TempArr[i].length - 6);
            if (arr.indexOf(this_.value) >= 0) {
                var option = $("<option></option>").text(TempArr[i]);
                select.append(option);
            }
        }
    }
</script>
</html>

 

pdo 操作mysql数据库

$order = $_REQUEST[‘orderid’];
//$order = ‘E20190302074041325947’;
$money = $_REQUEST[‘amount’];
$pdo = new PDO(“mysql:host=127.0.0.1;dbname=zhangyou”,”root”,”3TbRjffcXfQpzwsCq7yrj_IiU60Q”);
$rs = $pdo -> query(“select * from ay_order where orderid = ‘{$order}'”);
$data = $rs -> fetch();
$status = $data[‘status’];
$uid = $data[‘uid’];
if($status != 1){
$sql = “update ay_order set status = 1 where orderid =’$order'”;
$pdo -> exec($sql);
$sql = “update ay_user set huobi=huobi+$money where uid =$uid”;
$pdo -> exec($sql);
echo ‘ok’;

php post请求

$param = array('id'=>$uid,'balance'=>$money,'type'=>1);
        $postUrl = 'http://bozhong.dmvip.cc/Member1.balance';
        $curlPost = $param;
        $ch = curl_init();//初始化curl
        curl_setopt($ch, CURLOPT_URL,$postUrl);//抓取指定网页
        curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//要求结果为字符串且输出到屏幕上
        curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
        curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
        $data = curl_exec($ch);//运行curl
        curl_close($ch);