<!--#include file="check.asp"-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>通道</title>
<link href="images/main.css" rel="stylesheet" type="text/css" media="all" />
</head>
<!--#include file="top.asp"-->
<div id="systime"><p id="servertime"></p></div>
<div id="mainBody" >

<div class="space">&nbsp;</div>
<div class="list">



<script language="javascript">
var arr = new Array();
var arrvalue = new Array();
var arrname = new Array();

arr[0]="15173";
arrvalue[0]="a";
arrname[0]="神州行卡支付";
arr[1]="15173";
arrvalue[1]="b";
arrname[1]="俊网一卡通支付";
arr[2]="15173";
arrvalue[2]="c";
arrname[2]="盛大卡支付";
arr[3]="15173";
arrvalue[3]="d";
arrname[3]="征途游戏卡支付";
arr[5]="15173";
arrvalue[5]="n";
arrname[5]="搜狐一卡通支付";
arr[7]="15173";
arrvalue[7]="q";
arrname[7]="久游一卡通支付";
arr[8]="15173";
arrvalue[8]="r";
arrname[8]="腾讯Q币卡支付";
arr[14]="15173";
arrvalue[14]="m";
arrname[14]="网易一卡通支付";
arr[39]="15173";
arrvalue[39]="u";
arrname[39]="完美一卡通支付";
arr[40]="15173";
arrvalue[40]="x";
arrname[40]="联通充值卡支付";
arr[41]="15173";
arrvalue[41]="y";
arrname[41]="中国电信付费充值卡";
arr[42]="15173";
arrvalue[42]="f";
arrname[42]="金山一卡通";
arr[43]="15173";
arrvalue[43]="g";
arrname[43]="光宇一卡通";
arr[44]="15173";
arrvalue[44]="e";
arrname[44]="纵游一卡通";
arr[45]="15173";
arrvalue[45]="j";
arrname[45]="麒麟一卡通";
arr[46]="15173";
arrvalue[46]="k";
arrname[46]="蓝港一卡通";




arr[301]="46ka";
arrvalue[301]="46szx";
arrname[301]="神州行支付"
arr[302]="46ka";
arrvalue[302]="46qqb";
arrname[302]="QQ币卡支付"
arr[303]="46ka";
arrvalue[303]="46sdk";
arrname[303]="盛大卡支付"
arr[304]="46ka";
arrvalue[304]="46shk";
arrname[304]="搜狐卡支付"
arr[305]="46ka";
arrvalue[305]="46jyk";
arrname[305]="久游卡支付"
arr[306]="46ka";
arrvalue[306]="46jwk";
arrname[306]="骏网卡支付"
arr[307]="46ka";
arrvalue[307]="46wmk";
arrname[307]="完美卡支付"
arr[308]="46ka";
arrvalue[308]="46ltk";
arrname[308]="联通卡支付"
arr[309]="46ka";
arrvalue[309]="46ztk";
arrname[309]="征途卡支付"
arr[310]="46ka";
arrvalue[310]="46wyk";
arrname[310]="网易卡支付"
arr[311]="46ka";
arrvalue[311]="46zyk";
arrname[311]="纵游卡支付"
arr[312]="46ka";
arrvalue[312]="46dxk";
arrname[312]="电信卡支付"



