haoke.php 3.4 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="other.php">同源系统</a> </li>
  14. <li > <a href="gantan.php">敢探号配置</a> </li>
  15. <li class="active"> <a href="haoke.php">号氪云配置</a> </li>
  16. </ul>
  17. <?php
  18. include_once("../untils/conn.php");
  19. $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
  20. $domain = $_SERVER['HTTP_HOST'];
  21. $url = $protocol . $domain;
  22. $groups = 'haokeyun';
  23. $sql = "SELECT * FROM config_api WHERE groups = '$groups'";
  24. $result = mysqli_query($con, $sql);
  25. // 检查查询结果是否为空
  26. if (mysqli_num_rows($result) > 0) {
  27. // 获取第一行数据
  28. $row = mysqli_fetch_assoc($result);
  29. $userid = $row['userid'];
  30. $token = $row['token'];
  31. $gdkey = $row['gdkey'];
  32. } else {
  33. }
  34. ?>
  35. <div class="">
  36. <div class="card-body">
  37. <form class="form-horizontal" action="controller/doApiConfig.php" method="POST">
  38. <div class="form-group">
  39. <label for="title" class="col-xs-12">号卡氪云id:</label>
  40. <div class="col-xs-12">
  41. <input type="text" class="form-control" name="userid" placeholder="号卡氪云id" value="<?php echo $userid ?>" required>
  42. </div>
  43. </div>
  44. <div class="form-group">
  45. <label for="title" class="col-xs-12">号氪云token:</label>
  46. <div class="col-xs-12">
  47. <input type="text" class="form-control" name="token" placeholder="号氪元Token" value="<?php echo $token ?>" >
  48. </div>
  49. </div>
  50. <div class="form-group">
  51. <label for="title" class="col-xs-12">高德地图key:</label>
  52. <div class="col-xs-12">
  53. <input type="text" class="form-control" name="gdkey" placeholder="高德地图的key,号氪云提单必填参数" value="<?php echo $gdkey ?>" >
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label for="title" class="col-xs-12">号氪云回调地址:</label>
  58. <div class="col-xs-12">
  59. <input class="form-control" type="text" value="<?php echo $url ?>/api/open/callback.php?type=haokeyun" readonly>
  60. </div>
  61. </div>
  62. <div class="form-group">
  63. <input type="hidden" name="type" value="<?php echo $groups ?>">
  64. <div class="offset-2 col-xs-12">
  65. <button class="btn btn-success" type="submit" value="添加">确认修改</button>
  66. <!-- <button class="btn btn-danger ml-3" type="reset" value="重置">返回</button> -->
  67. </div>
  68. </div>
  69. </form>
  70. </div>
  71. </div>
  72. </div>
  73. </main>
  74. <!--End 页面主要内容-->
  75. <?php require_once('common/footer.php'); ?>
  76. <?php
  77. } else {
  78. echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
  79. }