亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? postmessage.aspx.cs

?? 企業內部信息交流系統
?? CS
字號:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using infoWeb.WebModules.Accounts.Business;

namespace infoWeb.WebModules.Forums.Web
{
	/// <summary>
	/// Summary description for Post.
	/// </summary>
	public class PostMessage : infoWeb.ThePhile.Web.PhilePage
	{
		protected System.Web.UI.WebControls.TableCell MessageBoxHeader;
		protected System.Web.UI.WebControls.TextBox Subject;
		protected System.Web.UI.WebControls.TextBox Message;
		protected System.Web.UI.WebControls.TextBox Key;
		protected System.Web.UI.WebControls.TableRow SubjectRow;
		protected System.Web.UI.WebControls.TableRow KeyRow;
		protected System.Web.UI.WebControls.TableRow SpecialTagsRow;
		protected Web.Controls.User.Header Header;
		protected System.Web.UI.WebControls.Table MessageBox;

		private int forumID;
		private int topicID;
		private int replyID;
		private bool canModerateForums;
		SiteIdentity currUser;
		Business.Member currMember;

		private void Page_Load(object sender, System.EventArgs e)
		{	
			// if the user is not authenticated, redirect to the login page
			if (!Context.User.Identity.IsAuthenticated)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx", true);
			}

			// retrieve the current user/member
			currUser = (SiteIdentity)Context.User.Identity;
			currMember = new Business.Member();
			currMember.LoadFromUser(currUser.UserID);

			// if the user is not registered for the forum, redirect to the profile page
			if (currMember.ID == -1)
			{
				Response.Redirect("MyProfile.aspx", true);
			}
			
			// check if the user has the permission to moderate the forums
			SitePrincipal currentPrincipal = (SitePrincipal)Context.User;
			canModerateForums = currentPrincipal.HasPermission(
				(int)ForumsPermissions.ModerateForums);

			// if the user wants to edit a topic or reply, but does not have the permission to do so,
			// redirect to the login page
			if (Request.QueryString["Action"].ToString().ToLower().StartsWith("edit") 
				&& !canModerateForums)
			{
				Response.Redirect("/ThePhile/Modules/Users/Login.aspx?ShowError=true", true);
			}

			// extract the ForumID, if specified
			if (Request.QueryString["ForumID"] == null)
				forumID = -1;
			else
				forumID = int.Parse(Request.QueryString["ForumID"]);

			// extract the TopicID, if specified
			if (Request.QueryString["TopicID"] == null)
				topicID = -1;
			else
				topicID = int.Parse(Request.QueryString["TopicID"]);

			// extract the ReplyID, if specified
			if (Request.QueryString["ReplyID"] == null)
				replyID = -1;
			else
				replyID = int.Parse(Request.QueryString["ReplyID"]);
			
			if (!Page.IsPostBack)
			{
				// show/hide the icons for the special tags, according to the settings
				SpecialTagsRow.Visible = Configuration.ModuleConfig.GetSettings().SpecialTagsEnabled;

				// save the referrer Url
				ViewState["ReferrerUrl"] = Request.UrlReferrer.ToString();

				Business.Forum forum = new Business.Forum(forumID);
				Business.Topic topic = new Business.Topic(topicID);
				Business.Reply reply = new Business.Reply(replyID);

				// show the fields and the navigation path, according to the
				// action to complete, and the forum/topic/reply ID
				switch(Request.QueryString["Action"].ToString().ToLower())
				{
					case "newtopic":
						SubjectRow.Visible = true;
						KeyRow.Visible = canModerateForums;
						MessageBoxHeader.Text = "New topic";
						Header.ForumID = forumID;
						break;

					case "edittopic":
						SubjectRow.Visible = true;
						KeyRow.Visible = canModerateForums;
						MessageBoxHeader.Text = "Edit topic";	
						Subject.Text = topic.Subject;
						Key.Text = topic.Key;
						Message.Text = topic.Message;
						Header.TopicID = topicID;
						break;

					case "newreply":
						SubjectRow.Visible = false;
						KeyRow.Visible = false;
						MessageBoxHeader.Text = "New reply";
						Header.TopicID = topicID;
						
						// a topic or another reply can being quoted by this new reply, check it it is the case
						int quoteTopicID;
						int quoteReplyID;
						// extract the QuoteTopicID, if specified
						if (Request.QueryString["QuoteTopicID"] == null)
							quoteTopicID = -1;
						else
							quoteTopicID = int.Parse(Request.QueryString["QuoteTopicID"]);
						// extract the QuoteReplyID, if specified
						if (Request.QueryString["QuoteReplyID"] == null)
							quoteReplyID = -1;
						else
							quoteReplyID = int.Parse(Request.QueryString["QuoteReplyID"]);

						// if a topic is being quoted, add it to the MessageBox
						if (quoteTopicID != -1)
						{
							Business.Topic existentTopic = new Business.Topic(quoteTopicID);
							Message.Text += string.Format("[QUOTE]{0}[/QUOTE]", existentTopic.Message);
						}
						// if a reply is being quoted, add it to the MessageBox
						if (quoteReplyID != -1)
						{
							Business.Reply existentReply = new Business.Reply(quoteReplyID);
							Message.Text += string.Format("[QUOTE]{0}[/QUOTE]", existentReply.Message);
						}

						break;

					case "editreply":
						SubjectRow.Visible = false;
						KeyRow.Visible = false;
						Message.Text = reply.Message;
						MessageBoxHeader.Text = "Edit reply";
						Header.TopicID = reply.Topic.ID;
						break;
				}
			}
		}

