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