if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_lockinfo]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[p_lockinfo]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_AdZone]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_AdZone]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Admin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Admin]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Advertisement]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Advertisement]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Announce]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Announce]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_AreaCollection]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_AreaCollection]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Article]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Article]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Author]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Author]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Bank]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Bank]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_BankrollItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_BankrollItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Card]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Card]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Channel]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Channel]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_City]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_City]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Class]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Class]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Classroom]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Classroom]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Client]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Client]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Comment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Comment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Company]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Company]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_ComplainItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_ComplainItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Config]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Config]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_ConsumeLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_ConsumeLog]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Contacter]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Contacter]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_CopyFrom]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_CopyFrom]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Country]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Country]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_DeliverCharge]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_DeliverCharge]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_DeliverItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_DeliverItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_DeliverType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_DeliverType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Dictionary]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Dictionary]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_DownError]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_DownError]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_DownServer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_DownServer]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Equipment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Equipment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Favorite]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Favorite]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Field]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Field]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Filters]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Filters]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Friend]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Friend]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_FriendSite]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_FriendSite]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_FsKind]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_FsKind]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_GuestBook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_GuestBook]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_GuestKind]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_GuestKind]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HistrolyNews]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HistrolyNews]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseArea]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseArea]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseCS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseCS]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseCZ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseCZ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseConfig]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseConfig]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseHZ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseHZ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseQG]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseQG]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_HouseQZ]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_HouseQZ]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_InfoS]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_InfoS]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_InvoiceItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_InvoiceItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Item]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Item]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_JobCategory]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_JobCategory]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_JsFile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_JsFile]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_KeyLink]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_KeyLink]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Label]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Label]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Log]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Log]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_MailChannel]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_MailChannel]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Message]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Message]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_NewKeys]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_NewKeys]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_ObjectID]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_ObjectID]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_OrderForm]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_OrderForm]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_OrderFormItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_OrderFormItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Page]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Page]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_PageClass]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_PageClass]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_PayPlatform]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_PayPlatform]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Payment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Payment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_PaymentType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_PaymentType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Photo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Photo]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Position]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Position]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_PositionSupplyInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_PositionSupplyInfo]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_PresentProject]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_PresentProject]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Producer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Producer]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Product]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Product]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Province]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Province]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_RechargeLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_RechargeLog]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Resume]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Resume]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_ServiceItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_ServiceItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_ShoppingCarts]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_ShoppingCarts]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Skin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Skin]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Soft]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Soft]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Space]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Space]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceBook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceBook]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceComment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceComment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceDiary]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceDiary]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceKind]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceKind]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceLink]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceLink]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceMusic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceMusic]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpacePhoto]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpacePhoto]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SpaceVisitor]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SpaceVisitor]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Special]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Special]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SubCompany]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SubCompany]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Supply]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Supply]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Supply_Company]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Supply_Company]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Survey]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Survey]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SurveyAnswer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SurveyAnswer]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SurveyInput]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SurveyInput]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_SurveyQuestion]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_SurveyQuestion]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Template]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Template]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_TemplateProject]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_TemplateProject]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Trademark]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Trademark]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_TransferItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_TransferItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_UsedDetail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_UsedDetail]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_User]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_User]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_UserGroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_UserGroup]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_Vote]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_Vote]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PE_WorkPlace]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PE_WorkPlace]
GO