arr[15]="ebao";
arrvalue[15]="SNDACARD";
arrname[15]="盛大卡";
arr[16]="ebao";
arrvalue[16]="ZHENGTU";
arrname[16]="征途卡";
arr[17]="ebao";
arrvalue[17]="SZX";
arrname[17]="神州行";
arr[18]="ebao";
arrvalue[18]="UNICOM";
arrname[18]="联通卡";
arr[19]="ebao";
arrvalue[19]="JUNNET";
arrname[19]="骏网一卡通"
arr[20]="ebao";
arrvalue[20]="LIANHUAOKCARD-NET";
arrname[20]="联华OK卡支付"
arr[21]="ebao";
arrvalue[21]="SHTEL-NET";
arrname[21]="电信聚信卡支付"
arr[22]="ebao";
arrvalue[22]="BANK";
arrname[22]="银行卡支付"
arr[23]="ebao";
arrvalue[23]="QQCARD";
arrname[23]="Q币卡"
arr[24]="ebao";
arrvalue[24]="YPCARD";
arrname[24]="易宝e卡通"
arr[25]="ebao";
arrvalue[25]="JIUYOU";
arrname[25]="久游卡"
arr[26]="ebao";
arrvalue[26]="NETEASE";
arrname[26]="网易卡"
arr[27]="ebao";
arrvalue[27]="WANMEI";
arrname[27]="完美卡"
arr[28]="ebao";
arrvalue[28]="SOHU";
arrname[28]="搜狐卡"
arr[29]="ebao";
arrvalue[29]="TELECOM";
arrname[29]="电信卡"
arr[30]="ebao";
arrvalue[30]="ZONGYOU";
arrname[30]="纵游卡"



arr[100]="51ka";
arrvalue[100]="51bank";
arrname[100]="网银"
arr[101]="51ka";
arrvalue[101]="51szx";
arrname[101]="神州行支付"
arr[102]="51ka";
arrvalue[102]="51qqb";
arrname[102]="QQ币卡支付"
arr[103]="51ka";
arrvalue[103]="51sdk";
arrname[103]="盛大卡支付"
arr[104]="51ka";
arrvalue[104]="51shk";
arrname[104]="搜狐卡支付"
arr[105]="51ka";
arrvalue[105]="51jyk";
arrname[105]="久游卡支付"
arr[106]="51ka";
arrvalue[106]="51jwk";
arrname[106]="骏网卡支付"
arr[107]="51ka";
arrvalue[107]="51wmk";
arrname[107]="完美卡支付"
arr[108]="51ka";
arrvalue[108]="51ltk";
arrname[108]="联通卡支付"
arr[109]="51ka";
arrvalue[109]="51ztk";
arrname[109]="征途卡支付"
arr[110]="51ka";
arrvalue[110]="51wyk";
arrname[110]="网易卡支付"
arr[111]="51ka";
arrvalue[111]="51zyk";
arrname[111]="纵游卡支付"
arr[112]="51ka";
arrvalue[112]="51dxk";
arrname[112]="电信卡支付"

arr[114]="70card";
arrvalue[114]="cm";
arrname[114]="神州行支付"
arr[115]="70card";
arrvalue[115]="qq";
arrname[115]="QQ币卡支付"
arr[116]="70card";
arrvalue[116]="sd";
arrname[116]="盛大卡支付"
arr[117]="70card";
arrvalue[117]="sh";
arrname[117]="搜狐卡支付"
arr[118]="70card";
arrvalue[118]="jy";
arrname[118]="久游卡支付"
arr[119]="70card";
arrvalue[119]="jw";
arrname[119]="骏网卡支付"
arr[120]="70card";
arrvalue[120]="wm";
arrname[120]="完美卡支付"
arr[121]="70card";
arrvalue[121]="cc";
arrname[121]="联通卡支付"
arr[122]="70card";
arrvalue[122]="zt";
arrname[122]="征途卡支付"
arr[123]="70card";
arrvalue[123]="wy";
arrname[123]="网易卡支付"
arr[124]="70card";
arrvalue[124]="cd";
arrname[124]="神州行（地方）支付"
arr[125]="70card";
arrvalue[125]="dx";
arrname[125]="中国电信充值付费卡"


arr[201]="tenpay";
arrvalue[201]="tenpay";
arrname[201]="财付通"
arr[202]="tenpay";
arrvalue[202]="tenpayBANK";
arrname[202]="财付通银行卡"


