SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp](
	[id] [int] NOT NULL,
	[LpTypeId] [int] NOT NULL,
	[LpAreaId] [int] NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Photo] [varchar](250) NULL,
	[f_jzlb] [varchar](50) NULL,
	[f_minprice] [varchar](50) NULL,
	[f_price] [int] NULL,
	[f_maxprice] [varchar](50) NULL,
	[f_zxqk] [varchar](250) NULL,
	[f_jtwz] [varchar](250) NULL,
	[f_kpsj] [varchar](50) NULL,
	[f_rzsj] [varchar](50) NULL,
	[f_jylb] [varchar](50) NULL,
	[f_fkfs] [varchar](50) NULL,
	[f_wydz] [varchar](250) NULL,
	[f_qclx] [varchar](250) NULL,
	[f_xsxk] [varchar](250) NULL,
	[f_kfs] [varchar](250) NULL,
	[f_sldz] [varchar](250) NULL,
	[f_sldh] [varchar](250) NULL,
	[f_desc] [text] NULL,
	[f_wy_zdmj] [varchar](250) NULL,
	[f_wy_jzmj] [varchar](250) NULL,
	[f_wy_lhl] [varchar](250) NULL,
	[f_wy_rjl] [varchar](250) NULL,
	[f_wy_dt] [varchar](250) NULL,
	[f_wy_cw] [varchar](250) NULL,
	[f_wy_wygs] [varchar](250) NULL,
	[f_wy_wyf] [varchar](250) NULL,
	[f_wy_zfs] [varchar](250) NULL,
	[f_wy_sgjd] [varchar](250) NULL,
	[f_ptss_zb] [text] NULL,
	[f_ptss_jc] [text] NULL,
	[f_date] [datetime] NOT NULL,
	[f_hits] [int] NOT NULL,
	[f_sort] [int] NOT NULL,
	[f_type_title] [varchar](50) NULL,
	[f_area_title] [varchar](50) NULL,
	[f_recommend] [tinyint] NULL,
	[f_date_modify] [nvarchar](50) NULL,
	[f_price_unit] [varchar](100) NULL,
	[f_traffic_pic] [varchar](255) NULL,
	[f_mapx] [int] NULL,
	[f_mapy] [int] NULL,
	[f_mapz] [int] NULL,
	[f_bbsurl] [varchar](250) NULL,
	[f_char] [char](1) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_commen]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_commen](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ArticleId] [int] NOT NULL CONSTRAINT [DF_t_commen_ArticleId]  DEFAULT (0),
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_commen_CategoryId]  DEFAULT (0),
	[Author] [varchar](30) NOT NULL,
	[Content] [text] NOT NULL,
	[Ip] [varchar](36) NOT NULL,
	[IsCheck] [tinyint] NOT NULL CONSTRAINT [DF_t_commen_IsCheck]  DEFAULT (0),
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_commen_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_commen] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_ad]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_ad](
	[id] [int] NOT NULL,
	[f_lptypeid] [int] NOT NULL,
	[f_positionid] [int] NOT NULL,
	[f_adtype] [int] NOT NULL,
	[f_title] [varchar](150) NULL,
	[f_src] [varchar](250) NULL,
	[f_width] [int] NULL,
	[f_height] [int] NULL,
	[f_url] [text] NULL,
	[f_date] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_dbimport]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_dbimport](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[db_type] [int] NOT NULL CONSTRAINT [DF_t_dbimport_db_type]  DEFAULT (0),
	[db_driver] [varchar](250) NOT NULL CONSTRAINT [DF_t_dbimport_db_driver]  DEFAULT (''),
	[db_host] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_host]  DEFAULT (''),
	[db_name] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_name]  DEFAULT (''),
	[db_username] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_username]  DEFAULT (''),
	[db_password] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_password]  DEFAULT (''),
	[db_table] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_table]  DEFAULT (''),
	[db_key] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_key]  DEFAULT (''),
	[db_order] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_order]  DEFAULT (''),
	[db_sql] [varchar](100) NOT NULL CONSTRAINT [DF_t_dbimport_db_sql]  DEFAULT (''),
	[categoryid] [int] NOT NULL CONSTRAINT [DF_t_dbimport_categoryid]  DEFAULT (0),
	[templateid] [int] NOT NULL CONSTRAINT [DF_t_dbimport_templateid]  DEFAULT (0),
	[default_status] [int] NOT NULL CONSTRAINT [DF_t_dbimport_default_status]  DEFAULT (0),
	[fields_map] [text] NOT NULL,
 CONSTRAINT [PK_t_dbimport] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_commen]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_commen](
	[id] [int] NOT NULL,
	[lp_id] [int] NULL,
	[f_content] [text] NULL,
	[f_name] [varchar](50) NULL,
	[f_sex] [varchar](10) NULL,
	[f_tel_office] [varchar](50) NULL,
	[f_tel_home] [varchar](50) NULL,
	[f_mobile] [varchar](50) NULL,
	[f_email] [varchar](50) NULL,
	[f_address] [varchar](250) NULL,
	[f_postcode] [varchar](10) NULL,
	[f_date] [datetime] NULL,
	[f_ip] [varchar](20) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_area]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_area](
	[id] [int] NOT NULL,
	[title] [nvarchar](250) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_flink]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_flink](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Url] [varchar](250) NOT NULL,
	[Logo] [varchar](250) NULL,
	[SortId] [int] NOT NULL CONSTRAINT [DF_t_flink_SortId]  DEFAULT (0),
	[LinkType] [int] NOT NULL CONSTRAINT [DF_t_flink_LinkType]  DEFAULT (0),
 CONSTRAINT [PK_t_flink] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_hisprice]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_hisprice](
	[id] [int] NOT NULL,
	[lp_id] [int] NOT NULL,
	[f_date] [datetime] NULL,
	[f_price] [varchar](500) NULL,
	[f_desc] [text] NULL,
	[f_price_desc] [varchar](250) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_photo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_photo](
	[id] [int] NOT NULL,
	[lp_id] [int] NOT NULL,
	[f_title] [varchar](250) NULL,
	[f_photo] [varchar](250) NOT NULL,
	[f_desc] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_type]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_type](
	[id] [int] NOT NULL,
	[title] [nvarchar](250) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_function]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_function](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_function_CategoryId]  DEFAULT (0),
	[Title] [varchar](250) NOT NULL,
	[Demons] [varchar](250) NOT NULL,
	[Content] [text] NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_function_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_function] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_wenda_catalog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_wenda_catalog](
	[id] [int] NOT NULL,
	[Title] [nvarchar](250) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_gather]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_gather](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Url] [varchar](250) NOT NULL,
	[Encode] [varchar](100) NOT NULL,
	[ParentId] [int] NOT NULL CONSTRAINT [DF_t_gather_ParentId]  DEFAULT (0),
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_gather_CategoryId]  DEFAULT (0),
	[TemplateId] [int] NOT NULL CONSTRAINT [DF_t_gather_TemplateId]  DEFAULT (0),
	[ListLabelStart] [text] NOT NULL,
	[ListLabelEnd] [text] NOT NULL,
	[ReplaceUrl] [tinyint] NOT NULL CONSTRAINT [DF_t_gather_ReplaceUrl]  DEFAULT (0),
	[UrlFrom] [varchar](250) NULL,
	[UrlTo] [varchar](250) NULL,
	[ReplaceStr] [text] NULL,
	[PageSplitSet] [text] NULL,
	[PageStart] [int] NULL CONSTRAINT [DF_t_gather_PageStart]  DEFAULT (0),
	[PageEnd] [int] NULL CONSTRAINT [DF_t_gather_PageEnd]  DEFAULT (0),
	[TitleStart] [text] NOT NULL,
	[TitleEnd] [text] NOT NULL,
	[ContentStart] [text] NOT NULL,
	[ContentEnd] [text] NOT NULL,
	[AuthorStart] [text] NULL,
	[AuthorEnd] [text] NULL,
	[FromStart] [text] NULL,
	[FromEnd] [text] NULL,
	[ShowUrlStart] [text] NULL,
	[ShowUrlEnd] [text] NULL,
 CONSTRAINT [PK_t_gather] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_wenda]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_wenda](
	[id] [int] NOT NULL,
	[CatalogId] [int] NULL,
	[UserId] [nvarchar](50) NULL,
	[Title] [nvarchar](250) NULL,
	[Content] [ntext] NULL,
	[Status] [int] NULL,
	[PubIp] [nvarchar](50) NULL,
	[PubDate] [smalldatetime] NULL,
	[IsRem] [int] NULL,
	[IsHot] [int] NULL,
	[Hits] [int] NULL,
	[LastReply] [nvarchar](50) NULL,
	[ReplyNum] [int] NULL,
	[IsCheck] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_gatherhis]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_gatherhis](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Url] [varchar](250) NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_gatherhis_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_gatherhis] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_gbook]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_gbook](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ObjId] [int] NOT NULL CONSTRAINT [DF_t_gbook_ObjId]  DEFAULT (0),
	[TypeId] [int] NOT NULL CONSTRAINT [DF_t_gbook_TypeId]  DEFAULT (0),
	[Author] [varchar](30) NOT NULL,
	[Content] [text] NOT NULL,
	[Ip] [varchar](64) NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_gbook_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_gbook] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserType] [int] NOT NULL CONSTRAINT [DF_t_member_UserType]  DEFAULT (0),
	[UserId] [varchar](50) NOT NULL,
	[UserPass] [varchar](50) NOT NULL,
	[PassAsk] [varchar](50) NOT NULL,
	[PassAnswer] [varchar](50) NOT NULL,
	[Email] [varchar](150) NOT NULL,
	[RegIp] [varchar](30) NULL,
	[RegDate] [datetime] NULL,
	[LoginNum] [int] NULL CONSTRAINT [DF_t_member_LoginNum]  DEFAULT (0),
	[LastLoginIp] [varchar](30) NULL,
	[LastLoginDate] [datetime] NULL,
	[IsLocked] [tinyint] NULL CONSTRAINT [DF_t_member_IsLocked]  DEFAULT (0),
	[Score] [int] NULL CONSTRAINT [DF_t_member_Score]  DEFAULT (0),
	[IsCheck] [tinyint] NULL CONSTRAINT [DF_t_member_IsCheck]  DEFAULT (0),
	[UserLevel] [int] NULL CONSTRAINT [DF_t_member_UserLevel]  DEFAULT (0),
	[Balance] [decimal](10, 2) NULL DEFAULT (0.00),
 CONSTRAINT [PK_t_member] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_member]') AND name = N'IX_t_member')
