<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_OnpayEdit, LebiMall" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!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 id="Head1" runat="server">
    <title>网银在线-即时到帐</title>
    <link rel="stylesheet" type="text/css" href="css/css.css" media="screen"/>
    <script type="text/javascript" language="javascript" src="js/topHead.js"></script>
    <script src="js/checked.js" type="text/javascript"></script>
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script type="text/javascript">
        var $=jQuery;
        function validate(){
            var flag=true;
            if(document.getElementById("txt_name").value==""){
                document.getElementById("msg_n").innerHTML="<span class='msg_submit'>支付名称不能为空！</span>";
                flag=false;
            }
            if(document.getElementById("txt_hao").value==""){
                document.getElementById("msg_h").innerHTML="<span class='msg_submit'>商铺号不能为空！</span>";
                flag=false;
            }
            if(document.getElementById("txt_key").value==""){
                 document.getElementById("msg_k").innerHTML="<span class='msg_submit'>商铺密钥不能为空！</span>";
                 flag=false;
            }
            if(document.getElementById("txt_wz").value==""){
                document.getElementById("msg_w").innerHTML="<span class='msg_submit'>支付类型不能为空！</span>";
                flag=false;
            }
            if(document.getElementById("txt_type").value==""){
                document.getElementById("msg_t").innerHTML="<span class='msg_submit'>返回地址不能为空！</span>";
                flag=false;
            }
            return flag;
        }
        function resizeEditor(name,size) {   
	        var newheight = parseInt(document.getElementById(name +"___Frame").style.height, 10) + size;   
	        if(newheight >= 150) {   
		        document.getElementById(name +"___Frame").style.height = newheight + 'px';   
	        }   
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return validate()">
        <script>header(6,2,"images/");</script>
        <div class="blank clearfix"></div>
        <!--功能区-->
        <div class="tabmenus mainwidth">
            <ul>
                <li><a href="onpaylist.aspx"><span>在线支付</span></a></li>
                <li class="current"><a href="#"><span>编辑在线支付</span></a></li>
            </ul>
        </div>
        <div class="tab-mainbody">
            <div class="tab-mainbody2">
                <div class="functionHandleArea clearfix">
                    <input id="Button2" type="button"  runat="server" class="btn-app" onserverclick="Button1_ServerClick"/>
                    <input type="image" name="Submit" title=" 重填 " onClick="reset();return false;" src="images/bt_res.gif" align="absmiddle" />
                    <input type="image"  title=" 返回 " onclick="history.back();return false;" src="images/bt_bak.gif" align="absmiddle" /></div>
                <div id="datalist">
                    <table cellspacing="0" border="0" id="list" style="width: 100%; border-collapse: collapse;">
                    <!-- table 导航 -->
                        <tr>
                            <th class="td_right td_left" colspan="2" align=left >编辑在线支付</th>
                        </tr>
                        <tr class="row">
                            <td class="row">
                                支付开关：
                            </td>
                            <td class="row">
                                <select id="select1" runat="server">
                                    <option value="0">关闭</option>
                                    <option value="1">开启</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td class="row">
                                支付名称：
                            </td>
                            <td class="row">
                                <input type="text" id="txt_name" runat="server" class="input" style="width: 150px;" />&nbsp;<span id="msg_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="row">
                                商户号：
                            </td>
                            <td class="row">
                                <input id="txt_hao" type="text" runat="server" class="input" style="width: 150px;" />&nbsp;<span id="msg_h"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="row">
                                商户密钥：
                            </td>
                            <td class="row">
                                <input id="txt_key" type="text" runat="server" class="input" style="width: 150px;" />&nbsp;<span
                                    id="msg_k"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="row">
                                支付卡类型：
                            </td>
                            <td class="row">
                                <input id="txt_type" type="text" runat="server" class="input" style="width: 50px;"
                                    maxlength="1" />&nbsp;<em>0：RMB(人民币) 1：USD(美元)</em>&nbsp;<span
                                    id="msg_t"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="row">
                                返回地址：
                            </td>
                            <td class="row">
                                <input id="txt_wz" type="text" runat="server" class="input" style="width: 250px;" />&nbsp;<span
                                    id="msg_w"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="row">
                                支付介绍：
                            </td>
                            <td class="row">
                                <FCKeditorV2:FCKeditor ID="fck" runat="server" ToolbarSet="Mall2" BasePath="~/images/js/fckeditor/"
                                    Height="180px" Width="450px">
                                </FCKeditorV2:FCKeditor>
                                    <a  href="javascript:resizeEditor('fck',-100)"><img style="margin-top:4px" src="images/bt_close.gif" border='0'></a>
                                &nbsp;<a href="javascript:resizeEditor('fck',150)"><img style="margin-top:4px" src="images/bt_open.gif" border='0'></a>
                            
                            </td>
                        </tr>
                        <tr>
                             <td colspan="2" class="list-foot">
                                <input id="Button1" type="button"  runat="server" class="btn-app" onserverclick="Button1_ServerClick" />
                            </td>
                        </tr>
                    </table>
                    <script type="text/javascript">tdshowm("list");</script>
                    <script type="text/javascript">
                        var fc='<%=returnValue %>';
                        var i = 2;
                        if(fc=="true"){
                            tipsWindown("提示","text:操作成功！","250","60","true","2000","true","");
                            setInterval("fun()", 1000);
                        }
                        if(fc=="false"){
                            tipsWindown("提示","text:操作失败！","250","60","true","3000","true","");
                        }
                       
                        function fun() {
                            if (i == 1) {
                                 window.location.href="Onpaylist.aspx";
                            }
                            i--;
                        }
                    </script>
                </div>
            </div>
        </div>
    </form>
</body>
</html>