arr[801]="kbpay";
arrvalue[801]="kbbank";
arrname[801]="网银"
//arr[803]="kbpay";
//arrvalue[803]="kbtel";
//arrname[803]="全国声讯"
//arr[804]="kbpay";
//arrvalue[804]="kbtelzj";
//arrname[804]="浙江声讯"
arr[805]="kbpay";
arrvalue[805]="kbszxk";
arrname[805]="神州行充值卡"
arr[806]="kbpay";
arrvalue[806]="kbsdk";
arrname[806]="盛大一卡通"
arr[807]="kbpay";
arrvalue[807]="kbztk";
arrname[807]="征途充值卡"
arr[808]="kbpay";
arrvalue[808]="kbshk";
arrname[808]="搜狐一卡通"
arr[809]="kbpay";
arrvalue[809]="kbjwk";
arrname[809]="骏网一卡通"
arr[810]="kbpay";
arrvalue[810]="kbjyk";
arrname[810]="久游一卡通"
arr[811]="kbpay";
arrvalue[811]="kbwmk";
arrname[811]="完美一卡通"
arr[812]="kbpay";
arrvalue[812]="kbltk";
arrname[812]="联通充值卡"
arr[813]="kbpay";
arrvalue[813]="kbwyk";
arrname[813]="网易一卡通"
arr[814]="kbpay";
arrvalue[814]="kbdxk";
arrname[814]="电信充值卡"
arr[815]="kbpay";
arrvalue[815]="kbqbk";
arrname[815]="腾讯Q币卡"
arr[816]="kbpay";
arrvalue[816]="kbzyk";
arrname[816]="纵游一卡通"


arr[901]="95588";
arrvalue[901]="95588bank";
arrname[901]="网银"
arr[902]="95588";
arrvalue[902]="95588szxk";
arrname[902]="神州行充值卡"
arr[903]="95588";
arrvalue[903]="95588sdk";
arrname[903]="盛大一卡通"
arr[904]="95588";
arrvalue[904]="95588ztk";
arrname[904]="征途充值卡"
arr[905]="95588";
arrvalue[905]="95588shk";
arrname[905]="搜狐一卡通"
arr[906]="95588";
arrvalue[906]="95588jwk";
arrname[906]="骏网一卡通"
arr[907]="95588";
arrvalue[907]="95588jyk";
arrname[907]="久游一卡通"
arr[908]="95588";
arrvalue[908]="95588wmk";
arrname[908]="完美一卡通"
arr[909]="95588";
arrvalue[909]="95588ltk";
arrname[909]="联通充值卡"
arr[910]="95588";
arrvalue[910]="95588wyk";
arrname[910]="网易一卡通"
arr[911]="95588";
arrvalue[911]="95588dxk";
arrname[911]="电信充值卡"
arr[912]="95588";
arrvalue[912]="95588qbk";
arrname[912]="腾讯Q币卡"


function showwangguan(str)
{
	var wangguan = document.getElementById("wangguan");
	if(document.getElementById("psort").value=="15173")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="15173")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}else if(document.getElementById("psort").value=="ebao")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="ebao")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else if(document.getElementById("psort").value=="51ka")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="51ka")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else if(document.getElementById("psort").value=="46ka")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="46ka")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else if(document.getElementById("psort").value=="kbpay")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="kbpay")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else if(document.getElementById("psort").value=="95588")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="95588")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else if(document.getElementById("psort").value=="tenpay")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="tenpay")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else if(document.getElementById("psort").value=="70card")
	{
		document.getElementById("payoption22").style.display = "";
		wangguan.length = 0;
		for(var i=0;i<arr.length;i++){
			if(arr[i]=="70card")
			{
				wangguan.options[wangguan.length] = new Option(arrname[i],arrvalue[i]);
				if(str==arrvalue[i]){wangguan.options[wangguan.length-1].selected=true;}
			}
		}
	}
	else{
		document.getElementById("payoption22").style.display = "none";
	}
}

</script>

<%
Call hrPower(9.1,0)
dim action,newid,s,i,Rsboard,myurl
action=request.QueryString("action")
id=request.QueryString("id")
NowPage=request.QueryString("page")


select case action
case "addnew"
%>

<script language="javascript">
try{
    var nav="H00";
    var subnav="L0002";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H00").className="current";
}
</script>


<table  border="0" cellspacing="0" cellpadding="0" class="titletable" >

  <tr class="ftitle">
    <td colspan="2" ><a href="#" name="pwd"></a>增加通道</td>    
  </tr>
  <tr ><td colspan="2" ><hr color="#B5CFD9" class="hr" /></td></tr>