CREATE UNIQUE NONCLUSTERED INDEX [IX_t_member] ON [dbo].[t_member] 
(
	[UserId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_keywords]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_keywords](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](200) NOT NULL,
	[Url] [varchar](250) NOT NULL,
 CONSTRAINT [PK_t_keywords] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_label]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_label](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_label_CategoryId]  DEFAULT (0),
	[Title] [varchar](250) NOT NULL,
	[Demons] [varchar](250) NOT NULL,
	[Content] [text] NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_label_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_label] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_post]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_post](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[f_user] [varchar](100) NOT NULL,
	[f_title] [varchar](100) NOT NULL,
	[f_content] [text] NOT NULL,
	[f_reply] [text] NOT NULL,
	[f_emot] [varchar](100) NULL,
	[f_homepage] [varchar](100) NULL,
	[f_email] [varchar](100) NOT NULL,
	[f_im] [varchar](50) NULL,
	[f_ip] [varchar](50) NULL,
	[f_date] [datetime] NOT NULL CONSTRAINT [DF_t_post_f_date]  DEFAULT (getdate()),
	[f_replytime] [datetime] NULL CONSTRAINT [DF_t_post_f_replytime]  DEFAULT (getdate()),
	[f_hidden] [tinyint] NULL CONSTRAINT [DF_t_post_f_hidden]  DEFAULT (0),
	[f_ischeck] [tinyint] NOT NULL CONSTRAINT [DF_t_post_f_ischeck]  DEFAULT (0),
 CONSTRAINT [PK_t_post] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_pubserver]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_pubserver](
	[id] [int] NOT NULL,
	[Title] [varchar](150) NOT NULL,
	[PlayUrl] [varchar](250) NOT NULL,
	[DownUrl] [varchar](250) NOT NULL,
	[Demons] [text] NULL,
	[ModiTime] [datetime] NOT NULL,
 CONSTRAINT [PK_t_pubserver] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_role]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_role](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[RoleName] [varchar](150) NOT NULL,
	[Privilege] [text] NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_role_ModiTime]  DEFAULT (getdate()),
	[Catalogs] [text] NULL,
 CONSTRAINT [PK_t_role] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_slide]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_slide](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](200) NOT NULL,
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_slide_CategoryId]  DEFAULT (0),
	[ItemNum] [int] NOT NULL CONSTRAINT [DF_t_slide_ItemNum]  DEFAULT (4),
	[Width] [int] NOT NULL CONSTRAINT [DF_t_slide_Width]  DEFAULT (200),
	[Height] [int] NOT NULL CONSTRAINT [DF_t_slide_Height]  DEFAULT (200),
 CONSTRAINT [PK_t_slide] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_source]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_source](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](200) NOT NULL,
	[Stype] [varchar](100) NOT NULL,
 CONSTRAINT [PK_t_source] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_special]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_special](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Template] [varchar](250) NOT NULL,
	[SavePath] [varchar](250) NOT NULL,
	[Content] [varchar](250) NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_special_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_special] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_template]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_template](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](100) NOT NULL,
	[Content] [text] NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_template_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_template] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_video]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_video](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](150) NOT NULL,
	[ViewImg] [varchar](250) NULL,
	[ParentId] [int] NULL CONSTRAINT [DF_t_video_ParentId]  DEFAULT (0),
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_video_CategoryId]  DEFAULT (0),
	[NeedMoney] [numeric](18, 2) NULL CONSTRAINT [DF_t_video_NeedMoney]  DEFAULT (0.00),
	[Fdesc] [text] NULL,
	[Vurl] [text] NOT NULL,
	[ModiTime] [datetime] NOT NULL,
	[IsFree] [tinyint] NOT NULL CONSTRAINT [DF_t_video_IsFree]  DEFAULT (0),
	[Author] [varchar](50) NULL,
	[VideoLen] [varchar](50) NULL,
	[IsRecommend] [int] NULL CONSTRAINT [DF_t_video_IsRecommend]  DEFAULT (0),
	[JoinNum] [int] NULL CONSTRAINT [DF_t_video_JoinNum]  DEFAULT (0),
	[Hits] [int] NULL CONSTRAINT [DF_t_video_Hits]  DEFAULT (1),
	[Fcontent] [text] NULL,
	[PubServerId] [int] NOT NULL CONSTRAINT [DF_t_video_PubServerId]  DEFAULT (0),
	[IsCheck] [tinyint] NULL CONSTRAINT [DF_t_video_IsCheck]  DEFAULT (0),
	[UserId] [varchar](50) NULL,
	[IsGuestPub] [tinyint] NULL CONSTRAINT [DF_t_video_IsGuestPub]  DEFAULT (0),
 CONSTRAINT [PK_t_video] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_video_commen]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_video_commen](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ObjId] [int] NOT NULL CONSTRAINT [DF_t_video_commen_ObjId]  DEFAULT (0),
	[Author] [varchar](50) NULL,
	[Content] [text] NULL,
	[Ip] [varchar](30) NULL,
	[IsRecommend] [tinyint] NULL CONSTRAINT [DF_t_video_commen_IsRecommend]  DEFAULT (0),
	[ModiTime] [datetime] NULL,
 CONSTRAINT [PK_t_video_commen] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_vote]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_vote](
	[id] [int] NOT NULL,
	[Title] [varchar](100) NOT NULL,
	[OptionNum] [int] NOT NULL CONSTRAINT [DF_t_vote_OptionNum]  DEFAULT (0),
	[OptionType] [tinyint] NOT NULL CONSTRAINT [DF_t_vote_OptionType]  DEFAULT (0),
	[Status] [tinyint] NOT NULL CONSTRAINT [DF_t_vote_Status]  DEFAULT (0),
	[ExpiresTime] [datetime] NOT NULL CONSTRAINT [DF_t_vote_ExpiresTime]  DEFAULT (getdate()),
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_vote_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_vote] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_voteitem]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_voteitem](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[VoteId] [int] NOT NULL CONSTRAINT [DF_t_voteitem_VoteId]  DEFAULT (0),
	[ItemName] [varchar](250) NOT NULL,
	[Hits] [int] NOT NULL CONSTRAINT [DF_t_voteitem_Hits]  DEFAULT (0),
 CONSTRAINT [PK_t_voteitem] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_industry]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_industry](
	[id] [int] NOT NULL,
	[Pid] [int] NOT NULL,
	[Title] [varchar](250) NOT NULL,
 CONSTRAINT [PK_t_industry] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_basket]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_basket](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SessionId] [varchar](50) NOT NULL,
	[UserId] [varchar](50) NULL,
	[ContactName] [varchar](50) NULL,
	[Mobile] [varchar](50) NULL,
	[Tel] [varchar](50) NULL,
	[Email] [varchar](50) NULL,
	[Address] [nvarchar](50) NULL,
	[Postcode] [varchar](50) NULL,
	[PayType] [int] NULL CONSTRAINT [DF_t_basket_PayType]  DEFAULT (0),
	[Price] [decimal](18, 2) NOT NULL CONSTRAINT [DF_t_basket_Pirce]  DEFAULT (0.00),
	[Nums] [int] NOT NULL CONSTRAINT [DF_t_basket_Nums]  DEFAULT (0),
	[Freight] [decimal](18, 2) NULL CONSTRAINT [DF_t_basket_Freight]  DEFAULT (0.00),
	[Discount] [decimal](18, 2) NULL CONSTRAINT [DF_t_basket_Discount]  DEFAULT (0.00),
	[Weight] [decimal](18, 2) NULL CONSTRAINT [DF_t_basket_Weight]  DEFAULT (0.00),
	[PayStatus] [tinyint] NOT NULL CONSTRAINT [DF_t_basket_PayStatus]  DEFAULT (0),
	[SendStatus] [tinyint] NULL CONSTRAINT [DF_t_basket_SendStatus]  DEFAULT (0),
	[ExpressNo] [varchar](50) NULL,
	[InvoiceTitle] [nvarchar](50) NULL,
	[OrderDate] [datetime] NULL,
	[SendDate] [datetime] NULL,
	[School] [nvarchar](50) NULL,
 CONSTRAINT [PK_t_basket] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0=在线,1=转帐,2=货到付款' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N't_basket', @level2type=N'COLUMN', @level2name=N'PayType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1=已支付' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N't_basket', @level2type=N'COLUMN', @level2name=N'PayStatus'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1=已包装，2＝已发货' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N't_basket', @level2type=N'COLUMN', @level2name=N'SendStatus'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_area]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_area](
	[id] [int] NOT NULL,
	[Title] [varchar](50) NOT NULL,
	[Pid] [int] NOT NULL,
 CONSTRAINT [PK_pre_common_district] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_download_file]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_download_file](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SoftId] [int] NOT NULL CONSTRAINT [DF_t_download_file_SoftId]  DEFAULT (0),
	[Title] [varchar](150) NOT NULL,
	[FileUrl] [varchar](150) NOT NULL,
	[ServerId] [int] NOT NULL CONSTRAINT [DF_t_download_file_ServerId]  DEFAULT (0),
 CONSTRAINT [PK_t_download_file] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_download_server]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_download_server](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](150) NOT NULL,
	[Url] [varchar](150) NOT NULL,
	[Active] [tinyint] NULL CONSTRAINT [DF_t_download_server_Active]  DEFAULT (0),
	[Demons] [text] NULL,
 CONSTRAINT [PK_t_download_server] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_download_soft]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_download_soft](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CatalogId] [int] NOT NULL CONSTRAINT [DF_t_download_soft_CatalogId]  DEFAULT (0),
	[SoftName] [varchar](150) NOT NULL,
	[SoftChar] [char](1) NULL,
	[SoftKey] [varchar](50) NULL,
	[SoftVersion] [varchar](50) NULL,
	[SoftLanguage] [varchar](250) NULL,
	[SoftLicense] [varchar](50) NULL,
	[SoftAttr] [varchar](50) NULL,
	[SoftSize] [varchar](50) NULL,
	[SoftStars] [int] NULL CONSTRAINT [DF_t_download_soft_SoftStars]  DEFAULT (0),
	[SoftOs] [varchar](250) NULL,
	[SoftAuthor] [varchar](50) NULL,
	[SoftAuthorUrl] [varchar](250) NULL,
	[SoftDemoUrl] [varchar](250) NULL,
	[SoftPhoto] [varchar](250) NULL,
	[SoftDesc] [text] NULL,
	[SoftDemons] [varchar](250) NULL,
	[SoftRecommend] [tinyint] NULL CONSTRAINT [DF_t_download_soft_SoftRecommend]  DEFAULT (0),
	[SoftTop] [tinyint] NULL CONSTRAINT [DF_t_download_soft_SoftTop]  DEFAULT (0),
	[InsertDate] [datetime] NULL,
	[ModifyDate] [datetime] NULL,
	[SoftHits] [int] NULL CONSTRAINT [DF_t_download_soft_SoftHits]  DEFAULT (0),
	[SoftSort] [int] NOT NULL CONSTRAINT [DF_t_download_soft_SoftSort]  DEFAULT (0),
	[IsCheck] [tinyint] NOT NULL CONSTRAINT [DF_t_download_soft_IsCheck]  DEFAULT (0),
	[IsNeedLogin] [tinyint] NULL CONSTRAINT [DF_t_download_soft_IsNeedLogin]  DEFAULT (0),
 CONSTRAINT [PK_t_download_soft] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_download_soft]') AND name = N'IX_t_download_soft_1')
