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;
public partial class Contact2 : System.Web.UI.Page
{
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;
GetMobanhtml();
}
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 = "
"+strPhone1+"
"; strhtml += ""+strEmail1+"
"; strhtml += ""+strAddress1+"
"; strhtml += "Contact phone:
"; strhtml += ""+ strPhone1 + ""; strhtml += "Contact email:
"; strhtml += ""+strEmail1+""; strhtml += "Contact address:
"; strhtml += ""+strAddress1+""; strhtml += "" + strPhone1+"
" + strEmail1 + "
" + strAddress1+ "