www.gusucode.com > Tatter Tools 0.961 SE GB2312 简体中文版 > upload/sync_k_view.php

    <?
	include("inc_global.php");
	include("inc_function.php");

	// header("Content-Type: text/xml");

	$rss .= "<?xml version=\"1.0\" encoding=\"gb2312\" ?>\r\n";
	$rss .= "<response>\r\n";

	$sql = "
		select
			no, sortno, keyword, body
			, image_file_path1, image_file_path2
			, regdate, is_public, is_sync
		from
			t3_".$dbid."_keyword
		where
			no = '$kl'
		and is_public = '1'
		and is_sync = '1'
	";

	list (
		$no, $sortno, $keyword, $body
		, $image_file_path1, $image_file_path2
		, $regdate, $is_public, $is_sync
	) = @mysql_fetch_array(@mysql_query($sql));

	if (!$no) {
		print $rss;
		?>
		<error>1</error><message>error!!</message></response>
		<?
		exit;
	}

	$keyword = htmlspecialchars($keyword);
	$description = str_innerHTML(htmlspecialchars(str_tag_truncate(nl2brc(attach_image(1,$body, $s_root_path, $r_root_path, $attach_path.$image_file_path1.$image_file_path2)))));
	$link = htmlspecialchars($s_root_path."kview.php?kl=$no");
	$creator = htmlspecialchars($p_user_nick);
	$p_title = htmlspecialchars($p_title);

	$rss .= "<item>\r\n";
	$rss .= "<site>$p_title</site>\r\n";
	$rss .= "<sitelink>".$s_root_path."index.php</sitelink>\r\n";
	$rss .= "<keyword>$keyword</keyword>\r\n";
	$rss .= "<link>$link</link>\r\n";
	$rss .= "<description>$description</description>\r\n";
	$rss .= "<creator>$creator</creator>\r\n";
	$rss .= "<date>$regdate</date>\r\n";
	$rss .= "</item>\r\n";

	$rss .= "</response>\r\n";

	print $rss;
?>