		public bool CanModerateForums
		{
			get { return canModerateForums; }
		}

		protected void SubmitMessage_Click(object sender, EventArgs e)
		{
			Business.Forum forum = new Business.Forum(forumID);
			Business.Topic topic = new Business.Topic(topicID);
			Business.Reply reply = new Business.Reply(replyID);

			switch(Request.QueryString["Action"].ToString().ToLower())
			{
				// create a new topic
				case "newtopic":
					int newID = forum.AddTopic(Key.Text, Subject.Text, Message.Text, currMember.ID).ID;
					Response.Redirect("Topic.aspx?TopicID=" + newID.ToString(), true);
					break;

				// edit an existent topic
				case "edittopic":
					topic.Key = Key.Text;
					topic.Subject = Subject.Text;
					topic.Message = Message.Text;
					topic.Update();
					break;

				// add a new reply
				case "newreply":
					topic.AddReply(Message.Text, currMember.ID);
					// add the parameter to the Referrer Url to jump to the last page of the topic
					if (!ViewState["ReferrerUrl"].ToString().ToLower().EndsWith("&display=lastpage"))
						ViewState["ReferrerUrl"] += "&Display=LastPage";
					break;

				// edit an existent reply
				case "editreply":
					reply.Message = Message.Text;
					reply.Update();
					break;
			}

			// redirect to the referrer page
			Response.Redirect(ViewState["ReferrerUrl"].ToString());
		}