CREATE NONCLUSTERED INDEX [IX_t_download_soft_1] ON [dbo].[t_download_soft] 
(
	[CatalogId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_download_soft]') AND name = N'IX_t_download_soft_2')
CREATE NONCLUSTERED INDEX [IX_t_download_soft_2] ON [dbo].[t_download_soft] 
(
	[ModifyDate] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_download_soft]') AND name = N'IX_t_download_soft_3')
CREATE NONCLUSTERED INDEX [IX_t_download_soft_3] ON [dbo].[t_download_soft] 
(
	[IsCheck] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_shop]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_shop](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](150) NOT NULL,
	[ViewImg] [varchar](250) NULL,
	[ChannelId] [int] NULL,
	[ParentId] [int] NULL CONSTRAINT [DF_t_shop_ParentId]  DEFAULT (0),
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_shop_CategoryId]  DEFAULT (0),
	[Price] [numeric](18, 2) NULL CONSTRAINT [DF_t_shop_NeedMoney]  DEFAULT (0.00),
	[Discount] [numeric](18, 2) NULL,
	[Stars] [int] NULL CONSTRAINT [DF_t_shop_Stars]  DEFAULT (1),
	[Nums] [int] NULL CONSTRAINT [DF_t_shop_Num]  DEFAULT (0),
	[Author] [varchar](50) NULL,
	[Press] [nvarchar](50) NULL,
	[PubDate] [varchar](50) NULL,
	[Banchi] [varchar](50) NULL,
	[PageNum] [varchar](50) NULL,
	[ZiNum] [varchar](50) NULL,
	[PrintDate] [varchar](50) NULL,
	[Kaiben] [varchar](50) NULL,
	[Paper] [varchar](50) NULL,
	[YinChi] [varchar](50) NULL,
	[Isbn] [varchar](50) NULL,
	[Package] [varchar](50) NULL,
	[EditorRm] [nvarchar](500) NULL,
	[Content] [text] NULL,
	[AuthorDesc] [nvarchar](500) NULL,
	[Directory] [text] NULL,
	[ModDate] [datetime] NULL CONSTRAINT [DF_t_shop_ModDate]  DEFAULT (getdate()),
	[Hits] [int] NULL CONSTRAINT [DF_t_shop_Hits_1]  DEFAULT (0),
	[IsRem] [tinyint] NULL CONSTRAINT [DF_t_shop_IsRem]  DEFAULT (0),
	[IsTop] [tinyint] NULL CONSTRAINT [DF_t_shop_IsTop]  DEFAULT (0),
	[IsHot] [tinyint] NULL CONSTRAINT [DF_t_shop_IsHot]  DEFAULT (0),
	[Weight] [decimal](18, 2) NULL CONSTRAINT [DF_t_shop_Weight]  DEFAULT (0.00),
	[Subject] [varchar](50) NULL,
	[MPrice] [decimal](18, 0) NULL CONSTRAINT [DF_t_shop_MPrice]  DEFAULT (0.00),
 CONSTRAINT [PK_t_shop] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_shop_commen]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_shop_commen](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[GoodsId] [int] NULL CONSTRAINT [DF_t_shop_commen_GoodsId]  DEFAULT (0),
	[UserId] [varchar](50) NULL,
	[Stars] [int] NULL,
	[Content] [text] NULL,
	[Reply] [text] NULL,
	[PubDate] [datetime] NULL,
 CONSTRAINT [PK_t_shop_commen] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_shop_team]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_shop_team](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[TeamId] [int] NULL CONSTRAINT [DF_t_shop_team_TeamId]  DEFAULT (0),
	[ShopId] [int] NULL CONSTRAINT [DF_t_shop_team_ShopId]  DEFAULT (0),
 CONSTRAINT [PK_t_shop_team] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_team]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_team](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[School] [nvarchar](50) NULL,
	[Title] [nvarchar](50) NULL,
	[ViewImg] [varchar](250) NULL,
	[Price] [decimal](18, 2) NULL CONSTRAINT [DF_t_team_Price]  DEFAULT (0.00),
	[MPrice] [decimal](18, 0) NULL CONSTRAINT [DF_t_team_MPrice]  DEFAULT (0.00),
	[ModDate] [datetime] NULL,
	[Hits] [int] NULL CONSTRAINT [DF_t_team_Hits]  DEFAULT (0),
 CONSTRAINT [PK_t_team] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member_p]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member_p](
	[UserId] [varchar](50) NOT NULL,
	[Email] [varchar](100) NOT NULL,
	[UserName] [varchar](200) NULL,
	[IdCard] [varchar](30) NULL,
	[BornDate] [varchar](30) NULL,
	[Sex] [varchar](10) NULL,
	[Age] [int] NULL,
	[Province] [int] NULL CONSTRAINT [DF_t_member_p_Province]  DEFAULT (0),
	[City] [int] NULL CONSTRAINT [DF_t_member_p_City]  DEFAULT (0),
	[Education] [varchar](150) NULL,
	[Profession] [varchar](150) NULL,
	[InCome] [varchar](150) NULL,
	[Tel] [varchar](30) NULL,
	[Mobile] [varchar](30) NULL,
	[QQ] [varchar](50) NULL,
	[MSN] [varchar](50) NULL,
	[HomePage] [varchar](250) NULL,
	[Address] [varchar](250) NULL,
	[PostCode] [varchar](15) NULL,
	[Photo] [varchar](250) NULL,
	[Demons] [text] NULL,
 CONSTRAINT [PK_t_member_p] PRIMARY KEY CLUSTERED 
(
	[UserId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_contributors]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_contributors](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_contributors_CategoryId]  DEFAULT (0),
	[UserId] [varchar](50) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Author] [varchar](50) NULL,
	[SourceFrom] [varchar](150) NULL,
	[Content] [text] NOT NULL,
	[IsCheck] [int] NOT NULL CONSTRAINT [DF_t_contributors_IsCheck]  DEFAULT (0),
	[PubDate] [datetime] NOT NULL,
 CONSTRAINT [PK_t_contributors] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_tags]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_tags](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](50) NOT NULL,
	[Weight] [int] NOT NULL CONSTRAINT [DF_t_tags_Weight]  DEFAULT (0),
	[Hits] [int] NOT NULL CONSTRAINT [DF_t_tags_Hits]  DEFAULT (0),
 CONSTRAINT [PK_t_tags] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY],
 CONSTRAINT [IX_t_tags] UNIQUE NONCLUSTERED 