</table>
<form name="form" method="post" action="port.asp?action=upaddnew">
<table  border="0" cellspacing="0" cellpadding="0" class="formtable" id="baseinfo1">

<script language = "JavaScript">
function VerifySubmit()
{	
	if (document.form.pname.value == "")
	{
		alert("请填写通道名称")
		document.form.pname.focus()
		return false;
	}
	if (document.form.PayType.value == "")
	{
		alert("请填写允许价格级别")
		document.form.PayType.focus()
		return false;
	}

	
	if(confirm('确定操作吗...'))
	{
	document.form.submit();   
	document.form.Submit.disabled=true;  
	} 

}
</script>




		  <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                通道名称
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="pname" type="text" maxlength="150" id="pname" style="width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                产品类别
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<select name="psort" class="inputbox" onChange="return showwangguan('')" id="psort">
                <%call payoption2("")%>
              </select><span id="payoption22" style="display:none;"><select name="wangguan" id="wangguan"><%%></select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                允许价格级别
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="PayType" type="text" maxlength="150" id="PayType" style="width:200px;" />（用” | “ 隔开 如：20|50|100）
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                号和密码位数长度
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Setlen" type="text" maxlength="150" id="Setlen" style="width:200px;" />（用” | “ 隔开 如：17|18）
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input type="button" name="Submit"  onClick="JavaScript:VerifySubmit();" value="提交" id="Submit" /><input name="Submit2" type="reset" class="inputbutton" value="重置"></td>
                        </tr>

          </table>
        </form></td>

  </tr>
</table>
<%
case "edit"
  set Rs=GrateRs("select * from H_plist where id="&id,3)
  if not Rs.eof then 
%>
<script language="javascript">
try{
    var nav="H00";
    var subnav="L0001";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H00").className="current";
}
</script>





<table  border="0" cellspacing="0" cellpadding="0" class="titletable" >

  <tr class="ftitle">
    <td colspan="2" ><a href="#" name="pwd"></a>编辑通道 </td>    
  </tr>
  <tr ><td colspan="2" ><hr color="#B5CFD9" class="hr" /></td></tr>
</table>
<form name="form" method="post" action="port.asp?action=upedit&id=<%=Rs("id")%>">
<table  border="0" cellspacing="0" cellpadding="0" class="formtable" id="baseinfo1">


<script language = "JavaScript">
function VerifySubmit()
{	
	if (document.form.pname.value == "")
	{
		alert("请填写通道名称")
		document.form.pname.focus()
		return false;
	}
	if (document.form.paixu.value == "")
	{
		alert("请填排序")
		document.form.paixu.focus()
		return false;
	}
	if (document.form.PayType.value == "")
	{
		alert("请填写允许价格级别")
		document.form.PayType.focus()
		return false;
	}
	if (document.form.fenzu.value == "")
	{
		alert("请填写分组编号")
		document.form.fenzu.focus()
		return false;
	}
	if(confirm('确定操作吗...'))
	{
	document.form.submit();   
	document.form.Submit.disabled=true;  
	} 

}
</script>




		  <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                通道名称
                                &nbsp;</td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="pname" type="text" maxlength="150" id="pname" value="<%=rs("pname")%>"
