<?php widget("fhead");include($path_cache.DS."mod_b2b_Shared_fhead.php"); ?>
<script>var wedir = "<?php echo $vd['content']; ?>js/";</script>
<script language="JavaScript" src="<?php echo $vd['content']; ?>js/loadgameindex.js"></script>
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="<?php echo $vd['root']; ?>index.php?m=mod_b2b&a=Home">直销商管理系统</a> >> 我要进货 >> 购卡售用户</span></div>
	<div id="type">
	  	<ul>
			<li><a href="<?php echo $vd['root']; ?>index.php?m=mod_b2b&c=Category"><span class="type">按目录分类</span></a></li>
			<li><span class="letters">按字母分类</span></li>
			<li><a href="<?php echo $vd['root']; ?>index.php?m=mod_b2b&c=product&a=most&nrows=5000"><span class="oftens">常购买商品</span></a></li>
		</ul>
	</div>
	<div id="buycard">
	<div id="buycardmain">
		<div id="search">
			<div id="searchlist" style="DISPLAY:none;">
			<table id="listtb" border="0" cellpadding="0" cellspacing="0" width="100%">
			</table>
			</div>
			<form name="form1" method="get" action="<?php echo $vd['root']; ?>index.php">
			<input name="keywords" id="gametype" type="text" class="input" size="33" value="" onkeyup="vkeyup()">
			<input type="hidden" name="stype" value="pname"/>
			<input type="hidden" name="m" value="mod_b2b"/>
			<input type="hidden" name="c" value="product"/>
			<input type="hidden" name="nrows" value="4000"/>
			<select name="typesearch" id="typesearch" class="search_select">
    	  <option value="product" selected>搜索商品</option>
    	  <option value="category">搜索分类</option>
    	</select>
    	<?php $k=array('征途','热血传奇','魔兽世界','网易','永恒之塔' ); ?>
			<input type="image" src="<?php echo $vd['content']; ?>images/icon_search.gif" border="0" align="absmiddle">　　<strong>热门搜索：</strong><?php foreach($k as $item) { ?><a href="<?php echo $vd['root']; ?>index.php?m=mod_b2b&c=product&stype=pname&typesearch=product&keywords=<?php echo urlencode($item); ?>"><?php echo $item; ?></a>、<?php } ?>
			</form>
		</div>
		<div id="zm"><a href="#">全部</a>&nbsp;&nbsp;<a href="#A">A  B  C</a>&nbsp;&nbsp;<a href="#D">D  E  F</a>&nbsp;&nbsp;<a href="#G">G  H  I</a>&nbsp;&nbsp;<a href="#J">J  K  L</a>&nbsp;&nbsp;<a href="#M">M  N  O</a>&nbsp;&nbsp;<a href="#P">P  Q  R</a>&nbsp;&nbsp;<a href="#S">S  T  U</a>&nbsp;&nbsp;<a href="#V">V  W  X</a>&nbsp;&nbsp;<a href="#Y">Y  Z</a>&nbsp;&nbsp;<a href="#Z">0-9</a></div>
		<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
			<td class="tableleft">
				<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="table1">
				<?php $pinyin = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0-9"); ?>
				<?php $ls=array();foreach($pinyin as $item){ ?>
				<?php $ls[$item] = array(); ?>
				<?php } ?>
				<?php foreach($vd['subcat'] as $subcat){ ?>
				<?php if($subcat['pinyin'] >= '0' && $subcat['pinyin'] <= '9'){ ?>
				<?php $ls['0-9'][] = $subcat; ?>
				<?php } ?>
				<?php if(isset($ls[$subcat['pinyin']])){ ?>
				<?php $ls[$subcat['pinyin']][] = $subcat;} ?>
				<?php } ?>
				
				<?php foreach($ls as $k => $v){ ?>
				<tr>
				<td width="12%" class="tableleft2"><?php echo $k; ?><a name="<?php echo $k; ?>"></a></td>
				<td width="88%" class="tableright2">
				<?php foreach($v as $subcat){ ?>
				<a class='tip' href='<?php (ListLink($subcat['id'])); ?>'><?php if($vd['showtype']==0){ ?><font color=<?php echo $subcat['color']; ?>><?php echo $subcat['name']; ?></font><?php if($subcat['abst'] != '' && $subcat['abst'] != 'NULL'){ ?><SPAN class=tip_info><?php echo $subcat['abst']; ?></SPAN><?php } ?><?php }else{ ?><img src="<?php echo $vd['root']; ?><?php echo $vd['sc']; ?>upload/<?php if(isset($subcat['pics']) && $subcat['pics'] !='' && $subcat['pics']!='NULL' ){ ?><?php echo $subcat['pics']; ?><?php }else{ ?>catnopic.gif<?php } ?>" border="0" style="margin:8px 0 8px 0" alt="<?php echo $subcat['abst']; ?>"/><?php } ?></a>
				<?php } ?>
				&nbsp;
				</td>
				</tr>
				<?php } ?>
			</table>
		</td>
      </tr>
	</table>
	
	</div>
	</div>
</body>
</html>
