/[LeafOK_CVS]/fenglin/www/journal.php
ViewVC logotype

Contents of /fenglin/www/journal.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations)
Wed Mar 12 13:28:32 2025 UTC (12 months ago) by sysadm
Branch: MAIN
Changes since 1.10: +1 -1 lines
Fix bug in HTML special character encoding

1 <?
2 if (isset($_GET["jid"]))
3 $jid=intval($_GET["jid"]);
4 else
5 $jid=0;
6 if (isset($_GET["uid"]))
7 $uid=intval($_GET["uid"]);
8 else
9 $uid=0;
10 if (isset($_GET["as_email"]))
11 $base_url="https://www.fenglin.info";
12 else
13 $base_url="";
14
15 $db_conn=include "./db_open.inc.php";
16
17 $rs=mysql_query("select * from journal_index where JID=$jid and enable")
18 or die("Query journal_index error!");
19 if ($row=mysql_fetch_array($rs))
20 {
21 $dt=$row["dt"];
22 }
23 else
24 {
25 echo ("Journal ID not exists!");
26 exit();
27 }
28 mysql_free_result($rs);
29
30 $f_section_list="-1,";
31 if ($uid==0)
32 {
33 $rs=mysql_query("select SID from section_config where enable")
34 or die("Query section_config error!");
35 }
36 else
37 {
38 $rs=mysql_query("select SID,UID from section_favorite where UID=$uid")
39 or die("Query section_favorite error!");
40 if (mysql_num_rows($rs)==0)
41 {
42 mysql_free_result($rs);
43 $rs=mysql_query("select SID from section_config where enable")
44 or die("Query section_config error!");
45 }
46 }
47 while($row=mysql_fetch_array($rs))
48 {
49 $f_section_list=$f_section_list.$row["SID"].",";
50 }
51 mysql_free_result($rs);
52 $f_section_list=substr($f_section_list,0,strlen($f_section_list)-1);
53
54 $section_list="-1,";
55 $rs=mysql_query("select SID from journal_data inner join bbs on journal_data.AID=bbs.AID".
56 " where journal_data.JID=$jid and bbs.SID in ($f_section_list)")
57 or die("Query journal_data error!");
58 while($row=mysql_fetch_array($rs))
59 {
60 $section_list=$section_list.$row["SID"].",";
61 }
62 mysql_free_result($rs);
63 $section_list=substr($section_list,0,strlen($section_list)-1);
64
65 $class_list="-1,";
66 $rs=mysql_query("select CID from section_config where SID in ($section_list) and enable")
67 or die("Query section_config error!");
68 while($row=mysql_fetch_array($rs))
69 {
70 $class_list=$class_list.$row["CID"].",";
71 }
72 mysql_free_result($rs);
73 $class_list=substr($class_list,0,strlen($class_list)-1);
74 ?>
75 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
76 <html>
77 <head>
78 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
79 <title>枫林在线 -- 精品导读</title>
80 </head>
81 <body marginheight="15" marginwidth="15" leftmargin="15" topmargin="15" link="#000066" bgcolor="#FFFFFF" alink="#990000" vlink="#444464">
82 <center>
83 <a name="top"></a>
84 <table cellpadding="0" cellspacing="0" border="0" width="600">
85 <tr>
86 <td width="600" colspan="3" align="center">
87 <?
88 if (isset($_GET["as_email"]))
89 {
90 ?>
91 <font color="#CCCCCC" size="-2">如果您无法阅读本邮件,请访问<a href="<? echo $base_url; ?>/www/journal.php?jid=<? echo $jid; ?>&uid=<? echo $uid; ?>" target="_blank"><? echo $base_url; ?>/www/journal.php?jid=<? echo $jid; ?>&uid=<? echo $uid; ?></a></font><br>&nbsp;</td>
92 <?
93 }
94 ?>
95 </tr>
96 <tr>
97 <td width="1" colspan="3" bgcolor="#999999"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
98 </tr>
99 <tr>
100 <td width="1" bgcolor="#999999"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
101 <td width="598">
102 <table width="598" border="0" cellspacing="0" cellpadding="0">
103 <tr>
104 <td background="<? echo $base_url; ?>/www/images/spacer_bkgd.gif" height="55" colspan="6">
105 <table cellpadding="0" cellspacing="0" border="0">
106 <tr>
107 <td>
108 <img src="<? echo $base_url; ?>/www/images/spacer.gif" width="198" height="1" border="0" alt=""><br>
109 <font face="Times New Roman,Times,Serif" size="-1" color="#333333">&nbsp;&nbsp;<? echo date ("l, F d, Y",strtotime($dt)); ?><br>
110 </font></td>
111 <td align="center"><img src="<? echo $base_url; ?>/images/logo/fenglinonline.gif" alt="" width="130" height="50" border="0"></td>
112 <td><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="198" height="1" border="0" alt=""></td>
113 </tr>
114 </table>
115 </td>
116 </tr>
117 <tr>
118 <td colspan="6"><img src="<? echo $base_url; ?>/www/images/line.gif" alt="" width="598" height="4" border="0"></td>
119 </tr>
120 <tr>
121 <td width="5" bgcolor="#ffffff"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="5" height="1" border="0" alt=""></td>
122 <td width="393" valign="top">
123 <table width="393" border="0" cellpadding="0" cellspacing="0">
124 <tr>
125 <td width="393">
126 <table border="0" width="393" cellpadding="0" cellspacing="0">
127 <tr>
128 <td width="131" colspan="2"><font face="Times New Roman,Times,Serif" size="-1"><strong>本期推荐:</strong></font></td>
129 </tr>
130 <tr>
131 <td width="393" colspan="2"><br></td>
132 </tr>
133 <tr>
134 <td width="393" colspan="2" valign="top" align="left">
135 <font face="Times New Roman,Times,Serif" size="-1">
136 <?
137 $cl_index=0;
138 $rs=mysql_query("select * from section_class where CID in ($class_list)".
139 " and enable order by sort_order")
140 or die("Query section_class error!");
141 while($row=mysql_fetch_array($rs))
142 {
143 ?>
144 <a href="#<? echo $row["cname"]; ?>"><? echo $row["title"]; ?></a>&nbsp;|&nbsp;
145 <?
146 $cl_index++;
147 if ($cl_index>=5)
148 {
149 echo ("<br>");
150 $cl_index=0;
151 }
152 }
153 mysql_free_result($rs);
154 ?>
155 </font><br><br>
156 <font face="Times New Roman,Times,Serif" size="-1" color="#333333"><a href="<? echo $base_url; ?>/bbs/s_favor.php" target="_blank">设定我喜欢的栏目</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<? echo $base_url; ?>/bbs/search_form.php" target="_blank">查找</a><br><br></font>
157 </td>
158 </tr>
159 </table>
160 </td>
161 </tr>
162 <?
163 $rs=mysql_query("select * from section_class where CID in ($class_list)".
164 " and enable order by sort_order")
165 or die("Query section_class error!");
166 while($row=mysql_fetch_array($rs))
167 {
168 ?>
169 <tr>
170 <td width="393">
171 <table border="0" width="393" cellpadding="0" cellspacing="0">
172 <tr>
173 <td width="393" bgcolor="#e4e4e4" height="24" valign="center" colspan="2">
174 <a name="<? echo $row["cname"]; ?>"></a>
175 <img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0">&nbsp;<font face="times, times new roman, sans serif" size="-1"><strong><? echo $row["title"]; ?></strong></font> </td>
176 </tr>
177 <tr>
178 <td width="393" colspan="2"> <br> <font size="-1">
179 <?
180 $rs_article=mysql_query("select journal_data.abstract,bbs.*,section_config.title as s_title".
181 " from journal_data inner join bbs on journal_data.AID=bbs.AID".
182 " inner join section_config on bbs.SID=section_config.SID inner join section_class".
183 " on section_config.CID=section_class.CID".
184 " where journal_data.JID=$jid and section_class.CID=".$row["CID"].
185 " and bbs.SID in ($section_list) order by section_config.sort_order,bbs.sub_dt")
186 or die("Query journal_data error!");
187 while($row_article=mysql_fetch_array($rs_article))
188 {
189 ?>
190 <font size="3"><strong><a href="<? echo $base_url; ?>/www/show_article.php?aid=<? echo $row_article["AID"]; ?>" target="_blank"><? echo $row_article["title"]; ?></a></strong></font><br>
191 <font color="#666666" size="-1"><? echo $row_article["s_title"]; ?>&nbsp;&nbsp;
192 By <? echo $row_article["nickname"]; ?></font><br>
193 <? echo str_replace(" ", "&nbsp;", str_replace("\n", "<br>", htmlspecialchars($row_article["abstract"], ENT_HTML401, 'UTF-8'))); ?><br>
194 <br>
195 <?
196 }
197 mysql_free_result($rs_article);
198 ?>
199 </font>
200 </td>
201 </tr>
202 <tr>
203 <td width="393" align="left"><br></td>
204 <td width="100" align="right"><br></td>
205 </tr>
206 </table>
207 </td>
208 </tr>
209 <?
210 }
211 mysql_free_result($rs);
212 ?>
213 </table>
214 </td>
215 <td width="5" bgcolor="#ffffff"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
216 <td width="1" bgcolor="#eeeeee"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
217 <td width="5" bgcolor="#ffffff"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0" alt=""></td>
218 <td width="184" valign="top" align="center"><br clear="all">
219 <br clear="all">
220 <br>
221 </td>
222 </tr>
223 </table>
224 <table border="0" width="598" cellspacing="0" cellpadding="0">
225 <tr>
226 <td width="598" colspan="3" bgcolor="#999999"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
227 </tr>
228 <tr>
229 <td width="5"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
230 <td width="588"> <p>&nbsp;</p>
231 <p><font face="Times New Roman,Times,Serif" size="-1"><strong>枫林在线论坛精华区</strong><br>
232 <br>
233 枫林在线除了向您推荐近期的优秀文章外,还提供以往的精彩文章的<a href="<? echo $base_url; ?>/gen_ex/">在线浏览</a>服务。</font>
234 </p>
235 <hr width="588" size="1">
236 <p> <font face="Times New Roman,Times,Serif" size="-1"> <strong>关于本邮件</strong><br>
237 <br>
238 感谢您订阅枫林在线的《精品导读》,您可以从我们提供的<a href="<? echo $base_url; ?>/bbs/preference.php">个人设定</a>功能中订阅/取消订阅本刊物。<br>
239 <br>
240 如果您对我们的工作有什么意见或建议,请<a href="<? echo $base_url; ?>/www/contact_us.php">与我们联系</a>。</font></p>
241 <p><br>
242 </p></td>
243 <td width="5"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
244 </tr>
245 <tr>
246 <td width="598" colspan="3" bgcolor="#999999"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
247 </tr>
248 <tr>
249 <td width="598" colspan="3" bgcolor="#e4e4e4" height="25"> <img src="<? echo $base_url; ?>/www/images/spacer.gif" width="5" height="1" border="0">
250 <font face="Times New Roman,Times,Serif" size="-1"> Copyright &copy;
251 2003-2025 <a href="<? echo $base_url; ?>/" target="_blank">枫林在线</a> | <a href="<? echo $base_url; ?>/www/privacy.php">隐私保护</a> </font> </td>
252 </tr>
253 </table>
254 </td>
255 <td width="1" bgcolor="#999999"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
256 </tr>
257 <tr>
258 <td width="1" colspan="3" bgcolor="#999999"><img src="<? echo $base_url; ?>/www/images/spacer.gif" width="1" height="1" border="0"></td>
259 </tr>
260 </table>
261 </center>
262 </body>
263 </html>

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