(
	[Title] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_tag_article]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_tag_article](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ArticleId] [int] NOT NULL CONSTRAINT [DF_t_tag_article_ArticleId]  DEFAULT (0),
	[TagId] [int] NOT NULL CONSTRAINT [DF_t_tag_article_TagId]  DEFAULT (0),
 CONSTRAINT [PK_t_tag_article] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_ad_hits]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_ad_hits](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[AdId] [int] NOT NULL CONSTRAINT [DF_t_ad_hits_AdId]  DEFAULT (0),
	[ip] [varchar](50) NULL,
	[PubDate] [datetime] NULL,
	[Area] [varchar](50) NULL,
 CONSTRAINT [PK_t_ad_hits] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_cart]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_cart](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [varchar](50) NULL,
	[BasketId] [int] NOT NULL CONSTRAINT [DF_t_cart_BasketId]  DEFAULT (0),
	[SessionId] [varchar](50) NULL,
	[GoodsId] [int] NOT NULL,
	[GoodsTitle] [nvarchar](70) NOT NULL,
	[Photo] [varchar](150) NULL,
	[Price] [decimal](18, 2) NOT NULL CONSTRAINT [DF_t_cart_Price]  DEFAULT (0.00),
	[Discount] [decimal](18, 0) NULL CONSTRAINT [DF_t_cart_Discount]  DEFAULT (0.00),
	[Nums] [int] NOT NULL CONSTRAINT [DF_t_cart_Nums]  DEFAULT (0),
	[Weight] [decimal](18, 2) NULL CONSTRAINT [DF_t_cart_Weight]  DEFAULT (0.00),
	[IsOrder] [tinyint] NULL CONSTRAINT [DF_t_cart_IsOrder]  DEFAULT (0),
 CONSTRAINT [PK_t_cart] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_fields]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_fields](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[DataModule] [int] NOT NULL CONSTRAINT [DF_t_fields_DataModule]  DEFAULT (0),
	[FieldName] [varchar](100) NOT NULL,
	[FieldTitle] [varchar](150) NOT NULL,
	[FieldType] [int] NOT NULL CONSTRAINT [DF_t_fields_FieldType]  DEFAULT (1),
	[FieldLen] [int] NOT NULL CONSTRAINT [DF_t_fields_FieldLen]  DEFAULT (1),
	[FormType] [int] NOT NULL CONSTRAINT [DF_t_fields_FormType]  DEFAULT (1),
	[FormText] [varchar](150) NOT NULL,
	[FormDefault] [text] NULL,
	[IsBindTable] [int] NULL DEFAULT (0),
	[BindPara] [varchar](255) NULL,
	[ShowInList] [int] NULL DEFAULT (0),
	[SysFields] [tinyint] NULL DEFAULT (0),
 CONSTRAINT [PK_t_fields] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_article]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_article](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[SubHeading] [varchar](250) NULL,
	[TitleColor] [varchar](20) NULL,
	[KeyWords] [varchar](250) NULL,
	[RelateKey] [varchar](250) NULL,
	[RelateNum] [int] NOT NULL CONSTRAINT [DF_t_article_RelateNum]  DEFAULT (10),
	[Content] [ntext] NULL,
	[IsOutLink] [tinyint] NOT NULL CONSTRAINT [DF_t_article_IsOutLink]  DEFAULT (0),
	[OutLinkUrl] [varchar](250) NULL,
	[ChannelId] [int] NULL CONSTRAINT [DF_t_article_ChannelId]  DEFAULT (0),
	[ParentId] [int] NOT NULL CONSTRAINT [DF_t_article_ParentId]  DEFAULT (0),
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_article_CategoryId]  DEFAULT (0),
	[TemplateId] [int] NOT NULL CONSTRAINT [DF_t_article_TemplateId]  DEFAULT (0),
	[SpecialId] [int] NOT NULL CONSTRAINT [DF_t_article_SpecialId]  DEFAULT (0),
	[Top1] [tinyint] NOT NULL CONSTRAINT [DF_t_article_Top1]  DEFAULT (0),
	[ToTop] [tinyint] NOT NULL CONSTRAINT [DF_t_article_ToTop]  DEFAULT (0),
	[ToHot] [tinyint] NOT NULL CONSTRAINT [DF_t_article_ToHot]  DEFAULT (0),
	[Recommend] [tinyint] NOT NULL CONSTRAINT [DF_t_article_Recommend]  DEFAULT (0),
	[Images] [tinyint] NOT NULL CONSTRAINT [DF_t_article_Images]  DEFAULT (0),
	[IsSlide] [tinyint] NOT NULL CONSTRAINT [DF_t_article_IsSlide]  DEFAULT (0),
	[Checked] [tinyint] NOT NULL CONSTRAINT [DF_t_article_Checked]  DEFAULT (0),
	[Author] [varchar](250) NULL,
	[SourceFrom] [varchar](250) NULL,
	[Editor] [varchar](250) NULL,
	[UserName] [varchar](100) NOT NULL,
	[Photo] [varchar](250) NULL,
	[Hits] [int] NOT NULL CONSTRAINT [DF_t_article_Hits]  DEFAULT (0),
	[SavePath] [varchar](250) NOT NULL,
	[Summary] [nvarchar](555) NOT NULL,
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_article_ModiTime]  DEFAULT (getdate()),
	[SortId] [int] NOT NULL CONSTRAINT [DF_t_article_SortId]  DEFAULT (0),
	[ModDate] [varchar](30) NULL,
	[Tags] [varchar](50) NULL,
 CONSTRAINT [PK_t_article] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_article]') AND name = N'IX_t_article')
