add version and id info

This commit is contained in:
Zichao Lin 2023-11-26 08:11:18 +08:00
parent bd178ab1fd
commit e4c7bc8c6e
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB

@ -46,7 +46,9 @@ require("track.php");
//查询随机一条记录 //查询随机一条记录
$sql = "SELECT * FROM soul ORDER BY RAND() LIMIT 1"; $sql = "SELECT * FROM soul ORDER BY RAND() LIMIT 1";
$result = mysqli_query($conn, $sql); $result = mysqli_query($conn, $sql);
$id;
while ($row = mysqli_fetch_assoc($result)) { while ($row = mysqli_fetch_assoc($result)) {
$id = $row["id"];
?> ?>
<div id="sentence" style="font-size: 2rem;"> <div id="sentence" style="font-size: 2rem;">
<?php echo $row["title"] ?> <?php echo $row["title"] ?>
@ -78,6 +80,11 @@ require("track.php");
<span class="btn btn-primary btn-filled btn-xs"><a class="btn btn-primary btn-filled btn-xs" href="/">再来一句</a></span> <span class="btn btn-primary btn-filled btn-xs"><a class="btn btn-primary btn-filled btn-xs" href="/">再来一句</a></span>
</div> </div>
</div> </div>
<div class="row">
<div class="col text-center">
<span style="color:#fff;"><?php echo "id.", $id, " ver.", substr(shell_exec('git rev-parse HEAD'), 0, 10); ?></span>
</div>
</div>
</div> </div>
</div> </div>