12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- session_start();
- if (isset($_SESSION["username"])) {
- ?>
- <?php require_once('common/header.php'); ?>
- <!--页面主要内容-->
- <main class="lyear-layout-content">
-
- <div class="container-fluid">
-
- <div class="row">
- <div class="col-lg-12">
- <div class="card">
- <ul class="nav nav-tabs page-tabs">
- <li > <a href="other.php">同源系统</a> </li>
- <li > <a href="gantan.php">敢探号配置</a> </li>
- <li class="active"> <a href="haoke.php">号氪云配置</a> </li>
- </ul>
- <?php
- include_once("../untils/conn.php");
- $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
- $domain = $_SERVER['HTTP_HOST'];
- $url = $protocol . $domain;
- $groups = 'haokeyun';
- $sql = "SELECT * FROM config_api WHERE groups = '$groups'";
- $result = mysqli_query($con, $sql);
-
- // 检查查询结果是否为空
- if (mysqli_num_rows($result) > 0) {
- // 获取第一行数据
- $row = mysqli_fetch_assoc($result);
- $userid = $row['userid'];
- $token = $row['token'];
- $gdkey = $row['gdkey'];
- } else {
-
- }
-
- ?>
- <div class="">
- <div class="card-body">
- <form class="form-horizontal" action="controller/doApiConfig.php" method="POST">
- <div class="form-group">
- <label for="title" class="col-xs-12">号卡氪云id:</label>
- <div class="col-xs-12">
- <input type="text" class="form-control" name="userid" placeholder="号卡氪云id" value="<?php echo $userid ?>" required>
- </div>
- </div>
- <div class="form-group">
- <label for="title" class="col-xs-12">号氪云token:</label>
- <div class="col-xs-12">
- <input type="text" class="form-control" name="token" placeholder="号氪元Token" value="<?php echo $token ?>" >
- </div>
- </div>
- <div class="form-group">
- <label for="title" class="col-xs-12">高德地图key:</label>
- <div class="col-xs-12">
- <input type="text" class="form-control" name="gdkey" placeholder="高德地图的key,号氪云提单必填参数" value="<?php echo $gdkey ?>" >
- </div>
- </div>
- <div class="form-group">
- <label for="title" class="col-xs-12">号氪云回调地址:</label>
- <div class="col-xs-12">
- <input class="form-control" type="text" value="<?php echo $url ?>/api/open/callback.php?type=haokeyun" readonly>
- </div>
- </div>
-
- <div class="form-group">
- <input type="hidden" name="type" value="<?php echo $groups ?>">
- <div class="offset-2 col-xs-12">
- <button class="btn btn-success" type="submit" value="添加">确认修改</button>
- <!-- <button class="btn btn-danger ml-3" type="reset" value="重置">返回</button> -->
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </main>
- <!--End 页面主要内容-->
- <?php require_once('common/footer.php'); ?>
- <?php
- } else {
- echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
- }
|