123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- <?php
- session_start();
- if (isset($_SESSION["username"])) {
- ?>
- <?php require_once('common/header.php');
- include_once('../updata/version.php');
- include_once("../untils/conn.php");
- mysqli_query($con, "set names utf8");
- // 获取接口返回的 JSON 数据
- $json = file_get_contents('http://hk7.ldove.cn/updata/Getversion.php');
- $data = json_decode($json, true);
- $new_version = $data['version']; // 将 version 字段存储为变量 $new_version
- ?>
- <main class="lyear-layout-content">
- <div class="container-fluid">
- <div class="row">
-
- <div class="col-sm-6">
- <?php
- $versions = mysqli_get_server_info($con);
- ?>
-
- <div class="card">
- <div class="card-header">
- <h4>系统信息</h4>
- </div>
- <div class="card-body">
- <p>系统名称:<?php echo $system_name; ?></p>
- <p>版本号:V<?php echo $version; ?></p>
- <p>版本类型:
- <?php
- if ($version_type == 0) {
- echo "开源版本";
- } elseif ($version_type == 1) {
- echo "商业版本";
- }
- ?>
- </p>
- <p>开发者:<?php echo $developer; ?></p>
- <p>QQ:<?php echo $qqnum; ?></p>
- <p>微信:<?php echo $wechat; ?></p>
- <p>更新日志:<a href="<?php echo $update_log_url; ?>" target="_blank">点击查看</a></p>
- <p>开源地址:<a href="<?php echo $oepnrrl; ?>" target="_blank">点击查看</a></p>
- </div>
- </div>
-
- </div>
- <!-- .col-sm-6 -->
- <div class="col-sm-6">
- <div class="card">
- <div class="card-header">
- <h4>服务器信息</h4>
- </div>
- <div class="card-body">
- <p>服务器操作系统: <?php echo php_uname(); ?></p>
- <p>MYSQL版本: <?php echo $versions; ?></p>
- <p>web中间件: <?php echo $_SERVER['SERVER_SOFTWARE']; ?></p>
- <p>PHP版本: <?php echo phpversion(); ?></p>
- <p>网站目录: <?php echo $_SERVER['DOCUMENT_ROOT']; ?></p>
- </div>
- </div>
- </div>
- <!-- .col-sm-6 -->
- </div>
- <!-- .row -->
- <div class="row">
-
- <div class="col-sm-6">
- <div class="card">
- <div class="card-header">
- <h4>在线更新</h4>
- </div>
- <div class="card-body">
- <a href="#" class="btn btn-danger" onclick="checkUpdate()">检查更新</a>
- <p style="color:red;">在线更新可能会因为各种因素,比如网络延迟,代码更新超时,手动中断等,导致更新不完整,系统崩溃等等,如果你使用在线更新功能需要自己备份数据和主程序,以防数据丢失,如果使用在线更新功能导致数据丢失,我们概不负责,使用在线功能说明你已经阅读并知悉!</p>
-
- </div>
- </div>
- </div>
- <!-- .col-sm-6 -->
-
- <div class="col-sm-6">
- <div class="card">
- <div class="card-header">
- <h4>赞助支持</h4>
- </div>
- <div class="card-body">
- <p>开源不易续杯咖啡~</p>
- <div style="display: flex;">
- <img src="https://cdn.qiniu.junes.cn/upload/2023/06/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230622200759.jpg" style="width: 180px; margin-right: 60px;height: 260px;">
- <img src="https://cdn.qiniu.junes.cn/upload/2023/06/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230622200755.jpg" style="width: 180px; margin-right: 60px;">
- <img src="https://cdn.qiniu.junes.cn/upload/2023/06/%E8%81%9A%E5%90%88%E6%94%B6%E6%AC%BE-%E5%85%AD%E6%9C%88%E7%83%9F%E4%BA%91%E5%B7%A5%E4%BD%9C%E5%AE%A4.png" style="width: 180px; ">
- </div>
- </div>
- </div>
- </div>
- <!-- .col-sm-6 -->
- </div>
- <!-- .row -->
- <!-- End Cards with Actions -->
-
- </div>
- <script>
- function checkUpdate() {
- // 判断版本是否相同
- if ("<?php echo $version; ?>" === "<?php echo $new_version; ?>") {
- alert("已经是最新版本");
- } else {
- var result = confirm("发现新版本(版本号 <?php echo $new_version; ?>),是否更新?");
- if (result) {
- window.location.href = "DoUpData.php";
- }
- }
- }
- </script>
-
- </main>
- <?php require_once('common/footer.php'); ?>
- <?php
- } else {
- echo "<script>alert('您尚未登录,没有权限访问该页面');location.href='login.php';</script>";
- }
|