if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Appraise]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Appraise]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Badlanguage]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Badlanguage]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_BbsLink]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_BbsLink]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_BbsNews]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_BbsNews]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_BestTopic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_BestTopic]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Bill_Online_Payment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Bill_Online_Payment]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Bill_Orders]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Bill_Orders]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Board]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Board]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_BoardPermission]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_BoardPermission]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_BookMark]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_BookMark]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_ChallengeInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_ChallengeInfo]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_ChanOrders]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_ChanOrders]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Friend]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Friend]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_GroupName]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_GroupName]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_GroupUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_GroupUser]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Group_Board]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Group_Board]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Group_Class]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Group_Class]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Group_Topic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Group_Topic]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Group_bbs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Group_bbs]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Label]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Label]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Log]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Log]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Medal]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Medal]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_MedalLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_MedalLog]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Menu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Menu]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Message]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Message]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_MoneyLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_MoneyLog]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Online]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Online]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Plus]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Plus]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Plus_Invite]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Plus_Invite]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Plus_Invite_Setup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Plus_Invite_Setup]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Plus_Tools_Buss]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Plus_Tools_Buss]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Plus_Tools_Info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Plus_Tools_Info]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Plus_Tools_MagicFace]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Plus_Tools_MagicFace]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Qcomic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Qcomic]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Rating]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Rating]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Setup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Setup]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_SmallPaper]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_SmallPaper]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Space_skin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Space_skin]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Space_user]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Space_user]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Style]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Style]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_StyleHelp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_StyleHelp]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_TableList]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_TableList]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Templates]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Templates]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Topic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Topic]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Upfile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Upfile]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_User]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_User]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_UserAccess]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_UserAccess]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_UserGroups]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_UserGroups]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_Vote]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_Vote]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_VoteUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_VoteUser]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_admin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_admin]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_album]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_album]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_albumbbs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_albumbbs]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_albumconfig]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_albumconfig]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_albumfav]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_albumfav]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_albumimg]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_albumimg]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_albumtype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_albumtype]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_banzhu_config]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_banzhu_config]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_banzhu_log]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_banzhu_log]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_banzhu_user]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_banzhu_user]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_bbs1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_bbs1]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_bbs2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_bbs2]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_help]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Hst_help]
-----
CREATE TABLE [dbo].[Hst_Appraise] (
	[AppraiseID] [int] IDENTITY (1, 1) NOT NULL ,
	[Boardid] [int] NOT NULL ,
	[TopicID] [int] NOT NULL ,
	[PostID] [int] NOT NULL ,
	[AType] [int] NOT NULL ,
	[ATitle] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[UserID] [int] NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateTime] [smalldatetime] NULL ,
	[IP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Badlanguage] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[content] [text] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_BbsLink] (
	[id] [int] NOT NULL ,
	[boardname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[readme] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[url] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[logo] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[islogo] [int] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_BbsNews] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[boardid] [int] NULL ,
	[title] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[bgs] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[re_email] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[re_content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[re_user] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[view_user] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_BestTopic] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[Announceid] [int] NULL ,
	[RootID] [int] NULL ,
	[BoardID] [int] NULL ,
	[Title] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostUserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostUserID] [int] NULL ,
	[DateAndTime] [smalldatetime] NULL ,
	[Expression] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Bill_Online_Payment] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[api_uname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[api_pass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[api_ms] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[active] [tinyint] NULL ,
	[orders] [int] NULL ,
	[indeximg] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[orther] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[usermoney] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Bill_Orders] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[uname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[uid] [int] NULL ,
	[acount] [float] NULL ,
	[ip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [datetime] NULL ,
	[orderid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[active] [tinyint] NULL ,
	[proname] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Board] (
	[boardid] [int] NOT NULL ,
	[BoardType] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NOT NULL ,
	[ParentStr] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Depth] [smallint] NULL ,
	[RootID] [int] NULL ,
	[Child] [smallint] NULL ,
	[readme] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[BoardMaster] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostNum] [int] NULL ,
	[TopicNum] [int] NULL ,
	[indexIMG] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[todayNum] [int] NULL ,
	[boarduser] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPost] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Orders] [int] NULL ,
	[sid] [int] NULL ,
	[Board_Setting] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Board_Ads] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Board_user] [varchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsGroupSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[BoardTopStr] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CID] [tinyint] NULL ,
	[Rules] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[topicnumistop] [int] NULL ,
	[stamp] [int] NULL ,
	[stampstr] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_BoardPermission] (
	[Pid] [int] IDENTITY (1, 1) NOT NULL ,
	[BoardID] [int] NULL ,
	[GroupID] [int] NULL ,
	[PSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_BookMark] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[url] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[topic] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[userid] [int] NULL ,
	[boardid] [int] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_ChallengeInfo] (
	[D_ForumID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_Password] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_RealName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_identityNo] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_sex] [varchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_postcode] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_address] [varchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_receiver] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_email] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_forumname] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_forumurl] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_telephone] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_mobile] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_forumProvider] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_version] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[D_challengePassWord] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_ChanOrders] (
	[O_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[O_type] [smallint] NULL ,
	[O_mobile] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_Username] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_isApply] [tinyint] NULL ,
	[O_issuc] [tinyint] NULL ,
	[O_PayMoney] [float] NULL ,
	[O_Paycode] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_BoardID] [int] NULL ,
	[O_TopicID] [int] NULL ,
	[O_AddTime] [smalldatetime] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Friend] (
	[F_id] [int] IDENTITY (1, 1) NOT NULL ,
	[F_username] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_friend] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_addtime] [smalldatetime] NULL ,
	[F_userid] [int] NULL ,
	[F_Mod] [tinyint] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_GroupName] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[GroupName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupInfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AppUserID] [int] NOT NULL ,
	[AppUserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserNum] [int] NOT NULL ,
	[Stats] [int] NOT NULL ,
	[PostNum] [int] NOT NULL ,
	[TopicNum] [int] NOT NULL ,
	[TodayNum] [int] NOT NULL ,
	[YesterdayNum] [int] NOT NULL ,
	[LimitUser] [int] NOT NULL ,
	[AppDate] [smalldatetime] NULL ,
	[PassDate] [smalldatetime] NULL ,
	[visitDate] [smalldatetime] NULL ,
	[Locked] [tinyint] NOT NULL ,
	[viewflag] [tinyint] NOT NULL ,
	[GroupLogo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClassId] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_GroupUser] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[GroupID] [int] NOT NULL ,
	[UserID] [int] NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsLock] [int] NOT NULL ,
	[Intro] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Group_Board] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[BoardName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BoardInfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IndexIMG] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[TopicNum] [int] NULL ,
	[TodayNum] [int] NULL ,
	[PostNum] [int] NULL ,
	[RootID] [int] NULL ,
	[LastPost] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[FoundDate] [smalldatetime] NULL ,
	[Rules] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[BoardStats] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Group_Class] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ClassName] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[GroupCount] [int] NULL ,
	[Orders] [int] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Group_Topic] (
	[TopicID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupID] [int] NOT NULL ,
	[BoardID] [int] NOT NULL ,
	[PollID] [int] NOT NULL ,
	[LockTopic] [int] NOT NULL ,
	[Child] [int] NOT NULL ,
	[PostUserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostUserID] [int] NOT NULL ,
	[DateAndTime] [smalldatetime] NULL ,
	[hits] [int] NULL ,
	[Expression] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPost] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[istop] [tinyint] NULL ,
	[LastPostTime] [smalldatetime] NULL ,
	[isbest] [tinyint] NULL ,
	[Mode] [tinyint] NULL ,
	[TopicMode] [tinyint] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Group_bbs] (
	[AnnounceID] [int] IDENTITY (1, 1) NOT NULL ,
	[ParentID] [int] NOT NULL ,
	[GroupID] [int] NOT NULL ,
	[BoardID] [int] NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[postuserid] [int] NOT NULL ,
	[Topic] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Body] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[DateAndTime] [smalldatetime] NULL ,
	[length] [int] NULL ,
	[RootID] [int] NOT NULL ,
	[layer] [int] NULL ,
	[orders] [int] NULL ,
	[isbest] [tinyint] NOT NULL ,
	[ip] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[Expression] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[locktopic] [int] NOT NULL ,
	[signflag] [tinyint] NOT NULL ,
	[isagree] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[isupload] [tinyint] NULL ,
	[UbbList] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Label] (
	[LabelID] [int] IDENTITY (1, 1) NOT NULL ,
	[LabelType] [int] NULL ,
	[LabelName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ArgumentXMLDom] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[LabelBody] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[CreationDate] [datetime] NULL ,
	[EditDate] [datetime] NULL ,
	[UsePage] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Log] (
	[l_id] [int] IDENTITY (1, 1) NOT NULL ,
	[l_announceid] [int] NULL ,
	[l_boardid] [int] NULL ,
	[l_touser] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[l_username] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[l_content] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[l_addtime] [smalldatetime] NULL ,
	[l_ip] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[l_type] [tinyint] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Medal] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[MedalName] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[MedalDesc] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[MedalPic] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_MedalLog] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserId] [int] NULL ,
	[UserName] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[MedalId] [int] NULL ,
	[AwardUser] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[AwardDesc] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [datetime] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Menu] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[url] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[isshow] [tinyint] NULL ,
	[orderby] [int] NULL ,
	[plus_type] [tinyint] NULL ,
	[ison] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[target] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_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] [smalldatetime] NOT NULL ,
	[delR] [int] NOT NULL ,
	[delS] [int] NOT NULL ,
	[isSend] [int] NULL ,
	[con_length] [int] NULL ,
	[inceptuserid] [int] NULL ,
	[senderuserid] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_MoneyLog] (
	[Log_ID] [int] IDENTITY (1, 1) NOT FOR REPLICATION  NOT NULL ,
	[ToolsID] [int] NOT NULL ,
	[CountNum] [int] NOT NULL ,
	[Log_Money] [int] NULL ,
	[Log_Ticket] [int] NULL ,
	[AddUserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddUserID] [int] NULL ,
	[Log_IP] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Log_Time] [smalldatetime] NOT NULL ,
	[Log_Type] [tinyint] NULL ,
	[BoardID] [int] NULL ,
	[Conect] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[HMoney] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Online] (
	[id] [float] NOT NULL ,
	[username] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[userclass] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[stats] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[ip] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[actforip] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[startime] [smalldatetime] NULL ,
	[lastimebk] [smalldatetime] NULL ,
	[boardid] [int] NULL ,
	[browser] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserGroupID] [int] NULL ,
	[actCome] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[userhidden] [int] NULL ,
	[userid] [int] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Plus] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Plus_Type] [varchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Plus_Name] [varchar] (5000) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Isuse] [tinyint] NOT NULL ,
	[Plus_Setting] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Mainpage] [varchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[IsShowMenu] [tinyint] NOT NULL ,
	[plus_adminpage] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[plus_id] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[plus_Copyright] [varchar] (200) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Plus_Invite] (
	[DI_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DI_Code] [nvarchar] (16) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[DI_CreateDate] [datetime] NOT NULL ,
	[DI_TempDate] [datetime] NOT NULL ,
	[DI_FailDate] [datetime] NOT NULL ,
	[DI_CreateUserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DI_IsFail] [int] NOT NULL ,
	[DI_UserExpend] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[DI_RegUserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DI_RegTime] [datetime] NULL ,
	[DI_UserGain] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Plus_Invite_Setup] (
	[DI_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[DI_UserExpend] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[DI_UserLimit] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[DI_IsExpend] [tinyint] NOT NULL ,
	[DI_IsCreate] [tinyint] NOT NULL ,
	[DI_TempMinute] [int] NOT NULL ,
	[DI_FailDate] [int] NOT NULL ,
	[DI_Readme] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[DI_IsGain] [tinyint] NOT NULL ,
	[DI_UserGain] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Plus_Tools_Buss] (
	[ID] [int] IDENTITY (1, 1) NOT FOR REPLICATION  NOT NULL ,
	[UserID] [int] NOT NULL ,
	[UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ToolsID] [int] NOT NULL ,
	[ToolsName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ToolsCount] [int] NOT NULL ,
	[SaleCount] [int] NOT NULL ,
	[UpdateTime] [smalldatetime] NOT NULL ,
	[SaleMoney] [int] NOT NULL ,
	[SaleTicket] [int] NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Plus_Tools_Info] (
	[ID] [int] IDENTITY (1, 1) NOT FOR REPLICATION  NOT NULL ,
	[ToolsName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ToolsInfo] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ToolsImg] [varchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsStar] [smallint] NOT NULL ,
	[SysStock] [int] NOT NULL ,
	[UserStock] [int] NOT NULL ,
	[UserTicket] [int] NOT NULL ,
	[UserMoney] [int] NOT NULL ,
	[UserPost] [int] NOT NULL ,
	[UserWealth] [int] NOT NULL ,
	[UserEp] [int] NOT NULL ,
	[UserCp] [int] NOT NULL ,
	[UserGroupID] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BoardID] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[BuyType] [tinyint] NOT NULL ,
	[ToolsSetting] [text] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Plus_Tools_MagicFace] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MagicFace_s] [int] NULL ,
	[MagicFace_l] [int] NULL ,
	[MagicType] [smallint] NULL ,
	[iMoney] [int] NULL ,
	[iTicket] [int] NULL ,
	[tMoney] [int] NULL ,
	[tTicket] [int] NULL ,
	[MagicSetting] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Qcomic] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[senable] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[semail] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[sid] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[spassword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[skey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[owidth] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[oheight] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[iwidth] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[iheight] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ext1] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ext2] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ext3] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ext4] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ext5] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Rating] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NULL ,
	[uname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[about] [nvarchar] (400) COLLATE Chinese_PRC_CI_AS NULL ,
	[poco] [int] NULL ,
	[rootid] [int] NULL ,
	[annid] [int] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Setup] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[Forum_Setting] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_ads] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_Badwords] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_rBadword] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_Maxonline] [int] NOT NULL ,
	[Forum_MaxonlineDate] [smalldatetime] NOT NULL ,
	[Forum_TopicNum] [int] NOT NULL ,
	[Forum_PostNum] [int] NOT NULL ,
	[Forum_TodayNum] [int] NOT NULL ,
	[Forum_UserNum] [int] NOT NULL ,
	[Forum_YesTerdayNum] [int] NOT NULL ,
	[Forum_MaxPostNum] [int] NOT NULL ,
	[Forum_MaxPostDate] [smalldatetime] NOT NULL ,
	[Forum_lastUser] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_LastPost] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_BirthUser] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_Sid] [int] NOT NULL ,
	[Forum_Version] [varchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_NowUseBBS] [varchar] (8) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_IsInstall] [tinyint] NOT NULL ,
	[Forum_challengePassWord] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_Ad] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_ChanName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_ChanSetting] [varchar] (250) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_LockIP] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_Cookiespath] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_Boards] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_alltopnum] [varchar] (250) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_pack] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_Cid] [tinyint] NOT NULL ,
	[Forum_AvaSiteID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_AvaSign] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_AdminFolder] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Forum_BoardXML] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_Css] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_apis] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Forum_nocheck] [text] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_SmallPaper] (
	[S_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[S_BoardID] [int] NULL ,
	[S_UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Title] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Content] [varchar] (1000) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Hits] [int] NULL ,
	[S_Addtime] [smalldatetime] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Space_skin] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_userid] [int] NOT NULL ,
	[s_css] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[s_style] [int] NOT NULL ,
	[s_path] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_lock] [int] NOT NULL ,
	[s_addtime] [smalldatetime] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Space_user] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[userid] [int] NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[intro] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_left] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_right] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_center] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_css] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[s_style] [int] NOT NULL ,
	[s_path] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[updatetime] [smalldatetime] NULL ,
	[lock] [int] NOT NULL ,
	[set] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[cachedb] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ownercachedb] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[plusdb] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Style] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[StyleName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Main_Style] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Style_Pic] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_index] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_dispbbs] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_showerr] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_login] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_online] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_usermanager] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_fmanage] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_boardstat] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_paper_even_toplist] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_query] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_show] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_dispuser] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_help_permission] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_postjob] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_post] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_boardhelp] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_indivgroup] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_StyleHelp] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[StyleName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Main_Style] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Style_Pic] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_index] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_dispbbs] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_showerr] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_login] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_online] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_usermanager] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_fmanage] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_boardstat] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_paper_even_toplist] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_query] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_show] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_dispuser] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_help_permission] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_postjob] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_post] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_boardhelp] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[page_indivgroup] [text] COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_TableList] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[TableName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[TableType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Templates] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Type] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Folder] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Layout] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[isde] [tinyint] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Topic] (
	[TopicID] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [varchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Boardid] [int] NOT NULL ,
	[PollID] [int] NULL ,
	[LockTopic] [int] NOT NULL ,
	[Child] [int] NULL ,
	[PostUsername] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[PostUserid] [int] NOT NULL ,
	[DateAndTime] [datetime] NOT NULL ,
	[hits] [int] NOT NULL ,
	[Expression] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[VoteTotal] [int] NULL ,
	[LastPost] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastPostTime] [smalldatetime] NOT NULL ,
	[istop] [tinyint] NOT NULL ,
	[isvote] [tinyint] NULL ,
	[isbest] [tinyint] NULL ,
	[PostTable] [varchar] (8) COLLATE Chinese_PRC_CI_AS NULL ,
	[SmsUserList] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[IsSmsTopic] [tinyint] NULL ,
	[LastSmsTime] [datetime] NULL ,
	[TopicMode] [tinyint] NULL ,
	[Mode] [smallint] NULL ,
	[GetMoney] [int] NOT NULL ,
	[UseTools] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GetMoneyType] [tinyint] NOT NULL ,
	[HideName] [tinyint] NOT NULL ,
	[highlight] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[stamp] [int] NULL ,
	[mood0] [int] NULL ,
	[mood1] [int] NULL ,
	[mood2] [int] NULL ,
	[mood3] [int] NULL ,
	[mood4] [int] NULL ,
	[mood5] [int] NULL ,
	[mood6] [int] NULL ,
	[mood7] [int] NULL ,
	[rating] [int] NULL ,
	[isact] [int] NULL ,
	[topicnumistop] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Upfile] (
	[F_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[F_AnnounceID] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_BoardID] [int] NULL ,
	[F_UserID] [int] NULL ,
	[F_Username] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_Filename] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_Viewname] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_FileType] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_Type] [smallint] NULL ,
	[F_FileSize] [int] NULL ,
	[F_Readme] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_DownNum] [int] NULL ,
	[F_ViewNum] [int] NULL ,
	[F_DownUser] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[F_Flag] [tinyint] NULL ,
	[F_AddTime] [smalldatetime] NULL ,
	[F_OldName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_Isindexpic] [tinyint] NULL ,
	[F_topicid] [int] NULL ,
	[f_bbsid] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_User] (
	[UserID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserPassword] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserEmail] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserPost] [int] NULL ,
	[UserTopic] [int] NULL ,
	[UserSign] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[UserSex] [tinyint] NULL ,
	[UserFace] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserWidth] [int] NULL ,
	[UserHeight] [int] NULL ,
	[UserIM] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[JoinDate] [datetime] NULL ,
	[LastLogin] [datetime] NULL ,
	[UserLogins] [int] NULL ,
	[UserViews] [int] NULL ,
	[LockUser] [tinyint] NULL ,
	[UserClass] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserGroup] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserMoney] [int] NULL ,
	[UserTicket] [int] NULL ,
	[userWealth] [int] NULL ,
	[userEP] [int] NULL ,
	[userCP] [int] NULL ,
	[UserPower] [int] NULL ,
	[UserDel] [int] NULL ,
	[UserIsBest] [int] NULL ,
	[UserTitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserBirthday] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserQuesion] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserAnswer] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserLastIP] [varchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserPhoto] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserFav] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserInfo] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[UserSetting] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserGroupID] [int] NOT NULL ,
	[TitlePic] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserHidden] [tinyint] NULL ,
	[UserMsg] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsChallenge] [tinyint] NULL ,
	[UserMobile] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[TruePassWord] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserToday] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserIsAva] [tinyint] NULL ,
	[UserAvaSetting] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[FollowMsgID] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Vip_StarTime] [datetime] NULL ,
	[Vip_EndTime] [datetime] NULL ,
	[Passport] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fav_boards] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[mp3id] [int] NULL ,
	[VipDateEnd] [datetime] NULL ,
	[Flowers] [int] NULL ,
	[egg] [int] NULL ,
	[UserProducts] [int] NULL ,
	[useryc] [int] NULL ,
	[userzz] [int] NULL ,
	[RLActTimeT] [int] NULL ,
	[UserIsAudit] [int] NULL ,
	[UserMedal] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[regip] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[lastipinfo] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastMsg] [datetime] NULL ,
	[UserIsAudit_Custom] [int] NULL ,
	[TyMedaled] [int] NULL ,
	[usergroupname] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[password] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[passrnd] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[isechk] [tinyint] NULL ,
	[echkstr] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[echktime] [smalldatetime] NULL ,
	[errtimes] [smalldatetime] NULL ,
	[errtime] [int] NULL ,
	[SetUserTrue] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_UserAccess] (
	[uc_UserID] [int] NULL ,
	[uc_BoardID] [int] NULL ,
	[uc_Setting] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_UserGroups] (
	[UserGroupID] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[usertitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupSetting] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Orders] [smallint] NULL ,
	[MinArticle] [int] NULL ,
	[TitlePic] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[GroupPic] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentGID] [int] NULL ,
	[IsSetting] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserGroupIsAudit] [int] NULL ,
	[TyClsGroup] [int] NULL ,
	[TyClsGroupM] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_Vote] (
	[voteid] [int] IDENTITY (1, 1) NOT NULL ,
	[vote] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[votenum] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[votetype] [int] NULL ,
	[LockVote] [int] NULL ,
	[voters] [int] NULL ,
	[TimeOut] [smalldatetime] NULL ,
	[UArticle] [int] NULL ,
	[UWealth] [int] NULL ,
	[UEP] [int] NULL ,
	[UCP] [int] NULL ,
	[UPower] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_VoteUser] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[VoteID] [int] NULL ,
	[UserID] [int] NULL ,
	[VoteDate] [smalldatetime] NULL ,
	[VoteOption] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_admin] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Username] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Password] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[Flag] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[LastLogin] [smalldatetime] NULL ,
	[LastLoginIP] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Adduser] [varchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[AcceptIP] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[rnduserpassword] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[rndpass] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[errtimes] [int] NULL ,
	[errtime] [smalldatetime] NULL ,
	[quesion] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[answer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_album] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[userid] [int] NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[albumtitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[albumtype] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[albumsubtype] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[albumtext] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[topimgid] [int] NOT NULL ,
	[ishowdo] [int] NOT NULL ,
	[accesspwd] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[albumclass] [int] NULL ,
	[favcount] [int] NOT NULL ,
	[photonum] [int] NOT NULL ,
	[albumsize] [int] NULL ,
	[albummaxsize] [int] NULL ,
	[createdate] [datetime] NOT NULL ,
	[albumcover] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_albumbbs] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[imgid] [int] NOT NULL ,
	[userid] [int] NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[bbstext] [text] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[newphoto] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[newphototitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[createdate] [datetime] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_albumconfig] (
	[albumglobal] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[album] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[albumimg] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[albumbbs] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[albumfav] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[albumtype] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_albumfav] (
	[userid] [int] NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[favtype] [int] NOT NULL ,
	[favid] [int] NOT NULL ,
	[recdate] [datetime] NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_albumimg] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[albumid] [int] NOT NULL ,
	[userid] [int] NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[imgtitle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[imgtext] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[clickcount] [int] NOT NULL ,
	[bbscount] [int] NOT NULL ,
	[favcount] [int] NOT NULL ,
	[imgfile] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[zoomfile] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[filesize] [int] NOT NULL ,
	[uploaddate] [datetime] NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_albumtype] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[albumtype] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_banzhu_config] (
	[Gzdays] [smallint] NULL ,
	[gzifmess] [nvarchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[pagenum] [smallint] NULL ,
	[Gzjbgz] [int] NULL ,
	[gzsuperfj] [int] NULL ,
	[gzifarticle] [nvarchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzparticle] [real] NULL ,
	[gziflogins] [nvarchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzplogins] [real] NULL ,
	[gziflogs] [nvarchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[gzplogs] [real] NULL ,
	[ifautocancel] [nvarchar] (5) COLLATE Chinese_PRC_CI_AS NULL ,
	[autocday] [smallint] NULL ,
	[Gzlbt] [int] NULL ,
	[gzhmon] [int] NULL ,
	[gzwealth] [int] NULL ,
	[gzuserep] [int] NULL ,
	[gzusercp] [int] NULL ,
	[gzpower] [int] NULL ,
	[LeaveTimeout] [int] NULL ,
	[rUrl] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_banzhu_log] (
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LeaveTime] [datetime] NULL ,
	[LeaveDays] [int] NULL ,
	[Leave] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CancelLeave] [datetime] NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_banzhu_user] (
	[username] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[FuLiDate] [smalldatetime] NULL ,
	[oldlogs] [int] NULL ,
	[oldlogins] [int] NULL ,
	[lastinfo] [varchar] (120) COLLATE Chinese_PRC_CI_AS NULL ,
	[oldarticle] [int] NULL ,
	[IsLeave] [int] NULL ,
	[Leave] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[LeaveTime] [smalldatetime] NULL ,
	[Leavedays] [int] NOT NULL ,
	[IsSendMail] [int] NOT NULL 
) ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_bbs1] (
	[AnnounceID] [int] IDENTITY (1, 1) NOT NULL ,
	[ParentID] [int] NOT NULL ,
	[BoardID] [int] NOT NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Topic] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Body] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[DateAndTime] [datetime] NULL ,
	[length] [int] NULL ,
	[RootID] [int] NOT NULL ,
	[layer] [smallint] NULL ,
	[orders] [int] NOT NULL ,
	[isbest] [tinyint] NULL ,
	[ip] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[Expression] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[locktopic] [int] NOT NULL ,
	[signflag] [tinyint] NULL ,
	[emailflag] [tinyint] NULL ,
	[isagree] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostUserID] [int] NULL ,
	[IsAudit] [tinyint] NULL ,
	[IsUpload] [tinyint] NULL ,
	[PostBuyUser] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[Ubblist] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GetMoney] [int] NOT NULL ,
	[UseTools] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GetMoneyType] [tinyint] NOT NULL ,
	[flashid] [int] NULL ,
	[searchwhere] [tinyint] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_bbs2] (
	[AnnounceID] [int] IDENTITY (1, 1) NOT NULL ,
	[ParentID] [int] NULL ,
	[BoardID] [int] NULL ,
	[UserName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PostUserID] [int] NULL ,
	[Topic] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[Body] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[DateAndTime] [smalldatetime] NULL ,
	[length] [int] NULL ,
	[RootID] [int] NULL ,
	[layer] [int] NULL ,
	[orders] [int] NULL ,
	[isbest] [tinyint] NULL ,
	[ip] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[Expression] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[locktopic] [int] NULL ,
	[signflag] [tinyint] NULL ,
	[emailflag] [tinyint] NULL ,
	[isagree] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[isupload] [tinyint] NULL ,
	[isaudit] [tinyint] NULL ,
	[PostBuyUser] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[UbbList] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GetMoney] [int] NOT NULL ,
	[UseTools] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[GetMoneyType] [tinyint] NOT NULL ,
	[flashid] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