CREATE TABLE [dbo].[PE_AdZone] (
	[ZoneID] [int] NOT NULL ,
	[ChannelID] [int] NULL ,
	[IncludeADID] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ZoneName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZoneJSName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZoneIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZoneType] [int] NULL ,
	[DefaultSetting] [bit] NOT NULL ,
	[ZoneSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ZoneWidth] [int] NULL ,
	[ZoneHeight] [int] NULL ,
	[Active] [bit] NOT NULL ,
	[ShowType] [int] NULL ,
	[UpdateTime] [datetime] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Admin] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[AdminName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Password] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Purview] [int] NOT NULL ,
	[RoleName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastLoginIP] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastLoginTime] [datetime] NULL ,
	[LastLogoutTime] [datetime] NULL ,
	[LoginTimes] [int] NULL ,
	[RndPassword] [nvarchar] (16) COLLATE Chinese_PRC_CI_AS NULL ,
	[EnableMultiLogin] [bit] NOT NULL ,
	[AdminPurview_Article] [int] NULL ,
	[AdminPurview_Soft] [int] NULL ,
	[AdminPurview_Photo] [int] NULL ,
	[AdminPurview_GuestBook] [int] NULL ,
	[AdminPurview_Supply] [int] NULL ,
	[AdminPurview_House] [int] NULL ,
	[AdminPurview_Job] [int] NULL ,
	[AdminPurview_Shop] [int] NULL ,
	[AdminPurview_Others] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_View] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_Input] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_Check] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_Manage] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_House] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_GuestBook] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Count_Add] [int] NULL ,
	[Count_Check] [int] NULL ,
	[Count_Reject] [int] NULL ,
	[AdminPurview_Pic] [int] NULL ,
	[AdminPurview_Luxury] [int] NULL ,
	[AdminPurview_Games] [int] NULL ,
	[AdminPurview_Person] [int] NULL ,
	[AdminPurview_Movie] [int] NULL ,
	[AdminPurview_Adult] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Advertisement] (
	[ADID] [int] NOT NULL ,
	[UserID] [int] NULL ,
	[ZoneID] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ADType] [int] NULL ,
	[ADName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ImgUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ImgWidth] [int] NULL ,
	[ImgHeight] [int] NULL ,
	[FlashWmode] [int] NULL ,
	[ADIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LinkUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LinkTarget] [int] NULL ,
	[LinkAlt] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Priority] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Setting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CountView] [bit] NOT NULL ,
	[Views] [int] NULL ,
	[CountClick] [bit] NOT NULL ,
	[Clicks] [int] NULL ,
	[Passed] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Announce] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Author] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateAndTime] [datetime] NULL ,
	[IsSelected] [bit] NOT NULL ,
	[ChannelID] [int] NULL ,
	[ShowType] [int] NULL ,
	[OutTime] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_AreaCollection] (
	[AreaID] [int] IDENTITY (1, 1) NOT NULL ,
	[AreaName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaFile] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Code] [int] NULL ,
	[StringReplace] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LableStart] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LableEnd] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FilterProperty] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpFileType] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaPassed] [bit] NOT NULL ,
	[Type] [tinyint] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Article] (
	[ArticleID] [int] NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[ClassID] [int] NOT NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[TitleIntact] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Subheading] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Author] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CopyFrom] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[LinkUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Hits] [int] NOT NULL ,
	[CommentCount] [int] NULL ,
	[UpdateTime] [datetime] NOT NULL ,
	[CreateTime] [datetime] NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Status] [int] NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[IncludePic] [int] NOT NULL ,
	[DefaultPicUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UploadFiles] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[InfoPoint] [int] NULL ,
	[PaginationType] [int] NULL ,
	[Deleted] [bit] NOT NULL ,
	[SkinID] [int] NULL ,
	[TemplateID] [int] NULL ,
	[Stars] [int] NULL ,
	[TitleFontColor] [nvarchar] (7) COLLATE Chinese_PRC_CI_AS NULL ,
	[TitleFontType] [int] NULL ,
	[MaxCharPerPage] [int] NULL ,
	[ShowCommentLink] [bit] NOT NULL ,
	[Receive] [bit] NOT NULL ,
	[ReceiveUser] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Received] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AutoReceiveTime] [int] NULL ,
	[ReceiveType] [int] NULL ,
	[Intro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PresentExp] [float] NULL ,
	[Copymoney] [money] NULL ,
	[IsPayed] [bit] NOT NULL ,
	[Beneficiary] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[PayDate] [datetime] NULL ,
	[VoteID] [int] NULL ,
	[InfoPurview] [int] NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeType] [int] NULL ,
	[PitchTime] [int] NULL ,
	[ReadTimes] [int] NULL ,
	[DividePercent] [int] NULL ,
	[BlogID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Author] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [smallint] NULL ,
	[AuthorName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Sex] [tinyint] NULL ,
	[BirthDay] [datetime] NULL ,
	[Photo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Intro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Tel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Company] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Department] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZipCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HomePage] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[QQ] [int] NULL ,
	[AuthorType] [smallint] NULL ,
	[LastUseTime] [datetime] NULL ,
	[Passed] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[onTop] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[TemplateID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Bank] (
	[BankID] [int] NOT NULL ,
	[BankShortName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Accounts] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[CardNum] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[HolderName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankPic] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDefault] [bit] NOT NULL ,
	[OrderID] [int] NULL ,
	[IsDisabled] [bit] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_BankrollItem] (
	[ItemID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClientID] [int] NULL ,
	[DateAndTime] [datetime] NULL ,
	[Money] [money] NULL ,
	[MoneyType] [int] NULL ,
	[CurrencyType] [int] NULL ,
	[eBankID] [int] NULL ,
	[Bank] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Income_PayOut] [int] NULL ,
	[OrderFormID] [int] NULL ,
	[PaymentID] [int] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LogTime] [datetime] NULL ,
	[Inputer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Card] (
	[CardID] [int] IDENTITY (1, 1) NOT NULL ,
	[CardType] [int] NULL ,
	[ProductID] [int] NULL ,
	[CardNum] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Password] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AgentName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Money] [money] NULL ,
	[ValidNum] [int] NULL ,
	[ValidUnit] [int] NULL ,
	[EndDate] [datetime] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UseTime] [datetime] NULL ,
	[CreateTime] [datetime] NULL ,
	[OrderFormItemID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Channel] (
	[ChannelID] [int] NOT NULL ,
	[ChannelName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ChannelShortName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChannelItemUnit] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReadMe] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Meta_Keywords] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Meta_Description] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChannelPicUrl] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NOT NULL ,
	[OpenType] [int] NOT NULL ,
	[ChannelType] [int] NOT NULL ,
	[LinkUrl] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChannelDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ModuleType] [int] NULL ,
	[Disabled] [bit] NOT NULL ,
	[ShowName] [bit] NOT NULL ,
	[ShowNameOnPath] [bit] NOT NULL ,
	[ShowClassTreeGuide] [bit] NOT NULL ,
	[ShowSuspensionPoints] [bit] NOT NULL ,
	[CheckLevel] [int] NOT NULL ,
	[EnableUploadFile] [bit] NOT NULL ,
	[UploadDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MaxFileSize] [int] NULL ,
	[HitsOfHot] [int] NULL ,
	[DaysOfNew] [int] NULL ,
	[MaxPerLine] [int] NULL ,
	[UpFileType] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[DefaultSkinID] [int] NULL ,
	[Template_Index] [int] NULL ,
	[TopMenuType] [int] NULL ,
	[ClassGuideType] [int] NULL ,
	[UseCreateHTML] [int] NOT NULL ,
	[ItemCount] [int] NULL ,
	[ItemChecked] [int] NULL ,
	[CommentCount] [int] NULL ,
	[SpecialCount] [int] NULL ,
	[HitsCount] [int] NULL ,
	[StructureType] [int] NULL ,
	[ListFileType] [int] NULL ,
	[FileNameType] [int] NULL ,
	[AutoCreateType] [int] NULL ,
	[FileExt_Index] [int] NULL ,
	[FileExt_List] [int] NULL ,
	[FileExt_Item] [int] NULL ,
	[UpdatePages] [int] NULL ,
	[ChannelPurview] [int] NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[JS_SpecialNum] [int] NULL ,
	[AuthorInfoLen] [int] NULL ,
	[MaxPerPage_Index] [int] NULL ,
	[MaxPerPage_SearchResult] [int] NULL ,
	[MaxPerPage_New] [int] NULL ,
	[MaxPerPage_Hot] [int] NULL ,
	[MaxPerPage_Elite] [int] NULL ,
	[MaxPerPage_SpecialList] [int] NULL ,
	[MoneyPerKw] [money] NULL ,
	[TimingCreateSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfReject] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfPassed] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Custom_Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrEnabledTabs] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[CommandChannelPoint] [int] NULL ,
	[Fields_Options] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_City] (
	[AreaID] [int] IDENTITY (1, 1) NOT NULL ,
	[Country] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Province] [nvarchar] (25) COLLATE Chinese_PRC_CI_AS NULL ,
	[City] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Area] [nvarchar] (25) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostCode] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaCode] [nvarchar] (8) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Class] (
	[ClassID] [int] NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[ClassName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ClassType] [int] NOT NULL ,
	[OpenType] [int] NOT NULL ,
	[ParentID] [int] NOT NULL ,
	[ParentPath] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Depth] [int] NOT NULL ,
	[RootID] [int] NOT NULL ,
	[Child] [int] NOT NULL ,
	[arrChildID] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PrevID] [int] NOT NULL ,
	[NextID] [int] NOT NULL ,
	[OrderID] [int] NOT NULL ,
	[Tips] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Readme] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Meta_Keywords] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Meta_Description] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LinkUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClassPicUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClassDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentDir] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SkinID] [int] NULL ,
	[TemplateID] [int] NULL ,
	[ShowOnTop] [bit] NOT NULL ,
	[ShowOnIndex] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[EnableAdd] [bit] NOT NULL ,
	[EnableProtect] [bit] NOT NULL ,
	[MaxPerPage] [int] NULL ,
	[DefaultItemTemplate] [int] NULL ,
	[DefaultItemSkin] [int] NULL ,
	[ItemListOrderType] [int] NULL ,
	[ItemOpenType] [int] NULL ,
	[ItemCount] [int] NULL ,
	[ClassPurview] [tinyint] NULL ,
	[EnableComment] [bit] NOT NULL ,
	[CheckComment] [bit] NOT NULL ,
	[PresentExp] [float] NULL ,
	[DefaultItemPoint] [float] NULL ,
	[DefaultItemChargeType] [int] NULL ,
	[DefaultItemPitchTime] [int] NULL ,
	[DefaultItemReadTimes] [int] NULL ,
	[DefaultItemDividePercent] [int] NULL ,
	[Custom_Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CommandClassPoint] [int] NULL ,
	[ReleaseClassPoint] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Classroom] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[FatherID] [int] NULL ,
	[ClassroomName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClassroomIntroduce] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Client] (
	[ClientID] [int] NOT NULL ,
	[ParentID] [int] NULL ,
	[ClientNum] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClientType] [int] NULL ,
	[ClientName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ShortedForm] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Area] [int] NULL ,
	[ClientField] [int] NULL ,
	[ValueLevel] [int] NULL ,
	[CreditLevel] [int] NULL ,
	[Importance] [int] NULL ,
	[ConnectionLevel] [int] NULL ,
	[GroupID] [int] NULL ,
	[SourceType] [int] NULL ,
	[PhaseType] [int] NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[VisitTimes] [int] NULL ,
	[ServiceTimes] [int] NULL ,
	[ComplainTimes] [int] NULL ,
	[LastVisitTime] [datetime] NULL ,
	[LastServiceTime] [datetime] NULL ,
	[LastComplainTime] [datetime] NULL ,
	[CreateTime] [datetime] NULL ,
	[UpdateTime] [datetime] NULL ,
	[Owner] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Balance] [money] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Comment] (
	[CommentID] [int] IDENTITY (1, 1) NOT NULL ,
	[ModuleType] [int] NULL ,
	[InfoID] [int] NOT NULL ,
	[UserType] [int] NULL ,
	[UserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Sex] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[OICQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[MSN] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ICQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Homepage] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[IP] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[WriteTime] [datetime] NOT NULL ,
	[Score] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ReplyName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReplyContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ReplyTime] [datetime] NULL ,
	[Passed] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Company] (
	[CompanyID] [int] NOT NULL ,
	[ClientID] [int] NULL ,
	[CompanyName] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[Country] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Province] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[City] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZipCode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Phone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Homepage] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankOfDeposit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankAccount] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TaxNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StatusInField] [int] NULL ,
	[CompanySize] [int] NULL ,
	[BusinessScope] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[AnnualSales] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ManagementForms] [int] NULL ,
	[RegisteredCapital] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CompamyPic] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_ComplainItem] (
	[ItemID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClientID] [int] NULL ,
	[ContacterID] [int] NULL ,
	[ComplainType] [int] NULL ,
	[ComplainMode] [int] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FirstReceiver] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateAndTime] [datetime] NULL ,
	[MagnitudeOfExigence] [int] NULL ,
	[Process] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Processor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Result] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[EndTime] [datetime] NULL ,
	[Feedback] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ConfirmTime] [datetime] NULL ,
	[ConfirmCaller] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ConfirmScore] [int] NULL ,
	[ConfirmFeedback] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Status] [int] NULL ,
	[CurrentOwner] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Defendant] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Config] (
	[SiteName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteTitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[InstallDir] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[LogoUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BannerUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[WebmasterName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[WebmasterEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Copyright] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteKey] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ShowSiteChannel] [bit] NOT NULL ,
	[ShowAdminLogin] [bit] NOT NULL ,
	[EnableSaveRemote] [bit] NOT NULL ,
	[EnableLinkReg] [bit] NOT NULL ,
	[EnableCountFriendSiteHits] [bit] NOT NULL ,
	[EnableSoftKey] [bit] NOT NULL ,
	[objName_FSO] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AdminDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ADDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AnnounceCookieTime] [int] NULL ,
	[HitsOfHot] [int] NULL ,
	[FileExt_SiteIndex] [int] NULL ,
	[FileExt_SiteSpecial] [int] NULL ,
	[SiteUrlType] [int] NULL ,
	[LockIPType] [int] NOT NULL ,
	[LockIP] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EnableUserReg] [bit] NOT NULL ,
	[EmailCheckReg] [bit] NOT NULL ,
	[AdminCheckReg] [bit] NOT NULL ,
	[EnableMultiRegPerEmail] [bit] NOT NULL ,
	[UserNameLimit] [int] NULL ,
	[UserNameMax] [int] NULL ,
	[UserName_RegDisabled] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EnableCheckCodeOfLogin] [bit] NOT NULL ,
	[EnableCheckCodeOfReg] [bit] NOT NULL ,
	[EnableQAofReg] [bit] NOT NULL ,
	[QAofReg] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PresentExp] [float] NULL ,
	[PresentMoney] [float] NULL ,
	[PresentPoint] [int] NULL ,
	[PresentValidNum] [int] NULL ,
	[PresentValidUnit] [int] NULL ,
	[MoneyExchangePoint] [float] NULL ,
	[MoneyExchangeValidDay] [float] NULL ,
	[UserExpExchangePoint] [float] NULL ,
	[UserExpExchangeValidDay] [float] NULL ,
	[PresentExpPerLogin] [int] NULL ,
	[PresentExpPerElite] [int] NULL ,
	[PointName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[PointUnit] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfRegCheck] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MailObject] [int] NULL ,
	[MailServer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MailServerUserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MailServerPassWord] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MailDomain] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoObject] [int] NULL ,
	[Thumb_DefaultWidth] [int] NULL ,
	[Thumb_DefaultHeight] [int] NULL ,
	[Thumb_Arithmetic] [int] NULL ,
	[Watermark_Type] [int] NULL ,
	[Watermark_Text] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Watermark_Text_FontName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Watermark_Text_FontSize] [int] NULL ,
	[Watermark_Text_FontColor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Watermark_Text_Bold] [bit] NOT NULL ,
	[Watermark_Images_FileName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Watermark_Images_Transparence] [int] NULL ,
	[Watermark_Images_BackgroundColor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Watermark_Position_X] [int] NULL ,
	[Watermark_Position_Y] [int] NULL ,
	[Watermark_Position] [int] NULL ,
	[SearchInterval] [int] NULL ,
	[SearchResultNum] [int] NULL ,
	[MaxPerPage_SearchResult] [int] NULL ,
	[SearchContent] [bit] NOT NULL ,
	[EnableGuestBuy] [bit] NOT NULL ,
	[IncludeTax] [bit] NOT NULL ,
	[TaxRate] [int] NULL ,
	[PayOnlineProvider] [int] NULL ,
	[PayOnlineShopID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PayOnlineKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PayOnlineRate] [real] NULL ,
	[PayOnlinePlusPoundage] [bit] NOT NULL ,
	[Prefix_OrderFormNum] [nvarchar] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[Prefix_PaymentNum] [nvarchar] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[Country] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Province] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[City] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostCode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfOrderConfirm] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfOrderConfirm] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfSendCard] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfSendCard] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfReceiptMoney] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfReceiptMoney] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfRefund] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfRefund] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfInvoice] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfInvoice] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfDeliver] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EmailOfDeliver] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestBook_EnableVisitor] [bit] NOT NULL ,
	[GuestBookCheck] [bit] NOT NULL ,
	[GuestBook_EnableManageRubbish] [bit] NOT NULL ,
	[GuestBook_ManageRubbish] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestBook_ShowIP] [bit] NOT NULL ,
	[GuestBook_IsAssignSort] [bit] NOT NULL ,
	[GuestBook_MaxPerPage] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EnableRss] [bit] NOT NULL ,
	[RssCodeType] [bit] NOT NULL ,
	[EnableWap] [bit] NOT NULL ,
	[WapLogo] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[EnableWapPl] [bit] NOT NULL ,
	[ShowWapAppendix] [bit] NOT NULL ,
	[ShowWapShop] [bit] NOT NULL ,
	[ShowWapManage] [bit] NOT NULL ,
	[DatabaseVersion] [float] NULL ,
	[Timing_SetDate] [int] NULL ,
	[Timing_SetDay] [int] NULL ,
	[Timing_SetWeekday] [int] NULL ,
	[Timing_Time] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Timing_Date] [datetime] NULL ,
	[Timing_CollectionItemID] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[Timing_AreaCollection] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Timing_Breakpoint] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IsCustom_Content] [bit] NOT NULL ,
	[SMSUserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SMSKey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SurveyKey] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Mobiles] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SendMessageToAdminWhenOrder] [bit] NOT NULL ,
	[SendMessageToMemberWhenPaySuccess] [bit] NOT NULL ,
	[MessageOfOrder] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfAddRemit] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfAddIncome] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfAddPayment] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfExchangePoint] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfAddPoint] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfMinusPoint] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfExchangeValid] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfAddValid] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MessageOfMinusValid] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Thumb_BackgroundColor] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoQuality] [int] NULL ,
	[Meta_Keywords] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Meta_Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Modules] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[RegFields_MustFill] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_ConsumeLog] (
	[LogID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ModuleType] [int] NULL ,
	[InfoID] [int] NULL ,
	[Point] [real] NULL ,
	[LogTime] [datetime] NULL ,
	[Times] [int] NULL ,
	[Income_PayOut] [int] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Contacter] (
	[ContacterID] [int] NOT NULL ,
	[ClientID] [int] NULL ,
	[ParentID] [int] NULL ,
	[UserType] [tinyint] NULL ,
	[TrueName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sex] [smallint] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Company] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Department] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Position] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Operation] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyAddress] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Homepage] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[QQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ICQ] [nvarchar] (25) COLLATE Chinese_PRC_CI_AS NULL ,
	[MSN] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Yahoo] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[UC] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Aim] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[OfficePhone] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[HomePhone] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[PHS] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Mobile] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Country] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Province] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[City] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZipCode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[NativePlace] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Nation] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Birthday] [datetime] NULL ,
	[IDCard] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Marriage] [tinyint] NULL ,
	[Family] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Income] [int] NULL ,
	[Education] [int] NULL ,
	[GraduateFrom] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[InterestsOfLife] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[InterestsOfCulture] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[InterestsOfAmusement] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[InterestsOfSport] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[InterestsOfOther] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CreateTime] [datetime] NULL ,
	[UpdateTime] [datetime] NULL ,
	[arrChannelID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Owner] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_CopyFrom] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [smallint] NULL ,
	[SourceName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Photo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Intro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Tel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Mail] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZipCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HomePage] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[QQ] [int] NULL ,
	[ContacterName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SourceType] [smallint] NULL ,
	[Passed] [bit] NOT NULL ,
	[onTop] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[LastUseTime] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Country] (
	[CountryID] [int] IDENTITY (1, 1) NOT NULL ,
	[Country] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_DeliverCharge] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DeliverTypeID] [int] NULL ,
	[AreaType] [int] NULL ,
	[arrArea] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Charge_Min] [money] NULL ,
	[Weight_Min] [float] NULL ,
	[ChargePerUnit] [money] NULL ,
	[WeightPerUnit] [float] NULL ,
	[Charge_Max] [money] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_DeliverItem] (
	[DeliverID] [int] IDENTITY (1, 1) NOT NULL ,
	[OrderFormID] [int] NULL ,
	[DeliverDate] [datetime] NULL ,
	[DeliverDirection] [int] NULL ,
	[HandlerName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ExpressCompany] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ExpressNumber] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Received] [bit] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_DeliverType] (
	[TypeID] [int] NOT NULL ,
	[TypeName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Intro] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeType] [int] NULL ,
	[IsDefault] [bit] NOT NULL ,
	[IsDisabled] [bit] NOT NULL ,
	[OrderID] [int] NULL ,
	[ReleaseType] [int] NULL ,
	[MinMoney1] [money] NULL ,
	[ReleaseCharge] [money] NULL ,
	[MinMoney2] [money] NULL ,
	[MaxCharge] [money] NULL ,
	[MinMoney3] [money] NULL ,
	[Charge_Min] [money] NULL ,
	[Charge_Max] [money] NULL ,
	[Charge_Percent] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Dictionary] (
	[FieldID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TableName] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[FieldName] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[FieldValue] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_DownError] (
	[ErrorID] [int] NOT NULL ,
	[ChannelID] [int] NULL ,
	[InfoID] [int] NULL ,
	[UrlID] [int] NULL ,
	[ErrorTimes] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_DownServer] (
	[ServerID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NULL ,
	[ServerName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServerUrl] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServerLogo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NULL ,
	[ShowType] [int] NULL ,
	[InfoPoint] [int] NULL ,
	[InfoPurview] [int] NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeType] [int] NULL ,
	[PitchTime] [int] NULL ,
	[ReadTimes] [int] NULL ,
	[DividePercent] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Equipment] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClassroomID] [int] NULL ,
	[EquipmentName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[EquipmentIntroduce] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[EquipmentSituation] [int] NULL ,
	[EquipmentValue] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Explain] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Favorite] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[InfoID] [int] NULL ,
	[DateAndTime] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Field] (
	[FieldID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NULL ,
	[FieldName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LabelName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Tips] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[FieldType] [int] NULL ,
	[DefaultValue] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Options] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[EnableNull] [bit] NOT NULL ,
	[ShowOnForm] [bit] NOT NULL ,
	[FieldLevel] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Filters] (
	[FilterID] [int] IDENTITY (1, 1) NOT NULL ,
	[ItemID] [int] NULL ,
	[FilterName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FilterObject] [int] NULL ,
	[FilterType] [int] NULL ,
	[FilterContent] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FisString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FioString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FilterRep] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Flag] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Friend] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[FriendName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL ,
	[GroupID] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_FriendSite] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[KindID] [int] NULL ,
	[SpecialID] [int] NULL ,
	[LinkType] [int] NULL ,
	[SiteName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LogoUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteAdmin] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SitePassword] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Stars] [int] NULL ,
	[Hits] [int] NULL ,
	[UpdateTime] [datetime] NULL ,
	[Elite] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[OrderID] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_FsKind] (
	[KindID] [int] NOT NULL ,
	[KindName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ReadMe] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[KindType] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_GuestBook] (
	[GuestID] [int] NOT NULL ,
	[KindID] [int] NULL ,
	[TopicID] [int] NULL ,
	[GuestMaxID] [int] NULL ,
	[GuestType] [int] NULL ,
	[GuestName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestSex] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestOicq] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestMsn] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestIcq] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestEmail] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestHomepage] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestImages] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestFace] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestTitle] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestDatetime] [datetime] NULL ,
	[Hits] [int] NULL ,
	[ReplyNum] [int] NULL ,
	[LastReplyContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LastReplyGuest] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastReplyTime] [datetime] NULL ,
	[LastReplyTitle] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestReply] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestReplyAdmin] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GuestReplyDatetime] [datetime] NULL ,
	[Quintessence] [int] NULL ,
	[GuestIsPassed] [bit] NOT NULL ,
	[GuestIsPrivate] [bit] NOT NULL ,
	[OnTop] [int] NULL ,
	[ReplyIsPrivate] [bit] NOT NULL ,
	[GuestContentLength] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_GuestKind] (
	[KindID] [int] NOT NULL ,
	[KindName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ReadMe] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HistrolyNews] (
	[HistrolyNewsID] [int] IDENTITY (1, 1) NOT NULL ,
	[ItemID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[ClassID] [int] NULL ,
	[ArticleID] [int] NULL ,
	[Title] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewsCollecDate] [datetime] NULL ,
	[NewsUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Result] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseArea] (
	[AreaID] [int] NOT NULL ,
	[AreaName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Province] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseCS] (
	[HouseID] [int] NOT NULL ,
	[ClassID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[HouseSource] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQuyu] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDiZhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXiangXiDiZhi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseMianJi] [real] NOT NULL ,
	[HouseChanQuan] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJianCheng] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLouCeng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseChaoXiang] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLeiXing] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiChu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhuangXiu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShuiDian] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDianQi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiaJu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseGongJiaoLu] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseGongJiaoZhan] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShiZheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiaoFangStartDate] [datetime] NULL ,
	[TotalPrice] [real] NULL ,
	[OtherPrice] [real] NULL ,
	[HouseZhiFu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HousePriceType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ShuiFei] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactPhone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactQQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[YouXiaoQi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQiTa] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpdateTime] [datetime] NULL ,
	[Hits] [int] NULL ,
	[ViewAll] [bit] NOT NULL ,
	[Hot] [bit] NOT NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[Deleted] [bit] NOT NULL ,
	[CommendClassDays] [int] NULL ,
	[UploadPhotos] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseCZ] (
	[HouseID] [int] NOT NULL ,
	[ClassID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[HouseSource] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQuyu] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDiZhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXiangXiDiZhi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseMianJi] [real] NOT NULL ,
	[HouseLouCeng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLeiXing] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiChu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhuangXiu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseWeiSheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDianQi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiaJu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXinXi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseGongJiaoLu] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseGongJiaoZhan] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShiZheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZuLinStartDate] [datetime] NULL ,
	[ZuLinEndDate] [datetime] NULL ,
	[HouseZuJin] [real] NULL ,
	[HouseZuJinType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhiFu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactPhone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactQQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[YouXiaoQi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQiTa] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpdateTime] [datetime] NULL ,
	[Hits] [int] NULL ,
	[ViewAll] [bit] NOT NULL ,
	[Hot] [bit] NOT NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[Deleted] [bit] NOT NULL ,
	[CommendClassDays] [int] NULL ,
	[UploadPhotos] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseConfig] (
	[ClassID] [int] NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[ClassName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[OpenType] [int] NOT NULL ,
	[ClassDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SkinID] [int] NULL ,
	[TemplateID] [int] NULL ,
	[ShowOnTop] [bit] NOT NULL ,
	[MaxPerPage] [int] NULL ,
	[ReleaseDeductPoint] [int] NULL ,
	[CommendClassPoint] [float] NULL ,
	[DefaultItemTemplate] [int] NULL ,
	[DefaultItemSkin] [int] NULL ,
	[ItemOpenType] [int] NULL ,
	[ItemCount] [int] NULL ,
	[UpgradePoint] [int] NULL ,
	[Meta_Keywords] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Meta_Description] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseHZ] (
	[HouseID] [int] NOT NULL ,
	[ClassID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[HouseSource] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HeZhuType] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQuyu] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDiZhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXiangXiDiZhi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLeiXing] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLouCeng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing1] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing2] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseMianJi] [real] NOT NULL ,
	[HouseMianJi1] [real] NOT NULL ,
	[HouseMianJi2] [real] NOT NULL ,
	[HouseJianJie] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShiYou] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiChu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhuangXiu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseWeiSheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDianQi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiaJu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXinXi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseGongJiaoLu] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseGongJiaoZhan] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShiZheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZuLinStartDate] [datetime] NULL ,
	[ZuLinEndDate] [datetime] NULL ,
	[HouseZuJin] [real] NULL ,
	[HouseZuJinType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhiFu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactPhone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactQQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[YouXiaoQi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQiTa] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpdateTime] [datetime] NULL ,
	[ViewAll] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[Hot] [bit] NOT NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[Deleted] [bit] NOT NULL ,
	[CommendClassDays] [int] NULL ,
	[UploadPhotos] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseQG] (
	[HouseID] [int] NOT NULL ,
	[ClassID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[HouseSource] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQuyu] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDiZhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJianCheng1] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJianCheng2] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLeiXing] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXingZhi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseMianJi1] [real] NOT NULL ,
	[HouseMianJi2] [real] NOT NULL ,
	[HouseLouCeng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseChaoXiang] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[HousePriceType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[HousePrice1] [real] NULL ,
	[HousePrice2] [real] NULL ,
	[HouseZhiFu] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiChu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhuangXiu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShiZheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[JiaoFangStartDate] [datetime] NULL ,
	[ContactName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactPhone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactQQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[YouXiaoQi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQiTa] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpdateTime] [datetime] NULL ,
	[ViewAll] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[Hot] [bit] NOT NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[Deleted] [bit] NOT NULL ,
	[CommendClassDays] [int] NULL ,
	[UploadPhotos] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_HouseQZ] (
	[HouseID] [int] NOT NULL ,
	[ClassID] [int] NULL ,
	[ChannelID] [int] NULL ,
	[HouseSource] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQuyu] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDiZhi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseHuXing] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseMianJi1] [real] NOT NULL ,
	[HouseMianJi2] [real] NOT NULL ,
	[HouseZuJin1] [real] NULL ,
	[HouseZuJin2] [real] NULL ,
	[HouseZuJinType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhiFu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLouCeng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseLeiXing] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiChu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseZhuangXiu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseWeiSheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseDianQi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseJiaJu] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseXinXi] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseShiZheng] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZuLinStartDate] [datetime] NULL ,
	[ZuLinEndDate] [datetime] NULL ,
	[ContactName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactPhone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ContactEmail] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ContactQQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[YouXiaoQi] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[HouseQiTa] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UpdateTime] [datetime] NULL ,
	[ViewAll] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[Hot] [bit] NOT NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[Deleted] [bit] NOT NULL ,
	[CommendClassDays] [int] NULL ,
	[UploadPhotos] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_InfoS] (
	[InfoID] [int] IDENTITY (1, 1) NOT NULL ,
	[ItemID] [int] NULL ,
	[SpecialID] [int] NULL ,
	[ModuleType] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_InvoiceItem] (
	[InvoiceID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClientID] [int] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderFormID] [int] NULL ,
	[InvoiceType] [int] NULL ,
	[InvoiceNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[InvoiceTitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[InvoiceContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[InvoiceDate] [datetime] NULL ,
	[TotalMoney] [money] NULL ,
	[Drawer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[InputTime] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Item] (
	[ItemID] [int] IDENTITY (1, 1) NOT NULL ,
	[ItemName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChannelID] [int] NULL ,
	[ClassID] [int] NULL ,
	[SpecialID] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[WebName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[WebUrl] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginType] [int] NULL ,
	[LoginUrl] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginPostUrl] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginUser] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginPass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginFalse] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemDoem] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ListStr] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[LsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ListPaingType] [int] NULL ,
	[LPsString] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[LPoString] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ListPaingStr1] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ListPaingStr2] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ListPaingID1] [int] NULL ,
	[ListPaingID2] [int] NULL ,
	[ListPaingStr3] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[HsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[HoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[HttpUrlType] [int] NULL ,
	[HttpUrlStr] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ThumbnailType] [int] NULL ,
	[ThsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ThoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[TsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ToString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AuthorType] [int] NULL ,
	[AuthorStr] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[AsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CopyFromType] [int] NULL ,
	[FsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CopyFromStr] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[KeyType] [int] NULL ,
	[KsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[KoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[KeyStr] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[KeyScatterNum] [int] NULL ,
	[NewsPaingType] [int] NULL ,
	[NpsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[NpoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[NewsPaingStr1] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewsPaingStr2] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Flag] [bit] NOT NULL ,
	[PaginationType] [int] NULL ,
	[MaxCharPerPage] [int] NULL ,
	[InfoPoint] [int] NULL ,
	[OnTop] [bit] NOT NULL ,
	[Hot] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Hits] [int] NOT NULL ,
	[Stars] [int] NULL ,
	[UpdateTime] [datetime] NOT NULL ,
	[SkinID] [int] NULL ,
	[TemplateID] [int] NULL ,
	[Script_IFRAME] [bit] NOT NULL ,
	[Script_OBJECT] [bit] NOT NULL ,
	[Script_SCRIPT] [bit] NOT NULL ,
	[Script_Div] [bit] NOT NULL ,
	[Script_CLASS] [bit] NOT NULL ,
	[Script_Span] [bit] NOT NULL ,
	[Script_IMG] [bit] NOT NULL ,
	[Script_FONT] [bit] NOT NULL ,
	[Script_A] [bit] NOT NULL ,
	[Script_HTML] [bit] NOT NULL ,
	[SaveFiles] [bit] NOT NULL ,
	[AddThumb] [bit] NOT NULL ,
	[AddWatermark] [bit] NOT NULL ,
	[CollecOrder] [int] NULL ,
	[Status] [int] NULL ,
	[CreateImmediate] [bit] NOT NULL ,
	[IncludePicYn] [bit] NOT NULL ,
	[DefaultPicYn] [bit] NOT NULL ,
	[NewsCollecDate] [datetime] NULL ,
	[CollectionNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CollectionType] [int] NULL ,
	[UpDateType] [int] NULL ,
	[DateType] [int] NULL ,
	[DsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[DoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ShowCommentLink] [bit] NOT NULL ,
	[Script_Table] [bit] NOT NULL ,
	[Script_Tr] [bit] NOT NULL ,
	[Script_Td] [bit] NOT NULL ,
	[PsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PhsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PhoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IntroType] [int] NULL ,
	[IsString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IoString] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IntroStr] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IntroNum] [int] NULL ,
	[IsField] [int] NULL ,
	[Field] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[InfoPurview] [int] NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeType] [int] NULL ,
	[PitchTime] [int] NULL ,
	[ReadTimes] [int] NULL ,
	[DividePercent] [int] NULL ,
	[SaveFlashUrlToFile] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_JobCategory] (
	[JobCategoryID] [int] NOT NULL ,
	[JobCategoryName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_JsFile] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NULL ,
	[JsName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[JsReadme] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[JsType] [int] NULL ,
	[ContentType] [int] NULL ,
	[JsFileName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Config] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_KeyLink] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [smallint] NULL ,
	[Source] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReplaceText] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[isUse] [tinyint] NULL ,
	[LinkType] [tinyint] NULL ,
	[OpenType] [tinyint] NULL ,
	[ReplaceType] [smallint] NULL ,
	[Priority] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Label] (
	[LabelID] [int] IDENTITY (1, 1) NOT NULL ,
	[LabelName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LabelClass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LabelType] [smallint] NULL ,
	[PageNum] [int] NULL ,
	[reFlashTime] [smallint] NULL ,
	[fieldlist] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LabelIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Priority] [int] NULL ,
	[LabelContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AreaCollectionID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Log] (
	[LogID] [int] IDENTITY (1, 1) NOT NULL ,
	[LogType] [int] NULL ,
	[ChannelID] [int] NULL ,
	[LogTime] [datetime] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserIP] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[LogContent] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ScriptName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostString] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_MailChannel] (
	[ChannelID] [int] NOT NULL ,
	[UserID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SendNum] [int] NOT NULL ,
	[IsUse] [bit] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Message] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sender] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[incept] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[flag] [int] NULL ,
	[sendtime] [datetime] NULL ,
	[delR] [int] NOT NULL ,
	[delS] [int] NOT NULL ,
	[isSend] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_NewKeys] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [smallint] NULL ,
	[KeyText] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Hits] [int] NULL ,
	[LastUseTime] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_ObjectID] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NULL ,
	[ObjectName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Html_Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_OrderForm] (
	[OrderFormID] [int] NOT NULL ,
	[OrderFormNum] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AgentName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClientID] [int] NULL ,
	[MoneyTotal] [money] NULL ,
	[MoneyGoods] [money] NULL ,
	[NeedInvoice] [bit] NOT NULL ,
	[InvoiceContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Invoiced] [bit] NOT NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MoneyReceipt] [money] NULL ,
	[BeginDate] [datetime] NULL ,
	[InputTime] [datetime] NULL ,
	[ContacterName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZipCode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Phone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PaymentType] [int] NULL ,
	[DeliverType] [int] NULL ,
	[Status] [int] NULL ,
	[DeliverStatus] [int] NULL ,
	[EnableDownload] [bit] NOT NULL ,
	[PresentMoney] [money] NULL ,
	[PresentPoint] [int] NULL ,
	[PresentExp] [int] NULL ,
	[Discount_Payment] [float] NULL ,
	[Charge_Deliver] [money] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_OrderFormItem] (
	[ItemID] [int] NOT NULL ,
	[OrderFormID] [int] NULL ,
	[ProductID] [int] NULL ,
	[SaleType] [int] NULL ,
	[Price_Original] [money] NULL ,
	[Price] [money] NULL ,
	[TruePrice] [money] NULL ,
	[Amount] [int] NULL ,
	[SubTotal] [money] NULL ,
	[BeginDate] [datetime] NULL ,
	[ServiceTerm] [int] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[PresentMoney] [money] NULL ,
	[PresentPoint] [int] NULL ,
	[PresentExp] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Page] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClassName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PageName] [nvarchar] (160) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[PageIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[PageUrl] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[PageFileName] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[PageType] [smallint] NULL ,
	[PageContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_PageClass] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClassName] [nvarchar] (160) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ClassIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ClassType] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_PayPlatform] (
	[PlatformID] [int] NOT NULL ,
	[PlatformName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ShowName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AccountsID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MD5Key] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Rate] [float] NULL ,
	[PlusPoundage] [bit] NOT NULL ,
	[OrderID] [int] NULL ,
	[IsDisabled] [bit] NOT NULL ,
	[IsDefault] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Payment] (
	[PaymentID] [int] NOT NULL ,
	[UserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderFormID] [int] NULL ,
	[PaymentNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[eBankID] [int] NULL ,
	[MoneyPay] [money] NULL ,
	[MoneyTrue] [money] NULL ,
	[PayTime] [datetime] NULL ,
	[Status] [int] NULL ,
	[eBankInfo] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_PaymentType] (
	[TypeID] [int] NOT NULL ,
	[TypeName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Intro] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Discount] [float] NULL ,
	[IsDefault] [bit] NOT NULL ,
	[OrderID] [int] NULL ,
	[IsDisabled] [bit] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Photo] (
	[PhotoID] [int] NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[ClassID] [int] NOT NULL ,
	[PhotoName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Author] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[CopyFrom] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Hits] [int] NULL ,
	[DayHits] [int] NULL ,
	[WeekHits] [int] NULL ,
	[MonthHits] [int] NULL ,
	[CommentCount] [int] NULL ,
	[UpdateTime] [datetime] NULL ,
	[CreateTime] [datetime] NULL ,
	[PhotoThumb] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoSize] [int] NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Status] [int] NOT NULL ,
	[PhotoIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[InfoPoint] [int] NULL ,
	[Deleted] [bit] NOT NULL ,
	[Stars] [int] NULL ,
	[LastHitTime] [datetime] NULL ,
	[TemplateID] [int] NULL ,
	[SkinID] [int] NULL ,
	[VoteID] [int] NULL ,
	[PresentExp] [float] NULL ,
	[InfoPurview] [int] NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeType] [int] NULL ,
	[PitchTime] [int] NULL ,
	[ReadTimes] [int] NULL ,
	[DividePercent] [int] NULL ,
	[BlogID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Position] (
	[PositionID] [int] NOT NULL ,
	[JobCategoryID] [int] NULL ,
	[SubCompanyID] [int] NULL ,
	[WorkPlaceID] [int] NULL ,
	[ReleaseDate] [datetime] NULL ,
	[PositionName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PositionNum] [int] NULL ,
	[ValidDate] [int] NULL ,
	[PositionKeyword] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PositionDescription] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[DutyRequest] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PositionStatus] [int] NULL ,
	[SubCompanyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Urgent] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_PositionSupplyInfo] (
	[PositionSupplyInfoID] [int] NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PositionID] [int] NULL ,
	[SubCompanyID] [int] NULL ,
	[WorkPlaceID] [int] NULL ,
	[CheckStatus] [int] NULL ,
	[CheckDate] [datetime] NULL ,
	[SupplyDate] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_PresentProject] (
	[ProjectID] [int] IDENTITY (1, 1) NOT NULL ,
	[ProjectName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BeginDate] [datetime] NULL ,
	[EndDate] [datetime] NULL ,
	[MinMoney] [money] NULL ,
	[MaxMoney] [money] NULL ,
	[PresentContent] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [money] NULL ,
	[PresentID] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Cash] [money] NULL ,
	[PresentExp] [int] NULL ,
	[PresentPoint] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Producer] (
	[ProducerID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NULL ,
	[ProducerName] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProducerShortName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProducerPhoto] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BirthDay] [datetime] NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Postcode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Phone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Homepage] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProducerIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LastUseTime] [datetime] NULL ,
	[Passed] [bit] NOT NULL ,
	[onTop] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[ProducerType] [smallint] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Product] (
	[ProductID] [int] NOT NULL ,
	[ChannelID] [int] NULL ,
	[ProductNum] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[BarCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClassID] [int] NULL ,
	[ProductKind] [int] NULL ,
	[ProductName] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductModel] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductStandard] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProducerName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[TrademarkName] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductExplain] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductThumb] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[UploadFiles] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductType] [int] NULL ,
	[Price] [money] NULL ,
	[Price_Original] [money] NULL ,
	[Price_Market] [money] NULL ,
	[Price_Member] [money] NULL ,
	[Price_Agent] [money] NULL ,
	[EnableWholesale] [bit] NOT NULL ,
	[Price_Wholesale1] [money] NULL ,
	[Number_Wholesale1] [int] NULL ,
	[Price_Wholesale2] [money] NULL ,
	[Number_Wholesale2] [int] NULL ,
	[Price_Wholesale3] [money] NULL ,
	[Number_Wholesale3] [int] NULL ,
	[Unit] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[OnTop] [bit] NOT NULL ,
	[IsHot] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[Stars] [int] NULL ,
	[Stocks] [float] NULL ,
	[OrderNum] [real] NULL ,
	[AlarmNum] [int] NULL ,
	[EnableSale] [bit] NOT NULL ,
	[Discount] [float] NULL ,
	[BeginDate] [datetime] NULL ,
	[EndDate] [datetime] NULL ,
	[LimitNum] [float] NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CommentCount] [int] NULL ,
	[UpdateTime] [datetime] NULL ,
	[CreateTime] [datetime] NULL ,
	[DownloadUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServiceTerm] [int] NULL ,
	[Hits] [int] NULL ,
	[BuyTimes] [int] NULL ,
	[Deleted] [bit] NOT NULL ,
	[Inputer] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[TemplateID] [int] NULL ,
	[SkinID] [int] NULL ,
	[VoteID] [int] NULL ,
	[SalePromotionType] [int] NULL ,
	[MinNumber] [int] NULL ,
	[PresentNumber] [int] NULL ,
	[PresentID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PresentMoney] [money] NULL ,
	[PresentPoint] [int] NULL ,
	[PresentExp] [int] NULL ,
	[Weight] [float] NULL ,
	[EnableSingleSell] [bit] NOT NULL ,
	[DependentProducts] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Province] (
	[ProvinceID] [int] IDENTITY (1, 1) NOT NULL ,
	[Province] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Country] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_RechargeLog] (
	[LogID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ValidNum] [int] NULL ,
	[ValidUnit] [int] NULL ,
	[Income_Payout] [int] NULL ,
	[LogTime] [datetime] NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IP] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Resume] (
	[ResumeID] [int] NOT NULL ,
	[IntervieweeName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Nationality] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PoliticalFeature] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Age] [int] NULL ,
	[Height] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Weight] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sex] [int] NULL ,
	[Photo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Marital] [int] NULL ,
	[Health] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BirthPlace] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CurrentAddress] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[QQ] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Telephone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MobilePhone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[E_mail] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GraduateSchool] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Education] [int] NULL ,
	[Profession] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AvailableDate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[WorkExperience] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ProfessionalAbility] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ForeignLanguageKind] [int] NULL ,
	[ForeignLanguageLeval] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MotherLanguageLeval] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OtherLanguageLeval] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_ServiceItem] (
	[ItemID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClientID] [int] NULL ,
	[ContacterID] [int] NULL ,
	[OrderFormID] [int] NULL ,
	[ServiceTime] [datetime] NULL ,
	[ServiceType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServiceMode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServiceTitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ServiceContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ServiceResult] [int] NULL ,
	[TakeTime] [int] NULL ,
	[Processor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Feedback] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ConfirmTime] [datetime] NULL ,
	[ConfirmCaller] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ConfirmScore] [int] NULL ,
	[ConfirmFeedback] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_ShoppingCarts] (
	[CartItemID] [int] IDENTITY (1, 1) NOT NULL ,
	[CartID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductID] [int] NULL ,
	[Quantity] [int] NULL ,
	[PresentID] [int] NULL ,
	[UpdateTime] [datetime] NULL ,
	[UserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Skin] (
	[SkinID] [int] IDENTITY (1, 1) NOT NULL ,
	[SkinName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[IsDefault] [bit] NOT NULL ,
	[Skin_CSS] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[IsDefaultInProject] [bit] NOT NULL ,
	[ProjectName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Soft] (
	[SoftID] [int] NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[ClassID] [int] NOT NULL ,
	[SoftName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[SoftVersion] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Author] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[CopyFrom] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[DemoUrl] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[Inputer] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Editor] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Keyword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Hits] [int] NULL ,
	[DayHits] [int] NULL ,
	[WeekHits] [int] NULL ,
	[MonthHits] [int] NULL ,
	[CommentCount] [int] NULL ,
	[UpdateTime] [datetime] NULL ,
	[CreateTime] [datetime] NULL ,
	[OperatingSystem] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SoftType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SoftLanguage] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CopyrightType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SoftSize] [int] NULL ,
	[RegUrl] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[OnTop] [bit] NOT NULL ,
	[Elite] [bit] NOT NULL ,
	[Status] [int] NOT NULL ,
	[SoftIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SoftPicUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[DownloadUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[InfoPoint] [int] NULL ,
	[Deleted] [bit] NOT NULL ,
	[Stars] [int] NULL ,
	[DecompressPassword] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastHitTime] [datetime] NULL ,
	[TemplateID] [int] NULL ,
	[SkinID] [int] NULL ,
	[ErrorTimes] [int] NULL ,
	[VoteID] [int] NULL ,
	[PresentExp] [float] NULL ,
	[BrowseTimes] [int] NULL ,
	[InfoPurview] [int] NULL ,
	[arrGroupID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeType] [int] NULL ,
	[PitchTime] [int] NULL ,
	[ReadTimes] [int] NULL ,
	[DividePercent] [int] NULL ,
	[BlogID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Space] (
	[ID] [int] NOT NULL ,
	[UserID] [int] NULL ,
	[ClassID] [int] NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[BirthDay] [datetime] NULL ,
	[Photo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Intro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Tel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Company] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Department] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ZipCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[HomePage] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[QQ] [int] NULL ,
	[Type] [smallint] NULL ,
	[LastUseTime] [datetime] NULL ,
	[onTop] [bit] NOT NULL ,
	[Passed] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[Hits] [int] NULL ,
	[OrderID] [int] NULL ,
	[LinkUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[listnum] [smallint] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceBook] (
	[ID] [int] NOT NULL ,
	[UserID] [int] NOT NULL ,
	[BlogID] [int] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL ,
	[Hits] [int] NULL ,
	[PlNum] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceComment] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BlogID] [int] NULL ,
	[ItemID] [int] NULL ,
	[Type] [smallint] NULL ,
	[Uname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceDiary] (
	[ID] [int] NOT NULL ,
	[UserID] [int] NOT NULL ,
	[BlogID] [int] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL ,
	[Hits] [int] NULL ,
	[PlNum] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceKind] (
	[KindID] [int] NOT NULL ,
	[KindName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ReadMe] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceLink] (
	[ID] [int] NOT NULL ,
	[UserID] [int] NOT NULL ,
	[BlogID] [int] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL ,
	[Hits] [int] NULL ,
	[PlNum] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceMusic] (
	[ID] [int] NOT NULL ,
	[UserID] [int] NOT NULL ,
	[BlogID] [int] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL ,
	[Hits] [int] NULL ,
	[PlNum] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpacePhoto] (
	[ID] [int] NOT NULL ,
	[UserID] [int] NOT NULL ,
	[BlogID] [int] NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL ,
	[Hits] [int] NULL ,
	[PlNum] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SpaceVisitor] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BlogID] [int] NULL ,
	[UserID] [int] NOT NULL ,
	[UserName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Datetime] [datetime] NOT NULL ,
	[num] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Special] (
	[SpecialID] [int] NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[SpecialName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[OpenType] [int] NOT NULL ,
	[SpecialPicUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NOT NULL ,
	[Tips] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReadMe] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SkinID] [int] NOT NULL ,
	[TemplateID] [int] NOT NULL ,
	[SpecialDir] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[MaxPerPage] [int] NULL ,
	[IsElite] [bit] NOT NULL ,
	[Custom_Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SubCompany] (
	[SubCompanyID] [int] NOT NULL ,
	[SubCompanyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Contacter] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Telephone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[E_mail] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Supply] (
	[SupplyId] [int] NOT NULL ,
	[ChannelId] [int] NOT NULL ,
	[ClassId] [int] NOT NULL ,
	[SpecialId] [int] NULL ,
	[SupplyName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplyType] [int] NULL ,
	[SupplyTitle] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[SupplyIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplyPeriod] [int] NULL ,
	[TradeType] [int] NULL ,
	[PriceIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupplyPicUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[TemplateId] [int] NULL ,
	[SkinId] [int] NULL ,
	[Status] [int] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Hits] [int] NULL ,
	[UpdateTime] [datetime] NULL ,
	[Deleted] [bit] NOT NULL ,
	[CommandType] [int] NULL ,
	[CommandChannelDays] [int] NULL ,
	[CommandClassDays] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Supply_Company] (
	[ClassID] [int] NOT NULL ,
	[CompanyID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Survey] (
	[SurveyID] [int] IDENTITY (1, 1) NOT NULL ,
	[SurveyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FileName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IPRepeat] [int] NULL ,
	[CreateDate] [datetime] NULL ,
	[EndTime] [datetime] NULL ,
	[IsOpen] [int] NULL ,
	[NeedLogin] [int] NULL ,
	[PresentPoint] [int] NULL ,
	[LockIPType] [int] NULL ,
	[SetIPLock] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LockUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SetPassword] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TemplateID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SurveyAnswer] (
	[AnswerID] [int] IDENTITY (1, 1) NOT NULL ,
	[QuestionID] [int] NULL ,
	[AnswerContent] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[VoteAmount] [int] NULL ,
	[OrderID] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SurveyInput] (
	[QuestionID] [int] NOT NULL ,
	[InputContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SurveyID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_SurveyQuestion] (
	[QuestionID] [int] IDENTITY (1, 1) NOT NULL ,
	[SurveyID] [int] NULL ,
	[QuestionContent] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[QuestionType] [tinyint] NULL ,
	[InputType] [tinyint] NULL ,
	[NotEmpty] [int] NULL ,
	[DataRight] [int] NULL ,
	[OrderID] [int] NULL ,
	[ContentLength] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Template] (
	[TemplateID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NOT NULL ,
	[TemplateName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[TemplateType] [int] NOT NULL ,
	[TemplateContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDefault] [bit] NOT NULL ,
	[ProjectName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDefaultInProject] [bit] NOT NULL ,
	[Deleted] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_TemplateProject] (
	[TemplateProjectID] [int] NOT NULL ,
	[TemplateProjectName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Intro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IsDefault] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Trademark] (
	[TrademarkID] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelID] [int] NULL ,
	[ProducerID] [int] NULL ,
	[TrademarkName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[TrademarkPhoto] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[TrademarkIntro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[TrademarkType] [tinyint] NULL ,
	[Passed] [bit] NOT NULL ,
	[onTop] [bit] NOT NULL ,
	[IsElite] [bit] NOT NULL ,
	[Hits] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_TransferItem] (
	[ItemID] [int] IDENTITY (1, 1) NOT NULL ,
	[OrderFormID] [int] NULL ,
	[OwnerUserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[TargetUserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Poundage] [money] NULL ,
	[PayerUserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateAndTime] [datetime] NULL ,
	[Inputer] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_UsedDetail] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[EquipmentID] [int] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserType] [int] NULL ,
	[UserYear] [int] NULL ,
	[UserClass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LessonInfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LessonNumber] [int] NULL ,
	[LessonYear] [int] NULL ,
	[LessonMonth] [int] NULL ,
	[LessonDay] [int] NULL ,
	[RegisterTime] [datetime] NULL ,
	[RegisterIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Used] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_User] (
	[UserID] [int] NOT NULL ,
	[GroupID] [int] NULL ,
	[ClientID] [int] NULL ,
	[ContacterID] [int] NULL ,
	[CompanyID] [int] NULL ,
	[UserType] [int] NULL ,
	[UserName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserPassword] [nvarchar] (16) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPassword] [nvarchar] (16) COLLATE Chinese_PRC_CI_AS NULL ,
	[Question] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserFace] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[FaceWidth] [smallint] NULL ,
	[FaceHeight] [smallint] NULL ,
	[Sign] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[RegTime] [datetime] NULL ,
	[JoinTime] [datetime] NULL ,
	[LastLoginTime] [datetime] NULL ,
	[LastPresentTime] [datetime] NULL ,
	[LastLoginIP] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[LoginTimes] [smallint] NULL ,
	[Balance] [money] NULL ,
	[UserPoint] [int] NULL ,
	[UserExp] [int] NULL ,
	[ConsumePoint] [int] NULL ,
	[PostItems] [int] NULL ,
	[PassedItems] [int] NULL ,
	[DelItems] [int] NULL ,
	[UnsignedItems] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[UnreadMsg] [smallint] NULL ,
	[BeginTime] [datetime] NULL ,
	[ValidNum] [smallint] NULL ,
	[ValidUnit] [tinyint] NULL ,
	[IsLocked] [bit] NOT NULL ,
	[SpecialPermission] [bit] NOT NULL ,
	[arrClass_Browse] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_View] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_Input] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Privacy] [tinyint] NULL ,
	[UserFriendGroup] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CheckNum] [int] NULL ,
	[Blog] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_UserGroup] (
	[GroupID] [int] NOT NULL ,
	[GroupName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[GroupIntro] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupType] [tinyint] NULL ,
	[arrClass_Browse] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_View] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[arrClass_Input] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_Vote] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Select1] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer1] [int] NULL ,
	[Select2] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer2] [int] NULL ,
	[Select3] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer3] [int] NULL ,
	[Select4] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer4] [int] NULL ,
	[Select5] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer5] [int] NULL ,
	[Select6] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer6] [int] NULL ,
	[Select7] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer7] [int] NULL ,
	[Select8] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer8] [int] NULL ,
	[VoteTime] [datetime] NULL ,
	[EndTime] [datetime] NULL ,
	[VoteType] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSelected] [bit] NOT NULL ,
	[ChannelID] [int] NULL ,
	[IsItem] [bit] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[PE_WorkPlace] (
	[WorkPlaceID] [int] NOT NULL ,
	[WorkPlaceName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[OrderID] [int] NULL 
) ON [PRIMARY]
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

/*--调用示例

exec p_lockinfo
--*/
create proc p_lockinfo
@kill_lock_spid bit=1,  --是否杀掉死锁的进程,1 杀掉, 0 仅显示
@show_spid_if_nolock bit=1 --如果没有死锁的进程,是否显示正常进程信息,1 显示,0 不显示
as
declare @count int,@s nvarchar(1000),@i int
select id=identity(int,1,1),标志,
进程ID=spid,线程ID=kpid,块进程ID=blocked,数据库ID=dbid,
数据库名=db_name(dbid),用户ID=uid,用户名=loginame,累计CPU时间=cpu,
登陆时间=login_time,打开事务数=open_tran, 进程状态=status,
工作站名=hostname,应用程序名=program_name,工作站进程ID=hostprocess,
域名=nt_domain,网卡地址=net_address
into #t from(
select 标志='死锁的进程',
 spid,kpid,a.blocked,dbid,uid,loginame,cpu,login_time,open_tran,
 status,hostname,program_name,hostprocess,nt_domain,net_address,
 s1=a.spid,s2=0
from master..sysprocesses a join (
 select blocked from master..sysprocesses group by blocked
 )b on a.spid=b.blocked where a.blocked=0
union all
select '|_牺牲品_>',
 spid,kpid,blocked,dbid,uid,loginame,cpu,login_time,open_tran,
 status,hostname,program_name,hostprocess,nt_domain,net_address,
 s1=blocked,s2=1
from master..sysprocesses a where blocked<>0
)a order by s1,s2

select @count=@@rowcount,@i=1

if @count=0 and @show_spid_if_nolock=1
begin
insert #t
select 标志='正常的进程',
 spid,kpid,blocked,dbid,db_name(dbid),uid,loginame,cpu,login_time,
 open_tran,status,hostname,program_name,hostprocess,nt_domain,net_address
from master..sysprocesses
set @count=@@rowcount
end

if @count>0
begin
create table #t1(id int identity(1,1),a nvarchar(30),b Int,EventInfo nvarchar(255))
if @kill_lock_spid=1
begin
 declare @spid varchar(10),@标志 varchar(10)
 while @i<=@count
 begin
  select @spid=进程ID,@标志=标志 from #t where id=@i
  insert #t1 exec('dbcc inputbuffer('+@spid+')')
  if @标志='死锁的进程' exec('kill '+@spid)
  set @i=@i+1
 end
end
else
 while @i<=@count
 begin
  select @s='dbcc inputbuffer('+cast(进程ID as varchar)+')' from #t where id=@i
  insert #t1 exec(@s)
  set @i=@i+1
 end
select a.*,进程的SQL语句=b.EventInfo
from #t a join #t1 b on a.id=b.id
end

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

