{load(fhead)}
<script>var wedir = "{$vd['content']}js/";</script>
<script language="JavaScript" src="{$vd['content']}js/loadgameindex.js"></script>
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&a=Home">直销商管理系统</a> >> 我要进货 >> 收藏夹</span></div>
	<div id="hearder"><span>收藏的常购点卡</span></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="{$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"/>
			<select name="typesearch" id="typesearch" class="search_select">
    	  <option value="product" selected>搜索商品</option>
    	  <option value="category">搜索分类</option>
    	</select>
			<input type="image" src="{$vd['content']}images/icon_search.gif" border="0" align="absmiddle">　　　　　　<input onclick="showExchgMoney(this.checked);" id="IsDisplayPrice" type="checkbox"><label for="IsDisplayPrice"><strong style="color:#FF0000">显示购价</strong></label>
			</form>
		</div>
		<script>
		function showExchgMoney(checkedIn)
		{
		val = checkedIn ? 1 : 0;
	  setCookie('priceshow', val, 1);
	  setCookie('umebiz_com_0', val, 1);
		for(var i=0;i<productTable.rows.length;i++)
		productTable.rows[i].cells[5].style.display=checkedIn?"":"none";
		}
		</script>
		<form name="form2" method="post" action="index.php?m=mod_b2b&c=Fav&a=Del">
		<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
		<td class="tableleft">
			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" id="productTable">
			<tr>
			<td width="4%" class="heardertop1">&nbsp;</td>
      <td width="50%" class="heardertop1">
        商品名称</td>
      <td width="4%" class="heardertop1">
        介绍</td>
      <td width="4%" class="heardertop1">
        客服</td>  
      <td width="8%" class="heardertop1">
        面值({$vd['lang']['moneyunit']})</td>
      <td width="10%" class="heardertop1" style="display:none">
        进货价</td>
      <td width="10%" class="heardertop1">
        库存状态</td>
      <td width="10%" class="heardertop1">
        操作</td> 
      </tr>
			<!--foreach($vd['items'] as $item) {-->
			<!--if($item['pname'] != ''){-->
      <tr class="stline" onmouseover="this.className='nd'" onmouseout="this.className='stline'">
        <td><input type="checkbox" name="id[]" value="{$item['id']}"></td>
        <td height="30px" align="left"  style="<!--if($item['isbold']==1){-->font-weight:bold;<!--}-->padding-left:3px;color:<!--echo $item['namecolor']==''?'#660000':$item['namecolor'];-->">{$item['pname']}<!--if($item['owner']>0 && $item['owner'] != $vd['vip']){--><img src="{$vd['content']}images/own.gif" title="自有商品"/><!--}--></td>
        <td>
        	<img src="{$vd['content']}images/icon_productxx.gif" title="商品介绍" style="cursor:pointer" onclick="GetPinfo({$item['pid']},1)"/>
        	
			    <div id="psupinfo{$item['pid']}" style="display:none;" class="gysxx">
			    </div>
			    <div id="pinfo{$item['pid']}" style="display:none;" class="cpxx">
			    </div>
        </td>
        <td><img src="{$vd['content']}images/icon_ghs.gif" title="供货商联系方式"  style="cursor:pointer" onclick="GetPinfo({$item['pid']},0)"/></td>
        <td>{$vd['lang']['moneysymbol']}<!--echo sprintf('%.2f',$item['listprice']);--></td>
        <td style="display:none;color:#ff0000;font-weight:bold">{$vd['lang']['moneysymbol']}<span id="price_{$item['pid']}">{$item['cprice']}</span></td>
        <td style="font-weight:bold"><span id="stock_{$item['pid']}">{$item['stocks']}</span></td>
        <td><a href="javascript:openScript('{#ProductLink($item['pid'])}','',780,580,'{$item['pid']}');"><img src="{$vd['content']}images/buy{$item['ptype']}.gif"/></a></td> 
      </tr>
      <!--}}-->
			</table>
		</td>
		</tr>
		</table>
	</div>
</div>
<div id="page">
	<div id="del">
	<input name="checkall" type="button" class="buttonnor" value="全选" onClick=CheckAll(this.form)>
	<input name="checkothers" type="button" class="buttonnor" value="反选" onClick=CheckOthers(this.form)>
	<input name="Submit" type="submit" class="buttondel" value="删除">
	</div>
</div>
</form>
<input type="hidden" id="webdir" name="webdir" value="{$vd['root']}"/>
<input type="hidden" id="pids" name="pids" value="{$vd['pids']}"/>
<script src="{$vd['content']}js/pinfo.js"></script>
<script type="text/javascript">

function openScript(url,name,width,height,id)
{
	if($("stock_" + id).innerText == "库存不足")
	{
		alert('您好，商品库存不足，请联系管理员上货');
	}
  else
	{
    var Win = window.open(url,name,'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,status=no');
  }
}

if(getCookie('umebiz_com_0') == "1")
{
	obj = $("IsDisplayPrice");
	obj.checked = true;
	setCookie('priceshow', 1, 1);
}

obj = $("IsDisplayPrice");
if(getCookie('priceshow') == 1)
{
	obj.checked = true;
	showExchgMoney(obj.checked)
}

function CheckOthers(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			if (e.checked==false)
			{
				e.checked = true;
			}
			else
			{
				e.checked = false;
			}
	}
}

function CheckAll(form)
{
	for (var i=0;i<form.elements.length;i++)
	{
		var e = form.elements[i];
			e.checked = true
	}
}
</script>
</body>
</html>