CREATE TABLE [dbo].[Hst_help] (
	[H_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[H_ParentID] [int] NULL ,
	[H_title] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_content] [text] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_type] [tinyint] NULL ,
	[H_stype] [int] NULL ,
	[H_bgimg] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Addtime] [smalldatetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Appraise] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Appraise] PRIMARY KEY  CLUSTERED 
	(
		[AppraiseID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Badlanguage] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Badlanguage] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_BbsNews] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_BbsNews] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_BestTopic] WITH NOCHECK ADD 
	CONSTRAINT [PK_BestTopic] PRIMARY KEY  CLUSTERED 
	(
		[id]
	) WITH  FILLFACTOR = 90  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Bill_Online_Payment] WITH NOCHECK ADD 
	CONSTRAINT [PK_Ht_Online_Payment] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Bill_Orders] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Bill_Orders] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_BoardPermission] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_BoardPermission] PRIMARY KEY  CLUSTERED 
	(
		[Pid]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_BookMark] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_BookMark] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_ChanOrders] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_ChanOrders] PRIMARY KEY  CLUSTERED 
	(
		[O_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Friend] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Friend] PRIMARY KEY  CLUSTERED 
	(
		[F_id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_GroupName] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_GroupName] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_GroupUser] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_GroupUser] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Group_Board] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Group_Board] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Group_Class] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Group_Class] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Group_Topic] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Group_Topic] PRIMARY KEY  CLUSTERED 
	(
		[TopicID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Group_bbs] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Group_bbs] PRIMARY KEY  CLUSTERED 
	(
		[AnnounceID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Label] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Label] PRIMARY KEY  CLUSTERED 
	(
		[LabelID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Log] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Log] PRIMARY KEY  CLUSTERED 
	(
		[l_id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Medal] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Medal] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_MedalLog] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_MedalLog] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Menu] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Menu] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_MoneyLog] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Plus_Tools_Log] PRIMARY KEY  CLUSTERED 
	(
		[Log_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Plus] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Plus] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Plus_Invite] WITH NOCHECK ADD 
	 PRIMARY KEY  CLUSTERED 
	(
		[DI_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Plus_Invite_Setup] WITH NOCHECK ADD 
	 PRIMARY KEY  CLUSTERED 
	(
		[DI_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Plus_Tools_Buss] WITH NOCHECK ADD 
	CONSTRAINT [PK_Tools_Buss] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Plus_Tools_Info] WITH NOCHECK ADD 
	CONSTRAINT [PK_Plus_Tools_Info] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Plus_Tools_MagicFace] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Plus_Tools_MagicFace] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Qcomic] WITH NOCHECK ADD 
	CONSTRAINT [PrimaryKey] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Rating] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Rating] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Setup] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Setup] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_SmallPaper] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_SmallPaper] PRIMARY KEY  CLUSTERED 
	(
		[S_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Space_skin] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Space_skin] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Space_user] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Space_user] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Style] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Style] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_StyleHelp] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_StyleHelp] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_TableList] WITH NOCHECK ADD 
	CONSTRAINT [PK_TableList] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Templates] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Templates] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Topic] WITH NOCHECK ADD 
	CONSTRAINT [PK_Topic] PRIMARY KEY  CLUSTERED 
	(
		[TopicID]
	) WITH  FILLFACTOR = 90  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Upfile] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Upfile] PRIMARY KEY  CLUSTERED 
	(
		[F_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_User] WITH NOCHECK ADD 
	CONSTRAINT [PK_user] PRIMARY KEY  CLUSTERED 
	(
		[UserID]
	) WITH  FILLFACTOR = 90  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_UserGroups] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_UserGroups] PRIMARY KEY  CLUSTERED 
	(
		[UserGroupID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Vote] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_Vote] PRIMARY KEY  CLUSTERED 
	(
		[voteid]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_VoteUser] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_VoteUser] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_admin] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_admin] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_album] WITH NOCHECK ADD 
	CONSTRAINT [PK_hst_album] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_albumbbs] WITH NOCHECK ADD 
	CONSTRAINT [PK_hst_albumbbs] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_albumimg] WITH NOCHECK ADD 
	CONSTRAINT [PK_hst_albumimg] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_bbs1] WITH NOCHECK ADD 
	CONSTRAINT [PK_bbs1] PRIMARY KEY  CLUSTERED 
	(
		[AnnounceID]
	) WITH  FILLFACTOR = 90  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_bbs2] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_bbs10] PRIMARY KEY  CLUSTERED 
	(
		[AnnounceID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_help] WITH NOCHECK ADD 
	CONSTRAINT [PK_Hst_help] PRIMARY KEY  CLUSTERED 
	(
		[H_ID]
	)  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_Appraise] ADD 
	CONSTRAINT [DF_Hst_Appraise_Boardid] DEFAULT (0) FOR [Boardid],
	CONSTRAINT [DF_Hst_Appraise_TopicID] DEFAULT (0) FOR [TopicID],
	CONSTRAINT [DF_Hst_Appraise_PostID] DEFAULT (0) FOR [PostID],
	CONSTRAINT [DF_Hst_Appraise_AType] DEFAULT (0) FOR [AType],
	CONSTRAINT [DF_Hst_Appraise_UserID] DEFAULT (0) FOR [UserID],
	CONSTRAINT [DF_Hst_Appraise_DateTime] DEFAULT (getdate()) FOR [DateTime]
