upGroup.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. $group_id = $_GET['group_id'];
  12. $uptime = time();
  13. // echo $group_id;
  14. $data = mysqli_query($con, "select * from proxy_group where group_id=" . $group_id);
  15. $rows = mysqli_fetch_row($data);
  16. $group_name = $rows[1];
  17. ?>
  18. <div class="card">
  19. <div class="card-header bg-primary">
  20. <h4>修改代理等级</h4>
  21. </div>
  22. <div class="card-body">
  23. <form class="form-horizontal" action="controller/doGroup.php" method="POST">
  24. <div class="form-group">
  25. <label class="col-xs-12">等级名称:</label>
  26. <div class="col-xs-12">
  27. <input type="text" class="form-control" name="group_name" placeholder="输入代理等级" value="<?php echo $group_name ?>" required>
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-xs-12">扣除金额:</label>
  32. <div class="col-xs-12">
  33. <input type="text" class="form-control" name="group_portion" placeholder="代理商的比例(一级设置100,因为计算佣金是以代理佣金计算的,平台设置代理佣金时已扣掉部分金额)" value="<?php echo $rows[2] ?>" required>
  34. </div>
  35. </div>
  36. <div class="form-group">
  37. <input type="hidden" name="group_id" value="<?php echo $group_id ?>">
  38. <input type="hidden" name="group_uptime" value="<?php echo $uptime ?>">
  39. <div class="offset-2 col-xs-12">
  40. <button class="btn btn-success" type="submit" value="添加">确认修改</button>
  41. </div>
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </div>
  47. </main>
  48. <!--End 页面主要内容-->
  49. <?php require_once('common/footer.php'); ?>
  50. <?php
  51. } else {
  52. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  53. }
  54. ?>