using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using WebApp.Components; using basic; public partial class Contact2 : System.Web.UI.Page { public BasicPage bp = new BasicPage(); public int intClassID; public string strParentColumnName = null; public string strParentColumnSubName = null; public string strColumnName = null; public string strColumnSubName = null; public string strPath = null; public MyClass mc = new MyClass(); public string strCompanyName = null; public string strAddress = null; public string strPhone = null; public string strMobile = null; public string strEmail = null; public string strFax = null; public string strContact = null; public string strWebUrl = null; public string strQQ = null; public string strMap = null; public string strWeChat = null; public string yangban; protected void Page_Load(object sender, EventArgs e) { SystemTools systemtools = new SystemTools(); if (systemtools.IsNumberic(Request["ClassID"])) { intClassID = Int32.Parse(Request["ClassID"]); //调用类 Common common = new Common(); //根据ClassID显示内容 showContact(); //显示栏目名称 ClientColumnName clientcolumnname = new ClientColumnName(); clientcolumnname = common.showColumnName(intClassID); strColumnName = clientcolumnname.ColumnName; strColumnSubName = clientcolumnname.ColumnSubName; //显示图片或者Flash strPath = clientcolumnname.Path; string strType = null; if (strPath.Length >= 3) { strType = strPath.Substring(strPath.Length - 3, 3); } string strLength = clientcolumnname.Length; string strWidth = clientcolumnname.Width; if (strType == "swf") { strPath = ""; } else { strPath = ""; //显示内页通栏图片 } //显示父级栏目名称 ClientParentColumnName clientparentcolumnname = new ClientParentColumnName(); clientparentcolumnname = common.showParentColumnName(intClassID); strParentColumnName = clientparentcolumnname.ParentColumnName; strParentColumnSubName = clientparentcolumnname.ParentColumnSubName; //读取整站SEO的设置信息 ClientSEO clientseo = common.showSEO(); this.Title = strColumnName+"-"+ mc.ShowWebsiteKeyById(1, "CompanyName"); description.Attributes["content"] = clientseo.WebDescription; keywords.Attributes["content"] = strColumnName + "," + mc.ShowWebsiteKeyById(1, "CompanyName"); //读取某个栏目的SEO设置信息 ClientColumnSEO clientcolumnseo = common.showColumnSEO(intClassID); if (clientcolumnseo.ColumnTitle.Length > 0) { this.Title = clientcolumnseo.ColumnTitle; } if (clientcolumnseo.ColumnDescription.Length > 0) { description.Attributes["content"] = clientcolumnseo.ColumnDescription; } if (clientcolumnseo.ColumnKeywords.Length > 0) { keywords.Attributes["content"] = clientcolumnseo.ColumnKeywords; } ContactZidingyi.Visible = false; ContactMoban.Visible = false; yangban = mc.ShowColumnKeyById(intClassID, "Sample"); if (yangban == "" || yangban == "99") { ContactZidingyi.Visible = true; } else { ContactMoban.Visible = true; GetMobanhtml(); } } } public string strAddress1; public string strEmail1; public string strQQ1; public string strPhone1; protected void showContact() { Common common = new Common(); Contact contact = new Contact(); contact = common.showContact(); strCompanyName = contact.CompanyName; if (strCompanyName != "") { strCompanyName = "" + strCompanyName + ""; } strAddress = contact.Address; strAddress1 = contact.Address; if (strAddress != "") { strAddress = "
  • 地址:" + strAddress + "
  • "; } strPhone = contact.Phone; strPhone1 = contact.Phone; if (strPhone != "") { strPhone = "
  • 电话:" + strPhone + "
  • "; } strMobile = contact.Mobile; if (strMobile != "") { strMobile = "
  • 手机:" + strMobile + "
  • "; } strEmail = contact.Email; strEmail1 = contact.Email; if (strEmail != "") { strEmail = "
  • Email:" + strEmail + "
  • "; } strFax = contact.Fax; if (strFax != "") { strFax = "
  • 传真:" + strFax + "
  • "; } strContact = contact.ContactName; if (strContact != "") { strContact = "
  • 联系人:" + strContact + "
  • "; } strWebUrl = contact.WebUrl; if (strWebUrl != "") { strWebUrl = "
  • 公司网站:" + strWebUrl + "
  • "; } strQQ = contact.QQ; strQQ1 = contact.QQ; if (strQQ != "") { strQQ = "
  • QQ:" + strQQ + "
  • "; } strWeChat = contact.WeChat; if (strWeChat != "") { strWeChat = "
  • 微信号:" + strWeChat + "
  • "; } strMap = contact.Map; if (strMap != "") { strMap = "
  • " + strMap + "
  • "; } } public string strhtml = ""; public void GetMobanhtml() { if (yangban == "1") { strhtml += "
    "; strhtml += "
    " + strMap + "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "+strCompanyName+"
    "; strhtml += "
    "+strAddress+"
    "; strhtml += "
    "+strPhone+"
    "; strhtml += "
    "+strMobile+"
    "; strhtml += "
    "+strWeChat+"
    "; strhtml += "
    "+strEmail+"
    "; strhtml += "
    "+strWebUrl+"
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; } else if (yangban == "2") { strhtml += "
    "; strhtml += "
    "; strhtml += "

    联系我们

    "; strhtml += "

    欢迎致电联系,我们期待与您的合作

    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "+strCompanyName+"
    "; strhtml += "
    " + strMobile + "
    "; strhtml += "
    " + strPhone + "
    "; strhtml += "
    " + strWeChat + "
    "; strhtml += "
    " + strEmail + "
    "; strhtml += "
    " + strWebUrl + "
    "; strhtml += "
    " + strAddress + "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    " + strMap + "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "

    在线留言

    "; strhtml += "

    留下您宝贵的意见,我们提供更优质的服务

    "; strhtml += "
    "; strhtml += ""; strhtml += ""; strhtml += "
    "; strhtml += "
    "; } else if (yangban == "3") { strhtml += "
    "; strhtml += "
    "; strhtml += "

    联系我们

    "; strhtml += "

    欢迎致电联系,我们期待与您的合作

    "; strhtml += "
    "; strhtml += "
    "; strhtml += ""; strhtml += "
    "; strhtml += "
    "; strhtml += "
    " + strMap + "
    "; strhtml += "
    "; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += ""; strhtml += "
    你的主题"; strhtml += "
    您的姓名"; strhtml += "
    您的手机"; strhtml += "
    您的邮箱"; strhtml += "
    您的内容"; strhtml += "
     "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; strhtml += "
    "; } } public DataTable dtblNews = new DataTable(); public int intNews; public void showNews(int classid, int top) { dtblNews = bp.SelectDataBase("news", "select top " + top + " * from news where classid=" + classid + " and StaticPage<>2 order by paixu desc,istop desc,convert(varchar(100),putdate,23) desc,id desc").Tables[0]; intNews = dtblNews.Rows.Count; } }