/[LeafOK_CVS]/lbbs/utils/bin/gen_top.php
ViewVC logotype

Diff of /lbbs/utils/bin/gen_top.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 by sysadm, Sat May 3 14:59:50 2025 UTC Revision 1.13 by sysadm, Sat Oct 4 15:55:07 2025 UTC
# Line 13  Line 13 
13          $cache_path = "../../var/bbs_top.txt";          $cache_path = "../../var/bbs_top.txt";
14    
15          $buffer =          $buffer =
16                  "               \033[1;34m-----\033[37m=====\033[41;37m 本站十大热门话题 \033[40m=====\033[34m-----\033[m\r\n\r\n";                  "               \033[1;34m-----\033[37m=====\033[41;37m 鏈珯鍗佸ぇ鐑棬璇濋 \033[40m=====\033[34m-----\033[m\r\n\r\n";
17    
18          $sql = "SELECT AID, bbs.title AS title, sname, username, sub_dt          $sql = "SELECT AID, bbs.title AS title, sname,
19                            section_config.title AS s_title, username, sub_dt
20                          FROM bbs INNER JOIN section_config ON bbs.SID = section_config.SID                          FROM bbs INNER JOIN section_config ON bbs.SID = section_config.SID
21                          WHERE section_config.recommend AND TID = 0 AND visible AND view_count >= 10                          WHERE section_config.recommend AND TID = 0 AND visible AND view_count >= 10
22                          AND (sub_dt >= SUBDATE(NOW(), INTERVAL 7 DAY))                          AND (sub_dt >= SUBDATE(NOW(), INTERVAL 7 DAY))
# Line 35  Line 36 
36                  $title_f = split_line($row["title"], "", 60, 1, "");                  $title_f = split_line($row["title"], "", 60, 1, "");
37    
38                  $buffer .= sprintf (                  $buffer .= sprintf (
39                          " \033[1;37m第 \033[31m%2d \033[37m名 版块 : \033[33m%s%s \033[37m【 \033[32m%s \033[37m】   \033[35m%s%s \n" .                          " \033[1;37m绗 \033[31m%2d \033[37m鍚 鐗堝潡 : \033[33m%s [%s]%s \033[37m銆 \033[32m%s \033[37m銆慭033[35m%s%s \n" .
40                          " \033[37m         标题 : \033[44;37m%s%s \033[0;40;37m\n",                          " \033[37m         鏍囬 : \033[44;37m%s%s  \033[0;40;37m\n",
41                          $i++,                          $i++,
42                            $row["s_title"],
43                          $row["sname"],                          $row["sname"],
44                          str_repeat(" ", 20 - strlen($row["sname"])),                          str_repeat(" ", 20 - str_length($row["s_title"]) - strlen($row["sname"])),
45                          (new DateTimeImmutable($row["sub_dt"]))->format("M d H:i:s"),                          (new DateTimeImmutable($row["sub_dt"]))->format("M d H:i:s"),
46                          str_repeat(" ", 16 - strlen($row["username"])),                          str_repeat(" ", 16 - strlen($row["username"])),
47                          $row["username"],                          $row["username"],


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1