LoginOut.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class PowerTalk_LoginOut : System.Web.UI.Page
  12. {
  13.     public string uidstr = "";
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         object objuid = Request.QueryString["uid"];
  17.         if (objuid != null)
  18.         {
  19.             uidstr = objuid.ToString();
  20.         }
  21.         if (Session["Engin_UserID"] != null)
  22.         {
  23.          //下线格式
  24.         // @downlogin:游客ID,IP地址,真实地址,进入时刻,上次访问路径
  25.             string WebServiceAnser = "在线客服" + uidstr;//客服名称
  26.          object UpHtml = null;
  27.         
  28.          try { UpHtml = Request.UrlReferrer.AbsolutePath; }
  29.          catch { }
  30.          string UpHtmlStr = "Chat.aspx";
  31.          if (UpHtml != null)
  32.          {
  33.              UpHtmlStr = UpHtml.ToString();
  34.          }
  35.      
  36.              string FormatSpliteStr = "@downlogin:" + Session["Engin_UserID"].ToString() + ",";
  37.              FormatSpliteStr += HttpContext.Current.Request.UserHostAddress + ",";
  38.              FormatSpliteStr += "local" + "," + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "," + UpHtmlStr;
  39.              PowerTalkBox.PowerTalk.AddChatInfo(Session["Engin_UserID"].ToString(), WebServiceAnser, FormatSpliteStr);
  40.              Session.Abandon();
  41.     
  42.          }
  43.     }
  44. }