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

if ( $vd['table'] == 0 )
{
				widget( "head" );
				include( $path_cache.DS."mod_b2b_Shared_head.php" );
				echo "<body>\r\n";
				if ( $vd['inrecycle'] == 0 )
				{
								echo "<div class=\"titleDiv\" id=\"titleList\">\r\n<div style=\"float:left\"><a href=\"index.php?a=Home\"><img src=\"";
								echo $vd['sc'];
								echo "images/home.png\" style=\"vertical-align:middle\" border=\"0\"/></a></div><div style=\"float:left;padding-top:8px;padding-left:3px;\"><a href=\"index.php?a=Home\" title=\"回到后台首页\"><font color=\"#000\">桌面</font></a> ";
								echo "<s";
								echo "pan style=\"font-size:7px;\">>></span> ";
								echo "<s";
								echo "pan style=\"font-size:12px;\"><a href=\"index.php?m=mod_b2b&c=product&";
								echo $vd['op'];
								echo "\" title=\"点击重新获取商品列表资料\" onclick=\"loadDisp(1)\"><font color=\"#000\">";
								if ( $vd['allaid'] == 1 )
								{
												echo "自有";
								}
								echo "商品列表</font></a></span> (共 <b>";
								echo "<s";
								echo "pan id=\"tol1\">";
								echo $vd['totlerow'];
								echo "</span></b> 个)</div>\r\n<div style=\"float:right\"><a href=\"index.php\" onFocus=\"this.blur()\" title=\"查看商品相关帮助\"><img src=\"";
								echo $vd['sc'];
								echo "images/help.gif\" style=\"vertical-align:middle\" border=\"0\"/></a></div>\r\n</div>\r\n<div class=\"mytitle\" id=\"mytitle\">\r\n  <div class=\"titleOp4\" onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"delAllSubmit('delitems')\">";
								echo "<s";
								echo "amp title=\"先选择您要删除的行,再点此按钮\">\r\n    <div style=\"padding-top:10px;padding-left:9px;\">批量删除</div></samp>\r\n  </div>\r\n  <div class=\"titleOp4\"  onmouseover=\"if(editRealtime) return;this.className='iconbg4'\" onmouseout=\"if(editRealtime) return;this.className='titleOp4'\" onclick=\"batchEdit(this)\">";
								echo "<s";
								echo "amp title=\"批量修改所选项的记录\">\r\n    <div style=\"padding-top:10px;padding-left:10px;\">实时修改</div></samp>\r\n  </div>\r\n  <div class=\"titleOp4\" onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"loadDisp(1);window.location='?m=mod_b2b&c=PS&tpl=NoStocks&ptype=-1&aid=-1&nrows=2000'\">";
								echo "<s";
								echo "amp title=\"如果您缺货商品过多，请不要点这个按钮，此功能对电脑资源消耗过多，有可能会造成浏览器假死\">\r\n    <div style=\"padding-top:10px;padding-left:10px;\">缺货信息</div></samp>\r\n  </div>\r\n  <div class=\"titleOp2\" onmouseover=\"this.className='iconbg2'\" onmouseout=\"this.className='titleOp2'\" onclick=\"tableRefresh()\" style=\"margin-right:7px\">";
								echo "<s";
								echo "amp title=\"点击刷新本页刷新数据,并保持原来勾选状态\">\r\n    <div style=\"padding-top:10px;padding-left:9px;\">刷新</div></samp>\r\n  </div>\r\n  <div class=\"titleOp4\" onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"loadDisp(1);window.location='?m=mod_b2b&c=product&inrecycle=1&ptype=-1&aid=-1&allaid=";
								echo $vd['allaid'];
								echo "'\" style=\"width:100px\">";
								echo "<s";
								echo "amp title=\"进入商品回收箱\">\r\n    <div style=\"padding-top:10px;padding-left:3px;\">回收箱";
								echo "<s";
								echo "pan class=\"fixie8\">(</span>";
								if ( $vd['recycle_num'] )
								{
												echo "<s";
												echo "pan id=\"recycle\">";
												echo $vd['recycle_num'];
												echo "</span>";
								}
								else
								{
												echo "<s";
												echo "pan id=\"recycle\">空</span>";
								}
								echo "<s";
								echo "pan class=\"fixie8\">)</span></div></samp>\r\n  </div>\r\n  <div style=\"float:right;padding-top:4px;\">\r\n    <form action=\"index.php?m=mod_b2b&c=product&allaid=";
								echo $vd['allaid'];
								echo "&aid=";
								echo $vd['aid'];
								echo "\" method=\"post\" style=\"margin:0px 0px 0px 0px;\" onsubmit=\"return searchSubmit()\">\r\n    <input type=\"text\" name=\"keywords\" size=\"25\" value=\"";
								echo $vd['keywords'];
								echo "\" style=\"vertical-align:middle;\" class=\"custsearch\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />\r\n    ";
								echo "<s";
								echo "elect name=\"stype\" style=\"vertical-align:middle;font-size:14px;\">\r\n      ";
								option( $vd['carray'], $vd['stype'] );
								echo "    </select>\r\n    ";
								echo "<s";
								echo "elect name=\"ptype\" style=\"vertical-align:middle;font-size:14px;\">\r\n      <option value=\"-1\">所有类型</option>\r\n      ";
								option( $vd['sarray'], $vd['ptype'] );
								echo "    </select>\r\n    <input type=\"submit\" value=\"搜索 &gt;&gt;\" style=\"vertical-align:middle;\" class=\"button\"/>\r\n    </form>\r\n  </div>\r\n</div>\r\n";
				}
				else
				{
								echo "<div class=\"titleDiv\" id=\"titleList\">\r\n<div style=\"float:left\"><a href=\"index.php?a=Home\"><img src=\"";
								echo $vd['sc'];
								echo "images/home.png\" style=\"vertical-align:middle\" border=\"0\"/></a></div><div style=\"float:left;padding-top:8px;padding-left:3px;\"><a href=\"index.php?a=Home\" title=\"回到后台首页\"><font color=\"#000\">桌面</font></a> ";
								echo "<s";
								echo "pan style=\"font-size:7px;\">>></span> <a href=\"index.php?m=mod_b2b&c=product&ptype=-1&aid=-1&allaid=";
								echo $vd['allaid'];
								echo "\" title=\"商品列表\" onclick=\"loadDisp(1)\"><font color=\"#000\">";
								if ( $vd['allaid'] == 1 )
								{
												echo "自有";
								}
								echo "商品列表</font></a> ";
								echo "<s";
								echo "pan style=\"font-size:7px;\">>></span> ";
								echo "<s";
								echo "pan style=\"font-size:12px;\">回收箱</span>(共 <b>";
								echo "<s";
								echo "pan id=\"tol1\">";
								echo $vd['totlerow'];
								echo "</span></b> 个)</div>\r\n<div style=\"float:right;\"><a href=\"index.php?m=mod_home&a=Help&t=admin_b2b_product_index\" onFocus=\"this.blur()\" title=\"查看商品相关帮助\"><img src=\"";
								echo $vd['sc'];
								echo "images/help.gif\" style=\"vertical-align:middle\" border=\"0\"/></a></div>\r\n</div>\r\n<div class=\"mytitle\" id=\"mytitle\">\r\n  <div class=\"titleOp4\" onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"delAllSubmit('destroyitems')\">";
								echo "<s";
								echo "amp title=\"先选择您要销毁的会员记录,再点此按钮\">\r\n    <div style=\"padding-top:10px;padding-left:9px;\">批量销毁</div></samp>\r\n  </div>\r\n  <div class=\"titleOp2\" onmouseover=\"this.className='iconbg2'\" onmouseout=\"this.className='titleOp2'\" onclick=\"tableRefresh()\">";
								echo "<s";
								echo "amp title=\"点击刷新本页刷新数据,并保持原来勾选状态\">\r\n    <div style=\"padding-top:10px;padding-left:9px;\">刷新</div></samp>\r\n  </div>\r\n  <div class=\"titleOp2\" onmouseover=\"this.className='iconbg2'\" onmouseout=\"this.className='titleOp2'\" onclick=\"delAllSubmit('restore')\">";
								echo "<s";
								echo "amp title=\"还原回收箱状态\">\r\n    <div style=\"padding-top:10px;padding-left:9px;font-weight:bold\">还原</div></samp>\r\n  </div>\r\n  <div style=\"float:right;padding-top:4px;\">\r\n    <form action=\"index.php?m=mod_b2b&c=product&inrecycle=1&allaid=";
								echo $vd['allaid'];
								echo "&aid=";
								echo $vd['aid'];
								echo "\" method=\"post\" style=\"margin:0px 0px 0px 0px;\" onsubmit=\"return searchSubmit()\">\r\n    <input type=\"text\" name=\"keywords\" size=\"25\" value=\"";
								echo $vd['keywords'];
								echo "\" style=\"vertical-align:middle;\" class=\"custsearch\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />\r\n    ";
								echo "<s";
								echo "elect name=\"stype\" style=\"vertical-align:middle;font-size:14px;\">\r\n      ";
								option( $vd['carray'], $vd['stype'] );
								echo "    </select>\r\n    ";
								echo "<s";
								echo "elect name=\"ptype\" style=\"vertical-align:middle;font-size:14px;\">\r\n      <option value=\"-1\">所有类型</option>\r\n      ";
								option( $vd['sarray'], $vd['ptype'] );
								echo "    </select>\r\n    <input type=\"submit\" value=\"搜索 &gt;&gt;\" style=\"vertical-align:middle;\" class=\"button\"/>\r\n    </form>\r\n  </div>\r\n</div>\r\n";
				}
				echo "<div id=\"menuMask\" class=\"menuMask\" style=\"display:none\">\r\n  <form action=\"?m=mod_b2b&c=tpl&tpl=product\" method=\"post\" style=\"margin:0px\">\r\n  <div class=\"menuContent\">\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"pname\" id=\"pname\" onFocus='this.blur()'/>商品名称<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"ptagname\" id=\"ptagname\" onFocus='this.blur()'/>商品标签<br/>\r\n  <input type=\"checkbox\" name=\"id";
				echo "[]\" value=\"pid\" id=\"pid\" onFocus='this.blur()'/>编号<br/>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2B || $vd['allaid'] == 0 )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"aid\" id=\"aid\" onFocus='this.blur()'/>商品所属<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2B || $vd['allaid'] == 0 )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"pfee\" id=\"pfee\" onFocus='this.blur()'/>给系统提成<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2B || $vd['allaid'] == 0 )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"tosys\" id=\"tosys\" onFocus='this.blur()'/>销售对象<br/></span>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"ordering\" id=\"ordering\" onFocus='this.blur()'/>排序<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"pinyin\" id=\"pinyin\" onFocus='this.blur()'/>拼音<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"addstocks\" id=\"addstocks\" onFocus='this.blur()'/>添加库存<b";
				echo "r/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"sellyd\" id=\"sellyd\" onFocus='this.blur()'/>昨日销售<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tptype\" id=\"tptype\" onFocus='this.blur()'/>商品类型<br/>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2B )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"forb2b\" id=\"forb2b\" onFocus='this.blur()'/>批发是否购买<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2C )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"forshop\" id=\"forshop\" onFocus='this.blur()'/>零售是否可购买<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_YKT )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"forykt\" id=\"forykt\" onFocus='this.blur()'/>一卡通是否可购买<br/></span>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"sell\" id=\"sell\" onFocus='this.blur()'/>上架状态<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"new\" id=\"new\" onFocus='this.blur()'/>新品状态<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"hot\" id=\"hot\" onFocus='this.blur()'/>热卖状态<br/>\r\n  <i";
				echo "nput type=\"checkbox\" name=\"id[]\" value=\"remd\" id=\"remd\" onFocus='this.blur()'/>推荐状态<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tag\" id=\"tag\" onFocus='this.blur()'/>新手推荐<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_YKT )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"ykttag\" id=\"ykttag\" onFocus='this.blur()'/>一卡通前台标签<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_YKT )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"yktpoints\" id=\"yktpoints\" onFocus='this.blur()'/>一卡通所需点数<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_YKT )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"yktcard\" id=\"yktcard\" onFocus='this.blur()'/>一卡通特征码<br/></span>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"sup\" id=\"sup\" onFocus='this.blur()'/>供货状态<br/>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2B )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"checked\" id=\"checked\" onFocus='this.blur()'/>审核状态<br/></span>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"html\" id=\"html\" onFocus='this.blur()'/>静态页面<br/>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_YKT )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"ad\" id=\"ad\" onFocus='this.blur()'/>商品页面广告<br/></span>\r\n  ";
				echo "<s";
				echo "pan";
				if ( !UB_B2C )
				{
								echo " style=\"display:none\"";
				}
				echo "><input type=\"checkbox\" name=\"id[]\" value=\"review\" id=\"review\" onFocus='this.blur()'/>商品评论查看<br/></span>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"copy\" id=\"copy\" onFocus='this.blur()'/>复制商品<br/>\r\n  </div>\r\n  <div class=\"menuOp\">\r\n  <input type=\"submit\" value=\"保存\" class=\"button\"/>\r\n  <input type=\"button\" value=\"重置\" class=\"button\" onclick=\"tInfoReset()\"/>\r\n  <input type=\"button\" value=\"取消\"";
				echo " class=\"button\" onclick=\"setMenuMask()\"/>\r\n  </div>\r\n  </form>\r\n</div>\r\n\r\n<table id=\"thead\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td width=\"30px\">\r\n      <input name=\"chkall\" id=\"chkall\" type=\"checkbox\" class=\"checkbox\" onclick=\"CheckAll(this)\" onFocus='this.blur()'/></td>\r\n";
				echo "<td width=\"200px\">";
				echo "<s";
				echo "pan class=\"canedit\">商品名称</span></td>\n<td width=\"40px\"><b>编号</b></td>\n";
				if ( UB_B2B && $vd['allaid'] == 1 )
				{
								echo "<td width=\"65px\"><b>所属</b></td>";
				}
				if ( UB_B2B && $vd['allaid'] == 1 )
				{
								echo "<td width=\"80px\">";
								echo "<s";
								echo "pan class=\"canedit\">给系统提成</span></td>";
				}
				if ( UB_B2B && $vd['allaid'] == 1 )
				{
								echo "<td width=\"65px\">";
								echo "<s";
								echo "pan class=\"canedit\">销售对象</span></td>";
				}
				echo "<td width=\"35px\">";
				echo "<s";
				echo "pan class=\"canedit\">排序</span></td>\n<td width=\"65px\"><b>添加库存</b></td>\n<td width=\"65px\"><b>商品类型</b></td>\n";
				if ( UB_B2B )
				{
								echo "<td width=\"22px\"><a href=\"index.php?m=mod_b2b&c=Product&ptype=-1&aid=-1&stype=forb2b&keywords=1\">";
								echo "<s";
								echo "pan class=\"canedit\"><u>批</u></span></a></td>";
				}
				if ( UB_B2C )
				{
								echo "<td width=\"22px\"><a href=\"index.php?m=mod_b2b&c=Product&ptype=-1&aid=-1&stype=forshop&keywords=1\">";
								echo "<s";
								echo "pan class=\"canedit\"><u>零</u></span></a></td>";
				}
				if ( UB_YKT )
				{
								echo "<td width=\"22px\"><a href=\"index.php?m=mod_b2b&c=Product&ptype=-1&aid=-1&stype=forykt&keywords=1\">";
								echo "<s";
								echo "pan class=\"canedit\"><u>一</u></span></a></td>";
				}
				echo "<td width=\"22px\"><a href=\"index.php?m=mod_b2b&c=Product&ptype=-1&aid=-1&stype=sell&keywords=1\">";
				echo "<s";
				echo "pan class=\"canedit\"><u>卖</u></span></a></td>\n";
				if ( UB_B2B )
				{
								echo "<td width=\"22px\"><a href=\"index.php?m=mod_b2b&c=Product&ptype=-1&aid=-1&stype=checked&keywords=1\">";
								echo "<s";
								echo "pan class=\"canedit\"><u>审</u></span></a></td>";
				}
				echo "<td width=\"35px\"><b>静态</b></td>\n";
				echo "    <td width=\"22px\">\r\n      <img src=\"";
				echo $vd['sc'];
				echo "images/rmb.png\"/>\r\n    </td>\r\n    <td width=\"22px\">\r\n      <img src=\"";
				echo $vd['sc'];
				echo "images/icon_edit.gif\"/>\r\n    </td>\r\n    <td width=\"22px\">\r\n      ";
				if ( $vd['inrecycle'] == 0 )
				{
								echo "      <img src=\"";
								echo $vd['sc'];
								echo "images/icon_trash.gif\"/>\r\n      ";
				}
				else
				{
								echo "      <img src=\"";
								echo $vd['sc'];
								echo "images/destroy.gif\"/>\r\n      ";
				}
				echo "    </td>\r\n    <td width=\"38px\"><b>进货</b></td>\r\n    <td class=\"endtd\">\r\n      <div class=\"infoicon\" onclick=\"setMenuMask()\"><b><u>>></u></b></div>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<div id=\"tip\" style=\"display:none\">\r\n  ";
				echo "<s";
				echo "pan id=\"tiptable\">此页中所有 <b>";
				echo "<s";
				echo "pan id=\"ncheck\">";
				echo $vd['nrows'] < $vd['totlerow'] ? $vd['nrows'] : $vd['totlerow'];
				echo "</span></b> 条记录已选中 </span> \r\n  ";
				echo "<s";
				echo "pan id=\"tipspan\">\r\n    <a href=\"javascript:CheckTotle(";
				echo $vd['totlerow'];
				echo ",0)\">点此选择当前列表中所有 <b>";
				echo $vd['totlerow'];
				echo "</b> 条记录>></a>\r\n  </span>\r\n</div>\r\n<div id=\"content\">\r\n";
}
echo "  ";
if ( $vd['totlerow'] == 0 )
{
				echo "  <table  width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td align=\"right\" colspan=\"20\">无任何记录</td>\r\n  </tr>\r\n  </table>\r\n  ";
}
echo "  <form id=\"cform\" name=\"form\" method=\"post\" action=\"index.php?m=mod_b2b&c=product&a=ItemDeal\" onsubmit=\"return Check();\">\r\n  <table id=\"tbody\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  \r\n  ";
foreach ( $vd['items'] as $item )
{
				echo "  <tr onmouseover=\"setoverbg(this)\" onmouseout=\"setoutbg(this)\">\r\n    <td width=\"30px\">\r\n      <input type=\"checkbox\" name=\"id[]\" id=\"idchk_";
				echo $item['pid'];
				echo "\" class=\"checkbox\" value=\"";
				echo $item['pid'];
				echo "\" onclick=\"CheckThis(this)\" onFocus='this.blur()'></input>\r\n    </td>\r\n";
				echo "<td width=\"200px\"><nobr>";
				echo "<s";
				echo "amp title=\"";
				echo $item['pname'];
				echo "\">";
				echo "<s";
				echo "pan onclick=\"toInput(this,";
				echo $item['pid'];
				echo ",'pname')\">";
				echo $item['pname'];
				echo "</span></samp></nobr></td>\n<td width=\"40px\">";
				echo $item['pid'];
				echo "</td>\n";
				if ( UB_B2B && $vd['allaid'] == 1 )
				{
								echo "<td width=\"65px\"><a href=\"index.php?m=mod_b2b&c=PS&stype=aid&keywords=";
								echo $item['aid'];
								echo "\"><font color=\"#ff0000\">";
								displaycode( $item['aid'] );
								echo "</font></a></td>";
				}
				if ( UB_B2B && $vd['allaid'] == 1 )
				{
								echo "<td width=\"80px\">";
								echo "<s";
								echo "pan onclick=\"toInput(this,";
								echo $item['pid'];
								echo ",'pfee')\">";
								echo $item['pfee'] == "" ? "--" : $item['pfee'];
								echo "</span></td>";
				}
				if ( UB_B2B && $vd['allaid'] == 1 )
				{
								echo "<td width=\"65px\">";
								if ( $item['tosys'] == 1 )
								{
												echo "<font color=\"#ff0000\">全体用户</font>";
								}
								else
								{
												echo "下级用户";
								}
								echo "</td>";
				}
				echo "<td width=\"35px\">";
				echo "<s";
				echo "pan onclick=\"toInput(this,";
				echo $item['pid'];
				echo ",'ordering')\">";
				echo $item['ordering'] == "" ? "--" : $item['ordering'];
				echo "</span></td>\n<td width=\"65px\">";
				pcardsptype( $item['ptype'], $item['pid'] );
				echo "</td>\n<td width=\"65px\">";
				producttype( $item['ptype'] );
				echo "</td>\n";
				if ( UB_B2B )
				{
								echo "<td width=\"22px\"><img src=\"";
								echo $vd['sc'];
								toggleimgsrc( $item['forb2b'] );
								echo "\" onclick=\"toToggle(this,";
								echo $item['pid'];
								echo ",'forb2b')\" alt=\"点击此图片即可修改状态\" onFocus=\"this.blur()\" class=\"mousehand\"/></td>";
				}
				if ( UB_B2C )
				{
								echo "<td width=\"22px\"><img src=\"";
								echo $vd['sc'];
								toggleimgsrc( $item['forshop'] );
								echo "\" onclick=\"toToggle(this,";
								echo $item['pid'];
								echo ",'forshop')\" alt=\"点击此图片即可修改状态\" onFocus=\"this.blur()\" class=\"mousehand\"/></td>";
				}
				if ( UB_YKT )
				{
								echo "<td width=\"22px\">";
								if ( $item['ptype'] < 99 )
								{
												echo "<img src=\"";
												echo $vd['sc'];
												toggleimgsrc( $item['forykt'] );
												echo "\" onclick=\"toToggle(this,";
												echo $item['pid'];
												echo ",'forykt')\" alt=\"点击此图片即可修改状态\" onFocus=\"this.blur()\" class=\"mousehand\"/>";
								}
								else
								{
												echo "--";
								}
								echo "</td>";
				}
				echo "<td width=\"22px\"><img src=\"";
				echo $vd['sc'];
				toggleimgsrc( $item['sell'] );
				echo "\" onclick=\"toToggle(this,";
				echo $item['pid'];
				echo ",'sell')\" alt=\"点击此图片即可修改状态\" onFocus=\"this.blur()\" class=\"mousehand\"/></td>\n";
				if ( UB_B2B )
				{
								echo "<td width=\"22px\"><img src=\"";
								echo $vd['sc'];
								toggleimgsrc( $item['checked'] );
								echo "\" onclick=\"toToggle(this,";
								echo $item['pid'];
								echo ",'checked')\" alt=\"点击此图片即可修改状态！请务必保证您已经设置供货价格！\" onFocus=\"this.blur()\" class=\"mousehand\"/></td>";
				}
				echo "<td width=\"35px\"><a href=\"index.php?m=mod_b2b&c=PS&a=Html&pid=";
				echo $item['pid'];
				echo "&catid=";
				echo $item['catid'];
				echo "&oldcatid=";
				echo $item['catid'];
				echo "&oldpinyin=";
				echo $item['pinyin'];
				echo "&pinyin=";
				echo $item['pinyin'];
				echo "\">生成</a></td>\n";
				echo "    <td width=\"22px\">\r\n      <a href=\"index.php?m=mod_b2b&c=order&stype=pid&keywords=";
				echo $item['pid'];
				echo "&aid=-1&by=1&allaid=";
				echo $vd['allaid'];
				echo "\" title=\"查看销售情况\" onclick=\"loadDisp(1)\"><img src=\"";
				echo $vd['sc'];
				echo "images/rmb.png\"/></a>\r\n    </td>\r\n    <td width=\"22px\">\r\n      <a href=\"index.php?m=mod_b2b&c=PS&a=detail&ubzpid=";
				echo $item['pid'];
				echo "\" title=\"编辑商品\" onclick=\"loadDisp(1)\"><img src=\"";
				echo $vd['sc'];
				echo "images/icon_edit.gif\"/></a>\r\n    </td>\r\n    <td width=\"22px\">\r\n      ";
				if ( $vd['inrecycle'] == 0 )
				{
								echo "      <img src=\"";
								echo $vd['sc'];
								echo "images/icon_trash.gif\" onclick=\"delSubmit(";
								echo $item['pid'];
								echo ",'delitems')\" alt=\"删除商品,可以从回收恢复\" style=\"cursor:pointer\"/>\r\n      ";
				}
				else
				{
								echo "      <img src=\"";
								echo $vd['sc'];
								echo "images/destroy.gif\" onclick=\"delSubmit(";
								echo $item['pid'];
								echo ",'destroyitems')\" alt=\"销毁商品,相关信息也会被销毁,无法恢复\" style=\"cursor:pointer\"/>\r\n      ";
				}
				echo "    </td>\r\n    <td width=\"38px\">\r\n    \t";
				if ( $item['ptype'] < 99 && $item['sup'] != 1 )
				{
								echo "      <a href=\"?m=mod_b2b&c=sup&a=sup&ubzpid=";
								echo $item['pid'];
								echo "\">\r\n      <font color=\"#00875A\">管理</font>\r\n      </a> \r\n      ";
				}
				else
				{
								echo "      <font color=\"#cccccc\">管理</font>\r\n      ";
				}
				echo "    </td>\r\n    <td class=\"endtd\"></td>\r\n  </tr>\r\n  ";
}
echo "  \r\n</table>\r\n</form>\r\n<input type=\"hidden\" value=\"";
echo $vd['totlepage'];
echo "\" id=\"totlePage\"/>\r\n<input type=\"hidden\" value=\"";
echo $vd['thispage'];
echo "\" id=\"thisPage\"/>\r\n";
if ( $vd['inrecycle'] == 0 )
{
				echo "<input type=\"hidden\" value=\"";
				echo $vd['recycle_num'];
				echo "\" id=\"recycle_num\"/>\r\n";
}
if ( $vd['table'] == 0 )
{
				echo "</div>\r\n\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=PS&a=deals&";
				echo $vd['op'];
				echo "\" id=\"op\"/>\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=product&istable=1&";
				echo $vd['op'];
				echo "\" id=\"url\"/>\r\n<input type=\"hidden\" value=\"";
				echo $vd['op'];
				echo "\" id=\"params\"/>\r\n<div style=\"position:absolute;bottom:0px\">\r\n  <div class=\"tbBottom\" id=\"tbBottom\">\r\n    <div style=\"float:left;padding-top:8px;\">\r\n      ";
				echo "<s";
				echo "trong> 总计 <font color=\"#ff0000\">";
				echo "<s";
				echo "pan id=\"tol2\">";
				echo $vd['totlerow'];
				echo "</span></font> 条</strong>\r\n    </div>\r\n    <div style=\"float:right;text-align:right;\">\r\n    <form id=\"actionform\" method=\"post\" action=\"index.php?m=mod_b2b&c=product&";
				echo $vd['op'];
				echo "\" style=\"margin:0px;\" onsubmit=\"loadDisp(1)\">\r\n    <div id=\"page\"></div>\r\n    <div style=\"float:left;margin-top:3px\">\r\n      每页显示<input type=\"text\" name=\"nrows\" size=\"2\" value=\"";
				echo $vd['nrows'];
				echo "\" class=\"pagetxt\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" /> 个 \r\n      到第<input type=\"text\" name=\"page\" size=\"2\" value=\"";
				echo $vd['thispage'];
				echo "\" class=\"pagetxt\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />页<input type=\"submit\" value=\" 确 定 &gt;&gt;\" class=\"pagesub\" />\r\n    </div>\r\n    </form>\r\n    </div>\r\n  </div>\r\n</div>\r\n<div id=\"load\" style=\"display:none;\">\r\n  <div id=\"loadcontent\" >页面加载中请稍等...</div>\r\n</div>\r\n</body>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//第一参数，后边保留显示的列数\r\n//第二参数，除最后一个参数外的保留参数的总宽度\r\ntRows   = ";
				echo $vd['nrows'] < $vd['totlerow'] ? $vd['nrows'] : $vd['totlerow'];
				echo ";\r\ntInfoA  = Array(4,132);\r\ntotleRows = ";
				echo $vd['totlerow'];
				echo ";\r\n";
				if ( $vd['inrecycle'] )
				{
								echo "deltxt  = \"如果销毁商品记录么,商品相关信息也会被销毁(包括订单信息，充值信息，留言信息等),且无法恢复,您确定进行销毁操作吗？\";\r\nthisaction = \"销毁\";\r\n";
				}
				else
				{
								echo "deltxt  = \"您确定进行删除操作吗？删除后您还可以从回收箱进行恢复\";//\"如果删除商品,商品相关信息也会被删除(包括订单信息，充值信息，留言信息等),您确定进行删除操作吗？\";\r\nthisaction = \"删除\";\r\n";
				}
				echo "thisdel = 0;\r\nstatistics = 0;\r\nvar resizeidx = 1;\r\n</script>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//当前表格配置\r\n";
				echo " tInfo = Array('pname','pid','aid','pfee','tosys','ordering','addstocks','tptype','forb2b','forshop','forykt','sell','checked','html');\n";
				echo "</script>\r\n";
				echo "<s";
				echo "cript src=\"";
				echo $vd['sc'];
				echo "js/tools.js\" type=\"text/javascript\"></script>\r\n</html>\r\n";
}
?>
