仿百度贴吧程序C#版


仿照百度的贴吧,采用C#写的源码程序。数据库采用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(‘此贴包含回复贴,不能删除!‘);location.href(‘admin.aspx‘)ript>“);
           
        }
        else
        {
            if (imgurl == null || imgurl == ““)
            {
                sqlstore.delAriticle(id);
            }
            else
            {                               
                string path = Server.MapPath(“cutimg“) + “/“ + imgurl.Sub

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        124  2009-08-13 04:53  www.codejia.comcom 36元,cn 3元.url

     文件        117  2008-08-05 13:58  www.codejia.com买空间,免费建站.url

     文件       3524  2009-08-20 22:02  www.codejia.com使用说明.txt

    .......       237  2007-12-26 14:59  www.codejia.com模仿百度贴吧程序1.txt

    .......      5080  2007-11-14 18:44  www.codejia.com模仿百度贴吧程序adminadmin_addadmin.aspx

    .......      1139  2007-11-14 18:44  www.codejia.com模仿百度贴吧程序adminadmin_addadmin.aspx.cs

    .......      1300  2007-11-14 11:48  www.codejia.com模仿百度贴吧程序adminadmin_default.aspx

    .......       420  2007-11-13 13:26  www.codejia.com模仿百度贴吧程序adminadmin_default.aspx.cs

    .......      1703  2007-11-16 12:52  www.codejia.com模仿百度贴吧程序adminadmin_infor.aspx

    .......      1424  2007-11-16 12:49  www.codejia.com模仿百度贴吧程序adminadmin_infor.aspx.cs

    .......      4585  2007-11-13 13:18  www.codejia.com模仿百度贴吧程序adminadmin_login.aspx

    .......       988  2007-11-13 13:32  www.codejia.com模仿百度贴吧程序adminadmin_login.aspx.cs

    .......      5018  2007-11-14 17:52  www.codejia.com模仿百度贴吧程序adminadmin_user.aspx

    .......      4108  2007-11-14 18:00  www.codejia.com模仿百度贴吧程序adminadmin_user.aspx.cs

    .......      1835  2007-11-19 11:35  www.codejia.com模仿百度贴吧程序adminadmin_userphoto.aspx

    .......      2536  2007-11-19 11:40  www.codejia.com模仿百度贴吧程序adminadmin_userphoto.aspx.cs

    .......     68925  2006-07-07 13:15  www.codejia.com模仿百度贴吧程序adminimgg.gif

    .......      3178  2007-11-19 12:29  www.codejia.com模仿百度贴吧程序adminleft.aspx

    .......       411  2007-11-13 13:42  www.codejia.com模仿百度贴吧程序adminleft.aspx.cs

    .......       447  2007-11-13 16:50  www.codejia.com模仿百度贴吧程序adminlogout.aspx

    .......       537  2007-11-14 19:00  www.codejia.com模仿百度贴吧程序adminlogout.aspx.cs

    .......       443  2007-11-13 13:43  www.codejia.com模仿百度贴吧程序adminmain.aspx

    .......       411  2007-11-13 13:43  www.codejia.com模仿百度贴吧程序adminmain.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_CodeImageThumbnail.cs

    .......      1352  2007-11-12 18:37  www.codejia.com模仿百度贴吧程序App_CodeMd5Pw.cs

    .......     30797  2007-11-19 12:13  www.codejia.com模仿百度贴吧程序App_Codesqlstore.cs

    .......   1179648  2007-12-26 15:00  www.codejia.com模仿百度贴吧程序App_Dataxytieba_Data.MDF

    .......   3538944  2007-12-26 15:00  www.codejia.com模仿百度贴吧程序App_Dataxytieba_Log.LDF

............此处省略736个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)