| 1 |
<? |
<?php |
| 2 |
require_once ("./load_doc_list.inc.php"); |
require_once "../lib/common.inc.php"; |
| 3 |
|
require_once "../lib/db_open.inc.php"; |
| 4 |
|
require_once "../bbs/session_init.inc.php"; |
| 5 |
|
require_once "../bbs/section_list.inc.php"; |
| 6 |
|
require_once "../bbs/user_section_favor.inc.php"; |
| 7 |
|
require_once "./load_doc_list.inc.php"; |
| 8 |
|
|
| 9 |
|
$s_favor = new section_favorite($_SESSION["BBS_uid"], $db_conn); |
| 10 |
|
|
| 11 |
|
// Load section list |
| 12 |
|
$section_hierachy = array(); |
| 13 |
|
|
| 14 |
|
$ret = load_section_list($section_hierachy, |
| 15 |
|
function (array $section, array $filter_param) : bool |
| 16 |
|
{ |
| 17 |
|
return ($section["recommend"] && |
| 18 |
|
$_SESSION["BBS_priv"]->checkpriv($section["SID"], S_LIST) && |
| 19 |
|
($_SESSION["BBS_uid"] > 0 ? $filter_param["s_favor"]->is_in($section["SID"]) : true)); |
| 20 |
|
}, |
| 21 |
|
function (array $section, array $filter_param) : mixed |
| 22 |
|
{ |
| 23 |
|
return null; |
| 24 |
|
}, |
| 25 |
|
$db_conn, |
| 26 |
|
array( |
| 27 |
|
"s_favor" => $s_favor, |
| 28 |
|
) |
| 29 |
|
); |
| 30 |
|
|
| 31 |
|
if ($ret == false) |
| 32 |
|
{ |
| 33 |
|
$result_set["return"]["code"] = -2; |
| 34 |
|
$result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn); |
| 35 |
|
|
| 36 |
|
mysqli_close($db_conn); |
| 37 |
|
exit(json_encode($result_set)); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
echo <<<HTML |
| 41 |
|
<html> |
| 42 |
|
<head> |
| 43 |
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 44 |
|
<title>{$BBS_name}</title> |
| 45 |
|
<link rel="stylesheet" href="css/default.css" type="text/css"> |
| 46 |
|
</head> |
| 47 |
|
<body> |
| 48 |
|
<center> |
| 49 |
|
HTML; |
| 50 |
|
|
|
$db_conn=include "./db_open.inc.php"; |
|
|
?> |
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
|
|
<html> |
|
|
<head> |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
|
<title>枫林在线</title> |
|
|
<link rel="stylesheet" href="css/default.css" type="text/css"> |
|
|
</head> |
|
|
<body> |
|
|
<center> |
|
|
<? |
|
| 51 |
include "./head.inc.php"; |
include "./head.inc.php"; |
| 52 |
?> |
|
| 53 |
<table width="760" border="0" cellpadding="0" cellspacing="0"> |
echo <<<HTML |
| 54 |
<tr height=20 bgcolor=#F3F9FC> |
<table width="1050" border="0" cellpadding="0" cellspacing="0"> |
| 55 |
<td width="20"> </td> |
<tr height="25" bgcolor=#F3F9FC> |
| 56 |
<td>枫林在线 >> 首页</td> |
<td width="20"> </td> |
| 57 |
<td width="20"> </td> |
<td>{$BBS_name} >> 首页</td> |
| 58 |
</tr> |
<td width="20"> </td> |
| 59 |
<tr> |
</tr> |
| 60 |
<td colspan=3 height=1 bgcolor=gray></td> |
<tr> |
| 61 |
</tr> |
<td colspan=3 height=1 bgcolor=gray></td> |
| 62 |
<tr height=5> |
</tr> |
| 63 |
<td> </td> |
<tr height=5> |
| 64 |
</tr> |
<td> </td> |
| 65 |
</table> |
</tr> |
| 66 |
<table width="760" border="0" cellpadding="0" cellspacing="0"> |
</table> |
| 67 |
<tr> |
HTML; |
| 68 |
<td width="25%" align="left" valign="top"> |
|
| 69 |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
$cache_path = "../bbs/cache/www_doc_list_" . $_SESSION["BBS_uid"]; |
| 70 |
<tr> |
$buffer = false; |
| 71 |
<td class="td3"> |
if (file_exists($cache_path)) |
| 72 |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
{ |
| 73 |
<tr><td height=10></td></tr> |
if (filemtime($cache_path) >= time() - 3600) // refresh interval = 1 hour |
| 74 |
<tr><td height=18>·<a href="show_article.php?aid=471914" target="_blank">中文编码及重要功能调整</a></td></tr> |
{ |
| 75 |
<tr><td height=18>·<a href="show_article.php?aid=328739" target="_blank">枫林在线网址变更公告</a></td></tr> |
$buffer = file_get_contents($cache_path); |
| 76 |
<tr><td height=18>·<a href="show_article.php?aid=236535" target="_blank"><font color="red">本站开放源码查看服务</a></font></td></tr> |
} |
| 77 |
<tr><td height=18>·<a href="show_article.php?aid=221947" target="_blank">系统密码验证机制调整</a></td></tr> |
} |
| 78 |
<tr><td height=18>·<a href="show_article.php?aid=128430" target="_blank"><font color="red">枫林在线《精品导读》发布</font></a></td></tr> |
if ($buffer == false) |
| 79 |
<tr><td height=10></td></tr> |
{ |
| 80 |
</table> |
ob_start(); |
| 81 |
</td> |
|
| 82 |
</tr> |
echo <<<HTML |
| 83 |
</table> |
<table width="1050" border="0" cellpadding="0" cellspacing="0"> |
|
</td> |
|
|
<td width="50%" align="center" valign="top"> |
|
|
<table width="95%" border="0" cellspacing="0" cellpadding="0"> |
|
|
<tr> |
|
|
<td class="alpha"><font color=brown><b><font size=3>本周导读</font></b></font></td> |
|
|
</tr> |
|
|
<tr><td bgcolor=gray height=1></td></tr> |
|
|
<? load_top(10,50,$db_conn); ?> |
|
|
<tr><td align="right"><a href="doc_list.php"><img src="images/more.gif" width="32" height="12" border=0></a></td></tr> |
|
|
</table> |
|
|
</td> |
|
|
<td width="25%" align="right" valign="top"> |
|
|
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
|
|
<tr class=title_bar_4><td><a class="guide" href="/bbs" target="_blank">BBS</a></td></tr> |
|
|
<tr class=title_list><td height=8></td></tr> |
|
|
<tr class=title_list><td height=18 align="center"> |
|
|
<a href="/bbs/main.php" target="_blank">讨论区</a> |
|
|
<a href="/gen_ex/" target="_blank">精华区</a> |
|
|
</td></tr> |
|
|
<tr class=title_list><td height=8></td></tr> |
|
|
</table> |
|
|
</td> |
|
|
</tr> |
|
|
<tr height=5> |
|
|
<td> </td> |
|
|
</tr> |
|
|
</table> |
|
|
<table width="760" border="0" cellspacing="0" cellpadding="0"> |
|
|
<tr> |
|
|
<td width="40%" align="left" valign="top"> |
|
|
<table width="96%" border="0" cellspacing="0" cellpadding="0"> |
|
|
<tr class=title_bar_1><td>特别推荐</a></td></tr> |
|
|
<? load_recommend(10,40,$db_conn); ?> |
|
|
</table> |
|
|
</td> |
|
|
<td width="40%" align="left" valign="top"> |
|
|
<table width="96%" border="0" cellspacing="0" cellpadding="0"> |
|
|
<tr class=title_bar_2><td>下载园地</td></tr> |
|
|
<tr class=title_list><td height=8></td></tr> |
|
|
<tr class=title_list><td height=18> <a href="excerption.php"><font color="#009999"><b>精品荟萃</b></font></a></td></tr> |
|
|
<tr class=title_list><td height=18>·<a href="excerption.php" >论坛浏览器</a></td></tr> |
|
|
<tr class=title_list><td height=18>·<a href="/bbs/bbs_ex_dl.php?sid=100" target="_blank">论坛精华区下载chm版</a></td></tr> |
|
|
<tr class=title_list><td height=18>·<a href="/bbs/bbs_ex_dl.php?sid=2002" target="_blank">论坛精华录2002年PDF版</a></td></tr> |
|
|
<tr class=title_list><td height=18> <a href="https://www.leafok.com/dev"><font color="#009999"><b>开发源码</b></font></a></td></tr> |
|
|
<tr class=title_list><td height=18>·<a href="https://www.leafok.com/dev/bbsdev.php" target="_blank">LeafOK BBS</a></td></tr> |
|
|
<tr class=title_list><td height=18>·<a href="https://www.leafok.com/dev/bbsviewer.php" target="_blank">论坛浏览器</a></td></tr> |
|
|
<tr class=title_list><td height=18>·<a href="https://www.leafok.com/dev/innwebd.php" target="_blank">LeafOK Innd</a></td></tr> |
|
|
<tr class=title_list><td height=18></td></tr> |
|
|
<tr class=title_list><td height=8></td></tr> |
|
|
</table> |
|
|
</td> |
|
|
<td width="20%" align="right" valign="top" class="td2"> |
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
|
|
<tr class=title_bar_3><td>F A Q</td></tr> |
|
|
<tr><td height=8></td></tr> |
|
|
<tr><td height=18>·<a href="show_article.php?aid=68658" target=_blank>新手上路</a></td></tr> |
|
|
<tr><td height=18>·<a href="show_article.php?aid=38394" target=_blank>关于积分的问题一览</a></td></tr> |
|
|
<tr><td height=18>·<a href="/bbs_help/bbs_faq.chm" target=_blank>论坛常见问题解答</a></td></tr> |
|
|
<tr><td height=8></td></tr> |
|
|
</table> |
|
|
<table cellSpacing="0" cellPadding="0" width="100%"> |
|
|
<tr class="title_bar_3"> |
|
|
<td>友情链接</td> |
|
|
</tr> |
|
|
<tr><td height=8></td></tr> |
|
| 84 |
<tr> |
<tr> |
| 85 |
<td align="center" valign="top"> |
<td width="25%" align="left" valign="top"> |
| 86 |
<marquee direction="up" height="80" scrollamount="1" scrolldelay="100" onmouseover="stop()" onmouseout="start()" > |
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
| 87 |
<center> |
<tr> |
| 88 |
<a class="8" href="https://www.leafok.com" target="_blank">LeafOK</a><br> |
<td class="td3"> |
| 89 |
</center> |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| 90 |
</marquee> |
<tr><td height=10></td></tr> |
| 91 |
|
<tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472079" target="_blank">调整各版块访问权限的通知</a></td></tr> |
| 92 |
|
<tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472069" target="_blank">Telnet版本新增重要功能</a></td></tr> |
| 93 |
|
<tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472059" target="_blank"><font color="red">时隔二十载,Telnet版终发布</font></a></td></tr> |
| 94 |
|
<tr><td height=18>·<a href="../bbs/view_article.php?tn=portal&id=472035" target="_blank">本站源码上传GitHub</a></td></tr> |
| 95 |
|
<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> |
| 96 |
|
<tr><td height=10></td></tr> |
| 97 |
|
</table> |
| 98 |
|
</td> |
| 99 |
|
</tr> |
| 100 |
|
</table> |
| 101 |
|
</td> |
| 102 |
|
<td width="50%" align="center" valign="top"> |
| 103 |
|
<table width="95%" border="0" cellspacing="0" cellpadding="0"> |
| 104 |
|
<tr> |
| 105 |
|
<td class="alpha"><font color=brown><b><font size=3>本周导读</font></b></font></td> |
| 106 |
|
</tr> |
| 107 |
|
<tr><td bgcolor=gray height=1></td></tr> |
| 108 |
|
HTML; |
| 109 |
|
|
| 110 |
|
load_top(10, 60, $db_conn); |
| 111 |
|
|
| 112 |
|
echo <<<HTML |
| 113 |
|
<tr><td></td></tr> |
| 114 |
|
</table> |
| 115 |
|
</td> |
| 116 |
|
<td width="25%" align="right" valign="top"> |
| 117 |
|
<table width="100%" border="0" cellpadding="0" cellspacing="0"> |
| 118 |
|
<tr class=title_bar_4><td>进入论坛</td></tr> |
| 119 |
|
<tr class=title_list><td height=8></td></tr> |
| 120 |
|
<tr class=title_list><td height=18 align="center"> |
| 121 |
|
<a href="/bbs/main.php" target="_blank">讨论区</a> |
| 122 |
|
<a href="/gen_ex/" target="_blank">精华区</a> |
| 123 |
|
</td></tr> |
| 124 |
|
<tr class=title_list><td height=8></td></tr> |
| 125 |
|
</table> |
| 126 |
</td> |
</td> |
| 127 |
</tr> |
</tr> |
| 128 |
<tr><td height=8></td></tr> |
<tr height="10"> |
| 129 |
|
<td> </td> |
| 130 |
|
</tr> |
| 131 |
|
</table> |
| 132 |
|
<table width="1050" border="0" cellspacing="0" cellpadding="5"> |
| 133 |
|
<tr> |
| 134 |
|
HTML; |
| 135 |
|
|
| 136 |
|
$column = 0; |
| 137 |
|
$column_limit = 3; |
| 138 |
|
$style_count = 4; |
| 139 |
|
|
| 140 |
|
foreach ($section_hierachy as $c_index => $section_class) |
| 141 |
|
{ |
| 142 |
|
foreach ($section_class["sections"] as $s_index => $section) |
| 143 |
|
{ |
| 144 |
|
if ($column % $column_limit == 0) |
| 145 |
|
{ |
| 146 |
|
echo <<<HTML |
| 147 |
|
</tr> |
| 148 |
|
</table> |
| 149 |
|
<table width="1050" border="0" cellspacing="0" cellpadding="5"> |
| 150 |
|
<tr> |
| 151 |
|
HTML; |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
|
| 155 |
|
echo <<<HTML |
| 156 |
|
<td width="33%" align="center" valign="top"> |
| 157 |
|
<table width="100%" border="0" cellspacing="0" cellpadding="1"> |
| 158 |
|
HTML; |
| 159 |
|
|
| 160 |
|
load_doc_list($section["sid"], 5, 40, $column % $style_count + 1, false, $db_conn); |
| 161 |
|
|
| 162 |
|
echo <<<HTML |
| 163 |
|
</table> |
| 164 |
|
</td> |
| 165 |
|
HTML; |
| 166 |
|
|
| 167 |
|
$column++; |
| 168 |
|
} |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
for (; $column % $column_limit != 0; $column++) |
| 172 |
|
{ |
| 173 |
|
echo <<<HTML |
| 174 |
|
<td width="33%" align="center" valign="top"> |
| 175 |
|
</td> |
| 176 |
|
HTML; |
| 177 |
|
} |
| 178 |
|
|
| 179 |
|
echo <<<HTML |
| 180 |
|
</tr> |
| 181 |
</table> |
</table> |
| 182 |
</td> |
HTML; |
| 183 |
</tr> |
|
| 184 |
<tr height=5> |
$buffer = ob_get_clean(); |
| 185 |
<td> </td> |
|
| 186 |
</tr> |
file_put_contents($cache_path, $buffer); |
| 187 |
</table> |
} |
| 188 |
<? |
|
| 189 |
|
echo $buffer; |
| 190 |
|
|
| 191 |
|
// Cleanup |
| 192 |
|
unset($s_favor); |
| 193 |
|
unset($section_hierachy); |
| 194 |
|
|
| 195 |
|
mysqli_close($db_conn); |
| 196 |
|
|
| 197 |
include "./foot.inc.php"; |
include "./foot.inc.php"; |
| 198 |
?> |
|
| 199 |
<table width="760" border="0" cellspacing="0" cellpadding="1"> |
echo <<<HTML |
| 200 |
<tr> |
</center> |
| 201 |
<td align="center" valign="top"> |
</body> |
| 202 |
</td> |
</html> |
| 203 |
</tr> |
|
| 204 |
</table> |
HTML; |
|
</center> |
|
|
</body> |
|
|
</html> |
|
|
<? |
|
|
mysql_close($db_conn); |
|
|
?> |
|