示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSfunc.checkURL();
        string url  = Request.QueryString["url"];
        string nUrl = Request.QueryString["nUrl"];

        p = ModControl.GetP_From_Code(url);
        int op = p;

        if (ModControl.GetLevel(p) == 2)
        {
            op = ModControl.GetOldP(p);
        }
        if (ModControl.GetLevel(p) == 3)
        {
            op = ModControl.GetOldP(ModControl.GetOldP(p));
        }
        //Detail.Visible = false;
        //if (nUrl != null)
        //{
        //    List.Visible = false;
        //    Detail.Visible = true;
        //    int id = ModControl.GetID_From_Url(p, nUrl);
        //    ltrContent.Text = LoadDetail(id, op);
        //}
        //else
        //{
        ltrSubmod.Text      = LoadSubmod(op, url);
        ltrListContent.Text = LoadListContent(p);
        //}
    }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string mod      = String.IsNullOrEmpty(Request["url"]) ? "Home" : Request["url"].ToString();
        string chuyenxe = String.IsNullOrEmpty(Request["url"]) ? "Home" : Request["nurl"].ToString();

        modId = ModControl.GetP_From_Code(mod);
        var res = new ChuyenXeRepository().SearchFor(o => o.url == chuyenxe).SingleOrDefault();

        if (res != null)
        {
            res.Xe        = new XeRepository().Find(res.MaXe.Value);
            res.Xe.NhaXe1 = new NhaxeRepository().Find(res.Xe.Nhaxe.Value);
            cx            = res;
        }
        else
        {
            Response.Redirect("/404.htm");
        }
        CMSfunc.checkURL();
        if (Session["UserID"] != null)
        {
            //var user = UserControls.GetUserByID(int.Parse(Session["UserID"].ToString()));
            //txtAddress.Text = user.User_Address;
            //txtName.Text = user.User_Name;
            //txtTel.Text = user.User_Tel;
            //email.Text = user.User_Email;
        }
    }
示例#3
0
 protected override void OnInit(EventArgs e)
 {
     CMSfunc.checkURL();
     if (this.Session["UserID"] == null || this.Session["UserID"].ToString() == "")
     {
         base.Response.Redirect(ApplicationSetting.URLRoot + "admin/login.aspx");
     }
     base.OnInit(e);
 }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSfunc.checkURL();
        string u = String.IsNullOrEmpty(Request["url"]) ? "Home" : Request["url"].ToString();
        int    p = ModControl.GetP_From_Code(u);

        ltrAboutService.Text = ModControl.GetModField("Content", p);
        ltrListService.Text  = LoadService(p);
    }
示例#5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string status = Request["status"] == null ? "" : Request["status"];

        ltrbanner.Text      = LoadSlider(status);
        ltrPioriryFrom.Text = LoadPiorityFrom();
        CMSfunc.checkURL();
        if (IsPostBack)
        {
        }
    }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string status = Request["status"] == null ? "" : Request["status"];

        ltrbanner.Text      = LoadSlider(status);
        ltrListRequest.Text = LoadRequestTravel();
        CMSfunc.checkURL();
        if (IsPostBack)
        {
        }
    }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     url  = string.IsNullOrEmpty(Request["url"]) ? "Home" : Request["url"].ToString();
     nUrl = string.IsNullOrEmpty(Request["nUrl"]) ? "" : Request["nUrl"].ToString();
     p    = ModControl.GetP_From_Code(url);
     CMSfunc.checkURL();
     op = ModControl.GetOldP(p);
     ltrSidebar.Text = LoadSidebar(p);
     if (nUrl != "")
     {
         ltrContent.Text   = LoadNLSX(p);
         lbNavigation.Text = "<a href=\"/\"><i class=\"fa fa-home fa-2x\"></i></a> >> <a href=\"/" + url + ".htm \">" + ModControl.GetName_From_Code(url) + "</a> >> " + ContentControl.GetFieldByCode("Name", nUrl);
     }
     else
     {
         ltrEnterprise.Text = LoadEnterprise(p);
         lbNavigation.Text  = "<a href =\"/\"><i class=\"fa fa-home fa-2x\"></i></a> >> <a href=\"/" + url + ".htm \">" + ModControl.GetName_From_Code(url);
     }
 }
