/[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.7 by sysadm, Thu Dec 24 03:55:38 2009 UTC Revision 1.32 by sysadm, Sat May 24 04:47:33 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="show_article.php?aid=236535" target="_blank"><font color="red">本站开放源码查看服务</a></font></td></tr>          if ($buffer == false)
84                                                          <tr><td height=18>·<a href="show_article.php?aid=221947" target="_blank">系统密码验证机制调整</a></td></tr>          {
85                                                          <tr><td height=18>·<a href="show_article.php?aid=128430" target="_blank"><font color="red">枫林在线《精品导读》发布</font></a></td></tr>                  ob_start();
86                                                  </table>  
87  <!-- SiteSearch Google -->                  echo <<<HTML
88  <form method="get" action="http://www.google.cn/custom" target="google_window">                  <table width="1050" border="0" cellpadding="0" cellspacing="0">
 <table border="0" bgcolor="#FEF7DF">  
 <tr><td nowrap="nowrap" valign="top" align="left" height="32">  
   
 </td>  
 <td nowrap="nowrap">  
 <input type="hidden" name="domains" value="fenglin.info"></input>  
 <label for="sbi" style="display: none">输入您的搜索字词</label>  
 <input type="text" name="q" size="20" maxlength="255" value="" id="sbi"></input>  
 </td></tr>  
 <tr>  
 <td>&nbsp;</td>  
 <td nowrap="nowrap">  
 <table>  
 <tr>  
 <td style='white-space: nowrap;'>  
 <input type="radio" name="sitesearch" value="" checked id="ss0"></input>  
 <label for="ss0" title="搜索网络"><font size="-1" color="#000000">Web</font></label></td>  
 <td style='white-space: nowrap;'>  
 <input type="radio" name="sitesearch" value="fenglin.info" id="ss1"></input>  
 <label for="ss1" title="搜索本站"><font size="-1" color="#000000">站内</font></label></td>  
 </tr>  
 </table>  
 <label for="sbb" style="display: none">提交搜索表单</label>  
 <input type="submit" name="sa" value="Google 搜索" id="sbb"></input>  
 <input type="hidden" name="client" value="pub-3013347141025996"></input>  
 <input type="hidden" name="forid" value="1"></input>  
 <input type="hidden" name="channel" value="3814605755"></input>  
 <input type="hidden" name="ie" value="GB2312"></input>  
 <input type="hidden" name="oe" value="GB2312"></input>  
 <input type="hidden" name="safe" value="active"></input>  
 <input type="hidden" name="flav" value="0000"></input>  
 <input type="hidden" name="sig" value="GZIsPF42citLV4hM"></input>  
 <input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:130;L:http://www.fenglin.info/images/logo/fenglinonline.gif;S:http://www.fenglin.info;FORID:1"></input>  
 <input type="hidden" name="hl" value="zh-CN"></input>  
 </td></tr></table>  
 </form>  
 <!-- SiteSearch Google -->  
                                         </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">  
                         <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>  
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://www.leafok.com" target="_blank">LeafOK</a><br>                                                          <td class="td3">
94                                          </center>                                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
95                                          </marquee>                                                                          <tr><td height=10></td></tr>
96                                                                            <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>
98                                                                            <tr><td height=18>路<a href="../bbs/view_article.php?tn=portal&id=471914" target="_blank">涓枃缂栫爜鍙婇噸瑕佸姛鑳借皟鏁</a></td></tr>
99                                                                            <tr><td height=10></td></tr>
100                                                                    </table>
101                                                            </td>
102                                                    </tr>
103                                            </table>
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>                          </tr>
                         <tr><td height=8></td></tr>  
134                  </table>                  </table>
135          </td>                  <table width="1050" border="0" cellspacing="0" cellpadding="5">
136    </tr>                          <tr>
137          <tr height=5>                  HTML;
138                  <td>&nbsp;</td>  
139          </tr>                  $column = 0;
140  </table>                  $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>
184                    </table>
185                    HTML;
186    
187                    $buffer = ob_get_clean();
188    
189                    file_put_contents($cache_path, $buffer);
190            }
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);  
 ?>  


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

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