readonly="readonly" onkeypress="return false" style="color:Gray;background-color:White;width:200px;" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                产品类别
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<select name="psort" class="inputbox"  onChange="return showwangguan('<%=rs("wangguan")%>')"  id="psort">
                <%call payoption2(rs("psort"))%>
              </select><span id="payoption22" style="display:none;"><select name="wangguan" id="wangguan"></select>
		 <script language="javascript" >showwangguan("<%=rs("wangguan")%>");</script>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                排序
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="paixu" type="text" maxlength="150" id="paixu" value="<%=rs("paixu")%>" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                允许价格级别
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="PayType" type="text" maxlength="150" id="PayType" value="<%=rs("PayType")%>" />（用” | “ 隔开 如：20|50|100）
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                号和密码位数长度
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Setlen" type="text" maxlength="150" id="Setlen" value="<%=rs("setlen")%>"/>（用” | “ 隔开 如：17|18）
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                普通商户比例
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Percentage" type="text" maxlength="150" id="Percentage" value="<%=rs("Percentage")%>" />%
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                               高级商户比例
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Percentage1" type="text" maxlength="150" id="Percentage1" value="<%=rs("Percentage1")%>" />%
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                黄金商户比例
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Percentage2" type="text" maxlength="150" id="Percentage2" value="<%=rs("Percentage2")%>" />%
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                白金商户比例
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Percentage3" type="text" maxlength="150" id="Percentage3" value="<%=rs("Percentage3")%>" />%
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                钻石商户比例
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="Percentage4" type="text" maxlength="150" id="Percentage4" value="<%=rs("Percentage4")%>" />%
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                分组编号
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<input name="fenzu" type="text" maxlength="150" id="fenzu" value="<%=rs("fenzu")%>" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                                通道说明
                                &nbsp;
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
		<TEXTAREA NAME="shuoming" ROWS="8" COLS="65"><%=rs("shuoming")%></TEXTAREA>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" height="34" style="width: 180px; height: 28px" valign="middle"
                                class="leftTD dotted">
                            </td>
                            <td height="34" valign="middle" width="*" class="dotted">
                                <input type="button" name="Submit"  onClick="JavaScript:VerifySubmit();" value="提交" id="Submit" /><input name="Submit2" type="reset" class="inputbutton" value="重置"></td>
                        </tr>

          </table>
        </form></td>
      </tr>

  </tr>
</table>
<%
   else
    response.write "<script language='JavaScript'>{window.alert('通道不存在,无法完成操作！');window.location='"&Request.ServerVariables("HTTP_REFERER")&"';}</script>"
  end if	

case "close"
tid=ClearSQL(request("tid"))
  set Rs=GrateRs("select * from H_plist where id="&tid,3)
  if not Rs.eof then 
	Rs("state")=1
	Rs.update
	'Rs.close
   response.Redirect("port.asp?action=list")
end if

case "open"
tid=ClearSQL(request("tid"))
  set Rs=GrateRs("select * from H_plist where id="&tid,3)
  if not Rs.eof then 
	Rs("state")=0
	Rs.update
	'Rs.close
   response.Redirect("port.asp?action=list")
end if


case "delete"
  set Rs=GrateRs("select * from H_plist where id="&id,3)
  if not Rs.eof then 
    Rs.delete
	Rs.update
	conn.execute("delete from L_ticheng where psortID="&id) '删除会员提成数据
    response.write "<script language='JavaScript'>{window.alert('通道已经成功删除！');window.location='"&Request.ServerVariables("HTTP_REFERER")&"';}</script>"
  else
    response.write "<script language='JavaScript'>{window.alert('通道不存在,无法完成删除！');window.location='"&Request.ServerVariables("HTTP_REFERER")&"';}</script>"
  end if	  
case "upaddnew"
  set Rs=GrateRs("select * from H_plist",3)
  Rs.addnew
  rs("shuoming")=request.form("shuoming")
  rs("Pname")=request.form("pname")
  rs("PayType")=request.form("PayType")
  rs("wangguan")=request("wangguan")
  rs("wangguan2")=request("wangguan2")
  rs("psort")=request.form("psort")
  rs("setlen")=request.form("setlen")
  Rs.update
  response.write "<script language='JavaScript'>{window.alert('您增加的通道已经成功保存,请查看！');window.location='port.asp?action=list';}</script>"
