Chat.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.Data.OleDb;
- using PowerTalkBox;
- public partial class PowerChatRoom_Chat : System.Web.UI.Page
- {
- public string uidstr = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "PowerChatRoom_Chat");
-
- object objuid=Request.QueryString["uid"];
- if (objuid != null)
- {
- uidstr = objuid.ToString();
- }
- if (!IsPostBack)
- {
- try
- {
- if(PowerTalkBox.PowerTalk.ExistUser(Server.HtmlEncode(SessionInclude.SessionId)))
- {
- PowerTalkBox.PowerTalk.DeleteUserInfo(Server.HtmlEncode(SessionInclude.SessionId));
- }
- PowerTalkBox1.MyUserName = Server.HtmlEncode(SessionInclude.SessionId);
- PowerTalkBox1.OutLocation = "../../MyDeskTop/MyPrompt.aspx";//过期后到评论的页面
- PowerTalkBox1.UserChangeList = "";//不提示任何消息
- PowerTalkBox1.InitLoad(); //初始化PowerTalkBox
- }
- catch { }
- }
-
- }
- /// <summary>
- /// 退出的脚本
- /// </summary>
- public string OutScript
- {
- get {
- return @"
- <script type=""text/javascript"">
- <!--
- window.onbeforeunload = onbeforeunload_handler;
- window.onunload = onunload_handler;
- function onbeforeunload_handler(){
- document.getElementById('PowerTalkImg').src='LoginOut.aspx?uid=" + uidstr + @"';
- var warning=""感谢您的咨询,欢迎您下次光临!"";
- alert(warning);
- //return warning;
- }
-
- function onunload_handler(){
-
- //var warning=""谢谢光临"";
- //alert(warning);
- }
- // -->
- </script>";
- }
-
- }
-
- }