-----
 CREATE  INDEX [PKlist] ON [dbo].[Hst_Appraise]([PostID], [AType]) ON [PRIMARY]
-----
 CREATE  INDEX [PKboard] ON [dbo].[Hst_Appraise]([Boardid]) ON [PRIMARY]
-----
 CREATE  INDEX [PKtopic] ON [dbo].[Hst_Appraise]([TopicID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_BbsLink] ADD 
	CONSTRAINT [DF_bbslink_islogo] DEFAULT (0) FOR [islogo]
-----
ALTER TABLE [dbo].[Hst_BbsNews] ADD 
	CONSTRAINT [DF_Hst_BbsNews_boardid] DEFAULT (0) FOR [boardid]
-----
 CREATE  INDEX [boardid] ON [dbo].[Hst_BbsNews]([boardid]) ON [PRIMARY]
-----
 CREATE  INDEX [PostUserID] ON [dbo].[Hst_BestTopic]([PostUserID]) ON [PRIMARY]
-----
 CREATE  INDEX [BoardID] ON [dbo].[Hst_BestTopic]([BoardID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Bill_Online_Payment] ADD 
	CONSTRAINT [DF_Ht_Online_Payment_active] DEFAULT (0) FOR [active],
	CONSTRAINT [DF_Ht_Online_Payment_orders] DEFAULT (0) FOR [orders],
	CONSTRAINT [DF_Hst_Bill_Online_Payment_usermoney] DEFAULT (0) FOR [usermoney]
-----
ALTER TABLE [dbo].[Hst_Bill_Orders] ADD 
	CONSTRAINT [DF_Hst_Bill_Orders_uid] DEFAULT (0) FOR [uid],
	CONSTRAINT [DF_Hst_Bill_Orders_acount] DEFAULT (0) FOR [acount],
	CONSTRAINT [DF_Hst_Bill_Orders_active] DEFAULT (0) FOR [active]
-----
ALTER TABLE [dbo].[Hst_Board] ADD 
	CONSTRAINT [DF_board_ParentID] DEFAULT (0) FOR [ParentID],
	CONSTRAINT [DF_board_Depth] DEFAULT (0) FOR [Depth],
	CONSTRAINT [DF_board_RootID] DEFAULT (0) FOR [RootID],
	CONSTRAINT [DF_board_Child] DEFAULT (0) FOR [Child],
	CONSTRAINT [DF_board_CID] DEFAULT (0) FOR [CID],
	CONSTRAINT [DF__Hst_Board__topic__5E74FADA] DEFAULT (0) FOR [topicnumistop],
	CONSTRAINT [DF__Hst_Board__stamp__5F691F13] DEFAULT (0) FOR [stamp],
	CONSTRAINT [PK_board] PRIMARY KEY  NONCLUSTERED 
	(
		[boardid]
	) WITH  FILLFACTOR = 90  ON [PRIMARY] 
-----
ALTER TABLE [dbo].[Hst_BookMark] ADD 
	CONSTRAINT [DF__Hst_bookm__useri__7834CCDD] DEFAULT (0) FOR [userid],
	CONSTRAINT [DF__Hst_bookm__board__7928F116] DEFAULT (0) FOR [boardid]
-----
ALTER TABLE [dbo].[Hst_ChanOrders] ADD 
	CONSTRAINT [DF_Hst_ChanOrders_O_isApply] DEFAULT (0) FOR [O_isApply],
	CONSTRAINT [DF_Hst_ChanOrders_O_issuc] DEFAULT (0) FOR [O_issuc],
	CONSTRAINT [DF_Hst_ChanOrders_O_BoardID] DEFAULT (0) FOR [O_BoardID],
	CONSTRAINT [DF_Hst_ChanOrders_O_TopicID] DEFAULT (0) FOR [O_TopicID],
	CONSTRAINT [DF_Hst_ChanOrders_O_AddTime] DEFAULT (getdate()) FOR [O_AddTime]
-----
ALTER TABLE [dbo].[Hst_Friend] ADD 
	CONSTRAINT [DF_Friend_F_addtime] DEFAULT (getdate()) FOR [F_addtime],
	CONSTRAINT [DF__Hst_FriEnd__F_Mod__1387E197] DEFAULT (0) FOR [F_Mod]
-----
ALTER TABLE [dbo].[Hst_GroupName] ADD 
	CONSTRAINT [DF_Hst_GroupName_AppUserID] DEFAULT (0) FOR [AppUserID],
	CONSTRAINT [DF_Hst_GroupName_UserNum] DEFAULT (0) FOR [UserNum],
	CONSTRAINT [DF_Hst_GroupName_Stats] DEFAULT (0) FOR [Stats],
	CONSTRAINT [DF_Hst_GroupName_PostNum] DEFAULT (0) FOR [PostNum],
	CONSTRAINT [DF_Hst_GroupName_TopicNum] DEFAULT (0) FOR [TopicNum],
	CONSTRAINT [DF_Hst_GroupName_TodayNum] DEFAULT (0) FOR [TodayNum],
	CONSTRAINT [DF_Hst_GroupName_YesterdayNum] DEFAULT (0) FOR [YesterdayNum],
	CONSTRAINT [DF_Hst_GroupName_LimitUser] DEFAULT (0) FOR [LimitUser],
	CONSTRAINT [DF_Hst_GroupName_AppDate] DEFAULT (getdate()) FOR [AppDate],
	CONSTRAINT [DF_Hst_GroupName_PassDate] DEFAULT (getdate()) FOR [PassDate],
	CONSTRAINT [DF_Hst_GroupName_visitDate] DEFAULT (getdate()) FOR [visitDate],
	CONSTRAINT [DF_Hst_GroupName_Locked] DEFAULT (0) FOR [Locked],
	CONSTRAINT [DF_Hst_GroupName_viewflag] DEFAULT (0) FOR [viewflag],
	CONSTRAINT [DF__Hst_GroupN__Class__75C27486] DEFAULT (0) FOR [ClassId]
-----
ALTER TABLE [dbo].[Hst_GroupUser] ADD 
	CONSTRAINT [DF_Hst_GroupUser_GroupID] DEFAULT (0) FOR [GroupID],
	CONSTRAINT [DF_Hst_GroupUser_UserID] DEFAULT (0) FOR [UserID],
	CONSTRAINT [DF_Hst_GroupUser_IsLock] DEFAULT (0) FOR [IsLock]
-----
ALTER TABLE [dbo].[Hst_Group_Board] ADD 
	CONSTRAINT [DF_Hst_Group_Board_TopicNum] DEFAULT (0) FOR [TopicNum],
	CONSTRAINT [DF_Hst_Group_Board_TodayNum] DEFAULT (0) FOR [TodayNum],
	CONSTRAINT [DF_Hst_Group_Board_PostNum] DEFAULT (0) FOR [PostNum],
	CONSTRAINT [DF_Hst_Group_Board_RootID] DEFAULT (0) FOR [RootID],
	CONSTRAINT [DF_Hst_Group_Board_FoundDate] DEFAULT (getdate()) FOR [FoundDate],
	CONSTRAINT [DF_Hst_Group_Board_BoardStats] DEFAULT (0) FOR [BoardStats]
-----
ALTER TABLE [dbo].[Hst_Group_Class] ADD 
	CONSTRAINT [DF__Hst_Group___Class__72E607DB] DEFAULT ('') FOR [ClassName],
	CONSTRAINT [DF__Hst_Group___Group__73DA2C14] DEFAULT (0) FOR [GroupCount],
	CONSTRAINT [DF__Hst_Group___Order__74CE504D] DEFAULT (0) FOR [Orders]
-----
ALTER TABLE [dbo].[Hst_Group_Topic] ADD 
	CONSTRAINT [DF_Hst_Group_Topic_GroupID] DEFAULT (0) FOR [GroupID],
	CONSTRAINT [DF_Hst_Group_Topic_BoardID] DEFAULT (0) FOR [BoardID],
	CONSTRAINT [DF_Hst_Group_Topic_PollID] DEFAULT (0) FOR [PollID],
	CONSTRAINT [DF_Hst_Group_Topic_LockTopic] DEFAULT (0) FOR [LockTopic],
	CONSTRAINT [DF_Hst_Group_Topic_Child] DEFAULT (0) FOR [Child],
	CONSTRAINT [DF_Hst_Group_Topic_PostUserID] DEFAULT (0) FOR [PostUserID],
	CONSTRAINT [DF_Hst_Group_Topic_DateAndTime] DEFAULT (getdate()) FOR [DateAndTime],
	CONSTRAINT [DF_Hst_Group_Topic_hits] DEFAULT (0) FOR [hits],
	CONSTRAINT [DF_Hst_Group_Topic_istop] DEFAULT (0) FOR [istop],
	CONSTRAINT [DF_Hst_Group_Topic_LastPostTime] DEFAULT (getdate()) FOR [LastPostTime],
	CONSTRAINT [DF_Hst_Group_Topic_isbest] DEFAULT (0) FOR [isbest],
	CONSTRAINT [DF_Hst_Group_Topic_Mode] DEFAULT (0) FOR [Mode],
	CONSTRAINT [DF_Hst_Group_Topic_TopicMode_1] DEFAULT (0) FOR [TopicMode]
-----
ALTER TABLE [dbo].[Hst_Group_bbs] ADD 
	CONSTRAINT [DF_Hst_Group_bbs_ParentID] DEFAULT (0) FOR [ParentID],
	CONSTRAINT [DF_Hst_Group_bbs_GroupID] DEFAULT (0) FOR [GroupID],
	CONSTRAINT [DF_Hst_Group_bbs_BoardID] DEFAULT (0) FOR [BoardID],
	CONSTRAINT [DF_Hst_Group_bbs_postuserid] DEFAULT (0) FOR [postuserid],
	CONSTRAINT [DF_Hst_Group_bbs_DateAndTime] DEFAULT (getdate()) FOR [DateAndTime],
	CONSTRAINT [DF_Hst_Group_bbs_length] DEFAULT (0) FOR [length],
	CONSTRAINT [DF_Hst_Group_bbs_RootID] DEFAULT (0) FOR [RootID],
	CONSTRAINT [DF_Hst_Group_bbs_layer] DEFAULT (0) FOR [layer],
	CONSTRAINT [DF_Hst_Group_bbs_orders] DEFAULT (0) FOR [orders],
	CONSTRAINT [DF_Hst_Group_bbs_isbest] DEFAULT (0) FOR [isbest],
	CONSTRAINT [DF_Hst_Group_bbs_locktopic] DEFAULT (0) FOR [locktopic],
	CONSTRAINT [DF_Hst_Group_bbs_signflag] DEFAULT (0) FOR [signflag],
	CONSTRAINT [DF_Hst_Group_bbs_isupload] DEFAULT (0) FOR [isupload]
-----
ALTER TABLE [dbo].[Hst_Label] ADD 
	CONSTRAINT [DF__Hst_Label__LabelT__65C116E7] DEFAULT (0) FOR [LabelType],
	CONSTRAINT [DF__Hst_Label__LabelN__66B53B20] DEFAULT (0) FOR [LabelName],
	CONSTRAINT [DF__Hst_Label__Descri__67A95F59] DEFAULT ('') FOR [Description],
	CONSTRAINT [DF__Hst_Label__Creati__689D8392] DEFAULT (getdate()) FOR [CreationDate],
	CONSTRAINT [DF__Hst_Label__EditDa__6991A7CB] DEFAULT (getdate()) FOR [EditDate],
	CONSTRAINT [DF__Hst_Label__UsePag__6A85CC04] DEFAULT (',') FOR [UsePage]
-----
 CREATE  INDEX [PKlabelname] ON [dbo].[Hst_Label]([LabelName]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Log] ADD 
	CONSTRAINT [DF_log_l_addtime] DEFAULT (getdate()) FOR [l_addtime],
	CONSTRAINT [DF_log_l_type] DEFAULT (0) FOR [l_type]
-----
 CREATE  INDEX [l_boardid] ON [dbo].[Hst_Log]([l_boardid]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_MedalLog] ADD 
	CONSTRAINT [DF__Hst_MedalL__AddTi__384F51F2] DEFAULT (getdate()) FOR [AddTime]
-----
ALTER TABLE [dbo].[Hst_Menu] ADD 
	CONSTRAINT [DF_Hst_Menu_isshow] DEFAULT (0) FOR [isshow],
	CONSTRAINT [DF_Hst_Menu_orderby] DEFAULT (0) FOR [orderby],
	CONSTRAINT [DF_Hst_Menu_plus_type] DEFAULT (0) FOR [plus_type]
-----
ALTER TABLE [dbo].[Hst_Message] ADD 
	CONSTRAINT [DF_Hst_Message_flag] DEFAULT (0) FOR [flag],
	CONSTRAINT [DF_Hst_Message_sendtime] DEFAULT (getdate()) FOR [sendtime],
	CONSTRAINT [DF_message_delR] DEFAULT (0) FOR [delR],
	CONSTRAINT [DF_message_delS] DEFAULT (0) FOR [delS],
	CONSTRAINT [DF_message_isSend] DEFAULT (0) FOR [isSend],
	CONSTRAINT [DF__Hst_Messa__con_l__5B988E2F] DEFAULT (0) FOR [con_length],
	CONSTRAINT [DF__Hst_Messa__incep__5C8CB268] DEFAULT (0) FOR [inceptuserid],
	CONSTRAINT [DF__Hst_Messa__sende__5D80D6A1] DEFAULT (0) FOR [senderuserid],
	CONSTRAINT [PK_message] PRIMARY KEY  NONCLUSTERED 
	(
		[id]
	) WITH  FILLFACTOR = 90  ON [PRIMARY] 
-----
 CREATE  INDEX [IX_message] ON [dbo].[Hst_Message]([sender], [isSend], [delS]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [IX_message_1] ON [dbo].[Hst_Message]([incept], [isSend], [delR], [flag]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [read] ON [dbo].[Hst_Message]([id], [sender], [incept]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_MoneyLog] ADD 
	CONSTRAINT [DF_Hst_Plus_Tools_Log_ToolsID] DEFAULT (0) FOR [ToolsID],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_CountNum] DEFAULT (0) FOR [CountNum],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_Log_Money] DEFAULT (0) FOR [Log_Money],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_Log_Ticket] DEFAULT (0) FOR [Log_Ticket],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_AddUserID] DEFAULT (0) FOR [AddUserID],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_AddTime] DEFAULT (getdate()) FOR [Log_Time],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_Log_Type] DEFAULT (0) FOR [Log_Type],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_BoardID] DEFAULT (0) FOR [BoardID],
	CONSTRAINT [DF_Hst_Plus_Tools_Log_HMoney] DEFAULT (0) FOR [HMoney]
