コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "/ckfinder/";
            fileBrowser.SetupCKEditor(rteBody);

            DataLayer dl = new DataLayer();

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Default.aspx", true);
            }

            if (Request.QueryString["df"] == null)
            {
                Response.Redirect("Default.aspx", true);
            }
            else
            {
                if (!this.IsPostBack)
                {
                    string sDataFile = Request.QueryString["df"];
                    rteBody.Text = dl.Variables.Single(x => x.Name == sDataFile).Value;
                }
            }
        }
コード例 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //ViewState["AssID"] = Convert.ToInt32(Request.QueryString["id2"]);
     CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
     fileBrowser.BasePath = "ckfinder";  //CKFinder路径
     fileBrowser.SetupCKEditor(CKEditorControl1);
 }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string ID = string.Empty;

            if (!IsPostBack)
            {
                InitDropDownList();
                CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
                _FileBrowser.BasePath = "../Content/JQueryTools/ckfinder/";
                _FileBrowser.SetupCKEditor(CKEditorControl1);
            }
            string action = string.Empty;

            if (Request.Form["action"] != null)
            {
                action = Request.Form["action"].ToString();
            }
            if (!string.IsNullOrEmpty(Request.QueryString["action"]))
            {
                action = Request.QueryString["action"];
            }
            if (action != string.Empty)
            {
                switch (action)
                {
                case "GetDemandList":
                    GetDemandList();
                    break;

                default:
                    break;
                }
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "/ckfinder/";
            fileBrowser.SetupCKEditor(rteBody);

            DataLayer dl = new DataLayer();

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Default.aspx", true);
            }

            if (Request.QueryString["df"] == null)
            {
                Response.Redirect("Default.aspx", true);
            }
            else
            {
                if (!this.IsPostBack)
                {
                    string sDataFile = Request.QueryString["df"];
                    rteBody.Text = dl.Variables.Single(x => x.Name == sDataFile).Value;
                }
            }
        }
コード例 #5
0
ファイル: Admin_tushu.aspx.cs プロジェクト: CHIclay/YUJ
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);
            BindView();
            string bookname;

            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["book_name"] != null)
                    {
                        bookname = Request.QueryString["book_name"].ToString();
                        BookManager.delete(bookname);
                        BindView();
                        Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                    }
                }
                catch (Exception ex)
                {
                    Response.Write("错误原因:" + ex.Message);
                }
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);
            if (!IsPostBack)
            {
                flag = true;
                //BindNews1();
                //BindNews2();
                BindBC();
                #region 详细新闻信息
                if (Request.QueryString["id"] != null)
                {
                    DataTable dt = NewsService.SelectID1(int.Parse(Request.QueryString["id"].ToString()));

                    if (dt != null)
                    {
                        newsdetail.DataSource = dt;
                        newsdetail.DataBind();
                    }
                }
                #endregion
            }
        }
コード例 #7
0
ファイル: post.aspx.cs プロジェクト: khuongsatou/FoodRau
        protected override void OnLoad(EventArgs e)
        {
            bool checkUpdate = false;

            if (!IsPostBack)
            {
                if (Request["post_id"] != null)
                {
                    CKFinder.FileBrowser _f = new CKFinder.FileBrowser();
                    _f.BasePath = "ckfinder";
                    _f.SetupCKEditor(CKEditorControl1);
                    checkUpdate        = true;
                    btnThem.Visible    = !checkUpdate;
                    btnCapNhat.Visible = checkUpdate;
                    Post pt = new Post();
                    Post p  = pt.getItem(Convert.ToInt32(Request["post_id"]));
                    txtTile.Text            = p.Title;
                    txtShortDes.Text        = p.Short;
                    CKEditorControl1.Text   = p.Des;
                    imgReview.ImageUrl      = "~/Uploads/Images/" + p.Img;
                    ddlStatus.SelectedValue = p.Status.ToString();
                    selectDropDown(p.Type);
                }
                else
                {
                    btnCapNhat.Visible = checkUpdate;
                    btnThem.Visible    = !checkUpdate;
                    resetDropDown();
                }
            }
        }