示例#8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSfunc.checkURL();
        string act   = Request.QueryString["act"];
        string uname = Session["uname"] == null ? "" : Session["uname"].ToString();

        if (!IsPostBack)
        {
            txtUsername.Text = uname;
            txtPass.Focus();
        }
        if (act == "logout")
        {
            System.Web.HttpContext.Current.Session.Clear();
            System.Web.HttpContext.Current.Session.Abandon();
            Response.Redirect("Login.aspx");
        }
        Response.CacheControl = "no-cache";
        Response.AddHeader("Pragma", "no-cache");
    }
示例#9
0
    //protected override void Render(HtmlTextWriter writer)
    //{
    //    //html minifier & JS at bottom
    //    // not tested
    //    if (this.Request.Headers["X-MicrosoftAjax"] != "Delta=true")
    //    {
    //        System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"<script[^>]*>[\w|\t|\r|\W]*?</script>");
    //        System.Text.StringBuilder sb = new System.Text.StringBuilder();
    //        System.IO.StringWriter sw = new System.IO.StringWriter(sb);
    //        HtmlTextWriter hw = new HtmlTextWriter(sw);
    //        base.Render(hw);
    //        string html = sb.ToString();
    //        System.Text.RegularExpressions.MatchCollection mymatch = reg.Matches(html);
    //        html = reg.Replace(html, string.Empty);
    //        reg = new System.Text.RegularExpressions.Regex(@"(?<=[^])\t{2,}|(?<=[>])\s{2,}(?=[<])|(?<=[>])\s{2,11}(?=[<])|(?=[\n])\s{2,}|(?=[\r])\s{2,}");
    //        html = reg.Replace(html, string.Empty);
    //        reg = new System.Text.RegularExpressions.Regex(@"</body>");
    //        string str = string.Empty;
    //        foreach (System.Text.RegularExpressions.Match match in mymatch)
    //        {
    //            str += match.ToString();
    //        }
    //        html = reg.Replace(html, str + "</body>");
    //        writer.Write(html);
    //    }
    //    else
    //        base.Render(writer);
    //}
    protected void Page_Load(object sender, EventArgs e)
    {
        CMSfunc.checkURL();
        string lang = Request.QueryString["lang"];

        if (!String.IsNullOrEmpty(lang) && lang != "1")
        {
            Session["vlang"] = lang;
        }
        if (Session["vlang"] == null || lang == "1")
        {
            Session["vlang"] = "1";
        }
        string url  = String.IsNullOrEmpty(Request["url"]) ? "Home" : Request["url"].ToString();
        string nUrl = String.IsNullOrEmpty(Request["nUrl"]) ? "" : Request["nUrl"].ToString();

        p  = ModControl.GetP_From_Code(url);
        id = ModControl.GetID_From_Url(p, nUrl);
        string page     = ConvertUtil.Nullcheck(Request.QueryString.Get("page"), "1");
        string pagesize = ConvertUtil.Nullcheck(Request.Form.Get("pagesizechange"), "10");

        LoadHeadTag(p, id);
        ltrMenutop.Text    = LoadMenutop(0);
        ltrMenufooter.Text = GetMnFooter();
        string field = "Mod_ID,Content_Name,Content_Img,Content_Intro,Content_Url";

        string where = " lang=" + Session["vlang"] + " AND Content_Status=1 AND Mod_ID in(SELECT Mod_ID FROM tbl_Mod WHERE Mod_Status=1 AND Modtype_ID=1)";
        string k = ApplicationUtil.FormatSqlString(Request["k"]);

        if (k != "")
        {
            where += " AND Content_Name like N'%" + k + "%'";
        }
        string sqlorder = " ORDER BY Content_ID DESC";

        LoadNews(Convert.ToInt16(page), Convert.ToInt16(pagesize), field, where, sqlorder);
        VisitorCounter();
        lrtPath.Text = CMSfunc.LoadPath(ModControl.GetP_From_Code("tim-kiem"), 0);
    }