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/6b11be23/e503b68d/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : D:/tmp_aspnet/root/6b11be23/e503b68d/App_Web_67vhmbe7.3.cs
?#pragma checksum "D:\wwwroot\keman\wwwroot\pro1.aspx.cs" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "B45C09C38036B5032EABC706F9F3A621"

#line 1 "D:\wwwroot\keman\wwwroot\pro1.aspx.cs"
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using CoreClass;
using System.Data.OleDb;
using System.Text.RegularExpressions;

public partial class pro1 : System.Web.UI.Page
{

    #region 界说
    public string newsHtml;
    public DBCommon DB = new DBCommon();
    public PublicFunction pubfun = new PublicFunction();
    public yingshi dy = new yingshi();
    public int classid = 0;
    public int channelid = 0;


    public string classidname = "";

    public int classidss = 0;

    public yingshi bs = new yingshi();
    public string dddname = "";
    public string dddnamehref = "";

    public string tianlename = "";

    public string L_nr = "";

    public string d_lanmu = "";
    public string x_lanmu = "";

    #endregion



    protected void Page_Load(object sender, EventArgs e)
    {


        if (pubfun.IsNumeric(Request.QueryString["classid"]))
        {
            this.classid = Convert.ToInt32(Request.QueryString["classid"]);
            this.classidss = Convert.ToInt32(Request.QueryString["classid"]);
        }


        if (pubfun.IsNumeric(Request.QueryString["channelid"])) this.channelid = Convert.ToInt32(Request.QueryString["channelid"]);
        if (classid == 0) classid = pubfun.Gettopclassid(channelid);
        if (!IsPostBack)
        {
         
 
            if (Request.QueryString["classid"] != null || Request.QueryString["classid"].ToString() != "")
            {
                classid = Convert.ToInt32(Request.QueryString["classid"]);

                pubfun.Bind(Repeater2, "select * from class where channelid=(select top 1 channelid from class where Classid=" + classid + ")  order by ordernum asc");

                //Label1.Text = pubfun.Gettname(classid);

                classidname = pubfun.Gettname(classid);


                DataSet dt_small = new DataSet();
                dt_small = dy.chaxun("select top 1 Title,channelid from ClassChannel where ChannelId=(select top 1 ChannelId from class where classid=" + classid + ")");
                if (dt_small.Tables[0].Rows.Count > 0)
                {
                    d_lanmu = dt_small.Tables[0].Rows[0]["title"].ToString();
                    
                }


               

                //


                //if (classid > 0)
                //{
                //    DataSet dtfelsanleit = dy.chaxun("select * from class where tid=" + classid);

                //    Repeater2.DataSource = dtfelsanleit.Tables[0].DefaultView;
                //    Repeater2.DataBind();
                //}
                ////同类 有关阅读

                //pubfun.Bind(Repeater5, "select top 10 * from info where classid=" + Request.QueryString["classid"] + " and Inspect=true order by addtime desc");

            }
            else
            {

                if (Request.QueryString["channelid"] != null && Request.QueryString["channelid"].ToString() != "")
                {
                    channelid = Convert.ToInt32(Request.QueryString["channelid"].ToString());


                    pubfun.Bind(Repeater2, "select * from class where channelid=" + channelid + "  order by ordernum asc");
                    d_lanmu = pubfun.Gettnamebigname(channelid);
                    ////同类 有关阅读

                    //pubfun.Bind(Repeater5, "select top 10 * from info where channelid=" + Request.QueryString["channelid"] + " and Inspect=true order by addtime desc");
                }
                //else
                //{
                //    //同类 有关阅读

                //    pubfun.Bind(Repeater5, "select top 10 * from info where channelid=2 and Inspect=true order by addtime desc");

                //}


            }


            ////三类选中
            //if (Request.QueryString["classidss"] != null && Request.QueryString["classidss"] != "")
            //{
            //    Label1.Text = pubfun.Gettname(classidss);
            //    //classname.Text = classname.Text + ">" + pubfun.Gettname(classidss);
            //}
            ////classidss




            this.InitPage();


        }


    }