コード例 #8
0
ファイル: NewsSubmit.aspx.cs プロジェクト: xiaopohou/windy
        protected void Page_Load(object sender, EventArgs e)
        {
            string ID = string.Empty;

            if (!IsPostBack)
            {
                InitDropDownList();
                CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
                _FileBrowser.BasePath = "../Content/JQueryTools/ckfinder/";
                _FileBrowser.SetupCKEditor(CKEditorControl1);
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    ID = Request.QueryString["id"].ToString();
                    if (_news == null)
                    {
                        _news = new News();
                    }
                    short shRet = SystemContext.Instance.NewsService.GetNewsByID(ID, ref _news);
                    if (shRet == ExecuteResult.OK)
                    {
                        this.txtNewsTitle.Text     = _news.NewsTitle;
                        this.txtCategoryName.Text  = _news.CategoryName;
                        this.CKEditorControl1.Text = _news.NewsContent;
                        this.hfID.Value            = ID;
                    }
                }
                else
                {
                    this.hfID.Value            = string.Empty;
                    this.txtNewsTitle.Text     = string.Empty;
                    this.txtCategoryName.Text  = string.Empty;
                    this.CKEditorControl1.Text = string.Empty;
                }
            }
        }
コード例 #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     UnobtrusiveValidationMode = UnobtrusiveValidationMode.None;
     ViewState["Cull_ID"]      = Convert.ToInt32(Request.QueryString["id"]);
     CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
     fileBrowser.BasePath = "ckfinder";  //CKFinder路径
     fileBrowser.SetupCKEditor(CKEditorControl1);
 }
コード例 #10
0
ファイル: ProductAdd.aspx.cs プロジェクト: ibollen/website
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ProductClassDDL1.LoadTree();
            }

            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "";
            _FileBrowser.SetupCKEditor(CKEditor1);
        }
コード例 #11
0
        public void LoadGridView()
        {
            dgvDSCB.DataSource = bll.LoadCanBo();
            dgvDSCB.DataBind();
            //Ẩn cột chi tiết khi load lên gridview
            dgvDSCB.Columns[4].Visible = false;
            dgvDSCB.Columns[8].Visible = false;

            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "/CKFinder";
            _FileBrowser.SetupCKEditor(CkThongtinchitiet);
        }
コード例 #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);
            Bindwrite();

            BingWW();
            Bingshoucang();
            panel_a.Visible = true;
            ViewState["id"] = Convert.ToInt32(Request.QueryString["id"]);
            Choose();
            string wriname;

            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["wri_name"] != null)
                    {
                        wriname = Request.QueryString["wri_name"].ToString();
                        WriteManager.delete(wriname);
                        BingWW();
                        Bindwrite();
                        Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                    }
                }
                catch (Exception ex)
                {
                    Response.Write("错误原因:" + ex.Message);
                }
            }
            string wkid;

            if (!IsPostBack)
            {
                try
                {
                    if (Request.QueryString["wk_id"] != null)
                    {
                        wkid = Request.QueryString["wk_id"].ToString();
                        Write_KeepManager.delete(wkid);
                        Bingshoucang();
                        Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                    }
                }
                catch (Exception ex)
                {
                    Response.Write("错误原因:" + ex.Message);
                }
            }
        }
コード例 #13
0
        public void LoadGridView()
        {
            btnSua.Visible           = false;
            btnXoa.Visible           = false;
            grdviewLichLV.DataSource = llvbll.LoadLichLV();
            grdviewLichLV.DataBind();
            //Ẩn cột chi tiết khi load lên gridview
            grdviewLichLV.Columns[6].Visible = false;

            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "/CKFinder";
            _FileBrowser.SetupCKEditor(ckNhacLich);
        }
コード例 #14
0
        public void LoadGridView()
        {
            dgvTinTuc.DataSource = ttbll.LoadTinTuc();
            dgvTinTuc.DataBind();

            // ẩn cột nội dung
            dgvTinTuc.Columns[4].Visible = false;

            //Add ảnh vào ckNoidung
            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "/CKFinder";
            _FileBrowser.SetupCKEditor(ckNoidungbaiviet);
        }
