/[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.1 by sysadm, Fri Sep 9 13:35:20 2005 UTC Revision 1.30 by sysadm, Sun Apr 27 04:34:13 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>          $s_favor = new section_favorite($_SESSION["BBS_uid"], $db_conn);
10  <head>  
11  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">          // Load section list
12  <title>枫林在线</title>          $section_hierachy = array();
13  <link rel="stylesheet" href="css/default.css" type="text/css">  
14  </head>          $ret = load_section_list($section_hierachy,
15  <body>                  function (array $section, array $filter_param) : bool
16  <center>                  {
17  <?                          if ($_SESSION["BBS_uid"] > 0)
18                            {
19                                    return ($section["recommend"] &&
20                                            $_SESSION["BBS_priv"]->checkpriv($section["SID"], S_LIST) &&
21                                            $filter_param["s_favor"]->is_in($section["SID"]));
22                            }
23    
24                            return $section["recommend"];
25                    },
26                    function (array $section, array $filter_param) : mixed
27                    {
28                            return null;
29                    },
30                    $db_conn,
31                    array(
32                            "s_favor" => $s_favor,
33                    )
34            );
35    
36            if ($ret == false)
37            {
38                    $result_set["return"]["code"] = -2;
39                    $result_set["return"]["message"] = "Query section error: " . mysqli_error($db_conn);
40    
41                    mysqli_close($db_conn);
42                    exit(json_encode($result_set));
43            }
44    
45            echo <<<HTML
46            <html>
47            <head>
48            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
49            <title>{$BBS_name}</title>
50            <link rel="stylesheet" href="css/default.css" type="text/css">
51            </head>
52            <body>
53            <center>
54            HTML;
55    
56          include "./head.inc.php";          include "./head.inc.php";
57  ?>  
58  <table width="760" border="0" cellpadding="0" cellspacing="0">          echo <<<HTML
59          <tr height=20 bgcolor=#F3F9FC>          <table width="1050" border="0" cellpadding="0" cellspacing="0">
60                  <td width="20">&nbsp;</td>                  <tr height="25" bgcolor=#F3F9FC>
61                  <td>枫林在线 &gt;&gt; 首页</td>                          <td width="20">&nbsp;</td>
62                  <td width="20">&nbsp;</td>                          <td><?= $BBS_name; ?> &gt;&gt; 棣栭〉</td>
63          </tr>                          <td width="20">&nbsp;</td>
64          <tr>                  </tr>
65                  <td colspan=3 height=1 bgcolor=gray></td>                  <tr>
66          </tr>                          <td colspan=3 height=1 bgcolor=gray></td>
67          <tr height=5>                  </tr>
68                  <td>&nbsp;</td>                  <tr height=5>
69          </tr>                          <td>&nbsp;</td>
70  </table>                  </tr>
71  <table width="760" border="0" cellpadding="0" cellspacing="0">          </table>
72          <tr>          HTML;
73              <td width="25%" align="left" valign="top">  
74                          <table width="100%" border="0" cellpadding="0" cellspacing="0">          $cache_path = "../bbs/cache/www_doc_list_" . $_SESSION["BBS_uid"];
75                                  <tr>          $buffer = false;
76                                          <td></td>          if (file_exists($cache_path))
77                                  </tr>          {
78                                  <tr>                  if (filemtime($cache_path) >= time() - 3600) // refresh interval = 1 hour
79                                          <td class="td3">                  {
80                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                          $buffer = file_get_contents($cache_path);
81                                                          <tr><td height=8></td></tr>                  }
82                                                          <tr><td height=18>·<a href="show_article.php?aid=328739" target="_blank">枫林在线网址变更公告</a></td></tr>          }
83                                                          <tr><td height=18>·<a href="/bbs/bbs.php?sid=55" target="_blank"><font color="red">枫林在线站务增补开始啦</font></a></td></tr>          if ($buffer == false)
84                                                          <tr><td height=18>·<a href="show_article.php?aid=236535" target="_blank"><font color="red">本站开放源码查看服务</a></font></td></tr>          {
85                                                          <tr><td height=18>·<a href="show_article.php?aid=221947" target="_blank">系统密码验证机制调整</a></td></tr>                  ob_start();
86                                                          <tr><td height=18>·<a href="show_article.php?aid=205415" target="_blank">本站CVS服务器开放</a></td></tr>  
87                                                          <tr><td height=18>·<a href="show_article.php?aid=155713" target="_blank">本站推出RSS客户端浏览功能</a></td></tr>                  echo <<<HTML
88                                                          <tr><td height=18>·<a href="show_article.php?aid=128430" target="_blank"><font color="red">枫林在线《精品导读》发布</font></a></td></tr>                  <table width="1050" border="0" cellpadding="0" cellspacing="0">
                                                         <tr><td height=18>·<a href="show_article.php?aid=119637" target="_blank">本站启用新网址</a></td></tr>  
                                                         <tr><td height=8></td></tr>  
                                                 </table>  
                                         </td>  
                                 </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" class="td2">  
                         <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><td height=8></td></tr>  
                                 <tr><td height=18 align="center">  
                                         <a href="/bbs/main.php" target="_blank">讨论区</a>&nbsp;  
                                         <a href="/gen_ex/" target="_blank">精华区</a>  
                                 </td></tr>  
                                 <tr><td height=8></td></tr>  
                         </table>  
                         <table width="100%" border="0" cellpadding="0" cellspacing="0">  
                                 <tr class=title_bar_1><td><a class="guide" href="dns.php">域名服务</a></td></tr>  
                                 <tr><td height=8></td></tr>  
                                 <tr><td height=18 align="center">  
                                         <a href="dns.php?type=apply">立即申请</a> <font color=red>Free!</font>  
                                 </td></tr>  
                                 <tr><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><td height=8></td></tr>  
                                 <tr><td>  
                                         <form name="logon" method="post" action="http://mail.fenglin.info/mail/login.php?Cmd=login" target="_blank">  
                                                 帐号:<input name=name size=9>@fenglin.info<br>  
                                                 <input type="hidden" name="domain" value="fenglin.info">  
                                                 密码:<input name=passwd size=9 type=password>  
                                                 <input type="hidden" name="Lang" value="">  
                                                 <input type="submit" value="登陆">  
                                         </form>  
                                 </td></tr>  
                                 <tr><td align="center">  
                                         POP3/SMTP <font color=red>mail.fenglin.info</font>  
                                 </td></tr>  
                                 <tr><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="develop.php"><font color="#009999"><b>开发源码</b></font></a></td></tr>  
                         <tr class=title_list><td height=18>·<a href="develop.php?type=bbsdev" target="_blank">LeafOK BBS</a></td></tr>  
                         <tr class=title_list><td height=18>·<a href="develop.php?type=bbsviewer" target="_blank">论坛浏览器</a></td></tr>  
                         <tr class=title_list><td height=18>·<a href="develop.php?type=innwebd" 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>  
89                          <tr>                          <tr>
90                                  <td align="center" valign="top">                                  <td width="25%" align="left" valign="top">
91                                          <marquee direction="up" height="80" scrollamount="1" scrolldelay="100" onmouseover="stop()" onmouseout="start()" >                                          <table width="100%" border="0" cellpadding="0" cellspacing="0">
92                                          <center>                                                  <tr>
93                                          <a class="8" href="http://bbs.fudan.edu.cn/cgi-bin/bbs/bbstdoc?board=FDU_Medical" target="_blank">日月光华站医学院版</a><br>                                                          <td class="td3">
94                                          <a class="8" href="http://www.med8th.com" target="_blank">捌号楼医学论坛</a><br>                                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
95                                          <a class="8" href="http://www.dxy.cn/bbs" target="_blank">丁香园</a><br>                                                                          <tr><td height=10></td></tr>
96                                          <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=472035" target="_blank">鏈珯婧愮爜涓婁紶GitHub</a></td></tr>
97                                          <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=472032" target="_blank"><font color="red">閲嶈绯荤粺鍗囩骇鎻愮ず銆2025-04-14銆</font></a></td></tr>
98                                          <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=471914" target="_blank">涓枃缂栫爜鍙婇噸瑕佸姛鑳借皟鏁</a></td></tr>
99                                          <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=10></td></tr>
100                                          <a class="8" href="http://www.nongchao.net" target="_blank">弄潮社区</a><br>                                                                  </table>
101                                          <a class="8" href="http://bbs.huashanren.com" target="_blank">华山论剑论坛</a><br>                                                          </td>
102                                          <a href="http://www.laparoscopy.cn" target="_blank"><img src="/ad/images/laparoscopy/logo.gif" width="88" height="31" alt="微创外科论坛" border="0"></a><br>                                                  </tr>
103                                          </center>                                          </table>
                                         </marquee>  
104                                  </td>                                  </td>
105                                    <td width="50%" align="center" valign="top">
106                                            <table width="95%" border="0" cellspacing="0" cellpadding="0">
107                                                    <tr>
108                                                    <td class="alpha"><font color=brown><b><font size=3>鏈懆瀵艰</font></b></font></td>
109                                                    </tr>
110                                                    <tr><td bgcolor=gray height=1></td></tr>
111                    HTML;
112    
113                    load_top(10, 60, $db_conn);
114    
115                    echo <<<HTML
116                                                    <tr><td></td></tr>
117                                            </table>
118                                    </td>
119                                    <td width="25%" align="right" valign="top">
120                                            <table width="100%" border="0" cellpadding="0" cellspacing="0">
121                                                    <tr class=title_bar_4><td>杩涘叆璁哄潧</td></tr>
122                                                    <tr class=title_list><td height=8></td></tr>
123                                                    <tr class=title_list><td height=18 align="center">
124                                                            <a href="/bbs/main.php" target="_blank">璁ㄨ鍖</a>&nbsp;
125                                                            <a href="/gen_ex/" target="_blank">绮惧崕鍖</a>
126                                                    </td></tr>
127                                                    <tr class=title_list><td height=8></td></tr>
128                                            </table>
129                                    </td>
130                            </tr>
131                            <tr height="10">
132                                    <td>&nbsp;</td>
133                            </tr>
134                    </table>
135                    <table width="1050" border="0" cellspacing="0" cellpadding="5">
136                            <tr>
137                    HTML;
138    
139                    $column = 0;
140                    $column_limit = 3;
141                    $style_count = 4;
142    
143                    foreach ($section_hierachy as $c_index => $section_class)
144                    {
145                            foreach ($section_class["sections"] as $s_index => $section)
146                            {
147                                    if ($column % $column_limit == 0)
148                                    {
149                                            echo <<<HTML
150                                                    </tr>
151                                            </table>
152                                            <table width="1050" border="0" cellspacing="0" cellpadding="5">
153                                                    <tr>
154                                            HTML;
155                                    }
156    
157    
158                                    echo <<<HTML
159                                                    <td width="33%" align="center" valign="top">
160                                                            <table width="100%" border="0" cellspacing="0" cellpadding="1">
161                                    HTML;
162    
163                                    load_doc_list($section["sid"], 5, 40, $column % $style_count + 1, false, $db_conn);
164    
165                                    echo <<<HTML
166                                                            </table>
167                                                    </td>
168                                    HTML;
169    
170                                    $column++;
171                            }
172                    }
173    
174                    for (; $column % $column_limit != 0; $column++)
175                    {
176                            echo <<<HTML
177                                            <td width="33%" align="center" valign="top">
178                                            </td>
179                            HTML;
180                    }
181    
182                    echo <<<HTML
183                          </tr>                          </tr>
                         <tr><td height=8></td></tr>  
184                  </table>                  </table>
185          </td>                  HTML;
186    </tr>  
187          <tr height=5>                  $buffer = ob_get_clean();
188                  <td>&nbsp;</td>  
189          </tr>                  file_put_contents($cache_path, $buffer);
190  </table>          }
191  <?  
192            echo $buffer;
193    
194            // Cleanup
195            unset($s_favor);
196            unset($section_hierachy);
197    
198            mysqli_close($db_conn);
199    
200          include "./foot.inc.php";          include "./foot.inc.php";
201  ?>  
202  <table width="760" border="0" cellspacing="0" cellpadding="1">          echo <<<HTML
203    <tr>          </center>
204          <td align="center" valign="top">          </body>
205          </td>          </html>
206    </tr>  
207  </table>          HTML;
 </center>  
 </body>  
 </html>  
 <?  
         mysql_close($db_conn);  
208  ?>  ?>


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

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