upChannel.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. $channel_id = $_GET['channel_id'];
  12. $data = mysqli_query($con, "select * from channel where channel_id=" . $channel_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 action="controller/upChannel.php" method="POST">
  21. <div class="input-group m-b-10">
  22. <label class="input-group-addon" for="channel_name" id="basic-addon1">渠道名称</label>
  23. <input type="text" class="form-control" name="channel_name" placeholder="请输入渠道名称"value="<?php echo $rows[1] ?>" required>
  24. </div>
  25. <div class="input-group m-b-10">
  26. <span class="input-group-addon" for="channel_type" id="basic-addon1">渠道类型</span>
  27. <select class="form-control" name="channel_type">
  28. <option value="0">线上渠道</option>
  29. <option value="1">线下渠道</option>
  30. </select>
  31. </div>
  32. <div class="input-group m-b-10">
  33. <span class="input-group-addon" for="channel_leader" id="basic-addon1">渠道负责人</span>
  34. <input type="text" class="form-control" name="channel_leader" placeholder="请输入渠道负责人" value="<?php echo $rows[3] ?>" required>
  35. </div>
  36. <div class="input-group m-b-10">
  37. <span class="input-group-addon" for="channel_phone" id="basic-addon1">负责人号码</span>
  38. <input type="text" class="form-control" name="channel_phone" placeholder="请输入负责人号码" value="<?php echo $rows[4] ?>" required>
  39. </div>
  40. <!--<div class="input-group m-b-10">-->
  41. <!-- <span class="input-group-addon" for="channel_type" id="basic-addon1">时间戳</span>-->
  42. <input type="hidden" class="form-control" name="channel_id" value=<?php echo $channel_id ?> required>
  43. <!--</div>-->
  44. <div class="form-row mt-3">
  45. <div class="offset-2">
  46. <button class="btn btn-success" type="submit" value="修改">立即修改</button>
  47. </div>
  48. </div>
  49. </form>
  50. </div>
  51. </div>
  52. </div>
  53. </main>
  54. <!--End 页面主要内容-->
  55. <?php require_once('common/footer.php'); ?>
  56. <?php
  57. } else {
  58. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  59. }
  60. ?>