<?php
#******************************************************************************#
# ＠ぴあショッピング                                                           #
# トップページ                                                                 #
#------------------------------------------------------------------------------#
# 2010.06.01 新規作成                                                          #
# 2011.02.02 横幅565px→370px変更&アイテム数4→3変更                           #
#******************************************************************************#
################################################################################
# Include                                                                      #
################################################################################
	include_once("bc.php");

// おすすめ
	$feedPath = "shop";
	$fixedParam = array(
		'partner' => $partnerID,
		'num'     => '1'
	);

	$osusume = getOsusumeList('/home/webext/docs/www/shopping/osusume_frame1_370.csv');
	for ( $i = 0; $i < count( $osusume ); $i++ ){
		$fixedParam['q'] = urlencode( $osusume[$i]['kw'] );
		if ( !empty( $osusume[$i]["category"] ) ){
			$fixedParam['dir'] = $osusume[$i]["category"];
		}
		else{
			$fixedParam['dir'] = "";
		}
		$xml_data = getBecomeXML($feedPath,$fixedParam,"");
		$selectList[$i] = parseShopList($xml_data,"general");
	}
?>
<!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" lang="ja" xml:lang="ja" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="Description" content="話題のアイテムをcheck！" />
<meta name="Keywords" content="ショッピング,ランキング,おすすめアイテム,話題の商品" />
<meta name="author" content="ぴあ株式会社" />
<title>ショッピングサーチ／＠ぴあ</title>
<link rel="stylesheet" type="text/css" href="../css/import.css" media="screen, print" charset="Shift_JIS" />
<link rel="stylesheet" type="text/css" href="./css/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="./css/style2.css" media="screen" />
<link rel="start" href="/" title="トップページ" />
<link rel="index" href="/sitemap/" title="サイトマップ" />
<link rel="alternate" type="application/rss+xml" title="ROR" href="../sitemap.xml" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/heightLine.js"></script>
<script type="text/javascript" src="../js/function.js" charset="Shift_JIS"></script>
<script type="text/javascript" src="../js/rollover.js"></script>
<script type="text/javascript" src="../js/smoothscroll.js"></script>
</head>
<body>

<div id="shopping_box370">
<h3 class="t14 bold">アイスクリーム、ミニタワーファンetc...<br />
注目のアイテムをcheck！</h3>
<p class="btnlink"><a href="http://www.pia.co.jp/shopping/index.php" target="_top"><img src="img/btn_more.gif" alt="もっと見る" border="0" /></a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<?php
for ( $idx = 0; $idx < count( $selectList ); $idx++ ){
	for ( $i = 0; $i < count( $selectList[$idx]["result"] ); $i++ ){
		$item = $selectList[$idx]["result"][$i];
		if ( empty( $osusume[$idx]["category"] ) ){
			$cate = "";
		}else{
			$cate = "&dir=" . $osusume[$idx]["category"];
		}
		$price = number_format($item["merchant"]["price"]);
?>
<td class="sp1"></td>
<td>
<p class="heightLine-g1"><a href="/shopping/shop.php?q=<?echo $osusume[$idx]["kw"] ?><?echo $cate ?>" class="icon01" target="_top"><?echo $osusume[$idx]["title"] ?></a></p>
<p class="ph"><a href="<?echo $item["merchant"]["url"] ?>" target="_blank"><img src="<?echo $item["image_url"] ?>" alt="" border="0" /></a></p>
<p class="heightLine-g2"><?echo $price ?>円</p>
<p class="heightLine-g3"><a href="<?echo $item["merchant"]["url"] ?>" target="_blank"><?echo $item["title"] ?></a></p>
<p class="heightLine-g4"><a href="<?echo $item["merchant"]["url"] ?>" target="_blank"><img src="img/btn_shop.gif" alt="ショップへ" width="90" height="18" border="0" class="rollover" /></a></p>
<p class="heightLine-g5"><a href="<?echo $item["merchant"]["url"] ?>" target="_blank"><?echo $item["merchant"]["name"] ?></a></p>
</td>
<?php
	}
}
?>
</tr>
</table>

<p class="txt">
     <a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=保冷バッグ" class="1st" target="_top">保冷バッグ</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=ひんやり寝具" target="_top">ひんやり寝具</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=甚平" target="_top">甚平</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=浴衣セット" target="_top">浴衣セット</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=レース日傘" target="_top">レース日傘</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=東京スイーツ" target="_top">東京スイーツ</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=グリーンペット" target="_top">グリーンペット</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=地ビール" target="_top">地ビール</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=日本未発売" target="_top">日本未発売</a>
　|　<a href="http://www.pia.co.jp/shopping/shop.php?fltr_category=&q=電子書籍リーダー" target="_top">電子書籍リーダー</a>
</p>
</div>

</body>
</html>
