<?php
/****************************************/
/*                                      */
/*  百信卡盟平台联系QQ:84945491         */
/*  淘宝店 http://shop70674652.taobao.com  */
/*  百信卡盟 http://www.caipiaobus.com  */
/*                                      */
/****************************************/

widget( "fhead" );
include( $path_cache.DS."mod_b2b_Shared_fhead.php" );
echo "<s";
echo "cript>var wedir = \"";
echo $vd['content'];
echo "js/\";</script>\r\n";
echo "<s";
echo "cript language=\"JavaScript\" src=\"";
echo $vd['content'];
echo "js/loadgameindex.js\"></script>\r\n<body class=\"mainbg\">\r\n\t<div id=\"mainhearder\">";
echo "<s";
echo "pan>您的位置：<a href=\"";
echo $vd['root'];
echo "index.php?m=mod_b2b&a=Home\">直销商管理系统</a> >> 我要进货 >> 购卡售用户</span></div>\r\n\t<div id=\"type\">\r\n\t  <ul>\r\n\t\t\t<li>";
echo "<s";
echo "pan class=\"type\">按目录分类</span></li>\r\n\t\t\t<li><a href=\"";
echo $vd['root'];
echo "index.php?m=mod_b2b&c=Quick\">";
echo "<s";
echo "pan class=\"letters\">便民中心</span></a></li>\r\n\t\t\t<li><a href=\"";
echo $vd['root'];
echo "index.php?m=mod_b2b&c=Category&a=PinYin\">";
echo "<s";
echo "pan class=\"letters\">按字母分类</span></a></li>\r\n\t\t\t<li><a href=\"";
echo $vd['root'];
echo "index.php?m=mod_b2b&c=product&a=most&nrows=5000\">";
echo "<s";
echo "pan class=\"oftens\">常购买商品</span></a></li>\r\n\t\t</ul>\r\n\t</div>\r\n\t<div id=\"buycard\">\r\n\t\t<div id=\"buycardmain\">\r\n\t\t<div id=\"search\">\r\n\t\t\t<div id=\"searchlist\" style=\"DISPLAY:none;\">\r\n\t\t\t<table id=\"listtb\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\r\n\t\t\t</table>\r\n\t\t\t</div>\r\n\t\t\t<form name=\"form1\" method=\"get\" action=\"";
echo $vd['root'];
echo "index.php\">\r\n\t\t\t<input name=\"keywords\" id=\"gametype\" type=\"text\" class=\"input\" size=\"33\" value=\"\" onkeyup=\"vkeyup()\">\r\n\t\t\t<input type=\"hidden\" name=\"stype\" value=\"pname\"/>\r\n\t\t\t<input type=\"hidden\" name=\"m\" value=\"mod_b2b\"/>\r\n\t\t\t<input type=\"hidden\" name=\"c\" value=\"product\"/>\r\n\t\t\t<input type=\"hidden\" name=\"nrows\" value=\"4000\"/>\r\n\t\t\t";
echo "<s";
echo "elect name=\"typesearch\" id=\"typesearch\" class=\"search_select\">\r\n    \t  <option value=\"product\" selected>搜索商品</option>\r\n    \t  <option value=\"category\">搜索分类</option>\r\n    \t</select>\r\n    \t";
$k = array( "征途", "热血传奇", "魔兽世界", "网易", "永恒之塔" );
echo "\t\t\t<input type=\"image\" src=\"";
echo $vd['content'];
echo "images/icon_search.gif\" border=\"0\" align=\"absmiddle\">　　";
echo "<s";
echo "trong>热门搜索：</strong>";
foreach ( $k as $item )
{
				echo "<a href=\"";
				echo $vd['root'];
				echo "index.php?m=mod_b2b&c=product&stype=pname&typesearch=product&keywords=";
				echo urlencode( $item );
				echo "\">";
				echo $item;
				echo "</a>、";
}
echo "\t\t\t</form>\r\n\t\t</div>\r\n\t\t";
$icat = array( );
foreach ( $vd['cat'] as $cat )
{
				echo "    ";
				$ls = array( );
				foreach ( $vd['subcat'] as $subcat )
				{
								echo "    ";
								if ( $subcat['parentid'] == $cat['id'] && $subcat['forb2b'] == 1 )
								{
												echo "    ";
												$ls[] = $subcat;
												echo "    ";
								}
								echo "    ";
								$icat[$cat['id']] = $ls;
								echo "    ";
				}
}
echo "    \r\n    ";
$k = 0;
foreach ( $vd['cat'] as $cat )
{
				echo "    ";
				if ( $cat['forb2b'] == 1 )
				{
								echo "\t\t<table width=\"98%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n\t\t  <tr>\r\n\t\t\t<td class=\"tableleft\">\r\n\t\t\t  <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"table\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td colspan=\"5\" class=\"heardertop\">　<font color=\"";
								echo $cat['color'];
								echo "\">";
								echo $cat['name'];
								echo "</font></td>\r\n\t\t\t\t</tr>\r\n\t\t\t\t";
								$n = 0;
								$i = 0;
								$ls = $icat[$cat['id']];
								foreach ( $ls as $subcat )
								{
												echo "        ";
												if ( $i == 0 )
												{
																echo "        <tr";
																if ( $n % 2 == 1 )
																{
																				echo " class=\"hs\"";
																}
																echo ">\r\n        ";
																++$n;
												}
												++$i;
												echo "    \t  \t<td width=20% class=stline><a class='tip' href='";
												listlink( $subcat['id'] );
												echo "'>";
												if ( $vd['showtype'] == 0 )
												{
																echo "<font color=";
																echo $subcat['color'];
																echo ">";
																echo $subcat['name'];
																echo "</font>";
																if ( $subcat['abst'] != "" && $subcat['abst'] != "NULL" )
																{
																				echo "<S";
																				echo "PAN class=tip_info>";
																				echo $subcat['abst'];
																				echo "</SPAN>";
																}
												}
												else
												{
																echo "<img src=\"";
																echo $vd['root'];
																echo $vd['sc'];
																echo "upload/";
																if ( isset( $subcat['pics'] ) && $subcat['pics'] != "" && $subcat['pics'] != "NULL" )
																{
																				echo $subcat['pics'];
																}
																else
																{
																				echo "catnopic.gif";
																}
																echo "\" border=\"0\" style=\"margin:8px 0 8px 0\" alt=\"";
																echo $subcat['abst'];
																echo "\"/>";
												}
												echo "</a></td>\r\n    \t  ";
												if ( $i == 5 )
												{
																echo "    \t  </tr>\r\n    \t  ";
																$i = 0;
												}
												echo "    \t  ";
								}
								echo "    \t  \r\n    \t  ";
								if ( 0 < $i )
								{
												echo "    \t  ";
												$j = 0;
												for ( ;	$j < 5 - $i;	++$j	)
												{
																echo "    \t  <td width=\"20%\" class=stline>&nbsp;</td>\r\n    \t  ";
												}
												echo "        </tr>\r\n    \t  ";
								}
								echo "\t\t\t  </table>\r\n\t\t\t</td>\r\n\t\t  </tr>\r\n\t\t</table>\r\n\t\t<br>\r\n\t\t";
				}
				++$k;
}
echo "\t</div>\r\n\t</div>\r\n<br>\r\n</body>\r\n</html>\r\n";
?>
