<?php
error_reporting(0);
require_once 'function.php';
$catid = '50012100';
$catid = getnochengrencid($catid);
$catid= str_replace('.html','',$catid);
$page = !($_GET['page'])?'0':intval($_GET['page']);
$sort = !($_GET['sort'])?'commissionNum_desc':$_GET['sort'];
$sp = !($_GET['sp']) ? '1' : $_GET['sp'];
$ep = !($_GET['ep']) ? '10000' : $_GET['ep'];

$cat_name = iconv("GBK","UTF-8","所有分类");
$is_parent = "false";
if($catid != 0)
{
	$Taoapi->method = 'taobao.itemcats.get';
	$Taoapi->fields = 'cid,name,parent_cid,is_parent';
	$Taoapi->cids = $catid;
	$TaoapiCat = $Taoapi->SendCheng('get','xml')->getArrayData();
	$result_cat = $TaoapiCat["item_cats"]["item_cat"];
	$cat_name = $result_cat["name"];
	$is_parent = $result_cat["is_parent"];
}
else
{
    $catid = 1801;
	$Taoapi->method = 'taobao.itemcats.get';
	$Taoapi->fields = 'cid,name,parent_cid,is_parent,status,sort_order';
	$Taoapi->cids = $catid;
	$TaoapiCat = $Taoapi->SendCheng('get','xml')->getArrayData();
	$result_cat = $TaoapiCat["item_cats"]["item_cat"];
	$cat_name = $result_cat["name"];
	$is_parent = $result_cat["is_parent"];
}
if($is_parent == "true")
{
	$Taoapi->method = 'taobao.itemcats.get';
	$Taoapi->fields = 'cid,name,parent_cid';
	$Taoapi->parent_cid = $catid;
	$TaoapiSubCats = $Taoapi->SendCheng('get','xml')->getArrayData();
	$result_subcats = $TaoapiSubCats["item_cats"]["item_cat"];
}

$Taoapi->method = 'taobao.taobaoke.items.get';
$Taoapi->fields = 'iid,num_iid,title,nick,pic_url,price,click_url,commission,commission_rate,commission_num,commission_volume,seller_credit_score,shop_click_url';
$Taoapi->nick = $usernick;
$Taoapi->cid = $catid;
$Taoapi->page_no = $page;
$Taoapi->page_size = '20';
$Taoapi->sort = $sort;
$Taoapi->start_price = $sp;
$Taoapi->end_price = $ep;
$TaoapiItems = $Taoapi->SendCheng('get','xml')->getArrayData();
$taobaokeItem = $TaoapiItems["taobaoke_items"]["taobaoke_item"];
$totalResults = $TaoapiItems["total_results"];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>机票在线预定-<?php echo $sitetitle ?></title>
<meta name="keywords" content="<?php echo iconv("UTF-8","GBK",$cat_name) ?>,<?php echo $sitekey ?>" />
<meta name="description" content="yes欢迎选购<?php echo iconv("UTF-8","GBK",$cat_name) ?>类商品。<?php echo $sitedesc ?>" />
<link href="css/qqhk.css" rel="stylesheet" type="text/css" />
<link href="images/style1.css" rel="stylesheet" type="text/css" />
<LINK href="/templets/beauty/alfs.css" type=text/css rel=stylesheet>
<LINK href="/templets/beauty/index_article.css" type=text/css rel=stylesheet>
</head>
<body>
<div id="main">
<?php
include("header.php");
?>
	<div class="weizhi"><span>您的位置：</span><a href="/">首页</a><a href="list.php">全部分类</a><a href="yflist-<?php echo $catid ?>"><?php echo iconv("UTF-8","GBK",$cat_name) ?></a></div>
</div>
<iframe frameborder="0" marginheight="0" marginwidth="0" border="0" id="alimamaifrm" name="alimamaifrm" crolling="no" height="1229px" vspace="-186"   width="100%" src="iffly.php" ></iframe>
<?php
include("footer.php");
?>
</div>
</body>
</html>