www.gusucode.com > 通讯设备公司网站程序源码 > 通讯设备公司网站程序源码/product/xml/lbxml.php

    <?php
define("ROOTPATH", "../../");
include(ROOTPATH."includes/common.inc.php");

$g=$_GET["g"];
$arr=explode("|",$g);
$catid=$arr[0];
$rp=$arr[1];

echo "<";
echo "?xml ";
echo "version='1.0'  encoding='utf-8' ";
echo "?";
echo ">\n";
echo "<bcaster autoPlayTime='3'>\n";
if($catid == 0){
	$msql->query("select * from {P}_product_con order by uptime limit 0,5");
	while($msql->next_record()){
		$id=$msql->f('id');
		$src=$msql->f('src');
		$url="product/html/?".$id.".html";
		$src=$rp.$src;
		echo "<item item_url='".$src."'  link='".$url."'  itemtitle=''></item>\n";
	}
}
else{
	$tsql->query("select catpath from {P}_product_cat where catid='$catid'");
		while($tsql->next_record()){
			$catpath = $tsql->f('catpath');
			if(strlen($catpath) != 5){
				$fsql->query("select catid from {P}_product_cat where pid='$catid'");
				while($fsql->next_record()){
					$catid = $fsql->f('catid');
					$msql->query("select * from {P}_product_con  where catid='$catid' order by uptime limit 0,5");
					while($msql->next_record()){
						$id=$msql->f('id');
						$src=$msql->f('src');
						$url="product/html/?".$id.".html";
						$src=$rp.$src;
						echo "<item item_url='".$src."'  link='".$url."'  itemtitle=''></item>\n";
					}
				}
			}else{
				$msql->query("select * from {P}_product_con  where catpath='$catpath' order by uptime limit 0,5");
				while($msql->next_record()){
					$id=$msql->f('id');
					$src=$msql->f('src');
					$url="product/html/?".$id.".html";
					$src=$rp.$src;
					echo "<item item_url='".$src."'  link='".$url."'  itemtitle=''></item>\n";
			}
		}
		}
}
echo "</bcaster>";
?>