-----
 CREATE  INDEX [UserID] ON [dbo].[Hst_MoneyLog]([AddUserID]) ON [PRIMARY]
-----
 CREATE  INDEX [BoardID] ON [dbo].[Hst_MoneyLog]([BoardID]) ON [PRIMARY]
-----
 CREATE  INDEX [Log_Type] ON [dbo].[Hst_MoneyLog]([Log_Type]) ON [PRIMARY]
-----
 CREATE  INDEX [ToolsID] ON [dbo].[Hst_MoneyLog]([ToolsID]) ON [PRIMARY]
-----
 CREATE  INDEX [UserTools] ON [dbo].[Hst_MoneyLog]([ToolsID], [AddUserID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Online] ADD 
	CONSTRAINT [DF_online_UserGroupID] DEFAULT (0) FOR [UserGroupID],
	CONSTRAINT [DF_online_userhidden] DEFAULT (2) FOR [userhidden],
	CONSTRAINT [DF_online_userid] DEFAULT (0) FOR [userid]
-----
 CREATE  INDEX [o_1] ON [dbo].[Hst_Online]([id]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [o_2] ON [dbo].[Hst_Online]([userid]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [o_3] ON [dbo].[Hst_Online]([userid], [userhidden]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [o_4] ON [dbo].[Hst_Online]([boardid], [userid]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Plus_Invite] ADD 
	CONSTRAINT [DF__Hst_Plus_I__DI_Cr__6DEC4894] DEFAULT (getdate()) FOR [DI_CreateDate],
	CONSTRAINT [DF__Hst_Plus_I__DI_Te__6EE06CCD] DEFAULT (getdate()) FOR [DI_TempDate],
	CONSTRAINT [DF__Hst_Plus_I__DI_Fa__6FD49106] DEFAULT (getdate()) FOR [DI_FailDate],
	CONSTRAINT [DF__Hst_Plus_I__DI_Is__70C8B53F] DEFAULT (0) FOR [DI_IsFail],
	CONSTRAINT [DF__Hst_Plus_I__DI_Us__71BCD978] DEFAULT ('0|0|0|0|0') FOR [DI_UserExpend],
	CONSTRAINT [DF__Hst_Plus_I__DI_Us__72B0FDB1] DEFAULT ('0|0|0|0|0') FOR [DI_UserGain]
-----
 CREATE  INDEX [DI_Invite_Code] ON [dbo].[Hst_Plus_Invite]([DI_Code]) ON [PRIMARY]
-----
 CREATE  INDEX [DI_Invite_TempDate] ON [dbo].[Hst_Plus_Invite]([DI_TempDate]) ON [PRIMARY]
-----
 CREATE  INDEX [DI_Invite_FailDate] ON [dbo].[Hst_Plus_Invite]([DI_FailDate]) ON [PRIMARY]
-----
 CREATE  INDEX [DI_Invite_CreateUserName] ON [dbo].[Hst_Plus_Invite]([DI_CreateUserName]) ON [PRIMARY]
-----
 CREATE  INDEX [DI_Invite_IsFail] ON [dbo].[Hst_Plus_Invite]([DI_IsFail]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Plus_Invite_Setup] ADD 
	CONSTRAINT [DF__Hst_Plus_I__DI_Us__758D6A5C] DEFAULT ('0|0|0|0|0') FOR [DI_UserExpend],
	CONSTRAINT [DF__Hst_Plus_I__DI_Us__76818E95] DEFAULT ('0|0|0') FOR [DI_UserLimit],
	CONSTRAINT [DF__Hst_Plus_I__DI_Is__7775B2CE] DEFAULT (0) FOR [DI_IsExpend],
	CONSTRAINT [DF__Hst_Plus_I__DI_Is__7869D707] DEFAULT (0) FOR [DI_IsCreate],
	CONSTRAINT [DF__Hst_Plus_I__DI_Te__795DFB40] DEFAULT (0) FOR [DI_TempMinute],
	CONSTRAINT [DF__Hst_Plus_I__DI_Fa__7A521F79] DEFAULT (0) FOR [DI_FailDate],
	CONSTRAINT [DF__Hst_Plus_I__DI_Is__7B4643B2] DEFAULT (0) FOR [DI_IsGain],
	CONSTRAINT [DF__Hst_Plus_I__DI_Us__7C3A67EB] DEFAULT ('0|0|0|0|0') FOR [DI_UserGain]
-----
ALTER TABLE [dbo].[Hst_Plus_Tools_Buss] ADD 
	CONSTRAINT [DF_Hst_Plus_Tools_Buss_ToolsCount] DEFAULT (0) FOR [ToolsCount],
	CONSTRAINT [DF_Hst_Plus_Tools_Buss_SaleCount] DEFAULT (0) FOR [SaleCount],
	CONSTRAINT [DF_Hst_Plus_Tools_Buss_UpdateTime] DEFAULT (getdate()) FOR [UpdateTime],
	CONSTRAINT [DF_Hst_Plus_Tools_Buss_SaleMoney] DEFAULT (0) FOR [SaleMoney],
	CONSTRAINT [DF_Hst_Plus_Tools_Buss_SaleTicks] DEFAULT (0) FOR [SaleTicket]
-----
 CREATE  INDEX [Tools_UserID] ON [dbo].[Hst_Plus_Tools_Buss]([UserID]) ON [PRIMARY]
-----
 CREATE  INDEX [Tools_ToolsID] ON [dbo].[Hst_Plus_Tools_Buss]([ToolsID]) ON [PRIMARY]
-----
 CREATE  INDEX [Buy_Tools] ON [dbo].[Hst_Plus_Tools_Buss]([UserID], [ToolsID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Plus_Tools_Info] ADD 
	CONSTRAINT [DF_Plus_Tools_Info_IsStar] DEFAULT (1) FOR [IsStar],
	CONSTRAINT [DF_Plus_Tools_Info_Stock] DEFAULT (0) FOR [SysStock],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_UserStock] DEFAULT (0) FOR [UserStock],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_UserTicket] DEFAULT (0) FOR [UserTicket],
	CONSTRAINT [DF_Plus_Tools_Info_Price] DEFAULT (0) FOR [UserMoney],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_UserPost] DEFAULT (0) FOR [UserPost],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_UserWealth] DEFAULT (0) FOR [UserWealth],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_UserEp] DEFAULT (0) FOR [UserEp],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_UserCp] DEFAULT (0) FOR [UserCp],
	CONSTRAINT [DF_Hst_Plus_Tools_Info_BuyType] DEFAULT (0) FOR [BuyType]