コード例 #15
0
        public void LoadGridView()
        {
            btnSua.Visible             = false;
            btnXoa.Visible             = false;
            grdviewThongBao.DataSource = tbbll.LoadThongBao();
            grdviewThongBao.DataBind();
            //Ẩn cột chi tiết khi load lên gridview
            grdviewThongBao.Columns[2].Visible = false;

            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "/CKFinder";
            _FileBrowser.SetupCKEditor(ckNoiDung);
        }
コード例 #16
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
     fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
     fileBrowser.SetupCKEditor(txtContent);
     Bindhuati();
     Bindtopctwx();
     BindTopxdww();
     BindTopwlkh();
     BindTopqcxs();
     panel_a.Visible = true;
     ViewState["id"] = Convert.ToInt32(Request.QueryString["id"]);
     Choose();
 }
コード例 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //查询有关各职业帖子数量.
            num.Text  = BBSBll.bbs_num().ToString();
            num1.Text = BBSBll.class_num("德鲁伊").ToString();
            num2.Text = BBSBll.class_num("猎人").ToString();
            num3.Text = BBSBll.class_num("法师").ToString();
            num4.Text = BBSBll.class_num("圣骑士").ToString();
            num5.Text = BBSBll.class_num("牧师").ToString();
            num6.Text = BBSBll.class_num("战士").ToString();
            num7.Text = BBSBll.class_num("潜行者").ToString();
            num8.Text = BBSBll.class_num("萨满祭祀").ToString();
            num9.Text = BBSBll.class_num("术士").ToString();

            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);



            Bindjinghua();
            //绑定帖子内容
            int id;

            if (!IsPostBack)
            {
                flag = true;
                if (Request.QueryString["bbsid"] != null)
                {
                    id = Convert.ToInt32(Request.QueryString["bbsid"].ToString());
                    SqlDataReader dt = BBSBll.selectbbs(id);
                    dt.Read();
                    if (dt != null)
                    {
                        txtTitle.Text   = dt[1].ToString().Trim();
                        txtTime.Text    = string.Format("{0:yyyy-MM-dd hh:mm}", dt[2]);
                        Content.Text    = dt[4].ToString();
                        Image1.ImageUrl = dt[3].ToString().Trim();
                        txtClass.Text   = dt[7].ToString().Trim();
                        txtName.Text    = dt[5].ToString().Trim();
                    }
                    BingBC();
                    //显示总共多少评论
                    Label1.Text = BBS_CommentBll.num(id).ToString();
                }
            }
        }
コード例 #18
0
ファイル: AddTiezi.aspx.cs プロジェクト: MINDOU520/nbnb
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserName"] == null || Session["role"].ToString() != "3")
            {
                Session["callerh"] = Request.AppRelativeCurrentExecutionFilePath;
                Response.Redirect("login.aspx");
            }
            if (Session["M_Name"] == null || Session["role"].ToString() != "3")
            {
                Session["callerh"] = Request.AppRelativeCurrentExecutionFilePath;
                Response.Redirect("ManagerLogin.aspx");
            }

            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);
        }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Load();
            List <LoaiTin> ds = new List <LoaiTin>();

            ds = ltbll.AllLoaiTin();
            ddlMaLoaiTin.DataSource     = ds;
            ddlMaLoaiTin.DataValueField = "MaLoaiTin";
            ddlMaLoaiTin.DataBind();
            if (!IsPostBack)
            {
                CKEditorControl1.Language = "vi";
                CKFinder.FileBrowser
                    _FileBrowser = new CKFinder.FileBrowser();
                _FileBrowser.BasePath = "/ckfinder/";
                _FileBrowser.SetupCKEditor(CKEditorControl1);
            }
        }
コード例 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "/ckfinder/";
            fileBrowser.SetupCKEditor(rteBody);

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Default.aspx", true);
            }

            if (!this.IsPostBack)
            {
                var pageName = Request.QueryString["f"];
                rteBody.Text = db.Variables.Single(x => x.Name == pageName).Value;
            }
        }
