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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Sat Apr 12 12:27:29 2025 UTC (11 months ago) by sysadm
Branch: MAIN
Refine view_article_xml with theme support

1 sysadm 1.1 <?
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><? echo $result_set["data"]["sid"]; ?></SectionId>
19     <SectionTitle><? echo $result_set["data"]["section_title"]; ?></SectionTitle>
20     <TopicId><? echo $result_set["data"]["id"]; ?></TopicId>
21     <TopicTitle><? echo htmlspecialchars($result_set["data"]["title"], ENT_HTML401, 'UTF-8'); ?></TopicTitle>
22     </Subject>
23     <Articles>
24     <?
25     foreach ($result_set["data"]["articles"] as $article)
26     {
27     ?>
28     <Article>
29     <PostUserId><? echo $article["uid"]; ?></PostUserId>
30     <PostUserName><? echo htmlspecialchars($article["username"], ENT_HTML401, 'UTF-8'); ?></PostUserName>
31     <PostUserNickName><? echo htmlspecialchars($article["nickname"], ENT_HTML401, 'UTF-8'); ?></PostUserNickName>
32     <rank><? echo user_level($article["exp"]); ?></rank>
33     <credit><? echo $article["exp"]; ?></credit>
34     <photo><? echo $article["photo_path"]; ?></photo>
35     <ArticleId><? echo $article["aid"]; ?></ArticleId>
36     <ArticleTitle><? echo htmlspecialchars($article["title"], ENT_HTML401, 'UTF-8'); ?></ArticleTitle>
37     <ExpressionIcon><? echo $article["icon"]; ?></ExpressionIcon>
38     <PostDateTime><? echo $article["sub_dt"]->format("Y-m-d H:i:s (\U\T\C P)"); ?></PostDateTime>
39     <PostIP><? echo $article["sub_ip"]; ?></PostIP>
40     <Content><![CDATA[<? echo LML($article["content"], true, false, 1024); ?>]]></Content>
41     <Length><? echo $article["length"]; ?></Length>
42     </Article>
43     <?
44     }
45     ?>
46     </Articles>
47     </Topic>

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