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

$ishistory = intval( request( "ishistory" ) );
if ( $vd['table'] == 0 )
{
				widget( "head" );
				include( $path_cache.DS."mod_b2b_Shared_head.php" );
				echo "<body>\r\n  \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> <font color=\"#000\">";
								if ( $ishistory == 1 )
								{
												echo "历史";
								}
								echo "订单列表</font> (共 <b>";
								echo "<s";
								echo "pan id=\"tol1\">";
								echo $vd['totlerow'];
								echo "</span></b> 个)</div>\r\n<div style=\"float:right;padding-top:8px\">";
								echo "<s";
								echo "pan style=\"font-size:12px;color:#ff0000;font-weight:bold\">";
								echo $vd['startdate'];
								echo "</span> 至 ";
								echo "<s";
								echo "pan style=\"font-size:12px;color:#ff0000;font-weight:bold\">";
								echo $vd['enddate'];
								echo "</span> [ ";
								echo "<s";
								echo "pan onclick=\"disp('adddiv')\" style=\"font-size:12px;color:#0000ff;cursor:pointer\" />修改时间段</span> ]</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=\"delAllSubmit2(0, '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=\"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=\"titleOp4\"  onmouseover=\"if(editRealtime) return;this.className='iconbg4'\" onmouseout=\"if(editRealtime) return;this.className='titleOp4'\" onclick=\"batchEdit(this)\" style=\"margin-right:7px\">";
								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=Order&inrecycle=1&by=1&aid=";
								echo $vd['aid'];
								echo "&ishistory=";
								echo $ishistory;
								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=Order&by=1&allaid=";
								echo $vd['allaid'];
								echo "&aid=";
								echo $vd['aid'];
								echo "&ishistory=";
								echo $ishistory;
								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['sarray'], $vd['stype'] );
								echo "    </select>\r\n    <input type=\"submit\" value=\"搜 索\" style=\"vertical-align:middle;\" class=\"btn27_2\"/>&nbsp;<input type=\"button\" value=\"筛 选\" style=\"vertical-align:middle;\"  onclick=\"disp('adddiv')\" class=\"btn27_2\"/>\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=Order&by=1\"<font color=\"#000\">订单列表</font></a> ";
								echo "<s";
								echo "pan style=\"font-size:7px;\">>></span> <font color=\"#000\">回收箱</font>(共 <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_order_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=\"delAllSubmit2(0, '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=Order&inrecycle=1&allaid=";
								echo $vd['allaid'];
								echo "&aid=";
								echo $vd['aid'];
								echo "&ishistory=";
								echo $ishistory;
								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['sarray'], $vd['stype'] );
								echo "    </select>\r\n    <input type=\"submit\" value=\"搜 索\" style=\"vertical-align:middle;\" class=\"button\"/><input type=\"button\" value=\"&gt;&gt;\" onFocus=\"this.blur()\" onclick=\"disp('adddiv')\" class=\"button\" style=\"vertical-align:middle;border-left:0px;padding-left:1px\"/>\r\n    </form>\r\n  </div>\r\n</div>\r\n";
				}
				echo "<div id=\"cdiv\" style=\"position:absolute;top:30px;left:30px;;width:480px;display:none\">\r\n  <div style=\"padding:20px;background:#F1F5FA;border:5px #75BCD7 solid\">\r\n  <div style=\"font-size:14px;font-weight:bold;padding:5px;float:left\">请输入后台充值密码</div>\r\n  <div style=\"float:right;\"><img src=\"";
				echo $vd['sc'];
				echo "images/destroy.gif\" onclick=\"disp('cdiv')\" style=\"cursor:pointer\"/></div>\r\n    <table id=\"checktable\" width=\"100%\" style=\"border-collapse: collapse;\">\r\n      <tr>\r\n        <td width=\"25%\"\">后台充值密码</td>\r\n        <td width=\"75%\"><input type=\"password\" id=\"tradepwd\" name=\"tradepwd\" value=\"\"/></td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"25%\"\">提示</td>\r\n        <td width=\"75%\" style=\"font-size:12px\">如?;
				echo "境灰淄瓿苫蛘哒诮灰椎亩┑ィ莆裢臣浦薪嵘俚裟潜识┑サ氖睿ㄒ椴灰境饫喽┑?/td>\r\n      </tr>\r\n      <tr>\r\n        <td width=\"25%\" style=\"height:50px;\"></td>\r\n        <td width=\"75%\">\r\n          <input type=\"hidden\" name=\"divid\" id=\"divid\" value=\"0\">\r\n          <input type=\"hidden\" name=\"divmethod\" id=\"divmethod\" value=\"1\">\r\n          <input type=\"submit\" value=\"我知道，确认提交\" class=\"button\"";
				echo " onclick=\"CheckPwd()\"/> <input type=\"reset\" value=\"重置\" class=\"button\"/> <input type=\"button\" value=\"取消\" class=\"button\" onclick=\"disp('cdiv')\"/>\r\n        </td>\r\n      </tr>\r\n    </table>\r\n  </div>\r\n</div>\r\n<div id=\"contentTip\" style=\"display:none;\"></div>\r\n<div id=\"adddiv\" style=\"position:absolute;top:100px;left:230px;;width:450px;display:none\">\r\n  <div class=\"popbg\">\r\n  <div class=\"poptitle\">高级搜索</div>";
				echo "\r\n  <div class=\"popright\"><img src=\"";
				echo $vd['sc'];
				echo "images/close.jpg\" onclick=\"disp('adddiv')\" style=\"cursor:pointer\"/></div>\r\n  <form id=\"advsearch\" action=\"index.php?m=mod_b2b&c=Order&inrecycle=";
				echo $vd['inrecycle'];
				echo "&allaid=";
				echo $vd['allaid'];
				echo "&aid=";
				echo $vd['aid'];
				if ( request( "payment" ) != "" )
				{
								echo "&payment=";
								echo intval( request( "payment" ) );
				}
				echo "&ishistory=";
				echo $ishistory;
				echo "\" method=\"post\" onsubmit=\"return searchSubmit()\" style=\"clear:both\">\r\n  <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n    <tr>\r\n      <td class=\"poplt\">起始日期</td>\r\n      <td width=\"80%\">\r\n        <input type=\"text\" name=\"startdate\" size=\"18\" value=\"";
				echo $vd['startdate'];
				echo "\" style=\"vertical-align:middle;\" id=\"startdate\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />\r\n        <img src=\"";
				echo $vd['sc'];
				echo "images/calender.gif\" onclick=\"dateDialog('startdate')\" style=\"vertical-align:middle;cursor:pointer;margin-left:0px;\"/>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"poplt\">终止日期</td>\r\n      <td>\r\n        <input type=\"text\" name=\"enddate\" size=\"18\" value=\"";
				echo $vd['enddate'];
				echo "\" style=\"vertical-align:middle;\"  id=\"enddate\" onMouseOver=\"iEvent('mouseover',this)\" onFocus=\"iEvent('focus',this)\" onBlur=\"iEvent('blur',this)\" onMouseOut=\"iEvent('mouseout',this)\" />\r\n        <img src=\"";
				echo $vd['sc'];
				echo "images/calender.gif\" onclick=\"dateDialog('enddate')\" style=\"vertical-align:middle;cursor:pointer;margin-left:0px;\"/>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"poplt\">关键词</td>\r\n      <td>\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      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"poplt\">搜索类型</td>\r\n      <td>\r\n        ";
				echo "<s";
				echo "elect name=\"stype\" style=\"vertical-align:middle;font-size:14px;\">\r\n        ";
				option( $vd['sarray'], $vd['stype'] );
				echo "        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"poplt\">订单状态</td>\r\n      <td>\r\n        ";
				echo "<s";
				echo "elect name=\"optype\" style=\"vertical-align:middle;font-size:14px;\">\r\n        ";
				option( $vd['oarray'], $vd['otype'] );
				echo "        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"poplt\">对应平台</td>\r\n      <td>\r\n        ";
				echo "<s";
				echo "elect name=\"comefrom\" style=\"vertical-align:middle;font-size:14px;\">\r\n        ";
				option( $vd['cfarray'], $vd['comefrom'] );
				echo "        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td style=\"height:50px;padding-top:15px;text-align:right\" colspan=\"2\">\r\n        <input type=\"hidden\" name=\"inrecycle\" value=\"";
				echo $vd['inrecycle'];
				echo "\"/>\r\n        <input type=\"hidden\" id=\"export\" name=\"export\" value=\"0\"/>\r\n        <input type=\"submit\" value=\"搜索\" class=\"btn2\" onclick=\"setAct(0)\"/>\r\n        <input type=\"button\" value=\"导出excel\" class=\"btn4\" onclick=\"setAct(1)\" />\r\n        <input type=\"button\" value=\"导出csv\" class=\"btn4\" onclick=\"setAct(2)\"/>\r\n        <input type=\"button\" value=\"取消\" onclick=\"disp('adddiv')\" class=\"btn2\"/>\r\n      ";
				echo "</td>\r\n    </tr>\r\n  </table>\r\n  </form>\r\n  </div>\r\n</div>\r\n<div id=\"menuMask\" class=\"menuMask\" style=\"display:none\">\r\n  <form action=\"?m=mod_b2b&c=Tpl&tpl=order\" 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=\"tpid\" id=\"tpid\" onFocus='this.blur()'/>商?;
				echo "繁嗪?br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"ordno\" id=\"ordno\" onFocus='this.blur()'/>订单号<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"ptype\" id=\"ptype\" onFocus='this.blur()'/>商品类型<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"remarks\" id=\"remarks\" onFocus='this.blur()'/>订单备注<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cname\" id=\"cname\" onFocus='this.blur()'/>用户名<br/";
				echo ">\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cqq\" id=\"cqq\" onFocus='this.blur()'/>QQ号<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cmail\" id=\"cmail\" onFocus='this.blur()'/>邮箱<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"ctel\" id=\"ctel\" onFocus='this.blur()'/>电话<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cip\" id=\"cip\" onFocus='this.blur()'/>下单者IP<br/>\r\n  <input type=\"checkbox\" nam";
				echo "e=\"id[]\" value=\"qty\" id=\"qty\" onFocus='this.blur()'/>数量<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cprice\" id=\"cprice\" onFocus='this.blur()'/>售价<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"dollars\" id=\"dollars\" onFocus='this.blur()'/>总金额<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"profit\" id=\"profit\" onFocus='this.blur()'/>总利润<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"";
				echo "price\" id=\"price\" onFocus='this.blur()'/>商品进货价<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"payment\" id=\"payment\" onFocus='this.blur()'/>支付方式<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"orddate\" id=\"orddate\" onFocus='this.blur()'/>下单时间<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"state\" id=\"state\" onFocus='this.blur()'/>订单状态<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value";
				echo "=\"view\" id=\"view\" onFocus='this.blur()'/>查看订单<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"aid\" id=\"aid\" onFocus='this.blur()'/>所属<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"czaccount\" id=\"czaccount\" onFocus='this.blur()'/>充值用户<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"czarea1\" id=\"czarea1\" onFocus='this.blur()'/>充值区域<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"czar";
				echo "ea2\" id=\"czarea2\" onFocus='this.blur()'/>充值服务器<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cztype\" id=\"cztype\" onFocus='this.blur()'/>计费方式<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"czother\" id=\"czother\" onFocus='this.blur()'/>帐号类型<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"quickcheck\" id=\"quickcheck\" onFocus='this.blur()'/>快速提交<br/>\r\n  <input type=\"checkbox\" name=\"id[";
				echo "]\" value=\"suc\" id=\"suc\" onFocus='this.blur()'/>确认成功<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"cz\" id=\"cz\" onFocus='this.blur()'/>代充<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tadmin\" id=\"tadmin\" 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=\"tInfo";
				echo "Reset()\"/>\r\n  <input type=\"button\" value=\"取消\" 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=\"160px\"><b>订购商品</b></td>\n<td width=\"120px\"><b>操作者</b></td>\n<td width=\"40px\"><b>数量</b></td>\n<td width=\"75px\"><b>支付方式</b></td>\n<td width=\"140px\"><b>下单时间</b></td>\n<td width=\"95px\"><b>订单状态</b></td>\n<td width=\"22px\"><img src=\"";
				echo $vd['sc'];
				echo "images/icon_view.gif\"/></td>\n<td width=\"35px\"><b>提交</b></td>\n<td width=\"35px\"><b>成功</b></td>\n<td width=\"40px\"><b>代充</b></td>\n";
				echo "    <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 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=Order&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      ";
				if ( $item['sup'] == 1 && $item['ordstate'] == 1 )
				{
								echo "      ";
				}
				else
				{
								echo "      <input type=\"checkbox\" name=\"id[]\" id=\"idchk_";
								echo $item['id'];
								echo "\" class=\"checkbox\" onclick=\"CheckThis(this)\" onFocus='this.blur()' value=\"";
								echo $item['id'];
								echo "\" />\r\n      ";
				}
				echo " \r\n    </td>\r\n";
				echo "<td width=\"160px\"><nobr>";
				echo "<s";
				echo "amp title=\"";
				echo $item['pname'];
				echo "\">";
				echo $item['pname'];
				echo "</samp></nobr></td>\n<td width=\"120px\"><a href=\"index.php?m=mod_b2b&c=order&comefrom=";
				echo $item['comefrom'];
				echo "&keywords=";
				echo $item['cname'];
				echo "&stype=cname&by=1\" onclick=\"loadDisp(1)\" title=\"点击查看这个用户购买的所有的单子\">";
				echo $item['cname'];
				echo "</a></td>\n<td width=\"40px\">";
				echo $item['qty'];
				echo "</td>\n<td width=\"75px\">";
				getpayment( $item['payment'], $item['ordno'] );
				echo "</td>\n<td width=\"140px\">";
				echo $item['orddate'];
				echo "</td>\n<td width=\"95px\">";
				orderstate( $item['ordstate'], $item['ptype'] );
				echo "</td>\n<td width=\"22px\"><a href=\"index.php?m=mod_b2b&c=order&a=detail&ubzordno=";
				echo $item['ordno'];
				echo "&ishistory=";
				echo intval( request( "ishistory" ) );
				echo "\" title=\"查看订单\" onFocus=\"this.blur()\" onclick=\"loadDisp(1)\"><img src=\"";
				echo $vd['sc'];
				echo "images/icon_view.gif\"/></a></td>\n<td width=\"35px\">";
				if ( $item['ordstate'] != 1 && $item['ptype'] == 2 )
				{
								echo "<img src=\"";
								echo $vd['sc'];
								toggleimgsrc( $item['ordstate'] == 1 ? 0 : 1 );
								echo "\" />";
				}
				else
				{
								echo "<img src=\"";
								echo $vd['sc'];
								toggleimgsrc( $item['ordstate'] == 1 ? 0 : 1 );
								echo "\" onclick=\"toToggle(this,'";
								echo $item['ordno'];
								echo "','ordstate')\" alt=\"点此马上修改订单状态为交易完成状态！\" onFocus=\"this.blur()\" class=\"mousehand\"/>";
				}
				echo "</td>\n<td width=\"35px\">";
				if ( $item['sup'] != 1 && $item['ptype'] == 2 )
				{
								if ( $item['ordstate'] == 2 )
								{
												echo "<img src=\"";
												echo $vd['sc'];
												toggleimgsrc( $item['ordstate'] == 2 ? 1 : 0 );
												echo "\" />";
								}
								else
								{
												echo "<img src=\"";
												echo $vd['sc'];
												toggleimgsrc( $item['ordstate'] == 2 ? 1 : 0 );
												echo "\" onclick=\"toToggle(this,'";
												echo $item['ordno'];
												echo "','ordstate3')\" alt=\"点此马上修改订单状态为交易完成状态！\" onFocus=\"this.blur()\" class=\"mousehand\"/>";
								}
				}
				else
				{
								echo "--";
				}
				echo "</td>\n<td width=\"40px\">";
				if ( $item['sup'] != 1 && $item['ptype'] == 2 )
				{
								echo "<input type=\"button\" value=\"代充\" class=\"button\" style=\"width:35px;\" onclick=\"window.location='?m=mod_b2b&c=order&a=cetail&ubzordno=";
								echo $item['ordno'];
								echo "'\"/>";
				}
				else
				{
								echo "--";
				}
				echo "</td>\n";
				echo "    <td width=\"22px\">\r\n      ";
				if ( $vd['inrecycle'] == 0 )
				{
								echo "      <img src=\"";
								echo $vd['sc'];
								echo "images/icon_trash.gif\" onclick=\"delAllSubmit2(";
								echo $item['id'];
								echo ",'delitems')\" alt=\"删除订单,可以从回收箱恢复\" style=\"cursor:pointer\"/>\r\n      ";
				}
				else
				{
								echo "      <img src=\"";
								echo $vd['sc'];
								echo "images/destroy.gif\" onclick=\"delAllSubmit2(";
								echo $item['id'];
								echo ",'destroyitems')\" alt=\"销毁订单,无法恢复\" style=\"cursor:pointer\"/>\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=Order&a=Deals&";
				echo $vd['op'];
				echo "&ishistory=";
				echo $ishistory;
				echo "\" id=\"op\"/>\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=Order&istable=1&";
				echo $vd['op'];
				echo "&ishistory=";
				echo $ishistory;
				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=Order&";
				echo $vd['op'];
				echo "&ishistory=";
				echo $ishistory;
				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(1,29);\r\ntotleRows = ";
				echo $vd['totlerow'];
				echo ";\r\n";
				if ( $vd['inrecycle'] )
				{
								echo "deltxt  = \"如果您销毁的订单含有成功订单，有可能会影响到您的财务统计，建议不要销毁，并把他还原\\n\\n假如销毁，对应的订单将无法恢复，您确定进行销毁操作吗？\";\r\nthisaction = \"销毁\";\r\n";
				}
				else
				{
								echo "deltxt  = \"您确定进行删除操作吗？删除后您还可以从回收箱进行恢复\";//\"如果删除用户,用户相关信息也会被删除(包括订单信息，充值信息，留言信息等),您确定进行删除操作吗？\";\r\nthisaction = \"删除\";\r\n";
				}
				echo "thisdel = 0;\r\nonedel  = 0;\r\nsc = \"";
				echo $vd['sc'];
				echo "\";\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','cname','qty','payment','orddate','state','view','quickcheck','suc','cz');\n";
				echo "function copyToClipboard(text){\r\n  \r\n  if(text==null||text=='undefined')\r\n  return;\r\n  \r\n  if (window.clipboardData)\r\n  {\r\n    window.clipboardData.setData(\"Text\", text);\r\n  }\r\n  else if (window.netscape)\r\n  {\r\n  netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');\r\n  var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipb";
				echo "oard);\r\n  if (!clip) return;\r\n\r\n  var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);\r\n  if (!trans) return;\r\n  trans.addDataFlavor('text/unicode');\r\n  \r\n  var str = new Object();\r\n  var len = new Object();\r\n  \r\n  var str = Components.classes[\"@mozilla.org/supports-string;1\"]\r\n               .createInstance(Components.interfac";
				echo "es.nsISupportsString);\r\n  \r\n  var copytext=text;\r\n  \r\n  str.data=copytext;\r\n  \r\n  trans.setTransferData(\"text/unicode\",str,copytext.length*2);\r\n  \r\n  var clipid=Components.interfaces.nsIClipboard;\r\n  \r\n  if (!clip) return ;\r\n  \r\n  clip.setData(trans,null,clipid.kGlobalClipboard);\r\n  \r\n  }\r\n  \r\n  alert(\"已复制成功，请直接粘贴\\n\"+text);\r\n}\r\n</script>\r\n";
				echo "<s";
				echo "cript src=\"";
				echo $vd['sc'];
				echo "js/tools.js\" type=\"text/javascript\"></script>\r\n\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n  function CheckPwd()\r\n  {\r\n    var xmlhttpcp;\r\n    var obj = document.getElementById(\"sysmsg\");\r\n    \r\n    try{\r\n      xmlhttpcp=new XMLHttpRequest();\r\n    }\r\n    catch(e){\r\n      xmlhttpcp=new ActiveXObject(\"Microsoft.XMLHTTP\");\r\n    }\r\n    \r\n    xmlhttpcp.onreadystatechange=function(){\r\n      if (xmlhttpcp.readyState==4){\r\n        if (xmlhttpcp.status==200){\r\n    ";
				echo "      var data=xmlhttpcp.responseText;\r\n          if(data == \"1\"){\r\n            tdivid = \$(\"divid\").value;\r\n            tdivmethod = \$(\"divmethod\").value;\r\n            disp('cdiv');\r\n            if(tdivid == 0)\r\n            {\r\n              delAllSubmit(tdivmethod);\r\n            }\r\n            else\r\n            {\r\n              delSubmit(tdivid, tdivmethod);\r\n            }\r\n          }\r\n          ";
				echo "else\r\n          {\r\n            alert(\"您输入的密码不正确\")\r\n          }\r\n        }\r\n      }\r\n    }\r\n    \r\n    xmlhttpcp.open(\"post\", \"index.php?m=mod_b2b&c=Order&a=CheckPwd\", true);\r\n    xmlhttpcp.setRequestHeader('Content-type','application/x-www-form-urlencoded');\r\n    xmlhttpcp.send('tradepwd=' + \$(\"tradepwd\").value);\r\n  }\r\n  \r\n  function delAllSubmit2(flag, val)\r\n  {\r\n    \$(\"tradepwd\").value =";
				echo " \"\";\r\n    \$(\"divid\").value = flag;\r\n    \$(\"divmethod\").value = val;\r\n    disp('cdiv');\r\n  }\r\n  \r\n  function setAct(v)\r\n  {\r\n  \t\$(\"export\").value = v;\r\n  \tif(v > 0)\r\n  \t{\r\n  \t  \$(\"advsearch\").submit();\r\n  \t}\r\n  }\r\n  \r\n</script>\r\n";
				if ( getvar( "optype" ) == "w" )
				{
								echo "<s";
								echo "cript type=\"text/javascript\">\r\n\tfunction tableRefresh1()\r\n  {\r\n  \tloadDisp(0);\r\n  \tvar thisPage  = parseInt(\$(\"thisPage\").value);\r\n  \thttpurl = \$(\"url\").value + \"&page=\" + thisPage;\r\n  \tloadXMLDoc(state_Change, httpurl);\r\n  }\r\n\tsetInterval(tableRefresh1, 30000);\r\n</script>\r\n";
				}
				echo "</html>\r\n";
}
?>