    private void InitPage()
    {


        //if (channelid == 2)
        //{
        //    dddname = "新闻动态";
        //    dddnamehref = "news.aspx?channelid=2";
        //}

        //else if (channelid == 25)
        //{
        //    dddname = "技术优势";
        //    dddnamehref = "news.aspx?channelid=25";  
        //}


        if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "")
        {
            //hits

            dy.user("update info set hits=hits+23 where infoid=" + Request.QueryString["id"].ToString());

            DataSet dt_xx = new DataSet();
            dt_xx = dy.chaxun("select * from Info where Infoid=" + Request.QueryString["id"].ToString() + "");
            if (dt_xx.Tables[0].Rows.Count > 0)
            {


                if (dt_xx.Tables[0].Rows[0]["url"].ToString().Replace("http://", "") != "")
                {


                    Response.Redirect(dt_xx.Tables[0].Rows[0]["url"].ToString());

                }


                tianlename = this.L_bt.Text = dt_xx.Tables[0].Rows[0]["title"].ToString();

                this.L_rq.Text = "  日期:" + Convert.ToDateTime(dt_xx.Tables[0].Rows[0]["Addtime"].ToString()).ToShortDateString();
                L_nr = dt_xx.Tables[0].Rows[0]["Content"].ToString().Replace("东方国际医院治理钻研院", "");

           

                //pubfun.Bind(Repeater3, "select * from class where channelid=7 and tid=0  order by ordernum asc");



            }


            //int idds33 = 0;
            //if (classidss > 0)
            //{
            //    idds33 = classidss;
            //}
            //else if (classid > 0)
            //{
            //    idds33 = classid;
            //}


            //if (idds33 > 0)
            //{
            //    DataSet dataxgcp = dy.chaxun("select * from info where classid=" + idds33 + " order by ordernum desc,addtime desc");


            //    Repeater1.DataSource = dataxgcp.Tables[0].DefaultView;
            //    Repeater1.DataBind();
            //}

            //else if (channelid > 0)
            //{
            //    DataSet dataxgcp = dy.chaxun("select * from info where channelid=" + channelid + " order by ordernum desc,addtime desc");


            //    Repeater1.DataSource = dataxgcp.Tables[0].DefaultView;
            //    Repeater1.DataBind();
            //}




        }



    }


    public bool shifouxz(string classid34433ss)
    {

        if (classid34433ss == classidss.ToString())
        {
            return true;
        }
        else
        {
            return false;
        }


    }


    public bool shifouxaaz(string classid333ss)
    {

        if (classid333ss == classidss.ToString())
        {
            return false;

        }
        else
        {
            return true;
        }


    }


    public bool gaibai_ur2l(string strss)
    {

        if (strss.Replace("#", "").Replace(" ", "").Replace("http://", "") == "")
        {
            return false;
        }
        else
        {
            return true;
        }


    }



    //截取字符串  显示新闻内容前100字
    public string bangjiequ22(string strss, int id)
    {

        //自己编写的节造:只能输入--汉字(1)
        string sttsid = "";

        //foreach (char s in strss)
        //{
        //    int i = (int)s;
        //    if (i < 0x4e00 || i > 0x9fa5)
        //    {
        //        //Response.Write("只能输入汉字!");

        //    }
        //    else
        //    {
        //        sttsid = sttsid + s.ToString();
        //    }
        //}


        if (strss.IndexOf("|") > -1)
        {
            string[] ste22sss = strss.Split('|');

            strss = ste22sss[0].ToString();


        }

        sttsid = checkStr(strss);
        if (sttsid.Length > id)
        {
            sttsid = sttsid.Substring(0, id);
        }
        return sttsid;


    }


    public string checkStr(string html)
    {
        System.Text.RegularExpressions.Regex regex1 = new System.Text.RegularExpressions.Regex(@"<script[\s\S]+</script *>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex2 = new System.Text.RegularExpressions.Regex(@" href *= *[\s\S]*script *:", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex3 = new System.Text.RegularExpressions.Regex(@" no[\s\S]*=", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex4 = new System.Text.RegularExpressions.Regex(@"<iframe[\s\S]+</iframe *>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex5 = new System.Text.RegularExpressions.Regex(@"<frameset[\s\S]+</frameset *>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex6 = new System.Text.RegularExpressions.Regex(@"<img(.*?)src=[""|']?(.*?\.(gif|bmp|png|jpg))[""|']?(.*?)>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex7 = new System.Text.RegularExpressions.Regex(@"</p>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex8 = new System.Text.RegularExpressions.Regex(@"<p>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        System.Text.RegularExpressions.Regex regex9 = new System.Text.RegularExpressions.Regex(@"<[^>]*>", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
        html = regex1.Replace(html, ""); //过滤<script></script>象征
        html = regex2.Replace(html, ""); //过滤href=javascript: (<A>) 属性
        html = regex3.Replace(html, " _disibledevent="); //过滤其它控件的on...事务
        html = regex4.Replace(html, ""); //过滤iframe
        html = regex5.Replace(html, ""); //过滤frameset
        html = regex6.Replace(html, ""); //过滤frameset
        html = regex7.Replace(html, ""); //过滤frameset
        html = regex8.Replace(html, ""); //过滤frameset
        html = regex9.Replace(html, "");
        html = Regex.Replace(html, @"[\n\r]", "");
        html = html.TrimEnd((char[])"\n\r".ToCharArray());

        html = html.Replace(" ", "");
        html = html.Replace(" ", "&nbsp;");
        html = html.Replace("</strong>", "");
        html = html.Replace("<strong>", "");


        html = Regex.Replace(html, @"<script[^>]*?>.*?</script>", "", RegexOptions.IgnoreCase);

        //删除HTML

        html = Regex.Replace(html, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"([\r])[\s]+", "", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"-->", "", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"<!--.*", "", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(quot|#34);", "\"", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(amp|#38);", "&", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(lt|#60);", "<", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(gt|#62);", ">", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(nbsp|#160);", " ", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(iexcl|#161);", "\xa1", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(cent|#162);", "\xa2", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(pound|#163);", "\xa3", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&(copy|#169);", "\xa9", RegexOptions.IgnoreCase);

        html = Regex.Replace(html, @"&#(\d+);", "", RegexOptions.IgnoreCase);

        html.Replace("<", "");

        html.Replace(">", "");

        html.Replace("\r", "");
        html.Replace(" ", "");

        html = HttpContext.Current.Server.HtmlEncode(html).Trim();

        return html;
    }










}


#line default
#line hidden