www.gusucode.com > 4165网博士成品网站管理系统 PHP网站源码程序 > 4165/4165/photo/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}_photo_con order by uptime limit 0,5"); while($msql->next_record()){ $id=$msql->f('id'); $src=$msql->f('src'); $url="photo/html/?".$id.".html"; $src=$rp.$src; echo "<item item_url='".$src."' link='".$url."' itemtitle=''></item>\n"; } } else{ $tsql->query("select catpath from {P}_photo_cat where catid='$catid'"); while($tsql->next_record()){ $catpath = $tsql->f('catpath'); if(strlen($catpath) != 5){ $fsql->query("select catid from {P}_photo_cat where pid='$catid'"); while($fsql->next_record()){ $catid = $fsql->f('catid'); $msql->query("select * from {P}_photo_con where catid='$catid' order by uptime limit 0,5"); while($msql->next_record()){ $id=$msql->f('id'); $src=$msql->f('src'); $url="photo/html/?".$id.".html"; $src=$rp.$src; echo "<item item_url='".$src."' link='".$url."' itemtitle=''></item>\n"; } } }else{ $msql->query("select * from {P}_photo_con where catpath='$catpath' order by uptime limit 0,5"); while($msql->next_record()){ $id=$msql->f('id'); $src=$msql->f('src'); $url="photo/html/?".$id.".html"; $src=$rp.$src; echo "<item item_url='".$src."' link='".$url."' itemtitle=''></item>\n"; } } } } echo "</bcaster>"; ?>