資源簡介
仿百度貼吧程序,仿百度貼吧程序

代碼片段和文件信息
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í)間???名稱
-----------?---------??----------?-----??----
?????文件??????10512??2007-11-09?17:47??BDtieba\admin.aspx
?????文件???????7851??2007-11-14?18:40??BDtieba\admin.aspx.cs
?????文件??????12506??2007-11-16?12:31??BDtieba\bestAriticle.aspx
?????文件???????3736??2007-11-16?12:31??BDtieba\bestAriticle.aspx.cs
?????文件????????168??2007-10-26?23:28??BDtieba\boot.ascx
?????文件????????529??2007-12-26?08:39??BDtieba\boot.ascx.cs
?????文件??????12285??2007-11-19?12:05??BDtieba\Default.aspx
?????文件???????4088??2007-11-19?11:59??BDtieba\Default.aspx.cs
?????文件???????1948??2007-08-24?12:32??BDtieba\ftb.imagegallery.aspx
?????文件????????889??2007-11-15?18:40??BDtieba\Global.asax
?????文件???????4189??2007-10-16?12:56??BDtieba\header.ascx
?????文件????????414??2007-10-16?11:31??BDtieba\header.ascx.cs
?????文件????????117??2007-10-18?22:02??BDtieba\licenses.licx
?????文件???????7411??2007-11-16?12:58??BDtieba\reg.aspx
?????文件???????2609??2007-11-14?18:19??BDtieba\reg.aspx.cs
?????文件???????2493??2007-11-09?17:39??BDtieba\showContent.aspx
?????文件???????5538??2007-11-14?18:40??BDtieba\showContent.aspx.cs
?????文件??????12875??2007-11-16?12:30??BDtieba\showtieba.aspx
?????文件???????4123??2007-11-16?12:30??BDtieba\showtieba.aspx.cs
?????文件???????3462??2007-11-19?12:15??BDtieba\UserLogin.ascx
?????文件???????1514??2007-11-19?12:17??BDtieba\UserLogin.ascx.cs
?????文件???????1407??2007-11-19?12:21??BDtieba\Userlogin.aspx
?????文件???????1465??2007-11-19?12:20??BDtieba\Userlogin.aspx.cs
?????文件????????453??2007-09-15?21:34??BDtieba\ValidateCode.aspx
?????文件???????2307??2007-09-16?12:37??BDtieba\ValidateCode.aspx.cs
?????文件???????2135??2007-12-26?08:30??BDtieba\web.config
?????文件???????5080??2007-11-14?18:44??BDtieba\admin\admin_addadmin.aspx
?????文件???????1207??2007-12-26?08:38??BDtieba\admin\admin_addadmin.aspx.cs
?????文件???????1300??2007-11-14?11:48??BDtieba\admin\admin_default.aspx
?????文件????????488??2007-12-26?08:38??BDtieba\admin\admin_default.aspx.cs
............此處省略737個(gè)文件信息
評論
共有 條評論