CREATE NONCLUSTERED INDEX [IX_t_article] ON [dbo].[t_article] 
(
	[CategoryId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_article]') AND name = N'IX_t_article_1')
CREATE NONCLUSTERED INDEX [IX_t_article_1] ON [dbo].[t_article] 
(
	[Checked] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[t_article]') AND name = N'IX_t_article_2')
CREATE NONCLUSTERED INDEX [IX_t_article_2] ON [dbo].[t_article] 
(
	[ModiTime] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_newspaper]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_newspaper](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](50) NULL,
	[PubDate] [datetime] NULL,
	[ZhongQ] [varchar](50) NULL,
	[DiQ] [varchar](50) NULL,
	[Photo] [varchar](250) NULL,
 CONSTRAINT [PK_t_newspaper] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总＊期' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N't_newspaper', @level2type=N'COLUMN', @level2name=N'ZhongQ'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'第期' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N't_newspaper', @level2type=N'COLUMN', @level2name=N'DiQ'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_newspaper_ban]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_newspaper_ban](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PaperId] [int] NOT NULL,
	[ClassTitle] [nvarchar](50) NULL,
	[Photo] [varchar](250) NULL,
	[Content] [text] NULL,
 CONSTRAINT [PK_t_newspaper_ban] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_newspaper_items]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_newspaper_items](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[BanId] [int] NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[LinkUrl] [varchar](250) NOT NULL,
 CONSTRAINT [PK_t_newspaper_items] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_module]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_module](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [varchar](250) NULL,
	[TableName] [varchar](250) NULL,
	[Pid] [int] NULL CONSTRAINT [DF__t_module__Pid__6F6A7CB2]  DEFAULT (0),
	[ListFields] [varchar](500) NULL,
PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_payhis]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_payhis](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [varchar](50) NOT NULL,
	[PayTo] [varchar](50) NOT NULL,
	[Money] [decimal](18, 2) NOT NULL CONSTRAINT [DF_t_payhis_Money]  DEFAULT (0.00),
	[Title] [varchar](250) NOT NULL,
	[PayType] [int] NOT NULL CONSTRAINT [DF_t_payhis_PayType]  DEFAULT (0),
	[PubDate] [datetime] NOT NULL CONSTRAINT [DF_t_payhis_PubDate]  DEFAULT (getdate()),
	[Demons] [varchar](500) NULL,
 CONSTRAINT [PK_t_payhis] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member_commen]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member_commen](
	[id] [int] NOT NULL,
	[MemberId] [varchar](50) NOT NULL,
	[Content] [text] NULL,
	[Reply] [text] NULL,
	[PubDate] [datetime] NULL,
	[Ip] [varchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member_e]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member_e](
	[UserId] [varchar](50) NOT NULL,
	[Email] [varchar](100) NOT NULL,
	[UserName] [varchar](200) NOT NULL,
	[ParentId] [int] NULL CONSTRAINT [DF_t_member_e_ParentId]  DEFAULT (0),
	[IndustryId] [int] NOT NULL CONSTRAINT [DF_t_member_e_IndustryId]  DEFAULT (0),
	[ComType] [varchar](100) NULL,
	[CreateDate] [varchar](50) NULL,
	[ContactMan] [varchar](30) NULL,
	[Province] [int] NULL CONSTRAINT [DF_t_member_e_Province]  DEFAULT (0),
	[City] [int] NULL CONSTRAINT [DF_t_member_e_City]  DEFAULT (0),
	[BusinessScope] [varchar](250) NULL,
	[Tel] [varchar](30) NULL,
	[Fax] [varchar](30) NULL,
	[Mobile] [varchar](30) NULL,
	[QQ] [varchar](50) NULL,
	[HomePage] [varchar](250) NULL,
	[Address] [varchar](250) NULL,
	[PostCode] [varchar](15) NULL,
	[Photo] [varchar](250) NULL,
	[Demons] [ntext] NULL,
	[ModDate] [datetime] NULL,
 CONSTRAINT [PK_t_member_e] PRIMARY KEY CLUSTERED 
(
	[UserId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member_job]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member_job](
	[id] [int] NOT NULL,
	[MemberId] [varchar](50) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Xueli] [varchar](50) NULL,
	[Pnum] [varchar](50) NULL,
	[Gzjy] [varchar](250) NULL,
	[Area] [varchar](150) NULL,
	[Sexs] [varchar](50) NULL,
	[Ages] [varchar](50) NULL,
	[Salary] [varchar](150) NULL,
	[Content] [text] NULL,
	[PubDate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member_news]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member_news](
	[id] [int] NOT NULL,
	[MemberId] [varchar](50) NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Content] [text] NULL,
	[PubDate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_member_products]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_member_products](
	[id] [int] NOT NULL,
	[MemberId] [varchar](50) NOT NULL,
	[Photo] [varchar](250) NULL,
	[Title] [varchar](250) NOT NULL,
	[Types] [varchar](250) NULL,
	[Price] [varchar](50) NULL,
	[Address] [varchar](250) NULL,
	[Guige] [varchar](250) NULL,
	[Content] [text] NULL,
	[PubDate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_info]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_info](
	[id] [int] NOT NULL,
	[UserId] [varchar](50) NOT NULL,
	[InfoTypeId] [int] NOT NULL,
	[ParentId] [int] NULL,
	[CatalogId] [int] NOT NULL,
	[Photo] [varchar](250) NULL,
	[Title] [varchar](250) NOT NULL,
	[Price] [decimal](18, 2) NOT NULL,
	[Province] [int] NULL,
	[City] [int] NULL,
	[Area] [varchar](150) NULL,
	[ContactMan] [varchar](50) NULL,
	[QQ] [varchar](50) NULL,
	[Tel] [varchar](30) NULL,
	[Content] [ntext] NULL,
	[Demons] [text] NULL,
	[PubDate] [datetime] NULL,
	[ExpireDate] [datetime] NULL,
	[PubIp] [nvarchar](250) NULL,
	[Hits] [int] NULL,
	[IsCheck] [tinyint] NULL,
	[IsDel] [tinyint] NULL,
	[IsHot] [tinyint] NULL,
	[IsTop] [tinyint] NULL,
	[DelPass] [varchar](15) NULL,
	[SavePath] [varchar](250) NULL,
	[HomePage] [varchar](250) NULL,
	[Address] [varchar](150) NULL,
	[Color] [varchar](50) NULL,
	[Score] [int] NULL,
	[ScoreEndDate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_city]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_city](
	[ZID] [nvarchar](6) NOT NULL,
	[ZUP] [nvarchar](3) NULL,
	[ZName] [nvarchar](10) NULL,
	[ZPostCode] [nvarchar](6) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_province]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_province](
	[ZID] [nvarchar](3) NOT NULL,
	[ZName] [nvarchar](4) NULL,
	[ZSName] [nvarchar](2) NULL,
	[ZLName] [nvarchar](20) NULL,
	[ZMainCity] [nvarchar](6) NULL,
	[ZProvinceType] [int] NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_2house]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_2house](
	[id] [int] NOT NULL,
	[UserId] [varchar](50) NOT NULL,
	[InfoTypeId] [int] NOT NULL,
	[AreaId] [int] NOT NULL,
	[RoomTypeId] [int] NOT NULL,
	[FloorLevelId] [int] NOT NULL,
	[Acreage] [float] NOT NULL,
	[Price] [float] NOT NULL,
	[PriceUnit] [varchar](20) NULL,
	[Address] [varchar](250) NOT NULL,
	[ContactMan] [varchar](50) NOT NULL,
	[ContactType] [varchar](150) NOT NULL,
	[OtherDes] [text] NULL,
	[IsCheck] [int] NOT NULL,
	[UserIp] [varchar](64) NULL,
	[ModiTime] [datetime] NOT NULL,
	[Hits] [int] NOT NULL,
	[HouseType] [int] NULL,
	[DelPass] [varchar](50) NULL,
	[SexDemond] [varchar](10) NULL,
	[MapX] [int] NULL,
	[MapY] [int] NULL,
	[MapZ] [int] NULL,
	[Photo] [varchar](250) NULL,
	[Bus] [varchar](50) NULL,
	[IsRecommend] [tinyint] NULL,
	[PubBy] [tinyint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_lp_hx]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_lp_hx](
	[id] [int] NOT NULL,
	[lp_id] [int] NOT NULL,
	[f_title] [varchar](250) NOT NULL,
	[f_photo] [varchar](250) NOT NULL,
	[f_desc] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_2floorlevel]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_2floorlevel](
	[id] [int] NOT NULL,
	[title] [varchar](150) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_2infotype]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_2infotype](
	[id] [int] NOT NULL,
	[title] [varchar](150) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_ad]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_ad](
	[id] [int] NOT NULL,
	[CategoryId] [int] NOT NULL CONSTRAINT [DF_t_ad_CategoryId]  DEFAULT (0),
	[Title] [varchar](100) NOT NULL,
	[Content] [text] NOT NULL,
	[AdType] [int] NOT NULL CONSTRAINT [DF_t_ad_AdType]  DEFAULT (0),
	[ExpiresTime] [datetime] NOT NULL CONSTRAINT [DF_t_ad_ExpiresTime]  DEFAULT (getdate()),
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_ad_ModiTime]  DEFAULT (getdate()),
	[Hits] [int] NULL DEFAULT (0),
	[EffectId] [int] NULL DEFAULT (0),
	[LinkUrl] [varchar](200) NULL DEFAULT (0),
 CONSTRAINT [PK_t_ad] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_2roomtype]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_2roomtype](
	[id] [int] NOT NULL,
	[title] [varchar](150) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_admin]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_admin](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [varchar](100) NOT NULL,
	[PassWord] [varchar](32) NOT NULL,
	[LoginNum] [int] NOT NULL CONSTRAINT [DF_t_admin_LoginNum]  DEFAULT (0),
	[IsLock] [tinyint] NOT NULL CONSTRAINT [DF_t_admin_IsLock]  DEFAULT (0),
	[RoleId] [int] NOT NULL CONSTRAINT [DF_t_admin_RoleId]  DEFAULT (0),
	[ModiTime] [datetime] NOT NULL CONSTRAINT [DF_t_admin_ModiTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_t_admin] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_agent]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_agent](
	[id] [int] NOT NULL,
	[UserId] [varchar](50) NOT NULL,
	[UserName] [varchar](150) NOT NULL,
	[UserPass] [varchar](50) NOT NULL,
	[Area] [varchar](50) NULL,
	[Email] [varchar](70) NULL,
	[Tel] [varchar](50) NULL,
	[Fax] [varchar](50) NULL,
	[QQ] [varchar](50) NULL,
	[Address] [varchar](250) NULL,
	[Content] [text] NULL,
	[Announce] [varchar](500) NULL,
	[Hits] [int] NOT NULL,
	[IsCheck] [tinyint] NOT NULL,
	[IsLock] [tinyint] NOT NULL,
	[JoinDate] [datetime] NOT NULL,
	[LastIp] [varchar](50) NOT NULL,
	[SortId] [int] NOT NULL,
	[InfoNum] [int] NULL,
	[Photo] [varchar](250) NULL,
	[LastLoginDate] [datetime] NULL,
	[LoginNum] [int] NULL,
	[IsRecommend] [tinyint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_agent_commen]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_agent_commen](
	[id] [int] NOT NULL,
	[AgentId] [int] NOT NULL,
	[UserName] [varchar](50) NOT NULL,
	[Content] [text] NOT NULL,
	[PubDate] [datetime] NOT NULL,
	[PubIp] [varchar](50) NULL,
	[Reply] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[t_category]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[t_category](
	[id] [int] NOT NULL,
	[Title] [varchar](250) NOT NULL,
	[Template] [varchar](250) NOT NULL,
	[SavePath] [varchar](250) NOT NULL,
	[ParentId] [int] NOT NULL CONSTRAINT [DF_t_category_ParentId]  DEFAULT (0),
	[IsChannel] [int] NOT NULL CONSTRAINT [DF_t_category_IsChannel]  DEFAULT (0),
	[LinkUrl] [varchar](250) NOT NULL,
	[Desrb] [text] NULL,
	[Keywords] [text] NULL,
	[SortNum] [int] NOT NULL CONSTRAINT [DF_t_category_SortNum]  DEFAULT (0),
	[ModiTime] [datetime] NULL CONSTRAINT [DF_t_category_ModiTime]  DEFAULT (getdate()),
	[ShowTemplateId] [int] NULL CONSTRAINT [DF_t_category_ShowTemplateId]  DEFAULT (1),
	[AllowContributor] [int] NULL CONSTRAINT [DF_t_category_AllowContributor]  DEFAULT (0),
	[DataModule] [int] NULL DEFAULT (1),
 CONSTRAINT [PK_t_category] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END


INSERT INTO t_admin(UserName,PassWord,LoginNum,IsLock,RoleId,ModiTime) VALUES ('admins','2AEFC34200A294A3CC7DB81B43A81873',0,0,0,GetDate());
GO

INSERT INTO t_category(id,Title,Template,SavePath,ParentId,IsChannel,LinkUrl,Desrb,Keywords,SortNum,ModiTime,ShowTemplateId) values(1,'首页','/Template/index.html','/',0,1,'/','CMS首页','CMS首页',1,GetDate(),1);
GO

INSERT INTO t_label (CategoryId,Title,Demons,Content,ModiTime) values (1,'$Flink$','友情链接','GetFlinks(4,8,0,#ffffff,#f5f5f5)',GetDate());

GO

INSERT INTO t_label (CategoryId,Title,Demons,Content,ModiTime) values (0,'$Head$','头文件','ImportUri(0,utf-8,head.htm)',GetDate());

GO

INSERT INTO t_label (CategoryId,Title,Demons,Content,ModiTime) values (0,'$Root$','网站尾','ImportUri(0,utf-8,root.htm)',GetDate());

GO
insert into t_download_server(Title,Url,Active,Demons) values('当前服务器','/download',1,'下载软件存放在当前网站download文件夹里');
GO

insert into t_module(Title,TableName,Pid,ListFields) values('文章','t_article',0,'');
GO

insert into t_module(Title,TableName,Pid,ListFields) values('下载','t_download_soft',0,'');
GO

insert into t_module(Title,TableName,Pid,ListFields) values('视频','t_video',0,'');
GO

insert into t_module(Title,TableName,Pid,ListFields) values('商品','t_shop',0,'');
GO
          
insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'id','id',1,50,1,'id','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'Title','Title',1,50,1,'Title','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'SubHeading','SubHeading',1,50,1,'SubHeading','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'Photo','Photo',1,50,1,'Photo','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'SavePath','SavePath',1,50,1,'SavePath','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'Summary','Summary',1,50,1,'Summary','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(1,'ModDate','ModDate',1,50,1,'ModDate','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftName','SoftName',1,50,1,'SoftName','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftKey','SoftKey',1,50,1,'SoftKey','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftVersion','SoftVersion',1,50,1,'SoftVersion','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftLanguage','SoftLanguage',1,50,1,'SoftLanguage','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftLicense','SoftLicense',1,50,1,'SoftLicense','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftAttr','SoftAttr',1,50,1,'SoftAttr','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftSize','SoftSize',1,50,1,'SoftSize','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftAuthor','SoftAuthor',1,50,1,'SoftAuthor','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftPhoto','SoftPhoto',1,50,1,'SoftPhoto','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftDemons','SoftDemons',1,50,1,'SoftDemons','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'ModifyDate','ModifyDate',1,50,1,'ModifyDate','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(2,'SoftHits','SoftHits',1,50,1,'SoftHits','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(3,'Title','Title',1,50,1,'Title','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(3,'ViewImg','ViewImg',1,50,1,'ViewImg','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(3,'ModiTime','ModiTime',1,50,1,'ModiTime','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(3,'Author','Author',1,50,1,'Author','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(3,'VideoLen','VideoLen',1,50,1,'VideoLen','',0,'||',1,1);
GO

insert into t_fields(DataModule,FieldName,FieldTitle,FieldType,FieldLen,FormType,FormText,FormDefault,IsBindTable,BindPara,ShowInList,SysFields) values(3,'Hits','Hits',1,50,1,'Hits','',0,'||',1,1);
GO

          

INSERT INTO t_template(Title,Content,ModiTime) values('文章模板一','<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>$Title$-$CategoryName$</title>
<meta name="description" content="$Description$" />
<meta name="keywords" content="$Keywords$" />
<link href="/style/global.css" rel="stylesheet" type="text/css" />
<link href="/style/show.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/commen.js"></script>
<script type="text/javascript">
function homePage(obj){
	obj.style.behavior="url(#default#homepage)";
	obj.setHomePage("$SiteUrl$");
}
function showCheckCodes(){
	var codepath=document.getElementById(''showcheckcode_img'').src;
	if(codepath.indexOf(''blank.gif'')!=-1){
      document.getElementById(''showcheckcode_img'').src=''/CaptchaImage.aspx'';
    } 	
}
function checkSub(obj){
	with(obj){
		if(Author.value==""){
			alert("请输入用户名!");
			Author.select();
			Author.focus();
			return false;
		}
		if(Content.value=="" || Content.value.length<1){
			alert("请输入评论内容!");
			Content.select();
			Content.focus();
			return false;
		}
		if(CertCode.value==""){
			alert("请输入验证码!");
			CertCode.select();
			CertCode.focus();
			return false;
		}
	}
}
</script>
</head>

<body>
<div class="container">
	$Head$
  <div class="br"></div>
  <div class="position">现在位置：<a href="$SiteUrl$">首页</a>$Position$</div>
  <div class="contain">
	<!--left-->
	<div class="left">
	  <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
	    <tr>
	      <td class="table_th"><span class="table_title">编辑推荐</span></td>
	      </tr>
	    <tr>
	      <td>
        $Dynamic_Recommend$
        </td>
	      </tr>
	    </table>
      <div class="br"></div>
	  	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
	    <tr>
	      <td class="table_th"><span class="table_title">热门点击</span></td>
	      </tr>
	    <tr>
	      <td>
        $Dynamic_Hits$
        </td>
	      </tr>
	    </table>
      <div class="br"></div>
	  	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
	    <tr>
	      <td class="table_th"><span class="table_title">图片推荐</span></td>
	      </tr>
	    <tr>
	      <td class="pad5">
        $Dynamic_Pics$
        </td>
	      </tr>
	    </table>
  </div>
	<div class="right">
	  <div class="show_container">
				
			<div class="title">$Title$</div>
			<div class="titleparas">作者：$Author$ 日期：$ModiTime$ 出处：$SourceFrom$ 点击:<span id="content_hits"></span></div>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td class="content">$Content$</td>
              </tr>
              <tr>
                 <td>
                 上一篇：$PreArticle$
                 下一篇：$NextArticle$
                 </td>
              </tr>
        </table>
			<p align="center">$PageSplitList$</p>	
			<div class="tools">
				<ul>
				<li><a href="$SiteUrl$">返回首页</a></li>
				<li><a href="javascript:print();">打印本文</a></li>
				<li><a href="#" onclick="window.external.AddFavorite(location.href,document.title);">加入收藏</a></li>
				<li><a href="#">返回顶部</a></li>
				<li><a href="javascript:window.close()">关闭窗口</a></li>
				</ul>
			</div>			  
		  <!--开始评论-->
<table width="100%" border="0" cellspacing="2" cellpadding="0" class="border">
              <tr>
                <td width="50%" class="thead"><img src="/images/line1.gif" width="6" height="17" align="absmiddle" /> 相关文章</td>
                <td class="thead"><span class="col_right"><a href="/Commen/view.aspx?id=$id$" target="_blank">查看留言</a></span> <img src="/images/line1.gif" width="6" height="17" align="absmiddle" /> 发表评论 </td>
              </tr>
              <tr>
                <td valign="top">
				<div class="relatelink">
					<ul>
					  $RelateLink$
					</ul>
				</div>
				</td>
                <td valign="top"><form action="/Commen/Save.aspx" method="post" name="form1" id="form1" onsubmit="return checkSub(this)">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <tr>
                        <td align="center" valign="middle">用 户：</td>
                        <td align="left" valign="middle"><input name="Author" type="text" id="Author" size="15" maxlength="30" onfocus="showCheckCodes()" /></td>
                      </tr>
                      <tr>
                        <td align="center" valign="middle">内 容：</td>
                        <td align="left" valign="middle"><textarea name="Content" style="width:90%;" rows="5" id="Content" onfocus="showCheckCodes()"></textarea></td>
                      </tr>
                      <tr>
                        <td align="center" valign="middle">验证码：</td>
                        <td align="left" valign="middle"><input name="CertCode" type="text" onfocus="showCheckCodes()" size="6" />
                            <img src="/images/blank.gif" align="absmiddle" id="showcheckcode_img" onfocus="showCheckCodes()" onclick="this.src=''/CaptchaImage.aspx''" alt="看不清?换一张试试!" /></td>
                      </tr>
                      <tr>
                        <td height="45" align="center" valign="middle"></td>
                        <td align="left" valign="middle"><input type="hidden" value="$id$" name="ArticleId" />
                            <input type="hidden" value="$CategoryId$" name="CategoryId" />
                            <input type="submit" name="Submit" value="提交" />
                            <input type="reset" name="Submit2" value="重写" /></td>
                      </tr>
                    </table>
                </form></td>
              </tr>
        </table>
		  <!--end -->
	  </div>
	</div>
  <div class="clear"></div>
</div>
<div class="br"></div>
$Root$
</div>
<script src="/js/stat.aspx?id=$id$"></script>
</body>
</html>',GetDate())
GO