<!DOCTYPE html>
<html>
<head>
<meta charset="GBK" />
<title><?php echo $sitetitle ?></title>
<meta name="keywords" content="<?php echo $sitekey ?>" />
<meta name="description" content="<?php echo $sitedesc ?>" />
<link rel="stylesheet" href="<?php echo $templateroot;?>/images/style.css" />
<link rel="stylesheet" href="<?php echo $templateroot;?>/images/index.css" />
<link rel="shortcut icon" href="<?php echo $sitetitleurl;?>/favicon.ico" />
<link href="<?php echo $templateroot;?>/images/css.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $templateroot;?>/images/yu.js" type="text/javascript"></script>
<script src="<?php echo $templateroot;?>/images/tb.js" type="text/javascript"></script>
<style type="text/css">

#apDiv1 {

	position:absolute;
	left:180px;
	width:189px;
	height:234px;
	z-index:9999;
	top:36px;
	color:#666;
}

#apDiv1 a {
	color:#666;
	float:left;
	width:80px;
}
.showtypelist{
	border:solid #C10202 4px;
	background-color:#FFF;
	color:#333;
	width:235px;
	height:220px;
	display:none;}
</style>
</head>
<body>
<?php $isindexpage = "ok";
 include($WEBROOT_TEMP."header.php");?>
<div class="a_b">
<div class="f3_l bgC10202 pd6" >
<div id="menuparent" >
	    <dl class="bimg">
		    <dt style="position:relative; z-index:1;	"><a href="#"><strong>全部商品分类</strong></a>

            <div id="apDiv1">
              <?php echolistshow($arraykeywords,"类目1",1); ?>
              <?php echolistshow($arraykeywords,"类目2",2); ?>
              <?php echolistshow($arraykeywords,"类目3",3); ?>
              <?php echolistshow($arraykeywords,"类目4",4); ?>
              <?php echolistshow($arraykeywords,"类目5",5); ?>
            </div>
	      </dt>
		<script language="javascript">

			function M_show(id){

				for(var i=1;i<=5;i++){
				document.getElementById("stypelist"+i).style.display = "none";	
				}
				document.getElementById("stypelist"+id).style.display = "block";	
			}
				var h=document.getElementById('menuparent');
				h.onmouseout=function(e) {
					var e = e || window.event, relatedTarget = e.toElement || e.relatedTarget;
					while(relatedTarget && relatedTarget != this)
						relatedTarget = relatedTarget.parentNode;
					if(!relatedTarget)
						{
							for(var i=1;i<=5;i++){
							document.getElementById("stypelist"+i).style.display = "none";	
							}

						}
				}
			window.onload = function(){
			}
		</script>

			<dd><ul><?php 

			function echolistshow($array,$name,$id){

			global $weijingtai;

			$str = explode(",",$array[$name]["keyword"]);

			$keycatid = isset($array[$name]["catid"])?$array[$name]["catid"]:0;

			$isshop = isset($array[$name]["isshop"])?$array[$name]["isshop"]:0;;

			?>

              <div class="showtypelist" id="stypelist<?php echo $id;?>">            <?php foreach($str as $val){?><a href="<?php echo getsearchurl($val,$keycatid,$isshop);?>"><?php echo $val;?></a><?php	}?>

                  <div style="clear:both"></div>

              </div>

			 <?php

             }

			function echolist($array,$name,$id){			global $weijingtai;			$str = explode(",",$array[$name]["keyword"]);

			$keycatid = isset($array[$name]["catid"])?$array[$name]["catid"]:0;

			$isshop = isset($array[$name]["isshop"])?$array[$name]["isshop"]:0;;
			
			
			$number = preg_split("/[_| |\/]+/", $array[$name]["name"]);

			$titlestr = $number[0];
			
			?>

				    <li onMouseOver="M_show(<?php echo $id;?>);"  class="bigclass"><a href="<?php echo getsearchurl($titlestr,$keycatid,$isshop)?>"><?php echo $array[$name]["name"]?></a></li>

                    <li class="ems" style="display:none">

            		<?php foreach($str as $val){?><a href="<?php echo getsearchurl($val,$keycatid,$isshop);?>"><?php echo $val;?></a><?php	}?></li>			 <?php
             }

		 echolist($arraykeywords,"类目1",1);

		 echolist($arraykeywords,"类目2",2);

		 echolist($arraykeywords,"类目3",3);

		 echolist($arraykeywords,"类目4",4);

		 echolist($arraykeywords,"类目5",5);

		 ?> 

	</ul></dd></dl>
</div>	
<!--充值 -->
 <script language="JavaScript" type="text/javascript">
            var lastP = 1;
            function showPanel(idx)
            {
                if(lastP == idx)return;
                
                var p = document.getElementById("panel"+idx);
                p.style.display = "block";
                document.getElementById('panelHandler'+idx).className = "panelHandlerOn";
                
                
                
                document.getElementById("panel"+lastP).style.display = "none";
                document.getElementById('panelHandler'+lastP).className = "panelHandlerOff";
                lastP = idx;

            }
         </script>
