<%@ page language="C#" autoeventwireup="true" inherits="ims.web.wxadmin, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="wxadmin">
<head runat="server">
    <title>微信设置</title><meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <script src="js/comm.js"></script><script src="js/wxadmin.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s1" runat="server" OnAsyncPostBackError="AsyncError" />
    <div id="tabs" class="ui-tabs noborder">
        <ul>
            <li><a href="#qys">微信企业号</a></li>
            <li><a href="#options">选项</a></li>
        </ul>
        <div id="qys">
            <asp:UpdatePanel ID="upApps" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
            <ContentTemplate>
                <table runat="server" id="apps" class="hr mtop_n">
                    <tr><th style="width:34px">序号</th><th>应用名称</th><th style="width:48px">ID</th><th style="width:70px">设为默认</th><th style="width:32px">编辑</th><th style="width:32px">删除</th></tr>
                </table>
                <asp:Button runat="server" CssClass="hide" ID="btnOpera" OnClick="OperaApp" />
            </ContentTemplate>
            </asp:UpdatePanel>
            <div class="footBtnArea bigger">
                <asp:Button runat="server" ID="btnAdd" OnClick="AddApp" Text="添加应用" CssClass="btn" />
                <input type="button" onclick="showHelp('weixin');" value="帮助" class="btn" />
                <input type="button" onclick="back();" value="返回" class="btn" />
            </div>
        </div>
        <div id="options">
            <asp:CheckBox runat="server" ID="cbAcceptFile" Text="接收微信客户端发来的文件，存入目录：" /><asp:UpdatePanel ID="upDir" runat="server" RenderMode="Inline" UpdateMode="conditional">
                <ContentTemplate><a id="aDir" runat="server" href="#" title="点击选择目录" CausesValidation="false" onclick="return showDirTree(true);" onserverclick="DirChanged"></a></ContentTemplate>
            </asp:UpdatePanel>
            <div class="footBtnArea bigger">
                <br />
                <asp:Button runat="server" ID="btnSave" OnClick="SaveOptions" Text="保存选项" CssClass="btn" />
                <asp:Button runat="server" ID="btnMl" OnClick="ToMakeLink" Text="生成微信免登录链接" ToolTip="用于作为微信企业号菜单链接" CssClass="btn" />
            </div>
        </div>
    </div> 
    
    <ims:Pop runat="server" ID="app" Title="添加应用" OnOkClick="Save" Width="495" HideOnOkClientClick="false">
        <ContentTemplate>
            <table id="appTable" class="comm">
                <tr>
                    <td class="right" style="width:110px">名称：</td><td><asp:TextBox runat="server" ID="tbName" Width="150"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="right">应用ID：</td><td><asp:TextBox runat="server" ID="tbID" Width="150"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="right">CorpID：</td><td><asp:TextBox runat="server" ID="tbCorpid" Width="150"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="right">Secret：</td><td><asp:TextBox runat="server" ID="tbSecret" Width="356"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="right">Token：</td><td><asp:TextBox runat="server" ID="tbToken" Width="356"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="right">EncodingAESKey：</td><td><asp:TextBox runat="server" ID="tbAesKey" Width="356"></asp:TextBox></td>
                </tr>
            </table>
        </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="ml" Title="生成微信免登录链接" OnClientUpdated="bindCopy('ml_divLink');hideAlert();" Width="420" HideOnOkClientClick="false" OkButtonText="生成" OnOkClick="MakeLink" CanelButtonText="关闭">
        <ContentTemplate>
            微信应用：<asp:DropDownList runat="server" ID="ddlLink"></asp:DropDownList><br />
            链接地址：<asp:TextBox runat="server" ID="tbLink" Width="340"></asp:TextBox>
            <div class="colorText mtop_m" runat="server" id="divLink"></div>
            <div class="mtop_l sepline2"></div>
            <div class="info_btm">该链接用于设置企业号菜单，用户点击时自动登录系统。</div>
        </ContentTemplate>
    </ims:Pop>
    </form>
</body>
</html>