upwith.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. session_start();
  3. if (isset($_SESSION["username"])) {
  4. ?>
  5. <?php require_once('common/header.php'); ?>
  6. <!--页面主要内容-->
  7. <main class="lyear-layout-content">
  8. <div class="container-fluid">
  9. <?php
  10. include_once("../untils/conn.php");
  11. $id = $_GET['id'];
  12. $data = mysqli_query($con, "select * from withdrawal where id=" . $id);
  13. $rows = mysqli_fetch_row($data);
  14. ?>
  15. <div class="card">
  16. <div class="card-header bg-primary">
  17. <h4>审核打款</h4>
  18. </div>
  19. <div class="card-body">
  20. <form class="form-horizontal" action="controller/doWtin.php" method="POST">
  21. <div class="form-group">
  22. <label for="title" class="col-xs-12">提现人:</label>
  23. <div class="col-xs-12">
  24. <input type="text" class="form-control" name="tx_name" placeholder="提现人" value="<?php echo $rows[9] ?>" required>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label for="title" class="col-xs-12">提现账号:</label>
  29. <div class="col-xs-12">
  30. <input type="text" class="form-control" name="tx_acc" placeholder="提现账号" value="<?php echo $rows[10] ?>" required>
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-xs-12">处理状态:</label>
  35. <div class="col-xs-12">
  36. <select name="state" id="state" class="form-control">
  37. <option value="">请选择状态</option>
  38. <?php
  39. include_once("../untils/conn.php");
  40. mysqli_query($con, "set names utf8");
  41. // 获取订单状态
  42. $status_sql = "SELECT DISTINCT `state` FROM `withdrawal`";
  43. $status_data = mysqli_query($con, $status_sql);
  44. $statuses = [
  45. ['id' => 0, 'text' => '待审核'],
  46. ['id' => 1, 'text' => '已打款'],
  47. ['id' => 2, 'text' => '审核失败'],
  48. ];
  49. foreach($statuses as $status) {
  50. $selected = '';
  51. if ($status['id'] == $rows[9]) {
  52. $selected = 'selected';
  53. }
  54. echo "<option value='{$status['id']}' {$selected}>{$status['text']}</option>";
  55. }
  56. ?>
  57. </select>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label class="col-xs-12" for="example-disabled-input">提现方式</label>
  62. <div class="col-xs-12">
  63. <select class="form-control" id="example-disabled-input" name="tx_type" disabled>
  64. <?php
  65. if($rows[2] == 0){
  66. echo '<option value="0" selected>微信</option>
  67. <option value="1">支付宝</option>
  68. <option value="2">银行卡</option>';
  69. }elseif($rows[2] == 1){
  70. echo '<option value="0">微信</option>
  71. <option value="1" selected>支付宝</option>
  72. <option value="2">银行卡</option>';
  73. }elseif($rows[2] == 2){
  74. echo '<option value="0">微信</option>
  75. <option value="1">支付宝</option>
  76. <option value="2" selected>银行卡</option>';
  77. }
  78. ?>
  79. </select>
  80. </div>
  81. </div>
  82. <div class="form-group">
  83. <label class="col-xs-12" for="tx_price">提现金额</label>
  84. <div class="col-xs-12">
  85. <input class="form-control" type="text" name="tx_price" placeholder="提现金额" value="<?php echo $rows[3] ?>" readonly="true">
  86. </div>
  87. </div>
  88. <div class="form-group">
  89. <label for="title" class="col-xs-12">实际打款金额:</label>
  90. <div class="col-xs-12">
  91. <input type="text" class="form-control" name="dk_price" placeholder="实际打款金额" value="<?php echo $rows[4] ?>" >
  92. </div>
  93. </div>
  94. <div class="form-group">
  95. <label for="title" class="col-xs-12">提现备注说明:</label>
  96. <div class="col-xs-12">
  97. <input type="text" class="form-control" name="notes" placeholder="请输入备注" value="<?php echo $rows[13] ?>" required>
  98. </div>
  99. </div>
  100. <div class="form-group">
  101. <input type="hidden" name="id" value="<?php echo $id ?>">
  102. <input type="hidden" name="cl_time" value="<?php echo time() ?>">
  103. <input type="hidden" name="proxy_acc" value="<?php echo $rows[1] ?>">
  104. <div class="offset-2 col-xs-12">
  105. <button class="btn btn-success" type="submit" value="添加">确认提交</button>
  106. </div>
  107. </div>
  108. </form>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </main>
  118. <!--End 页面主要内容-->
  119. <?php require_once('common/footer.php'); ?>
  120. <?php
  121. } else {
  122. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  123. }