zoukankan      html  css  js  c++  java
  • php_cz

    post.php

    <?php
    require_once 'config.php';
    $ddh=trim(htmlspecialchars($_POST['ddh'])); //支付宝交易号
    $money=trim(htmlspecialchars($_POST['money'])); //付款金额
    $name=trim(htmlspecialchars($_POST['name']));   //付款说明,参数一
    $key=trim(htmlspecialchars($_POST['key'])); //密钥
    $addtime=date('Y-m-d H:i:s',time());
    $name=str_replace('付款-','',$name);//去掉付款说明的空格
    $stage="recharge";
    $type=1;
    $addtime=date('Y-m-d H:i:s',time());
    $comm = "alipay";
    
    
    if($key == '168szb262589546'){
    
        
            $rss=mysql_query("SELECT * FROM user WHERE id='$name'");
            $rows=mysql_fetch_array($rss);
            $remain_money=$rows['money'];
    
            $rs=mysql_query("SELECT * FROM pay_order WHERE outer_order_no='$ddh'");
            $row=mysql_fetch_array($rs);
    
    
    if($row['status']==""&&$rows['id']<>""){
    
    
       mysql_query("UPDATE user set money=money+".$money." WHERE id='$name'");
       
       $aa="INSERT INTO pay_order (user_id,order_no,outer_order_no,pay_money,status,type,addtime,comm) VALUES ('$name','$name','$ddh','$money','$type','$type','$addtime','$comm')";
    mysql_query($aa);
    //写日志
       $bb="INSERT INTO account_log (user_id,stage,money,remain_money,comm,addtime) VALUES ('$name','$stage','$money','$remain_money','$name','$addtime')";
    mysql_query($bb);
    
    
       echo "okokokokokok";
    }
    
    
    if($row['status']<>"")echo '该订单已充值过!';
    
       
              
    }else{
    echo '密钥错误no!';
    }
    ?>
  • 相关阅读:
    Hbase常用Shell命令
    Hbase的安装与基本操作
    Unity3d 游戏设计(一)井字棋
    Unity3d 二、离散仿真引擎基础
    Unity3D 一、游戏
    String StringBuffer StringBulider
    Java日志记录log4j最简明教程
    使用PinYin4j.jar将汉字转换为拼音
    线性素数筛
    求一个数的约数个数 d(n)
  • 原文地址:https://www.cnblogs.com/iicoo/p/5208507.html
Copyright © 2011-2022 走看看