/// <summary>
 /// 登录窗口
 /// </summary>
 /// <returns>登录代码</returns>
 public string LoginWindow()
 {
     StringBuilder sr = new StringBuilder();
     if (SiteFun.IsPost)
     {
         UserData userData = new UserData(conn);
         //取得输入的值
         string[] postVal = { SiteFun.Post("userID"), SiteFun.Post("pwd"), SiteFun.Post("vc") };
         UserItem chkUser = userData.CheckUser(postVal[0], SiteFun.Encryption(postVal[1]), false);
         if (!SiteDat.CheckVerifyCode(postVal[2])) { sr.Append(AdminUI.ErrorBox(SiteDat.GetLan("MsgVcErr"))); }
         else
         {
             if (chkUser.ID == 0) { sr.Append(AdminUI.ErrorBox(SiteDat.GetLan("MsgNoFindAdm"))); }
             else
             {
                 userData.UpdateUserIpAndTime(chkUser.ID, SiteFun.GetGuestIP, DateTime.Now);
                 _ac.Set(postVal[0], postVal[1]);
                 HttpContext.Current.Response.Redirect(HttpContext.Current.Request.FilePath);
             }
         }
     }
     sr.Append(AdminUI.AdminBoxStart(true));
     sr.Append(HtmlUI.FormStart());
     sr.Append(HtmlUI.TableStart("autoSize onCenter"));
     sr.Append(HtmlUI.TrStart());
     sr.Append(HtmlUI.CreateTh(SiteDat.GetLan("UserId")) + HtmlUI.CreateTd(HtmlUI.Input("userID", 20, "userName", null)));
     sr.Append(HtmlUI.TrFinal());
     sr.Append(HtmlUI.TrStart());
     sr.Append(HtmlUI.CreateTh(SiteDat.GetLan("Pwd")) + HtmlUI.CreateTd(HtmlUI.PasswordInput("pwd", 20, "password", null)));
     sr.Append(HtmlUI.TrFinal());
     sr.Append(HtmlUI.TrStart());
     sr.Append(HtmlUI.CreateTh(SiteDat.GetLan("VCode")) + HtmlUI.CreateTd(HtmlUI.Input("vc", 4, null, null) + HtmlUI.Image("Service.aspx?act=verifyCode", SiteDat.GetLan("MsgClickReloadVc"), "javascript:this.src='Service.aspx?act=verifyCode&amp;random='+Math.random();")));
     sr.Append(HtmlUI.TrFinal());
     sr.Append(HtmlUI.TrStart());
     sr.Append(HtmlUI.CreateTh() + HtmlUI.CreateTd(HtmlUI.SubmitButton(SiteDat.GetLan("BtnLogin")) + HtmlUI.ResetButton()));
     sr.Append(HtmlUI.TrFinal());
     sr.Append(HtmlUI.TableFinal());
     sr.Append(HtmlUI.FormFinal());
     sr.Append(AdminUI.AdminBoxFinal());
     return sr.ToString();
 }