コード例 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "/ckfinder/";
            fileBrowser.SetupCKEditor(rteBody);

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Default.aspx", true);
            }

            if (!this.IsPostBack)
            {
                var pageName = Request.QueryString["f"];
                rteBody.Text = db.Variables.Single(x => x.Name == pageName).Value;
            }
        }
コード例 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "/ckfinder/";
            fileBrowser.SetupCKEditor(rteBody);

            Entities db = new Entities();

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Default.aspx", true);
            }

            if (!this.IsPostBack)
            {
                string sFileName = Request.QueryString["cn"];
                var    catalog   = db.Catalogs.Single(x => x.Name == sFileName);
                this.Title          = "Edit " + catalog.Name;
                pagetitle.InnerText = "Edit " + catalog.Name;
                rteBody.Text        = catalog.Description;
            }
        }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "ckfinder";
            _FileBrowser.SetupCKEditor(ckconten);
            try
            {
                matin = Request.QueryString["matin"].ToString();
            }
            catch
            {
                matin = "0";
            }

            try
            {
                if (Convert.ToInt32(matin) > 0)
                {
                    Label1.Text  = "Cập nhật tin tức";
                    butthem.Text = "Cập nhật tin tức";
                }
            }
            catch
            {
                matin = "0";
            }



            if (!IsPostBack)
            {
                loadcontrol();
                LayNam();
                if (matin != "0" && matin != null)
                {
                    loaddata();
                }
            }
        }
コード例 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "/ckfinder/";
            fileBrowser.SetupCKEditor(rteBody);

            Entities db = new Entities();

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("Default.aspx", true);
            }

            if (!this.IsPostBack)
            {
                string sFileName = Request.QueryString["cn"];
                var catalog = db.Catalogs.Single(x => x.Name == sFileName);
                this.Title = "Edit " + catalog.Name;
                pagetitle.InnerText = "Edit " + catalog.Name;
                rteBody.Text = catalog.Description;
            }
        }
コード例 #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            base.OnLoad(e);
            if (!IsPostBack)
            {
                int id;
                id = Convert.ToInt32(Request.QueryString["Id"]);
                this.hdnID.Value = id.ToString();
                DataSet ds = DB.GetByID(id);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.hdnPath.Value     = ds.Tables[0].Rows[0][0].ToString();
                    this.hdnFileName.Value = ds.Tables[0].Rows[0][1].ToString();
                    this.ReadXML();
                }
            }


            // Integrate CKFinder with CKEditor
            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "/ckfinder/";
            _FileBrowser.SetupCKEditor(txtXML);
        }
コード例 #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "ckfinder";
            _FileBrowser.SetupCKEditor(ckconten);
            try
            {
                idsp = Request.QueryString["masp"].ToString();
            }
            catch
            {
                idsp = "0";
            }

            try
            {
                if (Convert.ToInt32(idsp) > 0)
                {
                    Label1.Text  = "Cập nhật sản phẩm";
                    butthem.Text = "Cập nhật sản phẩm";
                }
            }
            catch
            {
                idsp = "0";
            }

            if (!IsPostBack)
            {
                Init();
                if (idsp != "0" && idsp != null)
                {
                    Showdata();
                }
            }
        }
コード例 #27
0
ファイル: Admin_tushu_xx.aspx.cs プロジェクト: CHIclay/YUJ
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);

            if (!IsPostBack)
            {
                if (Request.QueryString["book_name"] != null)
                {
                    string        name = Request.QueryString["book_name"].ToString().Trim();
                    SqlDataReader dt   = BookManager.select(name);
                    dt.Read();
                    if (dt != null)
                    {
                        txtName.Text    = dt[1].ToString().Trim();
                        txtIntr.Text    = SplitChar(dt[6].ToString().Trim(), 20);
                        txtType.Text    = SplitChar(dt[4].ToString().Trim(), 20);
                        Image1.ImageUrl = dt[3].ToString();
                        txtMess1.Text   = dt[2].ToString();
                    }
                }
            }
        }
コード例 #28
0
ファイル: QuocGia.aspx.cs プロジェクト: linhfishCR7/Study4u
 protected void FileBrowser2_Load(object sender, EventArgs e)
 {
     FileBrowser1          = new CKFinder.FileBrowser();
     FileBrowser1.BasePath = "/ckfinder/";
     FileBrowser1.SetupCKEditor(txtMoTa1);
 }
コード例 #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string ID = string.Empty;

            if (!IsPostBack)
            {
                InitDropDownList();
                CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
                _FileBrowser.BasePath = "../Content/JQueryTools/ckfinder/";
                _FileBrowser.SetupCKEditor(CKEditorControl1);
                _FileBrowser.SetupCKEditor(CKEditorControl2);
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    ID = Request.QueryString["id"].ToString();

                    Demand demand = new Demand();
                    short  shRet  = SystemContext.Instance.DemandService.GetDemandByID(ID, ref demand);
                    if (shRet == ExecuteResult.OK)
                    {
                        this.ddlProduct.Text            = demand.Product;
                        this.txtCreater.Text            = demand.Creater;
                        this.txtSubmitTime.Text         = demand.SubmitTime.ToString();
                        this.txtOwener.Text             = demand.Owener;
                        this.txtSoluteTime.Text         = demand.SoluteTime.ToString();
                        this.ddlState.Text              = demand.State;
                        this.CKEditorControl1.Text      = demand.Question;
                        this.txtTitle.Text              = demand.Title;
                        this.linkFileAttach.NavigateUrl = demand.FileAttach;
                        this.linkFileAttach.Text        = demand.FileAttach;

                        this.txtExpense.Text       = demand.Expense;
                        this.CKEditorControl2.Text = demand.Solution;
                        this.hfID.Value            = ID;
                        this.hfState.Value         = demand.State;
                    }
                }
                else
                {
                    GetStateMap();
                    this.CKEditorControl1.Text = string.Empty;
                    this.txtOwener.Text        = string.Empty;
                }
            }
            string action = string.Empty;

            if (Request.Form["action"] != null)
            {
                action = Request.Form["action"].ToString();
            }
            if (!string.IsNullOrEmpty(Request.QueryString["action"]))
            {
                action = Request.QueryString["action"];
            }
            if (action != string.Empty)
            {
                switch (action)
                {
                case "GetStateMap":
                    GetStateMap();
                    break;

                default:
                    break;
                }
            }
        }
コード例 #30
0
ファイル: content.aspx.cs プロジェクト: jqlabpro/jqlab_f
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "/ckfinder/";
            _FileBrowser.SetupCKEditor(ck_icerik);

            CloseAll();

            langId = GetLangId();
            mode = Convert.ToString(Request.QueryString["mode"]);
            id = Convert.ToString(Request.QueryString["id"]);

            switch (mode)
            {
                case "add":
                    {
                        FillCategories();
                        dv_icerik_ekleduzenle.Visible = true;
                        break;
                    }
                case "edit":
                    {
                        FillCategories();
                        GetDetails();
                        dv_icerik_ekleduzenle.Visible = true;
                        break;
                    }
                case "delete":
                    {
                        int tid = int.Parse(id);
                        dv_icerikler.Visible = true;
                        var silinecek = (from ctg in idc.contents
                                         where ctg.Id == tid
                                         select ctg).Single();
                        idc.contents.Remove(silinecek);
                        idc.SaveChanges();

                        Response.Redirect("content.aspx");
                        break;
                    }
                case "up":
                    {
                        try
                        {
                            Move("up");
                        }
                        catch (Exception)
                        {

                        }

                        Response.Redirect("content.aspx");
                        break;
                    }
                case "down":
                    {
                        try
                        {
                            Move("down");
                        }
                        catch (Exception)
                        {

                        }
                        Response.Redirect("content.aspx");
                        break;
                    }
                case "excel":
                    {
                        AllContents();
                        Save2Excel();
                        break;
                    }
                case null:
                    {
                        AllContents();
                        dv_icerikler.Visible = true;
                        break;
                    }
            }
        }
コード例 #31
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
     fileBrowser.BasePath = "ckfinder/";  //设置CKFinder的基路径
     fileBrowser.SetupCKEditor(txtContent);
 }
