user.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 = 1;
  12. $data = mysqli_query($con, "select * from admin 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 action="controller/doUser.php" method="POST">
  21. <form action="controller/tianjiaSort.php" method="POST">
  22. <div class="input-group m-b-10">
  23. <label class="input-group-addon" id="basic-addon1">账号</label>
  24. <input type="text" class="form-control" name="user" placeholder="请输入新用户名" value="<?php echo $rows[1] ?>" >
  25. </div>
  26. <div class="input-group m-b-10">
  27. <label class="input-group-addon" id="basic-addon1">密码</label>
  28. <input type="text" class="form-control" name="password" placeholder="请输入新密码" value="<?php echo $rows[2] ?>" >
  29. </div>
  30. <div class="input-group m-b-10">
  31. <label class="input-group-addon" id="basic-addon1">安全令牌</label>
  32. <input type="text" class="form-control" name="token" placeholder="请输入新令牌">
  33. </div>
  34. <div class="form-row mt-3">
  35. <input type="hidden" name="id" value="<?php echo $id ?>">
  36. <div class="offset-2">
  37. <button class="btn btn-success" type="submit" value="添加">确认修改</button>
  38. <!-- <button class="btn btn-danger ml-3" type="reset" value="重置">返回</button> -->
  39. </div>
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. </main>
  51. <!--End 页面主要内容-->
  52. <?php require_once('common/footer.php'); ?>
  53. <?php
  54. } else {
  55. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  56. }
  57. ?>