		protected void CancelMessage_Click(object sender, EventArgs e)
		{
			// go back to the referrer page
			Response.Redirect(ViewState["ReferrerUrl"].ToString());
		}


		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			base.OnInit(e);
			InitializeComponent();
			
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产福利一区在线| 不卡视频一二三| 欧美日韩aaa| 亚洲宅男天堂在线观看无病毒| 97久久精品人人澡人人爽| 久久精子c满五个校花| 久久99国产精品免费网站| 日韩欧美不卡一区| 国产一区二区三区国产| 久久久久成人黄色影片| 丁香啪啪综合成人亚洲小说| 亚洲欧洲国产日本综合| 91国产成人在线| 日韩黄色小视频| 精品福利视频一区二区三区| 丁香亚洲综合激情啪啪综合| 综合久久国产九一剧情麻豆| 欧美天天综合网| 久久国产生活片100| 久久久久久久久久久久电影| 成年人国产精品| 亚洲一二三区在线观看| 日韩欧美久久久| 国产福利精品一区二区| 亚洲欧美经典视频| 91.xcao| 国产成人在线免费| 亚洲一区二区在线观看视频 | 91在线视频免费观看| 亚洲国产裸拍裸体视频在线观看乱了| 91.成人天堂一区| 国产成人aaa| 偷偷要91色婷婷| 国产精品网站在线播放| 欧美亚洲免费在线一区| 激情综合色丁香一区二区| 亚洲天堂免费在线观看视频| 3d成人动漫网站| 成人av先锋影音| 蜜臀久久99精品久久久画质超高清| 久久九九99视频| 欧美一区二区观看视频| 99在线精品视频| 久久99精品久久久久久国产越南| 成人欧美一区二区三区1314| 日韩欧美在线影院| 一本色道久久综合精品竹菊| 久草在线在线精品观看| 亚洲国产视频一区| 国产亚洲短视频| 69堂国产成人免费视频| 91啪九色porn原创视频在线观看| 久久成人免费网| 亚洲成人综合网站| 自拍偷拍国产精品| 久久久天堂av| 欧美一区二区成人| 在线影院国内精品| 成人综合婷婷国产精品久久蜜臀 | 日韩国产在线观看一区| 最新成人av在线| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美日韩精品欧美日韩精品 | 91成人免费电影| 99久久精品免费看国产免费软件| 国产一区二区在线看| 奇米影视一区二区三区| 天天综合天天做天天综合| 亚洲伦理在线精品| 亚洲欧洲性图库| 中文字幕精品—区二区四季| 亚洲精品在线三区| 日韩欧美一区二区在线视频| 欧美日韩电影在线| 欧美日韩亚洲综合一区二区三区| 色综合婷婷久久| 99精品桃花视频在线观看| 成人伦理片在线| 国产精品夜夜嗨| 国产激情精品久久久第一区二区| 久久99精品视频| 国产一区啦啦啦在线观看| 国产一区二区主播在线| 国产高清不卡二三区| 国产成人日日夜夜| 成人在线视频首页| 99久久99久久精品国产片果冻| 成人性色生活片| 波多野结衣在线aⅴ中文字幕不卡| 91在线免费视频观看| 99久久国产综合色|国产精品| 99精品视频在线播放观看| av不卡一区二区三区| 99久久综合狠狠综合久久| 一本久久a久久精品亚洲| 色网综合在线观看| 欧美日韩你懂得| 欧美电影在哪看比较好| 日韩三级伦理片妻子的秘密按摩| 精品久久国产老人久久综合| 久久久久久99精品| 国产精品国产精品国产专区不蜜 | 国产91精品精华液一区二区三区| 成人国产一区二区三区精品| 91香蕉视频污| 欧美乱妇15p| 精品久久人人做人人爰| 国产精品网站在线观看| 亚洲午夜久久久久久久久电影网| 五月天欧美精品| 久久精品国产亚洲a| 国产iv一区二区三区| 91久久精品网| 欧美一级夜夜爽| 国产精品系列在线| 亚洲福利国产精品| 国产一区免费电影| 91福利资源站| 欧美成人r级一区二区三区| 欧美国产欧美综合| 天天综合天天综合色| 国产成人福利片| 欧美日韩一区二区三区不卡| 欧美精品一区二区三区在线| 成人欧美一区二区三区黑人麻豆 | 中文字幕亚洲在| 天天色综合成人网| 粉嫩aⅴ一区二区三区四区五区 | 欧美久久久久久久久久| 久久久国产精品麻豆| 一区二区三区四区不卡视频| 久久精品国产亚洲5555| 色老汉av一区二区三区| 欧美成人三级电影在线| 一区二区三区中文字幕精品精品| 久久精品国产精品亚洲红杏 | 一区二区三区加勒比av| 黑人巨大精品欧美一区| 色乱码一区二区三区88| 亚洲精品在线免费播放| 视频一区二区三区入口| 99久久精品免费精品国产| 精品国产乱码久久| 亚洲va天堂va国产va久| 99久久国产综合色|国产精品| 精品国产3级a| 视频一区二区中文字幕| 蜜臀91精品一区二区三区 | 欧美日韩久久一区二区| 日韩视频一区二区三区| 亚洲成a人v欧美综合天堂 | 91色婷婷久久久久合中文| 日韩天堂在线观看| 丝袜亚洲精品中文字幕一区| 欧美亚洲日本一区| 日韩影视精彩在线| 久久精品欧美一区二区三区麻豆| 日韩一二三四区| 国产精品免费丝袜| 激情五月婷婷综合| 日韩一区二区免费在线电影 | 欧美国产日韩a欧美在线观看| 麻豆专区一区二区三区四区五区| 欧美少妇xxx| 亚洲手机成人高清视频| 高清beeg欧美| 国产午夜精品美女毛片视频| 精品制服美女久久| 日韩一区二区免费高清| 日韩精品1区2区3区| 91精品国产色综合久久ai换脸| 26uuu色噜噜精品一区| 久久精品国产精品亚洲红杏| 国产精品久久久久久一区二区三区| 26uuu欧美| 国产大片一区二区| 人人精品人人爱| 亚洲视频一区二区免费在线观看| 99免费精品在线观看| 欧美日韩免费观看一区二区三区| 日本一区二区视频在线观看| 99r国产精品| 伦理电影国产精品| 中文字幕一区二区三区色视频 | 亚洲欧美在线高清| 亚洲第一激情av| 国产精品自产自拍| 日韩欧美另类在线| 看电视剧不卡顿的网站| 久久人人超碰精品| 成人午夜电影小说| 一区二区三区精品久久久| 久久噜噜亚洲综合| 亚洲视频中文字幕| 国产不卡视频一区| 国产精品国产三级国产三级人妇| 99vv1com这只有精品| 国产欧美日韩在线观看| 91小视频免费观看| 欧美成人猛片aaaaaaa|