⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getmsg.aspx.cs

📁 ASP.NET构建的笑傲江湖社区(C#,全源码提供)
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;

namespace xajh.chat
{
	/// <summary>
	/// getmsg 的摘要说明。
	/// </summary>
	public class getmsg : System.Web.UI.Page
	{
		private void Page_Load(object sender, System.EventArgs e)
		{
			if (this.Session["info"] == null)
			{
				this.Response.Write ("<script language=javascript type=text/javascript>top.location.href='../error.aspx?v=relogin'</script>");
				return;
			}
			x.UserInfo info = (x.UserInfo) this.Session["info"];
			if (this.Request.Cookies["byts"] == null || info.UserName != this.Request.Cookies["byts"]["chat"])
			{
				this.Session.Abandon();
				this.Response.Write ("<script language=javascript type=text/javascript>top.location.href='../error.aspx?v=%c7%eb%b2%bb%d2%aa%cd%ac%ca%b1%ca%b9%d3%c3%c1%bd%b8%f6%c3%fb%d7%d6%b5%c7%c2%bd%bb%f2%d6%d0%cd%be%c9%be%b3%fdcookie!'</script>");
				return;
			}
			ArrayList words = (ArrayList) this.Application["byts_xajh_chat_words_" + info.RoomID];
			int all_line = (int) this.Application["byts_xajh_chat_line_" + info.RoomID];
			int check_line = 30 - (all_line - info.MsgLine);
			if (check_line < 0)
			{
				check_line = 0;
			}
			string[] mywords;
			this.Response.Write ("<script language=javascript type=text/javascript>\r");
			for (int myline = check_line; myline < 30; myline ++)
			{
				mywords = (string[]) words[myline];
				if (!(mywords[0] == "only" && mywords[1] != info.UserName && mywords[2] != info.UserName))
				{
					this.Response.Write ("parent.h0.byts_getmsg(\"" + mywords[0] + "\",\"" + mywords[1] + "\",\"" + mywords[2] + "\",\"" + mywords[3] + "\",\"" + mywords[4] + "\",\"" + mywords[5] + "\",\"" + mywords[6] + "\",\"" + mywords[7] + "\",\"" + mywords[8] + "\");\r");
				}
			}
			this.Response.Write ("</script>");
			info.MsgLine = all_line;
			this.Session["info"] = info;
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -