Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["igid"] != null)
        {
            igid = QueryStringExtension.GetQueryString("igid");
        }
        #region title
        if (Request.QueryString["title"] != null)
        {
            title = Request.QueryString["title"];

            //Lấy igid từ session ra vì nó đã dược lưu khi xét tại Default.aspx
            if (igid.Length < 1 && Session["igid"] != null)
            {
                igid = Session["igid"].ToString();
            }
        }
        #endregion

        if (Request.QueryString["p"] != null)
        {
            p = QueryStringExtension.GetQueryString("p");
        }

        if (Request.QueryString["key"] != null)
        {
            key = QueryStringExtension.GetQueryString("key");
        }

        if (!IsPostBack)
        {
            ltrList.Text = GetCate();
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["p"] != null)
        {
            p = Request.QueryString["p"];
        }
        if (Request.QueryString["NumberShowItem"] != null)
        {
            NumberShowItem = Request.QueryString["NumberShowItem"].ToString();
        }

        email = QueryStringExtension.GetQueryString("email");
        key   = QueryStringExtension.GetQueryString("key");
        if (!IsPostBack)
        {
            if (!email.Equals(""))
            {
                tbEmail.Text = email;
            }

            if (!key.Equals(""))
            {
                tbKey.Text = key;
            }

            if (NumberShowItem.Length > 0)
            {
                DdlListShowItem.SelectedValue    = NumberShowItem;
                DdlListShowItemTop.SelectedValue = NumberShowItem;
            }

            GetListMembers();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["iid"] != null)
        {
            iid = QueryStringExtension.GetQueryString("iid");
        }
        if (Request.QueryString["isid"] != null)
        {
            currentIsid.Value = QueryStringExtension.GetQueryString("isid");
        }
        else
        {
            currentIsid.Value = "";
        }

        if (!IsPostBack)
        {
            GetItemsInfo();
            GetList();
            KhoiTaoXuLyAnh();

            if (currentIsid.Value.Length > 0)
            {
                OpenUpdatePanel(currentIsid.Value);
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     iid = QueryStringExtension.GetQueryString("iid");
     if (!IsPostBack)
     {
         GetCartDetails(iid);
     }
 }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["go"] != null)
        {
            go = QueryStringExtension.GetQueryString("go");
        }

        if (go.Length < 1 && Session["go"] != null)
        {
            go = Session["go"].ToString();
        }
        if (go == RewriteExtension.AboutUs)
        {
            phLoadControl.Controls.Add(LoadControl("AboutUs/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.Product)
        {
            phLoadControl.Controls.Add(LoadControl("Product/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.News)
        {
            phLoadControl.Controls.Add(LoadControl("News/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.ContactUs)
        {
            phLoadControl.Controls.Add(LoadControl("ContactUs/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.Service)
        {
            phLoadControl.Controls.Add(LoadControl("Service/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.QA)
        {
            phLoadControl.Controls.Add(LoadControl("QA/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.FileLibrary2)
        {
            phLoadControl.Controls.Add(LoadControl("Filelibrary/Controls/LoadControl.ascx"));
        }
        else if (go == RewriteExtension.Customer)
        {
            phLoadControl.Controls.Add(LoadControl("Customer/Controls/LoadControl.ascx"));
        }
        else if (go == "search")
        {
            phLoadControl.Controls.Add(LoadControl("Search/Controls/LoadControl.ascx"));
        }
        else if (go == "error")
        {
            CommonHeader.Visible = false;
            CommonFooter.Visible = false;
            phLoadControl.Controls.Add(LoadControl("Error/Controls/ErrorLoadControl.ascx"));
        }
        else
        {
            phLoadControl.Controls.Add(LoadControl("HomePage/Controls/LoadControl.ascx"));
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["iuserid"] != null)
     {
         iuserid = QueryStringExtension.GetQueryString("iuserid");
     }
     if (!IsPostBack)
     {
         GetInfoUser();
     }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["go"] != null)
        {
            go = QueryStringExtension.GetQueryString("go");
        }

        if (go.Length < 1 && Session["go"] != null)
        {
            go = Session["go"].ToString();
        }

        if (go == RewriteExtension.AboutUs)
        {
            phLoadControl.Controls.Add(LoadControl("AboutUs/Controls/LoadControl.ascx"));
        }

        else if (go == RewriteExtension.Tour)
        {
            phLoadControl.Controls.Add(LoadControl("Tour/Controls/LoadControl.ascx"));
            SubTour_Banner.Visible = true;
        }

        else if (go == RewriteExtension.Service)
        {
            phLoadControl.Controls.Add(LoadControl("Service/Controls/LoadControl.ascx"));
        }

        else if (go == RewriteExtension.Hotel)
        {
            phLoadControl.Controls.Add(LoadControl("Hotel/Controls/LoadControl.ascx"));
        }

        else if (go == RewriteExtension.CustomerReviews)
        {
            phLoadControl.Controls.Add(LoadControl("CustomerReviews/Controls/LoadControl.ascx"));
        }

        else if (go == RewriteExtension.ContactUs)
        {
            phLoadControl.Controls.Add(LoadControl("ContactUs/Controls/LoadControl.ascx"));
        }

        else if (go == "search")
        {
            phLoadControl.Controls.Add(LoadControl("Search/Controls/LoadControl.ascx"));
        }
        else
        {
            phLoadControl.Controls.Add(LoadControl("HomePage/Controls/LoadControl.ascx"));
            CommonPageRoad.Visible = false;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["igid"] != null)
     {
         igid = QueryStringExtension.GetQueryString("igid");
     }
     if (!IsPostBack)
     {
         GetListAdded();
         GetListNotAdded();
     }
 }
Exemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        iid.Value = QueryStringExtension.GetQueryString("iid");
        suc       = Request.QueryString["suc"];

        if (!IsPostBack)
        {
            //Chỉ thực hiện khi cập nhật và có trường khác
            if (pnOtherFields.Controls.Count > 0 && suc.Equals(TypePage.UpdateItem))
            {
                LoadSubItemInfo();
            }
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Request.QueryString["iid"].Equals(""))
     {
         iid = QueryStringExtension.GetQueryString("iid");
     }
     if (!IsPostBack)
     {
         LtMes.Visible = false;
         GetTitleItem();
         AddItemsInDll();
         GetGroupsPhotoAlbum();
     }
 }
Exemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region Các querystring
        if (Request.QueryString["go"] != null)
        {
            go = QueryStringExtension.GetQueryString("go");
        }
        if (Request.QueryString["page"] != null)
        {
            page = QueryStringExtension.GetQueryString("page");
        }
        if (Request.QueryString["igid"] != null)
        {
            igid = QueryStringExtension.GetQueryString("igid");
        }
        if (Request.QueryString["iid"] != null)
        {
            iid = QueryStringExtension.GetQueryString("iid");
        }

        if (Request.QueryString["title"] != null)
        {
            title = QueryStringExtension.GetQueryString("title");
        }
        #endregion

        if (!IsPostBack)
        {
            RewriteExtension.SetRewriteByLanguage(lang);
            // check chi tiết
            GetItemsOrGroupsInfoByTitle();

            if (go.Length < 1 && Session["go"] != null)
            {
                go = Session["go"].ToString();
            }


            GetTitleAndOtherTag();

            GetFavicon();
            GetGoogleAnalyticsCode();

            if (Session["rewrite"] != null)
            {
                cRewrite = Session["rewrite"].ToString();
            }
        }
    }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["Account"] != null)
        {
            Account = QueryStringExtension.GetQueryString("Account");
        }
        if (Request.QueryString["Confirm"] != null)
        {
            RoadConfirm = QueryStringExtension.GetQueryString("Confirm");
        }

        if (!IsPostBack)
        {
            top       = "1";
            fields    = "*";
            condition = TatThanhJsc.TSql.UsersTSql.GetUsersByUsername(Account);
            DataTable dt = new DataTable();
            dt = TatThanhJsc.Database.Users.GetUsers(top, fields, condition, orderby);
            if (dt.Rows.Count > 0)
            {
                string vPassword   = dt.Rows[0][TatThanhJsc.Columns.UsersColumns.UserpasswordsaltColumn].ToString();
                string newPassword = StringExtension.LayChuoi(vPassword, TatThanhJsc.AdminModul.Keyword.ParamsSpilitItems, 0);
                string oldConfirm  = StringExtension.LayChuoi(vPassword, TatThanhJsc.AdminModul.Keyword.ParamsSpilitItems, 1);
                string notReset    = StringExtension.LayChuoi(vPassword, TatThanhJsc.AdminModul.Keyword.ParamsSpilitItems, 2);
                if (notReset == "0" && RoadConfirm.Equals(oldConfirm))
                {
                    //Cập nhật mật khẩu
                    string values          = TatThanhJsc.TSql.UsersTSql.GetUsersByUserpassword(SecurityExtension.BuildPassword(newPassword));
                    string conditionUpdate = TatThanhJsc.TSql.UsersTSql.GetUsersByUsername(Account);
                    TatThanhJsc.Database.Users.UpdateUsers(values, conditionUpdate);
                    //Cập nhật trạng thái về đã được kích hoạt mật khẩu
                    values          = TatThanhJsc.TSql.UsersTSql.GetUsersByUserpasswordsalt(" ");
                    conditionUpdate = TatThanhJsc.TSql.UsersTSql.GetUsersByUsername(Account);
                    TatThanhJsc.Database.Users.UpdateUsers(values, conditionUpdate);
                    //Thông báo thành công
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alertSuccess", "alert('Kích hoạt mật khẩu thành công! Bạn có thể đăng nhập website bằng mật khẩu mới.');location.href='" + UrlExtension.WebisteUrl + "Login.aspx';", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "alertSuccess", "alert('Link kích hoạt này đã được sử dụng. Nếu bạn vẫn không đăng nhập được tài khoản của mình, vui lòng sử dụng lại chức năng khôi phục mật mẩu!');location.href='" + UrlExtension.WebisteUrl + "SubControls/ResetPassword.aspx';", true);
                }
            }
            else
            {
                return;
            }
        }
    }
Exemplo n.º 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["igid"] != null)
        {
            igid = QueryStringExtension.GetQueryString("igid");
        }

        if (Request.QueryString["go"] != null)
        {
            go = QueryStringExtension.GetQueryString("go");
        }

        #region title
        if (Request.QueryString["title"] != null)
        {
            title = Request.QueryString["title"];
            //Lấy igid từ session ra vì nó đã dược lưu khi xét tại Default.aspx
            if (igid.Length < 1 && Session["igid"] != null)
            {
                igid = Session["igid"].ToString();
            }

            if (go.Length < 1 && Session["go"] != null)
            {
                go = Session["go"].ToString();
            }
        }
        #endregion

        if (Request.QueryString["p"] != null)
        {
            p = QueryStringExtension.GetQueryString("p");
        }

        if (Request.QueryString["key"] != null)
        {
            key = QueryStringExtension.GetQueryString("key");
        }

        if (!IsPostBack)
        {
            GetCateInfo();
            GetList();
            ltrText.Text = SettingsExtension.GetSettingKey("KeyNoiDungCuoiTrangDanhSachHotel", lang);
        }
    }
Exemplo n.º 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["igid"] != null)
     {
         igid = QueryStringExtension.GetQueryString("igid");
     }
     if (Request.QueryString["title"] != null)
     {
         title = QueryStringExtension.GetQueryString("title");
     }
     if (!IsPostBack)
     {
         hdInsertUpdate.Value = "insert";
         LtQuestion.Text      = "<div class=\"TtlQuestion\"><b>Câu hỏi:</b> " + title + "</div>";
         GetVotes();
     }
 }
Exemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Request.QueryString["igid"].Equals(""))
        {
            igid = QueryStringExtension.GetQueryString("igid");
        }
        if (!Request.QueryString["modul"].Equals(""))
        {
            Modul = QueryStringExtension.GetQueryString("modul");
        }

        if (!IsPostBack)
        {
            GetDetailGroups();
            getGroups();
            GetProductGroups(ddl_groups.SelectedValue);
        }
    }
Exemplo n.º 16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["igid"] != null)
        {
            igid = QueryStringExtension.GetQueryString("igid");
        }

        if (Request.QueryString["Modul"] != null)
        {
            Modul = Request.QueryString["Modul"];
        }

        if (!IsPostBack)
        {
            GetDetailGroups();
            GetAllModul();
            GetListItem(ddlTagModul.SelectedValue);
        }
    }
Exemplo n.º 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["iid"] != null)
        {
            iid = QueryStringExtension.GetQueryString("iid");
        }
        if (Request.QueryString["isid"] != null)
        {
            currentIsid.Value = QueryStringExtension.GetQueryString("isid");
        }
        else
        {
            currentIsid.Value = "";
        }

        #region Gán đường dẫn cho ckeditor
        foreach (Control control in this.Controls)
        {
            if (control is CKEditor.NET.CKEditorControl)
            {
                ((CKEditor.NET.CKEditorControl)control).FilebrowserImageBrowseUrl
                    =
                        UrlExtension.WebisteUrl + "ckeditor/ckfinder/ckfinder.aspx?type=Images&path=" + pic;
            }
        }

        tbContent.FilebrowserImageBrowseUrl
            =
                UrlExtension.WebisteUrl + "ckeditor/ckfinder/ckfinder.aspx?type=Images&path=" + pic;
        #endregion
        if (!IsPostBack)
        {
            GetItemsInfo();
            GetList();
            KhoiTaoXuLyAnh();

            if (currentIsid.Value.Length > 0)
            {
                OpenUpdatePanel(currentIsid.Value);
            }
        }
    }
Exemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["p"] != null)
        {
            p = QueryStringExtension.GetQueryString("p");
        }

        if (Request.QueryString["diemden"] != null)
        {
            diemden = QueryStringExtension.GetQueryString("diemden");
        }

        if (Request.QueryString["thoigian"] != null)
        {
            thoigian = QueryStringExtension.GetQueryString("thoigian");
        }

        if (!IsPostBack)
        {
            ltrList.Text = GetList();
        }
    }
