/[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.4 by sysadm, Sun Oct 1 14:39:59 2006 UTC Revision 1.36 by sysadm, Sat Nov 15 01:54:28 2025 UTC
# Line 1  Line 1 
1  <?  <?php
2          include "./log.inc.php";          require_once "../lib/common.inc.php";
3  ?>          require_once "../lib/db_open.inc.php";
4  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">          require_once "../bbs/session_init.inc.php";
5  <?          require_once "../bbs/section_list.inc.php";
6          require_once ("./load_doc_list.inc.php");          require_once "../bbs/user_section_favor.inc.php";
7          $db_conn=include "./db_open.inc.php";          require_once "./load_doc_list.inc.php";
8  ?>  
9  <html>          $no_cache = (isset($_GET["cache"]) && $_GET["cache"] == "0");
10  <head>  
11  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">          $s_favor = new section_favorite($_SESSION["BBS_uid"], $db_conn);
12  <title>枫林在线</title>  
13  <link rel="stylesheet" href="css/default.css" type="text/css">          // Load section list
14  </head>          $section_hierachy = array();
15  <body>  
16  <center>          $ret = load_section_list($section_hierachy,
17  <?                  function (array $section, array $filter_param) : bool
18                    {
19                            return ($section["recommend"] &&
20                                    $_SESSION["BBS_priv"]->checkpriv($section["SID"], S_LIST) &&
21                                    ($_SESSION["BBS_uid"] > 0 ? $filter_param["s_favor"]->is_in($section["SID"]) : true));
22                    },
23                    function (array $section, array $filter_param) : mixed
24                    {
25                            return null;
26                    },
27                    $db_conn,
28                    array(
29                            "s_favor" => $s_favor,
30                    )
31            );
32    
33            if ($ret == false)
34            {
35                    $result_set["return"]["code"] = -2;
36                    $result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn);
37    
38                    mysqli_close($db_conn);
39                    exit(json_encode($result_set));
40            }
41    
42            echo <<<HTML
43            <html>
44            <head>
45            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
46            <title>{$BBS_name}</title>
47            <link rel="stylesheet" href="css/default.css" type="text/css">
48            </head>
49            <body>
50            <center>
51            HTML;
52    
53          include "./head.inc.php";          include "./head.inc.php";
54  ?>  
55  <table width="760" border="0" cellpadding="0" cellspacing="0">          echo <<<HTML
56          <tr height=20 bgcolor=#F3F9FC>          <table width="1050" border="0" cellpadding="0" cellspacing="0">
57                  <td width="20">&nbsp;</td>                  <tr height="25" bgcolor=#F3F9FC>
58                  <td>枫林在线 &gt;&gt; 首页</td>                          <td width="20">&nbsp;</td>
59                  <td width="20">&nbsp;</td>                          <td>{$BBS_name} &gt;&gt; 棣栭〉</td>
60          </tr>                          <td width="20">&nbsp;</td>
61          <tr>                  </tr>
62                  <td colspan=3 height=1 bgcolor=gray></td>                  <tr>
63          </tr>                          <td colspan=3 height=1 bgcolor=gray></td>
64          <tr height=5>                  </tr>
65                  <td>&nbsp;</td>                  <tr height=5>
66          </tr>                          <td>&nbsp;</td>
67  </table>                  </tr>
68  <table width="760" border="0" cellpadding="0" cellspacing="0">          </table>
69          <tr>          HTML;
70              <td width="25%" align="left" valign="top">  
71                          <table width="100%" border="0" cellpadding="0" cellspacing="0">          $cache_path = "../bbs/cache/www_doc_list_" . $_SESSION["BBS_uid"];
72                                  <tr>          $buffer = false;
73                                          <td></td>          if (!$no_cache && file_exists($cache_path))
74                                  </tr>          {
75                                  <tr>                  if (filemtime($cache_path) >= time() - 3600) // refresh interval = 1 hour
76                                          <td class="td3">                  {
77                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                          $buffer = file_get_contents($cache_path);
78                                                          <tr><td height=8></td></tr>                  }
79                                                          <tr><td height=18>·<a href="show_article.php?aid=328739" target="_blank">枫林在线网址变更公告</a></td></tr>          }
80                                                          <tr><td height=18>·<a href="show_article.php?aid=236535" target="_blank"><font color="red">本站开放源码查看服务</a></font></td></tr>          if ($buffer == false)
81                                                          <tr><td height=18>·<a href="show_article.php?aid=221947" target="_blank">系统密码验证机制调整</a></td></tr>          {
82                                                          <tr><td height=18>·<a href="show_article.php?aid=128430" target="_blank"><font color="red">枫林在线《精品导读》发布</font></a></td></tr>                  ob_start();
83                                                          <tr><td height=8></td></tr>  
84                                                  </table>                  echo <<<HTML
85                                          </td>                  <table width="1050" border="0" cellpadding="0" cellspacing="0">
                                 </tr>  
                                 <tr height="10">  
                                         <td></td>  
                                 </tr>  
                         </table>  
                 </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_2><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>&nbsp;  
                                         <a href="/gen_ex/" target="_blank">精华区</a>  
                                 </td></tr>  
                                 <tr class=title_list><td height=8></td></tr>  
                         </table>  
                         <table width="100%" border="0" cellpadding="0" cellspacing="0">  
                                 <tr class=title_bar_4><td><a class="guide" href="http://mail.fenglin.info"  target="_blank">E-mail</a></td></tr>  
                                 <tr class=title_list><td height=8></td></tr>  
                                 <tr class=title_list><td height=18 align="center">  
                                         POP3/SMTP <font color=red>mail.fenglin.info</font>  
                                 </td></tr>  
                                 <tr class=title_list><td height=8></td></tr>  
                         </table>  
                 </td>  
         </tr>  
         <tr height=5>  
                 <td>&nbsp;</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>&nbsp;<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="/bbs/bbs_old_ex.php" target="_blank">旧版论坛精华</a></td></tr>  
                         <tr class=title_list><td height=18>&nbsp;<a href="http://www.leafok.com/www/development/"><font color="#009999"><b>开发源码</b></font></a></td></tr>  
                         <tr class=title_list><td height=18>·<a href="http://www.leafok.com/www/development/bbsdev.jsp" target="_blank">LeafOK BBS</a></td></tr>  
                         <tr class=title_list><td height=18>·<a href="http://www.leafok.com/www/development/bbsviewer.jsp" target="_blank">论坛浏览器</a></td></tr>  
                         <tr class=title_list><td height=18>·<a href="http://www.leafok.com/www/development/innwebd.jsp" 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=85585" target=_blank>跨站转信使用说明</a></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>  
86                          <tr>                          <tr>
87                                  <td align="center" valign="top">                                  <td width="25%" align="left" valign="top">
88                                          <marquee direction="up" height="80" scrollamount="1" scrolldelay="100" onmouseover="stop()" onmouseout="start()" >                                          <table width="100%" border="0" cellpadding="0" cellspacing="0">
89                                          <center>                                                  <tr>
90                                          <a class="8" href="http://bbs.fudan.edu.cn/cgi-bin/bbs/bbstdoc?board=FDU_Medical" target="_blank">日月光华站医学院版</a><br>                                                          <td class="td3">
91                                          <a class="8" href="http://www.med8th.com" target="_blank">捌号楼医学论坛</a><br>                                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
92                                          <a class="8" href="http://www.dxy.cn/bbs" target="_blank">丁香园</a><br>                                                                          <tr><td height=10></td></tr>
93                                          <a class="8" href="http://www.oculist.net/cgi-bin/leoboard.cgi" target="_blank">协和医学论坛联盟</a><br>                                                                          <tr><td height=18>路<a href="../bbs/view_article.php?tn=portal&id=472079" target="_blank">璋冩暣鍚勭増鍧楄闂潈闄愮殑閫氱煡</a></td></tr>
94                                          <a class="8" href="http://www.etiandi.com" target="_blank">北中医论坛</a><br>                                                                          <tr><td height=18>路<a href="../bbs/view_article.php?tn=portal&id=472069" target="_blank">Telnet鐗堟湰鏂板閲嶈鍔熻兘</a></td></tr>
95                                          <a href="http://www.xikeda.com" target="_blank"><img src="/ad/images/xikeda/logo.gif" width="88" height="31" alt="西科人网站" border="0"></a><br>                                                                          <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                                          <a href="http://tongjibbs.com" target="_blank"><img src="/ad/images/tongjibbs/logo.gif" width="88" height="31" alt="同济人的天地,创造你的极限" border="0"></a><br>                                                                          <tr><td height=18>路<a href="../bbs/view_article.php?tn=portal&id=472035" target="_blank">鏈珯婧愮爜涓婁紶GitHub</a></td></tr>
97                                          <a class="8" href="http://www.nongchao.net" target="_blank">弄潮社区</a><br>                                                                          <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>
98                                          <a class="8" href="http://bbs.huashanren.com" target="_blank">华山论剑论坛</a><br>                                                                          <tr><td height=10></td></tr>
99                                          <a href="http://www.laparoscopy.cn" target="_blank"><img src="/ad/images/laparoscopy/logo.gif" width="88" height="31" alt="微创外科论坛" border="0"></a><br>                                                                  </table>
100                                          </center>                                                          </td>
101                                          </marquee>                                                  </tr>
102                                            </table>
103                                    </td>
104                                    <td width="50%" align="center" valign="top">
105                                            <table width="95%" border="0" cellspacing="0" cellpadding="0">
106                                                    <tr>
107                                                    <td class="alpha"><font color=brown><b><font size=3>鏈懆瀵艰</font></b></font></td>
108                                                    </tr>
109                                                    <tr><td bgcolor=gray height=1></td></tr>
110                    HTML;
111    
112                    load_top(10, 60, $db_conn);
113    
114                    echo <<<HTML
115                                                    <tr><td></td></tr>
116                                            </table>
117                                    </td>
118                                    <td width="25%" align="right" valign="top">
119                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
120                                                    <tr class=title_bar_4><td>杩涘叆璁哄潧</td></tr>
121                                                    <tr class=title_list><td height=8></td></tr>
122                                                    <tr class=title_list><td height=18 align="center">
123                                                            <a href="/bbs/main.php" target="_blank">璁ㄨ鍖</a>&nbsp;
124                                                            <a href="/gen_ex/" target="_blank">绮惧崕鍖</a>
125                                                    </td></tr>
126                                                    <tr class=title_list><td height=8></td></tr>
127                                            </table>
128                                  </td>                                  </td>
129                          </tr>                          </tr>
130                          <tr><td height=8></td></tr>                          <tr height="10">
131                                    <td>&nbsp;</td>
132                            </tr>
133                    </table>
134                    <table width="1050" border="0" cellspacing="0" cellpadding="5">
135                            <tr>
136                    HTML;
137    
138                    $column = 0;
139                    $column_limit = 3;
140                    $style_count = 4;
141    
142                    foreach ($section_hierachy as $c_index => $section_class)
143                    {
144                            foreach ($section_class["sections"] as $s_index => $section)
145                            {
146                                    if ($column % $column_limit == 0)
147                                    {
148                                            echo <<<HTML
149                                                    </tr>
150                                            </table>
151                                            <table width="1050" border="0" cellspacing="0" cellpadding="5">
152                                                    <tr>
153                                            HTML;
154                                    }
155    
156    
157                                    echo <<<HTML
158                                                    <td width="33%" align="center" valign="top">
159                                                            <table width="100%" border="0" cellspacing="0" cellpadding="1">
160                                    HTML;
161    
162                                    load_doc_list($section["sid"], 5, 40, $column % $style_count + 1, false, $db_conn);
163    
164                                    echo <<<HTML
165                                                            </table>
166                                                    </td>
167                                    HTML;
168    
169                                    $column++;
170                            }
171                    }
172    
173                    for (; $column % $column_limit != 0; $column++)
174                    {
175                            echo <<<HTML
176                                            <td width="33%" align="center" valign="top">
177                                            </td>
178                            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
191                            </tr>
192                  </table>                  </table>
193          </td>                  HTML;
194    </tr>  
195          <tr height=5>                  $buffer = ob_get_clean();
196                  <td>&nbsp;</td>  
197          </tr>                  file_put_contents($cache_path, $buffer);
198  </table>          }
199  <?  
200            echo $buffer;
201    
202            // Cleanup
203            unset($s_favor);
204            unset($section_hierachy);
205    
206            mysqli_close($db_conn);
207    
208          include "./foot.inc.php";          include "./foot.inc.php";
209  ?>  
210  <table width="760" border="0" cellspacing="0" cellpadding="1">          echo <<<HTML
211    <tr>          </center>
212          <td align="center" valign="top">          </body>
213          </td>          </html>
214    </tr>  
215  </table>          HTML;
 </center>  
 </body>  
 </html>  
 <?  
         mysql_close($db_conn);  
 ?>  


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

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