LogList.aspx.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. namespace LYFZ.WeixinServers
  8. {
  9. public partial class LogList : System.Web.UI.Page
  10. {
  11. public string tempLogs = "日志功能未来开启";
  12. public string ddomaineList="暂无待调试加密锁域名";
  13. protected void Page_Load(object sender, EventArgs e)
  14. {
  15. if (!Global.LogsDongleDomainList.Contains(LYFZ.WXLibrary.OpenPlatformConfig.MicroLetterTestUsername))
  16. {
  17. Global.LogsDongleDomainList.Add(LYFZ.WXLibrary.OpenPlatformConfig.MicroLetterTestUsername);
  18. }
  19. if (LYFZ.WXLibrary.CommonHandleClass.IsOpenLogs) {
  20. tempLogs = "日志功能已开启";
  21. }
  22. if (Request.QueryString["logs"] != null && Request.QueryString["logs"].ToString() == "del")
  23. {
  24. LYFZ.WXLibrary.CommonHandleClass.DeleteWeiXinlogs();
  25. Response.Write("<script>document.location='LogList.aspx';</script>");
  26. }
  27. else if (Request.QueryString["logs"] != null && Request.QueryString["logs"].ToString() == "y")
  28. {
  29. LYFZ.WXLibrary.CommonHandleClass.IsOpenLogs=true;
  30. Response.Write("<script>document.location='LogList.aspx';</script>");
  31. }
  32. else if (Request.QueryString["logs"] != null && Request.QueryString["logs"].ToString() == "n")
  33. {
  34. LYFZ.WXLibrary.CommonHandleClass.IsOpenLogs = false;
  35. Response.Write("<script>document.location='LogList.aspx';</script>");
  36. }
  37. if (Request.QueryString["type"] != null && Request.QueryString["type"].ToString() == "add"&&Request.QueryString["ddomaine"]!=null)
  38. {
  39. string ddomaine=Request.QueryString["ddomaine"].ToString();
  40. if (!Global.LogsDongleDomainList.Contains(ddomaine))
  41. {
  42. Global.LogsDongleDomainList.Add(ddomaine);
  43. Response.Write("<script>document.location='LogList.aspx';</script>");
  44. }
  45. }
  46. else if (Request.QueryString["type"] != null && Request.QueryString["type"].ToString() == "del")
  47. {
  48. Global.LogsDongleDomainList.Clear();
  49. Response.Write("<script>document.location='LogList.aspx';</script>");
  50. }
  51. if (Global.LogsDongleDomainList.Count > 0)
  52. {
  53. ddomaineList = "";
  54. foreach (string ddomaine in Global.LogsDongleDomainList)
  55. {
  56. ddomaineList += ddomaine + "<br />";
  57. }
  58. }
  59. }
  60. }
  61. }