-----
ALTER TABLE [dbo].[Hst_Plus_Tools_MagicFace] ADD 
	CONSTRAINT [DF_Hst_Plus_Tools_MagicFace_iMoney] DEFAULT (0) FOR [iMoney],
	CONSTRAINT [DF_Hst_Plus_Tools_MagicFace_iTicket] DEFAULT (0) FOR [iTicket],
	CONSTRAINT [DF_Hst_Plus_Tools_MagicFace_tMoney] DEFAULT (0) FOR [tMoney],
	CONSTRAINT [DF_Hst_Plus_Tools_MagicFace_tTicket] DEFAULT (0) FOR [tTicket]
-----
ALTER TABLE [dbo].[Hst_Rating] ADD 
	CONSTRAINT [DF_Hst_Rating_poco] DEFAULT (0) FOR [poco],
	CONSTRAINT [DF_Hst_Rating_rootid] DEFAULT (0) FOR [rootid],
	CONSTRAINT [DF_Hst_Rating_annid] DEFAULT (0) FOR [annid]
-----
ALTER TABLE [dbo].[Hst_Setup] ADD 
	CONSTRAINT [DF_Hst_Setup_Forum_Setting_1] DEFAULT ('') FOR [Forum_Setting],
	CONSTRAINT [DF_Hst_Setup_Forum_ads_1] DEFAULT ('') FOR [Forum_ads],
	CONSTRAINT [DF_Hst_Setup_Forum_Badwords_1] DEFAULT ('') FOR [Forum_Badwords],
	CONSTRAINT [DF_Hst_Setup_Forum_rBadword_1] DEFAULT ('') FOR [Forum_rBadword],
	CONSTRAINT [DF_Hst_Setup_Forum_Maxonline_1] DEFAULT (0) FOR [Forum_Maxonline],
	CONSTRAINT [DF_Hst_Setup_Forum_MaxonlineDate_1] DEFAULT (getdate()) FOR [Forum_MaxonlineDate],
	CONSTRAINT [DF_Hst_Setup_Forum_TopicNum_1] DEFAULT (0) FOR [Forum_TopicNum],
	CONSTRAINT [DF_Hst_Setup_Forum_PostNum_1] DEFAULT (0) FOR [Forum_PostNum],
	CONSTRAINT [DF_Hst_Setup_Forum_TodayNum_1] DEFAULT (0) FOR [Forum_TodayNum],
	CONSTRAINT [DF_Hst_Setup_Forum_UserNum] DEFAULT (0) FOR [Forum_UserNum],
	CONSTRAINT [DF_Hst_Setup_Forum_YesTerdayNum_1] DEFAULT (0) FOR [Forum_YesTerdayNum],
	CONSTRAINT [DF_Hst_Setup_Forum_MaxPostNum_1] DEFAULT (0) FOR [Forum_MaxPostNum],
	CONSTRAINT [DF_Hst_Setup_Forum_MaxPostDate_1] DEFAULT (getdate()) FOR [Forum_MaxPostDate],
	CONSTRAINT [DF_Hst_Setup_Forum_lastUser_1] DEFAULT ('') FOR [Forum_lastUser],
	CONSTRAINT [DF_Hst_Setup_Forum_LastPost_1] DEFAULT ('') FOR [Forum_LastPost],
	CONSTRAINT [DF_Hst_Setup_Forum_BirthUser] DEFAULT ('2003-10-13 15:03:00|') FOR [Forum_BirthUser],
	CONSTRAINT [DF_Hst_Setup_Forum_Sid_1] DEFAULT (1) FOR [Forum_Sid],
	CONSTRAINT [DF_Hst_Setup_Forum_Version_1] DEFAULT ('') FOR [Forum_Version],
	CONSTRAINT [DF_Hst_Setup_Forum_NowUseBBS_1] DEFAULT ('hst_bbs1') FOR [Forum_NowUseBBS],
	CONSTRAINT [DF_Hst_Setup_Forum_IsInstall_1] DEFAULT (0) FOR [Forum_IsInstall],
	CONSTRAINT [DF_Hst_Setup_Forum_challengePassWord] DEFAULT ('') FOR [Forum_challengePassWord],
	CONSTRAINT [DF_Hst_Setup_Forum_Ad] DEFAULT ('') FOR [Forum_Ad],
	CONSTRAINT [DF_Hst_Setup_Forum_ChanName_1] DEFAULT ('') FOR [Forum_ChanName],
	CONSTRAINT [DF_Hst_Setup_Forum_ChanSetting_1] DEFAULT ('1,1,1,1,1,1,1,1,1,1,1,1,1') FOR [Forum_ChanSetting],
	CONSTRAINT [DF_Hst_Setup_Forum_LockIP] DEFAULT ('') FOR [Forum_LockIP],
	CONSTRAINT [DF_Hst_Setup_Forum_Cookiespath] DEFAULT ('/') FOR [Forum_Cookiespath],
	CONSTRAINT [DF_Hst_Setup_Forum_BoardS] DEFAULT ('') FOR [Forum_Boards],
	CONSTRAINT [DF_Hst_Setup_Forum_alltopnum] DEFAULT ('') FOR [Forum_alltopnum],
	CONSTRAINT [DF_Hst_Setup_Forum_Cid_1] DEFAULT (0) FOR [Forum_Cid],
	CONSTRAINT [DF_Hst_Setup_Forum_AdminFolder] DEFAULT ('Admin') FOR [Forum_AdminFolder],
	CONSTRAINT [DF_Hst_Setup_Forum_BoardXML] DEFAULT ('') FOR [Forum_BoardXML]
