mirror of
https://github.com/LyLme/lylme_spage.git
synced 2024-11-17 14:34:08 +08:00
修复 随机一言无法禁用
This commit is contained in:
parent
bf8a4c4f23
commit
1807e424e9
@ -112,8 +112,8 @@ if(empty($sousw)||empty($soun)) {
|
||||
</div>
|
||||
<div class="foot">
|
||||
<?php
|
||||
if ($conf['yan']) {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
if ($conf['yan'] == 'true') {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
}
|
||||
$i= 0;
|
||||
$tagslists = $DB->query("SELECT * FROM `lylme_tags`");
|
||||
|
@ -146,8 +146,8 @@ while ($soulist = $DB->fetch($soulists)) {
|
||||
<div class="site-main">
|
||||
<?php
|
||||
|
||||
if ($conf['yan']) {
|
||||
echo '<p class="content">[' . yan().']</p>';
|
||||
if ($conf['yan'] == 'true') {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,9 +87,9 @@ if ($conf['tq'] != 'false') {
|
||||
<div class="container" style="margin-top:10vh; position: relative; z-index: 100;">
|
||||
<?php
|
||||
echo $conf['home-title'];
|
||||
if ($conf['yan']) {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
}
|
||||
if ($conf['yan'] == 'true') {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
}
|
||||
?>
|
||||
<!--搜索开始-->
|
||||
<div id="search" class="s-search">
|
||||
|
@ -59,17 +59,8 @@ echo '<div id="he-plugin-simple"></div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
if ($conf['yan'] != 'false') {
|
||||
$filename = './assets/data/data.dat'; //随机一言文件路径
|
||||
if (file_exists($filename)) {
|
||||
$data = explode(PHP_EOL, file_get_contents($filename));
|
||||
$result = str_replace(array(
|
||||
"\r",
|
||||
"\n",
|
||||
"\r\n"
|
||||
) , '', $data[array_rand($data) ]);
|
||||
echo '<p class="content">' . $result;
|
||||
}
|
||||
if ($conf['yan'] == 'true') {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
@ -96,8 +96,8 @@ echo '<div id="he-plugin-simple"></div>
|
||||
</div>
|
||||
<?php
|
||||
//调用随机一言
|
||||
if ($conf['yan']) {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
if ($conf['yan'] == 'true') {
|
||||
echo '<p class="content">' . yan().'</p>';
|
||||
}
|
||||
?>
|
||||
<!--搜索开始-->
|
||||
|
Loading…
Reference in New Issue
Block a user