case "upedit"
  Percentage = request.form("Percentage")
  If Percentage="" Then Percentage=0
  Percentage1 = request.form("Percentage1")
  If Percentage1="" Then Percentage1=0
  Percentage2 = request.form("Percentage2")
  If Percentage2="" Then Percentage2=0
  Percentage3 = request.form("Percentage3")
  If Percentage3="" Then Percentage3=0
  Percentage4 = request.form("Percentage4")
  If Percentage4="" Then Percentage4=0
  fenzu = request.form("fenzu")
  If fenzu="" Then fenzu=0
  wangguan = request("wangguan")


  set Rs=GrateRs("select * from H_plist where id="&id,3)
  rs("Pname")=request.form("pname")
  rs("shuoming")=request.form("shuoming")
  rs("PayType")=request.form("PayType")
  rs("wangguan")=wangguan
  rs("wangguan2")=wangguan2
  rs("paixu")=request("paixu")
  rs("setlen")=request.form("setlen")
  rs("Percentage")=Percentage
  rs("Percentage1")=Percentage1
  rs("Percentage2")=Percentage2
  rs("Percentage3")=Percentage3
  rs("Percentage4")=Percentage4
  rs("fenzu")=fenzu
  rs("psort")=request.form("psort")
  Rs.update
    response.write "<script language='JavaScript'>{window.alert('您编辑的通道已经成功保存,请查看！');window.location='"&Request.ServerVariables("HTTP_REFERER")&"';}</script>"
case "list"
%>

<script language="javascript">
try{
    var nav="H00";
    var subnav="L0001";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H00").className="current";
}
</script>


<table class="listtable">
  <thead>
    <tr>
      <th scope="col">通道ID</th>
	  <th scope="col">通道名称</th>
	  <th scope="col">普通商户提成</th>
            <th scope="col">高级商户提成</th>
            <th scope="col">黄金商户提成</th>
            <th scope="col">白金商户提成</th>
            <th scope="col">钻石商户提成</th>
            <th scope="col">通道类别</th>
            <th scope="col">排 序</th>
            <th scope="col">分 组</th>
            <th scope="col">目前状态</th>
            <th scope="col">开启/关闭</th>
            <th scope="col">操作</th>

    </tr>
  </thead>
  <tbody> 


                        <%
			  	Set Rs=GrateRs("select * from H_plist order by state,paixu",1)


		   Rs.PageSize=30
		   if not Rs.eof then 
		   If Nowpage=0 then Nowpage=1
		   Rs.AbsolutePage=Nowpage 
		   i=1
		   do while not Rs.eof and i<=Rs.pagesize


			  %>
<%if i mod 2 =0 then%>
         <tr class="listtr1" >
<%else%>
         <tr class="listtr2" >
<%end IF%>

                                <td><%=rs("id")%></td>
                                <td><%=rs("Pname")%></td>
				<td><%=rs("Percentage")%> %</td>
<td><%=rs("Percentage1")%> %</td>
<td><%=rs("Percentage2")%> %</td>
<td><%=rs("Percentage3")%> %</td>
<td><%=rs("Percentage4")%> %</td>
<td><%=rs("psort")%></td>
<td><%=rs("paixu")%></td>
<td><%=rs("fenzu")%></td>
                  <td><%
				  if rs("state")=1 then
				  response.Write("<font color=red>已关闭</font>")
				  elseif rs("state")=0 then
				  response.Write("<font color=green>已开启</font>")
				  end if%></td>
                  <td><%
				  if rs("state")=0 then
