<?php
$s8_url = "http://s.taobao.com/search?q=".urlencode(iconv('UTF-8','GBK//IGNORE',$q))."&cat=$cid&ali_trackid=2:mm_".MYUSERPID."_0_0&search_type=item&unid=".$_SESSION['dduserid'];
?>
<div style="border:#FFD57F 1px solid; text-align:left; padding-left:100px; line-height:20px; background:#FFF7E5; color:#808080;width:638px; padding-top:16px; padding-bottom:16px; font-weight:bold; font-size:14px">
抱歉！没有找到与“<span class="h" style="color:#FF5500"><?=$q?></span>”相关的宝贝<br/>
温馨提示： <br/>
1、你可以在"全部分类"下重新搜索 <br/>
2、减少您的"筛选条件"进行重新搜索 <br/>
3、缩短或更改搜索关键字（例：将“电动滑板车”改成“滑板车”后重新搜索）<br/>
4、去淘宝购买此商品，也可享受返利。去淘宝&rarr;<a href="<?=$s8_url?>" style="color:#F00; text-decoration:underline; font-weight:bold" target="_blank"><?=$q?></a>
</div>
<style>
.tuijian{border:#FFD57F 1px solid;width:738px; margin-top:5px; text-align:center; overflow:hidden}
.tuijian table{text-align:left;}
.tuijian table .timg{ height:142px;}
.tuijian table .ttitle{ height:29px; overflow:hidden}
.tuijian table img{ border:#F60 1px solid; }
.tuijian table div.ttitle,div.tfan,div.tprice{margin-top:3px; width:135px;}
.tuijian table .tfan b{ font-size:16px; color:#FF3300; font-family:"Times New Roman", Times, serif;}
.tuijian table .tprice b{ font-size:16px; color:#FF3300; font-family:"Times New Roman", Times, serif;}
.tuijian table .ttitle a:link {	COLOR: #3366cc; FONT-SIZE: 12px; TEXT-DECORATION: none; font-weight:normal}
.tuijian table .ttitle a:visited {	COLOR: #3366cc; FONT-SIZE: 12px; TEXT-DECORATION: none; font-weight:normal}
.tuijian table .ttitle a:active {	COLOR: #f30; FONT-SIZE: 12px; TEXT-DECORATION: underline;font-weight:normal}
.tuijian table .ttitle a:hover {	COLOR: #f30; FONT-SIZE: 12px; TEXT-DECORATION: underline;font-weight:normal}
</style>
<div class="tuijian">
<div style="font-size:14px; padding-left:20px; color:#F60; font-weight:bold; text-align:left; padding-top:5px">今日推荐</div>
<table border="0" style="">
  <tr>
  <?php 
  $Taoapi->method = 'taobao.taobaoke.items.get';
    $Taoapi->fields = 'iid,num_iid,title,nick,pic_url,price,click_url,shop_click_url,volume,commission,commission_rate,commission_num,commission_volume,';
    $Taoapi->nick = MYUSERNICK;
    $Taoapi->keyword = HOTWORD;
    $Taoapi->page_size = '5';
	$Taoapi->page_no=2;
    $Taoapi->sort = 'commissionNum_desc';
    $Taoapi->outer_code=$_SESSION["dduserid"];
    $rexiaoapi= $Taoapi->Send('get','xml')->getArrayData();
    $ListHot = $rexiaoapi["taobaoke_items"]["taobaoke_item"]; 
  
  foreach($ListHot as $row){
  //简易模式还是详细模式选择不同的链接地址
  $hottitle=str_replace("'","",$row["title"]);
  $hottitle=strip_tags($hottitle);
	if(WEBTYPE=='0'){
		$gourl="href=\"gotoitem.php?url=".base64_encode($row["click_url"])."\" target=\"_blank\"";
	}else{
		$gourl="href=\"view".$url_head_iid.$row["num_iid"].$url_end."\" target=\"_blank\"";
	}
?>
    <td>
    <div class="timg"><a <?=$gourl?>><SCRIPT language=javascript>setPic('<?php echo base64_encode($row["pic_url"]."_310x310.jpg")?>',138,138,'<?php echo $hottitle ?>');</SCRIPT></a></div>
    <div class="ttitle"><a <?=$gourl?>><?=$hottitle?></a></div>
    <div class="tfan">原价：<b><?php echo $row["price"]; ?></b> 元</div>
    <div class="tprice">返利：<b><? echo ck_fxje($row["commission"],$_SESSION['dduserlevel'])?></b> 元</div>
    </td>
  <?php }?>
  </tr>
</table>

</div>