Bansytem.php 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. <div class="row">
  10. <div class="col-lg-12">
  11. <div class="card">
  12. <ul class="nav nav-tabs page-tabs">
  13. <li > <a href="Foundation.php">基础配置</a> </li>
  14. <li > <a href="system.php">网站配置</a> </li>
  15. <li > <a href="Smsytem.php">短信配置</a> </li>
  16. <li class="active"> <a href="Bansytem.php">轮播配置</a> </li>
  17. </ul>
  18. <?php
  19. include_once("../untils/conn.php");
  20. $type = 'banner';
  21. $sql = "select * from system where type='banner'";
  22. $data = mysqli_query($con, $sql);
  23. $result = mysqli_fetch_row($data);
  24. ?>
  25. <div class="">
  26. <div class="card-body">
  27. <form class="form-horizontal" action="controller/doBan.php" method="POST">
  28. <div class="form-group">
  29. <label for="title" class="col-xs-12">第一张轮播:</label>
  30. <div class="col-xs-12">
  31. <input type="text" class="form-control" name="banner" placeholder="第一张轮播" value="<?php echo $result[4] ?>" required>
  32. </div>
  33. </div>
  34. <div class="form-group">
  35. <label for="title" class="col-xs-12">跳转链接:</label>
  36. <div class="col-xs-12">
  37. <input type="text" class="form-control" name="link" placeholder="跳转链接" value="<?php echo $result[5] ?>" >
  38. </div>
  39. </div>
  40. <div class="form-group">
  41. <label for="title" class="col-xs-12">第二张轮播:</label>
  42. <div class="col-xs-12">
  43. <input type="text" class="form-control" name="banner_one" placeholder="第二张轮播" value="<?php echo $result[6] ?>" required>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label for="title" class="col-xs-12">跳转链接:</label>
  48. <div class="col-xs-12">
  49. <input type="text" class="form-control" name="link_one" placeholder="跳转链接2" value="<?php echo $result[7] ?>" >
  50. </div>
  51. </div>
  52. <div class="form-group">
  53. <label for="title" class="col-xs-12">第三张轮播:</label>
  54. <div class="col-xs-12">
  55. <input type="text" class="form-control" name="banner_two" placeholder="第三张轮播" value="<?php echo $result[8] ?>" required>
  56. </div>
  57. </div>
  58. <div class="form-group">
  59. <label for="title" class="col-xs-12">跳转链接:</label>
  60. <div class="col-xs-12">
  61. <input type="text" class="form-control" name="link_two" placeholder="跳转链接3" value="<?php echo $result[9] ?>" >
  62. </div>
  63. </div>
  64. <div class="form-group">
  65. <input type="hidden" name="type" value="<?php echo $type ?>">
  66. <div class="offset-2 col-xs-12">
  67. <button class="btn btn-success" type="submit" value="添加">确认修改</button>
  68. <!-- <button class="btn btn-danger ml-3" type="reset" value="重置">返回</button> -->
  69. </div>
  70. </div>
  71. </form>
  72. </div>
  73. </div>
  74. </div>
  75. </main>
  76. <!--End 页面主要内容-->
  77. <?php require_once('common/footer.php'); ?>
  78. <?php
  79. } else {
  80. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  81. }