<?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 "<s";
				echo "tyle type=\"text/css\">\r\n.tab_normal {\r\n\twidth:130px;cursor:pointer;height:29px;BACKGROUND: #f0f0f0; MARGIN-LEFT: 4px; VERTICAL-ALIGN: middle; border:1px #ccc solid; BORDER-BOTTOM: #ccc 1px solid; POSITION: relative; TOP: 1px\r\n}\r\n.tab_active {\r\n\twidth:130px;cursor:pointer;height:29px;FONT-WEIGHT: bold; BACKGROUND: #f5fbff; MARGIN-LEFT: 4px; VERTICAL-ALIGN: middle; border:1px #ccc solid;BORDER-BOTTOM";
				echo ": #f0f0f0 1px solid; POSITION: relative; TOP: 1px\r\n}\r\n\r\n#thead td{BORDER-right:1px solid #D6D6D6;BORDER-bottom:1px solid #D6D6D6;BORDER-top:1px solid #D6D6D6;height:30px;font-weight:bold}\r\n</style>\r\n<body>\r\n";
				$isb2c = intval( request( "b2c" ) );
				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> \r\n  级别列表\r\n  ";
				echo "<s";
				echo "trong onmouseover=\"showhide(this);\" onmouseout=\"showhide(this);\" style=\"cursor:pointer\">[?]</strong><p style=\"display:none\">\r\n      1、排列顺序：在列表中，从下到下，是低级别到高级别的顺序，编号只是一个代号，不需要关心他的大小<br/>\r\n      2、组别从低到高(会员->直销商->经销商)<br/>\r\n      3、如果含一卡通或者零售平台，请务必在会员组中勾选一个默认级别<br/>\r\n      4、如果含批发平台，请务必在直销商组以上的级";
				echo "别中勾选一个默认级别<br/>\r\n      5、<font color=\"#ff0000\">提醒：</font>\r\n      低级别的升级消费额一定要小于高级别的升级消费额，以免出现意想不到的错误<br/>\r\n    </p> \r\n</div>\r\n<div style=\"float:right\"><a href=\"javascript:toHelper()\" 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 id=\"contentTip\" style=\"display:none;\"></div>\r\n<div class=\"mytitle\" id=\"mytitle\" style=\"width:95%\">\r\n\t<div style=\"float:right\">\r\n\t\t<div style=\"margin-top:6px;margin-right:100px\">\r\n\t\t<button class=\"";
				if ( $isb2c == 1 )
				{
								echo "tab_normal";
				}
				else
				{
								echo "tab_active";
				}
				echo "\" onclick=\"loadDisp(1);window.location.href='?m=mod_b2b&c=Rank'\">批发用户级别</button>\r\n    ";
				if ( UB_B2C || UB_YKT )
				{
								echo "<button class=\"";
								if ( $isb2c == 1 )
								{
												echo "tab_active";
								}
								else
								{
												echo "tab_normal";
								}
								echo "\" onclick=\"loadDisp(1);window.location.href='?m=mod_b2b&c=Rank&b2c=1'\">";
								echo $vd['tagname'];
								echo "级别</button>";
				}
				echo "    </div>\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: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=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"disp('adddiv')\">";
				echo "<s";
				echo "amp title=\"点击刷新本页刷新数据,并保持原来勾选状态\">\r\n    <div class=\"addicon\" style=\"padding-top:10px;padding-left:26px;\">添加</div></samp>\r\n  </div>  \r\n  <div class=\"titleOp4\"  onmouseover=\"this.className='iconbg4'\" onmouseout=\"this.className='titleOp4'\" onclick=\"disp('adddivguize')\">";
				echo "<s";
				echo "amp title=\"级别规则\">\r\n    <div style=\"padding-top:10px;padding-left:10px;\">级别规则</div></samp>\r\n  </div>\r\n</div>\r\n\r\n<div id=\"adddiv\" style=\"position:absolute;top:60px;left:50px;;width:320px;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\">给<font color=\"#ff0000\">";
				if ( $isb2c == 0 )
				{
								echo "批发平台";
				}
				else
				{
								echo $vd['tagname'];
								echo "平台";
				}
				echo "</font>添加用户级别</div>\r\n  <div style=\"float:right;\"><img src=\"";
				echo $vd['sc'];
				echo "images/destroy.gif\" onclick=\"disp('adddiv')\" style=\"cursor:pointer\"/></div>\r\n  <form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=Rank&a=Save\" id=\"cform\">\r\n  <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n    <tr>\r\n      <td width=\"35%\">级别名称</td>\r\n      <td width=\"65%\"><input type=\"text\" name=\"name\" size=\"16\"/></td>\r\n    </tr>\r\n    <tr>\r\n      <td width=\"35%\">升级消费额</td>\r\n";
				echo "      <td width=\"65%\"><input type=\"text\" name=\"money\" size=\"16\"/></td>\r\n    </tr>\r\n    <tr";
				if ( !UB_B2B )
				{
								echo " style=\"display:none\"";
				}
				echo ">\r\n      <td width=\"35%\">组别</td>\r\n      <td width=\"65%\">\r\n        ";
				echo "<s";
				echo "elect name=\"gid\">\r\n        ";
				option( $vd['group'], 0, "gname", "gid" );
				echo "        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td width=\"35%\">默认注册级别</td>\r\n      <td width=\"65%\"><input type=\"checkbox\"  name=\"isdefault\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\"/></td>\r\n    </tr>\r\n    <tr>\r\n      <td width=\"35%\"></td>\r\n      <td width=\"65%\">\r\n        <input type=\"hidden\" name=\"discount\" size=\"10\" value=\"0.05\"/>\r\n        <input type=\"submit\" name=\"Submit\" value=\"添 加\" ";
				echo "class=\"button\">\r\n        <input type=\"button\" name=\"Submit\" value=\"取 消\" onclick=\"disp('adddiv')\" class=\"button\"/>\r\n      </td>\r\n    </tr>\r\n  </table>\r\n  </form>\r\n  </div>\r\n</div>\r\n\r\n<div id=\"adddivguize\" style=\"position:absolute;top:60px;left:50px;;width:320px;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";
				echo ";float:left\">级别规则[<a href=\"?m=mod_b2b&c=Sys&a=Config#guize\">点击设置规则</a>]</div>\r\n  <div style=\"float:right;\"><img src=\"";
				echo $vd['sc'];
				echo "images/destroy.gif\" onclick=\"disp('adddivguize')\" style=\"cursor:pointer\"/></div>\r\n  <form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=Rank&a=Save\" id=\"cform\">\r\n  <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n    <tr>\r\n      <td style=\"font-size:12px\">\r\n      \t规范型：<br/>\r\n      \t同一个组别的经销商不能互为上下级，比如一级经销商和二级经销商同属于经销商组别，则他们不能互为";
				echo "上下级<br/><br/>\r\n      \t松散型：<br/>\r\n      \t同一个组别的经销商也可以为上下级，规则是只要这个级别的升级消费金额足够大，他就可以接收比他小的级别，直销商除外(也就是说直销商不能收下级)<br/>\r\n      \t\r\n      </td>\r\n    </tr>\r\n  </table>\r\n  </form>\r\n  </div>\r\n</div>\r\n\r\n<div id=\"menuMask\" class=\"menuMask\" style=\"display:none\">\r\n  <form action=\"?m=mod_b2b&c=Tpl&tpl=Sup&v=Sup\" method=\"post\" style=\"margin:0px\">\r\n  <di";
				echo "v class=\"menuContent\">\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tordering\" id=\"tordering\"/> 商品名称<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tpics\" id=\"tpics\"/> 供货商<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tname\" id=\"tname\"/> 进货审核<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tabst\" id=\"tabst\"/> 进货优先级<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tfee\" id=\"tfee\"/>";
				echo " 进货价<br/>\r\n  <input type=\"checkbox\" name=\"id[]\" value=\"tcode\" id=\"tcode\"/> 最低售价<br/>\r\n  </div>\r\n  <div class=\"menuOp\">\r\n  <input type=\"submit\" value=\"保存\" class=\"button\" disabled />\r\n  <input type=\"button\" value=\"重置\" class=\"button\" disabled onclick=\"tInfoReset()\"/>\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=\"";
				echo "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()' disabled /></td>\r\n";
				echo "    ";
				if ( $vd['isselect'] == 1 )
				{
								echo "      <td width=\"35px\"><b>选择</b></td>\r\n    ";
				}
				echo "    <td width=\"35px\"><b>编号</b></td>\r\n    <td width=\"130px\">";
				echo "<s";
				echo "pan class=\"canedit\">级别名称</span></td>\r\n    <td width=\"100px\">";
				echo "<s";
				echo "pan class=\"canedit\">升级消费额</span></td>\r\n    ";
				if ( UB_B2B )
				{
								echo "    <td width=\"67px\">";
								echo "<s";
								echo "pan class=\"canedit\">组别</span></td>\r\n    ";
				}
				echo "    <td width=\"100px\">";
				echo "<s";
				echo "pan class=\"canedit\">默认注册级别</span></td>\r\n    <td width=\"22px\"><img src=\"";
				echo $vd['sc'];
				echo "images/icon_trash.gif\"/></td>\n";
				echo "    <td class=\"endtd\">\r\n      <div class=\"infoicon\" style=\"color:#ccc\"><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 "  <table id=\"tbody\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  ";
