reply_article.aspx.cs
资源名称:论坛源码.rar [点击查看]
上传用户:scene123
上传日期:2010-02-19
资源大小:3311k
文件大小:3k
源码类别:
.net编程
开发平台:
C#
- 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 System.Data.OleDb;
- using System.Configuration;
- using System.Text;
- using System.Web.Security;
- using System.Security.Cryptography;
- namespace kuangren
- {
- /// <summary>
- /// reply_article 的摘要说明。
- /// </summary>
- public class reply_article : System.Web.UI.Page
- {
- protected int intRunTime;
- protected System.Web.UI.HtmlControls.HtmlInputText password;
- protected DateTime dtStartTime = DateTime.Now;
- public string usercookies;
- public string f3title;
- public string f3content;
- public string freply;
- public string f3name;
- public string f3date;
- public DateTime f3time;
- protected System.Data.OleDb.OleDbCommand cmd;
- protected System.Data.OleDb.OleDbConnection conn;
- public DataSet dsPending1;
- public string sql1;
- public DataSet dsPending;
- public string sql;
- private void Page_Load(object sender, System.EventArgs e)
- {
- if (Request.Cookies["jusername"]!=null)
- {
- usercookies=Request.Cookies["jusername"].Value;
- }
- else
- {
- Response.Redirect("logine.aspx");
- }
- conn = new OleDbConnection(ConfigurationSettings.AppSettings["cnFriends.ConnectionString"]);
- //搜索主题信息
- sql="select f3_motif,f3_content,f3_name,f3_date,f3_time from forum_3 where f3_id="+Request.QueryString["f3_id"]+"";
- dsPending=new DataSet();
- OleDbDataAdapter adWord=new OleDbDataAdapter(sql,conn);
- adWord.Fill(dsPending,"forum_3");
- Page.DataBind();
- f3title=Convert.ToString(dsPending.Tables[0].Rows[0]["f3_motif"]);
- if (Convert.ToString(Request.QueryString["reply"])=="2")
- {
- f3content=Convert.ToString(dsPending.Tables[0].Rows[0]["f3_content"]);
- f3name=Convert.ToString(dsPending.Tables[0].Rows[0]["f3_name"]);
- f3date=Convert.ToString(dsPending.Tables[0].Rows[0]["f3_date"]);
- freply="[quote][b]以下是引用"+f3name+"在"+f3date+"的发言:[/b]n"+f3content+"[/quote]";
- dsPending.Clear();
- }
- if (Convert.ToString(Request.QueryString["reply"])=="3")
- {
- //搜索回复信息
- sql1="select f4_content,f4_name,f4_date,f4_time from forum_4 where f4_id="+Request.QueryString["f4_id"]+"";
- dsPending1=new DataSet();
- OleDbDataAdapter adWord1=new OleDbDataAdapter(sql1,conn);
- adWord1.Fill(dsPending1,"forum_4");
- Page.DataBind();
- f3content=Convert.ToString(dsPending1.Tables[0].Rows[0]["f4_content"]);
- f3name=Convert.ToString(dsPending1.Tables[0].Rows[0]["f4_name"]);
- f3date=Convert.ToString(dsPending1.Tables[0].Rows[0]["f4_date"]);
- freply="[quote][b]以下是引用"+f3name+"在"+f3date+"的发言:[/b]n"+f3content+"[/quote]";
- dsPending1.Clear();
- }
- conn.Close();
- }
- #region Web 窗体设计器生成的代码
- 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
- private void Repeater1_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
- {
- }
- }
- }