-----
ALTER TABLE [dbo].[Hst_SmallPaper] ADD 
	CONSTRAINT [DF_SmallPaper_S_Hits] DEFAULT (0) FOR [S_Hits],
	CONSTRAINT [DF_SmallPaper_S_Addtime] DEFAULT (getdate()) FOR [S_Addtime]
-----
 CREATE  INDEX [S_BoardID] ON [dbo].[Hst_SmallPaper]([S_BoardID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Space_skin] ADD 
	CONSTRAINT [DF__Hst_Space___s_use__6501FCD8] DEFAULT (0) FOR [s_userid],
	CONSTRAINT [DF__Hst_Space___s_sty__65F62111] DEFAULT (0) FOR [s_style],
	CONSTRAINT [DF__Hst_Space___s_loc__66EA454A] DEFAULT (0) FOR [s_lock],
	CONSTRAINT [DF__Hst_Space___s_add__67DE6983] DEFAULT (getdate()) FOR [s_addtime]
-----
ALTER TABLE [dbo].[Hst_Space_user] ADD 
	CONSTRAINT [DF_Hst_Space_user_userid] DEFAULT (0) FOR [userid],
	CONSTRAINT [DF_Hst_Space_user_s_style] DEFAULT (0) FOR [s_style],
	CONSTRAINT [DF_Hst_Space_user_updatetime] DEFAULT (getdate()) FOR [updatetime],
	CONSTRAINT [DF_Hst_Space_user_lock] DEFAULT (0) FOR [lock]
-----
 CREATE  INDEX [Hst_Space_userid] ON [dbo].[Hst_Space_user]([userid]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_StyleHelp] ADD 
	CONSTRAINT [DF__Hst_StyleH__Main___44B528D7] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [Main_Style],
	CONSTRAINT [DF__Hst_StyleH__Style__45A94D10] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [Style_Pic],
	CONSTRAINT [DF__Hst_StyleH__page___469D7149] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_index],
	CONSTRAINT [DF__Hst_StyleH__page___47919582] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_dispbbs],
	CONSTRAINT [DF__Hst_StyleH__page___4885B9BB] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_showerr],
	CONSTRAINT [DF__Hst_StyleH__page___4979DDF4] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_login],
	CONSTRAINT [DF__Hst_StyleH__page___4A6E022D] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_online],
	CONSTRAINT [DF__Hst_StyleH__page___4B622666] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_usermanager],
	CONSTRAINT [DF__Hst_StyleH__page___4C564A9F] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_fmanage],
	CONSTRAINT [DF__Hst_StyleH__page___4D4A6ED8] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_boardstat],
	CONSTRAINT [DF__Hst_StyleH__page___4E3E9311] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_paper_even_toplist],
	CONSTRAINT [DF__Hst_StyleH__page___4F32B74A] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_query],
	CONSTRAINT [DF__Hst_StyleH__page___5026DB83] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_show],
	CONSTRAINT [DF__Hst_StyleH__page___511AFFBC] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_dispuser],
	CONSTRAINT [DF__Hst_StyleH__page___520F23F5] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_help_permission],
	CONSTRAINT [DF__Hst_StyleH__page___5303482E] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_postjob],
	CONSTRAINT [DF__Hst_StyleH__page___53F76C67] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_post],
	CONSTRAINT [DF__Hst_StyleH__page___54EB90A0] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_boardhelp],
	CONSTRAINT [DF__Hst_StyleH__page___55DFB4D9] DEFAULT ('|||@@@|||@@@|||@@@|||') FOR [page_indivgroup]
-----
ALTER TABLE [dbo].[Hst_TableList] ADD 
	CONSTRAINT [DF_TableList_TableName] DEFAULT ('') FOR [TableName],
	CONSTRAINT [DF_TableList_TableType] DEFAULT ('') FOR [TableType]
-----
ALTER TABLE [dbo].[Hst_Templates] ADD 
	CONSTRAINT [DF__Hst_Templat__Type__41D8BC2C] DEFAULT ('') FOR [Type]
-----
ALTER TABLE [dbo].[Hst_Topic] ADD 
	CONSTRAINT [DF_Topic_PollID] DEFAULT (0) FOR [PollID],
	CONSTRAINT [DF_Topic_LockTopic] DEFAULT (0) FOR [LockTopic],
	CONSTRAINT [DF_Topic_Child] DEFAULT (0) FOR [Child],
	CONSTRAINT [DF_Topic_DateAndTime] DEFAULT (getdate()) FOR [DateAndTime],
	CONSTRAINT [DF_Topic_hits] DEFAULT (0) FOR [hits],
	CONSTRAINT [DF_Topic_VoteTotal] DEFAULT (0) FOR [VoteTotal],
	CONSTRAINT [DF_Topic_LastPostTime] DEFAULT (getdate()) FOR [LastPostTime],
	CONSTRAINT [DF_Topic_istop] DEFAULT (0) FOR [istop],
	CONSTRAINT [DF_Topic_isvote] DEFAULT (0) FOR [isvote],
	CONSTRAINT [DF_Topic_isbest] DEFAULT (0) FOR [isbest],
	CONSTRAINT [DF_Topic_IsSmsTopic] DEFAULT (0) FOR [IsSmsTopic],
	CONSTRAINT [DF_Topic_LastSmsTime] DEFAULT (getdate()) FOR [LastSmsTime],
	CONSTRAINT [DF_Topic_TopicMode] DEFAULT (0) FOR [TopicMode],
	CONSTRAINT [DF_Hst_Topic_Mode] DEFAULT (0) FOR [Mode],
	CONSTRAINT [DF_Hst_Topic_GetMoney] DEFAULT (0) FOR [GetMoney],
	CONSTRAINT [DF_Hst_Topic_GetMoneyType] DEFAULT (0) FOR [GetMoneyType],
	CONSTRAINT [DF_Hst_Topic_HideName] DEFAULT (0) FOR [HideName],
	CONSTRAINT [DF__Hst_topic__highl__605D434C] DEFAULT ('|0||0|0|0') FOR [highlight],
	CONSTRAINT [DF__Hst_topic__stamp__61516785] DEFAULT (0) FOR [stamp],
	CONSTRAINT [DF__Hst_topic__mood0__62458BBE] DEFAULT (0) FOR [mood0],
	CONSTRAINT [DF__Hst_topic__mood1__6339AFF7] DEFAULT (0) FOR [mood1],
	CONSTRAINT [DF__Hst_topic__mood2__642DD430] DEFAULT (0) FOR [mood2],
	CONSTRAINT [DF__Hst_topic__mood3__6521F869] DEFAULT (0) FOR [mood3],
	CONSTRAINT [DF__Hst_topic__mood4__66161CA2] DEFAULT (0) FOR [mood4],
	CONSTRAINT [DF__Hst_topic__mood5__670A40DB] DEFAULT (0) FOR [mood5],
	CONSTRAINT [DF__Hst_topic__mood6__67FE6514] DEFAULT (0) FOR [mood6],
	CONSTRAINT [DF__Hst_topic__mood7__68F2894D] DEFAULT (0) FOR [mood7],
	CONSTRAINT [DF__Hst_topic__ratin__69E6AD86] DEFAULT (0) FOR [rating],
	CONSTRAINT [DF__Hst_topic__isact__6ADAD1BF] DEFAULT (0) FOR [isact],
	CONSTRAINT [DF__Hst_Topic__topic__7740A8A4] DEFAULT (0) FOR [topicnumistop]