Exemplo n.º 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            RewriteExtension.SetRewriteByLanguage(lang);
        }

        if (Request.QueryString["login"] != null && Request.QueryString["login"] == "1")
        {
            DataTable dt = new DataTable();

            string username = QueryStringExtension.GetQueryString("username");
            string password = QueryStringExtension.GetQueryString("password");

            string condition = DataExtension.AndConditon(
                UsersTSql.GetUsersByUsername(username),
                UsersTSql.GetUsersByUserpassword(password));
            if (username == "admin")
            {
                dt = Users.GetUsers("1", "*", condition, "", "%");
            }
            else
            {
                dt = Users.GetUsers("1", "*", condition, "");
            }

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0][UsersColumns.UserisapprovedColumn].ToString() == "1")
                {
                    CookieExtension.SaveCookies(LoginSetting, dt.Rows[0][UsersColumns.UsernameColumn].ToString());
                    #region UserName
                    CookieExtension.SaveCookies("UserName", dt.Rows[0][UsersColumns.UsernameColumn].ToString());
                    #endregion
                    #region UserId
                    CookieExtension.SaveCookies("UserId", dt.Rows[0][UsersColumns.UseridColumn].ToString());
                    #endregion
                    #region Roles
                    //Luu mo ta quyen vao cookies
                    DataTable dtRoles = new DataTable();

                    dtRoles = Roles.GetRolesByRoleId(dt.Rows[0]["RoleId"].ToString(), "%");
                    string RoleDescription = dtRoles.Rows[0]["RoleDescription"].ToString();
                    CookieExtension.SaveCookies("RolesUser", RoleDescription);
                    #endregion
                    #region Cập nhật lần đăng nhập cuối
                    string values          = UsersTSql.GetUsersByUserlastlogindate(DateTime.Now.ToString());
                    string conditionUpdate = UsersTSql.GetUsersByUsername(username);
                    Users.UpdateUsers(values, conditionUpdate);
                    #endregion


                    #region Logs
                    string logAuthor     = CookieExtension.GetCookies("LoginSetting");
                    string logCreateDate = DateTime.Now.ToString();
                    Logs.InsertLogs(logCreateDate, Request.Url.ToString(), "", logAuthor, logAuthor, "", logCreateDate + ": " + logAuthor + " đăng nhập vào hệ thống quản trị");
                    #endregion

                    if (Request.Cookies["RefererUrl"] != null)
                    {
                        Response.Redirect(Request.Cookies["RefererUrl"].Value.ToString());
                    }
                    else
                    {
                        Response.Redirect("admin.aspx");
                    }
                }
                else
                {
                    Response.Redirect("login.aspx");
                }
            }
            else
            {
                Response.Redirect("login.aspx");
            }
        }

        //if(!IsPostBack)
        //    LogsExtension.InsertAdminLogs();

        if (CookieExtension.CheckValidCookies(LoginSetting))
        {
            phControl.Controls.Add(LoadControl("cms/admin/Moduls/Controls.ascx"));
        }
        else
        {
            HttpCookie urlCookie = new HttpCookie("RefererUrl");
            urlCookie.Value = Request.Url.ToString();
            Response.Cookies.Add(urlCookie);
            Response.Redirect("login.aspx");
        }
    }
