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

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"/>\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"";
echo $vd['sc'];
echo "css/main.css\"/>\r\n\r\n</head>\r\n<body>\r\n<div id=\"titleDiv\">\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;\">支付网关管理</span></div>\r\n<div style=\"float:right;\"><a href=\"index.php?m=mod_home&a=Help&t=admin_b2b_paymen_indext\" 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 id=\"content\" class=\"cwarpper\">\r\n<div class=\"cbodyHead\"></div>\r\n<div class=\"cwarpper1\">\r\n<div class=\"ctitle\">\r\n  支付网关\r\n  ";
echo "<s";
echo "trong onmouseover=\"showhide(this);\" onmouseout=\"showhide(this);\" style=\"cursor:pointer\">[?]</strong><p style=\"display:none\">\r\n    支付网关：是用户使用网上银行进行付款的一个接口<br/>\r\n    国内有多家支付网关公司，您只需要和其它一家公司申请接口，就可以让您的客户实现网上银行支付功能<br/>目前国内大部分银行，任何一个支付网关基本都支持，具体您可以和支付网关公司的客服进行咨询<br/>\r\n    <br/>默认：前台网上银行充";
echo "值的地方，通过各商业银行付款时使用的网关，目前支持财付通和支付宝<br/>\r\n    <br/>各网关地址：<br/>\r\n    财付通：http://mch.tenpay.com 请申请即时到帐交易<br/>\r\n    支付宝：http://www.alipay.com 请申请即时到帐交易<br/>\r\n    贝宝：http://www.paypal.com <br/>\r\n    易宝：http://www.yeepay.com <br/>\r\n    网银中国：http://www.chinabank.com.cn <br/>\r\n    云网支付：http://www.cncard.net <br/>\r\n  </p>\r\n</div>\r\n";
$yeepay_frd = array(
				array( "code" => "", "name" => "所有卡种(包括银行卡)" ),
				array( "code" => "SZX-NET", "name" => "神州行" ),
				array( "code" => "UNICOM-NET", "name" => "联通卡" ),
				array( "code" => "QQCARD-NET", "name" => "Q币支付" ),
				array( "code" => "SNDACARD-NET", "name" => "盛大卡" ),
				array( "code" => "JUNNET-NET", "name" => "骏网一卡通" ),
				array( "code" => "ZHENGTU-NET", "name" => "征途卡" ),
				array( "code" => "YPCARD-NET", "name" => "易宝一卡通" ),
				array( "code" => "LIANHUAOKCARD-NET", "name" => "联华OK卡" )
);
echo "<div id=\"notalipay\">\r\n  <form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=Payment&a=Create\" id=\"cform\">\r\n  <table border=\"1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n    <tr>\r\n      <td align=\"center\" height=\"35\" colspan=\"2\" class=\"listhead\" style=\"text-align:left;font-weight:bold;font-size:16px;padding-left:10px;color:#ff0000\">\r\n      <img src=\"";
echo $vd['sc'];
echo "images/add.gif\" style=\"vertical-align:middle\" border=\"0\"/> 添加网关\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">网关</div></td>\r\n      <td class=\"buyrt\">\r\n        ";
echo "<s";
echo "elect size=\"1\" id=\"thispaytype\" name=\"paytype\" onchange=\"set(this)\">\r\n          <option value=\"chinabank|网银中国\">网银中国</option>\r\n          <option value=\"tenpay|财付通\">财付通</option>\r\n          <option value=\"alipay|支付宝\">支付宝</option>\r\n          <option value=\"paypal|贝宝\">贝宝</option>\r\n          <option value=\"yeepay|易宝\">易宝</option>\r\n          <option value=\"cncard|云网支付\">云网支付</option";
echo ">\r\n          <option value=\"paydollar|paydollar支付\">paydollar</option>\r\n        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">商户</div></td>\r\n      <td class=\"buyrt\"><input name=\"paymerchant\" type=\"text\" style=\"width:160px;\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">密钥</div></td>\r\n      <td class=\"buyrt\"><input name=\"paykey\" type=\"text\" style";
echo "=\"width:160px;\"></td>\r\n    </tr>\r\n    <tr id=\"othertr\" style=\"display:none\">\r\n      <td class=\"buylt\"><div align=\"center\">支付通道</div></td>\r\n      <td class=\"buyrt\">\r\n        ";
echo "<s";
echo "elect size=\"1\" name=\"other\">\r\n          ";
option( $yeepay_frd, "", "name", "code" );
echo "        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">手续费</div></td>\r\n      <td class=\"buyrt\"><input name=\"payfee\" type=\"text\" style=\"width:30px;\"> <b>%</b></td> \r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">使用</div></td>\r\n      <td class=\"buyrt\"><input name=\"payopen\" type=\"checkbox\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\"></td>\r\n    </tr>\r\n  ";
echo "  <tr>\r\n      <td class=\"buylt\"><div align=\"center\">默认</div></td>\r\n      <td class=\"buyrt\"><input name=\"isdefault\" type=\"checkbox\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\"></td>\r\n      <td class=\"buyrt\">\r\n        <input type=\"submit\" name=\"Submit\" value=\"添 加 &gt;&gt;\" class=\"button\">\r\n        <input type=\"reset\"   value=\"重 填 &gt";
echo ";&gt;\" class=\"button\"/>\r\n      </td>\r\n    </tr>\r\n  </table>\r\n  </form>\r\n  </div>\r\n  \r\n  <div id=\"alipay\" style=\"display:none\">\r\n  <form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=Payment&a=Create\">\r\n  <table border=\"1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n    <tr>\r\n      <td align=\"center\" height=\"35\" colspan=\"2\" class=\"listhead\" style=\"text-align:left;font-weight:bold;font-size:16px;padding";
echo "-left:10px;color:#ff0000\">\r\n      <img src=\"";
echo $vd['sc'];
echo "images/add.gif\" style=\"vertical-align:middle\" border=\"0\"/> 添加网关\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">网关</div></td>\r\n      <td class=\"buyrt\">\r\n        ";
echo "<s";
echo "elect size=\"1\" id=\"alipaytype\" name=\"paytype\" onchange=\"set(this)\">\r\n          <option value=\"chinabank|网银中国\">网银中国</option>\r\n          <option value=\"tenpay|财付通\">财付通</option>\r\n          <option value=\"alipay|支付宝\">支付宝</option>\r\n          <option value=\"paypal|贝宝\">贝宝</option>\r\n          <option value=\"yeepay|易宝\">易宝</option>\r\n          <option value=\"cncard|云网支付\">云网支付</option>";
echo "\r\n          <option value=\"paydollar|paydollar支付\">paydollar</option>\r\n        </select>\r\n      </td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">支付宝帐户</div></td>\r\n      <td class=\"buyrt\"><input name=\"paymerchant\" type=\"text\" style=\"width:160px;\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">安全检验码(key)</div></td>\r\n      <td class=\"buyrt\"><input name=\"paykey\" t";
echo "ype=\"text\" style=\"width:160px;\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">合作者身份(PID)</div></td>\r\n      <td class=\"buyrt\"><input name=\"other\" type=\"text\" style=\"width:160px;\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">手续费</div></td>\r\n      <td class=\"buyrt\"><input name=\"payfee\" type=\"text\" style=\"width:30px;\"> <b>%</b></td>\r\n    </tr>\r\n    <tr>\r\n      <td ";
echo "class=\"buylt\"><div align=\"center\">使用</div></td>\r\n      <td class=\"buyrt\"><input name=\"payopen\" type=\"checkbox\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><div align=\"center\">默认</div></td>\r\n      <td class=\"buyrt\"><input name=\"isdefault\" type=\"checkbox\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\"></td>\r\n    </tr>\r\n    <tr>\r\n      <td class=\"buylt\"><di";
echo "v align=\"center\"></td>\r\n      <td class=\"buyrt\">\r\n        <input type=\"submit\" name=\"Submit\" value=\"添 加 &gt;&gt;\" class=\"button\">\r\n        <input type=\"reset\"   value=\"重 填 &gt;&gt;\" class=\"button\"/>\r\n      </td>\r\n    </tr>\r\n  </table>\r\n  </form>\r\n  </div>   \r\n";
foreach ( $vd['payment'] as $pay )
{
				if ( $pay['payType'] == "支付宝" )
				{
								echo "<form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=Payment&a=Update&id=";
								echo $pay['id'];
								echo "\">\r\n<table border=\"1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n  <tr>\r\n    <td align=\"center\" height=\"35\" colspan=\"2\" class=\"listhead\" style=\"text-align:left;font-weight:bold;font-size:16px;padding-left:10px;color:#ff0000\">\r\n      ";
								echo "<s";
								echo "pan style=\"float:right;\"><a href=\"index.php?m=mod_b2b&c=Payment&a=Del&id=";
								echo $pay['id'];
								echo "\" title=\"删除\" onClick=\"return confirm('您确定要删除此网关吗？')\">\r\n        <img src=\"";
								echo $vd['sc'];
								echo "images/icon_trash.gif\" border=\"0\"/>\r\n      </a>\r\n      </span>支付宝\r\n      <input type=\"hidden\" name=\"paytype\" value=\"";
								echo $pay['paycode'];
								echo "|";
								echo $pay['payType'];
								echo "\"/>\r\n    </td>\r\n  </tr>\r\n  <tr> \r\n    <td class=\"buylt\">\r\n      <div align=\"center\">支付宝帐户</div>\r\n    </td>\r\n    <td class=\"buyrt\">\r\n      <input name=\"paymerchant\" type=\"text\" style=\"width:160px;\" value=\"";
								echo $pay['payMerchant'];
								echo "\">\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">安全检验码(key)</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"paykey\" type=\"password\" style=\"width:160px;\" value=\"";
								echo $pay['payKey'];
								echo "\">\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">合作者身份(PID)</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"other\" type=\"password\" style=\"width:160px;\" value=\"";
								echo $pay['other'];
								echo "\">\r\n    </td>\r\n  </tr>\r\n  <tr> \r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">手续费</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"payfee\" type=\"text\" size=\"10\" style=\"width:30px\" value=\"";
								echo $pay['payfee'] * 100;
								echo "\"> <b>%</b>\r\n    </td>\r\n  </tr>\r\n  <tr> \r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">使用</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"payopen\" type=\"checkbox\" class=\"checkbox\" value=\"1\" onFocus=\"this.blur()\" ";
								if ( $pay['payOpen'] == "1" )
								{
												echo " checked ";
								}
								echo "/>\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\"><div align=\"center\">默认</div></td>\r\n     <td class=\"buyrt\"><input name=\"isdefault\" type=\"checkbox\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\" ";
								if ( $pay['isdefault'] == "1" )
								{
												echo " checked ";
								}
								echo "></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\" height=\"50px\"></td>\r\n    <td class=\"buyrt\"><input type=\"submit\" value=\"确认修改\" class=\"button\"/> <input type=\"reset\" value=\"重新填写\" class=\"button\"/></td>\r\n  </tr>\r\n</table>\r\n</form>\r\n";
				}
				else
				{
								echo "<form name=\"form1\" method=\"post\" action=\"index.php?m=mod_b2b&c=Payment&a=Update&id=";
								echo $pay['id'];
								echo "\">\r\n<table border=\"1\" class=\"ctable\" bordercolor=\"#ededed\">\r\n  <tr>\r\n    <td align=\"center\" height=\"35\" colspan=\"2\" class=\"listhead\" style=\"text-align:left;font-weight:bold;font-size:16px;padding-left:10px;color:#ff0000\">\r\n      ";
								echo "<s";
								echo "pan style=\"float:right;\"><a href=\"index.php?m=mod_b2b&c=Payment&a=Del&id=";
								echo $pay['id'];
								echo "\" title=\"删除\" onClick=\"return confirm('您确定要删除";
								echo $pay['payType'];
								echo "网关吗？')\">\r\n        <img src=\"";
								echo $vd['sc'];
								echo "images/icon_trash.gif\" border=\"0\"/>\r\n      </a>\r\n      </span>\r\n      ";
								echo $pay['payType'];
								echo "      <input type=\"hidden\" name=\"paytype\" value=\"";
								echo $pay['paycode'];
								echo "|";
								echo $pay['payType'];
								echo "\"/>\r\n    </td>\r\n  </tr>\r\n  <tr> \r\n    <td class=\"buylt\">\r\n      <div align=\"center\">商户</div>\r\n    </td>\r\n    <td class=\"buyrt\">\r\n      <input name=\"paymerchant\" type=\"text\" style=\"width:160px;\" value=\"";
								echo $pay['payMerchant'];
								echo "\">\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">密钥</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"paykey\" type=\"password\" style=\"width:160px;\" value=\"";
								echo $pay['payKey'];
								echo "\">\r\n    </td>\r\n  </tr>\r\n  <tr id=\"othertr\" style=\"";
								if ( $pay['paycode'] != "yeepay" )
								{
												echo "display:none";
								}
								echo "\">\r\n    <td class=\"buylt\"><div align=\"center\">支付通道</div></td>\r\n    <td class=\"buyrt\">\r\n      ";
								echo "<s";
								echo "elect size=\"1\" name=\"other\">\r\n        ";
								option( $yeepay_frd, $pay['other'], "name", "code" );
								echo "      </select>\r\n    </td>\r\n  </tr>\r\n  <tr> \r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">手续费</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"payfee\" type=\"text\" size=\"10\" style=\"width:30px\" value=\"";
								echo $pay['payfee'] * 100;
								echo "\"> <b>%</b>\r\n    </td>\r\n  </tr>\r\n  <tr> \r\n    <td class=\"buylt\"> \r\n      <div align=\"center\">使用</div>\r\n    </td>\r\n    <td class=\"buyrt\"> \r\n      <input name=\"payopen\" type=\"checkbox\" class=\"checkbox\" value=\"1\" onFocus=\"this.blur()\" ";
								if ( $pay['payOpen'] == "1" )
								{
												echo " checked ";
								}
								echo ">\r\n    </td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\"><div align=\"center\">默认</div></td>\r\n     <td class=\"buyrt\"><input name=\"isdefault\" type=\"checkbox\" value=\"1\" class=\"checkbox\" onFocus=\"this.blur()\" ";
								if ( $pay['isdefault'] == "1" )
								{
												echo " checked ";
								}
								echo "></td>\r\n  </tr>\r\n  <tr>\r\n    <td class=\"buylt\" height=\"50px\"></td>\r\n    <td class=\"buyrt\"><input type=\"submit\" value=\"确认修改\" class=\"button\"/> <input type=\"reset\" value=\"重新填写\" class=\"button\"/></td>\r\n  </tr>\r\n</table>\r\n</form>\r\n";
				}
}
echo "</div>\r\n<div class=\"cbodyFoot\"></div>\r\n</div>\r\n<div id=\"opcontent\" style=\"display:none\">\r\n  <div class=\"optxt\">\r\n  </div>\r\n</div>\r\n";
echo "<s";
echo "cript type=\"text/javascript\">\r\n  var ctablenum = 2;\r\n</script>\r\n";
echo "<s";
echo "cript src=\"";
echo $vd['sc'];
echo "js/content.js\" type=\"text/javascript\"></script>\r\n";
echo "<s";
echo "cript type=\"text/JavaScript\">\r\nfunction set(obj){\r\n    var pay = obj.options[obj.selectedIndex].value;\r\n    sel = obj.selectedIndex;\r\n    var flag = 0;\r\n    if(pay == \"alipay|支付宝\")\r\n    {\r\n      flag = 1;\r\n      var alipaytype = \$('alipaytype');\r\n      alipaytype.selectedIndex = sel;\r\n    }\r\n    else\r\n    {\r\n      flag = 0;\r\n      var mypaytype = \$('thispaytype');\r\n      mypaytype.selectedIndex";
echo " = sel;\r\n      \r\n      if(pay == \"yeepay|易宝\")\r\n      {\r\n        \$(\"othertr\").style.display = \"\";\r\n      }\r\n      else\r\n      {\r\n        \$(\"othertr\").style.display = \"none\";\r\n      }\r\n      \r\n      \r\n    }\r\n\r\n    var objshow = flag ? \$('alipay') : \$('notalipay');\r\n    var objhide = flag ? \$('notalipay') : \$('alipay');\r\n    objshow.style.display = \"\";\r\n    objhide.style.display = \"none\";\r\n  }\r\n</sc";
echo "ript>\r\n</body>\r\n</html>\r\n";
?>
