|
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/54f3ceba/6be944cd/ |
?#pragma checksum "D:\wwwroot\klbttc\wwwroot\newsshow.aspx.cs" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0FE49B25EA053A1E800E57BACB3EFC204D5296A4"
#line 1 "D:\wwwroot\klbttc\wwwroot\newsshow.aspx.cs"
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
C c = new C();
DataSet ds = new DataSet();
public int mid, id,islook = 0;
public string webSite, webSite1 = "";
public string shang, xia, ss, news_name, layer = string.Empty;
protected void Page_Load(object sender, EventArgs e)
{
try
{
mid = int.Parse(Request.QueryString["mid"].ToString());
}
catch { }
try
{
id = int.Parse(Request.QueryString["id"].ToString());
}
catch { }
//新闻列表
string sql = "select * from news where news9=@mid and news0=@id";
SqlParameter[] ps = new SqlParameter[]{
new SqlParameter("@mid",mid),
new SqlParameter("@id",id),
};
ds = MyFunction.Query(sql, ps);
if (ds.Tables.Count > 0)
{
if (ds.Tables[0].Rows.Count > 0)
{
// 有内容则跳转
if(ds.Tables[0].Rows[0]["news13"].ToString().Length > 3)
{
Response.Redirect(ds.Tables[0].Rows[0]["news13"].ToString());
}
ss = ds.Tables[0].Rows[0]["news7"].ToString();
news_name = ds.Tables[0].Rows[0]["news1"].ToString();
rep_show.DataSource = ds.Tables[0];
rep_show.DataBind();
}
}
//下一步
ds = MyFunction.Query("SELECT TOP 1 * FROM news WHERE news9 = @mid and news7 > @ss order by news7 asc", new SqlParameter[] { new SqlParameter("@mid", mid), new SqlParameter("@ss", ss) });
if (ds.Tables[0].Rows.Count > 0)
{
xia = "<a href='newsshow.aspx?mid=" + mid + "&id=" + ds.Tables[0].Rows[0]["news0"].ToString() + "'>下一条:" + new C().LeftStr("" + ds.Tables[0].Rows[0]["news1"].ToString() + "", 50, "...") + "</a>";
}
else
{
xia = "<a href='javascript:void(0);'>下一条:没有了</a>";
}
ds = MyFunction.Query("SELECT TOP 1 * FROM news WHERE news9 = @mid and news7 < @ss order by news7 desc", new SqlParameter[] { new SqlParameter("@mid", mid), new SqlParameter("@ss", ss) });
if (ds.Tables[0].Rows.Count > 0)
{
shang = "<a href='newsshow.aspx?mid=" + mid + "&id=" + ds.Tables[0].Rows[0]["news0"].ToString() + "'>上一条:" + new C().LeftStr("" + ds.Tables[0].Rows[0]["news1"].ToString() + "", 50, "...") + "</a>";
}
else
{
shang = "<a href='javascript:void(0);'>上一条:没有了</a>";
}
ds = c.GetDs("SELECT MenuSys_1.MenuSys1 AS Expr1, MenuSys.*,MenuSys_1.MenuSys0 AS Expr3 FROM MenuSys INNER JOIN MenuSys MenuSys_1 ON MenuSys.MenuSys3 = MenuSys_1.MenuSys0 WHERE (MenuSys.MenuSys0 = " + mid.ToString() + " )");
webSite1 = ds.Tables[0].Rows[0]["Expr1"].ToString();
webSite = ds.Tables[0].Rows[0]["MenuSys1"].ToString();
this.Title = news_name + " - " + Application["sysset1"].ToString();
}
}
#line default
#line hidden