資源簡(jiǎn)介
仿照百度的貼吧,采用C#寫(xiě)的源碼程序。數(shù)據(jù)庫(kù)采用SQL SERVER2005

代碼片段和文件信息
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.IO;
public?partial?class?admin?:?System.Web.UI.Page
{
????string?gvuniqueID?=?string.Empty;
????//int?gvPageindex?=?0;
????//int?gvEditindex?=?-1;
????protected?void?Page_Load(object?sender?EventArgs?e)
????{
????????if?(!Page.IsPostBack)
????????{
????????????if?(Session[“username“]?!=?null?&&?Session[“usertype“].ToString()?==?“1“)
????????????{
????????????????pagelist();
????????????}
????????????else
????????????{
????????????????Response.Redirect(“Userlogin.aspx“);
????????????}
????????}
????}
????
????private?void?pagelist()
????{
????????DataSet?ds?=?new?DataSet();
????????ds?=?sqlstore.seluserAriticle();
????????GridView1.DataSource?=?ds;
????????GridView1.DataBind();
????????
????}
????public?string?showtype(object?a)
????{
????????string?type?=?a.ToString();
????????if?(type?==?“0“)
????????{
????????????type?=?“精品“;
????????}
????????else
????????{
????????????type?=?“取消精品“;
????????}
????????return?type;
????}
????public?string?showtop(object?a)
????{
????????string?type?=?a.ToString();
????????if?(type?==?“0“)
????????{
????????????type?=?“置頂“;
????????}
????????else
????????{
????????????type?=?“取消置頂“;
????????}
????????return?type;
????}
????protected?void?GridView1_OnRowCommand(object?sender?GridViewCommandEventArgs?e)
????{
????????int?id?=int.Parse(e.CommandArgument.ToString());
????????string?cmd?=?e.CommandName.ToString();
????????switch?(cmd)
????????{
????????????case?“type“:
????????????????string?atype?=?sqlstore.seltype(id);
????????????????sqlstore.settype(atype?id);
????????????????break;
????????????case?“top“:
????????????????string?atop?=?sqlstore.seltop(id);
????????????????sqlstore.settop(atop?id);
????????????????break;
????????????//case?“del“:
????????????????//sqlstore.delAriticle(id);
????????????????//break;
????????}
????????pagelist();
????}
????protected?void?GridView1_RowDeleting(object?sender?GridViewDeleteEventArgs?e)//刪除貼子信息
????{
????????int?id?=?int.Parse(((Label)GridView1.Rows[e.RowIndex].FindControl(“TextXu“)).Text);
????????string?recall?=?((Label)GridView1.Rows[e.RowIndex].FindControl(“TextBox2“)).Text;
????????string?imgurl?=?((Label)GridView1.Rows[e.RowIndex].FindControl(“Label1“)).Text;
????????if?(recall?!=?“0“)
????????{
????????????Response.Write(“ript>alert(‘此貼包含回復(fù)貼,不能刪除!‘);location.href(‘a(chǎn)dmin.aspx‘) ript>“);
???????????
????????}
????????else
????????{
????????????if?(imgurl?==?null?||?imgurl?==?““)
????????????{
????????????????sqlstore.delAriticle(id);
????????????}
????????????else
????????????{???????????????????????????????
????????????????string?path?=?Server.MapPath(“cutimg“)?+?“/“?+?imgurl.Sub
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????124??2009-08-13?04:53??www.codejia.com\com?36元,cn?3元.url
?????文件????????117??2008-08-05?13:58??www.codejia.com\買(mǎi)空間,免費(fèi)建站.url
?????文件???????3524??2009-08-20?22:02??www.codejia.com\使用說(shuō)明.txt
????.......???????237??2007-12-26?14:59??www.codejia.com\模仿百度貼吧程序\1.txt
????.......??????5080??2007-11-14?18:44??www.codejia.com\模仿百度貼吧程序\admin\admin_addadmin.aspx
????.......??????1139??2007-11-14?18:44??www.codejia.com\模仿百度貼吧程序\admin\admin_addadmin.aspx.cs
????.......??????1300??2007-11-14?11:48??www.codejia.com\模仿百度貼吧程序\admin\admin_default.aspx
????.......???????420??2007-11-13?13:26??www.codejia.com\模仿百度貼吧程序\admin\admin_default.aspx.cs
????.......??????1703??2007-11-16?12:52??www.codejia.com\模仿百度貼吧程序\admin\admin_infor.aspx
????.......??????1424??2007-11-16?12:49??www.codejia.com\模仿百度貼吧程序\admin\admin_infor.aspx.cs
????.......??????4585??2007-11-13?13:18??www.codejia.com\模仿百度貼吧程序\admin\admin_login.aspx
????.......???????988??2007-11-13?13:32??www.codejia.com\模仿百度貼吧程序\admin\admin_login.aspx.cs
????.......??????5018??2007-11-14?17:52??www.codejia.com\模仿百度貼吧程序\admin\admin_user.aspx
????.......??????4108??2007-11-14?18:00??www.codejia.com\模仿百度貼吧程序\admin\admin_user.aspx.cs
????.......??????1835??2007-11-19?11:35??www.codejia.com\模仿百度貼吧程序\admin\admin_userphoto.aspx
????.......??????2536??2007-11-19?11:40??www.codejia.com\模仿百度貼吧程序\admin\admin_userphoto.aspx.cs
????.......?????68925??2006-07-07?13:15??www.codejia.com\模仿百度貼吧程序\admin\img\bg.gif
????.......??????3178??2007-11-19?12:29??www.codejia.com\模仿百度貼吧程序\admin\left.aspx
????.......???????411??2007-11-13?13:42??www.codejia.com\模仿百度貼吧程序\admin\left.aspx.cs
????.......???????447??2007-11-13?16:50??www.codejia.com\模仿百度貼吧程序\admin\logout.aspx
????.......???????537??2007-11-14?19:00??www.codejia.com\模仿百度貼吧程序\admin\logout.aspx.cs
????.......???????443??2007-11-13?13:43??www.codejia.com\模仿百度貼吧程序\admin\main.aspx
????.......???????411??2007-11-13?13:43??www.codejia.com\模仿百度貼吧程序\admin\main.aspx.cs
????.......?????10512??2007-11-09?17:47??www.codejia.com\模仿百度貼吧程序\admin.aspx
????.......??????7851??2007-11-14?18:40??www.codejia.com\模仿百度貼吧程序\admin.aspx.cs
????.......??????3032??2007-10-30?12:52??www.codejia.com\模仿百度貼吧程序\App_Code\ImageThumbnail.cs
????.......??????1352??2007-11-12?18:37??www.codejia.com\模仿百度貼吧程序\App_Code\Md5Pw.cs
????.......?????30797??2007-11-19?12:13??www.codejia.com\模仿百度貼吧程序\App_Code\sqlstore.cs
????.......???1179648??2007-12-26?15:00??www.codejia.com\模仿百度貼吧程序\App_Data\xytieba_Data.MDF
????.......???3538944??2007-12-26?15:00??www.codejia.com\模仿百度貼吧程序\App_Data\xytieba_Log.LDF
............此處省略736個(gè)文件信息
評(píng)論
共有 條評(píng)論