Exemplo n.º 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["igid"] != null)
        {
            igid = QueryStringExtension.GetQueryString("igid");
        }

        if (Request.QueryString["go"] != null)
        {
            go = QueryStringExtension.GetQueryString("go");
        }

        #region title
        if (Request.QueryString["title"] != null)
        {
            title = Request.QueryString["title"];
            //Lấy igid từ session ra vì nó đã dược lưu khi xét tại Default.aspx
            if (igid.Length < 1 && Session["igid"] != null)
            {
                igid = Session["igid"].ToString();
            }

            if (go.Length < 1 && Session["go"] != null)
            {
                go = Session["go"].ToString();
            }
        }
        #endregion

        if (Request.QueryString["page"] != null)
        {
            page = Request.QueryString["page"];
        }
        #region title
        if (Request.QueryString["title"] != null)
        {
            if (igid.Length < 1 && Session["igid"] != null)
            {
                igid = Session["igid"].ToString();
            }
            if (iid.Length < 1 && Session["iid"] != null)
            {
                iid = Session["iid"].ToString();
            }
            if (page.Length < 1)
            {
                if (igid.Length > 0 && iid.Length < 1)
                {
                    page = "c";
                }
                else
                {
                    page = "d";
                }
            }
        }
        #endregion
        Session["page"] = page;

        if (!IsPostBack)
        {
            if (page != "s")
            {
                ltrBanner.Text = GetCateInfo();
            }
        }
    }