response.Write("<a href=""?action=close&tid="&rs("id")&""" onClick=""return confirm('确定要执行操作吗？！')"" >关闭</a>")
				  'response.Write("<a href=?action=close&tid="&rs("id")&">关闭</a>")
				  elseif rs("state")=1 then
response.Write("<a href=""?action=open&tid="&rs("id")&""" onClick=""return confirm('确定要执行操作吗？！')"" >开启</a>")
				  'response.Write("<a href=?action=open&tid="&rs("id")&">开启</a>")
				  end if%></td>
<td><a href="port.asp?action=edit&id=<%=Rs("id")%>">编辑</a> / <a href="port.asp?action=delete&id=<%=Rs("id")%>" onClick="return confirm('确定要执行删除操作吗？')">删除</a></td>
                              </tr>

                        <%
						i=i+1
	 Rs.movenext
	 loop
	 end if
	 %>
                        <tr bgcolor="#8CB0CE">
                          <td height="26" colspan="19" bgcolor="#F1F1F1"><div align="center">
                            <%
  myurl="port.asp?action=list&"
 response.write("共"&Rs.recordcount&"条记录，共"&Rs.PageCount&"页，"&Rs.PageSize&"条/页，第"&NowPage&"页&nbsp;")
  response.write("<a href='"&myurl&"page=1'>"&"首页</a>&nbsp;")
  if NowPage>1 then response.write("<a href='"&myurl&"page="&Nowpage-1&"'>上一页</a>&nbsp;")
  if NowPage<Rs.PageCount then response.write("<a href='"&myurl&"page="&Nowpage+1&"'>下一页</a>&nbsp;")
  response.write("<a href='"&myurl&"page="&Rs.PageCount&"'>尾页</a>&nbsp;")
		%>
                            &nbsp;</div></td>
                        </tr>
                    </table></td>
                  </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>

<%
case "all"

If Request("up")="OK" and Request("ptype") = "46ka" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='46ka'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "46ka"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置46ka支付成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='46ka'",1)
if not Rs.Eof Then
	username=rs("username")
	sID=rs("sID")
	sKey=rs("sKey")
else
	username=""
	sID=""
	sKey=""
end if
%>

<script language="javascript">
try{
    var nav="H00";
    var subnav="L0003";
	
    document.getElementById(nav).className="current";
    document.getElementById(subnav).className="first current";
    document.getElementById(subnav).parentNode.parentNode.style.display="block";

}catch(e){
	document.getElementById("H00").className="current";
}
</script>

<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">46ka其它卡类接口</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户ID：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">通讯密钥：</td>
    <td><input name="sKey" type="text" id="sKey" size="30"  value="<%=sKey%>" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="up" value="OK"/>
	<input type="hidden" name="ptype" value="46ka"/>
	</td>
  </tr>
  </form>
</table><br>
<%

If Request("up")="OK" and Request("ptype") = "15173" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='15173'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "15173"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置15173支付成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='15173'",1)
if not Rs.Eof Then
	username=rs("username")
	sID=rs("sID")
	sKey=rs("sKey")
else
	username=""
	sID=""
	sKey=""
end if
%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">15173其它卡类接口</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">用户：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">通讯密钥：</td>
    <td><input name="sKey" type="text" id="sKey" size="30"  value="<%=sKey%>" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="up" value="OK"/>
	<input type="hidden" name="ptype" value="15173"/>
	</td>
  </tr>
  </form>
</table><br>
<%
If Request("up")="OK" and Request("ptype") = "51ka" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='51ka'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "51ka"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置51支付卡成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='51ka'",1)
if not Rs.Eof Then
	username=rs("username")
	sID=rs("sID")
	sKey=rs("sKey")
else
	username=""
	sID=""
	sKey=""
end if
%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">51卡支付</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户ID：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户密钥：</td>
    <td width="82%"><input name="sKey" type="text" id="sKey" value="<%=sKey%>" size="30" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="up" value="OK"/>
	<input type="hidden" name="ptype" value="51ka"/>
	</td>
  </tr>
  </form>
</table><br>


<%
If Request("up")="OK" and Request("ptype") = "ebao" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='ebao'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "ebao"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置易宝成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='ebao'",1)
if not Rs.Eof Then
	username=rs("username")
	sID=rs("sID")
	sKey=rs("sKey")
else
	username=""
	sID=""
	sKey=""
end if
%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">易宝</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户ID：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户密钥：</td>
    <td width="82%"><input name="sKey" type="text" id="sKey" value="<%=sKey%>" size="30" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="up" value="OK"/>
	<input type="hidden" name="ptype" value="ebao"/>
	</td>
  </tr>
  </form>
</table><br>
<%
If Request("up")="OK" and Request("ptype") = "tenpay" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='tenpay'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "tenpay"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置财付通成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='tenpay'",1)
if not Rs.Eof Then
	username=rs("username")
	sID=rs("sID")
	sKey=rs("sKey")
else
	username=""
	sID=""
	sKey=""
end if
%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">财付通</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户ID：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户密钥：</td>
    <td width="82%"><input name="sKey" type="text" id="sKey" value="<%=sKey%>" size="30" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="up" value="OK"/>
	<input type="hidden" name="ptype" value="tenpay"/>
	</td>
  </tr>
  </form>
</table><br>
<%
If Request("up")="OK" and Request("ptype") = "95588" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='95588'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "95588"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置95588天源网络成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='95588'",1)
if not Rs.Eof Then
	username=rs("username")
	sID=rs("sID")
	sKey=rs("sKey")
else
	username=""
	sID=""
	sKey=""
end if
%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">95588天源网络</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户ID：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户密钥：</td>
    <td width="82%"><input name="sKey" type="text" id="sKey" value="<%=sKey%>" size="30" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="up" value="OK"/>
	<input type="hidden" name="ptype" value="95588"/>
	</td>
  </tr>
  </form>
</table><br>
<%
If Request("update")="OK" and Request("ptype") = "kbpay" Then
	Set Rs=GrateRs("select * from L_pay Where ptype='kbpay'",3)
	if Rs.Eof Then 
		Rs.Addnew
		Rs("ptype") = "kbpay"
	End If
	Rs("sID") = Trim(Request("sID"))
	Rs("sKey") = Trim(Request("sKey"))
	Rs.Update
	Rs.Close
	response.write "<script language='JavaScript'>{window.alert('设置快宝支付成功！');window.location='port.asp?action=all';}</script>"
	Response.End()
End If
Set Rs=GrateRs("select * from L_pay Where ptype='kbpay'",1)
if not Rs.Eof Then
	sID=rs("sID")
	sKey=rs("sKey")
else
	sID=""
	sKey=""
end if
%>
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <form name="form3" method="post" action="?action=all"><tr align="center" bgcolor="#BDD2E3">
    <td height="25" colspan="2">快宝支付专业支付通道</td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td width="18%" height="25" align="right" bgcolor="#F1F1F1">商户ID：</td>
    <td width="82%"><input name="sID" type="text" id="sID" value="<%=sID%>" size="30" maxlength="50"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">密钥：</td>
    <td><input name="sKey" type="text" id="sKey" size="30"  value="<%=sKey%>" maxlength="225"></td>
  </tr>
  <tr bgcolor="#F1F1F1">
    <td height="25" align="right" bgcolor="#F1F1F1">&nbsp;</td>
    <td><input type="submit" name="Submit3" value="提 交">
	<input type="hidden" name="update" value="OK"/>
	<input type="hidden" name="ptype" value="kbpay"/>
	</td>
  </tr>
  </form>
</table><br>
<%
case else
%><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="1" class="tablegg">
  <tr>
    <td><table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#F1F1F1">
      <tr bgcolor="#8CB0CE">
        <td height="23"><div align="center" class="style4"></div></td>
      </tr>
      <tr>
        <td height="84" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
          <tr bgcolor="#BDD2E3">
            <td height="26" colspan="2"><span class="forumRow">&nbsp;&nbsp;&nbsp;<strong>&nbsp;&nbsp;: : 系统错误 : :</strong></span></td>
          </tr>
          <tr bgcolor="#F1F1F1">
            <td width="10%" height="26" align="center">□</td>
            <td width="90%" height="26">您没有管理的权限或者您的登录已经超时，请重新<a href="index.asp" target="_parent">登录</a>！</td>
          </tr>
          <tr bgcolor="#F1F1F1">
            <td height="26" align="center">□</td>
            <td height="26">调用参数非法导致错误，请不要越权使用！</td>
          </tr>
        </table></td>
      </tr>
      <tr align="center" bgcolor="#BDD2E3">
        <td height="35" align="right" bgcolor="#BDD2E3"><span class="style1">Copyright &copy; 2002 - 2009<a href="http://www.010sms.com" target="_blank"> <font face="Verdana,">huaqisoft</font></a></span> <span class="style1">AllRights Reserved</span>&nbsp;&nbsp;&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
<%
end select
call DBConnEnd
%>
</body>
</html>
