<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../Global.Master" CodeBehind="APISetting.aspx.cs" Inherits="Web.AdminManager.Setting.APISetting" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/Setting.APISetting.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="hutype" style="display:none;"><%=utype %></div>
    <div id="UI_Edit" runat="server" visible="false">
        <form action="" class="ui-form ui-form-vertical" method="post">
            <fieldset class="p5">
                <legend>接口信息</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">接口名称</label><div class="ui-form-ctrls">
                        <input type="text" name="APIType" id="APIType"
                            class="ui-input-small" value="<%=utype==CommonLib.API.APIUseType.域名接口.GetHashCode()?Enum.Parse(typeof(CommonLib.API.Pro_APIType), ma.APIType.ToString()).ToString():Enum.Parse(typeof(CommonLib.API.Pay_APIType), ma.APIType.ToString()).ToString() %>" readonly="readonly" /></span><span
                                class="APIType ui-help-inline">此项为只读</span>
                    </div></div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">接口帐号</label><div class="ui-form-ctrls">
                            <input type="text" name="APIUser" id="APIUser"
                                class="ui-input-small" value="<%=ma.APIUser %>" /><span
                                    class="APIUser ui-help-inline">您的接口登录帐号</span>
                        </div>
                    </div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">接口密钥</label><div class="ui-form-ctrls">
                            <input type="password" name="APIPassWord" id="APIPassWord"
                                class="ui-input-small" value="" /><span class="APIPassWord ui-help-inline">不修改请留空</span>
                        </div>
                    </div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">接口EMAIL</label><div class="ui-form-ctrls">
                            <input name="APIEmail" type="text"
                                id="APIEmail" class="ui-input-small" value="<%=ma.APIEmail %>" /><span
                                    class="APIEmail ui-help-inline">有些接口为必填，如万网、西数</span>
                        </div>
                    </div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">是否启用</label><div class="ui-form-ctrls">
                            <select size="1" name="UseThis">
                                <option value="true" <%=ma.UseThis?"selected":"" %>>是</option>
                                <option value="false" <%=ma.UseThis?"":"selected" %>>否</option>
                            </select><span class="APIPassWord ui-help-inline">是否启用该接口</span>
                        </div>
                    </div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">是否默认</label><div class="ui-form-ctrls">
                            <select size="1" name="DefaultAPI">
                                <option value="true" <%=ma.DefaultAPI?"selected":"" %>>是</option>
                                <option value="false" <%=ma.DefaultAPI?"":"selected" %>>否</option>
                            </select><span class="APIPassWord ui-help-inline">该接口是否为默认接口</span>
                        </div>
                    </div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">注册地址：</label><div class="ui-form-ctrls"><a href="<%=RegUrl %>" target="_blank"><%=RegUrl %></a></div>
                    </div>
                    <div class="ui-form-group">
                        <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                            <button type="submit" class="ui-btn ui-btn-primary">保存设置</button>
                            &nbsp;
                    <button class="ui-btn" onclick="history.back();" type="button">返回</button>
                        </div>
                    </div>
            </fieldset>
        </form>
    </div>

    <div id="UI_List" runat="server" visible="false">
        <table class="ui-table ui-table-bordered">
            <thead>
                <!--<tr>
                    <td colspan="5">
                        <button id="create-user">
                            添加接口</button>
                    </td>
                </tr>-->
                <tr>
                    <th>接口名称
                    </th>
                    <th>接口帐号
                    </th>
                    <th>是否启用</th>
                    <th>是否默认</th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <%=ShowList%>
        </table>
    </div>
</asp:Content>