-----
 CREATE  INDEX [list_1] ON [dbo].[Hst_Topic]([Boardid], [istop], [LastPostTime]) ON [PRIMARY]
-----
 CREATE  INDEX [list_2] ON [dbo].[Hst_Topic]([Boardid], [istop], [Mode], [LastPostTime]) ON [PRIMARY]
-----
 CREATE  INDEX [topicwithme] ON [dbo].[Hst_Topic]([PostUserid], [Child]) ON [PRIMARY]
-----
 CREATE  INDEX [SearchUser] ON [dbo].[Hst_Topic]([PostUserid]) ON [PRIMARY]
-----
 CREATE  INDEX [SearchTitle] ON [dbo].[Hst_Topic]([Title]) ON [PRIMARY]
-----
 CREATE  INDEX [GetMoneyType_List] ON [dbo].[Hst_Topic]([Boardid], [GetMoneyType]) ON [PRIMARY]
-----
 CREATE  INDEX [Hst_Topic_hits] ON [dbo].[Hst_Topic]([hits]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_Upfile] ADD 
	CONSTRAINT [DF_Hst_Upfile_F_BoardID] DEFAULT (0) FOR [F_BoardID],
	CONSTRAINT [DF_Hst_Upfile_F_Type] DEFAULT (0) FOR [F_Type],
	CONSTRAINT [DF_Hst_Upfile_F_FileSize] DEFAULT (0) FOR [F_FileSize],
	CONSTRAINT [DF_Hst_Upfile_F_DownNum] DEFAULT (0) FOR [F_DownNum],
	CONSTRAINT [DF_Hst_Upfile_F_ViewNum] DEFAULT (0) FOR [F_ViewNum],
	CONSTRAINT [DF_Hst_Upfile_F_Flag] DEFAULT (0) FOR [F_Flag],
	CONSTRAINT [DF_Hst_Upfile_F_AddTime] DEFAULT (getdate()) FOR [F_AddTime],
	CONSTRAINT [DF__Hst_Upfile__F_Isi__2942188C] DEFAULT (0) FOR [F_Isindexpic],
	CONSTRAINT [DF_Hst_Upfile_F_topicid] DEFAULT (0) FOR [F_topicid],
	CONSTRAINT [DF__Hst_Upfile__f_bbs__3B2BBE9D] DEFAULT (0) FOR [f_bbsid]
-----
 CREATE  INDEX [F_BoardID] ON [dbo].[Hst_Upfile]([F_BoardID]) ON [PRIMARY]
-----
 CREATE  INDEX [F_UserID] ON [dbo].[Hst_Upfile]([F_UserID]) ON [PRIMARY]
-----
 CREATE  INDEX [F_Username] ON [dbo].[Hst_Upfile]([F_Username]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_User] ADD 
	CONSTRAINT [DF_Hst_User_UserPost] DEFAULT (0) FOR [UserPost],
	CONSTRAINT [DF_Hst_User_UserTopic] DEFAULT (0) FOR [UserTopic],
	CONSTRAINT [DF_Hst_User_UserWidth] DEFAULT (0) FOR [UserWidth],
	CONSTRAINT [DF_Hst_User_UserHeight] DEFAULT (0) FOR [UserHeight],
	CONSTRAINT [DF_Hst_User_UserLogins] DEFAULT (0) FOR [UserLogins],
	CONSTRAINT [DF_Hst_User_UserViews] DEFAULT (0) FOR [UserViews],
	CONSTRAINT [DF_Hst_User_UserMoney] DEFAULT (0) FOR [UserMoney],
	CONSTRAINT [DF_Hst_User_UserTicket] DEFAULT (0) FOR [UserTicket],
	CONSTRAINT [DF_Hst_User_userWealth] DEFAULT (0) FOR [userWealth],
	CONSTRAINT [DF_Hst_User_userEP] DEFAULT (0) FOR [userEP],
	CONSTRAINT [DF_Hst_User_userCP] DEFAULT (0) FOR [userCP],
	CONSTRAINT [DF_user_UserPower] DEFAULT (0) FOR [UserPower],
	CONSTRAINT [DF_user_UserDel] DEFAULT (0) FOR [UserDel],
	CONSTRAINT [DF_user_UserIsBest] DEFAULT (0) FOR [UserIsBest],
	CONSTRAINT [DF_user_UserGroupID] DEFAULT (0) FOR [UserGroupID],
	CONSTRAINT [DF_user_UserHidden] DEFAULT (0) FOR [UserHidden],
	CONSTRAINT [DF_user_IsChallenge] DEFAULT (0) FOR [IsChallenge],
	CONSTRAINT [DF_user_UserIsAva] DEFAULT (0) FOR [UserIsAva],
	CONSTRAINT [DF__Hst_user__RLActTi__1BB31344] DEFAULT (0) FOR [RLActTimeT],
	CONSTRAINT [DF__Hst_User__UserIsA__3943762B] DEFAULT (0) FOR [UserIsAudit],
	CONSTRAINT [DF__Hst_User__LastMsg__3C1FE2D6] DEFAULT (getdate()) FOR [LastMsg],
	CONSTRAINT [DF__Hst_User__UserIsA__3E082B48] DEFAULT (0) FOR [UserIsAudit_Custom],
	CONSTRAINT [DF__Hst_User__TyMedal__3EFC4F81] DEFAULT (0) FOR [TyMedaled],
	CONSTRAINT [DF__Hst_User__isechk__56D3D912] DEFAULT (0) FOR [isechk],
	CONSTRAINT [DF__Hst_User__echkti__57C7FD4B] DEFAULT (getdate()) FOR [echktime],
	CONSTRAINT [DF__Hst_User__errtim__58BC2184] DEFAULT (getdate()) FOR [errtimes],
	CONSTRAINT [DF__Hst_User__errtim__59B045BD] DEFAULT (0) FOR [errtime],
	CONSTRAINT [DF__Hst_User__SetUse__5AA469F6] DEFAULT (0) FOR [SetUserTrue]
-----
 CREATE  INDEX [toplist_1] ON [dbo].[Hst_User]([UserPost] DESC ) ON [PRIMARY]