コード例 #32
0
 protected override void OnLoad(EventArgs e)
 {
     CKFinder.FileBrowser _f = new CKFinder.FileBrowser();
     _f.BasePath = "ckfinder";
     _f.SetupCKEditor(CKEditorControl1);
 }
コード例 #33
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);
            UnobtrusiveValidationMode = new UnobtrusiveValidationMode();
            int id;

            if (!IsPostBack)
            {
                #region 前台panel控件可见与否

                if (Request.QueryString["menupanel"] != null)
                {
                    #region a1可见
                    if (Request.QueryString["menupanel"] == "a1")
                    {
                        a1.Visible = true;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region b1可见
                    if (Request.QueryString["menupanel"] == "b1")
                    {
                        a1.Visible = false;
                        b1.Visible = true;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region b2可见
                    if (Request.QueryString["menupanel"] == "b2")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = true;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region c1可见
                    if (Request.QueryString["menupanel"] == "c1")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = true;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region c2可见
                    if (Request.QueryString["menupanel"] == "c2")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = true;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region c3可见
                    if (Request.QueryString["menupanel"] == "c3")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = true;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region c4可见
                    if (Request.QueryString["menupanel"] == "c4")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = true;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region d1可见
                    if (Request.QueryString["menupanel"] == "d1")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = true;
                        d2.Visible = false;
                        d3.Visible = false;
                    }
                    #endregion
                    #region d2可见
                    if (Request.QueryString["menupanel"] == "d2")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = true;
                        d3.Visible = false;
                    }
                    #endregion
                    #region d3可见
                    if (Request.QueryString["menupanel"] == "d3")
                    {
                        a1.Visible = false;
                        b1.Visible = false;
                        b2.Visible = false;
                        c1.Visible = false;
                        c2.Visible = false;
                        c3.Visible = false;
                        c4.Visible = false;
                        d1.Visible = false;
                        d2.Visible = false;
                        d3.Visible = true;
                    }
                    #endregion
                }
                #endregion
                #region 如果用户登录了,将用户信息绑定
                overlogin.Visible = false;
                nologin.Visible   = false;
                //如果用户登录了,将用户信息绑定
                if (Session["User_Name"] != null)
                {
                    overlogin.Visible = true;
                    //绑定ACG
                    BindAcg();
                    //绑定评论
                    BindComments();
                    //绑定留言
                    BindLeavewords();
                    //绑定他人评论
                    BindTComments();
                    //绑定他人留言
                    BindTLea();
                    //绑定被评论
                    BindReplyComments();
                    //绑定被回复
                    BindReplyLeavewords();

                    SqlDataReader dt = UserInfoService.users(int.Parse(Session["User_ID"].ToString()));
                    dt.Read();
                    if (dt != null)
                    {
                        UserName.Text  = dt[1].ToString();
                        UserEmail.Text = dt[4].ToString();
                        //Image1.ImageUrl = dt[3].ToString();
                        //UserPhone.Text = dt[5].ToString();
                        UserImg.ImageUrl = dt[3].ToString();
                    }
                    #region 修改用户信息

                    if (Request.QueryString["queren"] != null)
                    {
                        if (ChangMima.Text.Trim() == ChangMima2.Text.Trim())
                        {
                            UserInfo user = new UserInfo();
                            user.User_ID       = int.Parse(Session["User_ID"].ToString());
                            user.User_Name     = ChangName.Text.Trim();
                            user.User_Password = ChangMima.Text.Trim();
                            user.User_Phone    = ChangPhone.Text.Trim();
                            user.User_Email    = ChangEmail.Text.Trim();
                            user.User_Img      = "Img\\UserImg\\" + ChangImg.PostedFile.FileName;
                            if (UserInfoService.usersupdate(user) == 1)
                            {
                                //Session["UserImg"] = @"~/User_Img/" + FileUpload_img.PostedFile.FileName;
                                Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('修改成功!');</script>");
                            }
                            else
                            {
                                Page.ClientScript.RegisterClientScriptBlock(typeof(object), "alert", "<script>alert('修改失败!');</script>");
                            }
                        }
                        else
                        {
                            Page.ClientScript.RegisterClientScriptBlock(typeof(object), "alert", "<script>alert('前后密码不一致!');</script>");
                        }
                    }


                    #endregion
                }
                else
                {
                    nologin.Visible = true;
                }


                #endregion
                try
                {
                    #region Acg投稿数据绑定和删除

                    if (Request.QueryString["proid"] != null)
                    {
                        id = Convert.ToInt32(Request.QueryString["proid"].ToString());
                        if (AcgService.delete(id) == 1)
                        {
                            BindAcg();
                            Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                        }
                        else
                        {
                            Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除删除失败!');</script>");
                        }
                    }
                    #endregion

                    #region 用户评论删除

                    if (Request.QueryString["commentsid"] != null)
                    {
                        id = Convert.ToInt32(Request.QueryString["commentsid"].ToString());
                        if (CommentService.usersDelete(id) == 1)
                        {
                            BindComments();
                            Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                        }
                        else
                        {
                            Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除删除失败!');</script>");
                        }
                    }
                    #endregion

                    #region 用户回复数据绑定和删除

                    if (Request.QueryString["Leavewordsid"] != null)
                    {
                        id = Convert.ToInt32(Request.QueryString["Leavewordsid"].ToString());
                        if (LeavewordsService.usersDelete(id) == 1)
                        {
                            BindLeavewords();
                            Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除成功!');</script>");
                        }
                        else
                        {
                            Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('删除删除失败!');</script>");
                        }
                    }
                    #endregion
                }
                catch (Exception ex)
                {
                }
            }
        }