$isb2c = intval( request( "b2c" ) );
echo "  ";
foreach ( $vd['items'] as $item )
{
				echo "  ";
				if ( $isb2c == 1 && $item['gid'] == 0 || $isb2c == 0 && 0 < $item['gid'] )
				{
								echo "  <tr>\r\n    <td width=\"30px\">\r\n      <input type=\"checkbox\" name=\"id[]\" id=\"idchk_";
								echo $item['id'];
								echo "\" class=\"checkbox\" value=\"";
								echo $item['id'];
								echo "\" onclick=\"CheckThis(this)\" onFocus='this.blur()'  disabled ></input>\r\n    </td>\r\n    ";
								echo "    ";
								if ( $vd['isselect'] == 1 )
								{
												echo "      <td width=\"35px\">\r\n      <input type=\"checkbox\" class=\"checkbox\" onclick=\"setDialog('";
												echo $item['gid'];
												echo "|";
												echo $item['name'];
												echo "')\" onFocus=\"this.blur()\"/>\r\n      </td>\r\n    ";
								}
								echo "    <td width=\"35px\">";
								echo $item['id'];
								echo "</td>\r\n    <td width=\"130px\">";
								echo "<s";
								echo "pan onclick=\"toInput(this,";
								echo $item['id'];
								echo ",'name')\">";
								echo $item['name'];
								echo "</span></td>\r\n    <td width=\"100px\">";
								echo "<s";
								echo "pan onclick=\"toInput(this,";
								echo $item['id'];
								echo ",'money')\">";
								echo $item['money'];
								echo "</span></td>\r\n    ";
								if ( UB_B2B )
								{
												echo "    <td width=\"67px\">\r\n      ";
												echo "<s";
												echo "elect name=\"gid\" onchange=\"toSelect(this, ";
												echo $item['id'];
												echo ", 'gid')\">\r\n        ";
												option( $vd['group'], $item['gid'], "gname", "gid" );
												echo "      </select>\r\n    </td>\r\n    ";
								}
								echo "    <td width=\"100px\"><img src=\"";
								echo $vd['sc'];
								toggleimgsrc( $item['isdefault'] );
								echo "\" onclick=\"toToggle(this,";
								echo $item['id'];
								echo ",'isdefault')\" alt=\"点击此图片即可修改状态\" onFocus=\"this.blur()\" class=\"mousehand\"/></td>\r\n    <td width=\"22px\">\r\n      <img src=\"";
								echo $vd['sc'];
								echo "images/icon_trash.gif\" onclick=\"delSubmit(";
								echo $item['id'];
								echo ",'delitems')\" alt=\"如果删除了这个级别，级别对应的价格也会删除，对应级别的用户会下降一级，您确定进行删除操作吗？\" class=\"mousehand\"/>\r\n    </td>\r\n    ";
								echo "    <td class=\"endtd\"></td>\r\n  </tr>\r\n  ";
				}
}
echo "  \r\n</table>\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['table'] == 0 )
{
				echo "</div>\r\n\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=rank&a=Deals&b2c=";
				echo $isb2c;
				echo "&";
				echo $vd['op'];
				echo "\" id=\"op\"/>\r\n<input type=\"hidden\" value=\"index.php?m=mod_b2b&c=rank&a=index&b2c=";
				echo $isb2c;
				echo "&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=rank&a=index&b2c=";
				echo $isb2c;
				echo "&";
				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(0,0);\r\ntotleRows = ";
				echo $vd['totlerow'];
				echo ";\r\ndeltxt  = \"如果删除了这个级别，级别对应的价格也会删除，对应级别的用户会下降一级，您确定进行删除操作吗？\";\r\nthisaction = \"删除\";\r\nthisdel = 0;\r\nstatistics = 0;\r\nvar resizeidx = 2;\r\nvar helperVal = 1;\r\n</script>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\n//当前表格配置\r\n";
				echo " tInfo = Array();\n";
				echo "</script>\r\n";
				echo "<s";
				echo "cript src=\"";
				echo $vd['sc'];
				echo "js/tools.js\" type=\"text/javascript\"></script>\r\n";
				echo "<s";
				echo "cript type=\"text/javascript\">\r\nfunction setct(val)\r\n{\r\n  \$(\"cttr\").style.display = val == 3 ? \"\" : \"none\";\r\n}\r\n\r\nfunction loadst()\r\n{\r\n  if(!confirm('获取供货商的调价商品并按照下边模板调价？'))\r\n  {\r\n    return;\r\n  }\r\n  \r\n  setLoad(\"正在调价中,请稍后...\");\r\n  loadDisp(1);\r\n  \r\n  window.location.href = \"index.php?m=mod_b2b&c=Price&a=PriceSaveBySup\";\r\n  \r\n}\r\n</script>\r\n</html>\r\n";
}
?>
