/[LeafOK_CVS]/fenglin/bbs/themes/xml/view_article_xml.view.php
ViewVC logotype

Contents of /fenglin/bbs/themes/xml/view_article_xml.view.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations)
Wed Apr 23 05:13:57 2025 UTC (10 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.2: +20 -20 lines
Refine deprecated PHP short tags

1 <?php
2 // Prevent load standalone
3 if (!isset($result_set))
4 {
5 exit();
6 }
7
8 require_once "../lib/lml.inc.php";
9 require_once "../lib/str_process.inc.php";
10 require_once "./user_level.inc.php";
11
12 header('Content-Type: text/xml; charset=UTF-8');
13 echo("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
14 echo("<?xml-stylesheet type='text/xsl' href='" . get_theme_file('xsl/1') . "' version='1.0'?>\n");
15 ?>
16 <Topic>
17 <Subject>
18 <SectionId><?= $result_set["data"]["sid"]; ?></SectionId>
19 <SectionTitle><?= $result_set["data"]["section_title"]; ?></SectionTitle>
20 <TopicId><?= $result_set["data"]["id"]; ?></TopicId>
21 <TopicTitle><?= htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?></TopicTitle>
22 </Subject>
23 <Articles>
24 <?php
25 foreach ($result_set["data"]["articles"] as $article)
26 {
27 ?>
28 <Article>
29 <PostUserId><?= $article["uid"]; ?></PostUserId>
30 <PostUserName><?= htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8'); ?></PostUserName>
31 <PostUserNickName><?= htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8'); ?></PostUserNickName>
32 <rank><?= user_level($article["exp"]); ?></rank>
33 <credit><?= $article["exp"]; ?></credit>
34 <photo><?= $article["photo_path"]; ?></photo>
35 <ArticleId><?= $article["aid"]; ?></ArticleId>
36 <ArticleTitle><?= htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'); ?><? if ($article["transship"]) { ?> [转载]<? } ?></ArticleTitle>
37 <ExpressionIcon><?= $article["icon"]; ?></ExpressionIcon>
38 <PostDateTime><?= $article["sub_dt"]->format("Y-m-d H:i:s (\U\T\C P)"); ?></PostDateTime>
39 <PostIP><?= $article["sub_ip"]; ?></PostIP>
40 <Content><![CDATA[<?= LML($article["content"], true, false, 1024); ?>]]></Content>
41 <Length><?= $article["length"]; ?></Length>
42 </Article>
43 <?php
44 }
45 ?>
46 </Articles>
47 </Topic>

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