/[LeafOK_CVS]/fenglin/www/home.php
ViewVC logotype

Diff of /fenglin/www/home.php

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

Revision 1.30 by sysadm, Sun Apr 27 04:34:13 2025 UTC Revision 1.36 by sysadm, Sat Nov 15 01:54:28 2025 UTC
# Line 6  Line 6 
6          require_once "../bbs/user_section_favor.inc.php";          require_once "../bbs/user_section_favor.inc.php";
7          require_once "./load_doc_list.inc.php";          require_once "./load_doc_list.inc.php";
8    
9            $no_cache = (isset($_GET["cache"]) && $_GET["cache"] == "0");
10    
11          $s_favor = new section_favorite($_SESSION["BBS_uid"], $db_conn);          $s_favor = new section_favorite($_SESSION["BBS_uid"], $db_conn);
12    
13          // Load section list          // Load section list
# Line 14  Line 16 
16          $ret = load_section_list($section_hierachy,          $ret = load_section_list($section_hierachy,
17                  function (array $section, array $filter_param) : bool                  function (array $section, array $filter_param) : bool
18                  {                  {
19                          if ($_SESSION["BBS_uid"] > 0)                          return ($section["recommend"] &&
20                          {                                  $_SESSION["BBS_priv"]->checkpriv($section["SID"], S_LIST) &&
21                                  return ($section["recommend"] &&                                  ($_SESSION["BBS_uid"] > 0 ? $filter_param["s_favor"]->is_in($section["SID"]) : true));
                                         $_SESSION["BBS_priv"]->checkpriv($section["SID"], S_LIST) &&  
                                         $filter_param["s_favor"]->is_in($section["SID"]));  
                         }  
   
                         return $section["recommend"];  
22                  },                  },
23                  function (array $section, array $filter_param) : mixed                  function (array $section, array $filter_param) : mixed
24                  {                  {
# Line 59  Line 56 
56          <table width="1050" border="0" cellpadding="0" cellspacing="0">          <table width="1050" border="0" cellpadding="0" cellspacing="0">
57                  <tr height="25" bgcolor=#F3F9FC>                  <tr height="25" bgcolor=#F3F9FC>
58                          <td width="20">&nbsp;</td>                          <td width="20">&nbsp;</td>
59                          <td><?= $BBS_name; ?> &gt;&gt; 首页</td>                          <td>{$BBS_name} &gt;&gt; 首页</td>
60                          <td width="20">&nbsp;</td>                          <td width="20">&nbsp;</td>
61                  </tr>                  </tr>
62                  <tr>                  <tr>
# Line 73  Line 70 
70    
71          $cache_path = "../bbs/cache/www_doc_list_" . $_SESSION["BBS_uid"];          $cache_path = "../bbs/cache/www_doc_list_" . $_SESSION["BBS_uid"];
72          $buffer = false;          $buffer = false;
73          if (file_exists($cache_path))          if (!$no_cache && file_exists($cache_path))
74          {          {
75                  if (filemtime($cache_path) >= time() - 3600) // refresh interval = 1 hour                  if (filemtime($cache_path) >= time() - 3600) // refresh interval = 1 hour
76                  {                  {
# Line 93  Line 90 
90                                                          <td class="td3">                                                          <td class="td3">
91                                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
92                                                                          <tr><td height=10></td></tr>                                                                          <tr><td height=10></td></tr>
93                                                                            <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472079" target="_blank">调整各版块访问权限的通知</a></td></tr>
94                                                                            <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472069" target="_blank">Telnet版本新增重要功能</a></td></tr>
95                                                                            <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472059" target="_blank"><font color="red">时隔二十载,Telnet版终发布</font></a></td></tr>
96                                                                          <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472035" target="_blank">本站源码上传GitHub</a></td></tr>                                                                          <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472035" target="_blank">本站源码上传GitHub</a></td></tr>
97                                                                          <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472032" target="_blank"><font color="red">重要系统升级提示【2025-04-14】</font></a></td></tr>                                                                          <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472032" target="_blank"><font color="red">重要系统升级提示【2025-04-14】</font></a></td></tr>
                                                                         <tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=471914" target="_blank">中文编码及重要功能调整</a></td></tr>  
98                                                                          <tr><td height=10></td></tr>                                                                          <tr><td height=10></td></tr>
99                                                                  </table>                                                                  </table>
100                                                          </td>                                                          </td>
# Line 179  Line 178 
178                          HTML;                          HTML;
179                  }                  }
180    
181                    if (count($section_hierachy) == 0)
182                    {
183                            echo <<<HTML
184                                            <td width="100%" align="center" valign="top">
185                                                    没有收藏的版块,<a href="/bbs/user_section_favor.php" target=_blank>点击这里设定</a>
186                                            </td>
187                            HTML;
188                    }
189    
190                  echo <<<HTML                  echo <<<HTML
191                          </tr>                          </tr>
192                  </table>                  </table>
# Line 205  Line 213 
213          </html>          </html>
214    
215          HTML;          HTML;
 ?>  


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

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