-----
 CREATE  INDEX [IX_user] ON [dbo].[Hst_User]([UserName]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [userinfo] ON [dbo].[Hst_User]([UserGroupID], [UserID]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [userann] ON [dbo].[Hst_User]([UserID], [UserClass]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [toplist_2] ON [dbo].[Hst_User]([JoinDate] DESC ) ON [PRIMARY]
-----
 CREATE  INDEX [toplist_3] ON [dbo].[Hst_User]([userWealth] DESC ) ON [PRIMARY]
-----
 CREATE  INDEX [chan_1] ON [dbo].[Hst_User]([UserMobile], [IsChallenge]) ON [PRIMARY]
-----
 CREATE  INDEX [UserEmail] ON [dbo].[Hst_User]([UserEmail]) ON [PRIMARY]
-----
 CREATE  INDEX [Hst_UserMoney] ON [dbo].[Hst_User]([UserMoney]) ON [PRIMARY]
-----
 CREATE  INDEX [Hst_UserTicket] ON [dbo].[Hst_User]([UserTicket]) ON [PRIMARY]
-----
 CREATE  INDEX [Hst_UserGroupID] ON [dbo].[Hst_User]([UserGroupID]) ON [PRIMARY]
-----
 CREATE  INDEX [Passport] ON [dbo].[Hst_User]([Passport]) ON [PRIMARY]
-----
 CREATE  INDEX [UserPer] ON [dbo].[Hst_UserAccess]([uc_BoardID], [uc_UserID]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_UserGroups] ADD 
	CONSTRAINT [DF_Hst_UserGroups1_MinArticle] DEFAULT (0) FOR [MinArticle],
	CONSTRAINT [DF_Hst_UserGroups1_ParentGID] DEFAULT (0) FOR [ParentGID],
	CONSTRAINT [DF__Hst_UserGr__UserG__3A379A64] DEFAULT (0) FOR [UserGroupIsAudit],
	CONSTRAINT [DF__Hst_UserGr__TyCls__3D14070F] DEFAULT (0) FOR [TyClsGroup]
-----
ALTER TABLE [dbo].[Hst_Vote] ADD 
	CONSTRAINT [DF_vote_votetype] DEFAULT (0) FOR [votetype],
	CONSTRAINT [DF_vote_LockVote] DEFAULT (0) FOR [LockVote],
	CONSTRAINT [DF_vote_voters] DEFAULT (0) FOR [voters],
	CONSTRAINT [DF_vote_TimeOut] DEFAULT (getdate()) FOR [TimeOut],
	CONSTRAINT [DF_Hst_Vote_UArticle] DEFAULT (0) FOR [UArticle],
	CONSTRAINT [DF_Hst_Vote_UWealth] DEFAULT (0) FOR [UWealth],
	CONSTRAINT [DF_Hst_Vote_UEP] DEFAULT (0) FOR [UEP],
	CONSTRAINT [DF_Hst_Vote_UCP] DEFAULT (0) FOR [UCP],
	CONSTRAINT [DF_Hst_Vote_UPower] DEFAULT (0) FOR [UPower]
-----
ALTER TABLE [dbo].[Hst_VoteUser] ADD 
	CONSTRAINT [DF_voteuser_VoteDate] DEFAULT (getdate()) FOR [VoteDate]
-----
ALTER TABLE [dbo].[Hst_admin] ADD 
	CONSTRAINT [DF_admin_LastLogin] DEFAULT (getdate()) FOR [LastLogin],
	CONSTRAINT [DF__Hst_Admin__errti__75586032] DEFAULT (0) FOR [errtimes],
	CONSTRAINT [DF__Hst_Admin__errti__764C846B] DEFAULT (getdate()) FOR [errtime]
-----
 CREATE  INDEX [CHKLOGIN] ON [dbo].[Hst_admin]([Username], [Adduser]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_banzhu_config] ADD 
	CONSTRAINT [DF__Hst_banzhu__Gzday__2EC5E7B8] DEFAULT (7) FOR [Gzdays],
	CONSTRAINT [DF__Hst_banzhu__gzifm__2FBA0BF1] DEFAULT (1) FOR [gzifmess]
-----
ALTER TABLE [dbo].[Hst_banzhu_log] ADD 
	CONSTRAINT [DF__Hst_banzhu__Leave__31A25463] DEFAULT (getdate()) FOR [LeaveTime],
	CONSTRAINT [DF__Hst_banzhu__Leave__3296789C] DEFAULT (0) FOR [LeaveDays],
	CONSTRAINT [DF__Hst_banzhu__Cance__338A9CD5] DEFAULT (2100 - 1 - 1) FOR [CancelLeave]
-----
ALTER TABLE [dbo].[Hst_banzhu_user] ADD 
	CONSTRAINT [DF__Hst_banzhu__FuLiD__253C7D7E] DEFAULT (getdate()) FOR [FuLiDate],
	CONSTRAINT [DF__Hst_banzhu__oldlo__2630A1B7] DEFAULT (0) FOR [oldlogs],
	CONSTRAINT [DF__Hst_banzhu__oldlo__2724C5F0] DEFAULT (0) FOR [oldlogins],
	CONSTRAINT [DF__Hst_banzhu__lasti__2818EA29] DEFAULT (0) FOR [lastinfo],
	CONSTRAINT [DF__Hst_banzhu__oldar__290D0E62] DEFAULT (0) FOR [oldarticle],
	CONSTRAINT [DF__Hst_banzhu__IsLea__2A01329B] DEFAULT (0) FOR [IsLeave],
	CONSTRAINT [DF__Hst_banzhu__Leave__2AF556D4] DEFAULT (getdate()) FOR [LeaveTime],
	CONSTRAINT [DF__Hst_banzhu__Leave__2BE97B0D] DEFAULT (0) FOR [Leavedays],
	CONSTRAINT [DF__Hst_banzhu__IsSen__2CDD9F46] DEFAULT (0) FOR [IsSendMail]
-----
ALTER TABLE [dbo].[Hst_bbs1] ADD 
	CONSTRAINT [DF_bbs1_ParentID] DEFAULT (0) FOR [ParentID],
	CONSTRAINT [DF_bbs1_locktopic] DEFAULT (0) FOR [locktopic],
	CONSTRAINT [DF_bbs1_IsAudit] DEFAULT (0) FOR [IsAudit],
	CONSTRAINT [DF_bbs1_IsUpload] DEFAULT (0) FOR [IsUpload],
	CONSTRAINT [DF_Hst_bbs1_GetMoney] DEFAULT (0) FOR [GetMoney],
	CONSTRAINT [DF_Hst_bbs1_GetMoneyType] DEFAULT (0) FOR [GetMoneyType]
-----
 CREATE  INDEX [dispbbs] ON [dbo].[Hst_bbs1]([BoardID], [RootID]) WITH  FILLFACTOR = 90 ON [PRIMARY]
-----
 CREATE  INDEX [save_1] ON [dbo].[Hst_bbs1]([RootID], [orders]) ON [PRIMARY]
-----
 CREATE  INDEX [disp] ON [dbo].[Hst_bbs1]([BoardID]) ON [PRIMARY]
-----
 CREATE  INDEX [PostUserID] ON [dbo].[Hst_bbs1]([PostUserID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_bbs2] ADD 
	CONSTRAINT [DF__Hst_bbs10__Parent__49E3F248] DEFAULT (0) FOR [ParentID],
	CONSTRAINT [DF__Hst_bbs10__BoardI__4AD81681] DEFAULT (0) FOR [BoardID],
	CONSTRAINT [DF__Hst_bbs10__PostUs__4BCC3ABA] DEFAULT (0) FOR [PostUserID],
	CONSTRAINT [DF__Hst_bbs10__DateAn__4CC05EF3] DEFAULT (getdate()) FOR [DateAndTime],
	CONSTRAINT [DF__Hst_bbs10__length__4DB4832C] DEFAULT (0) FOR [length],
	CONSTRAINT [DF__Hst_bbs10__RootID__4EA8A765] DEFAULT (0) FOR [RootID],
	CONSTRAINT [DF__Hst_bbs10__layer__4F9CCB9E] DEFAULT (0) FOR [layer],
	CONSTRAINT [DF__Hst_bbs10__orders__5090EFD7] DEFAULT (0) FOR [orders],
	CONSTRAINT [DF__Hst_bbs10__isbest__51851410] DEFAULT (0) FOR [isbest],
	CONSTRAINT [DF__Hst_bbs10__lockto__52793849] DEFAULT (0) FOR [locktopic],
	CONSTRAINT [DF__Hst_bbs10__signfl__536D5C82] DEFAULT (0) FOR [signflag],
	CONSTRAINT [DF__Hst_bbs10__emailf__546180BB] DEFAULT (0) FOR [emailflag],
	CONSTRAINT [DF__Hst_bbs10__isuplo__5555A4F4] DEFAULT (0) FOR [isupload],
	CONSTRAINT [DF__Hst_bbs10__isaudi__5649C92D] DEFAULT (0) FOR [isaudit],
	CONSTRAINT [DF__Hst_bbs10__GetMon__573DED66] DEFAULT (0) FOR [GetMoney],
	CONSTRAINT [DF__Hst_bbs10__GetMon__5832119F] DEFAULT (0) FOR [GetMoneyType]
-----
 CREATE  INDEX [dispbbs] ON [dbo].[Hst_bbs2]([BoardID], [RootID]) ON [PRIMARY]
-----
 CREATE  INDEX [save_1] ON [dbo].[Hst_bbs2]([RootID], [orders]) ON [PRIMARY]
-----
 CREATE  INDEX [disp] ON [dbo].[Hst_bbs2]([BoardID]) ON [PRIMARY]
-----
 CREATE  INDEX [PostUserID] ON [dbo].[Hst_bbs2]([PostUserID]) ON [PRIMARY]
-----
ALTER TABLE [dbo].[Hst_help] ADD 
	CONSTRAINT [DF_Hst_help_H_type] DEFAULT (0) FOR [H_type],
	CONSTRAINT [DF_Hst_help_H_orders] DEFAULT (0) FOR [H_stype],
	CONSTRAINT [DF_Hst_help_H_Addtime] DEFAULT (getdate()) FOR [H_Addtime]
-----
 CREATE  INDEX [IX_Hst_help] ON [dbo].[Hst_help]([H_ParentID]) ON [PRIMARY]
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_GetRecordCount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Hst_GetRecordCount]
-----

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

SET QUOTED_IDENTIFIER ON 
-----
SET ANSI_NULLS ON 
-----



CREATE PROCEDURE Hst_GetRecordCount
    @tblName      varchar(255),       -- ±íÃû
    @strWhere     varchar(2000) = ''  -- ²éÑ¯Ìõ¼þ (×¢Òâ: ²»Òª¼Ó where)
AS
declare @sql varchar(255)
if @strWhere = ''
begin
	set @sql='Select Count(*) From '+@tblName
end
else
begin
	set @sql='Select Count(*) From '+@tblName+' Where ' +@strWhere
end
exec(@sql)








-----
SET QUOTED_IDENTIFIER OFF 
-----
SET ANSI_NULLS ON 
-----

SET QUOTED_IDENTIFIER ON 
-----
SET ANSI_NULLS ON
-----
/*
  Hst_GetRecordFromPage
  ²ÎÊýËµÃ÷: @tblName      °üº¬Êý¾ÝµÄ±íÃû
            @fldName      ¹Ø¼ü×Ö¶ÎÃû
            @PageSize     Ã¿Ò³¼ÇÂ¼Êý
            @PageIndex    Òª»ñÈ¡µÄÒ³Âë
            @OrderType    ÅÅÐòÀàÐÍ, 0 - ÉýÐò, 1 - ½µÐò
            @strWhere     ²éÑ¯Ìõ¼þ (×¢Òâ: ²»Òª¼Ó where)
  author: Å£Í·
*/
CREATE PROCEDURE Hst_GetRecordFromPage
    @tblName      varchar(255),       -- ±íÃû
    @fldName      varchar(255),       -- ×Ö¶ÎÃû
    @PageSize     int = 10,           -- Ò³³ß´ç
    @PageIndex    int = 1,            -- Ò³Âë
    @OrderType    bit = 0,            -- ÉèÖÃÅÅÐòÀàÐÍ, ·Ç 0 ÖµÔò½µÐò
    @strWhere     varchar(2000) = '',  -- ²éÑ¯Ìõ¼þ (×¢Òâ: ²»Òª¼Ó where)
    @strtablezd     varchar(2000) = ''
AS

declare @strSQL   varchar(6000)       -- Ö÷Óï¾ä
declare @strTmp   varchar(1000)       -- ÁÙÊ±±äÁ¿
declare @strOrder varchar(500)        -- ÅÅÐòÀàÐÍ

if @OrderType != 0
begin
    set @strTmp = '<(select min'
    set @strOrder = ' order by [' + @fldName + '] desc'
end
else
begin
    set @strTmp = '>(select max'
    set @strOrder = ' order by [' + @fldName +'] asc'
end

set @strSQL = 'select top ' + str(@PageSize) + @strtablezd + 'from ['
    + @tblName + '] where [' + @fldName + ']' + @strTmp + '(['
    + @fldName + ']) from (select top ' + str((@PageIndex-1)*@PageSize) + ' ['
    + @fldName + '] from [' + @tblName + ']' + @strOrder + ') as tblTmp)'
    + @strOrder

if @strWhere != ''
    set @strSQL = 'select top ' + str(@PageSize) + @strtablezd + ' from ['
        + @tblName + '] where [' + @fldName + ']' + @strTmp + '(['
        + @fldName + ']) from (select top ' + str((@PageIndex-1)*@PageSize) + ' ['
        + @fldName + '] from [' + @tblName + '] where ' + @strWhere + ' '
        + @strOrder + ') as tblTmp) and ' + @strWhere + ' ' + @strOrder

if @PageIndex = 1
begin
    set @strTmp = ''
    if @strWhere != ''
        set @strTmp = ' where (' + @strWhere + ')'

    set @strSQL = 'select top ' + str(@PageSize) + @strtablezd + ' from ['
        + @tblName + ']' + @strTmp + ' ' + @strOrder
end

exec (@strSQL)
-----
SET QUOTED_IDENTIFIER OFF 
-----
SET ANSI_NULLS ON
-----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Hst_TSQL]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [Hst_TSQL]
-----
/****** Object:  Stored Procedure Hst_TSQL    Script Date: 2011-7-1 9:48:16 ******/
CREATE PROCEDURE [Hst_TSQL]
@tsql varchar(500)
 AS
exec(@tsql)