<div class="hotSpots">
<iframe name="alimamaifrm" frameborder="0" marginheight="0" marginwidth="0" border="0" scrolling="auto" width="190" height="130" src="http://www.taobao.com/go/app/tbk_app/chongzhi_210_200.php?pid=mm_31449295_3024024_10294183&page=chongzhi_210_200.php&size_w=210&size_h=200&stru_phone=1&stru_game=1&stru_travel=0" ></iframe>
</div>
<!--充植end -->
	

</div>

	<div class="f3_c h292 bgD8D8D8">

	<div id="MainPromotionBanner">

		<div id="SlidePlayer">

			<ul class="Slides"><!-- 这里图片高度582px 宽度280px -->

			 <?php 

            for($no=0;$no<count($indexs);$no++){

                $catid=$indexs[$no]["catid"];

                if(!empty($indexs[$no]["lpicurl"])) {                    
				$picstr = '<li><A title="'.$indexs[$no]["lpictitle"].'" href="'.$indexs[$no]["lpiclink"].'" target=_blank><IMG title="'.$indexs[$no]["lpictitle"].'" src="'.$indexs[$no]["lpicurl"].'"></A></li> ';

				echo($picstr);

                }

            }

            

             ?>         

                

                

                

                

		  </ul>

		</div>

	  <script type="text/javascript">

              TB.widget.SimpleSlide.decoration('SlidePlayer', {eventType:'mouse', effect:'scroll'});

  </script>

	</div>

	</div>

	<div class="f3_r">

	    <dl class="gg">

		    <dt><a href="#">网站公告</a></dt>

			<dd><?php echo $gonggao;?></dd>

		</dl>

		<div class="box"><?php echo get_neirong_str("guanggao1")?></div>

	</div>

</div>

<div class="clear pd8"><img src="<?php echo $templateroot;?>/images/s.gif" /></div>

<div class="a_b">

    <div class="f3_l bgC10202">

	    <div class="titr"><a href="#"><strong><?php echo $indexs[0]["catname"]?></strong></a></div>

		<div class="b_bo">

		    <ul class="bbo">

    <?php


$taobaokeItem = $indextaobaokeItemArray[0]["taobaoke_items"]["taobaoke_item"];;
	?>

<?php for($i = 0; $i < 4; $i++) {
$taousernick = Newiconv("utf-8","gbk",$taobaokeItem[$i]["nick"]);
	$urlview =getproducturl($taobaokeItem[$i]["num_iid"]);

	if($listlinktype=="tao"){

		$picurl = " onclick=\"clickurl('".base64_encode($taobaokeItem[$i]["click_url"])."','".$rootroad."'); return false;\"";

	}else{

		$picurl = "";

	}

	

 ?>			    <li>
					<a href="<?php echo $urlview?>" <?php echo $picurl?> target="_blank"><?php setPic($taobaokeItem[$i]["pic_url"]."_100x100.jpg",50,50,strip_tags(Newiconv("UTF-8","GBK",$taobaokeItem[$i]["title"])))?></a>
					<span>
					<em><a style="TEXT-DECORATION: none" href="<?php echo $urlview?>"><?php echo Newiconv("UTF-8","GBK",$taobaokeItem[$i]["title"]) ?></a></em>
					<strong>&yen;<?php echo $taobaokeItem[$i]["price"] ?>元</strong>
					</span>

				</li>

    <?php }?>    

				

				

			</ul>

		</div>

	</div>

	<div class="f3_2c">

	    <div class="tit"><strong>推荐品牌</strong></div>

		<div class="tdai">

        

<?php  

	$pages = application("",WEBROOT."data/singerpagedate.php");
	$singerpage =$pages["singerpagelist"][0];

	$linklist = $pages["page0"];

	$i=0;
	 
?>

<?php foreach($linklist as $value) {

	$arr = $value["keywordlist"];

	$i ++;

	
	

	?>

        

		    <dl class="lid">

			    <dt><a href="<?php echo $value["typeurl"];?>" target="_blank"><strong><?php echo $value["typename"];?></strong></a></dt>

				<dd>

				    	<?php 

						if(is_array($arr)){

						for($i=0;$i<count($arr);$i++){
							
							$tplink =  $arr[$i]["link"];
							if($tplink == "" || empty($tplink))$tplink = getsearchurl($arr[$i]["pic"],0);
							
							?>

						<a href="<?php echo $tplink;?>" target="_blank"><?php echo $arr[$i]["title"];?></a> 

						<?php }

						}

						?>
				</dd>

			</dl>

<?php } ?>	

		</div>

		<div class="t3li">
<?php echo get_neirong_str("guanggao2")?>
		</div>

	</div>

	<div class="f3_r salebg">

	    <div class="timg"><img src="<?php echo $templateroot;?>/images/sale_t.gif"></div>

		<div class="nro">

<?php 
$taobaokeItem = $indextaobaokeItemArray[1]["taobaoke_items"]["taobaoke_item"];;

