upSort.php 2.1 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. $id = $_GET['id'];
  12. $data = mysqli_query($con, "select * from sort 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/doSort.php" method="POST">
  21. <div class="form-group">
  22. <label class="col-xs-12">名称:</label>
  23. <div class="col-xs-12">
  24. <input type="text" class="form-control" name="yys" placeholder="请输入运营商名称" value="<?php echo $rows[1] ?>" required>
  25. </div>
  26. </div>
  27. <div class="form-group">
  28. <label class="col-xs-12">缩写:</label>
  29. <div class="col-xs-12">
  30. <input type="text" class="form-control" name="yysabbr" placeholder="请输入运营商英文缩写" value="<?php echo $rows[2] ?>" required>
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label class="col-xs-12">序号:</label>
  35. <div class="col-xs-12">
  36. <input type="number" class="form-control" name="sortid" placeholder="填写数字,数值越大越靠前" value="<?php echo $rows[3] ?>" required>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <input type="hidden" name="id" value="<?php echo $id ?>">
  41. <div class="offset-2 col-xs-12">
  42. <button class="btn btn-success" type="submit" value="添加">确认修改</button>
  43. </div>
  44. </div>
  45. </form>
  46. </div>
  47. </div>
  48. </div>
  49. </main>
  50. <!--End 页面主要内容-->
  51. <?php require_once('common/footer.php'); ?>
  52. <?php
  53. } else {
  54. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  55. }
  56. ?>