コード例 #34
0
ファイル: ProductEdit.aspx.cs プロジェクト: ibollen/website
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request.QueryString["id"]))
                {
                    myProduct = ProductManage.GetItem(Convert.ToInt32(Request.QueryString["id"]));

                    if (string.IsNullOrEmpty(myProduct.Prod_Name))
                    {
                        Response.Write("<script language=JavaScript>alert('错误的链接!');document.location.href='ProductMgmt.aspx'</script>");
                    }
                    else
                    {
                        this.ProductClassDDL1.LoadTree();
                        this.ProductClassDDL1.InnerDropDownListTree.Items.FindByValue(myProduct.Pc_Id.ToString()).Selected = true;

                        this.tbxName.Text = myProduct.Prod_Name;
                        this.tbxNumber.Text = myProduct.Prod_Number;
                        this.tbxPrice.Text = string.Format("{0:N2}", myProduct.Prod_Price);
                        this.tbxImage.Text = myProduct.Prod_Image;
                        CKEditor1.Text = myProduct.Prod_Content;
                        this.cbxTop.Checked = myProduct.IsTop;
                        this.cbxCommend.Checked = myProduct.IsCommend;
                        Page.Title = myProduct.Prod_Name;
                    }

                }
                else
                {
                    Response.Write("<script language=JavaScript>alert('错误的链接!');document.location.href='ProductMgmt.aspx'</script>");
                }

            }

            CKFinder.FileBrowser _FileBrowser = new CKFinder.FileBrowser();
            _FileBrowser.BasePath = "";
            _FileBrowser.SetupCKEditor(CKEditor1);
        }