for($i = 0; $i < 7; $i++) {
$taousernick = Newiconv("utf-8","gbk",$taobaokeItem[$i]["nick"]);
	$urlview =getproducturl($taobaokeItem[$i]["num_iid"]);

	if($listlinktype=="tao"){

		$picurl = " onclick=\"clickurl('".base64_encode($taobaokeItem[$i]["click_url"])."','".$rootroad."'); return false;\"";

	}else{

		$picurl = "";

	}

	

 ?>
		<dl class="neo">

		    <dt><a style="TEXT-DECORATION: none" href="<?php echo $urlview?>"><?php echo Newiconv("UTF-8","GBK",$taobaokeItem[$i]["title"]) ?></a></dt>

		</dl>

    <?php }?>    

		</div>

		<div class="btimg"></div>

	</div>

</div>

<div class="clear pd8"><img src="<?php echo $templateroot;?>/images/s.gif" /></div>

<div class="a_b"><?php echo $ggtop;?></div><?php
 function showindex($class,$no){

global $indexs;

global $indextaobaokeItemArray;
global $listlinktype;

global $rootroad;

global $weijingtai;

global $wjtpageproduct;

global $wjtpagelist;

global $wjtpagehz;

global $templatefolder;
global  $Show_index_pricebili;


global $templateroot;
$catid=$indextaobaokeItemArray[$no]["catid"];

$taobaokeItemArray = $indextaobaokeItemArray[$no]["taobaoke_items"]["taobaoke_item"];

?>

<div class="clear pd8"><img src="<?php echo $templateroot;?>/images/s.gif" /></div>

<div class="a_b">

    <dl class="tt">

	    <dt class="spantitle">

        <?php 

		if(strlen($indexs[$no]["catname"])>4){

		echo "<span class=spantt1>".substr($indexs[$no]["catname"],0,4)."</span>";

		

		echo "<span class=spantt2>".substr($indexs[$no]["catname"],4)."</span>";

		

		}else{

		echo "<span class=spantt1>".$indexs[$no]["catname"]."</span>";

		}

		

		?>

        </dt>

		<dd>            <?php 

			$arr = explode("|",$indexs[$no]["key"]);

			

			for($i=0;$i<count($arr);$i++){

				echo '<a href="'.getsearchurl($arr[$i],$catid).'" target="_blank">'.$arr[$i].'</a>　<span class=line>|</span>　';

			}

			?>

        	<a class=more href="<?php echo getsearchurl($indexs[$no]["keyword"],$catid)?>">更多>>&nbsp;</a>

</dd>

	</dl>	

	<dl class="nr">

	   <dt><a href="<?php echo $indexs[$no]["rpiclink"]?>" target="_blank"><img src="<?php echo $indexs[$no]["rpicurl"]?>" width="198" height="219" alt="<?php echo $indexs[$no]["rpictitle"]?>"></a></dt>

	   <dd>

	       <ul>

				<?php for($i = 0; $i <5; $i++) { 
				
	if($listlinktype=="tao"){
		$picurl = " onclick=\"clickurl('".base64_encode($taobaokeItemArray[$i]["click_url"])."','".$rootroad."'); return false;\"";
	}else{
		$picurl = "";
	}
				?>

                       <li>

                           <span class="imgs"><a href="<?php echo $taobaokeItemArray[$i]["taodiurl"] ?>" <?php echo $picurl?> target="_blank"><?php setPic($taobaokeItemArray[$i]["pic_url"]."_120x120.jpg",0,0,iconv("UTF-8","GBK",$taobaokeItemArray[$i]["title"]))?></a></span>

                           <span class="txt"><a href="<?php echo $taobaokeItemArray[$i]["taodiurl"] ?>" target="_blank"><?php echo Newiconv("UTF-8","GBK",$taobaokeItemArray[$i]["title"]) ?></a></span>

 <span class="jia"><u>￥<?php echo $taobaokeItemArray[$i]["price"] * $Show_index_pricebili ?></u>&nbsp;&nbsp;<em>￥<?php echo $taobaokeItemArray[$i]["price"] ?></em></span>
                       </li>

                
                <?php } ?>

			   

		   </ul>

	   </dd>

	</dl>

</div>    

    

 <!-- 循环结束 -->

<?php }?>

<?php

$arrstyle = array("cat_1","cat_2","cat_3","cat_4","cat_5","cat_6","cat_7");

for($i=2;$i<count($indextaobaokeItemArray);$i++){

	

	showindex($arrstyle[$i % 7],$i); 

	

}
?>

<div class="clear pd8"><img src="<?php echo $templateroot;?>/images/s.gif" /></div>
<div class="a_b" style="width:1000px;">
<?php
	include($WEBROOT_TEMP."news.php");
?>
</div>

<?php include($WEBROOT_TEMP."teyue.php");?>

<?php include($WEBROOT_TEMP."link.php");?>
<div class="clear pd8"><img src="<?php echo $templateroot;?>/images/s.gif" /></div>
<?php include($WEBROOT_TEMP."footer.php");?>
</body>

</html>

