<%@ Control Language="C#" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.HtmlTags" %>
<%@ Import Namespace="Kesion.APPCode" %>
<%@ Import Namespace="Kesion.Weixin" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Xml" %>
<script runat="server" type="text/C#">
    dynamic __user = HttpContext.Current.Items["user"];                //初始化用户信息，
    private static dynamic __info = new System.Dynamic.ExpandoObject();   //初始化当前页信息
    bool isLoadPage = true;  //定义页面是否加载
    DataRow dr = null;
    public static string ss = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        string DoMethod = BasicField.GetParam("do");
        if (string.IsNullOrEmpty(DoMethod))
        {
            DoMethod = KSCMS.S("action");
        }
        switch (DoMethod)
        {
            case "save":
                btn_Click();
                break;
        }
        if (!IsPostBack)
        {
            try {ss = ks_weixin.ticket(KSCMS.S("TextBox1").Trim(), 1);
            }
            catch { }

        }
    }
    protected void btn_Click()
    {
        ss = ks_weixin.ticket(KSCMS.S("TextBox1").Trim(), 1);
    }


</script>
<%
	if (!isLoadPage) return;
%>
 <link href="/SysImg/teacher/css/newswx.css" rel="stylesheet" />
 <div class="t_tybox">
  <div class="tytitle"><h4>微信二维码生成</h4></div>
  <form name="myForm" method="post" action="<%=BasicField.GetUserUrl("wx/wx_QRcode","do-save") %>" id="myForm">
    <!--<div id="manage_top" class="toptitle menu_top_fixed">
       二维码设置
    </div>
    <div class="menu_top_fixed_height"></div>-->
    <div class="console_body"> 
       <div class="content01">
         <ul class="make_code border">  
           <li style="width: 100%;"><img src="<%=ss %>" width="248" height="240"/></li>
           <li style="padding:15px 0;"><span ID="Label1" style="margin-bottom: 10px;display: block;font-size: 14px;color: #888;">请输入关键字</span>
          
            <input type="text" class="textbox" style="margin-bottom: 10px;box-sizing: border-box;width:100%; padding:0 10px; margin-right:0;" name="TextBox1" id="TextBox1" />
            <input type="submit" value="生成二维码" class="button" style="width: 100%;height:32px;line-height:32px;" />
          </ul>
        </div>
    </div>  
  </form>
 </div>