コード例 #35
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //查询有关各职业帖子数量.
            num.Text  = BBSBll.bbs_num().ToString();
            num1.Text = BBSBll.class_num("德鲁伊").ToString();
            num2.Text = BBSBll.class_num("猎人").ToString();
            num3.Text = BBSBll.class_num("法师").ToString();
            num4.Text = BBSBll.class_num("圣骑士").ToString();
            num5.Text = BBSBll.class_num("牧师").ToString();
            num6.Text = BBSBll.class_num("战士").ToString();
            num7.Text = BBSBll.class_num("潜行者").ToString();
            num8.Text = BBSBll.class_num("萨满祭祀").ToString();
            num9.Text = BBSBll.class_num("术士").ToString();

            CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
            fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
            fileBrowser.SetupCKEditor(txtContent);

            lookbbs.Visible = true;
            addbbs.Visible  = false;
            zuce.Visible    = false;

            BindBBS();
            Bindjinghua();
            if (Request.QueryString["jh"] != null)
            {
                bindju();
            }
            if (Request.QueryString["class"] != null)
            {
                classBBS(Request.QueryString["class"]);
            }


            if (Request.QueryString["ft"] != null)
            {
                lookbbs.Visible = false;
                zuce.Visible    = false;
                addbbs.Visible  = true;
                if (Session["username"] != null)
                {
                    if (bool.Parse(Session["vip"].ToString()) == true)
                    {
                        Panel1.Visible = true;
                        Panel2.Visible = false;
                    }
                    else
                    {
                        Panel2.Visible = true;
                    }
                }
                else
                {
                    Page.ClientScript.RegisterClientScriptBlock(typeof(Object), "alert", "<script>alert('请先登录!');</script>");
                }
            }

            if (Request.QueryString["hy"] != null)
            {
                lookbbs.Visible = false;
                zuce.Visible    = true;
                addbbs.Visible  = false;
                if (Session["username"] != null)
                {
                    if (bool.Parse(Session["vip"].ToString()) == true)
                    {
                        Panel3.Visible = true;
                    }
                    else
                    {
                        Panel5.Visible = true;
                    }
                }
                else
                {
                    Panel4.Visible = true;
                }
            }
        }
コード例 #36
0
 protected void Page_Load(object sender, EventArgs e)
 {
     CKFinder.FileBrowser fileBrowser = new CKFinder.FileBrowser();
     fileBrowser.BasePath = "../ckfinder/";  //设置CKFinder的基路径
     fileBrowser.SetupCKEditor(txtContent);
     if (!IsPostBack)
     {
         flag = true;
         //id = int.Parse(Request.QueryString["pro_id"].ToString());
         #region 绑定前台数据
         //BindNew();
         //BindTop();
         //BindTally();
         if (Request.QueryString["pro_id"] != null)
         {
             SqlDataReader proclassname = AcgService.select(int.Parse(Request.QueryString["pro_id"].ToString()));
             proclassname.Read();
             string    classname = proclassname["Pro_Class"].ToString();
             DataTable dt        = AcgService.select1(int.Parse(Request.QueryString["pro_id"].ToString()));
             if (classname == "视频")
             {
                 shiping.Visible      = true;
                 otheracg.Visible     = false;
                 acgdetall.DataSource = dt;
                 acgdetall.DataBind();
             }
             else
             {
                 shiping.Visible      = false;
                 otheracg.Visible     = true;
                 Repeater2.DataSource = dt;
                 Repeater2.DataBind();
             }
             BindBC();
             //显示总共多少评论
             num.Text = CommentService.num(int.Parse(Request.QueryString["pro_id"].ToString())).ToString();
         }
         #endregion
         #region 举报收藏
         if (Session["User_ID"] != null && Request.QueryString["pro_id"].ToString() != null)
         {
             SqlDataReader colletdt = CollectionBll.seletcCollect(int.Parse(Session["User_ID"].ToString()), int.Parse(Request.QueryString["pro_id"].ToString()));
             colletdt.Read();
             SqlDataReader informdt = InformBll.seletcInform(int.Parse(Session["User_ID"].ToString()), int.Parse(Request.QueryString["pro_id"].ToString()));
             informdt.Read();
             if (colletdt != null && colletdt.HasRows == true)
             {
                 collectbutton.CssClass = "btn btn-large";
                 collectbutton.Text     = "已收藏";
                 collectflag            = true;
             }
             else
             {
                 collectbutton.CssClass = "btn btn-primary btn-large";
                 collectbutton.Text     = "收藏";
                 collectflag            = false;
             }
             if (informdt != null && informdt.HasRows == true)
             {
                 informbutton.CssClass = "btn btn-large";
                 informbutton.Text     = "已举报";
                 informflag            = true;
             }
             else
             {
                 informbutton.CssClass = "btn btn-danger btn-large";
                 informbutton.Text     = "举报";
                 informflag            = false;
             }
         }
         #endregion
     }
 }