/[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.6 by sysadm, Fri May 16 06:49:44 2008 UTC Revision 1.35 by sysadm, Thu Jun 19 03:05:05 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  <?                          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    
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">&nbsp;</td>                  <tr height="25" bgcolor=#F3F9FC>
56                  <td>枫林在线 &gt;&gt; 首页</td>                          <td width="20">&nbsp;</td>
57                  <td width="20">&nbsp;</td>                          <td>{$BBS_name} &gt;&gt; 棣栭〉</td>
58          </tr>                          <td width="20">&nbsp;</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>&nbsp;</td>                  <tr height=5>
64          </tr>                          <td>&nbsp;</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></td>          if (file_exists($cache_path))
72                                  </tr>          {
73                                  <tr>                  if (filemtime($cache_path) >= time() - 3600) // refresh interval = 1 hour
74                                          <td class="td3">                  {
75                                                  <table width="100%" border="0" cellspacing="0" cellpadding="0">                          $buffer = file_get_contents($cache_path);
76                                                          <tr><td height=8></td></tr>                  }
77                                                          <tr><td height=18>·<a href="show_article.php?aid=328739" target="_blank">枫林在线网址变更公告</a></td></tr>          }
78                                                          <tr><td height=18>·<a href="show_article.php?aid=236535" target="_blank"><font color="red">本站开放源码查看服务</a></font></td></tr>          if ($buffer == false)
79                                                          <tr><td height=18>·<a href="show_article.php?aid=221947" target="_blank">系统密码验证机制调整</a></td></tr>          {
80                                                          <tr><td height=18>·<a href="show_article.php?aid=128430" target="_blank"><font color="red">枫林在线《精品导读》发布</font></a></td></tr>                  ob_start();
81                                                  </table>  
82  <!-- SiteSearch Google -->                  echo <<<HTML
83  <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>  
 <input type="radio" name="sitesearch" value="" id="ss0"></input>  
 <label for="ss0" title="搜索网络"><font size="-1" color="#000000">Web</font></label></td>  
 <td>  
 <input type="radio" name="sitesearch" value="fenglin.info" checked 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="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;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>  
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="http://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>                                  </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>&nbsp;
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>
127                            </tr>
128                            <tr height="10">
129                                    <td>&nbsp;</td>
130                          </tr>                          </tr>
                         <tr><td height=8></td></tr>  
131                  </table>                  </table>
132          </td>                  <table width="1050" border="0" cellspacing="0" cellpadding="5">
133    </tr>                          <tr>
134          <tr height=5>                  HTML;
135                  <td>&nbsp;</td>  
136          </tr>                  $column = 0;
137  </table>                  $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                    if (count($section_hierachy) == 0)
180                    {
181                            echo <<<HTML
182                                            <td width="100%" align="center" valign="top">
183                                                    娌℃湁鏀惰棌鐨勭増鍧楋紝<a href="/bbs/user_section_favor.php" target=_blank>鐐瑰嚮杩欓噷璁惧畾</a>
184                                            </td>
185                            HTML;
186                    }
187    
188                    echo <<<HTML
189                            </tr>
190                    </table>
191                    HTML;
192    
193                    $buffer = ob_get_clean();
194    
195                    file_put_contents($cache_path, $buffer);
196            }
197    
198            echo $buffer;
199    
200            // Cleanup
201            unset($s_favor);
202            unset($section_hierachy);
203    
204            mysqli_close($db_conn);
205    
206          include "./foot.inc.php";          include "./foot.inc.php";
207  ?>  
208  <table width="760" border="0" cellspacing="0" cellpadding="1">          echo <<<HTML
209    <tr>          </center>
210          <td align="center" valign="top">          </body>
211          </td>          </html>
212    </tr>  
213  </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