SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_GuessGameCate](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[GuessCateName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[GuessCateColor] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[OrderID] [int] NULL CONSTRAINT [DF_ZL_GuessGameCate_OrderID]  DEFAULT (0),
 CONSTRAINT [PK_ZL_GuessGameCate] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'赛事类别名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGameCate', @level2type=N'COLUMN', @level2name=N'GuessCateName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'赛事类别显示颜色' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGameCate', @level2type=N'COLUMN', @level2name=N'GuessCateColor'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGameCate', @level2type=N'COLUMN', @level2name=N'OrderID'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_GuessMP](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[MPNum] [float] NULL,
 CONSTRAINT [PK_ZL_GuessMP] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessMP', @level2type=N'COLUMN', @level2name=N'username'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户游戏币余额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessMP', @level2type=N'COLUMN', @level2name=N'MPNum'

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_GuessBet](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[userName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[betTime] [datetime] NULL,
	[betGameID] [int] NULL,
	[betType] [int] NULL,
	[betTeam] [int] NULL,
	[betMoney] [int] NULL,
	[betWin] [float] NULL CONSTRAINT [DF_ZL_GuessBet_betWin]  DEFAULT (0.0),
	[betRemark] [text] COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_GuessBet] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投注用户' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'userName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投注时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投注赛次' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betGameID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投注类型0让球1大小球' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投注队0上盘1下盘' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betTeam'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投注额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betMoney'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'本次投注盈利' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betWin'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注信息,如赛事内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessBet', @level2type=N'COLUMN', @level2name=N'betRemark'

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_GuessGame](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[matchType] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[matchTime] [datetime] NULL,
	[firstTeam] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[secondTeam] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[concedePoints] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[firstReturn] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[secondReturn] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[bsPoints] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[bigPReturn] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[sPReturn] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[IsOver] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[concedeResult] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[bsResult] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[score] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[OverTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_GuessGame] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'赛事类型如：中超联赛' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'matchType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'比赛时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'matchTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上盘队' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'firstTeam'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'下盘队' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'secondTeam'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'让球' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'concedePoints'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上让球赔率' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'firstReturn'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'下让球赔率' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'secondReturn'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'大小球' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'bsPoints'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'大球赔率' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'bigPReturn'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'小球赔率' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'sPReturn'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'赛事状态：0赛事未发布；1赛事发布，投注中；2结束投注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'IsOver'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'让球结果' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'concedeResult'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'大小球结果' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'bsResult'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'比分' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'score'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GuessGame', @level2type=N'COLUMN', @level2name=N'OverTime'


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CallNote]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CallNote](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [nchar](255) NULL,
	[CallSession] [nchar](255) NULL,
	[SessionMD5] [nchar](255) NULL,
	[IP] [nchar](225) NULL,
	[CallArea] [bit] NULL,
	[CallTime] [datetime] NULL,
	[CallSystem] [nchar](255) NULL,
	[CallBrowser] [nchar](255) NULL,
	[CallScreen] [nchar](50) NULL,
	[CallScreenColor] [nchar](50) NULL,
	[CallYear] [int] NULL,
	[CallMonth] [int] NULL,
	[CallDay] [int] NULL,
	[CallWeek] [int] NULL,
	[CallHour] [int] NULL,
	[CallLike] [nchar](255) NULL,
	[CallNode] [int] NULL,
 CONSTRAINT [PK_ZL_CallNote] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Result_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Result]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Model_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Model_Del]
@TableName nvarchar(255)
AS
Exec(N''DROP Table ''+@TableName+'''')




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_Messageboard]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_Messageboard](
	[ID] [uniqueidentifier] NULL,
	[SendID] [int] NULL,
	[InceptID] [int] NULL,
	[Mcontent] [text] NULL,
	[Addtime] [datetime] NULL,
	[RestoreID] [uniqueidentifier] NULL,
	[State] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_MyCar]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_MyCar](
	[Pmid] [int] IDENTITY(1,1) NOT NULL,
	[P_uid] [int] NULL,
	[Pid] [int] NULL,
	[P_buy_time] [datetime] NULL,
	[P_last_time] [datetime] NULL,
	[P_last_uid] [int] NULL CONSTRAINT [DF_ZL_Sns_MyCar_P_last_uid]  DEFAULT (0),
	[P_last_user] [varchar](20) NULL,
	[P_action] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_MyCar] PRIMARY KEY NONCLUSTERED 
(
	[Pmid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Card]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Card](
	[Card_ID] [int] IDENTITY(1,1) NOT NULL,
	[CardNum] [nvarchar](50) NULL,
	[CardPwd] [nvarchar](50) NULL,
	[PutUserID] [int] NULL,
	[AssociateUserID] [int] NULL CONSTRAINT [DF_ZL_Card_AssociateUserID]  DEFAULT (0),
	[VIPType] [int] NULL,
	[StartTime] [datetime] NULL,
	[CircumscribeTime] [datetime] NULL,
	[PlyNum] [int] NULL CONSTRAINT [DF_ZL_Card_PlyNum]  DEFAULT (0),
	[AddTime] [datetime] NULL CONSTRAINT [DF_ZL_Card_AddTime]  DEFAULT (getdate()),
	[CardState] [int] NULL,
 CONSTRAINT [PK_ZL_Card] PRIMARY KEY CLUSTERED 
(
	[Card_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'CardNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片密码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'CardPwd'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发放卡片加盟商' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'PutUserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关联用户' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'AssociateUserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'VIP类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'VIPType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'第一次使用时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'StartTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用年限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'CircumscribeTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'PlyNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片创建时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卡片状态 1：未开启，2：开启，3：停用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Card', @level2type=N'COLUMN', @level2name=N'CardState'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MultiNode]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_MyPose]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_MyPose](
	[P_uid] [int] NOT NULL,
	[P_pose_uid_1] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_uid_1]  DEFAULT (0),
	[P_pose_user_1] [varchar](20) NULL,
	[P_pose_Pmid_1] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pmid_1]  DEFAULT (0),
	[P_pose_Pid_1] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pid_1]  DEFAULT (0),
	[P_pose_uid_2] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_uid_2]  DEFAULT (0),
	[P_pose_user_2] [varchar](20) NULL,
	[P_pose_Pmid_2] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pmid_2]  DEFAULT (0),
	[P_pose_Pid_2] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pid_2]  DEFAULT (0),
	[P_pose_uid_3] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_uid_3]  DEFAULT (0),
	[P_pose_user_3] [varchar](20) NULL,
	[P_pose_Pmid_3] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pmid_3]  DEFAULT (0),
	[P_pose_Pid_3] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pid_3]  DEFAULT (0),
	[P_pose_uid_4] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_uid_4]  DEFAULT (0),
	[P_pose_user_4] [varchar](20) NULL,
	[P_pose_Pmid_4] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pmid_4]  DEFAULT (0),
	[P_pose_Pid_4] [int] NULL CONSTRAINT [DF_ZL_Sns_MyPose_P_pose_Pid_4]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Sns_MyPose] PRIMARY KEY NONCLUSTERED 
(
	[P_uid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Student]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CardType]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CardType](
	[c_id] [int] IDENTITY(1,1) NOT NULL,
	[typename] [nvarchar](100) NULL,
	[iscount] [float] NULL,
 CONSTRAINT [PK_cardtype] PRIMARY KEY CLUSTERED 
(
	[c_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'折扣' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CardType', @level2type=N'COLUMN', @level2name=N'iscount'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_PicCateg]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_PicCateg](
	[ID] [uniqueidentifier] NOT NULL,
	[PicCategTitle] [varchar](20) NOT NULL,
	[PicCategUserID] [int] NOT NULL,
	[TitlePIc] [uniqueidentifier] NULL,
	[State] [int] NOT NULL,
	[CategTime] [datetime] NOT NULL,
	[PicCategPws][nvarchar](50)NULL,
 CONSTRAINT [PK_ZL_Sns_PicCateg] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Cart]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Cart](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Cartid] [varchar](255) NULL,
	[userid] [int] NULL,
	[Username] [varchar](255) NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Cart_Addtime]  DEFAULT (getdate()),
	[Pronum] [int] NULL,
	[AllMoney] [money] NULL,
	[Getip] [varchar](50) NULL,
 CONSTRAINT [PK_ZL_Cart] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购物车识别ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cart', @level2type=N'COLUMN', @level2name=N'Cartid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cart', @level2type=N'COLUMN', @level2name=N'Username'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cart', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所有商品数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cart', @level2type=N'COLUMN', @level2name=N'Pronum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总价' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cart', @level2type=N'COLUMN', @level2name=N'AllMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提交IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cart', @level2type=N'COLUMN', @level2name=N'Getip'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_PicCritique]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_PicCritique](
	[ID] [uniqueidentifier] NOT NULL,
	[CritiqueContent] [text] NOT NULL,
	[PicID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NOT NULL,
	[CritiqueTime] [datetime] NOT NULL,
 CONSTRAINT [PK_ZL_Sns_PicCritique] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CartPro]') AND type in (N'U'))
BEGIN


CREATE TABLE [dbo].[ZL_CartPro](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Orderlistid] [int] NULL CONSTRAINT [DF_ZL_CartPro_Orderlistid]  DEFAULT (0),
	[CartID] [int] NULL,
	[ProID] [int] NULL,
	[Pronum] [int] NULL,
	[Username] [varchar](255) NULL,
	[Proname] [varchar](255) NULL,
	[Danwei] [varchar](50) NULL,
	[Shijia] [money] NULL,
	[AllMoney] [money] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_CartPro_Addtime]  DEFAULT (getdate()),
	[Bindpro] [nvarchar](50) NULL,
	[ProSeller] [nvarchar](255) NULL,
	[PerID] [nvarchar](50) NULL,
	[city] [nvarchar](50) NULL,
	[type] [int] NULL CONSTRAINT [DF_ZL_CartPro_type]  DEFAULT (0),
 CONSTRAINT [PK_ZL_CartPro] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_PicTure]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_PicTure](
	[ID] [uniqueidentifier] NOT NULL,
	[PicName] [varchar](50) NULL,
	[PicUrl] [varchar](200) NOT NULL,
	[Remark] [text] NULL,
	[PicCategID] [uniqueidentifier] NOT NULL,
	[PicSize] [int] NOT NULL,
	[PicUpTime] [datetime] NOT NULL,
 CONSTRAINT [PK_ZL_Sns_PicTure] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Cash]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Cash](
	[Y_ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[YName] [nvarchar](100) NULL,
	[money] [money] NULL,
	[sTime] [datetime] NULL CONSTRAINT [DF_ZL_Cash_sTime]  DEFAULT (getdate()),
	[Account] [nvarchar](500) NULL,
	[Bank] [nvarchar](100) NULL,
	[eTime] [datetime] NULL,
	[yState] [int] NULL,
	[Classes][int]Null,
 CONSTRAINT [PK_ZL_Cash] PRIMARY KEY CLUSTERED 
(
	[Y_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开户人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'YName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'申请金额' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'money'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'申请时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'sTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'Account'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'银行' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'Bank'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'eTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态1处理0没处理' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Cash', @level2type=N'COLUMN', @level2name=N'yState'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CallNode_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_CallNode]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ProductTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ProductTable](
	[ID] [uniqueidentifier] NOT NULL,
	[ProductName] [varchar](100) NULL,
	[TypeID] [uniqueidentifier] NULL,
	[ProductContent] [ntext] NULL,
	[Price] [int] NULL,
	[VipPrice] [int] NULL,
	[ProductPic] [varchar](255) NULL,
	[Addtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_ProductTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ChangeProduct]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ChangeProduct](
	[P_ID] [int] IDENTITY(1,1) NOT NULL,
	[prodID] [int] NULL,
	[ExChangeID] [int] NULL,
	[PState] [int] NULL,
	[num] [int] NULL,
 CONSTRAINT [PK_ZL_ChangeProduct] PRIMARY KEY CLUSTERED 
(
	[P_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ChangeProduct', @level2type=N'COLUMN', @level2name=N'prodID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'交易表ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ChangeProduct', @level2type=N'COLUMN', @level2name=N'ExChangeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态0为申请者商品1为被申请者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ChangeProduct', @level2type=N'COLUMN', @level2name=N'PState'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ChangeProduct', @level2type=N'COLUMN', @level2name=N'num'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNote_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_CallNote]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ProductTypetable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ProductTypetable](
	[ID] [uniqueidentifier] NULL,
	[Name] [varchar](100) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ChangeTalk]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ChangeTalk](
	[T_ID] [int] IDENTITY(1,1) NOT NULL,
	[ExChangeID] [int] NULL,
	[TContent] [ntext] NULL,
	[UserID] [int] NULL,
	[ETime] [smalldatetime] NULL CONSTRAINT [DF_ZL_ChangeTalk_ETime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ChangeTalk] PRIMARY KEY CLUSTERED 
(
	[T_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'交易表ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ChangeTalk', @level2type=N'COLUMN', @level2name=N'ExChangeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'对话内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ChangeTalk', @level2type=N'COLUMN', @level2name=N'TContent'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ClassRoom]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ClassRoom](
	[RoomID] [int] IDENTITY(1,1) NOT NULL,
	[RoomName] [nvarchar](255) NULL,
	[SchoolID] [int] NULL,
	[ClassName] [nvarchar](50) NULL,
	[Room] [nvarchar](10) NULL,
	[Teacher] [nvarchar](255) NULL,
	[Adviser] [nvarchar](255) NULL,
	[Monitor] [nvarchar](255) NULL,
	[Creation] [datetime] NULL,
	[CreateUser] [int] NULL,
	[Integral] [int] NULL CONSTRAINT [DF_ZL_ClassRoom_Integral]  DEFAULT (0),
	[Classinfo] [ntext] NULL,
	[Grade] [int] NULL,
	[IsTrue] [int] NULL CONSTRAINT [DF_ZL_ClassRoom_IsTrue]  DEFAULT (0),
 CONSTRAINT [PK_ZL_ClassRoom] PRIMARY KEY CLUSTERED 
(
	[RoomID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'RoomID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'RoomName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'SchoolID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'年级' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'ClassName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Room'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'老师' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Teacher'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'副管理员' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Adviser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班长' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Monitor'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Creation'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人(管理员)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'CreateUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Integral'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级介绍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Classinfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'入学时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'Grade'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ClassRoom', @level2type=N'COLUMN', @level2name=N'IsTrue'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[Result],
	[ResultTime],
	[ProblemID],
	[UserID]
FROM
	[dbo].[ZL_Result]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MultiNode]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ReplayLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ReplayLog](
	[ID] [uniqueidentifier] NOT NULL,
	[ReplayLpgContext] [text] NULL,
	[LogID] [uniqueidentifier] NULL,
	[ReplayUserID] [int] NULL,
	[ReplayLogTime] [datetime] NULL,
	[ReplayFlag] [bit] NULL,
 CONSTRAINT [PK_ZL_Sns_ReplayLog] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_Report]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_Report](
	[PRid] [int] IDENTITY(1,1) NOT NULL,
	[Pmid] [int] NULL CONSTRAINT [DF_ZL_Sns_Report_Pmid]  DEFAULT (null),
	[Pid] [int] NULL CONSTRAINT [DF_ZL_Sns_Report_Pid]  DEFAULT (null),
	[Puid] [int] NULL CONSTRAINT [DF_ZL_Sns_Report_Puid]  DEFAULT (null),
	[R_to_uid] [int] NULL CONSTRAINT [DF_ZL_Sns_Report_R_to_uid]  DEFAULT (null),
	[R_to_time] [datetime] NULL CONSTRAINT [DF_ZL_Sns_Report_R_to_time]  DEFAULT (null),
	[R_type] [int] NULL CONSTRAINT [DF_ZL_Sns_Report_R_type]  DEFAULT (null),
 CONSTRAINT [PK_ZL_Sns_Report] PRIMARY KEY NONCLUSTERED 
(
	[PRid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_Select_ByValue]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE  PROCEDURE [dbo].[PR_Student_Select_ByValue] 
@SelectCondition nvarchar(500),
@WhereCondition nvarchar(500),
@OrderByExpression nvarchar(250)
 AS 
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
 DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	''+ @SelectCondition +''
FROM
	[dbo].[ZL_Student]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ClientRequire]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ClientRequire](
	[RequireID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[Require] [ntext] NOT NULL,
	[ReuqireDate] [datetime] NOT NULL CONSTRAINT [DF_ZL_ClientRequire_ReuqireDate]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ClientRequire] PRIMARY KEY CLUSTERED 
(
	[RequireID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_RoomActiveJoin]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_SystemBannerTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_SystemBannerTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[BannerName] [varchar](50) NULL,
	[BannerStyle] [varchar](255) NULL,
	[BannerIndex] [int] NULL,
	[BannerOrder] [int] NULL,
	[BannerShow] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_SystemBannerTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_SystemBannerTable', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_SystemBannerTable', @level2type=N'COLUMN', @level2name=N'BannerName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_SystemBannerTable', @level2type=N'COLUMN', @level2name=N'BannerStyle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(1为首页栏目 0为分栏目)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_SystemBannerTable', @level2type=N'COLUMN', @level2name=N'BannerIndex'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_SystemBannerTable', @level2type=N'COLUMN', @level2name=N'BannerOrder'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否显示(0为不显示 1为显示)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_SystemBannerTable', @level2type=N'COLUMN', @level2name=N'BannerShow'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CollectionInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CollectionInfo](
	[C_IID] [int] IDENTITY(1,1) NOT NULL,
	[ModeID] [int] NULL,
	[NodeID] [int] NULL,
	[ItemID] [int] NULL,
	[CollID] [int] NULL,
	[OldUrl] [nvarchar](500) NULL,
	[NewUrl] [nvarchar](500) NULL,
	[State] [int] NULL,
	[AddTime] [nvarchar](50) NULL,
	[Remark] [nvarchar](500) NULL,
 CONSTRAINT [PK_ZL_CollectionInfo] PRIMARY KEY CLUSTERED 
(
	[C_IID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'ModeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'ItemID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'CollID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'原网页地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'OldUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'NewUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'State'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionInfo', @level2type=N'COLUMN', @level2name=N'Remark'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_NodeRole]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_SystemLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_SystemLog](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[ContentID] [uniqueidentifier] NULL,
	[LogType] [varchar](20) NULL,
	[ModelUrl] [varchar](100) NULL,
	[CreateTime] [datetime] NULL,
	[LogContent] [varchar](1000) NULL,
	[LogTitle] [varchar](100) NULL,
 CONSTRAINT [PK_ZL_Sns_SystemLog] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[Noteid],
	[UserID],
	[UserName],
	[SchoolID],
	[RoomID],
	[Addtime],
	[StatusType],
	[StudentType],
	[StudentTypeTitle],
	[Auditing],
	[AuditingContext],
	[AuditingUserID],
	[AuditingUserName]
FROM
	[dbo].[ZL_Student]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CollectionItem]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CollectionItem](
	[CItem_ID] [int] IDENTITY(1,1) NOT NULL,
	[ItemName] [nvarchar](500) NULL,
	[ModeID] [int] NULL,
	[NodeID] [nvarchar](200) NULL,
	[SpecialID] [nvarchar](200) NULL,
	[SiteName] [nvarchar](100) NULL,
	[CollUrl] [nvarchar](200) NULL,
	[CodinChoice] [int] NULL,
	[CollNum] [int] NULL,
	[CollOrder] [int] NULL,
	[CollContext] [nvarchar](4000) NULL,
	[ListSettings] [nvarchar](1000) NULL,
	[PageSettings] [nvarchar](1000) NULL,
	[InfoPageSettings] [nvarchar](4000) NULL,
	[AddTime] [datetime] NULL,
	[LastTime] [nvarchar](50) NULL,
	[Switch] [int] NULL,
	[State] [int] NULL,
 CONSTRAINT [PK_ZL_CollectionItem] PRIMARY KEY CLUSTERED 
(
	[CItem_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'ItemName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'ModeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID(多节点使用，隔开）' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题ID（多专题用，隔开）' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'SpecialID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集网站' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'SiteName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集URL' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'CollUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编码选择' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'CodinChoice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指定采集数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'CollNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集排序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'CollOrder'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集简介' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'CollContext'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表设置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'ListSettings'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分页设置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'PageSettings'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容页采集设置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'InfoPageSettings'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后采集时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'LastTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集开关，1开始，2停止' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'Switch'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'采集状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CollectionItem', @level2type=N'COLUMN', @level2name=N'State'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_Delete]
(
	 @ServerID nvarchar(4000)
)
 AS 
		DECLARE @sql nvarchar(4000)
		set @sql = ''DELETE  FROM ZL_DownServer WHERE ServerID  IN ('' + @ServerID + '')''
		exec(@sql)





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_UserLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_UserLog](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[LogContext] [text] NULL,
	[CreatDate] [datetime] NULL,
	[UpdateLogDate] [datetime] NULL,
	[LogTypeID] [uniqueidentifier] NULL,
	[LogState] [int] NULL,
	[LogTitle] [varchar](50) NULL,
	[ReadCount] [int] NULL CONSTRAINT [DF_ZL_Sns_UserLog_ReadCount]  DEFAULT (0),
	[CriticismCount] [int] NULL CONSTRAINT [DF_ZL_Sns_UserLog_CriticismCount]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Sns_UserLog] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Subscribe]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Comment]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Comment](
	[CommentID] [int] IDENTITY(1,1) NOT NULL,
	[GeneralID] [int] NOT NULL,
	[Title] [nvarchar](255) NULL,
	[Contents] [nvarchar](300) NOT NULL,
	[Audited] [bit] NOT NULL CONSTRAINT [DF_ZL_Comment_Audited]  DEFAULT (0),
	[UserID] [int] NOT NULL,
	[CommentTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Comment_CommentTime]  DEFAULT (getdate()),
	[Score] [int] NOT NULL CONSTRAINT [DF_ZL_Comment_Score]  DEFAULT (0),
	[PK] [bit] NULL CONSTRAINT [DF_ZL_Comment_PK]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Comment] PRIMARY KEY CLUSTERED 
(
	[CommentID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论的标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Comment', @level2type=N'COLUMN', @level2name=N'Title'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0=反对 1=支持' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Comment', @level2type=N'COLUMN', @level2name=N'PK'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_UserLogType]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_UserLogType](
	[ID] [uniqueidentifier] NOT NULL,
	[LogTypeName] [varchar](50) NULL,
	[CreateTime] [datetime] NULL,
	[LogArea] [int] NULL,
	[UserID] [int] NULL,
	[LogTypePWD] [varchar](32) NULL,
 CONSTRAINT [PK_ZL_Sns_UserLogType] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Commodities]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Commodities](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[OrderID] [int] NULL CONSTRAINT [DF_ZL_Commodities_OrderID]  DEFAULT (1),
	[ItemID] [int] NULL,
	[Class] [int] NULL CONSTRAINT [DF_ZL_Commodities_Class]  DEFAULT (0),
	[Nodeid] [int] NULL CONSTRAINT [DF_ZL_Commodities_Nodeid]  DEFAULT (0),
	[ModelID] [int] NULL,
	[Categoryid] [int] NULL CONSTRAINT [DF_ZL_Commodities_Categoryid]  DEFAULT (0),
	[ProCode] [varchar](50) NULL,
	[BarCode] [varchar](50) NULL,
	[Proname] [varchar](255) NULL,
	[Kayword] [varchar](255) NULL,
	[ProUnit] [varchar](50) NULL,
	[Weight] [int] NULL CONSTRAINT [DF_ZL_Commodities_Weight]  DEFAULT (0),
	[ServerPeriod] [int] NULL CONSTRAINT [DF_ZL_Commodities_ServerPeriod]  DEFAULT (0),
	[ServerType] [int] NULL CONSTRAINT [DF_ZL_Commodities_ServerType]  DEFAULT (0),
	[ProClass] [int] NULL CONSTRAINT [DF_ZL_Commodities_ProClass]  DEFAULT (0),
	[Properties] [int] NULL CONSTRAINT [DF_ZL_Commodities_Properties]  DEFAULT (0),
	[Sales] [int] NULL CONSTRAINT [DF_ZL_Commodities_Sales]  DEFAULT (0),
	[Proinfo] [text] NULL,
	[Procontent] [text] NULL,
	[Clearimg] [varchar](255) NULL,
	[Thumbnails] [varchar](255) NULL,
	[Producer] [varchar](255) NULL,
	[Brand] [varchar](50) NULL,
	[Allowed] [int] NULL CONSTRAINT [DF_ZL_Commodities_Allowed]  DEFAULT (0),
	[Quota] [int] NULL CONSTRAINT [DF_ZL_Commodities_Quota]  DEFAULT (0),
	[DownQuota] [int] NULL CONSTRAINT [DF_ZL_Commodities_DownQuota]  DEFAULT (0),
	[Stock] [int] NULL CONSTRAINT [DF_ZL_Commodities_Stock]  DEFAULT (0),
	[StockDown] [int] NULL CONSTRAINT [DF_ZL_Commodities_StockDown]  DEFAULT (0),
	[JisuanFs] [int] NULL CONSTRAINT [DF_ZL_Commodities_JisuanFs]  DEFAULT (0),
	[Rate] [money] NULL CONSTRAINT [DF_ZL_Commodities_Rate]  DEFAULT (0),
	[Rateset] [int] NULL,
	[Dengji] [int] NULL CONSTRAINT [DF_ZL_Commodities_Dengji]  DEFAULT (0),
	[ShiPrice] [money] NULL CONSTRAINT [DF_ZL_Commodities_ShiPrice]  DEFAULT (0),
	[LinPrice] [money] NULL CONSTRAINT [DF_ZL_Commodities_LinPrice]  DEFAULT (0),
	[MemberPrice] [varchar](255) NULL CONSTRAINT [DF_ZL_Commodities_MemberPrice]  DEFAULT (0 | 0),
	[ActPrice] [varchar](255) NULL CONSTRAINT [DF_ZL_Commodities_ActPrice]  DEFAULT (0 | 0),
	[Wholesales] [int] NULL CONSTRAINT [DF_ZL_Commodities_Wholesales]  DEFAULT (0),
	[Wholesaleone] [int] NULL CONSTRAINT [DF_ZL_Commodities_Wholesaleone]  DEFAULT (0),
	[Wholesalesinfo] [varchar](255) NULL CONSTRAINT [DF_ZL_Commodities_Wholesalesinfo]  DEFAULT ('0|0,0|0,0|0'),
	[Preset] [varchar](255) NULL,
	[Integral] [int] NULL CONSTRAINT [DF_ZL_Commodities_Integral]  DEFAULT (0),
	[Propeid] [int] NULL CONSTRAINT [DF_ZL_Commodities_Propeid]  DEFAULT (0),
	[Recommend] [int] NULL CONSTRAINT [DF_ZL_Commodities_Recommend]  DEFAULT (0),
	[Priority] [int] NULL CONSTRAINT [DF_ZL_Commodities_Priority]  DEFAULT (0),
	[MonthClickNum] [int] NULL CONSTRAINT [DF_ZL_Commodities_MonthClickNum]  DEFAULT (0),
	[UpdateTime] [datetime] NULL CONSTRAINT [DF_ZL_Commodities_UpdateTime]  DEFAULT (getdate()),
	[ModeTemplate] [varchar](255) NULL,
	[AddUser] [varchar](255) NULL,
	[DownCar] [int] NULL CONSTRAINT [DF_ZL_Commodities_DownCar]  DEFAULT (0),
	[AddTime] [datetime] NULL CONSTRAINT [DF_ZL_Commodities_AddTime]  DEFAULT (getdate()),
	[TableName] [varchar](50) NULL,
	[Istrue] [int] NULL CONSTRAINT [DF_ZL_Commodities_Istrue]  DEFAULT (0),
	[Isgood] [int] NULL CONSTRAINT [DF_ZL_Commodities_Isgood]  DEFAULT (0),
	[MakeHtml] [int] NULL CONSTRAINT [DF_ZL_Commodities_MakeHtml]  DEFAULT (0),
	[Sold] [int] NULL CONSTRAINT [DF_ZL_Commodities_Sold]  DEFAULT (0),
	[isnew] [int] NULL CONSTRAINT [DF_ZL_Commodities_isnew]  DEFAULT (0),
	[ishot] [int] NULL CONSTRAINT [DF_ZL_Commodities_ishot]  DEFAULT (0),
	[isbest] [int] NULL CONSTRAINT [DF_ZL_Commodities_isbest]  DEFAULT (0),	
	[ComModelID] [int] NULL,
	[AllClickNum] [int] NULL CONSTRAINT [DF_ZL_Commodities_AllClickNum]  DEFAULT (0),
	[Largess] [int] NULL CONSTRAINT [DF_ZL_Commodities_Largess]  DEFAULT (0),
	[Largesspirx] [money] NULL CONSTRAINT [DF_ZL_Commodities_Largesspirx]  DEFAULT (0),
	[ProjectType] [int] NULL CONSTRAINT [DF_ZL_Commodities_ProjectType]  DEFAULT (1),
	[ProjectPronum] [int] NULL CONSTRAINT [DF_ZL_Commodities_ProjectPronum]  DEFAULT (1),
	[ProjectMoney] [money] NULL CONSTRAINT [DF_ZL_Commodities_ProjectMoney]  DEFAULT (0),
	[IntegralNum] [int] NULL CONSTRAINT [DF_ZL_Commodities_IntegralNum]  DEFAULT (1),
	[PesentNames] [nvarchar](255) NULL,
	[PesentNameid] [int] NULL,
	[Recycler] [bit] NULL CONSTRAINT [DF_ZL_Commodities_Recycler]  DEFAULT (0),	
	[ProSeller] [nvarchar] (255) NULL,
	[GuessType] [int] NULL,
	[GuessXML] [nvarchar](1000) NULL,
	[FirstNodeID] [int] NULL,
 CONSTRAINT [PK_ZL_Commodities] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Class'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Nodeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ModelID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属专题ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Categoryid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ProCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'条形码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'BarCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Proname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Kayword'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ProUnit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'重量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Weight'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'服务期限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ServerPeriod'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'期限日期格式[3-年2-月1-日]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ServerType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品类型[1-正常2-特价]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ProClass'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品属性' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Properties'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'销售操作[1-允许销售,2-不允许]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Sales'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品简介' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Proinfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品详细介绍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Procontent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品清晰图' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Clearimg'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品缩略图' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Thumbnails'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Producer'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商标' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Brand'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-缺货允许购买，0-不允许购买' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Allowed'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'限制购买数量[购买上限]-1不限制' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Quota'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最低购买数量[购买下限]-1不限制' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'DownQuota'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'库存数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Stock'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最低库存数量[报警]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'StockDown'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0-实际库存，1-虚拟库存(含订购)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'JisuanFs'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'税率设置,百分数%' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Rate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'税率设置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Rateset'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐等级' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Dengji'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市场价' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ShiPrice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零售价' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'LinPrice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'MemberPrice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ActPrice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批发' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Wholesales'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零售' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Wholesaleone'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批发价' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Wholesalesinfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'促销方案' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Preset'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购物积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Integral'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自选购买数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Propeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Recommend'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'绑定销售(1=绑定 0=不绑定)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Priority'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'MonthClickNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'UpdateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ModeTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'AddUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段](是否下架)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'DownCar'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型表名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'TableName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Istrue'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Isgood'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否生成' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'MakeHtml'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[未用][备用字段]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Sold'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'新品' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'isnew'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热销' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ishot'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'精品' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'isbest'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'从表ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ItemID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ComModelID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'点击数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'AllClickNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设为赠品(1-为赠品 0-非赠品)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Largess'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'赠品价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'Largesspirx'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'促销方案' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ProjectType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'促销方案涉及到数字的字段' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ProjectPronum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'方案涉及金钱的字段' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'ProjectMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购物数量送积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'IntegralNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'赠品名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'PesentNames'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'赠品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'PesentNameid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'竞拍选项；1：关闭，2：开启秒杀，3：开启竞拍' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'GuessType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'GuessType为2：存储秒杀XML信息，GuessType为3：存储竞拍XML信息' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'GuessXML'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'第一级节点' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Commodities', @level2type=N'COLUMN', @level2name=N'FirstNodeID'

GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_UserMoreinfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_UserMoreinfo](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[UserIdcard] [nvarchar](18) NULL,
	[UserSex] [bit] NULL,
	[UserStature] [nvarchar](3) NULL,
	[UserAvoir] [nvarchar](3) NULL,
	[UserBir] [nvarchar](50) NULL,
	[UserMarry] [nvarchar](50) NULL,
	[UserBachelor] [nvarchar](50) NULL,
	[UserMonthIn] [nvarchar](50) NULL,
	[UserHome] [nvarchar](50) NULL,
	[UserChild] [nvarchar](50) NULL,
	[UserConsortSex] [nvarchar](4) NULL,
	[UserConsortAge] [nvarchar](50) NULL,
	[UserConsortWorkArea] [nvarchar](50) NULL,
	[UserConsortMarry] [nvarchar](50) NULL,
	[UserConsortStature] [nvarchar](50) NULL,
	[UserConsortAvoir] [nvarchar](50) NULL,
	[UserConsortMonthIN] [nvarchar](50) NULL,
	[UserConsortBachelor] [nvarchar](50) NULL,
	[UserConsortHome] [nvarchar](50) NULL,
	[UserConsortOther] [nvarchar](200) NULL,
	[UserSomato] [nvarchar](50) NULL,
	[UserBlood] [nvarchar](50) NULL,
	[UserProvince] [nvarchar](50) NULL,
	[UserCity] [nvarchar](50) NULL,
	[UserNation] [nvarchar](50) NULL,
	[UserSchool] [nvarchar](50) NULL,
	[UserBrother] [nvarchar](50) NULL,
	[UserLanguage] [nvarchar](50) NULL,
	[UserLifePic4] [nvarchar](100) NULL,
	[UserLifePic3] [nvarchar](100) NULL,
	[UserLifePic1] [nvarchar](100) NULL,
	[UserLife] [nvarchar](50) NULL,
	[UserSmoke] [nvarchar](50) NULL,
	[UserDrink] [nvarchar](50) NULL,
	[UserWork] [nvarchar](50) NULL,
	[UserCar] [nvarchar](50) NULL,
	[UserCom] [nvarchar](50) NULL,
	[UserNeedchild] [nvarchar](50) NULL,
	[UserAcctive] [nvarchar](200) NULL,
	[UserAth] [nvarchar](200) NULL,
	[UserMusic] [nvarchar](200) NULL,
	[UserMovie] [nvarchar](200) NULL,
	[UserFood] [nvarchar](200) NULL,
	[UserArea] [nvarchar](200) NULL,
	[UserHeart] [ntext] NULL,
	[UserLove] [ntext] NULL,
	[UserLifePic2] [nvarchar](100) NULL,
	[UserConstellation] [nvarchar](50) NULL,
	[Xinyang] [nvarchar] (50)  NULL ,
	[Facey] [nvarchar] (500)  NULL ,
	[FaceType] [nvarchar] (50)  NULL ,
	[HairType] [nvarchar] (50) NULL ,
	[Lovepetlife] [nvarchar] (500) NULL ,
	[JobAnd] [nvarchar] (255) NULL ,	
 CONSTRAINT [PK_ZL_Sns_UserMoreinfo] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'星座' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Sns_UserMoreinfo', @level2type=N'COLUMN', @level2name=N'UserConstellation'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CommonModel]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CommonModel]
(
	[GeneralID] [int] IDENTITY(1,1) NOT NULL,
	[OrderID] [int] NULL CONSTRAINT [DF_ZL_CommonModel_OrderID]  DEFAULT (1),
	[NodeID] [int] NOT NULL,
	[ModelID] [int] NOT NULL,
	[ItemID] [int] NOT NULL,
	[TableName] [nvarchar](50) NOT NULL,
	[Title] [nvarchar](255) NOT NULL,
	[Inputer] [nvarchar](255) NULL CONSTRAINT [DF_ZL_CommonModel_Inputer]  DEFAULT (''),
	[Hits] [int] NULL CONSTRAINT [DF_ZL_CommonModel_Hits]  DEFAULT (0),
	[CreateTime] [datetime] NULL CONSTRAINT [DF_ZL_CommonModel_CreateTime]  DEFAULT (getdate()),
	[Status] [int] NULL CONSTRAINT [DF_ZL_CommonModel_Status]  DEFAULT (0),
	[EliteLevel] [int] NULL CONSTRAINT [DF_ZL_CommonModel_EliteLevel]  DEFAULT (0),
	[InfoID] [nvarchar](255) NULL CONSTRAINT [DF_ZL_CommonModel_InfoID]  DEFAULT (''),
	[SpecialID] [nvarchar](255) NULL CONSTRAINT [DF_ZL_CommonModel_SpecialID]  DEFAULT (''),
	[IsCreate] [int] NULL CONSTRAINT [DF_ZL_CommonModel_IsCreate]  DEFAULT (0),
	[HtmlLink] [nvarchar](500) NULL CONSTRAINT [DF_ZL_CommonModel_HtmlLink]  DEFAULT (''),
	[Titlecolor] [nvarchar](255) NULL CONSTRAINT [DF_ZL_CommonModel_Titlecolor]  DEFAULT (''),
	[Template] [nvarchar](255) NULL,
	[Tagkey] [nvarchar](1000) NULL,
	[UpDateTime] [datetime] NULL,
	[UpDateType] [int] NULL,
	[cast_file] [int] NULL,
	[because_back] [nvarchar] (200) NULL,
	[PdfLink] [nvarchar](500) NULL CONSTRAINT [DF_ZL_CommonModel_PdfLink]  DEFAULT (''),
	[Rtype] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL DEFAULT (null),
	[SuccessfulUserID] [int] NULL,
	[ComplianceUserList] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[Subtitle] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[PYtitle] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[BidMoney] [money] NULL,
	[IsBid] [int] NULL,
	[Pronum] [int] NULL,
	[ProWeek] [int] NULL,
	[BidType] [int] NULL,
	[DefaultSkins] [int]  NULL CONSTRAINT [DF_ZL_CommonModel_DefaultSkins]  DEFAULT (0),
	[OrederClass] [int] NULL,
	[FirstNodeID] [int] NULL,
	[TitleStyle] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_CommonModel] PRIMARY KEY CLUSTERED 
(
	[GeneralID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容全局ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'GeneralID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属内容模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'ModelID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'相应表的记录ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'ItemID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Title'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'录入者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Inputer'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'点击数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Hits'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生成时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'CreateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信息状态 -2为删除，-1为退稿，0为待审核，99为终审通过，其它为自定义' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Status'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'EliteLevel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属其他节点数组' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'InfoID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属专题ID数组' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'SpecialID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已生成0=未生成 1=已生成' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'IsCreate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生成的静态页面地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'HtmlLink'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Tagkey'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'UpDateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'UpDateType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题颜色' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Titlecolor'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'PDF生成地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'PdfLink'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'副标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'Subtitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'拼音标题缩写' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'PYtitle'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容类别' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'OrederClass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'第一级节点' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'FirstNodeID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题字体' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CommonModel', @level2type=N'COLUMN', @level2name=N'TitleStyle'

GO





SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_CallNote_Select_Where]
@WhereCondition NVARCHAR(500),
@Outcome NVARCHAR(250)
AS
DECLARE @sql VARCHAR(800)
SET @sql=''SELECT ''+@Outcome+'' FROM ZL_CallNote WHERE 1=1 ''+@WhereCondition
EXEC (@sql)
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_UserShopProduct]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_UserShopProduct](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[ProductID] [uniqueidentifier] NULL,
	[ShopDay] [int] NULL,
	[Addtime] [datetime] NULL,
	[LargessContent] [ntext] NULL,
	[LargessID] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_UserShopProduct] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CompanyResume]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CompanyResume](
	[CID] [int] IDENTITY(1,1) NOT NULL,
	[CompanyID] [int] NOT NULL,
	[ResumeID] [int] NOT NULL,
	[JobID] [int] NOT NULL,
	[ResumeTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_CompanyResume_ResumeTime]  DEFAULT (getdate()),
	[UserID] [int] NOT NULL,
	[sendTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_CompanyResume_sendTime]  DEFAULT (getdate())
 CONSTRAINT [PK_ZL_CompanyResume] PRIMARY KEY CLUSTERED 
(
	[CID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投递简历ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CompanyResume', @level2type=N'COLUMN', @level2name=N'CID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'企业用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CompanyResume', @level2type=N'COLUMN', @level2name=N'CompanyID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'简历ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CompanyResume', @level2type=N'COLUMN', @level2name=N'ResumeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'应聘职位ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CompanyResume', @level2type=N'COLUMN', @level2name=N'JobID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投递时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CompanyResume', @level2type=N'COLUMN', @level2name=N'ResumeTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投递人ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CompanyResume', @level2type=N'COLUMN', @level2name=N'UserID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

























CREATE PROCEDURE [dbo].[PR_Card_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Card]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_User_R_GS]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_User_R_GS](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[GSID] [uniqueidentifier] NULL,
	[CreateTime] [datetime] NULL,
	[LastCallTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_User_R_GS] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ContentHis]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ContentHis](
	[HID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[ContentID] [int] NOT NULL,
	[HisTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_ContentHis_HisTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ContentHis] PRIMARY KEY CLUSTERED 
(
	[HID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览内容记录ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ContentHis', @level2type=N'COLUMN', @level2name=N'HID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ContentHis', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览的内容ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ContentHis', @level2type=N'COLUMN', @level2name=N'ContentID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ContentHis', @level2type=N'COLUMN', @level2name=N'HisTime'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[ActiveID],
	[UserID],
	[UserName],
	[AddTime]
FROM
	[dbo].[ZL_RoomActiveJoin]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Correct]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Correct](
	[CorrectID] [int] IDENTITY(1,1) NOT NULL,
	[CorrectUrl] [nvarchar](255) NOT NULL,
	[CorrectTitle] [nvarchar](255) NOT NULL,
	[CorrectType] [int] NOT NULL CONSTRAINT [DF_ZL_Correct_CorrectType]  DEFAULT (0),
	[CorrectDetail] [nvarchar](255) NULL,
	[CorrectPer] [nvarchar](50) NULL,
	[PerEmail] [nvarchar](50) NULL,
 CONSTRAINT [PK_ZL_Correct] PRIMARY KEY CLUSTERED 
(
	[CorrectID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0-内容错误 1-错别字 2-图片错误 3-链接错误' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Correct', @level2type=N'COLUMN', @level2name=N'CorrectType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_RoomActive]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_NodeRole]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Dscene]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_User_R_Module]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_User_R_Module](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[VisibleDegree] [int] NULL,
	[ModuleID] [uniqueidentifier] NULL,
	[Taix] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_User_R_Module] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_blogTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_blogTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[BlogName] [varchar](50) NULL,
	[BlogContent] [ntext] NULL,
	[BlogState] [int] NULL,
	[Addtime] [datetime] NULL,
	[CommendState] [int] NULL,
	[StyleID] [int] NULL,
	[BlogHits] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_blogTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CustomerService]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CustomerService](
	[CS_ID] [int] IDENTITY(1,1) NOT NULL,
	[CS_Context] [nvarchar](4000) NULL,
	[CS_SendID] [int] NULL,
	[CS_SendName] [nvarchar](50) NULL,
	[CS_Ctouid] [int] NULL,
	[CS_CtoName] [nvarchar](50) NULL,
	[CS_AddTime] [datetime] NULL,
	[CS_Type] [int] NULL,
	[CS_OID] [int] NULL,
	[CS_Remrk] [nvarchar](500) NULL,
 CONSTRAINT [PK_ZL_CustomerService] PRIMARY KEY CLUSTERED 
(
	[CS_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_Context'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_SendID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_SendName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接收者ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_Ctouid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接收者用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_CtoName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信息类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_Type'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'OnlineUsersID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_OID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CustomerService', @level2type=N'COLUMN', @level2name=N'CS_Remrk'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Source]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Source](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Type] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Source_Type]  DEFAULT (0),
	[Name] [nvarchar](50) NOT NULL,
	[Passed] [bit] NULL CONSTRAINT [DF_ZL_Source_Passed]  DEFAULT (0),
	[onTop] [bit] NULL CONSTRAINT [DF_ZL_Source_onTop]  DEFAULT (0),
	[IsElite] [bit] NULL CONSTRAINT [DF_ZL_Source_IsElite]  DEFAULT (0),
	[Hits] [int] NULL CONSTRAINT [DF_ZL_Source_Hits]  DEFAULT (0),
	[LastUseTime] [datetime] NULL,
	[Photo] [nvarchar](255) NULL,
	[Intro] [nvarchar](255) NULL,
	[Address] [nvarchar](50) NULL,
	[Tel] [nvarchar](50) NULL,
	[Fax] [nvarchar](50) NULL,
	[Mail] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL,
	[ZipCode] [int] NULL,
	[HomePage] [nvarchar](50) NULL,
	[Im] [nvarchar](50) NULL,
	[Contacter] [nvarchar](50) NULL,
 CONSTRAINT [PK_ZL_Source] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Subscribe]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_DChat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_DChat](
	[ChatID] [int] IDENTITY(1,1) NOT NULL,
	[Ctitle] [nvarchar](1000) NULL,
	[Ccontent] [ntext] NULL,
	[Caddtime] [datetime] NULL CONSTRAINT [DF_ZL_DChat_Caddtime]  DEFAULT (getdate()),
	[Cadduser] [nvarchar](255) NULL,
	[Ctouid] [int] NULL,
	[Ctouname] [nvarchar](255) NULL,
	[ChatType] [int] NULL,
 CONSTRAINT [PK_ZL_DChat] PRIMARY KEY CLUSTERED 
(
	[ChatID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'聊天标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'Ctitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'聊天内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'Ccontent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'Caddtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'Cadduser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标用户ID，当ChatType是3时，这里的值是ZL_Daffiche的索引ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'Ctouid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'Ctouname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'聊天类型  1，大厅；2，私聊 ；3，公告；' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DChat', @level2type=N'COLUMN', @level2name=N'ChatType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_SpecCate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_SpecCate](
	[SpecCateID] [int] IDENTITY(1,1) NOT NULL,
	[SpecCateName] [nvarchar](50) NOT NULL,
	[SpecCateDir] [nvarchar](50) NOT NULL,
	[SpecCateDesc] [nvarchar](255) NULL,
	[OpenType] [bit] NULL CONSTRAINT [DF_ZL_SpecCate_OpenType]  DEFAULT (0),
	[FileExt] [int] NULL,
	[ListTemplate] [nvarchar](255) NULL,
	[NodeID] [int] NULL CONSTRAINT [DF_ZL_SpecCate_NodeID] DEFAULT (0),
	[SpecCateDescriptive] [nvarchar](255) NULL,
	[SpecCateKeyword] [nvarchar] (50) NULL,
	[SpecCatePicUrl] [nvarchar] (50) NULL,
	[SpecCateTips] [nvarchar] (50) NULL,
 CONSTRAINT [PK_ZL_SpecCate] PRIMARY KEY CLUSTERED 
(
	[SpecCateID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'SpecCateName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别目录名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'SpecCateDir'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'打开方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'OpenType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件扩展名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'FileExt'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别列表页模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'ListTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别描述' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'SpecCateDescriptive'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'SpecCateKeyword'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别图片' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'SpecCatePicUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题类别提示' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SpecCate', @level2type=N'COLUMN', @level2name=N'SpecCateTips'

GO








SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_DShowUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_DShowUser](
	[D_Sid] [int] IDENTITY(1,1) NOT NULL,
	[D_ShowUserid] [int] NULL,
	[D_ShowX] [int] NULL,
	[D_ShowY] [int] NULL,
	[DupdateTime] [datetime] NULL,
	[D_Remark] [nvarchar](100) NULL,
	[D_ShopID] [int] NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DShowUser', @level2type=N'COLUMN', @level2name=N'D_ShowUserid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户X坐标' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DShowUser', @level2type=N'COLUMN', @level2name=N'D_ShowX'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户Y坐标' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DShowUser', @level2type=N'COLUMN', @level2name=N'D_ShowY'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后动作时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DShowUser', @level2type=N'COLUMN', @level2name=N'DupdateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DShowUser', @level2type=N'COLUMN', @level2name=N'D_Remark'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所在店铺ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DShowUser', @level2type=N'COLUMN', @level2name=N'D_ShopID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_SpecInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_SpecInfo](
	[SpecInfoID] [int] IDENTITY(1,1) NOT NULL,
	[SpecialID] [int] NOT NULL,
	[InfoID] [int] NOT NULL,
 CONSTRAINT [PK_ZL_SpecInfo] PRIMARY KEY CLUSTERED 
(
	[SpecInfoID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Node_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Node_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Node]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Daffiche]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Daffiche](
	[Dafficheid] [int] IDENTITY(1,1) NOT NULL,
	[DafficheTitle] [nvarchar](1000) NULL,
	[Duserstate] [int] NULL,
	[Dsendto] [int] NULL,
	[Daddtime] [datetime] NULL CONSTRAINT [DF_ZL_Daffiche_Daddtime]  DEFAULT (getdate()),
	[DafficheContent] [ntext] NULL,
	[DendTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Daffiche] PRIMARY KEY CLUSTERED 
(
	[Dafficheid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公告ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'Dafficheid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公告标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'DafficheTitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公告类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'Duserstate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接收对象' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'Dsendto'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'Daddtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公告内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'DafficheContent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公告结束时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Daffiche', @level2type=N'COLUMN', @level2name=N'DendTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Special]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Special](
	[SpecID] [int] IDENTITY(1,1) NOT NULL,
	[SpecName] [nvarchar](50) NOT NULL,
	[SpecDir] [nvarchar](50) NOT NULL,
	[SpecDesc] [nvarchar](255) NULL,
	[OpenType] [bit] NULL CONSTRAINT [DF_ZL_Special_OpenType]  DEFAULT (0),
	[SpecCate] [int] NOT NULL,
	[ListFileExt] [int] NULL,
	[ListTemplate] [nvarchar](255) NULL,
	[ListFileRule] [int] NULL CONSTRAINT [DF_ZL_Special_ListFileRule]  DEFAULT (0),
	[SpecDescriptive] [nvarchar] (255) NOT NULL,
	[SpecKeyword] [nvarchar] (50) NOT NULL,
	[SpecPicUrl] [nvarchar] (50) NOT NULL,
	[SpecTips]	[nvarchar]  (50) NOT NULL,
 CONSTRAINT [PK_ZL_Special] PRIMARY KEY CLUSTERED 
(
	[SpecID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题目录' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecDir'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecDesc'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'打开方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'OpenType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属专题类别' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecCate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'扩展名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'ListFileExt'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表页模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'ListTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表页文件名规则' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'ListFileRule'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'描述' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecDescriptive'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecKeyword'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题图片' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecPicUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专题提示' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Special', @level2type=N'COLUMN', @level2name=N'SpecTips'

GO









SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Datadic]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Datadic](
	[Dicid] [int] IDENTITY(1,1) NOT NULL,
	[Diccate] [int] NOT NULL CONSTRAINT [DF_ZL_DATADIC_DICCATE]  DEFAULT (0),
	[Dicname] [varchar](50) NOT NULL,
	[Isused] [bit] NULL,
 CONSTRAINT [PK_ZL_DATADIC] PRIMARY KEY CLUSTERED 
(
	[Dicid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Card]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Datadiccategory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Datadiccategory](
	[Diccateid] [int] IDENTITY(1,1) NOT NULL,
	[Categoryname] [varchar](50) NOT NULL,
	[Isused] [bit] NULL CONSTRAINT [DF_ZL_DATADICCATEGORY_ISUSED]  DEFAULT (0),
 CONSTRAINT [PK_ZL_DATADICCATEGORY] PRIMARY KEY CLUSTERED 
(
	[Diccateid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_OnlineUsers]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Stock]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Stock](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[stocktype] [int] NULL CONSTRAINT [DF_ZL_Stock_stocktype]  DEFAULT (0),
	[danju] [varchar](50) NULL,
	[proname] [varchar](50) NULL,
	[addtime] [datetime] NULL CONSTRAINT [DF_ZL_Stock_addtime]  DEFAULT (getdate()),
	[adduser] [varchar](50) NULL,
	[content] [ntext] NULL,
	[proid] [int] NULL,
	[pronum] [int] NULL CONSTRAINT [DF_ZL_Stock_pronum]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Stock] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Dbooth]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Dbooth](
	[Dboothid] [int] IDENTITY(1,1) NOT NULL,
	[DboothName] [nvarchar](255) NULL,
	[DboothUser] [nvarchar](50) NULL,
	[DboothUserid] [int] NULL,
	[DboothLogo] [nvarchar](1000) NULL,
	[DboothAddtime] [datetime] NULL CONSTRAINT [DF_ZL_Dbooth_DboothAddtime]  DEFAULT (getdate()),
	[DboothType] [int] NULL,
 CONSTRAINT [PK_ZL_Dbooth] PRIMARY KEY CLUSTERED 
(
	[Dboothid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'Dboothid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'DboothName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位负责人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'DboothUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位负责人ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'DboothUserid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位LOGO' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'DboothLogo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'DboothAddtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dbooth', @level2type=N'COLUMN', @level2name=N'DboothType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[AID],
	[ActiveUserID],
	[ActiveTitle],
	[ActiveContext],
	[ActiveStateTime],
	[ActiveEndTime],
	[ActiveAddTime],
	[ActivePic],
	[RoomID]
FROM
	[dbo].[ZL_RoomActive]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Dscene]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_StoreStyleTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_StoreStyleTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[StyleName] [varchar](50) NULL,
	[StylePic] [varchar](100) NULL,
	[StyleUrl] [varchar](200) NULL,
	[ListStyle] [nvarchar](255) NULL,
	[ContentStyle] [nvarchar](255) NULL,
	[ModelID] [int] NULL,
	[IsTrue] [int] NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表页模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_StoreStyleTable', @level2type=N'COLUMN', @level2name=N'ListStyle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容页模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_StoreStyleTable', @level2type=N'COLUMN', @level2name=N'ContentStyle'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Delivier]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Delivier](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[deliname] [varchar](50) NULL,
	[deliinfo] [varchar](255) NULL,
	[delitype] [money] NULL,
	[shuilv] [money] NULL,
	[selectto] [int] NULL,
	[isuse] [int] NULL CONSTRAINT [DF_ZL_Delivier_isuse]  DEFAULT (1),
	[istype] [int] NULL CONSTRAINT [DF_ZL_Delivier_istype]  DEFAULT (1),
	[citymoney] [money] NULL,
	[citykg] [float] NULL,
	[bigcitykg] [float] NULL,
	[bigcitymoney] [money] NULL,
	[maxcity] [money] NULL,
	[outmoney] [money] NULL,
	[outkg] [float] NULL,
	[bigoutkg] [float] NULL,
	[bigoutmoney] [money] NULL,
	[maxout] [money] NULL,
	[city] [nvarchar](100) NULL,
 CONSTRAINT [PK_ZL_Delivier] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MoneyManage]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MoneyManage](
	[Flow] [int] IDENTITY(1,1) NOT NULL,
	[Money_code] [varchar](10) NULL,
	[Money_descp] [varchar](20) NULL,
	[Money_sign] [varchar](4) NULL,
	[Money_rate] [numeric](18, 5) NULL,
	[Is_flag] [char](1) NULL,
 CONSTRAINT [PK_zl_moneyManage] PRIMARY KEY CLUSTERED 
(
	[Flow] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'汇率' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MoneyManage', @level2type=N'COLUMN', @level2name=N'Money_rate'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'1为默认货币，' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MoneyManage', @level2type=N'COLUMN', @level2name=N'Is_flag'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1免费2重量计算3固定值' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'istype'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'城市之间基本运费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'citymoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'城市之间货物重量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'citykg'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'城市之间货物超出重量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'bigcitykg'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'城市之间每公斤超出运费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'bigcitymoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'城市之间最大运费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'maxcity'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'省外基本运费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Delivier', @level2type=N'COLUMN', @level2name=N'outmoney'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_RoomNotify]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Duser]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Store_test]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Store_test](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[UserName] [varchar](255) NULL,
	[StoreName] [varchar](50) NULL,
	[StoreCredit] [int] NULL CONSTRAINT [DF__ZL_Store___Store__6F556E19]  DEFAULT (0),
	[StoreCommendState] [int] NULL CONSTRAINT [DF__ZL_Store___Store__70499252]  DEFAULT (0),
	[StoreState] [int] NULL CONSTRAINT [DF__ZL_Store___Store__713DB68B]  DEFAULT (0),
	[StoreStyleID] [int] NULL CONSTRAINT [DF__ZL_Store___Store__7231DAC4]  DEFAULT (0),
	[StoreModelID] [int] NULL,
	[StoreStyle] [int] NULL CONSTRAINT [DF__ZL_Store___Store__7325FEFD]  DEFAULT (0),
	[AddTime] [datetime] NULL CONSTRAINT [DF__ZL_Store___AddTi__741A2336]  DEFAULT (getdate()),
PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Dinformation]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Dinformation](
	[Boothstart] [int] NOT NULL CONSTRAINT [DF_ZL_Dinformation_Boothstart]  DEFAULT (1),
	[Boothnum] [int] NULL CONSTRAINT [DF_ZL_Dinformation_Boothnum]  DEFAULT (100),
	[BootNametop] [nvarchar](255) NULL CONSTRAINT [DF_ZL_Dinformation_BootNametop]  DEFAULT (N'TC_'),
	[ReCreate] [int] NULL CONSTRAINT [DF_ZL_Dinformation_ReCreate]  DEFAULT (0),
	[AutoCreate] [int] NULL CONSTRAINT [DF_ZL_Dinformation_AutoCreate]  DEFAULT (0),
	[BootTopTemp] [nvarchar](500) NULL,
	[BootRightTemp] [nvarchar](500) NULL,
	[BootBottomTemp] [nvarchar](500) NULL,
	[BootProinfoTemp] [nvarchar](500) NULL,
	[BootProlistTemp] [nvarchar](500) NULL,
 CONSTRAINT [PK_ZL_Dinformation] PRIMARY KEY CLUSTERED 
(
	[Boothstart] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位起始编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'Boothstart'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'Boothnum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'摊位编号名称前缀(管理可见)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'BootNametop'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'重新创建' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'ReCreate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自动创建' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'AutoCreate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'顶部模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'BootTopTemp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'右边模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'BootRightTemp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'底部模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'BootBottomTemp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品信息模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'BootProinfoTemp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品列表模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dinformation', @level2type=N'COLUMN', @level2name=N'BootProlistTemp'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Student]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Student](
	[Noteid] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[UserName] [nvarchar](255) NULL,
	[SchoolID] [int] NULL,
	[RoomID] [int] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Student_Addtime]  DEFAULT (getdate()),
	[StatusType] [int] NULL,
	[StudentType] [int] NULL,
	[StudentTypeTitle] [nvarchar](50) NULL,
	[Auditing] [bit] NULL,
	[AuditingContext] [nvarchar](50) NULL,
	[AuditingUserID] [int] NULL,
	[AuditingUserName] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_Student] PRIMARY KEY CLUSTERED 
(
	[Noteid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'Noteid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'SchoolID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'RoomID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加入时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'身份类型 1：学生，2：老师，3：家长' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'StatusType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学生属性：1、学生' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'StudentType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学生属性：是学生或班干部；StatusType属性为1时。此属性值有效' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'StudentTypeTitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核用户 0：未审核，1：审核通过' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'Auditing'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'申请理由' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'AuditingContext'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'AuditingUserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核用户用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Student', @level2type=N'COLUMN', @level2name=N'AuditingUserName'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Subscribe]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Subscribe](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[SubscribeName] [nvarchar](100) NULL,
 CONSTRAINT [PK_ZL_Subscribe] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_DownServer]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_DownServer](
	[ServerID] [int] NOT NULL,
	[ServerName] [nvarchar](50) NULL,
	[ServerUrl] [nvarchar](50) NULL,
	[ServerLogo] [nvarchar](255) NULL,
	[OrderID] [int] NULL,
	[ShowType] [int] NULL,
	[UrlEncrypt] [int] NULL CONSTRAINT [DF_ZL_DownServer_UrlEncrypt]  DEFAULT (0),
	[EncryptKey] [nvarchar](255) NULL CONSTRAINT [DF_ZL_DownServer_EncryptKey]  DEFAULT (''),
	[TimeEncrypt] [int] NULL CONSTRAINT [DF_ZL_DownServer_TimeEncrypt]  DEFAULT (0),
	[UpTimeuti] [int] NULL CONSTRAINT [DF_ZL_DownServer_UpTimeuti]  DEFAULT (1),
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Survey_Addtime]  DEFAULT (getdate()),
	[Encryptime] [datetime] NULL CONSTRAINT [DF_ZL_Survey_Encryptime]  DEFAULT (getdate()),
	[ReadRoot] [nvarchar](1000) NULL,
	
 CONSTRAINT [PK_ZL_DownServer] PRIMARY KEY CLUSTERED 
(
	[ServerID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加密方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DownServer', @level2type=N'COLUMN', @level2name=N'UrlEncrypt'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加密密钥' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DownServer', @level2type=N'COLUMN', @level2name=N'EncryptKey'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间戳加密' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DownServer', @level2type=N'COLUMN', @level2name=N'TimeEncrypt'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间戳间隔时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DownServer', @level2type=N'COLUMN', @level2name=N'UpTimeuti'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DownServer', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加密更新时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_DownServer', @level2type=N'COLUMN', @level2name=N'Encryptime'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Survey]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Survey](
	[Surveyid] [int] IDENTITY(1,1) NOT NULL,
	[Surveyname] [varchar](255) NOT NULL,
	[Description] [text] NULL,
	[Createdate] [datetime] NULL CONSTRAINT [DF_ZL_Survey_Createdate]  DEFAULT (getdate()),
	[Endtime] [datetime] NULL CONSTRAINT [DF_ZL_Survey_Endtime]  DEFAULT (getdate()),
	[Isopen] [varchar](50) NULL CONSTRAINT [DF_ZL_Survey_Isopen]  DEFAULT (1),
	[NeedLogin] [varchar](50) NULL CONSTRAINT [DF_ZL_Survey_NeedLogin]  DEFAULT (0),
	[Surtype] [int] NULL CONSTRAINT [DF_ZL_Survey_Surtype]  DEFAULT (1),
	[Iprepeat] [int] NULL CONSTRAINT [DF_ZL_Survey_Iprepeat]  DEFAULT (1),
 CONSTRAINT [PK_ZL_Survey] PRIMARY KEY CLUSTERED 
(
	[Surveyid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Dscene]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Dscene](
	[DSceneid] [int] IDENTITY(1,1) NOT NULL,
	[DSceneName] [nvarchar](255) NULL,
	[DSceneClass] [nvarchar](500) NULL,
	[DSceneBG] [nvarchar](255) NULL,
	[DSceneDIV] [ntext] NULL,
	[DSceneAddtime] [datetime] NULL CONSTRAINT [DF_ZL_Dscene_DSceneAddtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Dscene] PRIMARY KEY CLUSTERED 
(
	[DSceneid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'场景ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dscene', @level2type=N'COLUMN', @level2name=N'DSceneid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'场景名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dscene', @level2type=N'COLUMN', @level2name=N'DSceneName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'场景分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dscene', @level2type=N'COLUMN', @level2name=N'DSceneClass'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'场景背景' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dscene', @level2type=N'COLUMN', @level2name=N'DSceneBG'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'隔离DIV' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Dscene', @level2type=N'COLUMN', @level2name=N'DSceneDIV'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Trademark]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Trademark](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Trname] [varchar](255) NULL,
	[Producer] [int] NULL,
	[TrClass] [varchar](50) NULL,
	[Isuse] [int] NULL CONSTRAINT [DF_ZL_Trademark_Isuse]  DEFAULT (0),
	[Istop] [int] NULL CONSTRAINT [DF_ZL_Trademark_Istop]  DEFAULT (0),
	[Isbest] [int] NULL CONSTRAINT [DF_ZL_Trademark_Isbest]  DEFAULT (0),
	[TrPhoto] [varchar](50) NULL,
	[TrContent] [text] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Trademark_Addtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Trademark] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Duser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Duser](
	[Duserid] [int] IDENTITY(1,1) NOT NULL,
	[DuShow] [int] NULL,
	[Dbooth] [nvarchar](255) NULL,
	[Dmetier] [nvarchar](255) NULL,
	[Dcorp] [nvarchar](255) NULL,
	[Daddress] [nvarchar](255) NULL,
	[Dphone] [nvarchar](50) NULL,
	[Dmobile] [nvarchar](50) NULL,
	[Dfax] [nvarchar](50) NULL,
	[DEmail] [nvarchar](50) NULL,
	[Dmessage] [int] NULL,
	[Dexpiry] [datetime] NULL,
	[Dactiva] [int] NULL,
	[Dscene] [int] NULL,
	[Dislogin] [int] NULL,
	[DtopicTime] [datetime] NULL CONSTRAINT [DF_ZL_Duser_DtopicTime]  DEFAULT (getdate()),
	[Dutype] [int] NULL,
	[Dupicnum] [int] NULL,
	[DendLogtime] [datetime] NULL CONSTRAINT [DF_ZL_Duser_DendLogtime]  DEFAULT (getdate()),
	[Duid] [int] NULL,
	[DNewInfo] [ntext] NULL,
	[Dlogo] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_Duser] PRIMARY KEY CLUSTERED 
(
	[Duserid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Duserid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户展位' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'DuShow'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'展位招牌' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dbooth'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职业' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dmetier'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'企业名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dcorp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通信地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Daddress'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系电话' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dphone'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dmobile'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'传真' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dfax'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Email' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'DEmail'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'留言数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dmessage'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'有效截止期' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dexpiry'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否激活' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dactiva'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'场景名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dscene'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否登陆' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dislogin'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后发言时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'DtopicTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户类型(买家，参展商)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dutype'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传图片数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'Dupicnum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后登陆时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Duser', @level2type=N'COLUMN', @level2name=N'DendLogtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_OnlineUsers]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_URLRewriter]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_URLRewriter](
	[Urid] [int] IDENTITY(1,1) NOT NULL,
	[NodeID] [int] NULL,
	[Sendto] [nvarchar](255) NOT NULL,
	[LookFor] [nvarchar](255) NOT NULL,
	[KeyName] [nvarchar](255) NOT NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_URLRewriter_Addtime]  DEFAULT (getdate()),
	[UrlGo] [int] NULL CONSTRAINT [DF_ZL_URLRewriter_UrlGo]  DEFAULT (1),
	[UserID] [int] NULL
 CONSTRAINT [PK_ZL_URLRewriter] PRIMARY KEY CLUSTERED 
(
	[Urid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_URLRewriter', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_URLRewriter', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ExChange]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ExChange](
	[C_ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[PUserID] [int] NULL,
	[Talk] [int] NULL CONSTRAINT [DF_ZL_ExChange_Talk]  DEFAULT (1),
	[UserChange] [int] NULL CONSTRAINT [DF_ZL_ExChange_UserChange]  DEFAULT (0),
	[PUserChange] [int] NULL CONSTRAINT [DF_ZL_ExChange_PUserChange]  DEFAULT (0),
	[EState] [int] NULL CONSTRAINT [DF_ZL_ExChange_EState]  DEFAULT (0),
	[UserPost] [int] NULL CONSTRAINT [DF_ZL_ExChange_UserPost]  DEFAULT (0),
	[PUserPost] [int] NULL CONSTRAINT [DF_ZL_ExChange_PUserPost]  DEFAULT (0),
	[UserLock] [int] NULL CONSTRAINT [DF_ZL_ExChange_UserLock]  DEFAULT (0),
	[PUserLock] [int] NULL CONSTRAINT [DF_ZL_ExChange_PUserLock]  DEFAULT (0),
 CONSTRAINT [PK_ZL_ExChange] PRIMARY KEY CLUSTERED 
(
	[C_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'申请USERID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被交换USERID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'PUserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'交谈是否可见0不可见，1可见' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'Talk'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'申请交换状态1同意，0不同意' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'UserChange'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被申请方交换状态1同意，0不同意' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'PUserChange'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最终状态1交换成功0交换不成功' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'EState'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否邮寄0没邮寄，1邮寄' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'UserPost'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否邮寄0没邮寄，1邮寄' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'PUserPost'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'申请者锁定' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'UserLock'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被申请者锁定' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ExChange', @level2type=N'COLUMN', @level2name=N'PUserLock'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_User]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_User](
	[UserID] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [nvarchar](255) NOT NULL,
	[UserPwd] [nvarchar](200) NOT NULL,
	[GroupID] [int] NOT NULL CONSTRAINT [DF_ZL_User_GroupID]  DEFAULT (0),
	[Email] [nvarchar](50) NOT NULL,
	[Question] [nvarchar](255) NOT NULL,
	[Answer] [nvarchar](255) NOT NULL,
	[RegTime] [datetime] NULL CONSTRAINT [DF_ZL_User_RegTime]  DEFAULT (getdate()),
	[LoginTimes] [int] NULL CONSTRAINT [DF_ZL_User_LoginTimes]  DEFAULT (0),
	[LastLoginTime] [datetime] NULL CONSTRAINT [DF_ZL_User_LastLoginTime]  DEFAULT (getdate()),
	[LastLoginIP] [nvarchar](50) NULL,
	[LastPwdChangeTime] [datetime] NULL CONSTRAINT [DF_ZL_User_LastPwdChangeTime]  DEFAULT (getdate()),
	[LastLockTime] [datetime] NULL CONSTRAINT [DF_ZL_User_LastLockTime]  DEFAULT (getdate()),
	[Status] [int] NULL CONSTRAINT [DF_ZL_User_Status]  DEFAULT (0),
	[CheckNum] [nvarchar](50) NULL,
	[UserExp] [int] NULL CONSTRAINT [DF_ZL_User_UserExp]  DEFAULT (0),
	[boffExp] [int] NULL CONSTRAINT [DF_ZL_User_boffExp]  DEFAULT (0),
	[ConsumeExp] [int] NULL CONSTRAINT [DF_ZL_User_Balance]  DEFAULT (0),
	[Purse] [money] NULL CONSTRAINT [DF_ZL_User_Purse]  DEFAULT (0),
	[DeadLine] [datetime] NULL,
	[UserPoint] [money] NULL CONSTRAINT [DF__ZL_User__UserPoi__3E9D2825]  DEFAULT (0),
	[JoinTime] [datetime] NULL CONSTRAINT [DF_ZL_User_JoinTime]  DEFAULT (getdate()),
	[DummyPurse] [money] NULL CONSTRAINT [DF_ZL_User_DummyPurse]  DEFAULT (0),
	[Permissions] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[SiteID] [int] NULL,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[CompanyName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyDescribe] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[NHouseID] [int] NULL ,
	[IsConfirm] [int] null,
	[VIP] [int] NULL CONSTRAINT [DF_ZL_User_vip]  DEFAULT (0),
	[salt] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[State] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_User_state]  DEFAULT (0),
	[CerificateLogo] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[ApproveType] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[RegisterIP] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[CerificateDeadLine] [datetime] NULL,
	[RebatesBalance] [money] NULL CONSTRAINT [DF_ZL_User_RebatesBalance]  DEFAULT (0),
	[PageId] [int] NULL,
	[SiteRebateBalance] [money] NULL,
 CONSTRAINT [PK_ZL_User] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'UserName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员密码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'UserPwd'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员组' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'GroupID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Email' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Email'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员提示问题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Question'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员提示问题答案' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Answer'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'RegTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登录次数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'LoginTimes'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最近登录时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'LastLoginTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后登录IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'LastLoginIP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上次修改密码的时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'LastPwdChangeTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上次被锁定的时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'LastLockTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户状态。0－－正常，1－－锁定，2－－未通过邮件验证，4－－未通过管理员认证' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Status'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'验证码。用于邮件验证' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'CheckNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'UserExp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卖家积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'boffExp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'消费积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'ConsumeExp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'钱包' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Purse'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'有效期截止时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'DeadLine'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'点券' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'UserPoint'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加入会员组时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'JoinTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'抢车位虚拟币' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'DummyPurse'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'权限。当该字段为空，使用GroupID的用户组ID。' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Permissions'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'SiteID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'Remark'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'证书认证状态(-----[未认证] -----[证书审核中]-----[认证通过])' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'State'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'证书地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'CerificateLogo'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'认证类型(国际认证，三包认证.)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'ApproveType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商铺认证有效期截止时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'CerificateDeadLine'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'黄页ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_User', @level2type=N'COLUMN',@level2name=N'PageId'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'返利余额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_User', @level2type=N'COLUMN', @level2name=N'RebatesBalance'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分站返利金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_User', @level2type=N'COLUMN',@level2name=N'SiteRebateBalance'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_URLRewriter]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Examinee]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Examinee](
	[EID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[CompanyID] [int] NOT NULL,
	[SendTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Examinee_SendTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Examinee] PRIMARY KEY CLUSTERED 
(
	[EID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'应试通知ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Examinee', @level2type=N'COLUMN', @level2name=N'EID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通知接收人ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Examinee', @level2type=N'COLUMN', @level2name=N'UserID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_Select_ByValue]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_RoomNotify_Select_ByValue] 
@SelectCondition nvarchar(500),
@WhereCondition nvarchar(500),
@OrderByExpression nvarchar(250)
 AS 
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
 DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	''+ @SelectCondition +''
FROM
	[dbo].[ZL_RoomNotify]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Duser]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserAlipayTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserAlipayTable](
	[UserID] [int] NOT NULL,
	[Alipayname] [varchar](100) NULL,
	[AlipayParID] [varchar](100) NULL,
	[AlipaySafe] [varchar](100) NULL,
 CONSTRAINT [PK_ZL_UserAlipayTable] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Favorite]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Favorite](
	[FavoriteID] [int] IDENTITY(1,1) NOT NULL,
	[Owner] [int] NOT NULL,
	[InfoID] [int] NOT NULL,
	[FavoriteDate] [datetime] NOT NULL CONSTRAINT [DF_ZL_Favorite_FavoriteDate]  DEFAULT (getdate())
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Favorite', @level2type=N'COLUMN', @level2name=N'FavoriteID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏人ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Favorite', @level2type=N'COLUMN', @level2name=N'Owner'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被收藏内容的ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Favorite', @level2type=N'COLUMN', @level2name=N'InfoID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Favorite', @level2type=N'COLUMN', @level2name=N'FavoriteDate'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[NotifyTitle],
	[NotifyContext],
	[AddTime],
	[RoomID],
	[UserID]
FROM
	[dbo].[ZL_RoomNotify]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_ClassRoom]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserBase]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserBase](
	[UserID] [int] NOT NULL,
	[TrueName] [nvarchar](50) NULL,
	[BirthDay] [nvarchar](20) NULL,
	[shengxiao] [nvarchar](50) NULL,
	[xingzuo] [nvarchar](50) NULL,
	[Address] [nvarchar](255) NULL,
	[OfficePhone] [nvarchar](50) NULL,
	[HomePhone] [nvarchar](50) NULL,
	[Fax] [nvarchar](50) NULL,
	[ZipCode] [nvarchar](10) NULL,
	[PHS] [nvarchar](50) NULL,
	[Mobile] [nvarchar](50) NULL,
	[UserSex] [bit] NULL CONSTRAINT [DF_ZL_UserBase_UserSex]  DEFAULT (1),
	[QQ] [nvarchar](50) NULL,
	[MSN] [nvarchar](255) NULL,
	[ICQ] [nvarchar](50) NULL,
	[UC] [nvarchar](50) NULL,
	[Yahoo] [nvarchar](50) NULL,
	[IDCard] [nvarchar](50) NULL,
	[HomePage] [nvarchar](255) NULL,
	[UserFace] [nvarchar](255) NULL,
	[FaceWidth] [int] NULL CONSTRAINT [DF_ZL_UserBase_FaceWidth]  DEFAULT (16),
	[FaceHeight] [int] NULL CONSTRAINT [DF_ZL_UserBase_FaceHeight]  DEFAULT (16),
	[Sign] [nvarchar](1000) NULL,
	[Country] [nvarchar](50) NULL,
	[Province] [nvarchar](50) NULL,
	[County] [nvarchar](50) NULL,
	[Privacy] [int] NULL CONSTRAINT [DF_ZL_UserBase_Privating]  DEFAULT (0),
	[cardType] [nvarchar] (255) NULL ,
	[honeyName] [nvarchar] (255)NULL,
	[workProvince] [nvarchar](50) NULL,
	[workCity] [nvarchar](50) NULL, 
	[SFStatus] [int] NULL,
	[VIPUser][int] NULL CONSTRAINT [DF_ZL_UserBase_VIPUser]  DEFAULT (0),
 CONSTRAINT [PK_ZL_UserBase] PRIMARY KEY CLUSTERED 
(
	[UserID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'真实姓名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'TrueName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'生日' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'BirthDay'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Address'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'办公电话' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'OfficePhone'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'家庭电话' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'HomePhone'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'传真号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Fax'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮编' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'ZipCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'小灵通' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'PHS'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Mobile'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'性别' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'UserSex'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'QQ号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'QQ'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MSN号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'MSN'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ICQ号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'ICQ'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'UC号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'UC'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'雅虎通账号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Yahoo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'IDCard'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'个人主页' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'HomePage'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'头像地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'UserFace'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'头像宽度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'FaceWidth'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'头像高度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'FaceHeight'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'签名档' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Sign'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'国家' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Country'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'省' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Province'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'县市' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'County'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'隐私设定' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'Privacy'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'证件类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'cardType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'昵称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'honeyName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'VIP会员' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBase', @level2type=N'COLUMN', @level2name=N'VIPUser'

GO



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Flow]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Flow](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[flowName] [varchar](50) NOT NULL,
	[flowDepict] [varchar](50) NOT NULL,
 CONSTRAINT [PK_ZL_Flow] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键编号自动增长列' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Flow', @level2type=N'COLUMN', @level2name=N'id'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流程名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Flow', @level2type=N'COLUMN', @level2name=N'flowName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流程描述' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Flow', @level2type=N'COLUMN', @level2name=N'flowDepict'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_RoomUpFile]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserBaseField]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserBaseField](
	[FieldID] [int] IDENTITY(1,1) NOT NULL,
	[FieldName] [nvarchar](50) NOT NULL,
	[FieldAlias] [nvarchar](50) NOT NULL,
	[FieldTips] [nvarchar](50) NULL,
	[Description] [nvarchar](255) NULL,
	[IsNotNull] [bit] NULL CONSTRAINT [DF_ZL_UserBaseField_IsNotNull]  DEFAULT (0),
	[FieldType] [nvarchar](50) NOT NULL,
	[Content] [ntext] NULL,
	[OrderId] [int] NULL CONSTRAINT [DF_ZL_UserBaseField_OrderId]  DEFAULT (1),
	[ShowList] [bit] NULL,
	[ShowWidth] [int] NULL CONSTRAINT [DF_ZL_UserBaseField_ShowWidth]  DEFAULT (0),
	[NoEdit] [int] NULL CONSTRAINT [DF_ZL_UserBaseField_NoEdit]  DEFAULT (0),
 CONSTRAINT [PK_ZL_UserBaseField] PRIMARY KEY NONCLUSTERED 
(
	[FieldID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'FieldName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段别名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'FieldAlias'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段说明' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'FieldTips'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段描述' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段允许空，1：允许，2：不允许' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'IsNotNull'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'FieldType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'Content'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'OrderId'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'列表显示。1：显示，2不显示' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'ShowList'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'显示列宽度' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'ShowWidth'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许编辑' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserBaseField', @level2type=N'COLUMN', @level2name=N'NoEdit'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Grade]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Grade](
	[GradeID] [int] IDENTITY(1,1) NOT NULL,
	[Cate] [int] NOT NULL,
	[ParentID] [int] NOT NULL CONSTRAINT [DF_ZL_Grade_ParentID]  DEFAULT (0),
	[GradeName] [nvarchar](50) NOT NULL,
	[Grade] [int] NOT NULL CONSTRAINT [DF_ZL_Grade_Grade]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Grade] PRIMARY KEY CLUSTERED 
(
	[GradeID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Grade', @level2type=N'COLUMN', @level2name=N'GradeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Grade', @level2type=N'COLUMN', @level2name=N'Cate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'父选项ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Grade', @level2type=N'COLUMN', @level2name=N'ParentID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分级选项名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Grade', @level2type=N'COLUMN', @level2name=N'GradeName'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserCart]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserCart](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Cartid] [varchar](255) NULL,
	[userid] [int] NULL,
	[Username] [varchar](255) NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_UserCart_Addtime]  DEFAULT (getdate()),
	[Pronum] [int] NULL,
	[AllMoney] [money] NULL,
	[Getip] [varchar](50) NULL,
	[Colonel] [int] NULL CONSTRAINT [DF_ZL_UserCart_Colonel]  DEFAULT (0),
	[ColonelNum] [int] NULL CONSTRAINT [DF_ZL_UserCart_ColonelNum]  DEFAULT (0),
	[ColonelMoney] [money] NULL CONSTRAINT [DF_ZL_UserCart_ColonelMoney]  DEFAULT (0),
	[ColonelNowNum] [int] NULL,
	[ColonelTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_UserCart] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-团购 2-竟拍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserCart', @level2type=N'COLUMN', @level2name=N'Colonel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购人数 竟拍人数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserCart', @level2type=N'COLUMN', @level2name=N'ColonelNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购价格 竟拍起始价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserCart', @level2type=N'COLUMN', @level2name=N'ColonelMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'当前团购人数 当前竟拍人数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserCart', @level2type=N'COLUMN', @level2name=N'ColonelNowNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'终止时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserCart', @level2type=N'COLUMN', @level2name=N'ColonelTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_GradeCate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_GradeCate](
	[CateID] [int] IDENTITY(1,1) NOT NULL,
	[CateName] [nvarchar](50) NOT NULL,
	[Remark] [nvarchar](255) NULL CONSTRAINT [DF_ZL_GradeCate_Remark]  DEFAULT (''),
	[GradeField] [nvarchar](500) NOT NULL,
 CONSTRAINT [PK_ZL_GradeCate] PRIMARY KEY CLUSTERED 
(
	[CateID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserCartPro]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserCartPro](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Orderlistid] [int] NULL CONSTRAINT [DF_ZL_UserCartPro_Orderlistid]  DEFAULT (0),
	[CartID] [int] NULL,
	[ProID] [int] NULL,
	[Pronum] [int] NULL,
	[Username] [varchar](255) NULL,
	[Proname] [varchar](255) NULL,
	[Danwei] [varchar](50) NULL,
	[Shijia] [money] NULL,
	[AllMoney] [money] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_UserCartPro_Addtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_UserCartPro] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Group]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Group](
	[GroupID] [int] IDENTITY(1,1) NOT NULL,
	[GroupName] [nvarchar](50) NOT NULL,
	[OtherName] [nvarchar](255) NULL,
	[Description] [nvarchar](255) NULL,
	[RegSelect] [bit] NULL CONSTRAINT [DF_ZL_UserGroup_RegSelect]  DEFAULT (0),
	[IsDefault] [bit] NULL CONSTRAINT [DF__ZL_Group__IsDefa__3ACC9741]  DEFAULT (0),
	[CCountPerDay] [int] NULL CONSTRAINT [DF__ZL_Group__CCount__3BC0BB7A]  DEFAULT (0),
	[FavCount] [int] NULL CONSTRAINT [DF__ZL_Group__FavCou__3CB4DFB3]  DEFAULT (0),
	[ConsumeType] [int] NULL CONSTRAINT [DF__ZL_Group__Consum__3DA903EC]  DEFAULT (0),
	[UpGradeMoney] [money]NULL,
	[CompanyGroup] [int] NULL CONSTRAINT [DF__ZL_Group__CompanyGroup]  DEFAULT (0),
	[VIPNum] [int] NULL CONSTRAINT [DF__ZL_Group__VIPNum]  DEFAULT (0), 
	[VIPGroup] [int] NULL CONSTRAINT [DF__ZL_Group__VIPGroup]  DEFAULT (0),
	[RebateRate] [float] NULL,
 CONSTRAINT [PK_ZL_UserGroup] PRIMARY KEY CLUSTERED 
(
	[GroupID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'GroupID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'GroupName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'别名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'OtherName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户注册时是否可选' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'RegSelect'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否默认会员组' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'IsDefault'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'升级所需费用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'UpGradeMoney'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为企业用组：0-否 1-是' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'CompanyGroup'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'VIP级数：0-否 1-是' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'VIPNum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为VIP用组：0-否 1-是' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'VIPGroup'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'每天可发布内容数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'CCountPerDay'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏夹设置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'FavCount'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ConsumeType' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Group', @level2type=N'COLUMN', @level2name=N'ConsumeType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'返利比率' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Group', @level2type=N'COLUMN',@level2name=N'RebateRate'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserExpDomP]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserExpDomP](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL CONSTRAINT [DF_ZL_UserExpDomP_UserID]  DEFAULT (null),
	[Score] [money] NOT NULL CONSTRAINT [DF_ZL_UserExpDomP_Score]  DEFAULT (0),
	[HisTime] [datetime] NULL CONSTRAINT [DF_ZL_UserExpDomP_HisTime]  DEFAULT (getdate()),
	[Operator] [int] NULL,
	[Detail] [nvarchar](1000) NULL,
	[OperatorIP] [nvarchar](50) NULL,
 CONSTRAINT [PK_ZL_UserExpDomP] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserExpDomP', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'金额变化数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserExpDomP', @level2type=N'COLUMN', @level2name=N'Score'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'变更时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserExpDomP', @level2type=N'COLUMN', @level2name=N'HisTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作人ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserExpDomP', @level2type=N'COLUMN', @level2name=N'Operator'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'详细备注' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserExpDomP', @level2type=N'COLUMN', @level2name=N'Detail'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserExpDomP', @level2type=N'COLUMN', @level2name=N'OperatorIP'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_GroupFieldPermissions]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_GroupFieldPermissions](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[GroupID] [int] NOT NULL,
	[OperateCode] [int] NOT NULL CONSTRAINT [DF_ZL_GroupFieldPermissions_OperateCode]  DEFAULT (0),
	[ProjectID] [int] NOT NULL,
	[FieldID] [int] NOT NULL,
	[FieldName] [nvarchar](255) NOT NULL,
	[IdType] [int] NOT NULL,
 CONSTRAINT [PK_ZL_GroupFieldPermissions] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员组ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GroupFieldPermissions', @level2type=N'COLUMN', @level2name=N'GroupID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'权限操作码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GroupFieldPermissions', @level2type=N'COLUMN', @level2name=N'OperateCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GroupFieldPermissions', @level2type=N'COLUMN', @level2name=N'ProjectID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GroupFieldPermissions', @level2type=N'COLUMN', @level2name=N'FieldID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目字段名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GroupFieldPermissions', @level2type=N'COLUMN', @level2name=N'FieldName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID类型 0 用户 1 用户组' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GroupFieldPermissions', @level2type=N'COLUMN', @level2name=N'IdType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserExpHis]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserExpHis](
	[ExpHisID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[score] [int] NOT NULL CONSTRAINT [DF_ZL_UserExpHis_score]  DEFAULT (0),
	[HisTime] [datetime] NULL CONSTRAINT [DF_ZL_UserExpHis_HisTime]  DEFAULT (getdate()),
	[Operator] [int] NULL,
	[Detail] [nvarchar](1000) NULL,
	[OperatorIP] [nvarchar](50) NULL,
 CONSTRAINT [PK_ZL_UserExpHis] PRIMARY KEY CLUSTERED 
(
	[ExpHisID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_UserFave]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_UserFave](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Userid] [int] NULL,
	[UserLookId] [int] NULL,
	[DataTime] [datetime] NULL
) ON [PRIMARY]
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_GroupModel]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_GroupModel](
	[GroupID] [int] NOT NULL,
	[UserModel] [int] NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserFriendGroup]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserFriendGroup](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[GroupName] [varchar](50) NULL,
	[BlackGroup] [int] NULL,
	[OrderID] [int] NULL,
 CONSTRAINT [PK_ZL_UserFriendGroup] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendGroup', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendGroup', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分组名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendGroup', @level2type=N'COLUMN', @level2name=N'GroupName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否是黑名单(1为黑名单)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendGroup', @level2type=N'COLUMN', @level2name=N'BlackGroup'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendGroup', @level2type=N'COLUMN', @level2name=N'OrderID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Guestbook]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Guestbook](
	[Gid] [int] IDENTITY(1,1) NOT NULL,
	[Parentid] [int] NOT NULL CONSTRAINT [DF_ZL_GUESTBOOK_PARENTID]  DEFAULT (0),
	[Cateid] [int] NOT NULL,
	[Userid] [int] NOT NULL,
	[Title] [varchar](200) NULL,
	[Tcontent] [text] NOT NULL,
	[Gdate] [datetime] NULL CONSTRAINT [DF_ZL_GUESTBOOK_GDATE]  DEFAULT (getdate()),
	[IP][nvarchar](50)Null,
 CONSTRAINT [PK_ZL_GUESTBOOK] PRIMARY KEY CLUSTERED 
(
	[Gid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserFriendTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserFriendTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[FriendID] [int] NULL,
	[GroupID] [int] NULL,
	[Addtime] [datetime] NULL,
	[FriendState] [int] NULL,
 CONSTRAINT [PK_ZL_UserFriendTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendTable', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendTable', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'好友ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendTable', @level2type=N'COLUMN', @level2name=N'FriendID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分组ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendTable', @level2type=N'COLUMN', @level2name=N'GroupID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendTable', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'好友状态(0为关注 1为互为好友)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserFriendTable', @level2type=N'COLUMN', @level2name=N'FriendState'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_URLRewriter]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Guestcate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Guestcate](
	[Cateid] [int] IDENTITY(1,1) NOT NULL,
	[Catename] [varchar](50) NOT NULL,
	[Permibit] [varchar](100) NULL CONSTRAINT [DF_ZL_GUESTCATE_PERMIBIT]  DEFAULT (''),
	[NeedLog][int] Null,
 CONSTRAINT [PK_ZL_GUESTCATE] PRIMARY KEY CLUSTERED 
(
	[Cateid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_RoomUpFile]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[RoomID],
	[RoomName],
	[SchoolID],
	[ClassName],
	[Room],
	[Teacher],
	[Adviser],
	[Monitor],
	[Creation],
	[CreateUser],
	[Integral],
	[Classinfo],
	[Grade],
	[IsTrue]
FROM
	[dbo].[ZL_ClassRoom]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserOrderinfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserOrderinfo](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[OrderNo] [varchar](50) NULL,
	[Reuser] [varchar](255) NULL,
	[Receiver] [varchar](50) NULL,
	[Rename] [varchar](255) NULL,
	[Guojia] [varchar](255) NULL,
	[Shengfen] [varchar](255) NULL,
	[Chengshi] [varchar](255) NULL,
	[Diqu] [varchar](255) NULL,
	[Jiedao] [varchar](255) NULL,
	[ZipCode] [varchar](50) NULL,
	[Phone] [varchar](50) NULL,
	[Email] [varchar](50) NULL,
	[Mobile] [int] NULL,
	[Delivery] [int] NULL,
	[Outstock] [int] NULL,
	[Deliverytime] [int] NULL,
	[Payment] [int] NULL,
	[Invoice] [text] NULL,
	[Ordermessage] [text] NULL,
	[Merchandiser] [varchar](50) NULL,
	[Internalrecords] [text] NULL,
	[Ordersamount] [money] NULL,
	[Receivablesamount] [money] NULL,
	[Specifiedprice] [money] NULL,
	[Freight] [money] NULL,
	[Invoiceneeds] [int] NULL,
	[Developedvotes] [int] NULL,
	[OrderStatus] [int] NULL,
	[Paymentstatus] [int] NULL,
	[StateLogistics] [int] NULL,
	[Signed] [int] NULL CONSTRAINT [DF_ZL_UserOrderinfo_Signed]  DEFAULT (0),
	[Settle] [int] NULL CONSTRAINT [DF_ZL_UserOrderinfo_Settle]  DEFAULT (0),
	[Aside] [int] NULL CONSTRAINT [DF_ZL_UserOrderinfo_aside]  DEFAULT (0),
	[Suspended] [int] NULL CONSTRAINT [DF_ZL_UserOrderinfo_Suspended]  DEFAULT (0),
	[Ordertype] [int] NULL CONSTRAINT [DF_ZL_UserOrderinfo_UserOrdertype]  DEFAULT (0),
	[AddTime] [datetime] NULL CONSTRAINT [DF_ZL_UserOrderinfo_AddTime]  DEFAULT (getdate()),
	[AddUser] [varchar](255) NULL,
	[Userid] [int] NULL,
	[Colonel] [int] NULL,
	[ColonelNum] [int] NULL,
	[ColonelMoney] [money] NULL,
	[ColonelNowNum] [int] NULL,
	[ColonelTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_UserOrderinfo] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-团购 2-竟拍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserOrderinfo', @level2type=N'COLUMN', @level2name=N'Colonel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购人数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserOrderinfo', @level2type=N'COLUMN', @level2name=N'ColonelNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购价格 竟拍起始价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserOrderinfo', @level2type=N'COLUMN', @level2name=N'ColonelMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'当前团购人数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserOrderinfo', @level2type=N'COLUMN', @level2name=N'ColonelNowNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'终止时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserOrderinfo', @level2type=N'COLUMN', @level2name=N'ColonelTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Interlocution]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Interlocution](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[ProblemTitle] [nvarchar](1000) NULL,
	[ProblemContext] [varchar](2000) NULL,
	[AddTime] [datetime] NULL,
	[RoomID] [int] NULL,
 CONSTRAINT [PK_ZL_Interlocution] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Interlocution', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'问题标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Interlocution', @level2type=N'COLUMN', @level2name=N'ProblemTitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'问题内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Interlocution', @level2type=N'COLUMN', @level2name=N'ProblemContext'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提问时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Interlocution', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Interlocution', @level2type=N'COLUMN', @level2name=N'RoomID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SchemeInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserShop]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserShop](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[Class] [int] NULL CONSTRAINT [DF_ZL_UserShop_Class]  DEFAULT (0),
	[Nodeid] [int] NULL CONSTRAINT [DF_ZL_UserShop_Nodeid]  DEFAULT (0),
	[ModelID] [int] NULL,
	[Categoryid] [int] NULL CONSTRAINT [DF_ZL_UserShop_Categoryid]  DEFAULT (0),
	[ProCode] [varchar](50) NULL,
	[BarCode] [varchar](50) NULL,
	[Proname] [varchar](255) NULL,
	[Kayword] [varchar](255) NULL,
	[ProUnit] [varchar](50) NULL,
	[Weight] [int] NULL CONSTRAINT [DF_ZL_UserShop_Weight]  DEFAULT (0),
	[ServerPeriod] [int] NULL CONSTRAINT [DF_ZL_UserShop_ServerPeriod]  DEFAULT (0),
	[ServerType] [int] NULL CONSTRAINT [DF_ZL_UserShop_ServerType]  DEFAULT (0),
	[ProClass] [int] NULL CONSTRAINT [DF_ZL_UserShop_ProClass]  DEFAULT (0),
	[Properties] [int] NULL CONSTRAINT [DF_ZL_UserShop_Properties]  DEFAULT (0),
	[Sales] [int] NULL CONSTRAINT [DF_ZL_UserShop_Sales]  DEFAULT (0),
	[Proinfo] [text] NULL,
	[Procontent] [text] NULL,
	[Clearimg] [varchar](255) NULL,
	[Thumbnails] [varchar](255) NULL,
	[Producer] [varchar](255) NULL,
	[Brand] [varchar](50) NULL,
	[Allowed] [int] NULL CONSTRAINT [DF_ZL_UserShop_Allowed]  DEFAULT (0),
	[Quota] [int] NULL CONSTRAINT [DF_ZL_UserShop_Quota]  DEFAULT (0),
	[DownQuota] [int] NULL CONSTRAINT [DF_ZL_UserShop_DownQuota]  DEFAULT (0),
	[Stock] [int] NULL CONSTRAINT [DF_ZL_UserShop_Stock]  DEFAULT (0),
	[StockDown] [int] NULL CONSTRAINT [DF_ZL_UserShop_StockDown]  DEFAULT (0),
	[JisuanFs] [int] NULL CONSTRAINT [DF_ZL_UserShop_JisuanFs]  DEFAULT (0),
	[Rate] [money] NULL CONSTRAINT [DF_ZL_UserShop_Rate]  DEFAULT (0),
	[Rateset] [int] NULL,
	[Dengji] [int] NULL CONSTRAINT [DF_ZL_UserShop_Dengji]  DEFAULT (0),
	[ShiPrice] [money] NULL CONSTRAINT [DF_ZL_UserShop_ShiPrice]  DEFAULT (0),
	[LinPrice] [money] NULL CONSTRAINT [DF_ZL_UserShop_LinPrice]  DEFAULT (0),
	[MemberPrice] [varchar](255) NULL CONSTRAINT [DF_ZL_UserShop_MemberPrice]  DEFAULT (0 | 0),
	[ActPrice] [varchar](255) NULL CONSTRAINT [DF_ZL_UserShop_ActPrice]  DEFAULT (0 | 0),
	[Wholesales] [int] NULL CONSTRAINT [DF_ZL_UserShop_Wholesales]  DEFAULT (0),
	[Wholesaleone] [int] NULL CONSTRAINT [DF_ZL_UserShop_Wholesaleone]  DEFAULT (0),
	[Wholesalesinfo] [varchar](255) NULL CONSTRAINT [DF_ZL_UserShop_Wholesalesinfo]  DEFAULT ('0|0,0|0,0|0'),
	[Preset] [varchar](255) NULL CONSTRAINT [DF_ZL_UserShop_Preset]  DEFAULT ('0|0|0|{}'),
	[Integral] [int] NULL CONSTRAINT [DF_ZL_UserShop_Integral]  DEFAULT (0),
	[Propeid] [int] NULL CONSTRAINT [DF_ZL_UserShop_Propeid]  DEFAULT (0),
	[Recommend] [int] NULL CONSTRAINT [DF_ZL_UserShop_Recommend]  DEFAULT (0),
	[Priority] [int] NULL CONSTRAINT [DF_ZL_UserShop_Priority]  DEFAULT (0),
	[MonthClickNum] [int] NULL CONSTRAINT [DF_ZL_UserShop_MonthClickNum]  DEFAULT (0),
	[UpdateTime] [datetime] NULL CONSTRAINT [DF_ZL_UserShop_UpdateTime]  DEFAULT (getdate()),
	[ModeTemplate] [varchar](255) NULL,
	[AddUser] [varchar](50) NULL,
	[DownCar] [int] NULL CONSTRAINT [DF_ZL_UserShop_DownCar]  DEFAULT (0),
	[AddTime] [datetime] NULL CONSTRAINT [DF_ZL_UserShop_AddTime]  DEFAULT (getdate()),
	[TableName] [varchar](50) NULL,
	[Istrue] [int] NULL CONSTRAINT [DF_ZL_UserShop_Istrue]  DEFAULT (0),
	[Isgood] [int] NULL CONSTRAINT [DF_ZL_UserShop_Isgood]  DEFAULT (0),
	[MakeHtml] [int] NULL CONSTRAINT [DF_ZL_UserShop_MakeHtml]  DEFAULT (0),
	[Sold] [int] NULL CONSTRAINT [DF_ZL_UserShop_Sold]  DEFAULT (0),
	[isnew] [int] NULL CONSTRAINT [DF_ZL_UserShop_isnew]  DEFAULT (0),
	[ishot] [int] NULL CONSTRAINT [DF_ZL_UserShop_ishot]  DEFAULT (0),
	[isbest] [int] NULL CONSTRAINT [DF_ZL_UserShop_isbest]  DEFAULT (0),
	[ItemID] [int] NULL,
	[ComModelID] [int] NULL,
	[AllClickNum] [int] NULL CONSTRAINT [DF_ZL_UserShop_AllClickNum]  DEFAULT (0),
	[Colonel] [int] NULL CONSTRAINT [DF_ZL_UserShop_Colonel]  DEFAULT (0),
	[ColonelNum] [int] NULL CONSTRAINT [DF_ZL_UserShop_ColonelNum]  DEFAULT (0),
	[ColonelMoney] [money] NULL CONSTRAINT [DF_ZL_UserShop_ColonelMoney]  DEFAULT (0),
	[ColonelNowNum] [int] NULL,
	[ColoneState] [int] NULL,
	[ColonelTime] [datetime] NULL,
	[CautionMoney] [money] NULL,
	[DeliverMoney] [ntext] NULL,
	[OnCalonelTime] [int] NULL CONSTRAINT [DF_ZL_UserShop_OnCalonelTime]  DEFAULT (0),
	[OnCalonelUser] [int] NULL CONSTRAINT [DF_ZL_UserShop_OnCalonelUser]  DEFAULT (0),
	[OnCalonelMoney] [int] NULL CONSTRAINT [DF_ZL_UserShop_OnCalonelMoney]  DEFAULT (0),
	[Isreach] [int] NULL CONSTRAINT [DF_ZL_UserShop_Isreach]  DEFAULT (0),
	[Ismarked] [int] NULL CONSTRAINT [DF_ZL_UserShop_Ismarked]  DEFAULT (0),
	[Isprefer] [int] NULL CONSTRAINT [DF_ZL_UserShop_Isprefer]  DEFAULT (0),
	[UserClass] [int] NULL,
 CONSTRAINT [PK_ZL_UserShop] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-团购 2-竟拍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'Colonel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'ColonelNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购价格 竟拍起始价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'ColonelMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'当前团购数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'ColonelNowNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'团购竞拍状态 1：开始，2：团购成立，3：结束' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'ColoneState'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'终止时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'ColonelTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设置竞拍，团购的保证金' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'CautionMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'送货价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'DeliverMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'达到发起时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'OnCalonelTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'达到参与人数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'OnCalonelUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'达到竞价价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'OnCalonelMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'二手闲置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'Isreach'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'一口价' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'Ismarked'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'优惠' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'Isprefer'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserShop', @level2type=N'COLUMN', @level2name=N'UserClass'

GO



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_JSTemplate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_JSTemplate](
	[JSTemplateID] [int] NOT NULL,
	[JSTemplateName] [varchar](50) NOT NULL,
	[JSTemplatePath] [varchar](100) NOT NULL,
	[JSTemplateSize] [varchar](50) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserStock]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserStock](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[stocktype] [int] NULL CONSTRAINT [DF_ZL_UserStock_stocktype]  DEFAULT (0),
	[danju] [varchar](50) NULL,
	[proname] [varchar](50) NULL,
	[addtime] [datetime] NULL CONSTRAINT [DF_ZL_UserStock_addtime]  DEFAULT (getdate()),
	[adduser] [varchar](50) NULL,
	[content] [ntext] NULL,
	[proid] [int] NULL,
	[pronum] [int] NULL CONSTRAINT [DF_ZL_UserStock_pronum]  DEFAULT (0),
 CONSTRAINT [PK_ZL_UserStock] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Keywords]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Keywords](
	[KeywordID] [int] IDENTITY(1,1) NOT NULL,
	[KeywordText] [nvarchar](200) NOT NULL,
	[KeywordType] [int] NOT NULL,
	[Priority] [int] NOT NULL CONSTRAINT [DF_ZL_Keywords_Priority]  DEFAULT (0),
	[Hits] [int] NOT NULL CONSTRAINT [DF_ZL_Keywords_Hits]  DEFAULT (0),
	[LastUseTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Keywords_LastUseTime]  DEFAULT (getdate()),
	[ArrGeneralID] [ntext] NULL,
	[QuoteTimes] [int] NULL,
 CONSTRAINT [PK_ZL_Keywords] PRIMARY KEY CLUSTERED 
(
	[KeywordID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_CollectionInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserStoreTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserStoreTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[StoreName] [varchar](100) NULL,
	[StoreContent] [ntext] NULL,
	[StoreCredit] [int] NULL,
	[StoreVip] [int] NULL,
	[StoreType] [varchar](100) NULL,
	[StoreCash] [decimal](8, 2) NULL,
	[StoreState] [int] NULL,
	[AddTime] [datetime] NULL,
	[StoreProvince] [varchar](100) NULL,
	[StoreCity] [varchar](100) NULL,
 CONSTRAINT [PK_ZL_UserStoreTable] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Label]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Label](
	[LabelID] [int] IDENTITY(1,1) NOT NULL,
	[LabelName] [nvarchar](50) NOT NULL,
	[LabelType] [int] NOT NULL CONSTRAINT [DF_ZL_Label_LabelType]  DEFAULT (1),
	[LabelCate] [nvarchar](50) NULL,
	[LabelDesc] [nvarchar](255) NULL,
	[LabelParam] [ntext] NULL,
	[LabelTable] [ntext] NULL,
	[LabelField] [ntext] NULL,
	[LabelWhere] [ntext] NULL,
	[LabelOrder] [ntext] NULL,
	[LabelContent] [ntext] NULL,
	[LabelCount] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Label_LabelCount]  DEFAULT (0),
	[LabelIdentity] [nvarchar](255) NULL CONSTRAINT [DF_ZL_Label_LabelIdentity]  DEFAULT (''),
	[LabelAddUser] [int] NULL,
	[LabelNodeID] [int] NULL,
 CONSTRAINT [PK_ZL_Label] PRIMARY KEY CLUSTERED 
(
	[LabelID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1=静态标签2=动态标签3=分页列表' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Label', @level2type=N'COLUMN', @level2name=N'LabelType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加标签用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Label', @level2type=N'COLUMN', @level2name=N'LabelAddUser'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_UserStoreTypeTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_UserStoreTypeTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[TypeName] [varchar](100) NULL,
 CONSTRAINT [PK_ZL_UserStoreTypeTable] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_LabelJude]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_LabelJude](
	[JudeID] [int] IDENTITY(1,1) NOT NULL,
	[Modeltypeinfo] [nvarchar](255) NULL,
	[addroot] [nvarchar](255) NULL,
	[setroot] [nvarchar](255) NULL,
	[Modelvalue] [nvarchar](255) NULL,
	[Valueroot] [nvarchar](1000) NULL,
	[LabelID] [int] NULL,
	[IsOpen] [int] NULL CONSTRAINT [DF_ZL_LabelJude_IsOpen]  DEFAULT (0),
	[FalseContent] [ntext] NULL,
 CONSTRAINT [PK_LabelJude] PRIMARY KEY CLUSTERED 
(
	[JudeID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'判断模式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'Modeltypeinfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计算方式(循环、累加)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'addroot'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'判断逻辑' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'setroot'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'判断值' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'Modelvalue'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参数标签' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'Valueroot'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'绑定标签ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'LabelID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否开启(1-开启 0-关闭)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'IsOpen'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'不满足条件的内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LabelJude', @level2type=N'COLUMN', @level2name=N'FalseContent'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_GetByUser]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_PageTemplate_GetByUser]
	@TemplateID nvarchar(255),
	@Inputstr nvarchar(255)
as
 DECLARE @sqlstr VARCHAR(200)

set @sqlstr=''select * from ZL_PageTemplate where   ''+@Inputstr+''=''+@TemplateID+'' and ParentID=0 order by orderid desc''
exec (@sqlstr)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ValidityPeriod]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ValidityPeriod](
	[PID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[DeadLineDay] [int] NOT NULL,
	[PDetail] [nvarchar](1000) NULL,
	[OperDate] [datetime] NOT NULL CONSTRAINT [DF_ZL_ValidityPeriod_OperDate]  DEFAULT (getdate()),
	[Operator] [int] NOT NULL,
	[OperatorIP] [nvarchar](50) NULL,
 CONSTRAINT [PK_ZL_ValidityPeriod] PRIMARY KEY CLUSTERED 
(
	[PID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'有效期事务ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ValidityPeriod', @level2type=N'COLUMN', @level2name=N'PID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ValidityPeriod', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事由' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ValidityPeriod', @level2type=N'COLUMN', @level2name=N'PDetail'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作日期' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ValidityPeriod', @level2type=N'COLUMN', @level2name=N'OperDate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ValidityPeriod', @level2type=N'COLUMN', @level2name=N'Operator'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Log]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Log](
	[LogID] [int] IDENTITY(1,1) NOT NULL,
	[Category] [int] NULL,
	[Priority] [int] NULL CONSTRAINT [DF_ZL_Log_Priority]  DEFAULT (0),
	[Title] [nvarchar](255) NULL,
	[Message] [ntext] NULL,
	[Timestamp] [datetime] NULL,
	[UserName] [nvarchar](255) NULL,
	[UserIP] [nvarchar](40) NULL,
	[Source] [ntext] NULL,
	[ScriptName] [ntext] NULL,
	[PostString] [ntext] NULL,
	[NodeID][int]NULL,
 CONSTRAINT [PK_ZL_Log] PRIMARY KEY CLUSTERED 
(
	[LogID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'Category'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'优先级别' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'Priority'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'Message'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录日期' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'Timestamp'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'UserName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'UserIP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'StackTrace，TargetSite：异常源，堆栈跟踪，等异常信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'Source'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'页面' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'ScriptName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提交信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Log', @level2type=N'COLUMN', @level2name=N'PostString'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_GetByinput]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_PageTemplate_GetByinput]
	@TemplateID nvarchar(255),
	@Inputstr nvarchar(500)
as
 DECLARE @sqlstr VARCHAR(1000)

set @sqlstr=''select * from ZL_PageTemplate where ''+@Inputstr+''=''+@TemplateID+''  order by orderid desc''
exec (@sqlstr)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_WapArticle]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_WapArticle](
	[A_ID] [int] IDENTITY(1,1) NOT NULL,
	[Nodeid] [int] NULL,
	[title] [nvarchar](500) NULL,
	[author] [nvarchar](255) NULL,
	[soucer] [nvarchar](255) NULL,
	[KewWord] [nvarchar](2000) NULL,
	[limit] [int] NULL,
	[Points] [int] NULL,
	[GOTOP] [int] NULL,
	[addTime] [datetime] NULL CONSTRAINT [DF_ZL_WapArticle_addTime]  DEFAULT (getdate()),
	[rate] [int] NULL,
	[content] [ntext] NULL,
	[itemid] [int] NULL,
	[pic] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_WapArticle] PRIMARY KEY CLUSTERED 
(
	[A_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapArticle', @level2type=N'COLUMN', @level2name=N'Nodeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1普通，2会员，3VIP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapArticle', @level2type=N'COLUMN', @level2name=N'limit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'查看一次积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapArticle', @level2type=N'COLUMN', @level2name=N'Points'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'置顶' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapArticle', @level2type=N'COLUMN', @level2name=N'GOTOP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapArticle', @level2type=N'COLUMN', @level2name=N'addTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'等级1普通，2推荐，3精品' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapArticle', @level2type=N'COLUMN', @level2name=N'rate'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MTit]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MTit](
	[I_id] [int] IDENTITY(1,1) NOT NULL,
	[Iinfo] [nvarchar](500) NULL,
	[Iurl] [nvarchar](500) NULL,
	[Itype] [int] NULL CONSTRAINT [DF_ZL_MTit_Itype]  DEFAULT (0),
	[Stype] [int] NULL,
	[orderid] [int] NULL CONSTRAINT [DF_ZL_MTit_orderid]  DEFAULT (0),
 CONSTRAINT [PK_ZL_MTit] PRIMARY KEY CLUSTERED 
(
	[I_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'插件名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MTit', @level2type=N'COLUMN', @level2name=N'Iinfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'插件地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MTit', @level2type=N'COLUMN', @level2name=N'Iurl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MTit', @level2type=N'COLUMN', @level2name=N'Itype'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为老师所用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MTit', @level2type=N'COLUMN', @level2name=N'Stype'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MTit', @level2type=N'COLUMN', @level2name=N'orderid'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_WapNode]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_WapNode](
	[N_ID] [int] IDENTITY(1,1) NOT NULL,
	[NodeName] [nvarchar](255) NULL,
	[PNodeid] [int] NULL,
	[NodeType] [int] NULL CONSTRAINT [DF_ZL_WapNode_NodeType]  DEFAULT (0),
	[NodeInfo] [ntext] NULL,
	[Orderid] [int] NULL CONSTRAINT [DF_ZL_WapNode_Orderid]  DEFAULT (0),
	[limit] [int] NULL,
	[Points] [int] NULL,
	[UbbType] [int] NULL CONSTRAINT [DF_ZL_WapNode_UbbType]  DEFAULT (0),
	[Modeid] [int] NULL,
	[NodeUrl] [nvarchar](300) NULL,
	[Child] [int] NULL CONSTRAINT [DF_ZL_WapNode_Child]  DEFAULT (0),
	[Depth] [int] NULL CONSTRAINT [DF_ZL_WapNode_Depth]  DEFAULT (1),
	[showNum] [int] NULL,
	[program] [int] NULL,
	[Nmore] [nvarchar](1000) NULL,
	[addtime] [datetime] NULL CONSTRAINT [DF_ZL_WapNode_addtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_WapNode] PRIMARY KEY CLUSTERED 
(
	[N_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1首页' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'NodeType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1普通，2会员，3VIP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'limit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'查看一次积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'Points'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1节点，2UBB标签，3wml标签' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'UbbType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'Modeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外部链接' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'NodeUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'子栏目数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'Child'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目深度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'Depth'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'showNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排版方案' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'program'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'Nmore'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=NULL ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapNode', @level2type=N'COLUMN', @level2name=N'addtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MailIdiograph]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MailIdiograph](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) NULL,
	[AddTime] [datetime] NULL,
	[State] [bit] NULL,
	[Context] [nvarchar](100) NULL,
 CONSTRAINT [PK_ZL_MailIdiograph] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'签名名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MailIdiograph', @level2type=N'COLUMN', @level2name=N'Name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MailIdiograph', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MailIdiograph', @level2type=N'COLUMN', @level2name=N'State'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'签名内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MailIdiograph', @level2type=N'COLUMN', @level2name=N'Context'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SchemeInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_WapOrder]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_WapOrder](
	[O_ID] [int] IDENTITY(1,1) NOT NULL,
	[MainNode] [int] NULL,
	[Nodeid] [int] NULL,
	[Postion] [int] NULL,
	[NBR] [int] NULL,
	[OrderID] [int] NULL,
	[pic] [nvarchar](255) NULL,
	[UbbType] [int] NULL,
	[firstStr] [ntext] NULL,
	[UbbContent] [ntext] NULL,
	[OMore] [nvarchar](1000) NULL,
	[OMore2] [int] NULL,
 CONSTRAINT [PK_ZL_WapOrder] PRIMARY KEY CLUSTERED 
(
	[O_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主栏目节点，0为首页' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'MainNode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所展示栏目，-1为标签，0为首页' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'Nodeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1顶部，2中部，3底部' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'Postion'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否换行' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'NBR'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'OrderID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1节点，2UBB标签，3wml标签' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'UbbType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'前缀' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'firstStr'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'UbbContent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'OMore'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapOrder', @level2type=N'COLUMN', @level2name=N'OMore2'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MailInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MailInfo](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[MailTitle] [nvarchar](500) NULL,
	[MailContext] [text] NULL,
	[MailSendTime] [datetime] NULL,
	[MailAddTime] [datetime] NULL,
	[MailState] [bit] NULL,
	[MailAddRees] [text] NULL,
 CONSTRAINT [PK_ZL_MailInfo] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Scheme]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_WorkRole]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_WorkRole](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[WorkID] [int] NOT NULL,
	[RoleID] [int] NOT NULL,
 CONSTRAINT [PK_ZL_WorkRole] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MailManage]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MailManage](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Email] [nvarchar](100) NULL,
	[Postfix] [nvarchar](50) NULL,
	[AddTime] [datetime] NULL,
	[BackMostTime] [datetime] NULL,
	[SubscribeToType] [nvarchar](50) NULL,
	[UserID] [int] NULL,
	[State] [bit] NULL,
 CONSTRAINT [PK_ZL_MailManage] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_CollectionInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Zone_Advertisement]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Zone_Advertisement](
	[ZoneID] [int] NOT NULL,
	[ADID] [int] NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Manager]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Manager](
	[AdminID] [int] IDENTITY(1,1) NOT NULL,
	[AdminName] [nvarchar](50) NOT NULL,
	[AdminPassword] [nvarchar](100) NOT NULL,
	[UserName] [nvarchar](255) NOT NULL,
	[EnableMultiLogin] [bit] NOT NULL CONSTRAINT [DF_ZL_Manager_EnableMultiLogin]  DEFAULT (0),
	[LoginTimes] [int] NULL CONSTRAINT [DF_ZL_Manager_LoginTimes]  DEFAULT (0),
	[LastLoginIP] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Manager_LastLoginIP]  DEFAULT (''),
	[LastLoginTime] [datetime] NULL CONSTRAINT [DF_ZL_Manager_LastLoginTime]  DEFAULT (getdate()),
	[LastLogoutTime] [datetime] NULL CONSTRAINT [DF_ZL_Manager_LastLogoutTime]  DEFAULT (getdate()),
	[LastModifyPwdTime] [datetime] NULL CONSTRAINT [DF_ZL_Manager_LastModifyPwdTime]  DEFAULT (getdate()),
	[IsLock] [bit] NULL CONSTRAINT [DF_ZL_Manager_IsLock]  DEFAULT (0),
	[EnableModifyPassword] [bit] NULL CONSTRAINT [DF_ZL_Manager_EnableModifyPassword]  DEFAULT (1),
	[AdminRole] [ntext] NULL CONSTRAINT [DF_ZL_Manager_AdminRole]  DEFAULT (''),
	[Theme] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Manager_Theme]  DEFAULT (''),
	[RandNumber] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Manager_RandNumber]  DEFAULT (''),
	[NodeRole] [int] NULL CONSTRAINT [DF_ZL_Manager_NodeRole]  DEFAULT (0),
	[PubRole] [int] NULL CONSTRAINT [DF_ZL_Manager_PubRole]  DEFAULT (0),
	[DefaultStart] [int] NULL CONSTRAINT [DF_ZL_Manager_DefaultStart]  DEFAULT (-99),
	[AdminType] [int] NULL,
	[ManageNode] [nvarchar](500) NULL CONSTRAINT [DF_ZL_Manager_ManageNode]  DEFAULT (''),
	[AddUserID] [int] NULL,
	[AdminTrueName] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_ZL_Manager] PRIMARY KEY CLUSTERED 
(
	[AdminID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'AdminID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'AdminName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员密码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'AdminPassword'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'前台用户名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'UserName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许多人登录' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'EnableMultiLogin'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登录次数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'LoginTimes'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最近登录IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'LastLoginIP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最近登录时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'LastLoginTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最近退出管理后台时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'LastLogoutTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最近修改密码时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'LastModifyPwdTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'IsLock'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许修改密码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'EnableModifyPassword'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员角色权限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'AdminRole'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'后台页面主题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'Theme'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布内容默认状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'DefaultStart'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员类型  1超级管理员，2站点管理员，3普通管理员' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'AdminType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'管理节点,当AdminType为2站点管理员时,该字段记录管理的站点ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'ManageNode'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加该帐号的管理员ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manager', @level2type=N'COLUMN', @level2name=N'AddUserID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_CollectionItem]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Manufacturers]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Manufacturers](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Producername] [varchar](255) NULL,
	[Smallname] [varchar](255) NULL,
	[CreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Manufacturers_CreateTime]  DEFAULT (getdate()),
	[Coadd] [varchar](255) NULL,
	[Telpho] [varchar](255) NULL,
	[FaxCode] [varchar](50) NULL,
	[PostCode] [varchar](50) NULL,
	[CoWebsite] [varchar](255) NULL,
	[Email] [varchar](50) NULL,
	[CoClass] [varchar](50) NULL,
	[CoPhoto] [varchar](255) NULL,
	[Content] [text] NULL,
	[Istop] [int] NULL CONSTRAINT [DF_ZL_Manufacturers_Istop]  DEFAULT (0),
	[Disable] [int] NULL CONSTRAINT [DF_ZL_Manufacturers_Disable]  DEFAULT (0),
	[Isbest] [int] NULL CONSTRAINT [DF_ZL_Manufacturers_Isbest]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Manufacturers] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Producername'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商缩写' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Smallname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'CreateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Coadd'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系电话' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Telpho'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'传真号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'FaxCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮政编码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'PostCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商主页' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'CoWebsite'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电子邮件' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Email'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'CoClass'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商照片' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'CoPhoto'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'厂商简介' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Content'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'固顶' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Istop'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'禁用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Disable'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Manufacturers', @level2type=N'COLUMN', @level2name=N'Isbest'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Page_info_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Page_info_Del]
(
@UserID int
)
AS
    Delete from ZL_Page_info where UserID=@UserID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：增加一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_Add]
@UserID int,
@Area nvarchar(255),
@Corporation nvarchar(255),
@ServersType ntext,
@CorLogo nvarchar(255),
@Dealicence nvarchar(255),
@CreateDate datetime

 AS 
	INSERT INTO [ZL_Page_info](
	[UserID],[Area],[Corporation],[ServersType],[CorLogo],[Dealicence],[CreateDate]
	)VALUES(
	@UserID,@Area,@Corporation,@ServersType,@CorLogo,@Dealicence,@CreateDate
	)




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Interlocution]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserExpDomP_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_UserExpDomP_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_UserExpDomP]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Message]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Message](
	[MsgID] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](255) NOT NULL,
	[Content] [ntext] NOT NULL,
	[Sender] [nvarchar](50) NOT NULL,
	[Incept] [nvarchar](50) NOT NULL,
	[PostDate] [datetime] NULL CONSTRAINT [DF_ZL_Message_PostDate]  DEFAULT (getdate()),	
	[Savedata][int]NULL,
	[status] [int] NULL CONSTRAINT [DF_ZL_Message_status]  DEFAULT (0),
	[IsDelInbox] [int] NULL DEFAULT(0) ,
	[IsDelSendbox] [int] NULL DEFAULT(0),
	[receipt] [nvarchar] (225) NULL 
 CONSTRAINT [PK_ZL_Message] PRIMARY KEY CLUSTERED 
(
	[MsgID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'短消息ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Message', @level2type=N'COLUMN', @level2name=N'MsgID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MiUserInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MiUserInfo](
	[M_id] [int] IDENTITY(1,1) NOT NULL,
	[userid] [int] NULL,
	[schoolID] [int] NULL,
	[banji] [nvarchar](255) NULL,
	[prov] [nvarchar](50) NULL,
	[city] [nvarchar](50) NULL,
	[daike] [nvarchar](255) NULL,
	[realname] [nvarchar](255) NULL,
	[type] [int] NULL CONSTRAINT [DF_ZL_MiUserInfo_type]  DEFAULT (0),
 CONSTRAINT [PK_ZL_MiUserInfo] PRIMARY KEY CLUSTERED 
(
	[M_id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'[userid]' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'userid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'schoolID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'banji'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'省' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'prov'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'市' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'city'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代课' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'daike'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'真实姓名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'realname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型老师或学生' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MiUserInfo', @level2type=N'COLUMN', @level2name=N'type'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：删除一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_Delete]
@UserID int
 AS 
	DELETE [ZL_Page_info]
	 WHERE UserID=@UserID 




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Model]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Model](
	[ModelID] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](250) NULL,
	[TableName] [nvarchar](50) NOT NULL,
	[ItemName] [nvarchar](50) NULL,
	[ItemUnit] [nvarchar](20) NULL,
	[ItemIcon] [nvarchar](255) NULL,
	[ContentTemplate] [nvarchar](255) NULL,
	[ModelType] [int] NULL CONSTRAINT [DF_ZL_Model_ModelType]  DEFAULT (1),
	[MultiFlag] [bit] NULL CONSTRAINT [DF_ZL_Model_MultiFlag]  DEFAULT (0),
	[NodeID] [int] NULL CONSTRAINT [DF_ZL_Model_NodeID]  DEFAULT (0),
	[SysModel] [int] NULL CONSTRAINT [DF_ZL_Model_SysModel]  DEFAULT (2),
	[FromModel] [int] NULL CONSTRAINT [DF_ZL_Model_FromModel]  DEFAULT (0),
	[Thumbnail] [nvarchar] (500) NULL ,
	[Islotsize][bit]  NULL CONSTRAINT [DF_ZL_Model_Islotsize]  DEFAULT ((0)),
 CONSTRAINT [PK_ZL_Model] PRIMARY KEY CLUSTERED 
(
	[ModelID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ModelID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ModelName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型关联的表名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'TableName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目名称：如文章、新闻' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ItemName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目单位：如篇、条' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ItemUnit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目图标' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ItemIcon'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ContentTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型类别 1-内容模型 2-商品模型 3-会员模型 4-黄页模型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'ModelType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'识别系统模型字段，1：系统生成模型，2：用户自定义模型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'SysModel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'复制来源模型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Model', @level2type=N'COLUMN', @level2name=N'FromModel'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_Exists]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：是否已经存在 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_Exists]
@UserID int
AS
	DECLARE @TempID int
	SELECT @TempID = count(1) FROM [ZL_Page_info] WHERE UserID=@UserID 
	IF @TempID = 0
		RETURN 0
	ELSE
		RETURN 1




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ModelField]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ModelField](
	[FieldID] [int] IDENTITY(1,1) NOT NULL,
	[ModelId] [int] NOT NULL,
	[FieldName] [nvarchar](50) NOT NULL,
	[FieldAlias] [nvarchar](50) NOT NULL,
	[FieldTips] [nvarchar](50) NULL,
	[Description] [nvarchar](255) NULL,
	[IsNotNull] [bit] NULL CONSTRAINT [DF_ZL_ModelField_IsNotNull]  DEFAULT (0),
	[IsSearchForm] [bit] NULL CONSTRAINT [DF_ZL_ModelField_IsSearchForm]  DEFAULT (0),
	[FieldType] [nvarchar](50) NOT NULL,
	[Content] [ntext] NULL,
	[OrderId] [int] NULL CONSTRAINT [DF_ZL_ModelField_OrderId]  DEFAULT (1),
	[ShowList] [bit] NULL CONSTRAINT [DF__ZL_ModelF__ShowL__454A25B4]  DEFAULT (0),
	[ShowWidth] [int] NULL CONSTRAINT [DF__ZL_ModelF__ShowW__463E49ED]  DEFAULT (0),
	[IsShow] [bit] NULL CONSTRAINT [DF_ZL_ModelField_IsShow]  DEFAULT (1),
	[IsView] [bit] NULL CONSTRAINT [DF_ZL_ModelField_IsView]  DEFAULT (1),
	[IsDownField] [int] NULL CONSTRAINT [DF_ZL_ModelField_IsDownField]  DEFAULT (0),
	[DownServerID] [int] NULL CONSTRAINT [DF_ZL_ModelField_DownServerID]  DEFAULT (0),
	[RestoreField] [int] NULL CONSTRAINT [DF_ZL_ModelField_Restore]  DEFAULT (0),
	[Sys_type] [bit] NULL  DEFAULT (0),
	[IsCopy] [int] NULL CONSTRAINT [DF_ZL_ModelField_IsCopy]  DEFAULT (0),
	[Islotsize] [bit] NULL CONSTRAINT [DF_ZL_ModelField_Islotsize]  DEFAULT (0),
 CONSTRAINT [PK_ZL_ModelField] PRIMARY KEY CLUSTERED 
(
	[FieldID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END


GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'FieldID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'ModelId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'FieldName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段别名 前台显示用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'FieldAlias'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段提示' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'FieldTips'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否必填 默认0否' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'IsNotNull'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否在搜索表单显示' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'IsSearchForm'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'FieldType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排列序号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'OrderId'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为下载专用字段' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'IsDownField'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载服务器ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'DownServerID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复显示字段' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'RestoreField'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否可复制 0：不可复制，1：可复制' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ModelField', @level2type=N'COLUMN', @level2name=N'IsCopy'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Scheme]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_GetList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：查询记录信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_GetList]
 AS 
	SELECT 
	UserID,Area,Corporation,ServersType,CorLogo,Dealicence,CreateDate
	 FROM [ZL_Page_info]




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MultiNode]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MultiNode](
	[N_ID] [int] IDENTITY(1,1) NOT NULL,
	[N_ItemID] [int] NULL,
	[N_NodeID] [int] NULL,
 CONSTRAINT [PK_ZL_multiNode] PRIMARY KEY CLUSTERED 
(
	[N_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MultiNode', @level2type=N'COLUMN', @level2name=N'N_NodeID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_School]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_GetMaxId]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到主键字段最大值 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_GetMaxId]
AS
	DECLARE @TempID int
	SELECT @TempID = max([UserID])+1 FROM [ZL_Page_info]
	IF @TempID IS NULL
		RETURN 1
	ELSE
		RETURN @TempID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Node]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Node](
	[NodeID] [int] IDENTITY(1,1) NOT NULL,
	[NodeName] [nvarchar](50) NOT NULL,
	[NodeType] [int] NOT NULL CONSTRAINT [DF_ZL_Node_NodeType]  DEFAULT (0),
	[NodeDir] [nvarchar](50) NOT NULL,
	[NodeUrl] [nvarchar](255) NULL,
	[NodeListUrl] [nvarchar](255) NULL,
	[Tips] [nvarchar](4000) NULL,
	[ParentID] [int] NULL,
	[OrderID] [int] NULL CONSTRAINT [DF_ZL_Node_OrderID]  DEFAULT (0),
	[Child] [int] NULL,
	[Depth] [int] NULL CONSTRAINT [DF_ZL_Node_Depth]  DEFAULT (1),
	[NodePicUrl] [nvarchar](255) NULL,
	[Description] [nvarchar](4000) NULL,
	[Meta_Keywords] [nvarchar](4000) NULL,
	[Meta_Description] [nvarchar](4000) NULL,
	[OpenType] [bit] NULL CONSTRAINT [DF_ZL_Node_OpenType]  DEFAULT (0),
	[PurviewType] [bit] NULL CONSTRAINT [DF_ZL_Node_PurviewType]  DEFAULT (0),
	[CommentType] [bit] NULL CONSTRAINT [DF_ZL_Node_CommentType]  DEFAULT (0),
	[HitsOfHot] [int] NULL CONSTRAINT [DF_ZL_Node_HitsOfHot]  DEFAULT (0),
	[ListTemplateFile] [nvarchar](255) NULL,
	[IndexTemplate] [nvarchar](255) NULL,
	[LastinfoTemplate] [nvarchar](255) NULL,
	[HotinfoTemplate] [nvarchar](255) NULL,
	[ProposeTemplate] [nvarchar](255) NULL,
	[ContentModel] [nvarchar](255) NULL,
	[ItemOpenType] [bit] NULL CONSTRAINT [DF_ZL_Node_ItemOpenType]  DEFAULT (0),
	[ContentHtmlRule] [int] NULL CONSTRAINT [DF_ZL_Node_ContentHtmlRule]  DEFAULT (0),
	[ListPageHtmlEx] [int] NULL CONSTRAINT [DF_ZL_Node_ListPageHtmlRule]  DEFAULT (0),
	[ContentFileEx] [int] NULL CONSTRAINT [DF_ZL_Node_ItemAspxFileName]  DEFAULT (0),
	[HtmlPosition] [int] NULL CONSTRAINT [DF_ZL_Node_HtmlPosition]  DEFAULT (0),
	[NodeListType] [int] NULL CONSTRAINT [DF_ZL_Node_NodeListType]  DEFAULT (0),
	[ConsumePoint] [int] NULL CONSTRAINT [DF__ZL_Node__Consume__3F914C5E]  DEFAULT (0),
	[ConsumeType] [int] NULL CONSTRAINT [DF__ZL_Node__Consume__40857097]  DEFAULT (0),
	[ConsumeTime] [int] NULL CONSTRAINT [DF__ZL_Node__Consume__417994D0]  DEFAULT (0),
	[ConsumeCount] [int] NULL CONSTRAINT [DF__ZL_Node__Consume__426DB909]  DEFAULT (0),
	[Shares] [float] NULL CONSTRAINT [DF__ZL_Node__Shares__4361DD42]  DEFAULT (0),
	[Custom] [text] NULL CONSTRAINT [DF__ZL_Node__Custom__4456017B]  DEFAULT (''),
	[SafeGuard] [int] NOT NULL CONSTRAINT [DF_ZL_Node_SafeGuard]  DEFAULT ('0'),
	[ItemOpenTypeTrue] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Node_ItemOpenTypeTrue]  DEFAULT ('0'),
	[OpenTypeTrue] [nvarchar](50) NULL CONSTRAINT [DF_ZL_Node_OpenTypeTrue]  DEFAULT ('0'),
	[NodeBySite] [int] NULL,
	[SiteConfige] [text] COLLATE Chinese_PRC_CI_AS NULL,
	[Contribute] [int] NULL CONSTRAINT [DF_ZL_Node_Contribute]  DEFAULT (0),
	[SiteContentAudit] [int] NULL CONSTRAINT [DF_ZL_Node_SiteContentAudit]  DEFAULT (0),
	[AuditNodeList] [nvarchar](1000) NULL,
	[AddPoint] [int] NULL,
	[AddMoney] [money] NULL,
	[ClickTimeout] [int] NULL CONSTRAINT [DF_ZL_Node_ClickTimeout]  DEFAULT (1),
 CONSTRAINT [PK_ZL_Node] PRIMARY KEY CLUSTERED 
(
	[NodeID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点类型。0为根节点，1为栏目节点2为单个页面，3为外部链接' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点标识目录，只能是英文字母和数字，并且要以字母开头' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeDir'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外部链接' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表页URL' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeListUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点提示，不支持HTML' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Tips'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'父栏目ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ParentID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'OrderID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'子栏目数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Child'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目深度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Depth'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目图片地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodePicUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目META关键词' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Meta_Keywords'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'针对搜索引擎的说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Meta_Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'打开方式0原窗口' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'OpenType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目权限。0--开放栏目  1--认证栏目' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'PurviewType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论权限0不允许，1允许' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'CommentType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热点的点击数最小值' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'HitsOfHot'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表页模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ListTemplateFile'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目首页模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'IndexTemplate'

GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最新信息模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'LastinfoTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热门信息模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'HotinfoTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐信息模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ProposeTemplate'

GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选择的内容模型数组' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ContentModel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点下项目的打开方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ItemOpenType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容页的文件名规则' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ContentHtmlRule'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表首页的文件名规则' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ListPageHtmlEx'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容页文件扩展名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ContentFileEx'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点目录生成静态位置0-根目录 1-继承父目录结构' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'HtmlPosition'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'1-文章，2-商城，3-两个都包含' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeListType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'查看内容消费点券数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ConsumePoint'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'重复收费方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ConsumeType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'距离上次收费时间多少小时重新收费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ConsumeTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'重复阅读内容多少次重新收费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ConsumeCount'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全保护' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'SafeGuard'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员添加内容分成比例' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Shares'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自设内容 用{SplitCustom}分隔' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Custom'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'节点转子站  null或0为节点，5为子站' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'NodeBySite'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'当NodeBySite为5时，该字段为站点配置文件' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'SiteConfige'

GO

EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许投稿' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'Contribute'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否需要审核' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'SiteContentAudit'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'指定投稿栏目' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'AuditNodeList'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点击时间有效范围' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Node', @level2type=N'COLUMN', @level2name=N'ClickTimeout'

GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_CollectionItem]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_GetModel]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到实体对象的详细信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_GetModel]
@UserID int
 AS 
	SELECT 
	UserID,Area,Corporation,ServersType,CorLogo,Dealicence,CreateDate
	 FROM [ZL_Page_info]
	 WHERE UserID=@UserID 




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_NodeBindDroit]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_NodeBindDroit](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[NodeID] [int] NOT NULL,
	[FID] [int] NOT NULL,
 CONSTRAINT [PK_ZL_NodeBindDroit] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pageinfo_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：修改一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Pageinfo_Update]
@UserID int,
@Area nvarchar(255),
@Corporation nvarchar(255),
@ServersType ntext,
@CorLogo nvarchar(255),
@Dealicence nvarchar(255),
@CreateDate datetime
 AS 
	UPDATE [ZL_Page_info] SET 
	[Area] = @Area,[Corporation] = @Corporation,[ServersType] = @ServersType,[CorLogo] = @CorLogo,[Dealicence] = @Dealicence,[CreateDate] = @CreateDate
	WHERE UserID=@UserID 




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_NodeRole]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_NodeRole](
	[RN_ID] [int] IDENTITY(1,1) NOT NULL,
	[RID] [int] NULL,
	[NID] [int] NULL,
	[look] [int] NULL,
	[Modify] [int] NULL,
	[State] [int] NULL,
	[addTo] [int] NULL,
	[Columns] [int] NULL,
	[Comments] [int] NULL,
	[PNid] [int] NULL CONSTRAINT [DF_ZL_NodeRole_PNid]  DEFAULT (0),
 CONSTRAINT [PK_ZL_NodeRole] PRIMARY KEY CLUSTERED 
(
	[RN_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'RID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'NID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'查看' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'look'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'Modify'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'State'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'addTo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'当前栏目' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'Columns'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_NodeRole', @level2type=N'COLUMN', @level2name=N'Comments'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_Select_ByValue]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE  PROCEDURE [dbo].[PR_Interlocution_Select_ByValue] 
@SelectCondition nvarchar(500),
@WhereCondition nvarchar(500),
@OrderByExpression nvarchar(250)
 AS 
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED
 DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	''+ @SelectCondition +''
FROM
	[dbo].[ZL_Interlocution]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Node_ModelTemplate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Node_ModelTemplate](
	[NodeID] [int] NOT NULL,
	[ModelID] [int] NOT NULL,
	[Template] [nvarchar](255) NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Online]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Online](
	[UserID] [int] NOT NULL,
	[UserName] [nvarchar](255) NOT NULL,
	[StartTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Online_LastOnlineTime]  DEFAULT (getdate()),
	[ChangeTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Online_LastChangTime]  DEFAULT (getdate())
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[UserID],
	[ProblemTitle],
	[ProblemContext],
	[AddTime],
	[RoomID]
FROM
	[dbo].[ZL_Interlocution]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_OnlineUsers]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_OnlineUsers](
	[O_ID] [int] IDENTITY(1,1) NOT NULL,
	[O_IP] [nvarchar](50) NULL,
	[O_SessionID] [nvarchar](50) NULL,
	[O_UpdateTime] [datetime] NULL,
	[O_Name] [nvarchar](50) NULL,
	[Uid] [int] NULL,
 CONSTRAINT [PK_ZL_OnlineUsers] PRIMARY KEY CLUSTERED 
(
	[O_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户登陆IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_OnlineUsers', @level2type=N'COLUMN', @level2name=N'O_IP'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'sessionID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_OnlineUsers', @level2type=N'COLUMN', @level2name=N'O_SessionID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后活动时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_OnlineUsers', @level2type=N'COLUMN', @level2name=N'O_UpdateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'临时用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_OnlineUsers', @level2type=N'COLUMN', @level2name=N'O_Name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID。如果是系统登录用户该值就是系统用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_OnlineUsers', @level2type=N'COLUMN', @level2name=N'Uid'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserProduct_Souch]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'








CREATE proc [dbo].[PR_UserProduct_Souch]
	@tablename varchar(255),
	@keyword varchar(255),
	@UserID int
as
	declare @s varchar(2000)
	set @s = ''select * from ZL_UserShop''
	set @s=@s+'' where '' +@tablename+'' like ''''%''+@keyword+''%'''' and UserID=@UserID''
	exec (@s)
	return





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Orderinfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Orderinfo](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[OrderNo] [varchar](50) NULL,
	[Reuser] [varchar](255) NULL,
	[Receiver] [varchar](50) NULL,
	[Rename] [varchar](255) NULL,
	[Guojia] [varchar](255) NULL,
	[Shengfen] [varchar](255) NULL,
	[Chengshi] [varchar](255) NULL,
	[Diqu] [varchar](255) NULL,
	[Jiedao] [varchar](255) NULL,
	[ZipCode] [varchar](50) NULL,
	[Phone] [varchar](50) NULL,
	[Email] [varchar](50) NULL,
	[Mobile] [int] NULL,
	[Delivery] [int] NULL,
	[Outstock] [int] NULL,
	[Deliverytime] [int] NULL,
	[Payment] [int] NULL,
	[Invoice] [text] NULL,
	[Ordermessage] [text] NULL,
	[Merchandiser] [varchar](50) NULL,
	[Internalrecords] [text] NULL,
	[Ordersamount] [money] NULL,
	[Receivablesamount] [money] NULL,
	[Specifiedprice] [money] NULL,
	[Freight] [money] NULL,
	[Invoiceneeds] [int] NULL,
	[Developedvotes] [int] NULL,
	[OrderStatus] [int] NULL,
	[Paymentstatus] [int] NULL,
	[StateLogistics] [int] NULL,
	[Signed] [int] NULL CONSTRAINT [DF_ZL_Orderinfo_Signed]  DEFAULT (0),
	[Settle] [int] NULL CONSTRAINT [DF_ZL_Orderinfo_Settle]  DEFAULT (0),
	[Aside] [int] NULL CONSTRAINT [DF_ZL_Orderinfo_aside]  DEFAULT (0),
	[Suspended] [int] NULL CONSTRAINT [DF_ZL_Orderinfo_Suspended]  DEFAULT (0),
	[Ordertype] [int] NULL CONSTRAINT [DF_ZL_Orderinfo_Ordertype]  DEFAULT (0),
	[AddTime] [datetime] NULL CONSTRAINT [DF_ZL_Orderinfo_AddTime]  DEFAULT (getdate()),
	[AddUser] [varchar](255) NULL,
	[Userid] [int] NULL,
	[city] [nvarchar](50) NULL,
	[IsCount] [bit] NULL CONSTRAINT [DF_ZL_Orderinfo_IsCount]  DEFAULT (0),
	[Integral] [int] NULL DEFAULT (0),
	[parentID] [int] NULL DEFAULT (0),
	[service_charge] [float] NULL ,
	[Balance_price] [float] NULL ,
	[Freight_remark] [nvarchar](1000) null,
	[Balance_remark][nvarchar](1000) null,
	[Money_rate] [money] null DEFAULT (1),
	[Money_code] [varchar] (4) null,
	[MobileNum] [nvarchar] (20) NULL 
	
 CONSTRAINT [PK_ZL_Orderinfo] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'OrderNo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单用户' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Reuser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收货人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Receiver'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Rename'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮政编码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'ZipCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电子信箱' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Email'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Mobile'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'送货方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Delivery'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'缺货处理' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Outstock'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'送货时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Deliverytime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'付款方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Payment'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发票信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Invoice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订货留言' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Ordermessage'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'跟单员' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Merchandiser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内部记录' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Internalrecords'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单金额' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Ordersamount'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收款金额' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Receivablesamount'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指定价' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Specifiedprice'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'运费计算' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Freight'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'需要发票' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Invoiceneeds'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已开发票' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Developedvotes'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'OrderStatus'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'付款状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Paymentstatus'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'物流状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'StateLogistics'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'签收' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Signed'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结清' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Settle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'作废' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Aside'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'暂停' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Suspended'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Ordertype'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'负责跟单人员' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'AddUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否打折' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'IsCount'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'本次交易用户所得积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'Integral'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主订单ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'parentID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'服务费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Orderinfo', @level2type=N'COLUMN', @level2name=N'service_charge'
GO
exec sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码 ',@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'table', @level1name=N'ZL_Orderinfo', @level2type=N'column', @level2name=N'MobileNum'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_PageStyle]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_PageStyle](
	[PageNodeid] [int] IDENTITY(1,1) NOT NULL,
	[PageNodeName] [varchar](255) NULL,
	[Istrue] [int] NULL CONSTRAINT [DF_ZL_PageNode_Istrue]  DEFAULT (1),
	[Orderid] [int] NULL CONSTRAINT [DF_ZL_PageNode_Orderid]  DEFAULT (0),
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_PageNode_Addtime]  DEFAULT (getdate()),
	[IsDefault] [int] NULL CONSTRAINT [DF_ZL_PageStyle_IsDefault]  DEFAULT (0),
 CONSTRAINT [PK_ZL_PageNode] PRIMARY KEY CLUSTERED 
(
	[PageNodeid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[SchoolName],
	[Country],
	[Province],
	[SchoolType],
	[Visage],
	[Addtime],
	[SchoolInfo]
FROM
	[dbo].[ZL_School]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_PageTemplate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_PageTemplate](
	[TemplateID] [int] IDENTITY(1,1) NOT NULL,
	[TemplateName] [varchar](50) NOT NULL,
	[TemplateUrl] [varchar](50) NOT NULL,
	[TemplateType] [int] NULL CONSTRAINT [DF_ZL_PageTemplate_TemplateType]  DEFAULT (0),
	[OpenType] [varchar](50) NULL CONSTRAINT [DF_ZL_PageTemplate_OpenType]  DEFAULT ('_blank'),
	[UserGroup] [varchar](50) NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_PageTemplate_Addtime]  DEFAULT (getdate()),
	[IsTrue] [int] NULL CONSTRAINT [DF_ZL_PageTemplate_IsTrue]  DEFAULT (0),
	[Userid] [int] NULL CONSTRAINT [DF_ZL_PageTemplate_Userid]  DEFAULT (0),
	[UserName] [varchar](255) NULL,
	[OrderID] [int] NULL CONSTRAINT [DF_ZL_PageTemplate_OrderID]  DEFAULT (0),
	[ParentID] [int] NULL CONSTRAINT [DF_ZL_PageTemplate_ParentID]  DEFAULT (0),
	[Modelinfo] [text] NULL,
	[identifiers] [varchar](255) NULL,
	[NodeFileEx] [varchar](50) NULL,
	[ContentFileEx] [varchar](50) NULL,
	[Nodeimgurl] [varchar](255) NULL,
	[Nodeimgtext] [varchar](255) NULL,
	[Pagecontent] [text] NULL,
	[PageMetakeyword] [varchar](255) NULL,
	[PageMetakeyinfo] [varchar](255) NULL,
	[linkurl] [varchar](255) NULL,
	[linkimg] [varchar](255) NULL,
	[linktxt] [varchar](255) NULL,
	[ParentNode] [int] NULL CONSTRAINT [DF_ZL_PageTemplate_ParentNode]  DEFAULT (0),
 CONSTRAINT [PK_ZL_PageTemplate] PRIMARY KEY CLUSTERED 
(
	[TemplateID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_ServiceSeat]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GetRecordFromPage]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_GetRecordFromPage]
@TableName varchar(350),        --表名
 @Identity VARCHAR(100),         --主键，可以为空，但@Order为空时该值不能为空
 @Fields varchar(5000) = ''*'',    --字段名(全部字段为*)
 @OrderField varchar(5000),        --排序字段(必须!支持多字段)
 @sqlWhere varchar(5000) = Null,--条件语句(不用加where)
 @pageSize int,                    --每页多少条记录
 @pageIndex int = 0            --指定当前为第几页 0=第一页
as
begin
    Declare @sql nvarchar(4000);
    Declare @totalRecord int;    
    DECLARE @totalPage INT;
    --计算总记录数
    if (@SqlWhere='''' or @sqlWhere=NULL)
        set @sql = ''select @totalRecord = count(1) from '' + @TableName
    else
        set @sql = ''select @totalRecord = count(1) from '' + @TableName + '' where '' + @sqlWhere
 
    EXEC sp_executesql @sql,N''@totalRecord int OUTPUT'',@totalRecord OUTPUT--计算总记录数    
    --计算总页数
    SELECT @totalPage=CEILING((@totalRecord+0.0)/@PageSize)
    --SELECT @totalRecord AS ''fldtotalRecord'',@totalPage AS ''fldTotalPage''
 
    if (@SqlWhere='''' or @sqlWhere=NULL)
        set @sql = ''Select * FROM (select ROW_NUMBER() Over(order by '' + @OrderField + '') as rowId,'' + @Fields + '' from '' + @TableName
    else
        set @sql = ''Select * FROM (select ROW_NUMBER() Over(order by '' + @OrderField + '') as rowId,'' + @Fields + '' from '' + @TableName + '' where '' + @SqlWhere    
         
    --处理页数超出范围情况
    if @PageIndex<0 
        Set @pageIndex = 0    
    if @pageIndex>@TotalPage
        Set @pageIndex = @TotalPage-1 
     --处理开始点和结束点
    Declare @StartRecord int
    Declare @EndRecord int    
    set @StartRecord = @pageIndex*@PageSize + 1
    set @EndRecord = @StartRecord + @pageSize - 1
 
    --继续合成sql语句

    set @Sql = @Sql + '') as tempTable where rowId >='' + CONVERT(VARCHAR(50),@StartRecord) + '' and rowid<= '' +  CONVERT(VARCHAR(50),@EndRecord)
    
    Exec(@Sql)

end' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Commodities_Souch]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE proc [dbo].[PR_Commodities_Souch]
	@tablename varchar(255),
	@keyword varchar(255)
as
	declare @s varchar(2000)
	set @s = ''select * from ZL_Commodities''
	set @s=@s+'' where Recycler=0 and '' +@tablename+'' like ''''%''+@keyword+''%''''''
	exec (@s)
	return

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_PayPlat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_PayPlat](
	[PayPlatID] [int] IDENTITY(1,1) NOT NULL,
	[PayClass] [int] NULL CONSTRAINT [DF_ZL_PayPlat_PayClass]  DEFAULT (0),
	[PayPlatName] [nvarchar](255) NOT NULL,
	[AccountID] [nvarchar](255) NULL,
	[MD5Key] [nvarchar](255) NULL,
	[SellerEmail] [nvarchar](255) NULL,
	[IsDisabled] [bit] NULL CONSTRAINT [DF_ZL_PayPlat_IsDisabled]  DEFAULT (0),
	[IsDefault] [bit] NULL CONSTRAINT [DF_ZL_PayPlat_IsDefault]  DEFAULT (0),
	[Rate] [float] NULL CONSTRAINT [DF_ZL_PayPlat_Rate]  DEFAULT (0),
	[OrderID] [int] NULL,
	[payType] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[leadtoGroup] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_PayPlat] PRIMARY KEY CLUSTERED 
(
	[PayPlatID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO


EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付平台ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'PayPlatID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付平台名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'PayPlatName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付平台商户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'AccountID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付平台商户安全校验码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'MD5Key'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'卖家Email如支付宝需要的卖家Email' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'SellerEmail'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否禁用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'IsDisabled'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否默认支付平台' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'IsDefault'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手续费' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'Rate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'OrderID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付卡类型 zfk ，a等' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'payType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'这个通道属于的用户组，各个用户组表示：‘，***，’' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PayPlat', @level2type=N'COLUMN', @level2name=N'leadtoGroup'

GO

SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Keywords_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Keywords_Delete]
(
	@KeywordId nvarchar(4000)
)
 AS 
		DECLARE @sql nvarchar(4000)
		set @sql = ''DELETE  FROM ZL_Keywords WHERE KeywordId IN ('' + @KeywordId + '')''
		exec(@sql)





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Payment]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Payment](
	[PaymentID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[PaymentNum] [nvarchar](50) NULL,
	[PayPlatID] [int] NULL,
	[MoneyPay] [money] NULL,
	[MoneyTrue] [money] NULL,
	[PayTime] [datetime] NULL,
	[SuccessTime] [datetime] NULL,
	[Status] [int] NULL,
	[PlatformInfo] [nvarchar](200) NULL,
	[Remark] [nvarchar](255) NULL,
	[CStatus] [bit] NULL CONSTRAINT [DF_ZL_Payment_CStatus]  DEFAULT (0),
	CONSTRAINT [PK_ZL_Payment] PRIMARY KEY CLUSTERED 
	(
	  [PaymentID] DESC
	) ON [PRIMARY]
)

 ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付情况ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'PaymentID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付会员ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付序号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'PaymentNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支付平台ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'PayPlatID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'金额' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'MoneyPay'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'实际支付金额' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'MoneyTrue'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'交易时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'PayTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'交易成功时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'SuccessTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'交易状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'Status'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'平台反馈信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'PlatformInfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'Remark'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'处理状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Payment', @level2type=N'COLUMN', @level2name=N'CStatus'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Permission]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Permission](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[RoleName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[RoleImg] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Info] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Perlist] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[UserGroup] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Precedence] [int] NULL CONSTRAINT [DF_ZL_Permission_Precedence]  DEFAULT (0),
	[IsTrue] [bit] NULL CONSTRAINT [DF_ZL_Permission_IsTrue]  DEFAULT (1),
 CONSTRAINT [PK_ZL_Permission] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'权限ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'角色名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'RoleName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'角色图片' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'RoleImg'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'角色说明' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'Info'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'权限详细列表' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'Perlist'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组绑定' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'UserGroup'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'优先级别,用户组多次绑定' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'Precedence'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Permission', @level2type=N'COLUMN', @level2name=N'IsTrue'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Common_List2]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_Common_List2]
@TableNames VARCHAR(200),    --表名，可以是多个表，但不能用别名
@PrimaryKey VARCHAR(100),    --主键，可以为空，但@Order为空时该值不能为空
@Fields    VARCHAR(200),        --要取出的字段，可以是多个表的字段，可以为空，为空表示select *
@PageSize INT,            --每页记录数
@CurrentPage INT,        --当前页，0表示第1页
@Filter VARCHAR(200) = '''',    --条件，可以为空，不用填 where
@Order VARCHAR(200) = ''''    --排序，可以为空，为空默认按主键升序排列，不用填 order by
AS
BEGIN
    DECLARE @SortColumn VARCHAR(200)
    DECLARE @Operator CHAR(2)
    DECLARE @SortTable VARCHAR(200)
    DECLARE @SortName VARCHAR(200)
    IF @Fields = ''''
        SET @Fields = ''*''
    IF @Filter = ''''
        SET @Filter = ''WHERE 1=1''
    ELSE
        SET @Filter = ''WHERE '' +  @Filter    

    IF @Order <> ''''
    BEGIN
        DECLARE @pos1 INT, @pos2 INT
        SET @Order = REPLACE(REPLACE(@Order, '' asc'', '' ASC''), '' desc'', '' DESC'')
        IF CHARINDEX('' DESC'', @Order) > 0
            IF CHARINDEX('' ASC'', @Order) > 0
            BEGIN
                IF CHARINDEX('' DESC'', @Order) < CHARINDEX('' ASC'', @Order)
                    SET @Operator = ''<=''
                ELSE
                    SET @Operator = ''>=''
            END
            ELSE
                SET @Operator = ''<=''
        ELSE
            SET @Operator = ''>=''
        SET @SortColumn = REPLACE(REPLACE(REPLACE(@Order, '' ASC'', ''''), '' DESC'', ''''), '' '', '''')
        SET @pos1 = CHARINDEX('','', @SortColumn)
        IF @pos1 > 0
            SET @SortColumn = SUBSTRING(@SortColumn, 1, @pos1-1)
        SET @pos2 = CHARINDEX(''.'', @SortColumn)
        IF @pos2 > 0
        BEGIN
            SET @SortTable = SUBSTRING(@SortColumn, 1, @pos2-1)
            IF @pos1 > 0 
                SET @SortName = SUBSTRING(@SortColumn, @pos2+1, @pos1-@pos2-1)
            ELSE
                SET @SortName = SUBSTRING(@SortColumn, @pos2+1, LEN(@SortColumn)-@pos2)
        END
        ELSE
        BEGIN
            SET @SortTable = @TableNames
            SET @SortName = @SortColumn
        END
    END
    ELSE
    BEGIN
        SET @SortColumn = @PrimaryKey
        SET @SortTable = @TableNames
        SET @SortName = @SortColumn
        SET @Order = @SortColumn
        SET @Operator = ''>=''
    END

    DECLARE @type varchar(50)
    set @type = ''datetime''
    DECLARE @prec int
    SELECT @type=t.name, @prec=c.prec
    FROM sysobjects o 
    JOIN syscolumns c on o.id=c.id
    JOIN systypes t on c.xusertype=t.xusertype
    WHERE o.name = @SortTable AND c.name = @SortName
    IF CHARINDEX(''char'', @type) > 0
    SET @type = @type + ''('' + CAST(@prec AS varchar) + '')''

    DECLARE @TopRows INT
    SET @TopRows = @PageSize * @CurrentPage + 1
    print @TopRows
    print @Operator
    EXEC(''
        DECLARE @SortColumnBegin '' + @type + ''
        SET ROWCOUNT '' + @TopRows + ''
        SELECT @SortColumnBegin='' + @SortColumn + '' FROM  '' + @TableNames + '' '' + @Filter + '' ORDER BY '' + @Order + ''
        SET ROWCOUNT '' + @PageSize + ''
        SELECT '' + @Fields + '' FROM  '' + @TableNames + '' '' + @Filter  + '' AND '' + @SortColumn + '''' + @Operator + ''@SortColumnBegin '' + '' ORDER BY '' + @Order + ''    
    '')    
END




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_PointTrans]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_PointTrans](
	[PID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[UserPoint] [int] NOT NULL,
	[Detail] [nvarchar](1000) NOT NULL,
	[OperDate] [datetime] NOT NULL CONSTRAINT [DF_ZL_PointTrans_OperDate]  DEFAULT (getdate()),
	[Operator] [int] NOT NULL,
 CONSTRAINT [PK_ZL_PointTrans] PRIMARY KEY CLUSTERED 
(
	[PID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'点券事务ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PointTrans', @level2type=N'COLUMN', @level2name=N'PID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PointTrans', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'点数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PointTrans', @level2type=N'COLUMN', @level2name=N'UserPoint'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事由' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PointTrans', @level2type=N'COLUMN', @level2name=N'Detail'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PointTrans', @level2type=N'COLUMN', @level2name=N'OperDate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作人ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PointTrans', @level2type=N'COLUMN', @level2name=N'Operator'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_LabelJude]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_Add]
(
	@TableName nvarchar(50),
	@FieldList nvarchar,
	@FieldValue nvarchar,
	@NodeID int,
	@ModelID int,
	@Title nvarchar,
	@Inputer nvarchar,
	@EliteLevel int,
	@InfoID nvarchar,
	@SpecialID nvarchar,
	@PdfLink nvarchar
)
AS
	EXEC(''Insert Into '' + @TableName + '' ('' + @FieldList + '') values('' + @FieldValue + '')'')
	DECLARE @ItemID int
	Set @ItemID=(select @@IDENTITY AS newID)
	EXEC(
	''Insert Into ZL_CommonModel (NodeID,ModelID,ItemID,Title,Inputer,EliteLevel,InfoID,SpecialID,Titlecolor,PdfLink)
	 Values (''+@NodeID+'',''+@ModelID+'',''+@ItemID+'',''+@Title+'',''+@Inputer+'',''
	 +@EliteLevel+'',''+@InfoID+'',''+@SpecialID+'',''+@PdfLink+'')'')




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Present]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Present](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Prename] [varchar](50) NULL,
	[Pretype] [varchar](50) NULL,
	[procode] [varchar](50) NULL,
	[ShiPrice] [money] NULL,
	[LinPrice] [money] NULL,
	[ProUnit] [varchar](50) NULL,
	[Stock] [int] NULL,
	[StockDown] [int] NULL,
	[Weight] [int] NULL,
	[ServerPeriod] [int] NULL,
	[ServerType] [int] NULL,
	[Preinfo] [text] NULL,
	[precontent] [text] NULL,
	[Clearimg] [varchar](255) NULL,
	[Thumbnails] [varchar](255) NULL,
	[Adduser] [varchar](50) NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Present_Addtime]  DEFAULT (getdate()),
	[Updatetime] [datetime] NULL CONSTRAINT [DF_ZL_Present_Updatetime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Present] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_PrintMode]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_PrintMode](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Control_Width] [int] NULL,
	[Control_Height] [int] NULL,
	[Bg_width] [int] NULL,
	[Bg_Height] [int] NULL,
	[Bg_URL] [varchar](50) NULL,
	[Mode_Type] [varchar](50) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_WapArticle]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_PrintPic]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_PrintPic](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Mode_id] [int] NULL,
	[User_id] [int] NULL,
	[Pic_URL] [varchar](50) NULL,
	[Pic_Compound] [varchar](50) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_ServiceSeat]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_CreateCount]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_CreateCount]
(
	@Count int
)
AS
	Exec(''select top ''+@Count+'' * from ZL_CommonModel Where IsCreate=0 order by GeneralID Desc'')




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Process]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Process](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PName] [varchar](200) NOT NULL,
	[PDepcit] [varchar](5000) NULL,
	[PRole] [varchar](60) NOT NULL,
	[PCode] [int] NOT NULL,
	[PPassName] [varchar](200) NOT NULL,
	[PPassCode] [int] NOT NULL,
	[PNoPassName] [varchar](200) NOT NULL,
	[PNoPassCode] [int] NOT NULL,
	[PFlowId] [int] NOT NULL,
 CONSTRAINT [PK_ZM_Process] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'id'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'步骤名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'步骤描述' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PDepcit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色id' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PRole'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流程步骤序列号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通过审核名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PPassName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'未通过审核名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PNoPassName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'未通过审核码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PNoPassCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流程号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Process', @level2type=N'COLUMN', @level2name=N'PFlowId'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Project]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Project](
	[ProjectID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectName] [nvarchar](255) NOT NULL,
	[ProjectIntro] [ntext] NOT NULL,
	[UserID] [int] NOT NULL,
	[RequireID] [int] NOT NULL CONSTRAINT [DF_ZL_Project_RequireID]  DEFAULT (0),
	[StartDate] [datetime] NOT NULL CONSTRAINT [DF_ZL_Project_StartDate]  DEFAULT (getdate()),
	[EndDate] [datetime] NULL,
	[Status] [int] NULL CONSTRAINT [DF_ZL_Project_Status]  DEFAULT (0),
	[Passed] [bit] NULL CONSTRAINT [DF_ZL_Project_Passed]  DEFAULT (0),
	[ProjectCategoryID] [int] NOT NULL CONSTRAINT [DF_ZL_Project_ProjectCategory]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Project] PRIMARY KEY CLUSTERED 
(
	[ProjectID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Project', @level2type=N'COLUMN', @level2name=N'ProjectCategoryID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ProjectAffairs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ProjectAffairs](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[MainTitleID] [int] NOT NULL CONSTRAINT [DF_ZL_ProjectAffairs_MainTitleID]  DEFAULT (0),
	[SubTitleID] [int] NULL CONSTRAINT [DF_ZL_ProjectAffairs_SubTitleID]  DEFAULT (0),
	[Title] [nvarchar](50) NULL,
	[Content] [ntext] NOT NULL,
	[AuthorID] [int] NOT NULL,
	[AuthorName] [nvarchar](50) NULL,
	[EditTime] [datetime] NULL CONSTRAINT [DF_ZL_ProjectAffairs_EditTime]  DEFAULT (getdate()),
	[LastModifyTime] [datetime] NULL CONSTRAINT [DF_ZL_ProjectAffairs_LastModifyTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ProjectAffairs] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标识' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事务中心主标题事务ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'MainTitleID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'副标题事务回复ID，允许为空' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'SubTitleID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事务标题(回复允许为空)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'Title'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事务内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'Content'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编辑者ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'AuthorID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编辑者名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'AuthorName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发表的日期' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'EditTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后修改时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectAffairs', @level2type=N'COLUMN', @level2name=N'LastModifyTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Permission_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Permission_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Permission]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_Del]
(
	@TableName nvarchar(50),
	@ItemID int,
	@GeneralID int
)
AS
		
	EXEC(''Delete From ''+@TableName +'' Where [ID]=''+@ItemID)	
	EXEC(''Delete From ZL_CommonModel Where GeneralID=''+@GeneralID)




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ProjectCategory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ProjectCategory](
	[ProjectCategoryID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectCategoryName] [nvarchar](50) NOT NULL,
	[ProjectCategoryIntro] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_ProjectCategory] PRIMARY KEY CLUSTERED 
(
	[ProjectCategoryID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_LabelJude]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_Read]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_Read]
(
	@TableName nvarchar(100),
	@ItemID int
)
AS
	DECLARE @SqlID nvarchar(500)
	Set @SqlID=CAST(@ItemID as nvarchar)
	EXEC (''Select * From ''+@TableName +'' Where ID=''+@SqlID)




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ProjectDiscuss]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ProjectDiscuss](
	[DiscussID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectID] [int] NOT NULL,
	[WorkID] [int] NOT NULL CONSTRAINT [DF_ZL_ProjectDiscuss_WorkID]  DEFAULT (0),
	[UserID] [int] NOT NULL CONSTRAINT [DF_ZL_ProjectDiscuss_UserID]  DEFAULT (0),
	[Content] [ntext] NOT NULL,
	[DiscussDate] [datetime] NOT NULL CONSTRAINT [DF_ZL_ProjectDiscuss_DiscussDate]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ProjectDiscuss] PRIMARY KEY CLUSTERED 
(
	[DiscussID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ProjectField]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ProjectField](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectID] [int] NOT NULL,
	[FieldName] [nvarchar](100) NOT NULL,
	[Alias] [nvarchar](100) NOT NULL,
	[Type] [varchar](50) NOT NULL,
	[FieldValue] [ntext] NOT NULL,
 CONSTRAINT [PK_ZL_ProjectField] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_WapArticle]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ProjectWork]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ProjectWork](
	[WorkID] [int] IDENTITY(1,1) NOT NULL,
	[WorkName] [nvarchar](255) NOT NULL,
	[WorkIntro] [ntext] NOT NULL,
	[ProjectID] [int] NOT NULL,
	[Approving] [int] NULL CONSTRAINT [DF_ZL_ProjectWork_Approving]  DEFAULT (0),
	[Status] [int] NULL CONSTRAINT [DF_ZL_ProjectWork_Status]  DEFAULT (0),
	[EndDate] [datetime] NOT NULL,
 CONSTRAINT [PK_ZL_ProjectWork] PRIMARY KEY CLUSTERED 
(
	[WorkID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'客户满意度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ProjectWork', @level2type=N'COLUMN', @level2name=N'Approving'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MTit]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_WapNode]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Promotions]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Promotions](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Promoname] [varchar](255) NULL,
	[Promostart] [datetime] NULL,
	[Promoend] [datetime] NULL,
	[Pricetop] [money] NULL,
	[Priceend] [money] NULL,
	[AddUser] [varchar](50) NULL,
	[Integral] [int] NULL CONSTRAINT [DF_ZL_Promotions_Integral]  DEFAULT (0),
	[GetPresent] [int] NULL CONSTRAINT [DF_ZL_Promotions_GetPresent]  DEFAULT (0),
	[Presentmoney] [money] NULL,
	[IntegralTure] [int] NULL CONSTRAINT [DF_ZL_Promotions_IntegralTure]  DEFAULT (0),
	[PromoProlist] [varchar](255) NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Promotions_Addtime]  DEFAULT (getdate()),
	[TureUser] [varchar](50) NULL,
 CONSTRAINT [PK_ZL_Promotions] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'促销名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Promoname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'起始时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Promostart'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Promoend'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格上限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Pricetop'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格下限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Priceend'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'AddUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Integral'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'可以得到礼品' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'GetPresent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'兑换金钱数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Presentmoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'可以得到积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'IntegralTure'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'礼品名称列表' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'PromoProlist'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加作者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Promotions', @level2type=N'COLUMN', @level2name=N'TureUser'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Seach](
	[Seachid] [int] IDENTITY(1,1) NOT NULL,
	[SeachName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[SeachTable] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[SeachFild] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[SeachDirName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[SeachAddTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_Seach_SeachAddTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Seach] PRIMARY KEY CLUSTERED 
(
	[Seachid] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'检索名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Seach', @level2type=N'COLUMN', @level2name=N'SeachName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'检索表名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Seach', @level2type=N'COLUMN', @level2name=N'SeachTable'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'检索列' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Seach', @level2type=N'COLUMN', @level2name=N'SeachFild'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'全文目录名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Seach', @level2type=N'COLUMN', @level2name=N'SeachDirName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Seach', @level2type=N'COLUMN', @level2name=N'SeachAddTime'

GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Pub]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Pub](
	[Pubid] [int] IDENTITY(1,1) NOT NULL,
	[PubName] [nvarchar](255) NULL,
	[PubClass] [int] NULL CONSTRAINT [DF_ZL_Pub_PubClass]  DEFAULT (0),
	[PubTableName] [nvarchar](255) NULL,
	[PubType] [int] NULL CONSTRAINT [DF_ZL_Pub_PubType]  DEFAULT (0),
	[PubOneOrMore] [int] NULL CONSTRAINT [DF_ZL_Pub_PubOneOrMore]  DEFAULT (0),
	[PubIPOneOrMore] [int] NULL,
	[PubTemplate] [nvarchar](1000) NULL,
	[PubLoadstr] [nvarchar](1000) NULL,
	[PubModelID] [int] NULL CONSTRAINT [DF_ZL_Pub_PubModelID]  DEFAULT (0),
	[PubNodeID] [nvarchar](1000) NULL CONSTRAINT [DF_ZL_Pub_PubNodeID]  DEFAULT (0),
	[PubTemplateID] [nvarchar](1000) NULL CONSTRAINT [DF_ZL_Pub_PubTemplateID]  DEFAULT (0),
	[Pubinfo] [ntext] NULL,
	[PubIsTrue] [int] NULL CONSTRAINT [DF_ZL_Pub_PubIsTrue]  DEFAULT (0),
	[PubCode] [int] NULL CONSTRAINT [DF_ZL_Pub_PubPubCode]  DEFAULT (0),
	[PubLogin] [int] NULL CONSTRAINT [DF_ZL_Pub_PubNeedReg]  DEFAULT (0),
	[PubAddnum] [int] NULL CONSTRAINT [DF_ZL_Pub_PubAddnum]  DEFAULT (0),
	[PubBindPub] [int] NULL,
	[PubShowType] [int] NULL CONSTRAINT [DF_ZL_Pub_PubShowType]  DEFAULT (0),
	[PubInputTM] [nvarchar](1000) NULL,
	[PubInputLoadStr] [nvarchar](255) NULL,
	[PubCreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Pub_PubCreateTime]  DEFAULT (getdate()),
	[PubLoginUrl] [nvarchar](255) NULL,
	[PubOpenComment] [int] NULL,
	[PubEndTime] [datetime] NULL,
	[PubIsDel] [int] NULL CONSTRAINT [DF_ZL_Pub_PubIsDel]  DEFAULT (0),
	[PubTimeSlot] [int] NULL CONSTRAINT [DF_ZL_Pub_PubTimeSlot]  DEFAULT (10),
	[Pubkeep] [int] NULL CONSTRAINT [DF_ZL_Pub_Pubkeep]  DEFAULT (7),
	[Puberrmsg] [nvarchar](1000) NULL,
	[PubGourl] [nvarchar](1000) NULL,
	[PubSiteID] [int] NULL CONSTRAINT [DF_ZL_Pub_PubSiteID]  DEFAULT (0),
	[Public] [int] NULL CONSTRAINT [DF_ZL_Pub_Public]  DEFAULT ((1)),
 CONSTRAINT [PK_ZL_Pub] PRIMARY KEY CLUSTERED 
(
	[Pubid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'互动ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'Pubid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'互动名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信息类别(0-内容 1-商城 2-黄页 3-店铺)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubClass'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'互动数据表名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubTableName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'互动类型(0-评论 1-投票 2-活动 3-留言 4-问券调查 5-通用统计)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否多条(0-无限制 1-每人限一条)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubOneOrMore'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'重复IP提交信息次数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubIPOneOrMore'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模板地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubTemplate'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'调用字符' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubLoadstr'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubModelID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubNodeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'黄页节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubTemplateID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'Pubinfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否需要审核(0-不需要 1-需要审核)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubIsTrue'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否需要验证码(0-不需要 1-需要)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否需要登陆(0-不需要 1-需要)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubLogin'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参与人数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubAddnum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'绑定互动' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubBindPub'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投票显示方式(0-传统 1-柱状 2-圆形)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubShowType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提交窗口模板' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubInputTM'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'调用提交窗口代码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubInputLoadStr'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubCreateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设置登陆地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubLoginUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否开启评论' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubOpenComment'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubEndTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否被删除 1-删除' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubIsDel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'间隔时间，单位秒' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubTimeSlot'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'保留天数信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'Pubkeep'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新跳转地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubGourl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'站点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'PubSiteID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公开' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Pub', @level2type=N'COLUMN', @level2name=N'Public'

GO

SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_UpDate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_UpDate]
(
	@TableName nvarchar(50),
	@FieldSet nvarchar,
	@Title nvarchar,
	@EliteLevel int,
	@InfoID nvarchar,
	@SpecialID nvarchar,
	@ItemID int,
	@GeneralID int,
	@PdfLink nvarchar(500)
)
AS
		
	EXEC(''Update ''+@TableName +'' Set ''+@FieldSet +'' Where [ID]=''+@ItemID)	
	EXEC(''Update ZL_CommonModel Set Title=''+@Title+'',EliteLevel=''+@EliteLevel+'',InfoID=''+@InfoID+'',SpecialID=''+@SpecialID+'',PdfLink=''+@PdfLink+'' Where GeneralID=''+@GeneralID)




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Question]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Question](
	[Qid] [int] IDENTITY(1,1) NOT NULL,
	[Surveyid] [int] NOT NULL,
	[Typeid] [int] NULL CONSTRAINT [DF_ZL_Question_Typeid]  DEFAULT (1),
	[Qtitle] [varchar](50) NULL,
	[Qcontent] [text] NULL,
	[Orderid] [int] NULL CONSTRAINT [DF_ZL_Question_Orderid]  DEFAULT (0),
	[QuestionCreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Question_QuestionCreateTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Question] PRIMARY KEY CLUSTERED 
(
	[Qid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ReadResume]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ReadResume](
	[RID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NOT NULL,
	[ResumeID] [int] NOT NULL,
	[ReadTime] [datetime] NULL CONSTRAINT [DF_ZL_ReadResume_ReadTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ReadResume] PRIMARY KEY CLUSTERED 
(
	[RID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ReadResume', @level2type=N'COLUMN', @level2name=N'RID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'阅读人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ReadResume', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'简历ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ReadResume', @level2type=N'COLUMN', @level2name=N'ResumeID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'阅读时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ReadResume', @level2type=N'COLUMN', @level2name=N'ReadTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Permission_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Permission_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[RoleName],
	[RoleImg],
	[Info],
	[Nodelist],
	[Pagelist],
	[Fieldlist],
	[Datalist],
	[UserGroup],
	[Precedence],
	[IsTrue]
FROM
	[dbo].[ZL_Permission]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Regproject]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Regproject](
	[Regprojectid] [int] IDENTITY(1,1) NOT NULL,
	[RegprojectName] [nvarchar](255) NOT NULL,
	[Needinput] [ntext] NULL,
	[Optinput] [ntext] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Regproject_Addtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Regproject] PRIMARY KEY CLUSTERED 
(
	[Regprojectid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册方案名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Regproject', @level2type=N'COLUMN', @level2name=N'RegprojectName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'必填字段' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Regproject', @level2type=N'COLUMN', @level2name=N'Needinput'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选添字段' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Regproject', @level2type=N'COLUMN', @level2name=N'Optinput'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Regproject', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Result]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Result](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Result] [varchar](2000) NULL,
	[ResultTime] [datetime] NULL,
	[ProblemID] [int] NULL,
	[UserID] [int] NULL,
 CONSTRAINT [PK_ZL_Result] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'答案' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Result', @level2type=N'COLUMN', @level2name=N'Result'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回答时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Result', @level2type=N'COLUMN', @level2name=N'ResultTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'问题ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Result', @level2type=N'COLUMN', @level2name=N'ProblemID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Result', @level2type=N'COLUMN', @level2name=N'UserID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_ShopCompete]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_CustomerService]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Role]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Role](
	[RoleID] [int] IDENTITY(1,1) NOT NULL,
	[RoleName] [nvarchar](50) NOT NULL,
	[Description] [nvarchar](255) NULL,
	[NodeID] [int] NULL,
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Role', @level2type=N'COLUMN', @level2name=N'RoleID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Role', @level2type=N'COLUMN', @level2name=N'RoleName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色描述' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Role', @level2type=N'COLUMN', @level2name=N'Description'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色所属节点' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Role', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MTit]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_WapNode]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_RolePermissions]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_RolePermissions](
	[RoleID] [int] NOT NULL,
	[OperateCode] [nvarchar](50) NOT NULL,
	[NodeID] [int] NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作代码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RolePermissions', @level2type=N'COLUMN', @level2name=N'OperateCode'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MailIdiograph]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_WapOrder]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_RoomActive]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_RoomActive](
	[AID] [int] IDENTITY(1,1) NOT NULL,
	[ActiveUserID] [int] NULL,
	[ActiveTitle] [nvarchar](225) NULL,
	[ActiveContext] [nvarchar](4000) NULL,
	[ActiveStateTime] [datetime] NULL,
	[ActiveEndTime] [datetime] NULL,
	[ActiveAddTime] [datetime] NULL,
	[ActivePic] [nvarchar](200) NULL,
	[RoomID] [int] NULL,
 CONSTRAINT [PK_Active] PRIMARY KEY CLUSTERED 
(
	[AID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动发起人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActiveUserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActiveTitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActiveContext'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动开始时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActiveStateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动结束时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActiveEndTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActiveAddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动图片' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'ActivePic'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActive', @level2type=N'COLUMN', @level2name=N'RoomID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_RoomActiveJoin]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_RoomActiveJoin](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ActiveID] [int] NULL,
	[UserID] [int] NULL,
	[UserName] [nvarchar](255) NULL,
	[AddTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_RoomActiveJoin] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'活动ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActiveJoin', @level2type=N'COLUMN', @level2name=N'ActiveID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参与用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActiveJoin', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActiveJoin', @level2type=N'COLUMN', @level2name=N'UserName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomActiveJoin', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_RoomMessage]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_RoomMessage](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[SendID] [int] NULL,
	[InceptID] [int] NULL,
	[Mcontent] [text] NULL,
	[Addtime] [datetime] NULL,
	[RestoreID] [int] NULL,
	[State] [int] NULL,
 CONSTRAINT [PK_ZL_RoomMessage] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'留言者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomMessage', @level2type=N'COLUMN', @level2name=N'SendID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被留言者' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomMessage', @level2type=N'COLUMN', @level2name=N'InceptID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomMessage', @level2type=N'COLUMN', @level2name=N'Mcontent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomMessage', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回复ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomMessage', @level2type=N'COLUMN', @level2name=N'RestoreID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0为正常 1为删除' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomMessage', @level2type=N'COLUMN', @level2name=N'State'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_RoomNotify]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_RoomNotify](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[NotifyTitle] [nvarchar](200) NULL,
	[NotifyContext] [nvarchar](1000) NULL,
	[AddTime] [datetime] NULL,
	[RoomID] [int] NULL,
	[UserID] [int] NULL,
 CONSTRAINT [PK_RoomNotify] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通知标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomNotify', @level2type=N'COLUMN', @level2name=N'NotifyTitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通知内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomNotify', @level2type=N'COLUMN', @level2name=N'NotifyContext'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomNotify', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomNotify', @level2type=N'COLUMN', @level2name=N'RoomID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomNotify', @level2type=N'COLUMN', @level2name=N'UserID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_RoomUpFile]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_RoomUpFile](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FileName] [nvarchar](100) NULL,
	[UpFileUrl] [nvarchar](300) NULL,
	[Course] [nvarchar](10) NULL,
	[UserType] [int] NULL,
	[FileType] [int] NULL,
	[UserID] [int] NULL,
	[RoomID] [int] NULL,
	[UpDateTime] [datetime] NULL,
	[FileState] [int] NULL,
 CONSTRAINT [PK_ZL_RoomUpFile] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'FileName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传路径' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'UpFileUrl'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'课程' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'Course'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户类别 1：老师，2：学生' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'UserType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传文件类型 1：试题，2：作业' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'FileType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'班级ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'RoomID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上传时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'UpDateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件状态 1：可下载，2：不可下载：3：待审核' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_RoomUpFile', @level2type=N'COLUMN', @level2name=N'FileState'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_ShopCompete]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_CustomerService]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Scheme]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Scheme](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[SName] [nvarchar](255) NULL,
	[SStartTime] [datetime] NULL,
	[SEndTime] [datetime] NULL,
	[SList] [nvarchar](50) NULL,
	[SAddTime] [datetime] NULL,
	[SType] [int] NULL,
 CONSTRAINT [PK_ZL_Scheme] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'方案名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Scheme', @level2type=N'COLUMN', @level2name=N'SName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'方案有效期开始时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Scheme', @level2type=N'COLUMN', @level2name=N'SStartTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'方案有效期结束时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Scheme', @level2type=N'COLUMN', @level2name=N'SEndTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'方案商品列表' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Scheme', @level2type=N'COLUMN', @level2name=N'SList'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Scheme', @level2type=N'COLUMN', @level2name=N'SAddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'打折类型，1：按商品分类，2：按商品类型分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Scheme', @level2type=N'COLUMN', @level2name=N'SType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_DChat]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_SchemeInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_SchemeInfo](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[SIULimit] [int] NULL,
	[SILLimit] [int] NULL,
	[SIAgio] [int] NULL,
	[SID] [int] NULL,
	[SIAddTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_SchemeInfo] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量上限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SchemeInfo', @level2type=N'COLUMN', @level2name=N'SIULimit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量下限' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SchemeInfo', @level2type=N'COLUMN', @level2name=N'SILLimit'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'折扣' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SchemeInfo', @level2type=N'COLUMN', @level2name=N'SIAgio'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'方案ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SchemeInfo', @level2type=N'COLUMN', @level2name=N'SID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SchemeInfo', @level2type=N'COLUMN', @level2name=N'SIAddTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MailIdiograph]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_WapOrder]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_School]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_School](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[SchoolName] [nvarchar](255) NULL,
	[Country] [nvarchar](255) NULL,
	[Province] [nvarchar](255) NULL,
	[SchoolType] [int] NULL,
	[Visage] [int] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_School_Addtime]  DEFAULT (getdate()),
	[SchoolInfo] [ntext] NULL,
 CONSTRAINT [PK_ZL_School] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'SchoolName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'国家' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'Country'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'省份' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'Province'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校类型(1-小学 2-中学 3-大学 4-其他)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'SchoolType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校面貌(1-公办 2-私立)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'Visage'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学校说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_School', @level2type=N'COLUMN', @level2name=N'SchoolInfo'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MailInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ServiceSeat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ServiceSeat](
	[S_ID] [int] IDENTITY(1,1) NOT NULL,
	[S_Name] [nvarchar](50) NULL,
	[S_AdminID] [int] NULL,
	[S_DateTime] [nvarchar](50) NULL,
	[S_Index] [int] NULL,
	[S_Remrk] [nvarchar](500) NULL,
 CONSTRAINT [PK_ZL_ServiceSeat] PRIMARY KEY CLUSTERED 
(
	[S_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'席位名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ServiceSeat', @level2type=N'COLUMN', @level2name=N'S_Name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员编号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ServiceSeat', @level2type=N'COLUMN', @level2name=N'S_AdminID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设置时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ServiceSeat', @level2type=N'COLUMN', @level2name=N'S_DateTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示索引' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ServiceSeat', @level2type=N'COLUMN', @level2name=N'S_Index'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ServiceSeat', @level2type=N'COLUMN', @level2name=N'S_Remrk'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ShopBrand]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ShopBrand](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[BrandName] [nvarchar](255) NULL,
	[Nodeid] [nvarchar](255) NULL,
	[Orders] [int] NOT NULL,
	[IsTrue] [bit] NOT NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'品牌名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopBrand', @level2type=N'COLUMN', @level2name=N'BrandName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属节点分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopBrand', @level2type=N'COLUMN', @level2name=N'Nodeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排列顺序' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopBrand', @level2type=N'COLUMN', @level2name=N'Orders'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopBrand', @level2type=N'COLUMN', @level2name=N'IsTrue'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ShopCommentary]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ShopCommentary](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ComType] [int] NULL,
	[Comtitle] [nvarchar](255) NULL,
	[Storeid] [int] NULL,
	[CUserid] [int] NULL,
	[COrderid] [int] NULL,
	[ComContent] [ntext] NULL,
	[ComUser] [nvarchar](100) NULL,
	[Proid] [int] NULL,
	[ProName] [nvarchar](255) NULL,
	[Istopic] [bit] NOT NULL,
	[Putip] [nvarchar](255) NULL,
	[Addtime] [datetime] NULL,
	[ComOption] [int] NULL,
	[Istrue] [bit] NULL,
	[Comid] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论类型 商品评论=0;用户评论=1;交易评论=2' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'ComType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论标题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Comtitle'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'受评店铺ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Storeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'受评论用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'CUserid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'受评论交易ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'COrderid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'ComContent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发表用户' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'ComUser'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Proid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'ProName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为话题 0-非话题　1-话题' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Istopic'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布IP地址' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Putip'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论选项：好评，中评，差评' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'ComOption'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属评论ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCommentary', @level2type=N'COLUMN', @level2name=N'Comid'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ShopCompete]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ShopCompete](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ProID] [int] NULL,
	[PMoney] [money] NULL,
	[AddTime] [datetime] NULL,
	[UserID] [int] NULL,
	[ShopType] [int] NULL,
	[ShopNum] [int] NULL,
 CONSTRAINT [PK_ZL_ShopCompete] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCompete', @level2type=N'COLUMN', @level2name=N'ProID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'竞拍价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCompete', @level2type=N'COLUMN', @level2name=N'PMoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'竞拍时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCompete', @level2type=N'COLUMN', @level2name=N'AddTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCompete', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买类型  1：团购，2：竞拍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCompete', @level2type=N'COLUMN', @level2name=N'ShopType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopCompete', @level2type=N'COLUMN', @level2name=N'ShopNum'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ShopGrade]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ShopGrade](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[GradeName] [nvarchar](255) NULL,
	[Gradeimg] [nvarchar](255) NULL,
	[CommentNum] [int] NOT NULL,
	[OtherName] [nvarchar](255) NULL,
	[Istrue] [bit] NULL,
	[GradeType] [int] NOT NULL,
	[Imgnum] [int] NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'等级名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'GradeName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'等级图片' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'Gradeimg'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'积分' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'CommentNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'等级别名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'OtherName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启用状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'Istrue'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'等级类型 0-购物等级,1-卖家等级,2-商户等级' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'GradeType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图片数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopGrade', @level2type=N'COLUMN', @level2name=N'Imgnum'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_DChat]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ShopLable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ShopLable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[LableName] [nvarchar](255) NULL,
	[LableType] [int] NULL,
	[LableContent] [ntext] NULL,
	[LableInfo] [nvarchar](255) NULL,
	[IsTrue] [bit] NULL,
	[LableClass] [nvarchar](50) NULL,
	[Separator] [nvarchar](255) NULL CONSTRAINT [DF_ZL_ShopLable_Separator]  DEFAULT (''),
	[Initial] [int] NULL CONSTRAINT [DF_ZL_ShopLable_Initial]  DEFAULT (1),
	[Derive] [nvarchar](255) NULL,
	[Fildsinfo] [nvarchar](1000) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'LableName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签类型(0-用户标签 1-系统标签)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'LableType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'LableContent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'LableInfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'IsTrue'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标签种类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'LableClass'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分割符' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'Separator'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'初始计算值' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'Initial'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'派生标签' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'Derive'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'参数说明' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopLable', @level2type=N'COLUMN', @level2name=N'Fildsinfo'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_DShowUser_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_DShowUser]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_ShopNodeinfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_ShopNodeinfo](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Nodeid] [int] NULL,
	[NodeName] [nvarchar](255) NULL,
	[Incorporation] [bit] NOT NULL,
	[Auction] [bit] NOT NULL,
	[Warehouse] [bit] NOT NULL,
	[Comment] [bit] NOT NULL,
	[PageNum] [int] NOT NULL,
	[ShowType] [int] NOT NULL,
	[Anonymity] [bit] NOT NULL,
	[Pointcard] [bit] NOT NULL,
	[Dummymoney] [bit] NOT NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Nodeid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'节点名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'NodeName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许发布团购' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Incorporation'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许发布竞拍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Auction'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许自动上架' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Warehouse'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许评论' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Comment'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'每页显示数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'PageNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'默认显示模式 0-列表，1-平铺，2-文字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'ShowType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许匿名购买' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Anonymity'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许使用点卡' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Pointcard'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许使用虚拟货币' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_ShopNodeinfo', @level2type=N'COLUMN', @level2name=N'Dummymoney'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MailInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Shopconfig]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Shopconfig](
	[IsOpen] [bit] NOT NULL,
	[BankInfo] [ntext] NULL,
	[Anonymity] [bit] NOT NULL,
	[Pointcard] [bit] NOT NULL,
	[Dummymoney] [bit] NOT NULL,
	[Comment] [bit] NOT NULL,
	[Goodpl] [int] NULL,
	[Centerpl] [int] NULL,
	[Badpl] [int] NULL,
	[Auditing] [int] NULL CONSTRAINT [DF_ZL_Shopconfig_Auditing]  DEFAULT (0)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启用多用户商城' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopconfig', @level2type=N'COLUMN', @level2name=N'IsOpen'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'银行接口信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopconfig', @level2type=N'COLUMN', @level2name=N'BankInfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许匿名购买' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopconfig', @level2type=N'COLUMN', @level2name=N'Anonymity'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许使用点卡' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopconfig', @level2type=N'COLUMN', @level2name=N'Pointcard'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许使用虚拟货币' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopconfig', @level2type=N'COLUMN', @level2name=N'Dummymoney'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'允许评论' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopconfig', @level2type=N'COLUMN', @level2name=N'Comment'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MailManage]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Shopsearch]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Shopsearch](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Searchkey] [nvarchar](255) NULL,
	[SearchNum] [int] NULL,
	[Commend] [int] NULL,
	[SearchTime] [datetime] NULL,
	[Class] [nvarchar](255) NULL,
	[Showtop] [bit] NULL
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'搜索关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopsearch', @level2type=N'COLUMN', @level2name=N'Searchkey'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'搜索次数' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopsearch', @level2type=N'COLUMN', @level2name=N'SearchNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopsearch', @level2type=N'COLUMN', @level2name=N'Commend'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'搜索时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopsearch', @level2type=N'COLUMN', @level2name=N'SearchTime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Shopsearch', @level2type=N'COLUMN', @level2name=N'Class'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_Active]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_Active](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[ActiveManage] [uniqueidentifier] NULL,
	[ActiveTitle] [varchar](100) NULL,
	[TypeID] [uniqueidentifier] NULL,
	[ActiveStarttime] [datetime] NULL,
	[ActiveEndtime] [datetime] NULL,
	[ActiveAddress] [varchar](100) NULL,
	[ActiveContent] [text] NULL,
	[ActiveJoinType] [int] NULL,
	[ActiveOther] [int] NULL,
	[ActiveAddtime] [datetime] NULL,
	[ActivePic] [varchar](100) NULL,
 CONSTRAINT [PK_ZL_Sns_Active] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ActiveJoin]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ActiveJoin](
	[ID] [uniqueidentifier] NOT NULL,
	[ActiveID] [uniqueidentifier] NULL,
	[UserID] [int] NULL,
	[JoinState] [int] NULL,
	[JoinAddtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_ActiveJoin] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ActivePic]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ActivePic](
	[ID] [uniqueidentifier] NOT NULL,
	[ActiveID] [uniqueidentifier] NULL,
	[PicUrl] [varchar](100) NULL,
	[PicAddtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_ActivePic] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddFieldToTable]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddFieldToTable]
@TableName nvarchar(50),
@FieldName nvarchar(50),
@FieldType nvarchar(50),
@DefaultValue nvarchar(150)
AS
	declare @sqlstr nvarchar(1000)
	
	if(@FieldType=''nvarchar'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] nvarchar(255) DEFAULT (''''''+@DefaultValue+'''''')''
	else if(@FieldType=''varchar'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] varchar(255) DEFAULT (''''''+@DefaultValue+'''''')''
	else if(@FieldType=''ntext'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] ntext DEFAULT (''''''+@DefaultValue+'''''')''
	else if(@FieldType=''int'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] int DEFAULT (0)''
	else if(@FieldType=''bit'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] bit DEFAULT (0)''
	else if(@FieldType=''char'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] char(10)''
	else if(@FieldType=''datetime'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] datetime DEFAULT (getdate())''
	else if(@FieldType=''decimal'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] decimal(8)''
	else if(@FieldType=''money'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] money''
	else if(@FieldType=''nchar'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] nchar(10)''
	else if(@FieldType=''bit'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] bit DEFAULT (0)''
	else if(@FieldType=''text'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] text''	
	else if(@FieldType=''float'')
		set @sqlstr = ''ALTER TABLE [''+@TableName+''] ADD [''+@FieldName+''] float(8)''
execute sp_executesql @sqlstr




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ActiveType]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ActiveType](
	[ID] [uniqueidentifier] NOT NULL,
	[TypeName] [varchar](20) NULL,
 CONSTRAINT [PK_ZL_Sns_ActiveType] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_DShowUser_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_DShowUser]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_AddRessList]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_BlogStyleTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_BlogStyleTable](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[StyleName] [varchar](50) NULL,
	[Author] [varchar](50) NULL,
	[StylePic] [varchar](255) NULL,
	[Addtime] [datetime] NULL,
	[StyleState] [int] NULL,
	[UserIndexStyle] [varchar](255) NULL,
	[LogStyle] [varchar](255) NULL,
	[LogShowStyle] [varchar](255) NULL,
	[PhotoStyle] [varchar](255) NULL,
	[PhotoShowStyle] [varchar](255) NULL,
	[PicShowStyle] [varchar](255) NULL,
	[GroupStyle] [varchar](255) NULL,
	[GroupShowStyle] [varchar](255) NULL,
	[GroupTopicShow] [varchar](255) NULL,
 CONSTRAINT [PK_ZL_Sns_BlogStyleTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Daffiche]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_BookTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_BookTable](
	[ID] [uniqueidentifier] NOT NULL,
	[BookTitle] [varchar](100) NULL,
	[BookOtherTitle] [varchar](100) NULL,
	[BookAnthor] [varchar](20) NULL,
	[BookIsbn] [varchar](100) NULL,
	[BookPrice] [smallmoney] NULL,
	[BookConcerm] [varchar](100) NULL,
	[BookYear] [varchar](10) NULL,
	[Bookurl] [varchar](100) NULL,
	[BookContent] [text] NULL,
	[BookState] [int] NULL,
	[BookAddtime] [datetime] NULL,
	[Uid] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_BookTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MailManage]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_CarConfig]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_CarConfig](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[CKey] [varchar](50) NULL,
	[Ctext] [varchar](100) NULL,
	[Cvalue] [varchar](100) NULL,
 CONSTRAINT [PK_ZL_Sns_CarConfig] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_CarLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_CarLog](
	[Plid] [int] IDENTITY(1,1) NOT NULL,
	[P_uid] [int] NULL CONSTRAINT [DF_ZL_Sns_CarLog_P_uid]  DEFAULT (null),
	[P_type] [int] NULL CONSTRAINT [DF_ZL_Sns_CarLog_P_type]  DEFAULT (null),
	[P_content] [varchar](500) NULL,
	[P_introtime] [datetime] NULL CONSTRAINT [DF_ZL_Sns_CarLog_P_introtime]  DEFAULT (null),
 CONSTRAINT [PK_ZL_Sns_CarLog] PRIMARY KEY NONCLUSTERED 
(
	[Plid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_Carlist]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_Carlist](
	[Pid] [int] IDENTITY(1,1) NOT NULL,
	[P_car_name] [varchar](50) NULL,
	[P_car_num] [int] NULL CONSTRAINT [DF_ZL_Sns_Carlist_P_car_num]  DEFAULT (0),
	[P_car_surplus] [int] NULL,
	[P_car_money] [int] NULL,
	[P_car_old] [int] NULL,
	[P_car_img] [varchar](100) NULL,
	[P_car_img_logo] [varchar](100) NULL,
	[P_car_content] [varchar](500) NULL,
	[P_car_check] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_Carlist] PRIMARY KEY NONCLUSTERED 
(
	[Pid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_ChatLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_ChatLog](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](50) NULL,
	[Sex] [varchar](50) NULL,
	[ChatContent] [ntext] NULL,
	[Addtime] [datetime] NULL,
	[ByID] [int] NULL,
	[ChatType] [varchar](50) NULL,
 CONSTRAINT [PK_ZL_Sns_ChatLog] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_CollectTable]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_CollectTable](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[CbyID] [uniqueidentifier] NULL,
	[Cbytype] [int] NULL,
	[Cstate] [int] NULL,
	[CAddtime] [datetime] NULL,
	[LabelName] [text] NULL,
 CONSTRAINT [PK_ZL_Sns_CollectTable] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_AddRessList]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_CommendCommentOn]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_CommendCommentOn](
	[ID] [uniqueidentifier] NOT NULL,
	[CommentOnUserID] [int] NULL,
	[CommentOnContext] [varchar](3000) NULL,
	[CommentOnTime] [datetime] NULL,
	[CommentID] [uniqueidentifier] NULL,
 CONSTRAINT [PK_ZL_Sns_CommendCommentOn] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Daffiche]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AnswerRe_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_AnswerRe_Add]
(
@SID int,
@UserID int,
@SubmitIP nvarchar(50),
@SubmitDate datetime
)
AS


DECLARE @str varchar	

        insert into ZL_Answer_Recode (SID,UserID,SubmitIP,SubmitDate)values(
         @SID,         
         @UserID,         
         @SubmitIP,
         @SubmitDate)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_CommentAll]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_CommentAll](
	[ID] [uniqueidentifier] NOT NULL,
	[Ctitle] [varchar](100) NULL,
	[UserID] [int] NULL,
	[Ccontent] [text] NULL,
	[CbyID] [uniqueidentifier] NULL,
	[Caddtime] [datetime] NULL,
	[CbyType] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_CommentAll] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Dbooth]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_FileShare]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_FileShare](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[FactFileName] [varchar](50) NULL,
	[BuildFileName] [varchar](50) NULL,
	[FileURL] [varchar](200) NULL,
	[DownCount] [int] NULL,
	[CreatTime] [datetime] NULL,
	[FileSize] [int] NULL,
	[GSID] [uniqueidentifier] NULL,
	[Mono] [varchar](50) NULL,
 CONSTRAINT [PK_ZL_Sns_FileShare] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_GSHuatee]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_GSHuatee](
	[ID] [uniqueidentifier] NOT NULL,
	[GSID] [uniqueidentifier] NULL,
	[UserID] [int] NULL,
	[ReadCount] [int] NULL,
	[RevertCount] [int] NULL,
	[HuaTeeContent] [varchar](2000) NULL,
	[HuaTeeTitle] [varchar](50) NULL,
	[CreatTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_GSHuatee] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_GSReverCricicism]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_GSReverCricicism](
	[ID] [uniqueidentifier] NOT NULL,
	[HuaTeePicID] [uniqueidentifier] NULL,
	[UserID] [int] NULL,
	[Content] [varchar](200) NULL,
	[CreatTime] [datetime] NULL,
	[Flage] [int] NULL,
	[Taxis] [int] NULL,
	[IsRead] [bit] NULL,
 CONSTRAINT [PK_ZL_Sns_GSReverCricicism] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_LinkName](
	[ID] [int] IDENTITY(1,1) NOT FOR REPLICATION NOT NULL,
	[Linkname] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Lkeyword] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Lwindows] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Lstate] [int] NULL,
 CONSTRAINT [PK_ZL_LinkName_1] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LinkName', @level2type=N'COLUMN', @level2name=N'Linkname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LinkName', @level2type=N'COLUMN', @level2name=N'Lkeyword'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接状态' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_LinkName', @level2type=N'COLUMN', @level2name=N'Lstate'

GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MiUserInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_GSRoom]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_GSRoom](
	[ID] [uniqueidentifier] NULL,
	[GSID] [uniqueidentifier] NULL,
	[RoomSize] [float] NULL,
	[UseSize] [float] NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_AdZone]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_AdZone](
	[ZoneID] [int] NOT NULL,
	[ZoneName] [nvarchar](100) NULL,
	[ZoneJSName] [nvarchar](100) NULL,
	[ZoneIntro] [nvarchar](255) NULL,
	[ZoneType] [int] NULL CONSTRAINT [DF_ZL_AdZone_ZoneType]  DEFAULT (0),
	[DefaultSetting] [bit] NOT NULL CONSTRAINT [DF_ZL_AdZone_DefaultSetting]  DEFAULT (1),
	[ZoneSetting] [nvarchar](255) NULL,
	[ZoneWidth] [int] NULL CONSTRAINT [DF_ZL_AdZone_ZoneWidth]  DEFAULT (0),
	[ZoneHeight] [int] NULL CONSTRAINT [DF_ZL_AdZone_ZoneHeight]  DEFAULT (0),
	[Active] [bit] NOT NULL CONSTRAINT [DF_ZL_AdZone_Active]  DEFAULT (0),
	[ShowType] [int] NULL CONSTRAINT [DF_ZL_AdZone_ShowType]  DEFAULT (0),
	[UpdateTime] [datetime] NOT NULL CONSTRAINT [DF_ZL_AdZone_UpdateTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_AdZone] PRIMARY KEY CLUSTERED 
(
	[ZoneID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'JS文件名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ZoneJSName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版位介绍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ZoneIntro'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版位类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ZoneType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否默认设置' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'DefaultSetting'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'具体自定义设置信息' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ZoneSetting'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版位宽度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ZoneWidth'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'版位高度' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ZoneHeight'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否活动' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'Active'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示方式' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'ShowType'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AdZone', @level2type=N'COLUMN', @level2name=N'UpdateTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_GSType]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_GSType](
	[ID] [uniqueidentifier] NULL,
	[GSTypeName] [varchar](30) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_AddRessList]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_AddRessList](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[AddRessContext] [nvarchar](4000) NULL,
 CONSTRAINT [PK_ZL_AddRessList] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AddRessList', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'通讯录内容' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AddRessList', @level2type=N'COLUMN', @level2name=N'AddRessContext'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Pub]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_Delete_Where]
	@WhereCondition nvarchar(500)
AS

SET NOCOUNT ON

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_BindPro]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_GatherStrain]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_GatherStrain](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[GSName] [varchar](30) NULL,
	[GSIntro] [varchar](200) NULL,
	[GSType] [uniqueidentifier] NULL,
	[GSICO] [varchar](200) NULL,
	[Cryptonym] [bit] NULL,
	[IsPublic] [int] NULL,
	[CreatTime] [datetime] NULL,
	[GSstate] [int] NULL CONSTRAINT [DF_ZL_Sns_GatherStrain_GSstate]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Sns_GatherStrain] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Advertisement]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Advertisement](
	[ADID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[ADType] [int] NULL,
	[ADName] [nvarchar](100) NULL,
	[ImgUrl] [nvarchar](255) NULL,
	[ImgWidth] [int] NULL,
	[ImgHeight] [int] NULL,
	[FlashWmode] [int] NULL,
	[ADIntro] [ntext] NULL,
	[LinkUrl] [nvarchar](255) NULL,
	[LinkTarget] [int] NULL,
	[LinkAlt] [nvarchar](255) NULL,
	[Priority] [int] NULL,
	[Setting] [ntext] NULL,
	[CountView] [bit] NOT NULL,
	[Views] [int] NULL,
	[CountClick] [bit] NOT NULL,
	[Clicks] [int] NULL,
	[Passed] [bit] NOT NULL,
	[OverdueDate] [datetime] NULL,
	[ImgUrl1] [nvarchar](255) NULL,
	[ImgHeight1] [int] NULL,
	[ImgWidth1] [int] NULL,
	[LinkUrl1] [nvarchar](255) NULL,
	[LinkTarget1] [int] NULL,
	[LinkAlt1] [nvarchar](255) NULL,
	[ADIntro1] [ntext] NULL,
	[FlashWmode1] [int] NULL,
 CONSTRAINT [PK_ZL_Advertisement] PRIMARY KEY CLUSTERED 
(
	[ADID] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_GroupPicCateg]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_GroupPicCateg](
	[GroupID] [uniqueidentifier] NOT NULL,
	[CategID] [uniqueidentifier] NOT NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Answer]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Answer](
	[Aid] [int] IDENTITY(1,1) NOT NULL,
	[Surveyid] [int] NOT NULL,
	[Qid] [int] NOT NULL,
	[Answercontent] [text] NOT NULL,
	[Userid] [int] NULL,
	[Submitdate] [datetime] NULL,
	[Submitip] [varchar](50) NULL,
 CONSTRAINT [PK_ZL_Answer] PRIMARY KEY CLUSTERED 
(
	[Aid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Dbooth]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_HomeCollocate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_HomeCollocate](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[ShopID] [uniqueidentifier] NULL,
	[CLeft] [int] NULL,
	[CIndexZ] [int] NULL,
	[CTop] [int] NULL,
	[Addtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_HomeCollocate] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Answer_Recode]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Answer_Recode](
	[Rid] [int] IDENTITY(1,1) NOT NULL,
	[Sid] [int] NOT NULL,
	[Userid] [int] NOT NULL,
	[Submitip] [varchar](50) NULL,
	[Submitdate] [datetime] NULL CONSTRAINT [DF_ZL_Answer_Recode_Submitdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_ANSWER_RECODE] PRIMARY KEY CLUSTERED 
(
	[Rid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DelTableField]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DelTableField]
@TableName  varchar(128), --表名
@FieldName varchar(128)--列名

as
set @TableName = ltrim(rtrim(@TableName))
set @FieldName = ltrim(rtrim(@FieldName))

declare @string varchar(8000)
declare @name varchar(100)

--DF为约束名称前缀
select @name=b.name from syscolumns a,sysobjects b where a.id=object_id(@TableName) and b.id=a.cdefault and a.name=@FieldName and b.name like ''DF%''
--删除约束

select @string=''alter table ''+@TableName+'' drop constraint ''+@name
execute(@string)

IF  EXISTS( select * from syscolumns where id=object_id(@TableName) and name = @FieldName )
begin
select  @string =''  ALTER  TABLE ''+ @TableName + '' DROP COLUMN  ['' + ltrim(rtrim(@FieldName))  + '']''
print @string
execute(@string)
end



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_HomeHeadCollocate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_HomeHeadCollocate](
	[UserID] [int] NOT NULL,
	[UserHeadPic] [varchar](100) NULL,
	[UserLeft] [int] NULL,
	[UserIndexZ] [int] NULL,
	[UserTop] [int] NULL,
	[CohabitID] [uniqueidentifier] NULL,
	[CohabitHeadPic] [varchar](100) NULL,
	[CohabitLeft] [int] NULL,
	[CohabitIndexZ] [int] NULL,
	[CohabitTop] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_HomeHeadCollocate] PRIMARY KEY NONCLUSTERED 
(
	[UserID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_AuditingState]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_AuditingState](
	[stateCode] [int] NOT NULL,
	[stateName] [varchar](50) NOT NULL,
	[stateType] [varchar](50) NOT NULL,
 CONSTRAINT [PK_ZL_AuditingState] PRIMARY KEY CLUSTERED 
(
	[stateCode] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AuditingState', @level2type=N'COLUMN', @level2name=N'stateName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态类型（是否是系统的）' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_AuditingState', @level2type=N'COLUMN', @level2name=N'stateType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_Log]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_Log](
	[ID] [uniqueidentifier] NOT NULL,
	[LogType] [int] NULL,
	[LogContext] [varchar](2000) NULL,
	[LogTime] [datetime] NULL,
	[UserID] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_Log] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Author]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Author](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL CONSTRAINT [DF_ZL_Author_UserID]  DEFAULT (0),
	[Type] [nvarchar](50) NULL,
	[Name] [nvarchar](50) NULL,
	[Passed] [bit] NULL CONSTRAINT [DF_ZL_Author_Passed]  DEFAULT (0),
	[onTop] [bit] NULL CONSTRAINT [DF_ZL_Author_onTop]  DEFAULT (0),
	[IsElite] [bit] NULL CONSTRAINT [DF_ZL_Author_IsElite]  DEFAULT (0),
	[Hits] [int] NULL CONSTRAINT [DF_ZL_Author_Hits]  DEFAULT (0),
	[LastUseTime] [datetime] NULL CONSTRAINT [DF_ZL_Author_LastUseTime]  DEFAULT (getdate()),
	[TemplateID] [int] NULL CONSTRAINT [DF_ZL_Author_TemplateID]  DEFAULT (0),
	[Photo] [nvarchar](255) NULL,
	[Intro] [ntext] NULL,
	[Address] [nvarchar](50) NULL,
	[Tel] [nvarchar](50) NULL,
	[Fax] [nvarchar](50) NULL,
	[Mail] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL,
	[ZipCode] [int] NULL,
	[HomePage] [nvarchar](50) NULL,
	[Im] [nvarchar](50) NULL,
	[Sex] [smallint] NULL CONSTRAINT [DF_ZL_Author_Sex]  DEFAULT (0),
	[BirthDay] [datetime] NULL,
	[Company] [nvarchar](50) NULL,
	[Department] [nvarchar](50) NULL,
 CONSTRAINT [PK_ZL_Author] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MiUserInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_LogCriticism]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_LogCriticism](
	[ID] [uniqueidentifier] NOT NULL,
	[LogID] [uniqueidentifier] NULL,
	[UserID] [int] NULL,
	[CriticismConten] [varchar](2000) NULL,
	[CreatTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_LogCriticism] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Bbscate]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Bbscate](
	[Cateid] [int] IDENTITY(1,1) NOT NULL,
	[CateName] [varchar](50) NOT NULL,
	[Catetype] [int] NULL CONSTRAINT [DF_ZL_Bbscate_Catetype]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Bbscate] PRIMARY KEY CLUSTERED 
(
	[Cateid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_LotMessage]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_LotMessage](
	[ID] [uniqueidentifier] NULL,
	[MessageContent] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Bbstips]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Bbstips](
	[Tid] [int] IDENTITY(1,1) NOT NULL,
	[Parentid] [int] NOT NULL,
	[Cateid] [int] NOT NULL,
	[Userid] [int] NULL CONSTRAINT [DF_ZL_Bbstips_Userid]  DEFAULT (0),
	[Ttitle] [varchar](50) NULL,
	[Tcontent] [varchar](50) NULL,
	[Tipsclick] [int] NOT NULL CONSTRAINT [DF_ZL_Bbstips_Tipsclick]  DEFAULT (0),
	[Tipsdate] [datetime] NULL CONSTRAINT [DF_ZL_Bbstips_Tipsdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Bbstips] PRIMARY KEY CLUSTERED 
(
	[Tid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Pub]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_Select_Where]
	@WhereCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	[ID],
	[BindProID],
	[ProID],
	[ProName],
	[Jiage],
	[Pronum]
FROM
	[dbo].[ZL_BindPro]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_LotNote]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_LotNote](
	[ID] [uniqueidentifier] NOT NULL,
	[StartID] [uniqueidentifier] NULL,
	[EndID] [uniqueidentifier] NULL,
	[MessageID] [uniqueidentifier] NULL,
	[NoteType] [int] NULL,
 CONSTRAINT [PK_ZL_Sns_LotNote] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_BindPro]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_BindPro](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[BindProID] [int] NULL,
	[ProID] [int] NULL,
	[ProName] [nvarchar](255) NULL,
	[Jiage] [money] NULL CONSTRAINT [DF_ZL_BindPro_Jiage]  DEFAULT (0),
	[Pronum] [int] NULL CONSTRAINT [DF_ZL_BindPro_Pronum]  DEFAULT (0),
 CONSTRAINT [PK_ZL_BindPro] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'绑定商品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BindPro', @level2type=N'COLUMN', @level2name=N'BindProID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BindPro', @level2type=N'COLUMN', @level2name=N'ProID'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品名称' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BindPro', @level2type=N'COLUMN', @level2name=N'ProName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BindPro', @level2type=N'COLUMN', @level2name=N'Jiage'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'商品数量' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BindPro', @level2type=N'COLUMN', @level2name=N'Pronum'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_CallNode]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_Sns_Memo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_Sns_Memo](
	[ID] [uniqueidentifier] NOT NULL,
	[UserID] [int] NULL,
	[MemoTitle] [varchar](100) NULL,
	[MemoContext] [varchar](1000) NULL,
	[MemoTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Sns_Memo] PRIMARY KEY NONCLUSTERED 
(
	[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_CallNode]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_CallNode](
	[C_Nid] [int] IDENTITY(1,1) NOT NULL,
	[CName] [nvarchar](1000) NULL,
	[Ctype] [int] NULL,
 CONSTRAINT [PK_ZL_CallNode] PRIMARY KEY CLUSTERED 
(
	[C_Nid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_Select_List]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CallNote_Select_List]
AS
SELECT datediff(DAY,MAX(CallTime),MIN(CallTime))+1 AS Num,
''总统计天数'' AS Context FROM ZL_CallNote
SELECT COUNT(ID) AS Num,''总访问量'' AS Context FROM ZL_CallNote
SELECT COUNT(ID) AS Num,''总访问人数'' AS Context FROM dbo.ZL_CallNote WHERE Username IS NOT NULL AND username<>''''
SELECT COUNT(ID) AS Num,''今日访问人数'' AS Context FROM ZL_CallNote WHERE DATEDIFF(DAY,CallTime,GETDATE())=0




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CallNote_Select_All]
AS 
SELECT * FROM ZL_CallNote 





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNote_InsertUpdate]
	@ID int,
	@UserName nchar(255),
	@CallSession nchar(255),
	@SessionMD5 nchar(255),
	@IP nchar(225),
	@CallArea bit,
	@CallTime datetime,
	@CallSystem nchar(255),
	@CallBrowser nchar(255),
	@CallScreen nchar(50),
	@CallScreenColor nchar(50),
	@CallYear int,
	@CallMonth int,
	@CallDay int,
	@CallWeek int,
	@CallHour int,
	@CallLike nchar(255),
	@CallNode int
AS

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_CallNote] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_CallNote] SET
		[UserName] = @UserName,
		[CallSession] = @CallSession,
		[SessionMD5] = @SessionMD5,
		[IP] = @IP,
		[CallArea] = @CallArea,
		[CallTime] = @CallTime,
		[CallSystem] = @CallSystem,
		[CallBrowser] = @CallBrowser,
		[CallScreen] = @CallScreen,
		[CallScreenColor] = @CallScreenColor,
		[CallYear] = @CallYear,
		[CallMonth] = @CallMonth,
		[CallDay] = @CallDay,
		[CallWeek] = @CallWeek,
		[CallHour] = @CallHour,
		[CallLike] = @CallLike,
		[CallNode] = @CallNode
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_CallNote] (	
	[UserName],
	[CallSession],
	[SessionMD5],
	[IP],
	[CallArea],
	[CallTime],
	[CallSystem],
	[CallBrowser],
	[CallScreen],
	[CallScreenColor],
	[CallYear],
	[CallMonth],
	[CallDay],
	[CallWeek],
	[CallHour],
	[CallLike],
	[CallNode]
	) VALUES (
	@UserName,
	@CallSession,
	@SessionMD5,
	@IP,
	@CallArea,
	@CallTime,
	@CallSystem,
	@CallBrowser,
	@CallScreen,
	@CallScreenColor,
	@CallYear,
	@CallMonth,
	@CallDay,
	@CallWeek,
	@CallHour,
	@CallLike,
	@CallNode
	)

END




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CallNote_GetUpdate]
	@UserName nchar(255),
	@SessionMD5 nchar(255)
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_CallNote] SET
	[UserName] = @UserName
WHERE
	[SessionMD5] = @SessionMD5
	




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNote_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[UserName],
	[CallSession],
	[SessionMD5],
	[IP],
	[CallArea],
	[CallTime],
	[CallSystem],
	[CallBrowser],
	[CallScreen],
	[CallScreenColor],
	[CallYear],
	[CallMonth],
	[CallDay],
	[CallWeek],
	[CallHour],
	[CallLike],
	[CallNode]
FROM
	[dbo].[ZL_CallNote]
WHERE
	[ID] = @ID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNote_GetDelete]
	@ID int
AS

DELETE FROM [dbo].[ZL_CallNote]
WHERE
	[ID] = @ID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNote_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CallNote_GetInsert]
	@UserName nchar(255),
	@CallSession nchar(255),
	@SessionMD5 nchar(255),
	@IP nchar(225),
	@CallArea bit,
	@CallTime datetime,
	@CallSystem nchar(255),
	@CallBrowser nchar(255),
	@CallScreen nchar(50),
	@CallScreenColor nchar(50),
	@CallYear int,
	@CallMonth int,
	@CallDay int,
	@CallWeek int,
	@CallHour int,
	@CallLike nchar(255),
@CallNode int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_CallNote] (
	[UserName],
	[CallSession],
	[SessionMD5],
	[IP],
	[CallArea],
	[CallTime],
	[CallSystem],
	[CallBrowser],
	[CallScreen],
	[CallScreenColor],
	[CallYear],
	[CallMonth],
	[CallDay],
	[CallWeek],
	[CallHour],
	[CallLike],
[CallNode]

) VALUES (
	@UserName,
	@CallSession,
	@SessionMD5,
	@IP,
	@CallArea,
	@CallTime,
	@CallSystem,
	@CallBrowser,
	@CallScreen,
	@CallScreenColor,
	@CallYear,
	@CallMonth,
	@CallDay,
	@CallWeek,
	@CallHour,
	@CallLike,
@CallNode
)


SET @ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_GetInsert]
	@CardNum nvarchar(50),
	@CardPwd nvarchar(50),
	@PutUserID int,
	@VIPType int,
	@CircumscribeTime datetime,
	@CardState int
	
AS

INSERT INTO [dbo].[ZL_Card] (
	[CardNum],
	[CardPwd],
	[PutUserID],	
	[VIPType],
	[CircumscribeTime],
	[CardState]
) VALUES (
	@CardNum,
	@CardPwd,
	@PutUserID,
	@VIPType,
	@CircumscribeTime,
	@CardState
)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_GetDelete]
	@Card_ID int
AS

DELETE FROM [dbo].[ZL_Card]
WHERE
	[Card_ID] = @Card_ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_InsertUpdate]
	@Card_ID int,
	@CardNum nvarchar(50),
	@CardPwd nvarchar(50),
	@PutUserID int,
	@AssociateUserID int,
	@VIPType int,
	@StartTime datetime,
	@CircumscribeTime int,
	@PlyNum int,
	@AddTime datetime,
	@CardState int
AS

IF EXISTS(SELECT [Card_ID] FROM [dbo].[ZL_Card] WHERE [Card_ID] = @Card_ID)
BEGIN
	UPDATE [dbo].[ZL_Card] SET
		[CardNum] = @CardNum,
		[CardPwd] = @CardPwd,
		[PutUserID] = @PutUserID,
		[AssociateUserID] = @AssociateUserID,
		[VIPType] = @VIPType,
		[StartTime] = @StartTime,
		[CircumscribeTime] = @CircumscribeTime,
		[PlyNum] = @PlyNum,
		[AddTime] = @AddTime,
		[CardState] = @CardState
	WHERE
		[Card_ID] = @Card_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Card] (	
	[CardNum],
	[CardPwd],
	[PutUserID],
	[AssociateUserID],
	[VIPType],
	[StartTime],
	[CircumscribeTime],
	[PlyNum],
	[AddTime],
	[CardState]
	) VALUES (
	@CardNum,
	@CardPwd,
	@PutUserID,
	@AssociateUserID,
	@VIPType,
	@StartTime,
	@CircumscribeTime,
	@PlyNum,
	@AddTime,
	@CardState
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_Select_All]
AS


SELECT
	[Card_ID],
	[CardNum],
	[CardPwd],
	[PutUserID],
	[AssociateUserID],
	[VIPType],
	[StartTime],
	[CircumscribeTime],
	[PlyNum],
	[AddTime],
	[CardState]
FROM
	[dbo].[ZL_Card]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_GetSelect]
	@Card_ID int
AS

SELECT
	[Card_ID],
	[CardNum],
	[CardPwd],
	[PutUserID],
	[AssociateUserID],
	[VIPType],
	[StartTime],
	[CircumscribeTime],
	[PlyNum],
	[AddTime],
	[CardState]
FROM
	[dbo].[ZL_Card]
WHERE
	[Card_ID] = @Card_ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Card_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Card_GetUpdate]
	@Card_ID int,
	@CardNum nvarchar(50),
	@CardPwd nvarchar(50),
	@PutUserID int,
	@AssociateUserID int,
	@VIPType int,
	@StartTime datetime,
	@CircumscribeTime int,
	@PlyNum int,
	@AddTime datetime,
	@CardState int
AS

UPDATE [dbo].[ZL_Card] SET
	[CardNum] = @CardNum,
	[CardPwd] = @CardPwd,
	[PutUserID] = @PutUserID,
	[AssociateUserID] = @AssociateUserID,
	[VIPType] = @VIPType,
	[StartTime] = @StartTime,
	[CircumscribeTime] = @CircumscribeTime,
	[PlyNum] = @PlyNum,
	[AddTime] = @AddTime,
	[CardState] = @CardState
WHERE
	[Card_ID] = @Card_ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Cart_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Cart_Add]
	@id int,
	@Cartid varchar(255),
	@UserId int,
	@Username varchar(255),
	@Addtime datetime,
	@Pronum int,
	@AllMoney money,
	@Getip varchar(50)
as
	insert into ZL_Cart(Cartid,UserId,Username,Addtime,Pronum,AllMoney,Getip)
	values (@Cartid,@UserId,@Username,@Addtime,@Pronum,@AllMoney,@Getip)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Cart_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Cart_GetById]
	@id int
as
	select * from ZL_Cart where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Cart_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Cart_Update]
	@id int,
	@Cartid varchar(255),
	@UserId int,
	@Username varchar(255),
	@Addtime datetime,
	@Pronum int,
	@AllMoney money,
	@Getip varchar(50)
as
	update ZL_Cart set 
		Cartid=@Cartid,
		UserId=@UserId,
		Username=@Username,
		Addtime=@Addtime,
		Pronum=@Pronum,
		AllMoney=@AllMoney,
		Getip=@Getip
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Cart_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Cart_Del]
	@id int
as
	delete from ZL_Cart  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CartPro_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE proc [dbo].[PR_CartPro_Add]
	@id int,
	@CartID int,
	@ProID int,
	@Pronum int,
	@Username varchar(255),
	@Proname varchar(255),
	@Danwei varchar(50),
	@Shijia money,
	@AllMoney money,
	@Addtime datetime,
	@Bindpro nvarchar(255),
	@PerID nvarchar(20),
	@city nvarchar(50),
	@type int
as
	insert into ZL_CartPro(CartID,ProID,Pronum,Username,Proname,Danwei,Shijia,AllMoney,Addtime,Bindpro,PerID,city,type)
	values (@CartID,@ProID,@Pronum,@Username,@Proname,@Danwei,@Shijia,@AllMoney,@Addtime,@Bindpro,@PerID,@city,@type)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CartPro_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_CartPro_Update]
	@id int,
	@CartID int,
	@ProID int,
	@Pronum int,
	@Username varchar(255),
	@Proname varchar(255),
	@Danwei varchar(50),
	@Shijia money,
	@AllMoney money,
	@Addtime datetime,
	@Bindpro nvarchar(255)
as
	update ZL_CartPro set 
		CartID=@CartID,
		ProID=@ProID,
		Pronum=@Pronum,
		Username=@Username,
		Proname=@Proname,
		Danwei=@Danwei,
		Shijia=@Shijia,
		AllMoney=@AllMoney,
		Addtime=@Addtime,
		Bindpro=@Bindpro
	where id=@id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CartPro_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_CartPro_GetById]
	@id int
as
	select * from ZL_CartPro where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CartPro_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_CartPro_Del]
	@id int
as
	delete from ZL_CartPro  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_GetSelect]
	@RoomID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[RoomID],
	[RoomName],
	[SchoolID],
	[ClassName],
	[Room],
	[Teacher],
	[Adviser],
	[Monitor],
	[Creation],
	[CreateUser],
	[Integral],
	[Classinfo],
	[Grade],
	[IsTrue]
FROM
	[dbo].[ZL_ClassRoom]
WHERE
	[RoomID] = @RoomID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_GetUpdate]
	@RoomID int,
	@RoomName nvarchar(255),
	@SchoolID int,
	@ClassName nvarchar(50),
	@Room nvarchar(10),
	@Teacher nvarchar(255),
	@Adviser nvarchar(255),
	@Monitor nvarchar(255),
	@Creation datetime,
	@CreateUser int,
	@Integral int,
	@Classinfo ntext,
	@Grade int,
	@IsTrue int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_ClassRoom] SET
	[RoomName] = @RoomName,
	[SchoolID] = @SchoolID,
	[ClassName] = @ClassName,
	[Room] = @Room,
	[Teacher] = @Teacher,
	[Adviser] = @Adviser,
	[Monitor] = @Monitor,
	[Creation] = @Creation,
	[CreateUser] = @CreateUser,
	[Integral] = @Integral,
	[Classinfo] = @Classinfo,
	[Grade] = @Grade,
	[IsTrue] = @IsTrue
WHERE
	[RoomID] = @RoomID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_GetInsert]
	@RoomName nvarchar(255),
	@SchoolID int,
	@ClassName nvarchar(50),
	@Room nvarchar(10),
	@Teacher nvarchar(255),
	@Adviser nvarchar(255),
	@Monitor nvarchar(255),
	@Creation datetime,
	@CreateUser int,
	@Integral int,
	@Classinfo ntext,
	@Grade int,
	@IsTrue int,
	@RoomID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_ClassRoom] (
	[RoomName],
	[SchoolID],
	[ClassName],
	[Room],
	[Teacher],
	[Adviser],
	[Monitor],
	[Creation],
	[CreateUser],
	[Integral],
	[Classinfo],
	[Grade],
	[IsTrue]
) VALUES (
	@RoomName,
	@SchoolID,
	@ClassName,
	@Room,
	@Teacher,
	@Adviser,
	@Monitor,
	@Creation,
	@CreateUser,
	@Integral,
	@Classinfo,
	@Grade,
	@IsTrue
)

SET @RoomID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_GetDelete]
	@RoomID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_ClassRoom]
WHERE
	[RoomID] = @RoomID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_Select_Paged]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_Select_Paged]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[RoomID],
	[RoomName],
	[SchoolID],
	[Teacher],
	[Adviser],
	[Monitor],
	[Creation],
	[CreateUser],
	[Integral],
	[Classinfo],
	[Grade],
	[IsTrue]
FROM
	[dbo].[ZL_ClassRoom]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[RoomID],
	[RoomName],
	[SchoolID],
	[ClassName],
	[Room],
	[Teacher],
	[Adviser],
	[Monitor],
	[Creation],
	[CreateUser],
	[Integral],
	[Classinfo],
	[Grade],
	[IsTrue]
FROM
	[dbo].[ZL_ClassRoom]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClassRoom_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ClassRoom_InsertUpdate]
	@RoomID int,
	@RoomName nvarchar(255),
	@SchoolID int,
	@ClassName nvarchar(50),
	@Room nvarchar(10),
	@Teacher nvarchar(255),
	@Adviser nvarchar(255),
	@Monitor nvarchar(255),
	@Creation datetime,
	@CreateUser int,
	@Integral int,
	@Classinfo ntext,
	@Grade int,
	@IsTrue int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [RoomID] FROM [dbo].[ZL_ClassRoom] WHERE [RoomID] = @RoomID)
BEGIN
	UPDATE [dbo].[ZL_ClassRoom] SET
		[RoomName] = @RoomName,
		[SchoolID] = @SchoolID,
		[ClassName] = @ClassName,
		[Room] = @Room,
		[Teacher] = @Teacher,
		[Adviser] = @Adviser,
		[Monitor] = @Monitor,
		[Creation] = @Creation,
		[CreateUser] = @CreateUser,
		[Integral] = @Integral,
		[Classinfo] = @Classinfo,
		[Grade] = @Grade,
		[IsTrue] = @IsTrue
	WHERE
		[RoomID] = @RoomID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_ClassRoom] (	
	[RoomName],
	[SchoolID],
	[ClassName],
	[Room],
	[Teacher],
	[Adviser],
	[Monitor],
	[Creation],
	[CreateUser],
	[Integral],
	[Classinfo],
	[Grade],
	[IsTrue]
	) VALUES (
	@RoomName,
	@SchoolID,
	@ClassName,
	@Room,
	@Teacher,
	@Adviser,
	@Monitor,
	@Creation,
	@CreateUser,
	@Integral,
	@Classinfo,
	@Grade,
	@IsTrue
	)

END



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClientRequire_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ClientRequire_Add]
(
@RequireID int,
@Require ntext,
@UserID int,
@ReuqireDate datetime
)
AS
INSERT INTO ZL_ClientRequire (Require,UserID,ReuqireDate ) VALUES (@Require,@UserID,@ReuqireDate)





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ClientRequire_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_ClientRequire_Delete]
	@ID int
AS
	/* SET NOCOUNT ON */ 
	delete from [ZL_ClientRequire] where RequireID=@ID
	RETURN





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_GetDelete]
	@C_IID int
AS

DELETE FROM [dbo].[ZL_CollectionInfo]
WHERE
	[C_IID] = @C_IID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_GetInsert]
	@ModeID int,
	@NodeID int,
	@ItemID int,
	@CollID int,
	@OldUrl nvarchar(500),
	@NewUrl nvarchar(500),
	@State int,
	@AddTime nvarchar(50),
	@Remark nvarchar(500),
	@C_IID int OUTPUT
AS

INSERT INTO [dbo].[ZL_CollectionInfo] (
	[ModeID],
	[NodeID],
	[ItemID],
	[CollID],
	[OldUrl],
	[NewUrl],
	[State],
	[AddTime],
	[Remark]
) VALUES (
	@ModeID,
	@NodeID,
	@ItemID,
	@CollID,
	@OldUrl,
	@NewUrl,
	@State,
	@AddTime,
	@Remark
)

SET @C_IID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_Select_All]
AS


SELECT
	[C_IID],
	[ModeID],
	[NodeID],
	[ItemID],
	[CollID],
	[OldUrl],
	[NewUrl],
	[State],
	[AddTime],
	[Remark]
FROM
	[dbo].[ZL_CollectionInfo]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_InsertUpdate]
	@C_IID int,
	@ModeID int,
	@NodeID int,
	@ItemID int,
	@CollID int,
	@OldUrl nvarchar(500),
	@NewUrl nvarchar(500),
	@State int,
	@AddTime nvarchar(50),
	@Remark nvarchar(500)
AS

IF EXISTS(SELECT [C_IID] FROM [dbo].[ZL_CollectionInfo] WHERE [C_IID] = @C_IID)
BEGIN
	UPDATE [dbo].[ZL_CollectionInfo] SET
		[ModeID] = @ModeID,
		[NodeID] = @NodeID,
		[ItemID] = @ItemID,
		[CollID] = @CollID,
		[OldUrl] = @OldUrl,
		[NewUrl] = @NewUrl,
		[State] = @State,
		[AddTime] = @AddTime,
		[Remark] = @Remark
	WHERE
		[C_IID] = @C_IID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_CollectionInfo] (	
	[ModeID],
	[NodeID],
	[ItemID],
	[CollID],
	[OldUrl],
	[NewUrl],
	[State],
	[AddTime],
	[Remark]
	) VALUES (
	@ModeID,
	@NodeID,
	@ItemID,
	@CollID,
	@OldUrl,
	@NewUrl,
	@State,
	@AddTime,
	@Remark
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_GetUpdate]
	@C_IID int,
	@ModeID int,
	@NodeID int,
	@ItemID int,
	@CollID int,
	@OldUrl nvarchar(500),
	@NewUrl nvarchar(500),
	@State int,
	@AddTime nvarchar(50),
	@Remark nvarchar(500)
AS

UPDATE [dbo].[ZL_CollectionInfo] SET
	[ModeID] = @ModeID,
	[NodeID] = @NodeID,
	[ItemID] = @ItemID,
	[CollID] = @CollID,
	[OldUrl] = @OldUrl,
	[NewUrl] = @NewUrl,
	[State] = @State,
	[AddTime] = @AddTime,
	[Remark] = @Remark
WHERE
	[C_IID] = @C_IID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionInfo_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionInfo_GetSelect]
	@C_IID int
AS

SELECT
	[C_IID],
	[ModeID],
	[NodeID],
	[ItemID],
	[CollID],
	[OldUrl],
	[NewUrl],
	[State],
	[AddTime],
	[Remark]
FROM
	[dbo].[ZL_CollectionInfo]
WHERE
	[C_IID] = @C_IID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_GetUpdate]
	@CItem_ID int,
	@ItemName nvarchar(500),
	@ModeID int,
	@NodeID nvarchar(200),
	@SpecialID nvarchar(200),
	@SiteName nvarchar(100),
	@CollUrl nvarchar(200),
	@CodinChoice int,
	@CollNum int,
	@CollOrder int,
	@CollContext nvarchar(4000),
	@ListSettings nvarchar(1000),
	@PageSettings nvarchar(1000),
	@InfoPageSettings nvarchar(4000),
	@AddTime datetime,
	@LastTime nvarchar(50),
	@Switch int,
	@State int
AS

UPDATE [dbo].[ZL_CollectionItem] SET
	[ItemName] = @ItemName,
	[ModeID] = @ModeID,
	[NodeID] = @NodeID,
	[SpecialID] = @SpecialID,
	[SiteName] = @SiteName,
	[CollUrl] = @CollUrl,
	[CodinChoice] = @CodinChoice,
	[CollNum] = @CollNum,
	[CollOrder] = @CollOrder,
	[CollContext] = @CollContext,
	[ListSettings] = @ListSettings,
	[PageSettings] = @PageSettings,
	[InfoPageSettings] = @InfoPageSettings,
	[AddTime] = @AddTime,
	[LastTime] = @LastTime,
	[Switch] = @Switch,
	[State] = @State
WHERE
	[CItem_ID] = @CItem_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_InsertUpdate]
	@CItem_ID int,
	@ItemName nvarchar(500),
	@ModeID int,
	@NodeID nvarchar(200),
	@SpecialID nvarchar(200),
	@SiteName nvarchar(100),
	@CollUrl nvarchar(200),
	@CodinChoice int,
	@CollNum int,
	@CollOrder int,
	@CollContext nvarchar(4000),
	@ListSettings nvarchar(1000),
	@PageSettings nvarchar(1000),
	@InfoPageSettings nvarchar(4000),
	@AddTime datetime,
	@LastTime nvarchar(50),
	@Switch int,
	@State int
AS

IF EXISTS(SELECT [CItem_ID] FROM [dbo].[ZL_CollectionItem] WHERE [CItem_ID] = @CItem_ID)
BEGIN
	UPDATE [dbo].[ZL_CollectionItem] SET
		[ItemName] = @ItemName,
		[ModeID] = @ModeID,
		[NodeID] = @NodeID,
		[SpecialID] = @SpecialID,
		[SiteName] = @SiteName,
		[CollUrl] = @CollUrl,
		[CodinChoice] = @CodinChoice,
		[CollNum] = @CollNum,
		[CollOrder] = @CollOrder,
		[CollContext] = @CollContext,
		[ListSettings] = @ListSettings,
		[PageSettings] = @PageSettings,
		[InfoPageSettings] = @InfoPageSettings,
		[AddTime] = @AddTime,
		[LastTime] = @LastTime,
		[Switch] = @Switch,
		[State] = @State
	WHERE
		[CItem_ID] = @CItem_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_CollectionItem] (	
	[ItemName],
	[ModeID],
	[NodeID],
	[SpecialID],
	[SiteName],
	[CollUrl],
	[CodinChoice],
	[CollNum],
	[CollOrder],
	[CollContext],
	[ListSettings],
	[PageSettings],
	[InfoPageSettings],
	[AddTime],
	[LastTime],
	[Switch],
	[State]
	) VALUES (
	@ItemName,
	@ModeID,
	@NodeID,
	@SpecialID,
	@SiteName,
	@CollUrl,
	@CodinChoice,
	@CollNum,
	@CollOrder,
	@CollContext,
	@ListSettings,
	@PageSettings,
	@InfoPageSettings,
	@AddTime,
	@LastTime,
	@Switch,
	@State
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_GetSelect]
	@CItem_ID int
AS

SELECT
	[CItem_ID],
	[ItemName],
	[ModeID],
	[NodeID],
	[SpecialID],
	[SiteName],
	[CollUrl],
	[CodinChoice],
	[CollNum],
	[CollOrder],
	[CollContext],
	[ListSettings],
	[PageSettings],
	[InfoPageSettings],
	[AddTime],
	[LastTime],
	[Switch],
	[State]
FROM
	[dbo].[ZL_CollectionItem]
WHERE
	[CItem_ID] = @CItem_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_GetInsert]
	@ItemName nvarchar(500),
	@ModeID int,
	@NodeID nvarchar(200),
	@SpecialID nvarchar(200),
	@SiteName nvarchar(100),
	@CollUrl nvarchar(200),
	@CodinChoice int,
	@CollNum int,
	@CollOrder int,
	@CollContext nvarchar(4000),
	@ListSettings nvarchar(1000),
	@PageSettings nvarchar(1000),
	@InfoPageSettings nvarchar(4000),
	@AddTime datetime,
	@LastTime nvarchar(50),
	@Switch int,
	@State int,
	@CItem_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_CollectionItem] (
	[ItemName],
	[ModeID],
	[NodeID],
	[SpecialID],
	[SiteName],
	[CollUrl],
	[CodinChoice],
	[CollNum],
	[CollOrder],
	[CollContext],
	[ListSettings],
	[PageSettings],
	[InfoPageSettings],
	[AddTime],
	[LastTime],
	[Switch],
	[State]
) VALUES (
	@ItemName,
	@ModeID,
	@NodeID,
	@SpecialID,
	@SiteName,
	@CollUrl,
	@CodinChoice,
	@CollNum,
	@CollOrder,
	@CollContext,
	@ListSettings,
	@PageSettings,
	@InfoPageSettings,
	@AddTime,
	@LastTime,
	@Switch,
	@State
)

SET @CItem_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_GetDelete]
	@CItem_ID int
AS

DELETE FROM [dbo].[ZL_CollectionItem]
WHERE
	[CItem_ID] = @CItem_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CollectionItem_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_CollectionItem_Select_All]
AS


SELECT
	[CItem_ID],
	[ItemName],
	[ModeID],
	[NodeID],
	[SpecialID],
	[SiteName],
	[CollUrl],
	[CodinChoice],
	[CollNum],
	[CollOrder],
	[CollContext],
	[ListSettings],
	[PageSettings],
	[InfoPageSettings],
	[AddTime],
	[LastTime],
	[Switch],
	[State]
FROM
	[dbo].[ZL_CollectionItem]


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Comment_ByNodeAudit]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Comment_ByNodeAudit]
(
@Audited bit,
@NodeID int
)
AS
select A.*,B.Title from ZL_Comment A left outer join ZL_CommonModel B on A.GeneralID=B.GeneralID where A.Audited =@Audited and B.NodeID=@NodeID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Comments_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Comments_Add]
(
@CommentID int,
@GeneralID int,
@Title nvarchar(255),
@Contents nvarchar(300),
@Audited bit,
@UserID int,
@CommentTime datetime,
@Score int,
@PK bit
)
AS
INSERT INTO ZL_Comment (GeneralID,Title,Contents,Audited,UserID,CommentTime,Score,PK) VALUES (@GeneralID,@Title,@Contents,@Audited,@UserID,@CommentTime,@Score,@PK)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Comments_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Comments_Del]
(
@CommentID int
)
AS
    Delete from ZL_Comment where CommentID=@CommentID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Comments_Audit]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Comments_Audit]
(
@CommentID int,
@Audit bit
)
AS
UPDATE ZL_Comment SET Audited=@Audit where CommentID=@CommentID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Commodities_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Commodities_Update]
	@id int,
	@Class int,
	@Nodeid int,
	@ModelID int,
	@Categoryid int,
	@ProCode varchar(50),
	@BarCode varchar(50),
	@Proname varchar(255),
	@Kayword varchar(255),
	@ProUnit varchar(50),
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@ProClass int,
	@Properties int,
	@Sales int,
	@Proinfo text,
	@Procontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Producer varchar(255),
	@Brand varchar(50),
	@Allowed int,
	@Quota int,
	@DownQuota int,
	@Stock int,
	@StockDown int,
	@JisuanFs int,
	@Rate money,
	@Rateset int,
	@Dengji int,
	@ShiPrice money,
	@LinPrice money,
	@Wholesales int,
	@Wholesaleone int,
	@Preset varchar(255),
	@Integral int,
	@Propeid int,
	@Recommend int,
	@Priority int,
	@AllClickNum int,
	@UpdateTime datetime,
	@ModeTemplate varchar(255),
	@AddUser varchar(50),
	@DownCar int,
	@AddTime datetime,
	@TableName varchar(50),
	@Istrue int,
	@Isgood int,
	@MakeHtml int,
	@Sold int,
	@isnew int,
	@ishot int,
	@isbest int,
	@Wholesalesinfo varchar(255),
	@ItemID int,
	@ComModelID int,
	@Largess int,
	@Largesspirx money,
	@ProjectType int,
	@ProjectPronum int,
	@ProjectMoney money,
	@IntegralNum int,
	@PesentNames nvarchar(255),
	@PesentNameid int,
	@GuessType int,
	@GuessXML nvarchar(1000),
	@FirstNodeID int
as
	update ZL_Commodities set 
		Class=@Class,
		Nodeid=@Nodeid,
		ModelID=@ModelID,
		Categoryid=@Categoryid,
		ProCode=@ProCode,
		BarCode=@BarCode,
		Proname=@Proname,
		Kayword=@Kayword,
		ProUnit=@ProUnit,
		Weight=@Weight,
		ServerPeriod=@ServerPeriod,
		ServerType=@ServerType,
		ProClass=@ProClass,
		Properties=@Properties,
		Sales=@Sales,
		Proinfo=@Proinfo,
		Procontent=@Procontent,
		Clearimg=@Clearimg,
		Thumbnails=@Thumbnails,
		Producer=@Producer,
		Brand=@Brand,
		Allowed=@Allowed,
		Quota=@Quota,
		DownQuota=@DownQuota,
		Stock=@Stock,
		StockDown=@StockDown,
		JisuanFs=@JisuanFs,
		Rate=@Rate,
		Rateset=@Rateset,
		Dengji=@Dengji,
		ShiPrice=@ShiPrice,
		LinPrice=@LinPrice,
		Wholesales=@Wholesales,
		Wholesaleone=@Wholesaleone,
		Preset=@Preset,
		Integral=@Integral,
		Propeid=@Propeid,
		Recommend=@Recommend,
		Priority=@Priority,
		AllClickNum=@AllClickNum,
		UpdateTime=@UpdateTime,
		ModeTemplate=@ModeTemplate,
		AddUser=@AddUser,
		DownCar=@DownCar,
		AddTime=@AddTime,
		TableName=@TableName,
		Istrue=@Istrue,
		Isgood=@Isgood,
		MakeHtml=@MakeHtml,
		Sold=@Sold,
		isnew=@isnew,
		ishot=@ishot,
		isbest=@isbest,
		Wholesalesinfo=@Wholesalesinfo,
		ItemID=@ItemID,
		ComModelID=@ComModelID,
		Largess=@Largess,
		Largesspirx=@Largesspirx,
		ProjectType = @ProjectType,
		ProjectPronum = @ProjectPronum,
		ProjectMoney = @ProjectMoney,
		IntegralNum = @IntegralNum,
		PesentNames = @PesentNames,
		PesentNameid = @PesentNameid,
		GuessType=@GuessType,
		GuessXML=@GuessXML,
		FirstNodeID=@FirstNodeID
	where id=@id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Commodities_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Commodities_GetById]
	@id int
as
	select * from ZL_Commodities where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Commodities_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Commodities_Del]
	@id int
as
	delete from ZL_Commodities  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Commodities_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Commodities_Add]
	@id int,
	@Class int,
	@Nodeid int,
	@ModelID int,
	@Categoryid int,
	@ProCode varchar(50),
	@BarCode varchar(50),
	@Proname varchar(255),
	@Kayword varchar(255),
	@ProUnit varchar(50),
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@ProClass int,
	@Properties int,
	@Sales int,
	@Rateset int,
	@Proinfo text,
	@Procontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Producer varchar(255),
	@Brand varchar(50),
	@Allowed int,
	@Quota int,
	@DownQuota int,
	@Stock int,
	@StockDown int,
	@JisuanFs int,
	@Rate money,
	@Dengji int,
	@ShiPrice money,
	@LinPrice money,
	@Wholesales int,
	@Wholesaleone int,
	@Preset varchar(255),
	@Integral int,
	@Propeid int,
	@Recommend int,
	@Priority int,
	@AllClickNum int,
	@UpdateTime datetime,
	@ModeTemplate varchar(255),
	@AddUser varchar(50),
	@DownCar int,
	@AddTime datetime,
	@TableName varchar(50),
	@Istrue int,
	@Isgood int,
	@MakeHtml int,
	@Sold int,
	@isnew int,
	@ishot int,
	@isbest int,
	@Wholesalesinfo varchar(255),
	@ItemID int,
	@ComModelID int,
	@Largess int,
	@Largesspirx money,
	@ProjectType int,
	@ProjectPronum int,
	@ProjectMoney money,
	@IntegralNum int,
	@PesentNames nvarchar(255),
	@PesentNameid int,
	@GuessType int,
	@GuessXML nvarchar(1000),
	@FirstNodeID int
as
	DECLARE @OrderID int
	Set @OrderID=(select max(OrderID) from ZL_Commodities)+1
	insert into ZL_Commodities
(OrderID,Class,Nodeid,ModelID,Categoryid,ProCode,BarCode,Proname,Kayword,ProUnit,Weight,ServerPeriod,ServerType,ProClass,Properties,Sales,Proinfo,Procontent,Clearimg,Thumbnails,Producer,Brand,Allowed,Quota,DownQuota,Stock,StockDown,JisuanFs,Rate,Rateset,Dengji,ShiPrice,LinPrice,Wholesales,Wholesaleone,Preset,Integral,Propeid,Recommend,Priority,AllClickNum,UpdateTime,ModeTemplate,AddUser,DownCar,AddTime,TableName,Istrue,Isgood,MakeHtml,Sold,isnew,ishot,isbest,Wholesalesinfo,ItemID,ComModelID,Largess,Largesspirx,ProjectType,ProjectPronum,ProjectMoney,IntegralNum,PesentNames,PesentNameid,GuessType,GuessXML,FirstNodeID)
	values
(@OrderID,@Class,@Nodeid,@ModelID,@Categoryid,@ProCode,@BarCode,@Proname,@Kayword,@ProUnit,@Weight,@ServerPeriod,@ServerType,@ProClass,@Properties,@Sales,@Proinfo,@Procontent,@Clearimg,@Thumbnails,@Producer,@Brand,@Allowed,@Quota,@DownQuota,@Stock,@StockDown,@JisuanFs,@Rate,@Rateset,@Dengji,@ShiPrice,@LinPrice,@Wholesales,@Wholesaleone,@Preset,@Integral,@Propeid,@Recommend,@Priority,@AllClickNum,@UpdateTime,@ModeTemplate,@AddUser,@DownCar,@AddTime,@TableName,@Istrue,@Isgood,@MakeHtml,@Sold,@isnew,@ishot,@isbest,@Wholesalesinfo,@ItemID,@ComModelID,@Largess,@Largesspirx,@ProjectType,@ProjectPronum,@ProjectMoney,@IntegralNum,@PesentNames,@PesentNameid,@GuessType,@GuessXML,@FirstNodeID)

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_Reset]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_Reset]
(
	@GeneralID int
)
AS
UPDATE  ZL_CommonModel SET
	Status=0
	Where GeneralID=@GeneralID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_CreateDate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_CreateDate]
(
	@startTime datetime,
	@endTime datetime
)
AS
	select * from ZL_CommonModel Where (CreateTime between @startTime and @endTime) and IsCreate=0 order by GeneralID Desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_CreateID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_CreateID]
(
	@startID int,
	@endID int
)
AS
	select * from ZL_CommonModel Where (GeneralID between @startID and @endID) and IsCreate=0 order by GeneralID Desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_CreateAll]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_CreateAll]
 AS
	Select * from ZL_CommonModel Where IsCreate=0




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_Common]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_Common]
(
	@GeneralID int
)
AS
Select * from ZL_CommonModel
	Where GeneralID=@GeneralID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CommonModel_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_CommonModel_Update]
	@GeneralID int,
	@NodeID int,
	@ModelID int,
	@ItemID int,
	@TableName nvarchar(50),
	@Title nvarchar(255),
	@Inputer nvarchar(50),
	@Hits int,
	@Status int,
	@EliteLevel int,
	@InfoID nvarchar(255),
	@SpecialID nvarchar(255),
	@IsCreate int,
	@HtmlLink nvarchar(500),
	@Template nvarchar(255),
	@CreateTime DATETIME,
	@Tagkey nvarchar(1000),
	@UpDateTime DATETIME,
	@UpDateType int,
	@Titlecolor nvarchar(255),
	@PdfLink nvarchar(500),
	@Pronum int,
	@ProWeek int,
	@BidType int,
	@DefaultSkins int,
	@because_back nvarchar(200),
	@FirstNodeID int,
	@TitleStyle nvarchar(255)
as
	update ZL_CommonModel set 
		NodeID=@NodeID,
		ModelID=@ModelID,
		ItemID=@ItemID,
		TableName=@TableName,
		Title=@Title,
		Inputer=@Inputer,
		Hits=@Hits,
		Status=@Status,
		EliteLevel=@EliteLevel,
		InfoID=@InfoID,
		SpecialID=@SpecialID,
		IsCreate=@IsCreate,
		HtmlLink=@HtmlLink,
		Template=@Template,
		CreateTime=@CreateTime,
		Tagkey=@Tagkey,
		UpDateTime=@UpDateTime,
		UpDateType=@UpDateType,
		Titlecolor=@Titlecolor,
		PdfLink=@PdfLink,
		pronum=@pronum,
		ProWeek=@ProWeek,
		BidType=@BidType,
		DefaultSkins=@DefaultSkins,
		because_back = @because_back,
		FirstNodeID=@FirstNodeID,
		TitleStyle=@TitleStyle
	where GeneralID=@GeneralID


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_SetAudit]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_SetAudit]
(
	@Status int,
	@GeneralID int
)
AS
UPDATE  ZL_CommonModel SET
	Status=@Status
	Where GeneralID=@GeneralID
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_SetDel]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_SetDel]
(
	@GeneralID int
)
AS
UPDATE  ZL_CommonModel SET
	Status=-2
	Where GeneralID=@GeneralID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Content_ResetAll]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Content_ResetAll]
AS
UPDATE  ZL_CommonModel SET
	Status=0
	Where Status=-2




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Correct_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Correct_Add]
(
@CorrectID int,
@CorrectTitle nvarchar(255),
@CorrectUrl nvarchar(255),
@CorrectType int,
@CorrectDetail nvarchar(255),
@CorrectPer nvarchar(50),
@CorrectEmail nvarchar(50)
)
AS
Insert into ZL_Correct 
(
CorrectTitle,
CorrectUrl,
CorrectType,
CorrectDetail,
CorrectPer,
PerEmail
) values
(
@CorrectTitle,
@CorrectUrl,
@CorrectType,
@CorrectDetail,
@CorrectPer,
@CorrectEmail
)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Correct_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Correct_Del]
@CorrectID int
AS
Delete from ZL_Correct where CorrectID=@CorrectID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_GetSelect]
	@CS_ID int
AS

SELECT
	[CS_ID],
	[CS_Context],
	[CS_SendID],
	[CS_SendName],
	[CS_Ctouid],
	[CS_CtoName],
	[CS_AddTime],
	[CS_Type],
	[CS_OID],
	[CS_Remrk]
FROM
	[dbo].[ZL_CustomerService]
WHERE
	[CS_ID] = @CS_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_GetInsert]
	@CS_Context nvarchar(4000),
	@CS_SendID int,
	@CS_SendName nvarchar(50),
	@CS_Ctouid int,
	@CS_CtoName nvarchar(50),
	@CS_AddTime datetime,
	@CS_Type int,
	@CS_OID int,
	@CS_Remrk nvarchar(500),
	@CS_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_CustomerService] (
	[CS_Context],
	[CS_SendID],
	[CS_SendName],
	[CS_Ctouid],
	[CS_CtoName],
	[CS_AddTime],
	[CS_Type],
	[CS_OID],
	[CS_Remrk]
) VALUES (
	@CS_Context,
	@CS_SendID,
	@CS_SendName,
	@CS_Ctouid,
	@CS_CtoName,
	@CS_AddTime,
	@CS_Type,
	@CS_OID,
	@CS_Remrk
)

SET @CS_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_GetDelete]
	@CS_ID int
AS

DELETE FROM [dbo].[ZL_CustomerService]
WHERE
	[CS_ID] = @CS_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_InsertUpdate]
	@CS_ID int,
	@CS_Context nvarchar(4000),
	@CS_SendID int,
	@CS_SendName nvarchar(50),
	@CS_Ctouid int,
	@CS_CtoName nvarchar(50),
	@CS_AddTime datetime,
	@CS_Type int,
	@CS_OID int,
	@CS_Remrk nvarchar(500)
AS

IF EXISTS(SELECT [CS_ID] FROM [dbo].[ZL_CustomerService] WHERE [CS_ID] = @CS_ID)
BEGIN
	UPDATE [dbo].[ZL_CustomerService] SET
		[CS_Context] = @CS_Context,
		[CS_SendID] = @CS_SendID,
		[CS_SendName] = @CS_SendName,
		[CS_Ctouid] = @CS_Ctouid,
		[CS_CtoName] = @CS_CtoName,
		[CS_AddTime] = @CS_AddTime,
		[CS_Type] = @CS_Type,
		[CS_OID] = @CS_OID,
		[CS_Remrk] = @CS_Remrk
	WHERE
		[CS_ID] = @CS_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_CustomerService] (	
	[CS_Context],
	[CS_SendID],
	[CS_SendName],
	[CS_Ctouid],
	[CS_CtoName],
	[CS_AddTime],
	[CS_Type],
	[CS_OID],
	[CS_Remrk]
	) VALUES (
	@CS_Context,
	@CS_SendID,
	@CS_SendName,
	@CS_Ctouid,
	@CS_CtoName,
	@CS_AddTime,
	@CS_Type,
	@CS_OID,
	@CS_Remrk
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_Select_All]
AS


SELECT
	[CS_ID],
	[CS_Context],
	[CS_SendID],
	[CS_SendName],
	[CS_Ctouid],
	[CS_CtoName],
	[CS_AddTime],
	[CS_Type],
	[CS_OID],
	[CS_Remrk]
FROM
	[dbo].[ZL_CustomerService]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CustomerService_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_CustomerService_GetUpdate]
	@CS_ID int,
	@CS_Context nvarchar(4000),
	@CS_SendID int,
	@CS_SendName nvarchar(50),
	@CS_Ctouid int,
	@CS_CtoName nvarchar(50),
	@CS_AddTime datetime,
	@CS_Type int,
	@CS_OID int,
	@CS_Remrk nvarchar(500)
AS

UPDATE [dbo].[ZL_CustomerService] SET
	[CS_Context] = @CS_Context,
	[CS_SendID] = @CS_SendID,
	[CS_SendName] = @CS_SendName,
	[CS_Ctouid] = @CS_Ctouid,
	[CS_CtoName] = @CS_CtoName,
	[CS_AddTime] = @CS_AddTime,
	[CS_Type] = @CS_Type,
	[CS_OID] = @CS_OID,
	[CS_Remrk] = @CS_Remrk
WHERE
	[CS_ID] = @CS_ID


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Source_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Source_Update] 
(
	@ID int,
    @Type varchar(50),
    @Name varchar(50),
    @Passed bit,
    @onTop bit,
    @IsElite bit,
    @Hits int,
    @LastUseTime DateTime,
    @Photo varchar(50),
    @Intro nvarchar(255),
    @Address varchar(50),
    @Tel varchar(50),
    @Fax varchar(50),
    @Mail varchar(50),
    @Email varchar(50),
    @ZipCode int,
    @HomePage varchar(50),
    @Im varchar(50),
    @ContacterName varchar(50)
)
AS
	IF @ID > 0
	BEGIN
		UPDATE ZL_Source SET
		Type=@Type,[Name]=@Name,Passed=@Passed,onTop=@onTop,IsElite=@IsElite,Hits=@Hits,LastUseTime=@LastUseTime,Photo=@Photo,Intro=@Intro,Address=@Address,Tel=@Tel,Fax=@Fax,Mail=@Mail,Email=@Email,ZipCode=@ZipCode,HomePage=@HomePage,Im=@Im,Contacter=@ContacterName
		WHERE ID=@ID
		
	END





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Source_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Source_Insert] 
(
    @Type varchar(50),
    @Name varchar(50),
    @Passed bit,
    @onTop bit,
    @IsElite bit,
    @Hits int,
    @LastUseTime DateTime,
    @Photo varchar(50),
    @Intro nvarchar(255),
    @Address varchar(50),
    @Tel varchar(50),
    @Fax varchar(50),
    @Mail varchar(50),
    @Email varchar(50),
    @ZipCode int,
    @HomePage varchar(50),
    @Im varchar(50),
    @ContacterName varchar(50),
    @ID int
)
AS
	INSERT INTO
	ZL_Source(Type,Name,Passed,onTop,IsElite,Hits,LastUseTime,Photo,Intro,Address,Tel,Fax,Mail,Email,ZipCode,HomePage,Im,Contacter) VALUES(@Type,@Name,@Passed,@onTop,@IsElite,@Hits,@LastUseTime,@Photo,@Intro,@Address,@Tel,@Fax,@Mail,@Email,@ZipCode,@HomePage,@Im,@ContacterName)





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Source_GetSourceInfoByID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Source_GetSourceInfoByID]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
		SELECT
		ID,
		Type,
		[Name],
		Passed,
		onTop,
		IsElite,
		Hits,
		LastUseTime,
		Photo,
		Intro,
		Address,
		Tel,
		Fax,
		Mail,
		Email,
		ZipCode,
		HomePage,
		Im,
		Contacter
		FROM ZL_Source WHERE ID=@ID
	END
	
	RETURN





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Source_GetSourceInfo]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Source_GetSourceInfo] 
AS
		SELECT
				ID,
				Type,
				[Name],
				Passed,
				onTop,
				IsElite,
				Hits,
				LastUseTime,
				Photo,
				Intro,
				Address,
				Tel,
				Fax,
				Mail,
				Email,
				ZipCode,
				HomePage,
				Im,
				Contacter
				FROM ZL_Source ORDER BY ID DESC 	
	RETURN





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Source_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Source_Delete] 
(
    @ID nvarchar(100)
)
AS
	IF @ID IS NOT NULL 
	BEGIN
		DELETE FROM ZL_Source WHERE ID in(@ID)
	END





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Daffiche_InsertUpdate]
	@Dafficheid int,
	@DafficheTitle nvarchar(1000),
	@Duserstate int,
	@Dsendto int,
	@Daddtime datetime,
	@DafficheContent ntext,
	@DendTime datetime
AS

IF EXISTS(SELECT [Dafficheid] FROM [dbo].[ZL_Daffiche] WHERE [Dafficheid] = @Dafficheid)
BEGIN
	UPDATE [dbo].[ZL_Daffiche] SET
		[DafficheTitle] = @DafficheTitle,
		[Duserstate] = @Duserstate,
		[Dsendto] = @Dsendto,
		[Daddtime] = @Daddtime,
		[DafficheContent] = @DafficheContent,
		[DendTime] = @DendTime
	WHERE
		[Dafficheid] = @Dafficheid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Daffiche] (	
	[DafficheTitle],
	[Duserstate],
	[Dsendto],
	[Daddtime],
	[DafficheContent],
	[DendTime]
	) VALUES (
	@DafficheTitle,
	@Duserstate,
	@Dsendto,
	@Daddtime,
	@DafficheContent,
	@DendTime
	)

END


SELECT * FROM ZL_DChat WHERE  (ChatType=1 or ChatType=3) and Caddtime>''2009-03-23 10:19:45''

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_GetDelete]
	@ChatID int
AS

DELETE FROM [dbo].[ZL_DChat]
WHERE
	[ChatID] = @ChatID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_Select_All]
AS


SELECT
	[ChatID],
	[Ctitle],
	[Ccontent],
	[Caddtime],
	[Cadduser],
	[Ctouid],
	[Ctouname],
	[ChatType]
FROM
	[dbo].[ZL_DChat]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_InsertUpdate]
	@ChatID int,
	@Ctitle nvarchar(1000),
	@Ccontent ntext,
	@Caddtime datetime,
	@Cadduser nvarchar(255),
	@Ctouid int,
	@Ctouname nvarchar(255),
	@ChatType int
AS

IF EXISTS(SELECT [ChatID] FROM [dbo].[ZL_DChat] WHERE [ChatID] = @ChatID)
BEGIN
	UPDATE [dbo].[ZL_DChat] SET
		[Ctitle] = @Ctitle,
		[Ccontent] = @Ccontent,
		[Caddtime] = @Caddtime,
		[Cadduser] = @Cadduser,
		[Ctouid] = @Ctouid,
		[Ctouname] = @Ctouname,
		[ChatType] = @ChatType
	WHERE
		[ChatID] = @ChatID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_DChat] (	
	[Ctitle],
	[Ccontent],
	[Caddtime],
	[Cadduser],
	[Ctouid],
	[Ctouname],
	[ChatType]
	) VALUES (
	@Ctitle,
	@Ccontent,
	@Caddtime,
	@Cadduser,
	@Ctouid,
	@Ctouname,
	@ChatType
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_GetSelect]
	@ChatID int
AS

SELECT
	[ChatID],
	[Ctitle],
	[Ccontent],
	[Caddtime],
	[Cadduser],
	[Ctouid],
	[Ctouname],
	[ChatType]
FROM
	[dbo].[ZL_DChat]
WHERE
	[ChatID] = @ChatID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_GetUpdate]
	@ChatID int,
	@Ctitle nvarchar(1000),
	@Ccontent ntext,
	@Caddtime datetime,
	@Cadduser nvarchar(255),
	@Ctouid int,
	@Ctouname nvarchar(255),
	@ChatType int
AS

UPDATE [dbo].[ZL_DChat] SET
	[Ctitle] = @Ctitle,
	[Ccontent] = @Ccontent,
	[Caddtime] = @Caddtime,
	[Cadduser] = @Cadduser,
	[Ctouid] = @Ctouid,
	[Ctouname] = @Ctouname,
	[ChatType] = @ChatType
WHERE
	[ChatID] = @ChatID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DChat_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_DChat_GetInsert]
	@Ctitle nvarchar(1000),
	@Ccontent ntext,
	@Caddtime datetime,
	@Cadduser nvarchar(255),
	@Ctouid int,
	@Ctouname nvarchar(255),
	@ChatType int,
	@ChatID int OUTPUT
AS

INSERT INTO [dbo].[ZL_DChat] (
	[Ctitle],
	[Ccontent],
	[Caddtime],
	[Cadduser],
	[Ctouid],
	[Ctouname],
	[ChatType]
) VALUES (
	@Ctitle,
	@Ccontent,
	@Caddtime,
	@Cadduser,
	@Ctouid,
	@Ctouname,
	@ChatType
)

SET @ChatID = SCOPE_IDENTITY()
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SpecCate_AddUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_SpecCate_AddUpdate]	
(
    @SpecCateID int,
    @SpecCateName NVarChar(50),    
    @SpecCateDir NVarChar(50),
    @SpecCateDesc nvarchar(255),
    @OpenType bit,
    @FileExt int, 
    @ListTemplate nvarchar(255),
    @NodeID int,
    @SpecCateDescriptive nvarchar(255),
    @SpecCateKeyword nvarchar(50),
    @SpecCatePicUrl nvarchar(50),
    @SpecCateTips nvarchar(50)
)
AS
if(@SpecCateID=0)
BEGIN	
INSERT INTO 
[ZL_SpecCate] 
(  
	[SpecCateName],    
	[SpecCateDir], 
	[SpecCateDesc],
	[OpenType],
	[FileExt],  
	[ListTemplate],
	[NodeID],
	[SpecCateDescriptive],
    [SpecCateKeyword],
    [SpecCatePicUrl],
    [SpecCateTips]
	)
	VALUES
	(
	@SpecCateName,
	@SpecCateDir,
	@SpecCateDesc,
	@OpenType,
	@FileExt,
	@ListTemplate,
	@NodeID,
	@SpecCateDescriptive,
    @SpecCateKeyword,
    @SpecCatePicUrl,
    @SpecCateTips
	)
END
ELSE
BEGIN
	update ZL_SpecCate set [SpecCateName]=@SpecCateName,
	[SpecCateDir]=@SpecCateDir, 
	[SpecCateDesc]=@SpecCateDesc,
	[OpenType]=@OpenType,
	[FileExt]=@FileExt,  
	[ListTemplate]=@ListTemplate,
	[NodeID]=@NodeID,
	[SpecCateDescriptive]=@SpecCateDescriptive,
    [SpecCateKeyword]=@SpecCateKeyword,
    [SpecCatePicUrl]=@SpecCatePicUrl,
    [SpecCateTips]=@SpecCateTips
where SpecCateID=@SpecCateID		
END
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SpecCate_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_SpecCate_Del]
(
    @SpecCateID int
)
AS
delete from ZL_SpecInfo where SpecialID in (select SpecialID from ZL_Special where SpecCate=@SpecCateID)
Delete from ZL_Special where SpecCate=@SpecCateID
Delete from ZL_SpecCate where SpecCateID=@SpecCateID
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_DShowUser_Select_All]
AS
SELECT
	[D_Sid],
	[D_ShowUserid],
	[D_ShowX],
	[D_ShowY],
	[DupdateTime],
	[D_Remark],
	[D_ShopID]
FROM
	[dbo].[ZL_DShowUser]
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_DShowUser_InsertUpdate]
	@D_Sid int,
	@D_ShowUserid int,
	@D_ShowX int,
	@D_ShowY int,
	@DupdateTime datetime,
	@D_Remark nvarchar(100),
	@D_ShopID int
AS
IF EXISTS(SELECT [D_Sid] FROM [dbo].[ZL_DShowUser] WHERE [D_Sid] = @D_Sid)
BEGIN
	UPDATE [dbo].[ZL_DShowUser] SET
		[D_ShowUserid] = @D_ShowUserid,
		[D_ShowX] = @D_ShowX,
		[D_ShowY] = @D_ShowY,
		[DupdateTime] = @DupdateTime,
		[D_Remark] = @D_Remark,
		[D_ShopID] = @D_ShopID
	WHERE
		[D_Sid] = @D_Sid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_DShowUser] (	
	[D_ShowUserid],
	[D_ShowX],
	[D_ShowY],
	[DupdateTime],
	[D_Remark],
	[D_ShopID]
	) VALUES (
	@D_ShowUserid,
	@D_ShowX,
	@D_ShowY,
	@DupdateTime,
	@D_Remark,
	@D_ShopID
	)
END
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_DShowUser_GetUpdate]
	@D_Sid int,
	@D_ShowUserid int,
	@D_ShowX int,
	@D_ShowY int,
	@DupdateTime datetime,
	@D_Remark nvarchar(100),
	@D_ShopID int
AS
UPDATE [dbo].[ZL_DShowUser] SET
	[D_ShowUserid] = @D_ShowUserid,
	[D_ShowX] = @D_ShowX,
	[D_ShowY] = @D_ShowY,
	[DupdateTime] = @DupdateTime,
	[D_Remark] = @D_Remark,
	[D_ShopID] = @D_ShopID
WHERE
	[D_Sid] = @D_Sid
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_DShowUser_GetInsert]
	@D_ShowUserid int,
	@D_ShowX int,
	@D_ShowY int,
	@DupdateTime datetime,
	@D_Remark nvarchar(100),
	@D_ShopID int,
	@D_Sid int OUTPUT
AS

INSERT INTO [dbo].[ZL_DShowUser] (
	[D_ShowUserid],
	[D_ShowX],
	[D_ShowY],
	[DupdateTime],
	[D_Remark],
	[D_ShopID]
) VALUES (
	@D_ShowUserid,
	@D_ShowX,
	@D_ShowY,
	@DupdateTime,
	@D_Remark,
	@D_ShopID
)

SET @D_Sid = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_DShowUser_GetSelect]
	@D_Sid int
AS

SELECT
	[D_Sid],
	[D_ShowUserid],
	[D_ShowX],
	[D_ShowY],
	[DupdateTime],
	[D_Remark],
	[D_ShopID]
FROM
	[dbo].[ZL_DShowUser]
WHERE
	[D_Sid] = @D_Sid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DShowUser_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_DShowUser_GetDelete]
	@D_Sid int
AS

DELETE FROM [dbo].[ZL_DShowUser]
WHERE
	[D_Sid] = @D_Sid


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SpecInfo_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_SpecInfo_Add]
@SpecialID int,
@InfoID int
AS
Insert Into ZL_SpecInfo (SpecialID,InfoID) values(@SpecialID,@InfoID)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SpecInfo_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_SpecInfo_Del]
@SpecInfoID int
AS
Delete from ZL_SpecInfo where SpecInfoID=@SpecInfoID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Spec_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Spec_Del]
(
    @SpecID int
)
AS
delete from ZL_SpecInfo where SpecialID=@SpecID
Delete from ZL_Special where SpecID=@SpecID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_GetDelete]
	@Dafficheid int
AS

DELETE FROM [dbo].[ZL_Daffiche]
WHERE
	[Dafficheid] = @Dafficheid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_Select_All]
AS


SELECT
	[Dafficheid],
	[DafficheTitle],
	[Duserstate],
	[Dsendto],
	[Daddtime],
	[DafficheContent],
	[DendTime]
FROM
	[dbo].[ZL_Daffiche]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_GetUpdate]
	@Dafficheid int,
	@DafficheTitle nvarchar(1000),
	@Duserstate int,
	@Dsendto int,
	@Daddtime datetime,
	@DafficheContent ntext,
	@DendTime datetime
AS

UPDATE [dbo].[ZL_Daffiche] SET
	[DafficheTitle] = @DafficheTitle,
	[Duserstate] = @Duserstate,
	[Dsendto] = @Dsendto,
	[Daddtime] = @Daddtime,
	[DafficheContent] = @DafficheContent,
	[DendTime] = @DendTime
WHERE
	[Dafficheid] = @Dafficheid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_GetInsert]
	@DafficheTitle nvarchar(1000),
	@Duserstate int,
	@Dsendto int,
	@Daddtime datetime,
	@DafficheContent ntext,
	@DendTime datetime,
	@Dafficheid int OUTPUT
AS

INSERT INTO [dbo].[ZL_Daffiche] (
	[DafficheTitle],
	[Duserstate],
	[Dsendto],
	[Daddtime],
	[DafficheContent],
	[DendTime]
) VALUES (
	@DafficheTitle,
	@Duserstate,
	@Dsendto,
	@Daddtime,
	@DafficheContent,
	@DendTime
)

SET @Dafficheid = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Daffiche_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Daffiche_GetSelect]
	@Dafficheid int
AS

SELECT
	[Dafficheid],
	[DafficheTitle],
	[Duserstate],
	[Dsendto],
	[Daddtime],
	[DafficheContent],
	[DendTime]
FROM
	[dbo].[ZL_Daffiche]
WHERE
	[Dafficheid] = @Dafficheid


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Spec_AddUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Spec_AddUpdate]	
(
    @SpecID int,
    @SpecName NVarChar(50),    
    @SpecDir NVarChar(50),
    @SpecDesc nvarchar(255),	
    @OpenType bit,
    @SpecCate int,
    @ListFileExt int,
    @ListFileRule int,	
    @ListTemplate nvarchar(255),
    @SpecDescriptive nvarchar(255),
    @SpecKeyword nvarchar(50),
    @SpecPicUrl nvarchar(50),
    @SpecTips nvarchar(50)
)
AS
if(@SpecID=0)
BEGIN	
INSERT INTO 
[ZL_Special] 
(  
	[SpecName],    
	[SpecDir], 
	[SpecDesc],
	[OpenType],
	[SpecCate],
	[ListFileExt],
	[ListFileRule],
	[ListTemplate],
	[SpecDescriptive],
	[SpecKeyword],
	[SpecPicUrl],
	[SpecTips]	
	)
	VALUES
	(
	@SpecName,
	@SpecDir,
	@SpecDesc,
	@OpenType,
	@SpecCate,
	@ListFileExt,
	@ListFileRule,
	@ListTemplate,
	@SpecDescriptive,
	@SpecKeyword,
	@SpecPicUrl,
	@SpecTips
	)
END
ELSE
BEGIN
	update ZL_Special set [SpecName]=@SpecName,
	[SpecDir]=@SpecDir, 
	[SpecDesc]=@SpecDesc,
	[OpenType]=@OpenType,
	[SpecCate]=@SpecCate,
	[ListFileExt]=@ListFileExt,
	[ListFileRule]=@ListFileRule,
	[ListTemplate]=@ListTemplate,
	[SpecDescriptive]=@SpecDescriptive,
	[SpecKeyword]=@SpecKeyword,
	[SpecPicUrl]=@SpecPicUrl,
	[SpecTips]=@SpecTips
where SpecID=@SpecID		
END




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dictionary_Set]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[PR_Dictionary_Set]
(
@DicID int,
@IsUsed bit
)
AS
BEGIN
   update ZL_DataDic set IsUsed=@IsUsed where DicID=@DicID
END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dictionary_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[PR_Dictionary_Del]
(
@DicID int
)
AS
BEGIN
   delete from ZL_DATADIC where DicID=@DicID
END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dictionary_AddUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[PR_Dictionary_AddUpdate]
(
@DicID int,
@DicCate int,
@DicName nvarchar(50),
@IsUsed bit
)
AS
BEGIN
   if @DicID=0
    insert into ZL_DATADIC (DicCate,DicName,IsUsed) values(@DicCate,@DicName,@IsUsed)
   else
    update ZL_DATADIC set DicName=@DicName,IsUsed=@IsUsed where DicID=@DicID
END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DicCate_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[PR_DicCate_Del]
(
@DicCateID int
)
AS
BEGIN
   delete from ZL_DataDic where DicCate=@DicCateID
   delete from ZL_DataDicCategory where DicCateID=@DicCateID
END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DicCate_AddOrUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_DicCate_AddOrUpdate]
(
@DicCateID int,
@CategoryName nvarchar(50),
@IsUsed bit
)
AS
BEGIN
   if @DicCateID=0 
    insert into ZL_DataDicCategory (CategoryName,IsUsed) values (@CategoryName,@IsUsed)
   else
    update ZL_DataDicCategory set CategoryName=@CategoryName,IsUsed=@IsUsed where DicCateID=@DicCateID
END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DicCate_Set]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[PR_DicCate_Set]
(
@DicCateID int,
@IsUsed bit
)
AS
BEGIN
   update ZL_DataDicCategory set IsUsed=@IsUsed where DicCateID=@DicCateID
END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Stock_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Stock_Update]
	@id int,
	@danju varchar(50),
	@stocktype int,
	@proname varchar(50),
	@addtime datetime,
	@adduser varchar(50),
	@content ntext,
	@proid int,
	@Pronum int
as
	update ZL_Stock set 
		danju=@danju,
		stocktype=@stocktype,
		proname=@proname,
		addtime=@addtime,
		adduser=@adduser,
		content=@content,
		proid=@proid,
		Pronum=@Pronum
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Stock_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Stock_Del]
	@id int
as
	delete from ZL_Stock  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Stock_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Stock_Add]
	@id int,
	@danju varchar(50),
	@stocktype int,
	@proname varchar(50),
	@addtime datetime,
	@adduser varchar(50),
	@content ntext,
	@proid int,
	@Pronum int
as
	insert into ZL_Stock(danju,stocktype,proname,addtime,adduser,content,proid,Pronum)
	values (@danju,@stocktype,@proname,@addtime,@adduser,@content,@proid,@Pronum)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Stock_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Stock_GetById]
	@id int
as
	select * from ZL_Stock where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_InsertUpdate]
	@Dboothid int,
	@DboothName nvarchar(255),
	@DboothUser nvarchar(50),
	@DboothUserid int,
	@DboothLogo nvarchar(1000),
	@DboothAddtime datetime,
	@DboothType int
AS

IF EXISTS(SELECT [Dboothid] FROM [dbo].[ZL_Dbooth] WHERE [Dboothid] = @Dboothid)
BEGIN
	UPDATE [dbo].[ZL_Dbooth] SET
		[DboothName] = @DboothName,
		[DboothUser] = @DboothUser,
		[DboothUserid] = @DboothUserid,
		[DboothLogo] = @DboothLogo,
		[DboothAddtime] = @DboothAddtime,
		[DboothType] = @DboothType
	WHERE
		[Dboothid] = @Dboothid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Dbooth] (	
	[DboothName],
	[DboothUser],
	[DboothUserid],
	[DboothLogo],
	[DboothAddtime],
	[DboothType]
	) VALUES (
	@DboothName,
	@DboothUser,
	@DboothUserid,
	@DboothLogo,
	@DboothAddtime,
	@DboothType
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_Select_All]
AS


SELECT
	[Dboothid],
	[DboothName],
	[DboothUser],
	[DboothUserid],
	[DboothLogo],
	[DboothAddtime],
	[DboothType]
FROM
	[dbo].[ZL_Dbooth]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_GetUpdate]
	@Dboothid int,
	@DboothName nvarchar(255),
	@DboothUser nvarchar(50),
	@DboothUserid int,
	@DboothLogo nvarchar(1000),
	@DboothAddtime datetime,
	@DboothType int
AS

UPDATE [dbo].[ZL_Dbooth] SET
	[DboothName] = @DboothName,
	[DboothUser] = @DboothUser,
	[DboothUserid] = @DboothUserid,
	[DboothLogo] = @DboothLogo,
	[DboothAddtime] = @DboothAddtime,
	[DboothType] = @DboothType
WHERE
	[Dboothid] = @Dboothid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_GetSelect]
	@Dboothid int
AS

SELECT
	[Dboothid],
	[DboothName],
	[DboothUser],
	[DboothUserid],
	[DboothLogo],
	[DboothAddtime],
	[DboothType]
FROM
	[dbo].[ZL_Dbooth]
WHERE
	[Dboothid] = @Dboothid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_GetDelete]
	@Dboothid int
AS

DELETE FROM [dbo].[ZL_Dbooth]
WHERE
	[Dboothid] = @Dboothid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dbooth_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dbooth_GetInsert]
	@DboothName nvarchar(255),
	@DboothUser nvarchar(50),
	@DboothUserid int,
	@DboothLogo nvarchar(1000),
	@DboothAddtime datetime,
	@DboothType int,
	@Dboothid int OUTPUT
AS

INSERT INTO [dbo].[ZL_Dbooth] (
	[DboothName],
	[DboothUser],
	[DboothUserid],
	[DboothLogo],
	[DboothAddtime],
	[DboothType]
) VALUES (
	@DboothName,
	@DboothUser,
	@DboothUserid,
	@DboothLogo,
	@DboothAddtime,
	@DboothType
)

SET @Dboothid = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Delivier_Add]
	@id int,
	@deliname varchar(50),
	@deliinfo varchar(255),
	@delitype money,
	@shuilv money,
	@selectto int,
	@isuse int,
             @istype int
as
	insert into ZL_Delivier(deliname,deliinfo,delitype,shuilv,selectto,isuse,istype)
	values (@deliname,@deliinfo,@delitype,@shuilv,@selectto,@isuse,@istype )

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Delivier_Del]
	@id int
as
	delete from ZL_Delivier  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Delivier_GetById]
	@id int
as
	select * from ZL_Delivier where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Delivier_Update]
	@id int,
	@deliname varchar(50),
	@deliinfo varchar(255),
	@delitype money,
	@shuilv money,
	@selectto int,
	@isuse int,
@istype int
as
	update ZL_Delivier set 
		deliname=@deliname,
		deliinfo=@deliinfo,
		delitype=@delitype,
		shuilv=@shuilv,
		selectto=@selectto,
		isuse=@isuse,
                          istype=@istype
	where id=@id

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Add3]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Delivier_Add3]
	@id int,
	@deliname varchar(50),
	@deliinfo varchar(255),
	@shuilv money,
	@selectto int,
	@isuse int,
	@istype int,
	@citymoney money,
	@citykg float,
	@bigcitykg float,
	@bigcitymoney money,
	@maxcity money,
	@outmoney money,
	@outkg float,
	@bigoutkg float,
	@bigoutmoney money,
	@maxout money,
	@city   nvarchar(100)
as
	insert into ZL_Delivier(deliname,deliinfo,shuilv,selectto,isuse,istype,citymoney,citykg,bigcitykg,bigcitymoney,maxcity,outmoney,outkg,bigoutkg,bigoutmoney,maxout,city)
	values (@deliname,@deliinfo,@shuilv,@selectto,@isuse,@istype,@citymoney,@citykg,@bigcitykg,@bigcitymoney,@maxcity,@outmoney,@outkg,@bigoutkg,@bigoutmoney,@maxout ,@city)

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Add2]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE proc [dbo].[PR_Delivier_Add2]
	@id int,
	@deliname varchar(50),
	@deliinfo varchar(255),

	@shuilv money,
	@selectto int,
	@isuse int,
        @istype int
as
	insert into ZL_Delivier(deliname,deliinfo,shuilv,selectto,isuse,istype)
	values (@deliname,@deliinfo,@shuilv,@selectto,@isuse,@istype )

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Update2]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_Delivier_Update2]
	@id int,
	@deliname varchar(50),
	@deliinfo varchar(255),
	@shuilv money,
	@selectto int,
	@isuse int,
@istype int
as
	update ZL_Delivier set 
		deliname=@deliname,
		deliinfo=@deliinfo,
		shuilv=@shuilv,
		selectto=@selectto,
		isuse=@isuse,
istype=@istype
	where id=@id

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Delivier_Update3]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE proc [dbo].[PR_Delivier_Update3]
	@id int,
	@deliname varchar(50),
	@deliinfo varchar(255),
	@shuilv money,
	@selectto int,
	@isuse int,
	@istype int,
	@citymoney money,
	@citykg float,
	@bigcitykg float,
	@bigcitymoney money,
	@maxcity money,
	@outmoney money,
	@outkg float,
	@bigoutkg float,
	@bigoutmoney money,
	@maxout money,
	@city nvarchar(100)
as
update ZL_Delivier set 
	deliname=@deliname,
	deliinfo=@deliinfo,
	shuilv=@shuilv,
	selectto=@selectto,
	isuse=@isuse,
       	istype=@istype,
	citymoney=@citymoney,
	citykg=@citykg,
	bigcitykg=@bigcitykg,
	bigcitymoney=@bigcitymoney,
	maxcity=@maxcity,
	outmoney=@outmoney,
	outkg=@outkg,
	bigoutkg=@bigoutkg,
	bigoutmoney=@bigoutmoney,
	maxout=@maxout,
	city=@city
where id=@id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dinformation_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Dinformation_InsertUpdate]
	@Boothstart int,
	@Boothnum int,
	@BootNametop nvarchar(255),
	@ReCreate int,
	@AutoCreate int,
	@BootRightTemp nvarchar(500),
	@BootTopTemp nvarchar(500),
	@BootBottomTemp nvarchar(500),
	@BootProinfoTemp nvarchar(500),
	@BootProlistTemp nvarchar(500)
AS

IF EXISTS(SELECT [Boothstart] FROM [dbo].[ZL_Dinformation])
BEGIN
	UPDATE [dbo].[ZL_Dinformation] SET
		[Boothnum] = @Boothnum,
		[BootNametop] = @BootNametop,
		[ReCreate] = @ReCreate,
		[AutoCreate] = @AutoCreate,
		[Boothstart] = @Boothstart,
		[BootRightTemp]=@BootRightTemp,
		[BootTopTemp]=@BootTopTemp,
		[BootBottomTemp]=@BootBottomTemp,
		[BootProinfoTemp]=@BootProinfoTemp,
		[BootProlistTemp] =@BootProlistTemp
END
ELSE
BEGIN
INSERT INTO [dbo].[ZL_Dinformation] (
	[Boothstart],
	[Boothnum],
	[BootNametop],
	[ReCreate],
	[AutoCreate],
	[BootRightTemp],
	[BootTopTemp],
	[BootBottomTemp],
	[BootProinfoTemp],
	[BootProlistTemp]
) VALUES (
	@Boothstart,
	@Boothnum,
	@BootNametop,
	@ReCreate,
	@AutoCreate,
	@BootRightTemp,
	@BootTopTemp,
	@BootBottomTemp,
	@BootProinfoTemp,
	@BootProlistTemp
)

END
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dinformation_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Dinformation_Select_All]
AS


SELECT
	[Boothstart],
	[Boothnum],
	[BootNametop],
	[ReCreate],
	[AutoCreate],
	[BootRightTemp],
	[BootTopTemp],
	[BootBottomTemp],
	[BootProinfoTemp],
	[BootProlistTemp]

FROM
	[dbo].[ZL_Dinformation]
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_Select_Paged]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_Select_Paged]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[Noteid],
	[UserID],
	[UserName],
	[SchoolID],
	[RoomID],
	[Addtime],
	[StatusType],
	[Auditing]
FROM
	[dbo].[ZL_Student]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[Noteid],
	[UserID],
	[UserName],
	[SchoolID],
	[RoomID],
	[Addtime],
	[StatusType],
	[StudentType],
	[StudentTypeTitle],
	[Auditing],
	[AuditingContext],
	[AuditingUserID],
	[AuditingUserName]
FROM
	[dbo].[ZL_Student]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_GetSelect]
	@Noteid int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[Noteid],
	[UserID],
	[UserName],
	[SchoolID],
	[RoomID],
	[Addtime],
	[StatusType],
	[StudentType],
	[StudentTypeTitle],
	[Auditing],
	[AuditingContext],
	[AuditingUserID],
	[AuditingUserName]
FROM
	[dbo].[ZL_Student]
WHERE
	[Noteid] = @Noteid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_InsertUpdate]
	@Noteid int,
	@UserID int,
	@UserName nvarchar(255),
	@SchoolID int,
	@RoomID int,
	@Addtime datetime,
	@StatusType int,
	@StudentType int,
	@StudentTypeTitle nvarchar(50),
	@Auditing bit,
	@AuditingContext nvarchar(50),
	@AuditingUserID int,
	@AuditingUserName nvarchar(255)
AS
SET NOCOUNT ON

IF EXISTS(SELECT [Noteid] FROM [dbo].[ZL_Student] WHERE [Noteid] = @Noteid)
BEGIN
	UPDATE [dbo].[ZL_Student] SET
		[UserID] = @UserID,
		[UserName] = @UserName,
		[SchoolID] = @SchoolID,
		[RoomID] = @RoomID,
		[Addtime] = @Addtime,
		[StatusType] = @StatusType,
		[StudentType] = @StudentType,
		[StudentTypeTitle] = @StudentTypeTitle,
		[Auditing] = @Auditing,
		[AuditingContext] = @AuditingContext,
		[AuditingUserID] = @AuditingUserID,
		[AuditingUserName] = @AuditingUserName
	WHERE
		[Noteid] = @Noteid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Student] (	
	[UserID],
	[UserName],
	[SchoolID],
	[RoomID],
	[Addtime],
	[StatusType],
	[StudentType],
	[StudentTypeTitle],
	[Auditing],
	[AuditingContext],
	[AuditingUserID],
	[AuditingUserName]
	) VALUES (
	@UserID,
	@UserName,
	@SchoolID,
	@RoomID,
	@Addtime,
	@StatusType,
	@StudentType,
	@StudentTypeTitle,
	@Auditing,
	@AuditingContext,
	@AuditingUserID,
	@AuditingUserName
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_GetUpdate]
	@Noteid int,
	@UserID int,
	@UserName nvarchar(255),
	@SchoolID int,
	@RoomID int,
	@Addtime datetime,
	@StatusType int,
	@StudentType int,
	@StudentTypeTitle nvarchar(50),
	@Auditing bit,
	@AuditingContext nvarchar(50),
	@AuditingUserID int,
	@AuditingUserName nvarchar(255)
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_Student] SET
	[UserID] = @UserID,
	[UserName] = @UserName,
	[SchoolID] = @SchoolID,
	[RoomID] = @RoomID,
	[Addtime] = @Addtime,
	[StatusType] = @StatusType,
	[StudentType] = @StudentType,
	[StudentTypeTitle] = @StudentTypeTitle,
	[Auditing] = @Auditing,
	[AuditingContext] = @AuditingContext,
	[AuditingUserID] = @AuditingUserID,
	[AuditingUserName] = @AuditingUserName
WHERE
	[Noteid] = @Noteid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_GetDelete]
	@Noteid int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_Student]
WHERE
	[Noteid] = @Noteid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Student_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Student_GetInsert]
	@UserID int,
	@UserName nvarchar(255),
	@SchoolID int,
	@RoomID int,
	@Addtime datetime,
	@StatusType int,
	@StudentType int,
	@StudentTypeTitle nvarchar(50),
	@Auditing bit,
	@AuditingContext nvarchar(50),
	@AuditingUserID int,
	@AuditingUserName nvarchar(255),
	@Noteid int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_Student] (
	[UserID],
	[UserName],
	[SchoolID],
	[RoomID],
	[Addtime],
	[StatusType],
	[StudentType],
	[StudentTypeTitle],
	[Auditing],
	[AuditingContext],
	[AuditingUserID],
	[AuditingUserName]
) VALUES (
	@UserID,
	@UserName,
	@SchoolID,
	@RoomID,
	@Addtime,
	@StatusType,
	@StudentType,
	@StudentTypeTitle,
	@Auditing,
	@AuditingContext,
	@AuditingUserID,
	@AuditingUserName
)

SET @Noteid = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_GetInsert]
	@SubscribeName nvarchar(100),
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_Subscribe] (
	[SubscribeName]
) VALUES (
	@SubscribeName
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_Subscribe]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_GetUpdate]
	@ID int,
	@SubscribeName nvarchar(100)
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_Subscribe] SET
	[SubscribeName] = @SubscribeName
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SubscribeName]
FROM
	[dbo].[ZL_Subscribe]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SubscribeName]
FROM
	[dbo].[ZL_Subscribe]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Subscribe_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Subscribe_InsertUpdate]
	@ID int,
	@SubscribeName nvarchar(100)
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_Subscribe] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_Subscribe] SET
		[SubscribeName] = @SubscribeName
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Subscribe] (	
	[SubscribeName]
	) VALUES (
	@SubscribeName
	)

END



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_GetList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_GetList]
AS
	SET NOCOUNT ON
	SELECT
	     ServerID,ServerName,ServerUrl,ServerLogo,OrderID,ShowType,UrlEncrypt,EncryptKey,TimeEncrypt,UpTimeuti,Encryptime,Addtime
    FROM 
         ZL_DownServer 
	ORDER BY OrderID ASC 
	RETURN
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_Update] 
	(
@ServerID int,
@ServerName nvarchar(50),
@ServerUrl nvarchar(50),
@ServerLogo nvarchar(255),
@OrderID int,
@ShowType int,
@UrlEncrypt int,
@EncryptKey nvarchar(255),
@TimeEncrypt int,
@UpTimeuti int,
@Encryptime datetime,
@Addtime datetime,
@ReadRoot nvarchar(1000)
	)
AS
	--SET NOCOUNT ON 
	UPDATE ZL_DownServer 
	SET ServerName=@ServerName,ServerUrl=@ServerUrl,ServerLogo=@ServerLogo,OrderID=@OrderID,ShowType=@ShowType,UrlEncrypt=@UrlEncrypt,EncryptKey=@EncryptKey,TimeEncrypt=@TimeEncrypt,UpTimeuti=@UpTimeuti,Encryptime=@Encryptime,Addtime=@Addtime,ReadRoot=@ReadRoot WHERE ServerID=@ServerID
	RETURN
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_UpdateOrderId]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_UpdateOrderId] 
	(
	@ServerID int,
	@OrderID int
	)
AS
	--SET NOCOUNT ON
	UPDATE ZL_DownServer 
	SET OrderID=@OrderID WHERE ServerID=@ServerID
	RETURN





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_GetById] 
	(
	@ServerID int
	)
AS
	SET NOCOUNT ON
	SELECT
		  ServerID,ServerName,ServerUrl,ServerLogo,OrderID,ShowType ,UrlEncrypt,EncryptKey,TimeEncrypt,UpTimeuti,Encryptime,Addtime,ReadRoot
    FROM 
         ZL_DownServer
	WHERE ServerID = @ServerID
	RETURN
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_GetCountOrderId]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_GetCountOrderId] 
AS
	SET NOCOUNT ON  
	SELECT ISNULL(COUNT(ServerID),0) 
	FROM ZL_DownServer
	RETURN





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_DownServer_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_DownServer_Add]
(
@ServerID int,
@ServerName nvarchar(50),
@ServerUrl nvarchar(50),
@ServerLogo nvarchar(255),
@OrderID int,
@ShowType int,
@UrlEncrypt int,
@EncryptKey nvarchar(255),
@TimeEncrypt int,
@UpTimeuti int,
@Encryptime datetime,
@Addtime datetime,
@ReadRoot nvarchar(1000)
)
AS
INSERT INTO
ZL_DownServer(ServerID,ServerName,ServerUrl,ServerLogo,OrderID,ShowType,UrlEncrypt,EncryptKey,TimeEncrypt,UpTimeuti,Encryptime,Addtime,ReadRoot)VALUES(@ServerID,@ServerName,@ServerUrl,@ServerLogo,@OrderID,@ShowType,@UrlEncrypt,@EncryptKey,@TimeEncrypt,@UpTimeuti,@Encryptime,@Addtime,@ReadRoot)  
RETURN
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Survey_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Survey_Add]
(
@SurveyID int,
@SurveyName nvarchar(255),
@Description Text,
@CreateDate Datetime,
@EndTime Datetime,
@IsOpen nvarchar,
@NeedLogin nvarchar,
@SurType int,
@IPRepeat int
)
AS
BEGIN
        if @SurveyID=0
        BEGIN
        insert into ZL_SURVEY (SurveyName,Description,CreateDate,EndTime,IsOpen,NeedLogin,SurType,IPRepeat)values(
         @SurveyName,
         @Description,
         @CreateDate,
         @EndTime,
         @IsOpen,
         @NeedLogin,
         @SurType,
         @IPRepeat
        )
        END
    else
        Update ZL_SURVEY set 
         SurveyName=@SurveyName,
         Description=@Description,
         CreateDate=@CreateDate,
         EndTime=@EndTime,
         IsOpen=@IsOpen,
         NeedLogin=@NeedLogin,
         SurType=@SurType,
         IPRepeat=@IPRepeat
         where SurveyID=@SurveyID
END


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Survey_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Survey_Delete]
(
@ID int
)
AS
   delete from ZL_Answer where SurveyID=@ID
   delete from ZL_Answer_Recode where SID=@ID
   delete from ZL_Question where SurveyID=@ID
   delete from ZL_Survey where SurveyID=@ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_GetSelect]
	@DSceneid int
AS

SELECT
	[DSceneid],
	[DSceneName],
	[DSceneClass],
	[DSceneBG],
	[DSceneDIV],
	[DSceneAddtime]
FROM
	[dbo].[ZL_Dscene]
WHERE
	[DSceneid] = @DSceneid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_GetInsert]
	@DSceneName nvarchar(255),
	@DSceneClass nvarchar(500),
	@DSceneBG nvarchar(255),
	@DSceneDIV ntext,
	@DSceneAddtime datetime,
	@DSceneid int OUTPUT
AS

INSERT INTO [dbo].[ZL_Dscene] (
	[DSceneName],
	[DSceneClass],
	[DSceneBG],
	[DSceneDIV],
	[DSceneAddtime]
) VALUES (
	@DSceneName,
	@DSceneClass,
	@DSceneBG,
	@DSceneDIV,
	@DSceneAddtime
)

SET @DSceneid = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_GetUpdate]
	@DSceneid int,
	@DSceneName nvarchar(255),
	@DSceneClass nvarchar(500),
	@DSceneBG nvarchar(255),
	@DSceneDIV ntext,
	@DSceneAddtime datetime
AS

UPDATE [dbo].[ZL_Dscene] SET
	[DSceneName] = @DSceneName,
	[DSceneClass] = @DSceneClass,
	[DSceneBG] = @DSceneBG,
	[DSceneDIV] = @DSceneDIV,
	[DSceneAddtime] = @DSceneAddtime
WHERE
	[DSceneid] = @DSceneid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_Select_All]
AS


SELECT
	[DSceneid],
	[DSceneName],
	[DSceneClass],
	[DSceneBG],
	[DSceneDIV],
	[DSceneAddtime]
FROM
	[dbo].[ZL_Dscene]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_InsertUpdate]
	@DSceneid int,
	@DSceneName nvarchar(255),
	@DSceneClass nvarchar(500),
	@DSceneBG nvarchar(255),
	@DSceneDIV ntext,
	@DSceneAddtime datetime
AS

IF EXISTS(SELECT [DSceneid] FROM [dbo].[ZL_Dscene] WHERE [DSceneid] = @DSceneid)
BEGIN
	UPDATE [dbo].[ZL_Dscene] SET
		[DSceneName] = @DSceneName,
		[DSceneClass] = @DSceneClass,
		[DSceneBG] = @DSceneBG,
		[DSceneDIV] = @DSceneDIV,
		[DSceneAddtime] = @DSceneAddtime
	WHERE
		[DSceneid] = @DSceneid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Dscene] (	
	[DSceneName],
	[DSceneClass],
	[DSceneBG],
	[DSceneDIV],
	[DSceneAddtime]
	) VALUES (
	@DSceneName,
	@DSceneClass,
	@DSceneBG,
	@DSceneDIV,
	@DSceneAddtime
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Dscene_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Dscene_GetDelete]
	@DSceneid int
AS

DELETE FROM [dbo].[ZL_Dscene]
WHERE
	[DSceneid] = @DSceneid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：删除一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_Del]
@id int
 AS 
	DELETE [ZL_Trademark]
	 WHERE id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：增加一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_Add]
@id int output,
@Trname varchar(255),
@Producer int,
@TrClass varchar(50),
@Isuse int,
@Istop int,
@Isbest int,
@TrPhoto varchar(50),
@TrContent text,
@Addtime datetime

 AS 
	INSERT INTO [ZL_Trademark](
	[Trname],[Producer],[TrClass],[Isuse],[Istop],[Isbest],[TrPhoto],[TrContent],[Addtime]
	)VALUES(
	@Trname,@Producer,@TrClass,@Isuse,@Istop,@Isbest,@TrPhoto,@TrContent,@Addtime
	)
	SET @id = @@IDENTITY


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_Exists]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：是否已经存在 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_Exists]
@id int
AS
	DECLARE @TempID int
	SELECT @TempID = count(1) FROM [ZL_Trademark] WHERE id=@id 
	IF @TempID = 0
		RETURN 0
	ELSE
		RETURN 1


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到实体对象的详细信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_GetById]
@id int
 AS 
	SELECT 
	id,Trname,Producer,TrClass,Isuse,Istop,Isbest,TrPhoto,TrContent,Addtime
	 FROM [ZL_Trademark]
	 WHERE id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_GetList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：查询记录信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_GetList]
 AS 
	SELECT 
	id,Trname,Producer,TrClass,Isuse,Istop,Isbest,TrPhoto,TrContent,Addtime
	 FROM [ZL_Trademark] order by id desc


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_GetMaxId]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到主键字段最大值 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_GetMaxId]
AS
	DECLARE @TempID int
	SELECT @TempID = max([id])+1 FROM [ZL_Trademark]
	IF @TempID IS NULL
		RETURN 1
	ELSE
		RETURN @TempID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_GetPro]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到厂商所属的品牌信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_GetPro]
@proid int
 AS 
	SELECT 
	id,Trname,Producer,TrClass,Isuse,Istop,Isbest,TrPhoto,TrContent,Addtime
	 FROM [ZL_Trademark] where Producer = @proid order by id desc


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Trademark_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：修改一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Trademark_Update]
@id int,
@Trname varchar(255),
@Producer int,
@TrClass varchar(50),
@Isuse int,
@Istop int,
@Isbest int,
@TrPhoto varchar(50),
@TrContent text,
@Addtime datetime
 AS 
	UPDATE [ZL_Trademark] SET 
	[Trname] = @Trname,[Producer] = @Producer,[TrClass] = @TrClass,[Isuse] = @Isuse,[Istop] = @Istop,[Isbest] = @Isbest,[TrPhoto] = @TrPhoto,[TrContent] = @TrContent,[Addtime] = @Addtime
	WHERE id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_Select_All]
AS


SELECT
	*
FROM
	[dbo].[ZL_Duser]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_InsertUpdate]
	@Duserid int,
	@DuShow int,
	@Dbooth nvarchar(255),
	@Dmetier nvarchar(255),
	@Dcorp nvarchar(255),
	@Daddress nvarchar(255),
	@Dphone nvarchar(50),
	@Dmobile nvarchar(50),
	@Dfax nvarchar(50),
	@DEmail nvarchar(50),
	@Dmessage int,
	@Dexpiry datetime,
	@Dactiva int,
	@Dscene int,
	@Dislogin int,
	@DtopicTime datetime,
	@Dutype int,
	@Dupicnum int,
	@DendLogtime datetime,
	@Duid int,
	@DNewInfo ntext,
	@Dlogo nvarchar(255)
AS

IF EXISTS(SELECT [Duserid] FROM [dbo].[ZL_Duser] WHERE [Duserid] = @Duserid)
BEGIN
	UPDATE [dbo].[ZL_Duser] SET
		[DuShow] = @DuShow,
		[Dbooth] = @Dbooth,
		[Dmetier] = @Dmetier,
		[Dcorp] = @Dcorp,
		[Daddress] = @Daddress,
		[Dphone] = @Dphone,
		[Dmobile] = @Dmobile,
		[Dfax] = @Dfax,
		[DEmail] = @DEmail,
		[Dmessage] = @Dmessage,
		[Dexpiry] = @Dexpiry,
		[Dactiva] = @Dactiva,
		[Dscene] = @Dscene,
		[Dislogin] = @Dislogin,
		[DtopicTime] = @DtopicTime,
		[Dutype] = @Dutype,
		[Dupicnum] = @Dupicnum,
		[DendLogtime] = @DendLogtime,
		[Duid] = @Duid,
		[Dlogo]=@Dlogo,
		[DNewInfo]=@DNewInfo
	WHERE
		[Duserid] = @Duserid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Duser] (	
	[DuShow],
	[Dbooth],
	[Dmetier],
	[Dcorp],
	[Daddress],
	[Dphone],
	[Dmobile],
	[Dfax],
	[DEmail],
	[Dmessage],
	[Dexpiry],
	[Dactiva],
	[Dscene],
	[Dislogin],
	[DtopicTime],
	[Dutype],
	[Dupicnum],
	[DendLogtime],
	[Duid],
	[DNewInfo],
	[Dlogo]
	) VALUES (
	@DuShow,
	@Dbooth,
	@Dmetier,
	@Dcorp,
	@Daddress,
	@Dphone,
	@Dmobile,
	@Dfax,
	@DEmail,
	@Dmessage,
	@Dexpiry,
	@Dactiva,
	@Dscene,
	@Dislogin,
	@DtopicTime,
	@Dutype,
	@Dupicnum,
	@DendLogtime,
	@Duid,
	@DNewInfo,
	@Dlogo
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_GetSelect]
	@Duserid int
AS

SELECT
	[Duserid],
	[DuShow],
	[Dbooth],
	[Dmetier],
	[Dcorp],
	[Daddress],
	[Dphone],
	[Dmobile],
	[Dfax],
	[DEmail],
	[Dmessage],
	[Dexpiry],
	[Dactiva],
	[Dscene],
	[Dislogin],
	[DtopicTime],
	[Dutype],
	[Dupicnum],
	[DendLogtime],
	[Duid],
	[DNewInfo],
	[Dlogo]
FROM
	[dbo].[ZL_Duser]
WHERE
	[Duserid] = @Duserid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_GetUpdate]
	@Duserid int,
	@DuShow int,
	@Dbooth nvarchar(255),
	@Dmetier nvarchar(255),
	@Dcorp nvarchar(255),
	@Daddress nvarchar(255),
	@Dphone nvarchar(50),
	@Dmobile nvarchar(50),
	@Dfax nvarchar(50),
	@DEmail nvarchar(50),
	@Dmessage int,
	@Dexpiry datetime,
	@Dactiva int,
	@Dscene int,
	@Dislogin int,
	@DtopicTime datetime,
	@Dutype int,
	@Dupicnum int,
	@DendLogtime datetime,
	@Duid int,
	@DNewInfo ntext,
	@Dlogo nvarchar(50)
AS

UPDATE [dbo].[ZL_Duser] SET
	[DuShow] = @DuShow,
	[Dbooth] = @Dbooth,
	[Dmetier] = @Dmetier,
	[Dcorp] = @Dcorp,
	[Daddress] = @Daddress,
	[Dphone] = @Dphone,
	[Dmobile] = @Dmobile,
	[Dfax] = @Dfax,
	[DEmail] = @DEmail,
	[Dmessage] = @Dmessage,
	[Dexpiry] = @Dexpiry,
	[Dactiva] = @Dactiva,
	[Dscene] = @Dscene,
	[Dislogin] = @Dislogin,
	[DtopicTime] = @DtopicTime,
	[Dutype] = @Dutype,
	[Dupicnum] = @Dupicnum,
	[DendLogtime] = @DendLogtime,
	[Duid] = @Duid,
	[Dlogo]=@Dlogo,
	[DNewInfo]=@DNewInfo
WHERE
	[Duserid] = @Duserid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_GetInsert]
	@DuShow int,
	@Dbooth nvarchar(255),
	@Dmetier nvarchar(255),
	@Dcorp nvarchar(255),
	@Daddress nvarchar(255),
	@Dphone nvarchar(50),
	@Dmobile nvarchar(50),
	@Dfax nvarchar(50),
	@DEmail nvarchar(50),
	@Dmessage int,
	@Dexpiry datetime,
	@Dactiva int,
	@Dscene int,
	@Dislogin int,
	@DtopicTime datetime,
	@Dutype int,
	@Dupicnum int,
	@DendLogtime datetime,
	@Duid int,
	@Dlogo nvarchar(255),
    @DNewInfo ntext,
	@Duserid int OUTPUT
AS

INSERT INTO [dbo].[ZL_Duser] (
	[DuShow],
	[Dbooth],
	[Dmetier],
	[Dcorp],
	[Daddress],
	[Dphone],
	[Dmobile],
	[Dfax],
	[DEmail],
	[Dmessage],
	[Dexpiry],
	[Dactiva],
	[Dscene],
	[Dislogin],
	[DtopicTime],
	[Dutype],
	[Dupicnum],
	[DendLogtime],
	[Duid],
	[Dlogo],
	[DNewInfo]
) VALUES (
	@DuShow,
	@Dbooth,
	@Dmetier,
	@Dcorp,
	@Daddress,
	@Dphone,
	@Dmobile,
	@Dfax,
	@DEmail,
	@Dmessage,
	@Dexpiry,
	@Dactiva,
	@Dscene,
	@Dislogin,
	@DtopicTime,
	@Dutype,
	@Dupicnum,
	@DendLogtime,
	@Duid,
	@DNewInfo,
	@Dlogo
)

SET @Duserid = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Duser_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Duser_GetDelete]
	@Duserid int
AS

DELETE FROM [dbo].[ZL_Duser]
WHERE
	[Duserid] = @Duserid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_GetDelete]
	@Urid int
AS

DELETE FROM [dbo].[ZL_URLRewriter]
WHERE
	[Urid] = @Urid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_GetInsert]
	@NodeID int,
	@Sendto nvarchar(255),
	@LookFor nvarchar(255),
	@Addtime datetime,
	@KeyName nvarchar(100),
             @UrlGo int,
             @UserID int,
	@Urid int OUTPUT
AS

INSERT INTO [dbo].[ZL_URLRewriter] (
	[NodeID],
	[Sendto],
	[LookFor],
	[Addtime],
	[KeyName],
	[UrlGo],
	[UserID]
) VALUES (
	@NodeID,
	@Sendto,
	@LookFor,
	@Addtime,
	@KeyName,
	@UrlGo,
	@UserID
)

SET @Urid = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_GetSelectUser]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_GetSelectUser]
	@Urid  int
AS

SELECT
	[Urid],
	[NodeID],
	[Sendto],
	[LookFor],
	[Addtime],
	[KeyName],
	[UrlGo],
	[UserID]
FROM
	[dbo].[ZL_URLRewriter]
WHERE
	[NodeID] = @Urid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_GetSelect]
	@Urid int
AS

SELECT
	[Urid],
	[NodeID],
	[Sendto],
	[LookFor],
	[Addtime],
	[KeyName],
	[UrlGo],
	[UserID]
FROM
	[dbo].[ZL_URLRewriter]
WHERE
	[Urid] = @Urid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_GetUpdate]
	@Urid int,
	@NodeID int,
	@Sendto nvarchar(255),
	@LookFor nvarchar(255),
	@Addtime datetime,
	@KeyName nvarchar(100),
	@UrlGo int,
	@UserID int
AS

UPDATE [dbo].[ZL_URLRewriter] SET
	[NodeID] = @NodeID,
	[Sendto] = @Sendto,
	[LookFor] = @LookFor,
	[Addtime] = @Addtime,
	[KeyName] = @KeyName,
	[UrlGo] = @UrlGo,
	[UserID] = @UserID
WHERE
	[KeyName] = @KeyName

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_InsertUpdate]
	@Urid int,
	@NodeID int,
	@Sendto nvarchar(255),
	@LookFor nvarchar(255),
	@Addtime datetime,
	@KeyName nvarchar(100),
	@UrlGo int,
	@UserID int
AS

IF EXISTS(SELECT [Urid] FROM [dbo].[ZL_URLRewriter] WHERE [KeyName] = @KeyName)
BEGIN
	UPDATE [dbo].[ZL_URLRewriter] SET
		[NodeID] = @NodeID,
		[Sendto] = @Sendto,
		[LookFor] = @LookFor,
		[Addtime] = @Addtime,
		[KeyName] = @KeyName,
		[UrlGo] = @UrlGo,
		[UserID] = @UserID
	WHERE
		[KeyName] = @KeyName
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_URLRewriter] (	
	[NodeID],
	[Sendto],
	[LookFor],
	[Addtime],
	[KeyName],
	[UrlGo],
	[UserID]
	) VALUES (
	@NodeID,
	@Sendto,
	@LookFor,
	@Addtime,
	@KeyName,
	@UrlGo,
	@UserID
	)

END

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_InsertUpdate2]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_InsertUpdate2]
	@Urid int,
	@NodeID int,
	@Sendto nvarchar(255),
	@LookFor nvarchar(255),
	@Addtime datetime,
	@KeyName nvarchar(100),
	@UrlGo int,
	@UserID int
AS

IF EXISTS(SELECT [Urid] FROM [dbo].[ZL_URLRewriter] WHERE [Urid] = @Urid)
BEGIN
	UPDATE [dbo].[ZL_URLRewriter] SET
		[NodeID] = @NodeID,
		[Sendto] = @Sendto,
		[LookFor] = @LookFor,
		[Addtime] = @Addtime,
		[KeyName] = @KeyName,
		[UrlGo] = @UrlGo,
		[UserID] = @UserID
	WHERE
		[Urid] = @Urid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_URLRewriter] (	
	[NodeID],
	[Sendto],
	[LookFor],
	[Addtime],
	[KeyName],
	[UrlGo],
	[UserID]
	) VALUES (
	@NodeID,
	@Sendto,
	@LookFor,
	@Addtime,
	@KeyName,
	@UrlGo,
	@UserID
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_URLRewriter_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_URLRewriter_Select_All]
AS


SELECT
	[Urid],
	[NodeID],
	[Sendto],
	[LookFor],
	[Addtime],
	[KeyName],
	[UrlGo],
	[UserID]
FROM
	[dbo].[ZL_URLRewriter] order by Urid desc

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserLock]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_UserLock]
(
@UserID int,
@LockoutTime datetime
)
AS
	Update ZL_User Set Status=1,LastLockTime=@LockoutTime where UserID=@UserID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_User_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_User_Del]
(
@UserID int
)
AS
DELETE FROM ZL_UserBase where UserID=@UserID
DELETE FROM ZL_User WHERE UserID=@UserID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_User_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_User_Add]
(
@UserID int,
@UserName nvarchar(255),
	@UserPwd nvarchar(200),
	@GroupID int,
	@Email nvarchar(50),
	@Question nvarchar(255),
	@Answer nvarchar(255),
	@RegTime datetime,
	@LoginTimes int,
	@LastLoginTime datetime,
	@LastLoginIP nvarchar(50),
	@LastPwdChangeTime datetime,
	@LastLockTime datetime,
	@Status int,
	@CheckNum nvarchar(50),
	@UserExp int,
	@boffExp int,
	@ConsumeExp int,
	@Purse money,
	@DeadLine datetime,
	@UserPoint money,
	@JoinTime datetime,
	@DummyPurse money,
	@Permissions ntext,
	@SiteID int,
	@Remark ntext,
	@CompanyName nvarchar(255),
	@CompanyDescribe nvarchar(500),
	@IsConfirm int,
	@VIP int,
	@salt nvarchar(50),
	@RegisterIP nvarchar(50),
	@CerificateDeadLine datetime,
	@Pageid int,
	@SiteRebateBalance money
)
AS
Insert into ZL_User
(
[UserName],
	[UserPwd],
	[GroupID],
	[Email],
	[Question],
	[Answer],
	[RegTime],
	[LoginTimes],
	[LastLoginTime],
	[LastLoginIP],
	[LastPwdChangeTime],
	[LastLockTime],
	[Status],
	[CheckNum],
	[UserExp],
	[boffExp],
	[ConsumeExp],
	[Purse],
	[DeadLine],
	[UserPoint],
	[JoinTime],
	[DummyPurse],
	[Permissions],
	[SiteID],
	[Remark],
	[CompanyName],
	[CompanyDescribe],
	[IsConfirm],
	[VIP],
	[salt],
	[RegisterIP],
	[CerificateDeadLine],
	[Pageid] ,
	[SiteRebateBalance]
)
VALUES(
@UserName,
	@UserPwd,
	@GroupID,
	@Email,
	@Question,
	@Answer,
	@RegTime,
	@LoginTimes,
	@LastLoginTime,
	@LastLoginIP,
	@LastPwdChangeTime,
	@LastLockTime,
	@Status,
	@CheckNum,
	@UserExp,
	@boffExp,
	@ConsumeExp,
	@Purse,
	@DeadLine,
	@UserPoint,
	@JoinTime,
	@DummyPurse,
	@Permissions,
	@SiteID,
	@Remark,
	@CompanyName,
	@CompanyDescribe,
	@IsConfirm,
	@VIP,
	@salt,
	@RegisterIP,
	@CerificateDeadLine,
	@Pageid,
	@SiteRebateBalance
)
select @@IDENTITY AS newID

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_User_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_User_Update]
(
@UserID int,
	@UserName nvarchar(255),
	@UserPwd nvarchar(200),
	@GroupID int,
	@Email nvarchar(50),
	@Question nvarchar(255),
	@Answer nvarchar(255),
	@RegTime datetime,
	@LoginTimes int,
	@LastLoginTime datetime,
	@LastLoginIP nvarchar(50),
	@LastPwdChangeTime datetime,
	@LastLockTime datetime,
	@Status int,
	@CheckNum nvarchar(50),
	@UserExp int,
	@boffExp int,
	@ConsumeExp int,
	@Purse money,
	@DeadLine datetime,
	@UserPoint money,
	@JoinTime datetime,
	@DummyPurse money,
	@Permissions ntext,
	@SiteID int,
	@Remark ntext,
	@CompanyName nvarchar(255),
	@CompanyDescribe nvarchar(500),
	@IsConfirm int,
	@VIP int,
	@salt nvarchar(50),
	@RegisterIP nvarchar(50),
	@CerificateDeadLine datetime,
	@Pageid int,
	@SiteRebateBalance money
)
AS
UPDATE [dbo].[ZL_User] SET
	[UserName] = @UserName,
	[UserPwd] = @UserPwd,
	[GroupID] = @GroupID,
	[Email] = @Email,
	[Question] = @Question,
	[Answer] = @Answer,
	[RegTime] = @RegTime,
	[LoginTimes] = @LoginTimes,
	[LastLoginTime] = @LastLoginTime,
	[LastLoginIP] = @LastLoginIP,
	[LastPwdChangeTime] = @LastPwdChangeTime,
	[LastLockTime] = @LastLockTime,
	[Status] = @Status,
	[CheckNum] = @CheckNum,
	[UserExp] = @UserExp,
	[boffExp] = @boffExp,
	[ConsumeExp] = @ConsumeExp,
	[Purse] = @Purse,
	[DeadLine] = @DeadLine,
	[UserPoint] = @UserPoint,
	[JoinTime] = @JoinTime,
	[DummyPurse] = @DummyPurse,
	[Permissions] = @Permissions,
	[SiteID] = @SiteID,
	[Remark]=@Remark,
	[CompanyName]=@CompanyName,
	[CompanyDescribe]=@CompanyDescribe,
	[IsConfirm]=@IsConfirm,
	[VIP]=@VIP,
	[salt]=@salt,
	[RegisterIP]=@RegisterIP,
	[CerificateDeadLine] =@CerificateDeadLine,
	[Pageid]=@Pageid,
	[SiteRebateBalance]=@SiteRebateBalance
WHERE
	[UserID] = @UserID
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_All]
AS
select a.*,b.PayPlatName,c.UserName from ((ZL_Payment a left outer join ZL_PayPlat b on a.PayPlatID=b.PayPlatID) left outer join ZL_User c on a.UserID=c.UserID) order by a.Status desc,a.PayTime desc,a.PaymentID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Favorite_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Favorite_Del]
(
@FavoriteID int
)
AS
	Delete from ZL_Favorite Where FavoriteID=@FavoriteID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Favorite_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Favorite_Add]
(
@FavoriteID int,
@Owner int,
@InfoID int,
@FavoriteDate datetime
)
AS
	Insert Into ZL_Favorite (Owner,InfoID,FavoriteDate) values(@Owner,@InfoID,@FavoriteDate)




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserBase_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_UserBase_Add]
(
@UserID int,
@TrueName nvarchar(50),
@BirthDay nvarchar(20),
@Address nvarchar(255),
@HomePhone nvarchar(50),
@Fax nvarchar(50),
@ZipCode nvarchar(10),
@Mobile nvarchar(50),
@UserSex bit,
@QQ nvarchar(50),
@MSN nvarchar(255),
@ICQ nvarchar(50),
@UC nvarchar(50),
@Yahoo nvarchar(50),
@IDCard nvarchar(50),
@HomePage nvarchar(255),
@UserFace nvarchar(255),
@FaceWidth int,
@FaceHeight int,
@Sign nvarchar(1000),
@Country nvarchar(50),
@Province nvarchar(50),
@County nvarchar(50),
@Privating int,
@OfficePhone nvarchar(50),
@PHS nvarchar(50),
@honeyName nvarchar(255),
@cardType nvarchar(255),
@shengxiao nvarchar(50),
@xingzuo nvarchar(50),
@workprovince nvarchar(50),
@workcounty nvarchar(50),
@SFStatus int,
@VIPUser int
)
AS
insert into ZL_UserBase (
UserID,
TrueName,
BirthDay,
Address,
HomePhone,
Fax,
ZipCode,
Mobile,
UserSex,
QQ,
MSN,
ICQ,
UC,
Yahoo,
IDCard,
HomePage,
UserFace,
FaceWidth,
FaceHeight,
[Sign],
Country,
Province,
County,
Privacy,
OfficePhone,
PHS,
honeyName,
cardType,
shengxiao,
xingzuo,
workprovince,
workCity,
SFStatus,
VIPUser

) values(
@UserID,
@TrueName,
@BirthDay,
@Address,
@HomePhone,
@Fax,
@ZipCode,       
@Mobile,               
@UserSex,
@QQ,
@MSN,
@ICQ,
@UC,
@Yahoo, 
@IDCard,
@HomePage,
@UserFace,
@FaceWidth,
@FaceHeight,
@Sign,
@Country,
@Province,
@County,
@Privating,
@OfficePhone,
@PHS,
@honeyName,
@cardType,
@shengxiao,
@xingzuo,
@workprovince,
@workcounty,
@SFStatus,
@VIPUser
)
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserBase_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_UserBase_Update]
(
@UserID int,
@TrueName nvarchar(50),
@BirthDay nvarchar(20),
@shengxiao nvarchar(50),
@xingzuo nvarchar(50),
@Address nvarchar(255),
@HomePhone nvarchar(50),
@Fax nvarchar(50),
@ZipCode nvarchar(10),
@Mobile nvarchar(50),
@UserSex bit,
@QQ nvarchar(50),
@MSN nvarchar(255),
@ICQ nvarchar(50),
@UC nvarchar(50),
@Yahoo nvarchar(50),
@IDCard nvarchar(50),
@HomePage nvarchar(255),
@UserFace nvarchar(255),
@FaceWidth int,
@FaceHeight int,
@Sign nvarchar(1000),
@Country nvarchar(50),
@Province nvarchar(50),
@County nvarchar(50),
@Privating int,
@OfficePhone nvarchar(50),
@PHS nvarchar(50),
@honeyName nvarchar(255),
@cardType nvarchar(255),
@workprovince nvarchar(50),
@workcounty nvarchar(50),
@SFStatus int,
@VIPUser int
)
AS
update ZL_UserBase Set 
TrueName=@TrueName,
BirthDay=@BirthDay,
shengxiao=@shengxiao,
xingzuo=@xingzuo,
Address=@Address,
HomePhone=@HomePhone,
Fax=@Fax,
ZipCode=@ZipCode,
Mobile=@Mobile,
UserSex=@UserSex,
QQ=@QQ,
MSN=@MSN,
ICQ=@ICQ,
UC=@UC,
Yahoo=@Yahoo,
IDCard=@IDCard,
HomePage=@HomePage,
UserFace=@UserFace,
FaceWidth=@FaceWidth,
FaceHeight=@FaceHeight,
[Sign]=@Sign,
Country=@Country,
Province=@Province,
County=@County,
Privacy=@Privating,
OfficePhone=@OfficePhone,
PHS=@PHS,
honeyName=@honeyName,
cardType=@cardType,
workprovince=@workprovince,
workCity=@workcounty,
SFStatus=@SFStatus,
VIPUser=@VIPUser
 where UserID=@UserID
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Grade_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Grade_Del]
(
@GradeID int
)
AS
begin
 delete from ZL_Grade where GradeID=@GradeID or ParentID=@GradeID
end


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Grade_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Grade_Add]
(
@GradeID int,
@Cate int,
@ParentID int,
@GradeName nvarchar(50),
@Grade int
)
AS
begin
 if @GradeID=0
 insert into ZL_Grade (Cate,ParentID,GradeName,Grade) values(@Cate,@ParentID,@GradeName,@Grade)
 else
 update ZL_Grade set
 Cate=@Cate,
 ParentID=@ParentID,
 GradeName=@GradeName,
 Grade=@Grade
 where GradeID=@GradeID
end


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GradeCate_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_GradeCate_Del]
(
@CateID int
)
 AS
begin
 delete from ZL_Grade where Cate=@CateID
 delete from ZL_GradeCate where CateID=@CateID
end


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCart_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE proc [dbo].[PR_UserCart_Add]
	@id int,
	@Cartid varchar(255),
	@UserId int,
	@Username varchar(255),
	@Addtime datetime,
	@Pronum int,
	@AllMoney money,
	@Getip varchar(50),
	@Colonel int,
	@ColonelNum int,
	@ColonelMoney money,
	@ColonelNowNum int,
	@ColonelTime datetime
as
	insert into ZL_UserCart(Cartid,UserId,Username,Addtime,Pronum,AllMoney,Getip,Colonel,ColonelNum,ColonelMoney,ColonelNowNum,ColonelTime)
	values (@Cartid,@UserId,@Username,@Addtime,@Pronum,@AllMoney,@Getip,@Colonel,@ColonelNum,@ColonelMoney,@ColonelNowNum,@ColonelTime)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCart_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserCart_Del]
	@id int
as
	delete from ZL_UserCart  
	where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCart_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserCart_GetById]
	@id int
as
	select * from ZL_UserCart where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCart_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_UserCart_Update]
	@id int,
	@Cartid varchar(255),
	@UserId int,
	@Username varchar(255),
	@Addtime datetime,
	@Pronum int,
	@AllMoney money,
	@Getip varchar(50),
	@Colonel int,
	@ColonelNum int,
	@ColonelMoney money,
	@ColonelNowNum int,
	@ColonelTime datetime
as
	update ZL_UserCart set 
		Cartid=@Cartid,
		UserId=@UserId,
		Username=@Username,
		Addtime=@Addtime,
		Pronum=@Pronum,
		AllMoney=@AllMoney,
		Getip=@Getip,
		Colonel=@Colonel,
		ColonelNum=@ColonelNum,
		ColonelMoney=@ColonelMoney,
		ColonelNowNum=@ColonelNowNum,
		ColonelTime=@ColonelTime
	where id=@id

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GradeCate_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_GradeCate_Add]
(
@CateID int,
@CateName nvarchar(50),
@Remark nvarchar(255),
@GradeField nvarchar(500)
)
AS
begin
 if @CateID=0
 insert into ZL_GradeCate (CateName,Remark,GradeField) values(@CateName,@Remark,@GradeField)
 else
 update ZL_GradeCate set CateName=@CateName,Remark=@Remark,GradeField=@GradeField 
 where CateID=@CateID
end


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCartPro_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserCartPro_Update]
	@id int,
	@CartID int,
	@ProID int,
	@Pronum int,
	@Username varchar(255),
	@Proname varchar(255),
	@Danwei varchar(50),
	@Shijia money,
	@AllMoney money,
	@Addtime datetime
as
	update ZL_UserCartPro set 
		CartID=@CartID,
		ProID=@ProID,
		Pronum=@Pronum,
		Username=@Username,
		Proname=@Proname,
		Danwei=@Danwei,
		Shijia=@Shijia,
		AllMoney=@AllMoney,
		Addtime=@Addtime
	where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCartPro_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserCartPro_GetById]
	@id int
as
	select * from ZL_UserCartPro where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCartPro_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



create proc [dbo].[PR_UserCartPro_Add]
	@id int,
	@CartID int,
	@ProID int,
	@Pronum int,
	@Username varchar(255),
	@Proname varchar(255),
	@Danwei varchar(50),
	@Shijia money,
	@AllMoney money,
	@Addtime datetime
as
	insert into ZL_UserCartPro(CartID,ProID,Pronum,Username,Proname,Danwei,Shijia,AllMoney,Addtime)
	values (@CartID,@ProID,@Pronum,@Username,@Proname,@Danwei,@Shijia,@AllMoney,@Addtime)





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserCartPro_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserCartPro_Del]
	@id int
as
	delete from ZL_UserCartPro  
	where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserOrderinfo_Getallmoney]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE proc [dbo].[PR_UserOrderinfo_Getallmoney]
@userid int
as
	select sum(Ordersamount) from ZL_UserOrderinfo WHERE  id IN( SELECT Orderlistid FROM ZL_UserCartPro WHERE proid IN (SELECT id FROM ZL_UserShop WHERE userid=@userid) )






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Group_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Group_Add]
(
@GroupID int,
@GroupName nvarchar(50),
@OtherName nvarchar(255),
@Description nvarchar(255),
@RegSelect bit,
@IsDefault bit,
@UpGradeMoney money,
@CompanyGroup int,
@VIPNum int,
@VIPGroup int,
@RebateRate float
)
AS
Insert into ZL_Group (GroupName,OtherName,[Description],RegSelect,IsDefault,UpGradeMoney,CompanyGroup,VIPNum,VIPGroup,RebateRate) values (@GroupName,@OtherName,@Description,@RegSelect,@IsDefault,@UpGradeMoney,@CompanyGroup,@VIPNum,@VIPGroup,@RebateRate)

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Group_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Group_Del]
(
@GroupID int
)
AS
delete from ZL_Group where GroupID=@GroupID

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Group_Get]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Group_Get]
AS
select * from ZL_Group

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Group_SetDefault]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Group_SetDefault]
(
@GroupID int
)
AS
BEGIN
 update ZL_Group Set IsDefault=0 where GroupID<>@GroupID 
 update ZL_Group Set IsDefault=1 where GroupID=@GroupID
END

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Group_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Group_Update]
(
@GroupID int,
@GroupName nvarchar(50),
@OtherName nvarchar(255),
@Description nvarchar(255),
@RegSelect bit,
@IsDefault bit,
@UpGradeMoney money,
@CompanyGroup int,
@VIPNum int,
@VIPGroup int,
@RebateRate float
)
AS
Update ZL_Group set GroupName=@GroupName,OtherName=@OtherName,[Description]=@Description,RegSelect=@RegSelect,IsDefault=@IsDefault,UpGradeMoney=@UpGradeMoney,CompanyGroup=@CompanyGroup,VIPNum=@VIPNum,VIPGroup=@VIPGroup,RebateRate=@RebateRate where GroupID=@GroupID

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Group_SetPermissions]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Group_SetPermissions]
(
@GroupID int,
@CCountPerDay int,
@FavCount int,
@ConsumeType int
)
AS
BEGIN
 update ZL_Group Set CCountPerDay=@CCountPerDay,FavCount=@FavCount,ConsumeType=@ConsumeType where GroupID=@GroupID 
END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserExpDomP_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_UserExpDomP_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[UserID],
	[Score],
	[HisTime],
	[Operator],
	[Detail],
	[OperatorIP]
FROM
	[dbo].[ZL_UserExpDomP]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserExpDomP_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UserExpDomP_GetInsert]
	@UserID int,
	@Score money,
	@HisTime datetime,
	@Operator int,
	@Detail nvarchar(1000),
	@OperatorIP nvarchar(50),
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_UserExpDomP] (
	[UserID],
	[Score],
	[HisTime],
	[Operator],
	[Detail],
	[OperatorIP]
) VALUES (
	@UserID,
	@Score,
	@HisTime,
	@Operator,
	@Detail,
	@OperatorIP
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GroupFieldPermissions_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_GroupFieldPermissions_Update]
(
@ID int,
@GroupID int,
@OperateCode int,
@ProjectID int,
@FieldID int,
@FieldName nvarchar(255),
@IdType int
)
AS
Update ZL_GroupFieldPermissions set GroupID=@GroupID,OperateCode=@OperateCode,ProjectID=@ProjectID,FieldID=@FieldID,FieldName=@FieldName,IdType=@IdType where ID=@ID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GroupFieldPermissions_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_GroupFieldPermissions_Add]
(
@ID int,
@GroupID int,
@OperateCode int,
@ProjectID int ,
@FieldID int,
@FieldName nvarchar(255),
@IdType int
)
AS
Insert into ZL_GroupFieldPermissions (GroupID,OperateCode,ProjectID,FieldID,FieldName,IdType) values (@GroupID,@OperateCode,@ProjectID,@FieldID,@FieldName,@IdType)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GroupFieldPermissions_GetByPGid]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_GroupFieldPermissions_GetByPGid]
(
	@Prid Int,
	@Gid int 

)
 AS 
 
	SELECT* FROM ZL_GroupFieldPermissions WHERE ProjectID = @Prid and GroupID=@Gid




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ExpHis_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_ExpHis_Add]
(
@UserID int,
@Operator int,
@Detail nvarchar(1000),
@score int,
@HisTime datetime,
@OperatorIP nvarchar(50)
)
AS
Insert Into ZL_UserExpHis
(
UserID,
Operator,
Detail,
score,
HisTime,
OperatorIP
)
values
(
@UserID,
@Operator,
@Detail,
@score,
@HisTime,
@OperatorIP
)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GuestBook_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_GuestBook_Add]
(
@GID int,
@ParentID int,
@CateID int,
@UserID int,
@Title nvarchar(200),
@TContent Text,
@GDate datetime,
@IP nvarchar(50)
)
AS
   if @GID=0
	begin
        insert into ZL_GuestBook (ParentID,CateID,UserID,Title,TContent,GDate,IP)values(
         @ParentID,
         @CateID,
         @UserID,
         @Title,
         @TContent,
         @GDate,
         @IP
        )
	end
    else
	begin
        update ZL_GuestBook set 
         ParentID=@ParentID,
         CateID=@CateID,
         UserID=@UserID,
         Title=@Title,
         TContent=@TContent,
         GDate=@GDate,
         IP=@IP
        where GID=@GID
	end



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GuestBook_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_GuestBook_Delete]
(
@TID int
)
AS
BEGIN
   delete from ZL_GuestBook where GID=@TID or ParentID=@TID
end



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GuestCate_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_GuestCate_Delete]
(
@CateID int
)
AS
BEGIN
   delete from ZL_GuestBook where CateID=@CateID
   delete from ZL_GuestCate where CateID=@CateID
end



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_GuestCate_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_GuestCate_Add]
(
@CateID int,
@CateName nvarchar(50),
@PermiBit nvarchar(100),
@NeedLog int
)
AS
BEGIN
   if @CateID=0
        insert into ZL_GUESTCATE (CateName,PermiBit,NeedLog)values(
         @CateName,
         @PermiBit,
         @NeedLog
        )
    else
        update ZL_GUESTCATE set 
        CateName=@CateName,
        PermiBit=@PermiBit,
        NeedLog=@NeedLog
        where CateID=@CateID
end



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserOrderinfo_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserOrderinfo_Del]
	@id int
as
	delete from ZL_UserOrderinfo  
	where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserOrderinfo_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE proc [dbo].[PR_UserOrderinfo_Add]
	@id int,
	@OrderNo varchar(50),
	@Reuser varchar(255),
	@Receiver varchar(50),
	@Rename varchar(255),
	@Guojia varchar(255),
	@Shengfen varchar(255),
	@Chengshi varchar(255),
	@Diqu varchar(255),
	@Jiedao varchar(255),
	@ZipCode varchar(50),
	@Phone varchar(50),
	@Email varchar(50),
	@Mobile int,
	@Delivery int,
	@Outstock int,
	@Deliverytime int,
	@Payment int,
	@Invoice text,
	@Ordermessage text,
	@Merchandiser varchar(50),
	@Internalrecords text,
	@Ordersamount money,
	@Receivablesamount money,
	@Specifiedprice money,
	@Freight money,
	@Invoiceneeds int,
	@Developedvotes int,
	@OrderStatus int,
	@Paymentstatus int,
	@StateLogistics int,
	@Signed int,
	@Settle int,
	@Aside int,
	@Suspended int,
	@Ordertype int,
	@AddTime datetime,
	@AddUser varchar(255),
	@Userid int,
	@Colonel int,
	@ColonelNum int,
	@ColonelMoney money,
	@ColonelNowNum int,
	@ColonelTime datetime
as
	insert into ZL_UserOrderinfo(OrderNo,Reuser,Receiver,Rename,Guojia,Shengfen,Chengshi,Diqu,Jiedao,ZipCode,Phone,Email,Mobile,Delivery,Outstock,Deliverytime,Payment,Invoice,Ordermessage,Merchandiser,Internalrecords,Ordersamount,Receivablesamount,Specifiedprice,Freight,Invoiceneeds,Developedvotes,OrderStatus,Paymentstatus,StateLogistics,Signed,Settle,Aside,Suspended,Ordertype,AddTime,AddUser,Userid,Colonel,ColonelNum,ColonelMoney,ColonelNowNum,ColonelTime)
	values (@OrderNo,@Reuser,@Receiver,@Rename,@Guojia,@Shengfen,@Chengshi,@Diqu,@Jiedao,@ZipCode,@Phone,@Email,@Mobile,@Delivery,@Outstock,@Deliverytime,@Payment,@Invoice,@Ordermessage,@Merchandiser,@Internalrecords,@Ordersamount,@Receivablesamount,@Specifiedprice,@Freight,@Invoiceneeds,@Developedvotes,@OrderStatus,@Paymentstatus,@StateLogistics,@Signed,@Settle,@Aside,@Suspended,@Ordertype,@AddTime,@AddUser,@Userid,@Colonel,@ColonelNum,@ColonelMoney,@ColonelNowNum,@ColonelTime)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserOrderinfo_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserOrderinfo_GetById]
	@id int
as
	select * from ZL_UserOrderinfo where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserOrderinfo_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE proc [dbo].[PR_UserOrderinfo_Update]
	@id int,
	@OrderNo varchar(50),
	@Reuser varchar(255),
	@Receiver varchar(50),
	@Rename varchar(255),
	@Guojia varchar(255),
	@Shengfen varchar(255),
	@Chengshi varchar(255),
	@Diqu varchar(255),
	@Jiedao varchar(255),
	@ZipCode varchar(50),
	@Phone varchar(50),
	@Email varchar(50),
	@Mobile int,
	@Delivery int,
	@Outstock int,
	@Deliverytime int,
	@Payment int,
	@Invoice text,
	@Ordermessage text,
	@Merchandiser varchar(50),
	@Internalrecords text,
	@Ordersamount money,
	@Receivablesamount money,
	@Specifiedprice money,
	@Freight money,
	@Invoiceneeds int,
	@Developedvotes int,
	@OrderStatus int,
	@Paymentstatus int,
	@StateLogistics int,
	@Signed int,
	@Settle int,
	@Aside int,
	@Suspended int,
	@Ordertype int,
	@AddTime datetime,
	@AddUser varchar(255),
	@Userid int,
	@Colonel int,
	@ColonelNum int,
	@ColonelMoney money,
	@ColonelNowNum int,
	@ColonelTime datetime
as
	update ZL_UserOrderinfo set 
		OrderNo=@OrderNo,
		Reuser=@Reuser,
		Receiver=@Receiver,
		Rename=@Rename,
		Guojia=@Guojia,
		Shengfen=@Shengfen,
		Chengshi=@Chengshi,
		Diqu=@Diqu,
		Jiedao=@Jiedao,
		ZipCode=@ZipCode,
		Phone=@Phone,
		Email=@Email,
		Mobile=@Mobile,
		Delivery=@Delivery,
		Outstock=@Outstock,
		Deliverytime=@Deliverytime,
		Payment=@Payment,
		Invoice=@Invoice,
		Ordermessage=@Ordermessage,
		Merchandiser=@Merchandiser,
		Internalrecords=@Internalrecords,
		Ordersamount=@Ordersamount,
		Receivablesamount=@Receivablesamount,
		Specifiedprice=@Specifiedprice,
		Freight=@Freight,
		Invoiceneeds=@Invoiceneeds,
		Developedvotes=@Developedvotes,
		OrderStatus=@OrderStatus,
		Paymentstatus=@Paymentstatus,
		StateLogistics=@StateLogistics,
		Signed=@Signed,
		Settle=@Settle,
		Aside=@Aside,
		Suspended=@Suspended,
		Ordertype=@Ordertype,
		AddTime=@AddTime,
		AddUser=@AddUser,
		Userid=@Userid,
		Colonel=@Colonel,
		ColonelNum=@ColonelNum,
		ColonelMoney=@ColonelMoney,
		ColonelNowNum=@ColonelNowNum,
		ColonelTime=@ColonelTime
	where id=@id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[UserID],
	[ProblemTitle],
	[ProblemContext],
	[AddTime],
	[RoomID]
FROM
	[dbo].[ZL_Interlocution]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_InsertUpdate]
	@ID int,
	@UserID int,
	@ProblemTitle nvarchar(1000),
	@ProblemContext varchar(2000),
	@AddTime datetime,
	@RoomID int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_Interlocution] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_Interlocution] SET
		[UserID] = @UserID,
		[ProblemTitle] = @ProblemTitle,
		[ProblemContext] = @ProblemContext,
		[AddTime] = @AddTime,
		[RoomID] = @RoomID
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Interlocution] (	
	[UserID],
	[ProblemTitle],
	[ProblemContext],
	[AddTime],
	[RoomID]
	) VALUES (
	@UserID,
	@ProblemTitle,
	@ProblemContext,
	@AddTime,
	@RoomID
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_Select_Paged]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Interlocution_Select_Paged]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	*
FROM
	[dbo].[ZL_Interlocution]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_GetUpdate]
	@ID int,
	@UserID int,
	@ProblemTitle nvarchar(1000),
	@ProblemContext varchar(2000),
	@AddTime datetime,
	@RoomID int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_Interlocution] SET
	[UserID] = @UserID,
	[ProblemTitle] = @ProblemTitle,
	[ProblemContext] = @ProblemContext,
	[AddTime] = @AddTime,
	[RoomID] = @RoomID
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[UserID],
	[ProblemTitle],
	[ProblemContext],
	[AddTime],
	[RoomID]
FROM
	[dbo].[ZL_Interlocution]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_GetInsert]
	@UserID int,
	@ProblemTitle nvarchar(1000),
	@ProblemContext varchar(2000),
	@AddTime datetime,
	@RoomID int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_Interlocution] (
	[UserID],
	[ProblemTitle],
	[ProblemContext],
	[AddTime],
	[RoomID]
) VALUES (
	@UserID,
	@ProblemTitle,
	@ProblemContext,
	@AddTime,
	@RoomID
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Interlocution_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_Interlocution_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_Interlocution]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserProduct_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE proc [dbo].[PR_UserProduct_Del]
	@id int
as
	delete from ZL_UserShop 
	where id=@id






' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserProduct_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE proc [dbo].[PR_UserProduct_GetById]
	@id int
as
	select * from ZL_UserShop where id=@id






' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserProduct_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_UserProduct_Add]
	@UserID int,
	@Class int,
	@Nodeid int,
	@ModelID int,
	@Categoryid int,
	@ProCode varchar(50),
	@BarCode varchar(50),
	@Proname varchar(255),
	@Kayword varchar(255),
	@ProUnit varchar(50),
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@ProClass int,
	@Properties int,
	@Sales int,
	@Proinfo text,
	@Procontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Producer varchar(255),
	@Brand varchar(50),
	@Allowed int,
	@Quota int,
	@DownQuota int,
	@Stock int,
	@StockDown int,
	@JisuanFs int,
	@Rate money,
	@Rateset int,
	@Dengji int,
	@ShiPrice money,
	@LinPrice money,
	@MemberPrice varchar(255),
	@ActPrice varchar(255),
	@Wholesales int,
	@Wholesaleone int,
	@Wholesalesinfo varchar(255),
	@Preset varchar(255),
	@Integral int,
	@Propeid int,
	@Recommend int,
	@Priority int,
	@MonthClickNum int,
	@UpdateTime datetime,
	@ModeTemplate varchar(255),
	@AddUser varchar(50),
	@DownCar int,
	@AddTime datetime,
	@TableName varchar(50),
	@Istrue int,
	@Isgood int,
	@MakeHtml int,
	@Sold int,
	@isnew int,
	@ishot int,
	@isbest int,
	@ItemID int,
	@ComModelID int,
	@AllClickNum int,
	@Colonel int,
	@ColonelNum int,
	@ColonelMoney money,
	@ColonelNowNum int,
	@ColoneState int,
	@ColonelTime datetime,
	@CautionMoney money,
	@DeliverMoney ntext,
	@OnCalonelTime int,
	@OnCalonelUser int,
	@OnCalonelMoney int,
	@Isreach int,
	@Ismarked int,
	@Isprefer int,
	@UserClass int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_UserShop] (
	[UserID],
	[Class],
	[Nodeid],
	[ModelID],
	[Categoryid],
	[ProCode],
	[BarCode],
	[Proname],
	[Kayword],
	[ProUnit],
	[Weight],
	[ServerPeriod],
	[ServerType],
	[ProClass],
	[Properties],
	[Sales],
	[Proinfo],
	[Procontent],
	[Clearimg],
	[Thumbnails],
	[Producer],
	[Brand],
	[Allowed],
	[Quota],
	[DownQuota],
	[Stock],
	[StockDown],
	[JisuanFs],
	[Rate],
	[Rateset],
	[Dengji],
	[ShiPrice],
	[LinPrice],
	[MemberPrice],
	[ActPrice],
	[Wholesales],
	[Wholesaleone],
	[Wholesalesinfo],
	[Preset],
	[Integral],
	[Propeid],
	[Recommend],
	[Priority],
	[MonthClickNum],
	[UpdateTime],
	[ModeTemplate],
	[AddUser],
	[DownCar],
	[AddTime],
	[TableName],
	[Istrue],
	[Isgood],
	[MakeHtml],
	[Sold],
	[isnew],
	[ishot],
	[isbest],
	[ItemID],
	[ComModelID],
	[AllClickNum],
	[Colonel],
	[ColonelNum],
	[ColonelMoney],
	[ColonelNowNum],
	[ColoneState],
	[ColonelTime],
	[CautionMoney],
	[DeliverMoney],
	[OnCalonelTime],
	[OnCalonelUser],
	[OnCalonelMoney],
	[Isreach],
	[Ismarked],
	[Isprefer],
	[UserClass]
) VALUES (
	@UserID,
	@Class,
	@Nodeid,
	@ModelID,
	@Categoryid,
	@ProCode,
	@BarCode,
	@Proname,
	@Kayword,
	@ProUnit,
	@Weight,
	@ServerPeriod,
	@ServerType,
	@ProClass,
	@Properties,
	@Sales,
	@Proinfo,
	@Procontent,
	@Clearimg,
	@Thumbnails,
	@Producer,
	@Brand,
	@Allowed,
	@Quota,
	@DownQuota,
	@Stock,
	@StockDown,
	@JisuanFs,
	@Rate,
	@Rateset,
	@Dengji,
	@ShiPrice,
	@LinPrice,
	@MemberPrice,
	@ActPrice,
	@Wholesales,
	@Wholesaleone,
	@Wholesalesinfo,
	@Preset,
	@Integral,
	@Propeid,
	@Recommend,
	@Priority,
	@MonthClickNum,
	@UpdateTime,
	@ModeTemplate,
	@AddUser,
	@DownCar,
	@AddTime,
	@TableName,
	@Istrue,
	@Isgood,
	@MakeHtml,
	@Sold,
	@isnew,
	@ishot,
	@isbest,
	@ItemID,
	@ComModelID,
	@AllClickNum,
	@Colonel,
	@ColonelNum,
	@ColonelMoney,
	@ColonelNowNum,
	@ColoneState,
	@ColonelTime,
	@CautionMoney,
	@DeliverMoney,
	@OnCalonelTime,
	@OnCalonelUser,
	@OnCalonelMoney,
	@Isreach,
	@Ismarked,
	@Isprefer,
	@UserClass
)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserProduct_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'







CREATE proc [dbo].[PR_UserProduct_Update]
	@ID int,
	@UserID int,
	@Class int,
	@Nodeid int,
	@ModelID int,
	@Categoryid int,
	@ProCode varchar(50),
	@BarCode varchar(50),
	@Proname varchar(255),
	@Kayword varchar(255),
	@ProUnit varchar(50),
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@ProClass int,
	@Properties int,
	@Sales int,
	@Proinfo text,
	@Procontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Producer varchar(255),
	@Brand varchar(50),
	@Allowed int,
	@Quota int,
	@DownQuota int,
	@Stock int,
	@StockDown int,
	@JisuanFs int,
	@Rate money,
	@Rateset int,
	@Dengji int,
	@ShiPrice money,
	@LinPrice money,
	@MemberPrice varchar(255),
	@ActPrice varchar(255),
	@Wholesales int,
	@Wholesaleone int,
	@Wholesalesinfo varchar(255),
	@Preset varchar(255),
	@Integral int,
	@Propeid int,
	@Recommend int,
	@Priority int,
	@MonthClickNum int,
	@UpdateTime datetime,
	@ModeTemplate varchar(255),
	@AddUser varchar(50),
	@DownCar int,
	@AddTime datetime,
	@TableName varchar(50),
	@Istrue int,
	@Isgood int,
	@MakeHtml int,
	@Sold int,
	@isnew int,
	@ishot int,
	@isbest int,
	@ItemID int,
	@ComModelID int,
	@AllClickNum int,
	@Colonel int,
	@ColonelNum int,
	@ColonelMoney money,
	@ColonelNowNum int,
	@ColoneState int,
	@ColonelTime datetime,
	@CautionMoney money,
	@DeliverMoney ntext,
	@OnCalonelTime int,
	@OnCalonelUser int,
	@OnCalonelMoney int,
	@Isreach int,
	@Ismarked int,
	@Isprefer int,
	@UserClass int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_UserShop] SET
	[UserID] = @UserID,
	[Class] = @Class,
	[Nodeid] = @Nodeid,
	[ModelID] = @ModelID,
	[Categoryid] = @Categoryid,
	[ProCode] = @ProCode,
	[BarCode] = @BarCode,
	[Proname] = @Proname,
	[Kayword] = @Kayword,
	[ProUnit] = @ProUnit,
	[Weight] = @Weight,
	[ServerPeriod] = @ServerPeriod,
	[ServerType] = @ServerType,
	[ProClass] = @ProClass,
	[Properties] = @Properties,
	[Sales] = @Sales,
	[Proinfo] = @Proinfo,
	[Procontent] = @Procontent,
	[Clearimg] = @Clearimg,
	[Thumbnails] = @Thumbnails,
	[Producer] = @Producer,
	[Brand] = @Brand,
	[Allowed] = @Allowed,
	[Quota] = @Quota,
	[DownQuota] = @DownQuota,
	[Stock] = @Stock,
	[StockDown] = @StockDown,
	[JisuanFs] = @JisuanFs,
	[Rate] = @Rate,
	[Rateset] = @Rateset,
	[Dengji] = @Dengji,
	[ShiPrice] = @ShiPrice,
	[LinPrice] = @LinPrice,
	[MemberPrice] = @MemberPrice,
	[ActPrice] = @ActPrice,
	[Wholesales] = @Wholesales,
	[Wholesaleone] = @Wholesaleone,
	[Wholesalesinfo] = @Wholesalesinfo,
	[Preset] = @Preset,
	[Integral] = @Integral,
	[Propeid] = @Propeid,
	[Recommend] = @Recommend,
	[Priority] = @Priority,
	[MonthClickNum] = @MonthClickNum,
	[UpdateTime] = @UpdateTime,
	[ModeTemplate] = @ModeTemplate,
	[AddUser] = @AddUser,
	[DownCar] = @DownCar,
	[AddTime] = @AddTime,
	[TableName] = @TableName,
	[Istrue] = @Istrue,
	[Isgood] = @Isgood,
	[MakeHtml] = @MakeHtml,
	[Sold] = @Sold,
	[isnew] = @isnew,
	[ishot] = @ishot,
	[isbest] = @isbest,
	[ItemID] = @ItemID,
	[ComModelID] = @ComModelID,
	[AllClickNum] = @AllClickNum,
	[Colonel] = @Colonel,
	[ColonelNum] = @ColonelNum,
	[ColonelMoney] = @ColonelMoney,
	[ColonelNowNum] = @ColonelNowNum,
	[ColoneState] = @ColoneState,
	[ColonelTime] = @ColonelTime,
	[CautionMoney] = @CautionMoney,
	[DeliverMoney] = @DeliverMoney,
	[OnCalonelTime] = @OnCalonelTime,
	[OnCalonelUser] = @OnCalonelUser,
	[OnCalonelMoney] = @OnCalonelMoney,
	[Isreach] = @Isreach,
	[Ismarked] = @Ismarked,
	[Isprefer] = @Isprefer,
	[UserClass] = @UserClass
WHERE
	[ID] = @ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserStock_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserStock_Add]
	@id int,
	@danju varchar(50),
	@stocktype int,
	@proname varchar(50),
	@addtime datetime,
	@adduser varchar(50),
	@content ntext,
	@proid int,
	@Pronum int
as
	insert into ZL_UserStock(danju,stocktype,proname,addtime,adduser,content,proid,Pronum)
	values (@danju,@stocktype,@proname,@addtime,@adduser,@content,@proid,@Pronum)





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserStock_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserStock_GetById]
	@id int
as
	select * from ZL_UserStock where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserStock_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserStock_Del]
	@id int
as
	delete from ZL_UserStock  
	where id=@id





' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserStock_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[PR_UserStock_Update]
	@id int,
	@danju varchar(50),
	@stocktype int,
	@proname varchar(50),
	@addtime datetime,
	@adduser varchar(50),
	@content ntext,
	@proid int,
	@Pronum int
as
	update ZL_UserStock set 
		danju=@danju,
		stocktype=@stocktype,
		proname=@proname,
		addtime=@addtime,
		adduser=@adduser,
		content=@content,
		proid=@proid,
		Pronum=@Pronum
	where id=@id






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Keywords_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Keywords_GetById]
(
	@KeywordID Int
)
 AS 
 
	SELECT KeywordID,KeywordText,KeywordType,Priority,Hits,LastUseTime,arrGeneralId,QuoteTimes FROM ZL_Keywords WHERE KeywordID = @KeywordID





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Keywords_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Keywords_Update] 
    (
    @KeywordID Int,
   @KeywordText NVarChar(200),
    @KeywordType Int,
    @Priority Int,
    @LastUseTime DateTime,
    @ArrayGeneralId ntext,
    @QuoteTimes int,
   @Hits int
	)	
AS
	UPDATE 
		ZL_Keywords
    SET 
        KeywordText = @KeywordText, Hits=@Hits,KeywordType=@KeywordType,Priority=@Priority,LastUseTime=@LastUseTime,arrGeneralID=@ArrayGeneralId ,QuoteTimes=@QuoteTimes
    WHERE 
         KeywordID = @KeywordID





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_KeyWords_GetKeyWordnfo]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_KeyWords_GetKeyWordnfo] 
AS
		SELECT * FROM ZL_KeyWords  ORDER BY KeywordID DESC 	
	RETURN





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Keywords_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Keywords_Add]	
	(
	@KeywordText NVarChar(200),
    @KeywordType Int,
    @Priority Int,
    @Hits Int,
    @lastUseTime datetime,
    @ArrayGeneralId ntext,
    @QuoteTimes int,
   @KeywordID int
	)	
AS
	INSERT INTO ZL_Keywords
	      (KeywordText,KeywordType,Priority,Hits,lastUseTime,arrGeneralID,QuoteTimes)
	VALUES (@KeywordText,@KeywordType,@Priority, @Hits, @lastUseTime,@ArrayGeneralId,@QuoteTimes)





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Label_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Label_Update]
(	@LabelID int,
	@LabelName nvarchar(50),
	@LabelType int,
	@LabelCate nvarchar(50),
	@LabelDesc nvarchar(255),
	@LabelParam ntext,	
	@LabelTable ntext,
	@LabelField ntext,
	@LabelWhere ntext,
	@LabelOrder ntext,
	@LabelContent ntext,
	@LabelCount nvarchar(50),
	@LabelAddUser int,
	@LabelNodeID int
)
AS
	UPDATE [ZL_Label] 
	Set		
		LabelName=@LabelName,
		LabelType=@LabelType,
		LabelCate=@LabelCate,
		LabelDesc=@LabelDesc,
		LabelParam=@LabelParam,
		LabelTable=@LabelTable,
		LabelField=@LabelField,
		LabelWhere=@LabelWhere,
		LabelOrder=@LabelOrder,
		LabelContent=@LabelContent,
		LabelCount=@LabelCount,
		LabelAddUser=@LabelAddUser,
		LabelNodeID=@LabelNodeID
	Where LabelID=@LabelID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Label_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Label_Add]
(	
	@LabelName nvarchar(50),
	@LabelType int,
	@LabelCate nvarchar(50),
	@LabelDesc nvarchar(255),
	@LabelParam ntext,	
	@LabelTable ntext,
	@LabelField ntext,
	@LabelWhere ntext,
	@LabelOrder ntext,
	@LabelContent ntext,
	@LabelCount nvarchar(50),
	@LabelAddUser int,
	@LabelNodeID int,
	@LabelID int OUTPUT
)
AS
	INSERT INTO [ZL_Label] 
	(		
		LabelName,
		LabelType,
		LabelCate,
		LabelDesc,
		LabelParam,
		LabelTable,
		LabelField,
		LabelWhere,
		LabelOrder,
		LabelContent,
		LabelCount,
		LabelAddUser,
		LabelNodeID
	)
	values
	(		
		@LabelName,
		@LabelType,
		@LabelCate,
		@LabelDesc,
		@LabelParam,	
		@LabelTable,
		@LabelField,
		@LabelWhere,
		@LabelOrder,
		@LabelContent,
		@LabelCount,
		@LabelAddUser,
		@LabelNodeID
)
SET @LabelID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_GetDelete]
	@JudeID int
AS

DELETE FROM [dbo].[ZL_LabelJude]
WHERE
	[JudeID] = @JudeID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_GetInsert]
	@Modeltypeinfo nvarchar(255),
	@addroot nvarchar(255),
	@setroot nvarchar(255),
	@Modelvalue nvarchar(255),
	@Valueroot nvarchar(1000),
	@LabelID int,
	@IsOpen int,
	@FalseContent ntext,
	@JudeID int OUTPUT
AS

INSERT INTO [dbo].[ZL_LabelJude] (
	[Modeltypeinfo],
	[addroot],
	[setroot],
	[Modelvalue],
	[Valueroot],
	[LabelID],
	[IsOpen],
	[FalseContent]
) VALUES (
	@Modeltypeinfo,
	@addroot,
	@setroot,
	@Modelvalue,
	@Valueroot,
	@LabelID,
	@IsOpen,
	@FalseContent
)

SET @JudeID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_GetSelect]
	@JudeID int
AS

SELECT
	[JudeID],
	[Modeltypeinfo],
	[addroot],
	[setroot],
	[Modelvalue],
	[Valueroot],
	[LabelID],
	[IsOpen],
	[FalseContent]
FROM
	[dbo].[ZL_LabelJude]
WHERE
	[JudeID] = @JudeID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_GetUpdate]
	@JudeID int,
	@Modeltypeinfo nvarchar(255),
	@addroot nvarchar(255),
	@setroot nvarchar(255),
	@Modelvalue nvarchar(255),
	@Valueroot nvarchar(1000),
	@LabelID int,
	@IsOpen int,
	@FalseContent ntext
AS

UPDATE [dbo].[ZL_LabelJude] SET
	[Modeltypeinfo] = @Modeltypeinfo,
	[addroot] = @addroot,
	[setroot] = @setroot,
	[Modelvalue] = @Modelvalue,
	[Valueroot] = @Valueroot,
	[LabelID] = @LabelID,
	[IsOpen] = @IsOpen,
	[FalseContent] = @FalseContent
WHERE
	[JudeID] = @JudeID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_InsertUpdate]
	@JudeID int,
	@Modeltypeinfo nvarchar(255),
	@addroot nvarchar(255),
	@setroot nvarchar(255),
	@Modelvalue nvarchar(255),
	@Valueroot nvarchar(1000),
	@LabelID int,
	@IsOpen int,
	@FalseContent ntext
AS

IF EXISTS(SELECT [JudeID] FROM [dbo].[ZL_LabelJude] WHERE [JudeID] = @JudeID)
BEGIN
	UPDATE [dbo].[ZL_LabelJude] SET
		[Modeltypeinfo] = @Modeltypeinfo,
		[addroot] = @addroot,
		[setroot] = @setroot,
		[Modelvalue] = @Modelvalue,
		[Valueroot] = @Valueroot,
		[LabelID] = @LabelID,
		[IsOpen] = @IsOpen,
		[FalseContent] = @FalseContent
	WHERE
		[JudeID] = @JudeID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_LabelJude] (	
	[Modeltypeinfo],
	[addroot],
	[setroot],
	[Modelvalue],
	[Valueroot],
	[LabelID],
	[IsOpen],
	[FalseContent]
	) VALUES (
	@Modeltypeinfo,
	@addroot,
	@setroot,
	@Modelvalue,
	@Valueroot,
	@LabelID,
	@IsOpen,
	@FalseContent
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_LabelJude_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_LabelJude_Select_All]
AS


SELECT
	[JudeID],
	[Modeltypeinfo],
	[addroot],
	[setroot],
	[Modelvalue],
	[Valueroot],
	[LabelID],
	[IsOpen],
	[FalseContent]
FROM
	[dbo].[ZL_LabelJude]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_GetUpdate]
	@A_ID int,
	@Nodeid int,
	@title nvarchar(500),
	@author nvarchar(255),
	@soucer nvarchar(255),
	@KewWord nvarchar(2000),
	@limit int,
	@Points int,
	@GOTOP int,
	@addTime datetime,
	@rate int,
	@content ntext,
	@itemid int,
	@pic nvarchar(255)
AS

UPDATE [dbo].[ZL_WapArticle] SET
	[Nodeid] = @Nodeid,
	[title] = @title,
	[author] = @author,
	[soucer] = @soucer,
	[KewWord] = @KewWord,
	[limit] = @limit,
	[Points] = @Points,
	[GOTOP] = @GOTOP,
	[addTime] = @addTime,
	[rate] = @rate,
	[content] = @content,
	[itemid] = @itemid,
	[pic] = @pic
WHERE
	[A_ID] = @A_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_Select_All]
AS


SELECT
	[A_ID],
	[Nodeid],
	[title],
	[author],
	[soucer],
	[KewWord],
	[limit],
	[Points],
	[GOTOP],
	[addTime],
	[rate],
	[content],
	[itemid],
	[pic]
FROM
	[dbo].[ZL_WapArticle]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_InsertUpdate]
	@A_ID int,
	@Nodeid int,
	@title nvarchar(500),
	@author nvarchar(255),
	@soucer nvarchar(255),
	@KewWord nvarchar(2000),
	@limit int,
	@Points int,
	@GOTOP int,
	@addTime datetime,
	@rate int,
	@content ntext,
	@itemid int,
	@pic nvarchar(255)
AS

IF EXISTS(SELECT [A_ID] FROM [dbo].[ZL_WapArticle] WHERE [A_ID] = @A_ID)
BEGIN
	UPDATE [dbo].[ZL_WapArticle] SET
		[Nodeid] = @Nodeid,
		[title] = @title,
		[author] = @author,
		[soucer] = @soucer,
		[KewWord] = @KewWord,
		[limit] = @limit,
		[Points] = @Points,
		[GOTOP] = @GOTOP,
		[addTime] = @addTime,
		[rate] = @rate,
		[content] = @content,
		[itemid] = @itemid,
		[pic] = @pic
	WHERE
		[A_ID] = @A_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_WapArticle] (	
	[Nodeid],
	[title],
	[author],
	[soucer],
	[KewWord],
	[limit],
	[Points],
	[GOTOP],
	[addTime],
	[rate],
	[content],
	[itemid],
	[pic]
	) VALUES (
	@Nodeid,
	@title,
	@author,
	@soucer,
	@KewWord,
	@limit,
	@Points,
	@GOTOP,
	@addTime,
	@rate,
	@content,
	@itemid,
	@pic
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_GetSelect]
	@A_ID int
AS

SELECT
	[A_ID],
	[Nodeid],
	[title],
	[author],
	[soucer],
	[KewWord],
	[limit],
	[Points],
	[GOTOP],
	[addTime],
	[rate],
	[content],
	[itemid],
	[pic]
FROM
	[dbo].[ZL_WapArticle]
WHERE
	[A_ID] = @A_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_GetInsert]
	@Nodeid int,
	@title nvarchar(500),
	@author nvarchar(255),
	@soucer nvarchar(255),
	@KewWord nvarchar(2000),
	@limit int,
	@Points int,
	@GOTOP int,
	@addTime datetime,
	@rate int,
	@content ntext,
	@itemid int,
	@pic nvarchar(255),
	@A_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_WapArticle] (
	[Nodeid],
	[title],
	[author],
	[soucer],
	[KewWord],
	[limit],
	[Points],
	[GOTOP],
	[addTime],
	[rate],
	[content],
	[itemid],
	[pic]
) VALUES (
	@Nodeid,
	@title,
	@author,
	@soucer,
	@KewWord,
	@limit,
	@Points,
	@GOTOP,
	@addTime,
	@rate,
	@content,
	@itemid,
	@pic
)

SET @A_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapArticle_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapArticle_GetDelete]
	@A_ID int
AS

DELETE FROM [dbo].[ZL_WapArticle]
WHERE
	[A_ID] = @A_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_GetUpdate]
	@I_id int,
	@Iinfo nvarchar(500),
	@Iurl nvarchar(500),
	@Itype int,
	@Stype int,
	@orderid int
AS

UPDATE [dbo].[ZL_MTit] SET
	[Iinfo] = @Iinfo,
	[Iurl] = @Iurl,
	[Itype] = @Itype,
	[Stype] = @Stype,
	[orderid] = @orderid
WHERE
	[I_id] = @I_id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_GetInsert]
	@Iinfo nvarchar(500),
	@Iurl nvarchar(500),
	@Itype int,
	@Stype int,
	@orderid int,
	@I_id int OUTPUT
AS

INSERT INTO [dbo].[ZL_MTit] (
	[Iinfo],
	[Iurl],
	[Itype],
	[Stype],
	[orderid]
) VALUES (
	@Iinfo,
	@Iurl,
	@Itype,
	@Stype,
	@orderid
)

SET @I_id = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_GetSelect]
	@I_id int
AS

SELECT
	[I_id],
	[Iinfo],
	[Iurl],
	[Itype],
	[Stype],
	[orderid]
FROM
	[dbo].[ZL_MTit]
WHERE
	[I_id] = @I_id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_GetDelete]
	@I_id int
AS

DELETE FROM [dbo].[ZL_MTit]
WHERE
	[I_id] = @I_id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_InsertUpdate]
	@I_id int,
	@Iinfo nvarchar(500),
	@Iurl nvarchar(500),
	@Itype int,
	@Stype int,
	@orderid int
AS

IF EXISTS(SELECT [I_id] FROM [dbo].[ZL_MTit] WHERE [I_id] = @I_id)
BEGIN
	UPDATE [dbo].[ZL_MTit] SET
		[Iinfo] = @Iinfo,
		[Iurl] = @Iurl,
		[Itype] = @Itype,
		[Stype] = @Stype,
		[orderid] = @orderid
	WHERE
		[I_id] = @I_id
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MTit] (	
	[Iinfo],
	[Iurl],
	[Itype],
	[Stype],
	[orderid]
	) VALUES (
	@Iinfo,
	@Iurl,
	@Itype,
	@Stype,
	@orderid
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MTit_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MTit_Select_All]
AS


SELECT
	[I_id],
	[Iinfo],
	[Iurl],
	[Itype],
	[Stype],
	[orderid]
FROM
	[dbo].[ZL_MTit]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_Select_All]
AS


SELECT
	[N_ID],
	[NodeName],
	[PNodeid],
	[NodeType],
	[NodeInfo],
	[Orderid],
	[limit],
	[Points],
	[UbbType],
	[Modeid],
	[NodeUrl],
	[Child],
	[Depth],
	[showNum],
	[program],
	[Nmore],
	[addtime]
FROM
	[dbo].[ZL_WapNode]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_InsertUpdate]
	@N_ID int,
	@NodeName nvarchar(255),
	@PNodeid int,
	@NodeType int,
	@NodeInfo ntext,
	@Orderid int,
	@limit int,
	@Points int,
	@UbbType int,
	@Modeid int,
	@NodeUrl nvarchar(300),
	@Child int,
	@Depth int,
	@showNum int,
	@program int,
	@Nmore nvarchar(1000),
	@addtime datetime
AS

IF EXISTS(SELECT [N_ID] FROM [dbo].[ZL_WapNode] WHERE [N_ID] = @N_ID)
BEGIN
	UPDATE [dbo].[ZL_WapNode] SET
		[NodeName] = @NodeName,
		[PNodeid] = @PNodeid,
		[NodeType] = @NodeType,
		[NodeInfo] = @NodeInfo,
		[Orderid] = @Orderid,
		[limit] = @limit,
		[Points] = @Points,
		[UbbType] = @UbbType,
		[Modeid] = @Modeid,
		[NodeUrl] = @NodeUrl,
		[Child] = @Child,
		[Depth] = @Depth,
		[showNum] = @showNum,
		[program] = @program,
		[Nmore] = @Nmore,
		[addtime] = @addtime
	WHERE
		[N_ID] = @N_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_WapNode] (	
	[NodeName],
	[PNodeid],
	[NodeType],
	[NodeInfo],
	[Orderid],
	[limit],
	[Points],
	[UbbType],
	[Modeid],
	[NodeUrl],
	[Child],
	[Depth],
	[showNum],
	[program],
	[Nmore],
	[addtime]
	) VALUES (
	@NodeName,
	@PNodeid,
	@NodeType,
	@NodeInfo,
	@Orderid,
	@limit,
	@Points,
	@UbbType,
	@Modeid,
	@NodeUrl,
	@Child,
	@Depth,
	@showNum,
	@program,
	@Nmore,
	@addtime
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_GetSelect]
	@N_ID int
AS

SELECT
	[N_ID],
	[NodeName],
	[PNodeid],
	[NodeType],
	[NodeInfo],
	[Orderid],
	[limit],
	[Points],
	[UbbType],
	[Modeid],
	[NodeUrl],
	[Child],
	[Depth],
	[showNum],
	[program],
	[Nmore],
	[addtime]
FROM
	[dbo].[ZL_WapNode]
WHERE
	[N_ID] = @N_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_GetUpdate]
	@N_ID int,
	@NodeName nvarchar(255),
	@PNodeid int,
	@NodeType int,
	@NodeInfo ntext,
	@Orderid int,
	@limit int,
	@Points int,
	@UbbType int,
	@Modeid int,
	@NodeUrl nvarchar(300),
	@Child int,
	@Depth int,
	@showNum int,
	@program int,
	@Nmore nvarchar(1000),
	@addtime datetime
AS

UPDATE [dbo].[ZL_WapNode] SET
	[NodeName] = @NodeName,
	[PNodeid] = @PNodeid,
	[NodeType] = @NodeType,
	[NodeInfo] = @NodeInfo,
	[Orderid] = @Orderid,
	[limit] = @limit,
	[Points] = @Points,
	[UbbType] = @UbbType,
	[Modeid] = @Modeid,
	[NodeUrl] = @NodeUrl,
	[Child] = @Child,
	[Depth] = @Depth,
	[showNum] = @showNum,
	[program] = @program,
	[Nmore] = @Nmore,
	[addtime] = @addtime
WHERE
	[N_ID] = @N_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_GetInsert]
	@NodeName nvarchar(255),
	@PNodeid int,
	@NodeType int,
	@NodeInfo ntext,
	@Orderid int,
	@limit int,
	@Points int,
	@UbbType int,
	@Modeid int,
	@NodeUrl nvarchar(300),
	@Child int,
	@Depth int,
	@showNum int,
	@program int,
	@Nmore nvarchar(1000),
	@addtime datetime,
	@N_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_WapNode] (
	[NodeName],
	[PNodeid],
	[NodeType],
	[NodeInfo],
	[Orderid],
	[limit],
	[Points],
	[UbbType],
	[Modeid],
	[NodeUrl],
	[Child],
	[Depth],
	[showNum],
	[program],
	[Nmore],
	[addtime]
) VALUES (
	@NodeName,
	@PNodeid,
	@NodeType,
	@NodeInfo,
	@Orderid,
	@limit,
	@Points,
	@UbbType,
	@Modeid,
	@NodeUrl,
	@Child,
	@Depth,
	@showNum,
	@program,
	@Nmore,
	@addtime
)

SET @N_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapNode_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapNode_GetDelete]
	@N_ID int
AS

DELETE FROM [dbo].[ZL_WapNode]
WHERE
	[N_ID] = @N_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_MailIdiograph]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Name],
	[AddTime],
	[State],
	[Context]
FROM
	[dbo].[ZL_MailIdiograph]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_InsertUpdate]
	@ID int,
	@Name nvarchar(50),
	@AddTime datetime,
	@State bit,
	@Context nvarchar(100)
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_MailIdiograph] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_MailIdiograph] SET
		[Name] = @Name,
		[AddTime] = @AddTime,
		[State] = @State,
		[Context] = @Context
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MailIdiograph] (	
	[Name],
	[AddTime],
	[State],
	[Context]
	) VALUES (
	@Name,
	@AddTime,
	@State,
	@Context
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_GetInsert]
	@Name nvarchar(50),
	@AddTime datetime,
	@State bit,
	@Context nvarchar(100),
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_MailIdiograph] (
	[Name],
	[AddTime],
	[State],
	[Context]
) VALUES (
	@Name,
	@AddTime,
	@State,
	@Context
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Name],
	[AddTime],
	[State],
	[Context]
FROM
	[dbo].[ZL_MailIdiograph]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailIdiograph_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailIdiograph_GetUpdate]
	@ID int,
	@Name nvarchar(50),
	@AddTime datetime,
	@State bit,
	@Context nvarchar(100)
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_MailIdiograph] SET
	[Name] = @Name,
	[AddTime] = @AddTime,
	[State] = @State,
	[Context] = @Context
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_GetUpdate]
	@O_ID int,
	@MainNode int,
	@Nodeid int,
	@Postion int,
	@NBR int,
	@OrderID int,
	@pic nvarchar(255),
	@UbbType int,
	@firstStr ntext,
	@UbbContent ntext,
	@OMore nvarchar(1000),
	@OMore2 int
AS

UPDATE [dbo].[ZL_WapOrder] SET
	[MainNode] = @MainNode,
	[Nodeid] = @Nodeid,
	[Postion] = @Postion,
	[NBR] = @NBR,
	[OrderID] = @OrderID,
	[pic] = @pic,
	[UbbType] = @UbbType,
	[firstStr] = @firstStr,
	[UbbContent] = @UbbContent,
	[OMore] = @OMore,
	[OMore2] = @OMore2
WHERE
	[O_ID] = @O_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_GetSelect]
	@O_ID int
AS

SELECT
	[O_ID],
	[MainNode],
	[Nodeid],
	[Postion],
	[NBR],
	[OrderID],
	[pic],
	[UbbType],
	[firstStr],
	[UbbContent],
	[OMore],
	[OMore2]
FROM
	[dbo].[ZL_WapOrder]
WHERE
	[O_ID] = @O_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_GetInsert]
	@MainNode int,
	@Nodeid int,
	@Postion int,
	@NBR int,
	@OrderID int,
	@pic nvarchar(255),
	@UbbType int,
	@firstStr ntext,
	@UbbContent ntext,
	@OMore nvarchar(1000),
	@OMore2 int,
	@O_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_WapOrder] (
	[MainNode],
	[Nodeid],
	[Postion],
	[NBR],
	[OrderID],
	[pic],
	[UbbType],
	[firstStr],
	[UbbContent],
	[OMore],
	[OMore2]
) VALUES (
	@MainNode,
	@Nodeid,
	@Postion,
	@NBR,
	@OrderID,
	@pic,
	@UbbType,
	@firstStr,
	@UbbContent,
	@OMore,
	@OMore2
)

SET @O_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_InsertUpdate]
	@O_ID int,
	@MainNode int,
	@Nodeid int,
	@Postion int,
	@NBR int,
	@OrderID int,
	@pic nvarchar(255),
	@UbbType int,
	@firstStr ntext,
	@UbbContent ntext,
	@OMore nvarchar(1000),
	@OMore2 int
AS

IF EXISTS(SELECT [O_ID] FROM [dbo].[ZL_WapOrder] WHERE [O_ID] = @O_ID)
BEGIN
	UPDATE [dbo].[ZL_WapOrder] SET
		[MainNode] = @MainNode,
		[Nodeid] = @Nodeid,
		[Postion] = @Postion,
		[NBR] = @NBR,
		[OrderID] = @OrderID,
		[pic] = @pic,
		[UbbType] = @UbbType,
		[firstStr] = @firstStr,
		[UbbContent] = @UbbContent,
		[OMore] = @OMore,
		[OMore2] = @OMore2
	WHERE
		[O_ID] = @O_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_WapOrder] (	
	[MainNode],
	[Nodeid],
	[Postion],
	[NBR],
	[OrderID],
	[pic],
	[UbbType],
	[firstStr],
	[UbbContent],
	[OMore],
	[OMore2]
	) VALUES (
	@MainNode,
	@Nodeid,
	@Postion,
	@NBR,
	@OrderID,
	@pic,
	@UbbType,
	@firstStr,
	@UbbContent,
	@OMore,
	@OMore2
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_Select_All]
AS


SELECT
	[O_ID],
	[MainNode],
	[Nodeid],
	[Postion],
	[NBR],
	[OrderID],
	[pic],
	[UbbType],
	[firstStr],
	[UbbContent],
	[OMore],
	[OMore2]
FROM
	[dbo].[ZL_WapOrder]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_WapOrder_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_WapOrder_GetDelete]
	@O_ID int
AS

DELETE FROM [dbo].[ZL_WapOrder]
WHERE
	[O_ID] = @O_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_MailInfo]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_GetInsert]
	@MailTitle nvarchar(500),
	@MailContext text,
	@MailSendTime datetime,
	@MailAddTime datetime,
	@MailState bit,
	@MailAddRees text,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_MailInfo] (
	[MailTitle],
	[MailContext],
	[MailSendTime],
	[MailAddTime],
	[MailState],
	[MailAddRees]
) VALUES (
	@MailTitle,
	@MailContext,
	@MailSendTime,
	@MailAddTime,
	@MailState,
	@MailAddRees
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[MailTitle],
	[MailContext],
	[MailSendTime],
	[MailAddTime],
	[MailState],
	[MailAddRees]
FROM
	[dbo].[ZL_MailInfo]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_GetUpdate]
	@ID int,
	@MailTitle nvarchar(500),
	@MailContext text,
	@MailSendTime datetime,
	@MailAddTime datetime,
	@MailState bit,
	@MailAddRees text
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_MailInfo] SET
	[MailTitle] = @MailTitle,
	[MailContext] = @MailContext,
	[MailSendTime] = @MailSendTime,
	[MailAddTime] = @MailAddTime,
	[MailState] = @MailState,
	[MailAddRees] = @MailAddRees
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[MailTitle],
	[MailContext],
	[MailSendTime],
	[MailAddTime],
	[MailState],
	[MailAddRees]
FROM
	[dbo].[ZL_MailInfo]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailInfo_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailInfo_InsertUpdate]
	@ID int,
	@MailTitle nvarchar(500),
	@MailContext text,
	@MailSendTime datetime,
	@MailAddTime datetime,
	@MailState bit,
	@MailAddRees text
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_MailInfo] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_MailInfo] SET
		[MailTitle] = @MailTitle,
		[MailContext] = @MailContext,
		[MailSendTime] = @MailSendTime,
		[MailAddTime] = @MailAddTime,
		[MailState] = @MailState,
		[MailAddRees] = @MailAddRees
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MailInfo] (	
	[MailTitle],
	[MailContext],
	[MailSendTime],
	[MailAddTime],
	[MailState],
	[MailAddRees]
	) VALUES (
	@MailTitle,
	@MailContext,
	@MailSendTime,
	@MailAddTime,
	@MailState,
	@MailAddRees
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_MailManage]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Email],
	[Postfix],
	[AddTime],
	[BackMostTime],
	[SubscribeToType],
	[UserID],
	[State]
FROM
	[dbo].[ZL_MailManage]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_GetUpdate]
	@ID int,
	@Email nvarchar(100),
	@Postfix nvarchar(50),
	@AddTime datetime,
	@BackMostTime datetime,
	@SubscribeToType nvarchar(50),
	@UserID int,
	@State bit
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_MailManage] SET
	[Email] = @Email,
	[Postfix] = @Postfix,
	[AddTime] = @AddTime,
	[BackMostTime] = @BackMostTime,
	[SubscribeToType] = @SubscribeToType,
	[UserID] = @UserID,
	[State] = @State
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_InsertUpdate]
	@ID int,
	@Email nvarchar(100),
	@Postfix nvarchar(50),
	@AddTime datetime,
	@BackMostTime datetime,
	@SubscribeToType nvarchar(50),
	@UserID int,
	@State bit
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_MailManage] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_MailManage] SET
		[Email] = @Email,
		[Postfix] = @Postfix,
		[AddTime] = @AddTime,
		[BackMostTime] = @BackMostTime,
		[SubscribeToType] = @SubscribeToType,
		[UserID] = @UserID,
		[State] = @State
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MailManage] (	
	[Email],
	[Postfix],
	[AddTime],
	[BackMostTime],
	[SubscribeToType],
	[UserID],
	[State]
	) VALUES (
	@Email,
	@Postfix,
	@AddTime,
	@BackMostTime,
	@SubscribeToType,
	@UserID,
	@State
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_GetInsert]
	@Email nvarchar(100),
	@Postfix nvarchar(50),
	@AddTime datetime,
	@BackMostTime datetime,
	@SubscribeToType nvarchar(50),
	@UserID int,
	@State bit,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_MailManage] (
	[Email],
	[Postfix],
	[AddTime],
	[BackMostTime],
	[SubscribeToType],
	[UserID],
	[State]
) VALUES (
	@Email,
	@Postfix,
	@AddTime,
	@BackMostTime,
	@SubscribeToType,
	@UserID,
	@State
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MailManage_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_MailManage_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Email],
	[Postfix],
	[AddTime],
	[BackMostTime],
	[SubscribeToType],
	[UserID],
	[State]
FROM
	[dbo].[ZL_MailManage]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_ADZone_GetExportList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[dt_ADZone_GetExportList]
@ZoneID int 
as 
select * from dbo.ZL_Advertisement where ADID in
(select ADID from dbo.ZL_Zone_Advertisement 
where ZoneID=@ZoneID and dbo.ZL_Zone_Advertisement.ADID=dbo.ZL_Advertisement.ADID )





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manage_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Manage_Add]
(
@AdminName nvarchar(50),
@AdminPassword nvarchar(100),
@UserName nvarchar(255),
@EnableMultiLogin bit,
@LastLoginIp nvarchar(50),
@IsLock bit,
@EnableModifyPassword bit,
@AdminRole ntext,
@Theme nvarchar(50),
@RndPassword nvarchar(50),
@NodeRole int,
@PubRole int,
@DefaultStart int,
@AdminType int,
@ManageNode nvarchar (500),
@AddUserID int,
@AdminTrueName nvarchar(50)
)
AS
INSERT INTO [dbo].[ZL_Manager] (
	[AdminName],
	[AdminPassword],
	[UserName],
	[EnableMultiLogin],
	[LastLoginIP],
	[IsLock],
	[EnableModifyPassword],
	[AdminRole],
	[Theme],
	[RandNumber],
	[NodeRole],
	[PubRole],
	[DefaultStart],
	[AdminType],
	[ManageNode],
	[AddUserID],
	[AdminTrueName]
) VALUES (
	@AdminName,
	@AdminPassword,
	@UserName,
	@EnableMultiLogin,
	@LastLoginIP,
	@IsLock,
	@EnableModifyPassword,
	@AdminRole,
	@Theme,
	@RndPassword,
	@NodeRole,
	@PubRole,
	@DefaultStart,
	@AdminType,
	@ManageNode,
	@AddUserID,
	@AdminTrueName
)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manage_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Manage_Update]
(
@AdminID int,
@AdminName nvarchar(50),
@AdminPassword nvarchar(100),
@UserName nvarchar(255),
@EnableMultilogin bit,
@LoginTimes int,
@LastLoginIp nvarchar(50),
@LastLoginTime datetime,
@LastLogoutTime datetime,
@LastModifyPasswordTime datetime,
@IsLock bit,
@EnableModifyPassword bit,
@RoleList ntext,
@Theme nvarchar(50),
@NodeRole int,
@PubRole int,
@RandNumber nvarchar(255),
@DefaultStart int,
@AdminType int,
@ManageNode nvarchar (500),
@AddUserID int,
@AdminTrueName nvarchar(50)
)
AS
UPDATE ZL_Manager SET 
AdminName=@AdminName,
AdminPassword=@AdminPassword,
UserName=@UserName,
EnableMultilogin=@EnableMultilogin,
LoginTimes=@LoginTimes,
LastLoginIP=@LastLoginIp,
LastLoginTime=@LastLoginTime,
LastLogoutTime=@LastLogoutTime,
LastModifyPwdTime=@LastModifyPasswordTime,
IsLock=@IsLock,
EnableModifyPassword=@EnableModifyPassword,
AdminRole=@RoleList,
Theme=@Theme,
NodeRole=@NodeRole,
PubRole=@PubRole,
RandNumber=@RandNumber,
[DefaultStart] = @DefaultStart,
[AdminType] = @AdminType,
[ManageNode] = @ManageNode,
[AddUserID] = @AddUserID,
[AdminTrueName]=@AdminTrueName
WHERE AdminId=@AdminID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：增加一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_Add]
@id int output,
@Producername varchar(255),
@Smallname varchar(255),
@CreateTime datetime,
@Coadd varchar(255),
@Telpho varchar(255),
@FaxCode varchar(50),
@PostCode varchar(50),
@CoWebsite varchar(255),
@Email varchar(50),
@CoClass varchar(50),
@CoPhoto varchar(255),
@Content text,
@Istop int,
@Disable int,
@Isbest int

 AS 
	INSERT INTO [ZL_Manufacturers](
	[Producername],[Smallname],[CreateTime],[Coadd],[Telpho],[FaxCode],[PostCode],[CoWebsite],[Email],[CoClass],[CoPhoto],[Content],[Istop],[Disable],[Isbest]
	)VALUES(
	@Producername,@Smallname,@CreateTime,@Coadd,@Telpho,@FaxCode,@PostCode,@CoWebsite,@Email,@CoClass,@CoPhoto,@Content,@Istop,@Disable,@Isbest
	)
	SET @id = @@IDENTITY


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：删除一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_Del]
@id int
 AS 
	DELETE [ZL_Manufacturers]
	 WHERE id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_Exists]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：是否已经存在 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_Exists]
@id int
AS
	DECLARE @TempID int
	SELECT @TempID = count(1) FROM [ZL_Manufacturers] WHERE id=@id 
	IF @TempID = 0
		RETURN 0
	ELSE
		RETURN 1


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_GetList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：查询记录信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_GetList]
 AS 
	SELECT 
	id,Producername,Smallname,CreateTime,Coadd,Telpho,FaxCode,PostCode,CoWebsite,Email,CoClass,CoPhoto,Content,Istop,Disable,Isbest
	 FROM [ZL_Manufacturers]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_GetMaxId]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到主键字段最大值 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_GetMaxId]
AS
	DECLARE @TempID int
	SELECT @TempID = max([id])+1 FROM [ZL_Manufacturers]
	IF @TempID IS NULL
		RETURN 1
	ELSE
		RETURN @TempID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：得到实体对象的详细信息 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_GetById]
@id int
 AS 
	SELECT 
	id,Producername,Smallname,CreateTime,Coadd,Telpho,FaxCode,PostCode,CoWebsite,Email,CoClass,CoPhoto,Content,Istop,Disable,Isbest
	 FROM [ZL_Manufacturers]
	 WHERE id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Manufacturers_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


------------------------------------
--用途：修改一条记录 
------------------------------------
CREATE PROCEDURE [dbo].[PR_Manufacturers_Update]
@id int,
@Producername varchar(255),
@Smallname varchar(255),
@CreateTime datetime,
@Coadd varchar(255),
@Telpho varchar(255),
@FaxCode varchar(50),
@PostCode varchar(50),
@CoWebsite varchar(255),
@Email varchar(50),
@CoClass varchar(50),
@CoPhoto varchar(255),
@Content text,
@Istop int,
@Disable int,
@Isbest int
 AS 
	UPDATE [ZL_Manufacturers] SET 
	[Producername] = @Producername,[Smallname] = @Smallname,[CreateTime] = @CreateTime,[Coadd] = @Coadd,[Telpho] = @Telpho,[FaxCode] = @FaxCode,[PostCode] = @PostCode,[CoWebsite] = @CoWebsite,[Email] = @Email,[CoClass] = @CoClass,[CoPhoto] = @CoPhoto,[Content] = @Content,[Istop] = @Istop,[Disable] = @Disable,[Isbest] = @Isbest
	WHERE id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_GetDelete]
	@M_id int
AS

DELETE FROM [dbo].[ZL_MiUserInfo]
WHERE
	[M_id] = @M_id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_GetInsert]
	@userid int,
	@schoolID int,
	@banji nvarchar(255),
	@prov nvarchar(50),
	@city nvarchar(50),
	@daike nvarchar(255),
	@realname nvarchar(255),
	@type int,
	@M_id int OUTPUT
AS

INSERT INTO [dbo].[ZL_MiUserInfo] (
	[userid],
	[schoolID],
	[banji],
	[prov],
	[city],
	[daike],
	[realname],
	[type]
) VALUES (
	@userid,
	@schoolID,
	@banji,
	@prov,
	@city,
	@daike,
	@realname,
	@type
)

SET @M_id = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_Select_All]
AS


SELECT
	[M_id],
	[userid],
	[schoolID],
	[banji],
	[prov],
	[city],
	[daike],
	[realname],
	[type]
FROM
	[dbo].[ZL_MiUserInfo]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_GetUpdate]
	@M_id int,
	@userid int,
	@schoolID int,
	@banji nvarchar(255),
	@prov nvarchar(50),
	@city nvarchar(50),
	@daike nvarchar(255),
	@realname nvarchar(255),
	@type int
AS

UPDATE [dbo].[ZL_MiUserInfo] SET
	[userid] = @userid,
	[schoolID] = @schoolID,
	[banji] = @banji,
	[prov] = @prov,
	[city] = @city,
	[daike] = @daike,
	[realname] = @realname,
	[type] = @type
WHERE
	[M_id] = @M_id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_InsertUpdate]
	@M_id int,
	@userid int,
	@schoolID int,
	@banji nvarchar(255),
	@prov nvarchar(50),
	@city nvarchar(50),
	@daike nvarchar(255),
	@realname nvarchar(255),
	@type int
AS

IF EXISTS(SELECT [M_id] FROM [dbo].[ZL_MiUserInfo] WHERE [M_id] = @M_id)
BEGIN
	UPDATE [dbo].[ZL_MiUserInfo] SET
		[userid] = @userid,
		[schoolID] = @schoolID,
		[banji] = @banji,
		[prov] = @prov,
		[city] = @city,
		[daike] = @daike,
		[realname] = @realname,
		[type] = @type
	WHERE
		[M_id] = @M_id
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MiUserInfo] (	
	[userid],
	[schoolID],
	[banji],
	[prov],
	[city],
	[daike],
	[realname],
	[type]
	) VALUES (
	@userid,
	@schoolID,
	@banji,
	@prov,
	@city,
	@daike,
	@realname,
	@type
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MiUserInfo_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MiUserInfo_GetSelect]
	@M_id int
AS

SELECT
	[M_id],
	[userid],
	[schoolID],
	[banji],
	[prov],
	[city],
	[daike],
	[realname],
	[type]
FROM
	[dbo].[ZL_MiUserInfo]
WHERE
	[M_id] = @M_id


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Model_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Model_Add]	
(
    @ModelID int,
    @ModelName NVarChar(50),    
    @Description NVarChar(250),
    @TableName nvarchar(50),
    @ItemName nvarchar(50),
    @ItemUnit nvarchar(20), 
    @ItemIcon nvarchar(255),
    @ModelType int,
    @ContentTemplate nvarchar(255),
    @MultiFlag bit,
    @NodeID int,
    @SysModel int,
    @FromModel int,
    @Thumbnail nvarchar(500),
	@Islotsize bit
)
AS
if(@ModelID=0)
BEGIN	
INSERT INTO 
[ZL_Model] 
(  
	[ModelName],    
	[Description], 
	[TableName],
	[ItemName],
	[ItemUnit],  
	[ItemIcon],
	[ModelType],
	[ContentTemplate],
	[MultiFlag],
	[NodeID],
	[SysModel],
	[FromModel],
	[Thumbnail],
	[Islotsize]
	)
	VALUES
	(
	@ModelName,
	@Description,
	@TableName,
	@ItemName,
	@ItemUnit,
	@ItemIcon,
	@ModelType,
	@ContentTemplate,
	@MultiFlag,
	@NodeID,
	@SysModel,
	@FromModel,
	@Thumbnail,
	@Islotsize
	)
-- 不存在创建指定数据表
EXEC(''CREATE TABLE dbo.''+ @TableName+'' ([ID] [int] IDENTITY (1, 1) PRIMARY Key NOT NULL)'')
END
ELSE
BEGIN
	update ZL_Model set [ModelName]=@ModelName,
	[Description]=@Description, 
	[TableName]=@TableName,
	[ItemName]=@ItemName,
	[ItemUnit]=@ItemUnit,  
	[ItemIcon]=@ItemIcon,
	[ContentTemplate]=@ContentTemplate,
	MultiFlag=@MultiFlag,
	NodeID=@NodeID,
	[SysModel]=@SysModel,
	[FromModel]=@FromModel,
	[Thumbnail]=@Thumbnail,
	[Islotsize]=@Islotsize
where ModelID=@ModelID		
END
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Contents_Model_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Contents_Model_Add]	
(
             @ModelID int,
	@ModelName NVarChar(20),    
	@Description NVarChar(255),
	@TableName nvarchar(50),
	@ItemName nvarchar(50),
	@ItemUnit nvarchar(50), 
	@ItemIcon nvarchar(255)
)
AS
	INSERT INTO 
	[ZL_Model] 
	(  
		[ModelID], 
		[ModelName],    
		[Description], 
		[TableName],
		[ItemName],
		[ItemUnit],  
		[ItemIcon]
	)
	VALUES
	(
		@ModelID,
		@ModelName,
		@Description,
		@TableName,
		@ItemName,
		@ItemUnit,
		@ItemIcon
	)
BEGIN
		-- 不存在创建指定数据表
		EXEC(''CREATE TABLE ''+ @TableName+'' (ID int,CONSTRAINT [PK_''+@TableName+''_ID] PRIMARY KEY CLUSTERED
(
 [ID] ASC
))'')

END




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_IsTableNameExists]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_IsTableNameExists]
(
    @TableName NVarChar(50)
)
as
BEGIN
	SET NOCOUNT OFF	
	select count(*) from [ZL_Model] where TableName=@TableName
End




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_IsModelNameExists]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




Create PROCEDURE [dbo].[PR_IsModelNameExists]
(
    @ModelName NVarChar(50)
)
as
select count(*) from [ZL_Model] where ModelName=@ModelName




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_UserModel_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_UserModel_Add]
(
    @ModelID int,
    @ModelName NVarChar(50),    
    @Description NVarChar(250),
    @TableName nvarchar(50),
    @ItemName nvarchar(50),
    @ItemUnit nvarchar(20), 
    @ItemIcon nvarchar(255),
    @ModelType int,
    @ContentTemplate nvarchar(255),
    @MultiFlag bit,
    @NodeID int,
    @SysModel int,
    @FromModel int,
    @Thumbnail nvarchar(500)
)
AS
INSERT INTO 
[ZL_Model] 
(  
	[ModelName],    
	[Description], 
	[TableName],
	[ItemName],
	[ItemUnit],  
	[ItemIcon],
	[ModelType],
	[ContentTemplate],
	[MultiFlag],
	[NodeID],
	[SysModel],
	[FromModel],
	[Thumbnail]
	)
	VALUES
	(
	@ModelName,
	@Description,
	@TableName,
	@ItemName,
	@ItemUnit,
	@ItemIcon,
	@ModelType,
	@ContentTemplate,
	@MultiFlag,
	@NodeID,
	@SysModel,
	@FromModel,
	@Thumbnail
	)
-- 不存在创建指定数据表
EXEC(''CREATE TABLE dbo.''+ @TableName+'' ([ID][int] IDENTITY (1, 1)  NOT NULL PRIMARY KEY ,[UserID][int] NOT NULL,[UserName][nvarchar] (255) NULL,[Styleid] [int] NULL DEFAULT (0),[Recycler] [bit] NULL DEFAULT (0),[IsCreate] [bit] NULL DEFAULT (0), [NewTime] [datetime] NULL DEFAULT (getdate()) )'')

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageModel_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_PageModel_Add]
(
    @ModelID int,
    @ModelName NVarChar(50),    
    @Description NVarChar(250),
    @TableName nvarchar(50),
    @ItemName nvarchar(50),
    @ItemUnit nvarchar(20), 
    @ItemIcon nvarchar(255),
    @ModelType int,
    @ContentTemplate nvarchar(255),
    @MultiFlag bit,
    @NodeID int,
    @SysModel int,
    @FromModel int,
    @Thumbnail nvarchar(500)
)
AS
INSERT INTO 
[ZL_Model] 
(  
	[ModelName],    
	[Description], 
	[TableName],
	[ItemName],
	[ItemUnit],  
	[ItemIcon],
	[ModelType],
	[ContentTemplate],
	[MultiFlag],
	[NodeID],
	[SysModel],
	[FromModel],
	[Thumbnail]
	)
	VALUES
	(
	@ModelName,
	@Description,
	@TableName,
	@ItemName,
	@ItemUnit,
	@ItemIcon,
	@ModelType,
	@ContentTemplate,
	@MultiFlag,
	@NodeID,
	@SysModel,
	@FromModel,
	@Thumbnail
	)
-- 不存在创建指定数据表
EXEC(''CREATE TABLE dbo.''+ @TableName+'' ([ID][int] IDENTITY (1, 1)  NOT NULL PRIMARY KEY ,[UserID][int] NOT NULL,[UserName][nvarchar] (255) NULL,[Styleid] [int] NULL DEFAULT (0))'')

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_StoreModel_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_StoreModel_Add]
(
    @ModelID int,
    @ModelName NVarChar(50),    
    @Description NVarChar(250),
    @TableName nvarchar(50),
    @ItemName nvarchar(50),
    @ItemUnit nvarchar(20), 
    @ItemIcon nvarchar(255),
    @ModelType int,
    @MultiFlag bit,
    @NodeID int,
    @SysModel int,
    @FromModel int,
    @ContentTemplate nvarchar(255),
    @Thumbnail nvarchar(500)
)
AS
INSERT INTO 
[ZL_Model] 
(  
	[ModelName],    
	[Description], 
	[TableName],
	[ItemName],
	[ItemUnit],  
	[ItemIcon],
	[ModelType],
	[MultiFlag],
	[NodeID],
	[SysModel],
	[FromModel],
	[ContentTemplate],
	[Thumbnail]
	)
	VALUES
	(
	@ModelName,
	@Description,
	@TableName,
	@ItemName,
	@ItemUnit,
	@ItemIcon,
	@ModelType,
	@MultiFlag,
    @NodeID,
    @SysModel,
    @FromModel,
    @ContentTemplate,
    @Thumbnail
	)
-- 不存在创建指定数据表
EXEC(''CREATE TABLE dbo.''+ @TableName+'' ([ID][int] IDENTITY (1, 1)  NOT NULL PRIMARY KEY ,
[UserID][int] NOT NULL,
[UserName][nvarchar] (255) NULL,
[StoreName][varchar] (50) NULL,

[StoreCredit] [int] NULL DEFAULT (0),
[StoreCommendState] [int] NULL DEFAULT (0),
[StoreState] [int] NULL DEFAULT (0),
[StoreStyleID] [int] NULL DEFAULT (0),
[StoreModelID] [int] NULL ,
[StoreStyle] [int] NULL DEFAULT (0),
[AddTime][datetime] NULL DEFAULT (getdate()))'')

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ModelField_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ModelField_Update]
@FieldID int,
@ModelID int,
@FieldName nvarchar(50),
@FieldAlias nvarchar(20),
@FieldTips nvarchar(50),
@FieldType nvarchar(50),
@Description nvarchar(255),
@IsNotNull bit,
@IsSearchForm bit,
@Content ntext,
@ShowList bit,
@ShowWidth int,
@IsShow bit,
@IsView bit,
@IsDownField int,
@DownServerID int,
@RestoreField int,
@IsCopy int,
@Islotsize bit
AS
	UPDATE ZL_ModelField 
	SET 
	FieldAlias= @FieldAlias,
	FieldTips=@FieldTips,
	[Description] = @Description,
	IsNotNull = @IsNotNull,
	IsSearchForm = @IsSearchForm,
	Content = @Content,
	ShowList=@ShowList,
	ShowWidth=@ShowWidth,
	IsShow=@IsShow,
	IsView=@IsView,
	IsDownField=@IsDownField,
	DownServerID=@DownServerID,
	RestoreField=@RestoreField,
	IsCopy=@IsCopy,
	Islotsize=@Islotsize 
	 WHERE FieldID = @FieldID and ModelID=@ModelID
	RETURN

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ModelField_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ModelField_Add]
@FieldID int,
@ModelID int,
@FieldName nvarchar(50) ,
@FieldAlias nvarchar(20) ,
@FieldTips nvarchar(50),
@Description nvarchar(255) ,
@IsNotNull bit ,
@IsSearchForm bit ,
@FieldType nvarchar(50) ,
@Content ntext,
@ShowList bit,
@ShowWidth int,
@IsShow bit,
@IsView bit,
@IsDownField int,
@DownServerID int,
@RestoreField int,
@IsCopy int,
@Islotsize bit
 AS
	Declare @OrderId int; 
	set @OrderId=(select Max(OrderId) from [ZL_ModelField] where ModelID=@ModelID)
	
	if @OrderId is null
		set @OrderId=0
	else
		set @OrderId=@OrderId+1
	
	INSERT INTO [ZL_ModelField]
	(
		ModelID,
		FieldName,
		FieldAlias,
		FieldTips,
		[Description],
		IsNotNull,
		IsSearchForm,
		FieldType,
		Content,
		OrderId,
		ShowList,
		ShowWidth,
		IsShow,
        IsView,
		IsDownField,
		DownServerID,
		RestoreField,
		IsCopy,
		Islotsize
	)
	 VALUES
	(
		@ModelID,
		@FieldName,
		@FieldAlias,
		@FieldTips,
		@Description,
		@IsNotNull,
		@IsSearchForm,
		@FieldType,
		@Content,
		@OrderId,
		@ShowList,
		@ShowWidth,
		@IsShow,
        @IsView,
		@IsDownField,
		@DownServerID,
		@RestoreField,
		@IsCopy,
		@Islotsize
	)	
	RETURN
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ModelField_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ModelField_Del]
	@FieldID int
AS
	/* SET NOCOUNT ON */ 
	delete from [ZL_ModelField] where FieldID=@FieldID
	RETURN




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_GetInsert]
	@N_ItemID int,
	@N_NodeID int,
	@N_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_MultiNode] (
	[N_ItemID],
	[N_NodeID]
) VALUES (
	@N_ItemID,
	@N_NodeID
)

SET @N_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_GetSelect]
	@N_ID int
AS

SELECT
	[N_ID],
	[N_ItemID],
	[N_NodeID]
FROM
	[dbo].[ZL_MultiNode]
WHERE
	[N_ID] = @N_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_GetDelete]
	@N_ID int
AS

DELETE FROM [dbo].[ZL_MultiNode]
WHERE
	[N_ID] = @N_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_InsertUpdate]
	@N_ID int,
	@N_ItemID int,
	@N_NodeID int
AS

IF EXISTS(SELECT [N_ID] FROM [dbo].[ZL_MultiNode] WHERE [N_ID] = @N_ID)
BEGIN
	UPDATE [dbo].[ZL_MultiNode] SET
		[N_ItemID] = @N_ItemID,
		[N_NodeID] = @N_NodeID
	WHERE
		[N_ID] = @N_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MultiNode] (	
	[N_ItemID],
	[N_NodeID]
	) VALUES (
	@N_ItemID,
	@N_NodeID
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_GetUpdate]
	@N_ID int,
	@N_ItemID int,
	@N_NodeID int
AS

UPDATE [dbo].[ZL_MultiNode] SET
	[N_ItemID] = @N_ItemID,
	[N_NodeID] = @N_NodeID
WHERE
	[N_ID] = @N_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MultiNode_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MultiNode_Select_All]
AS


SELECT
	[N_ID],
	[N_ItemID],
	[N_NodeID]
FROM
	[dbo].[ZL_MultiNode]


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeList_select]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_NodeList_select]
	@ParentID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED


select * from ZL_Node where ParentID=@ParentID Order by OrderID

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Node_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Node_Del]
	@NodeID int
AS
	Delete From ZL_Node Where NodeID=@NodeID
Return




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Nodes_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Nodes_Update]
(
	@NodeID int,
	@NodeName nvarchar(50),
	@NodeType int,
	@Tips nvarchar(4000),
	@NodeDir nvarchar(50),
	@NodeUrl nvarchar(255),
	@NodeListUrl nvarchar(255),
	@ParentID int,
	@Child int,
	@Depth int,
	@NodePicUrl nvarchar(255),
	@Description nvarchar(4000),
	@Meta_Keywords nvarchar(4000),
	@Meta_Description nvarchar(4000),
	@OpenType bit,
	@PurviewType bit,
	@CommentType bit,
	@HitsOfHot int,
	@ListTemplateFile nvarchar(255),
	@IndexTemplate nvarchar(255),
	@LastinfoTemplate nvarchar(255),
	@HotinfoTemplate nvarchar(255),
	@ProposeTemplate nvarchar(255),
	@ContentModel nvarchar(255),
	@ItemOpenType bit,
	@ContentHtmlRule int,
	@ListPageHtmlEx int,
	@ContentFileEx int,
	@HtmlPosition int,
	@NodeListType int,
	@OrderID int,
	@ConsumePoint int,
	@ConsumeType int,
	@ConsumeTime int,
	@ConsumeCount int,
	@Shares float,
	@Custom text,
	@SafeGuard int,
	@OpenTypeTrue nvarchar(50),
	@ItemOpenTypeTrue nvarchar(50),
	@NodeBySite int,
	@SiteConfige text,
	@Contribute int,
	@SiteContentAudit int,
	@AuditNodeList nvarchar(1000),
	@AddPoint int,
	@AddMoney money,
	@ClickTimeout int
)
AS
UPDATE  ZL_Node SET
	NodeName=@NodeName,
	NodeType=@NodeType,
	Tips=@Tips,
	ParentID=@ParentId,
	Depth=@Depth,
	Child=@Child,
	NodeDir=@NodeDir,
	NodeUrl=@NodeUrl,
	NodeListUrl=@NodeListUrl,
	NodePicUrl=@NodePicUrl,
	Description=@Description,			
	Meta_Keywords=@Meta_Keywords,
	Meta_Description=@Meta_Description,
	OpenType=@OpenType,
	PurviewType=@PurviewType,
	CommentType=@CommentType,
	HitsOfHot=@HitsOfHot,
	ListTemplateFile=@ListTemplateFile,
	IndexTemplate=@IndexTemplate,
	LastinfoTemplate=@LastinfoTemplate,
	HotinfoTemplate=@HotinfoTemplate,
	ProposeTemplate=@ProposeTemplate,
	ContentModel=@ContentModel,
	ItemOpenType=@ItemOpenType,
	ContentHtmlRule=@ContentHtmlRule,	
	ListPageHtmlEx=@ListPageHtmlEx,
	ContentFileEx=@ContentFileEx,
	HtmlPosition=@HtmlPosition,
	OrderID=@OrderID,
	NodeListType=@NodeListType,
	ConsumePoint=@ConsumePoint,
	ConsumeType=@ConsumeType,
	ConsumeTime=@ConsumeTime,
	ConsumeCount=@ConsumeCount,
	Shares=@Shares,
	Custom=@Custom,
	SafeGuard=@SafeGuard,
	OpenTypeTrue=@OpenTypeTrue,
	ItemOpenTypeTrue=@ItemOpenTypeTrue,
	NodeBySite=@NodeBySite,
	SiteConfige=@SiteConfige,
	Contribute=@Contribute,
	SiteContentAudit=@SiteContentAudit,
	AuditNodeList=@AuditNodeList,
	AddPoint=@AddPoint,
	AddMoney=@AddMoney,
	ClickTimeout=@ClickTimeout
	Where NodeID=@NodeID
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Nodes_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Nodes_Add]
(	@NodeID int,
	@NodeName nvarchar(50),
	@NodeType int,
	@Tips nvarchar(4000),
	@NodeDir nvarchar(50),
	@NodeUrl nvarchar(255),
	@NodeListUrl  nvarchar(255),
	@ParentID int,
	@Child int,
	@Depth int,
	@NodePicUrl nvarchar(255),
	@Description nvarchar(4000),
	@Meta_Keywords nvarchar(4000),
	@Meta_Description nvarchar(4000),
	@OpenType bit,
	@PurviewType bit,
	@CommentType bit,
	@HitsOfHot int,
	@ListTemplateFile nvarchar(255),
	@IndexTemplate nvarchar(255),
	@LastinfoTemplate nvarchar(255),
	@HotinfoTemplate nvarchar(255),
	@ProposeTemplate nvarchar(255),
	@ContentModel nvarchar(255),
	@ItemOpenType bit,
	@ContentHtmlRule int,
	@ListPageHtmlEx int,
	@ContentFileEx int,
	@HtmlPosition int,
	@NodeListType int,
	@OrderID int,
	@ConsumePoint int,
	@ConsumeType int,
	@ConsumeTime int,
	@ConsumeCount int,
	@Shares float,
	@Custom text,
	@SafeGuard int,
	@OpenTypeTrue nvarchar(50),
	@ItemOpenTypeTrue varchar(50),
	@NodeBySite int,
	@SiteConfige text,
	@Contribute int,
	@SiteContentAudit int,
	@AuditNodeList nvarchar(1000),
	@AddPoint int,
	@AddMoney money,
	@ClickTimeout int
)
AS
INSERT INTO [dbo].[ZL_Node] 
(
	NodeName,
	NodeType,
	Tips,
	NodeDir,
	NodeUrl,
	NodeListUrl,
	ParentID,
	Child,
	Depth,
	NodePicUrl,
	Description,
	Meta_Keywords,
	Meta_Description,
	OpenType,
	PurviewType,
	CommentType,
	HitsOfHot,
	ListTemplateFile,
	IndexTemplate,
	LastinfoTemplate,
	HotinfoTemplate,
	ProposeTemplate,
	ContentModel,
	ItemOpenType,
	ContentHtmlRule,
	ListPageHtmlEx,
	ContentFileEx,
	HtmlPosition,
	NodeListType,
	OrderID,
	ConsumePoint,
	ConsumeType,
	ConsumeTime,
	ConsumeCount,
	Shares,
	Custom,
	SafeGuard,
	OpenTypeTrue,
	ItemOpenTypeTrue,
	NodeBySite,
	SiteConfige,
	Contribute,
	SiteContentAudit,
	AuditNodeList,
	AddPoint,
	AddMoney,
	ClickTimeout
)
values
(
	@NodeName,
	@NodeType,
	@Tips,
	@NodeDir,
	@NodeUrl,
	@NodeListUrl,
	@ParentID,
	@Child,
	@Depth,
	@NodePicUrl,
	@Description,
	@Meta_Keywords,
	@Meta_Description,
	@OpenType,
	@PurviewType,
	@CommentType,
	@HitsOfHot,
	@ListTemplateFile,
	@IndexTemplate,
	@LastinfoTemplate,
	@HotinfoTemplate,
	@ProposeTemplate,
	@ContentModel,
	@ItemOpenType,
	@ContentHtmlRule,
	@ListPageHtmlEx,
	@ContentFileEx,
	@HtmlPosition,
	@NodeListType,
	@OrderID,
	@ConsumePoint,
	@ConsumeType,
	@ConsumeTime,
	@ConsumeCount,
	@Shares,
	@Custom,
	@SafeGuard,
	@OpenTypeTrue,
	@ItemOpenTypeTrue,
	@NodeBySite,
	@SiteConfige,
	@Contribute,
	@SiteContentAudit,
	@AuditNodeList,
	@AddPoint,
	@AddMoney,
	@ClickTimeout
)
select @@IDENTITY AS newID
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Node_DelChild]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Node_DelChild]
	@NodeID int
AS
	Delete From ZL_Node Where ParentID=@NodeID
Return




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_Select_All]
AS


SELECT
	[RN_ID],
	[RID],
	[NID],
	[look],
	[Modify],
	[State],
	[addTo],
	[Columns],
	[Comments],
[pNid]
FROM
	[dbo].[ZL_NodeRole]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_InsertUpdate]
	@RN_ID int,
	@RID int,
	@NID int,
	@look int,
	@Modify int,
	@State int,
	@addTo int,
	@Columns int,
	@Comments int,
@pNid int
AS

IF EXISTS(SELECT [RN_ID] FROM [dbo].[ZL_NodeRole] WHERE [RN_ID] = @RN_ID)
BEGIN
	UPDATE [dbo].[ZL_NodeRole] SET
		[RID] = @RID,
		[NID] = @NID,
		[look] = @look,
		[Modify] = @Modify,
		[State] = @State,
		[addTo] = @addTo,
		[Columns] = @Columns,
		[Comments] = @Comments,
[pNid]=@pNid
	WHERE
		[RN_ID] = @RN_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_NodeRole] (	
	[RID],
	[NID],
	[look],
	[Modify],
	[State],
	[addTo],
	[Columns],
	[Comments],
[pNid]
	) VALUES (
	@RID,
	@NID,
	@look,
	@Modify,
	@State,
	@addTo,
	@Columns,
	@Comments,
@pNid
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_GetUpdate]
	@RN_ID int,
	@RID int,
	@NID int,
	@look int,
	@Modify int,
	@State int,
	@addTo int,
	@Columns int,
	@Comments int,
@pNid int
AS

UPDATE [dbo].[ZL_NodeRole] SET
	[RID] = @RID,
	[NID] = @NID,
	[look] = @look,
	[Modify] = @Modify,
	[State] = @State,
	[addTo] = @addTo,
	[Columns] = @Columns,
	[Comments] = @Comments,
[pNid]=@pNid
WHERE
	[RN_ID] = @RN_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_GetDelete]
	@RN_ID int
AS

DELETE FROM [dbo].[ZL_NodeRole]
WHERE
	[RN_ID] = @RN_ID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_GetSelect]
	@RN_ID int
AS

SELECT
	[RN_ID],
	[RID],
	[NID],
	[look],
	[Modify],
	[State],
	[addTo],
	[Columns],
	[Comments],
[pNid]
FROM
	[dbo].[ZL_NodeRole]
WHERE
	[RN_ID] = @RN_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_NodeRole_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_NodeRole_GetInsert]
	@RID int,
	@NID int,
	@look int,
	@Modify int,
	@State int,
	@addTo int,
	@Columns int,
	@Comments int,
@pNid int,
	@RN_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_NodeRole] (
	[RID],
	[NID],
	[look],
	[Modify],
	[State],
	[addTo],
	[Columns],
	[Comments],
[pNid]
) VALUES (
	@RID,
	@NID,
	@look,
	@Modify,
	@State,
	@addTo,
	@Columns,
	@Comments,
@pNid
)

SET @RN_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_GetSelect]
	@O_ID int
AS

SELECT
	[O_ID],
	[O_IP],
	[O_SessionID],
	[O_UpdateTime],
	[O_Name],
	[Uid]
FROM
	[dbo].[ZL_OnlineUsers]
WHERE
	[O_ID] = @O_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_GetUpdate]
	@O_ID int,
	@O_IP nvarchar(50),
	@O_SessionID nvarchar(50),
	@O_UpdateTime datetime,
	@O_Name nvarchar(50),
	@Uid int
AS

UPDATE [dbo].[ZL_OnlineUsers] SET
	[O_IP] = @O_IP,
	[O_SessionID] = @O_SessionID,
	[O_UpdateTime] = @O_UpdateTime,
	[O_Name] = @O_Name,
	[Uid] = @Uid
WHERE
	[O_ID] = @O_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_InsertUpdate]
	@O_ID int,
	@O_IP nvarchar(50),
	@O_SessionID nvarchar(50),
	@O_UpdateTime datetime,
	@O_Name nvarchar(50),
	@Uid int
AS

IF EXISTS(SELECT [O_ID] FROM [dbo].[ZL_OnlineUsers] WHERE [O_ID] = @O_ID)
BEGIN
	UPDATE [dbo].[ZL_OnlineUsers] SET
		[O_IP] = @O_IP,
		[O_SessionID] = @O_SessionID,
		[O_UpdateTime] = @O_UpdateTime,
		[O_Name] = @O_Name,
		[Uid] = @Uid
	WHERE
		[O_ID] = @O_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_OnlineUsers] (	
	[O_IP],
	[O_SessionID],
	[O_UpdateTime],
	[O_Name],
	[Uid]
	) VALUES (
	@O_IP,
	@O_SessionID,
	@O_UpdateTime,
	@O_Name,
	@Uid
	)

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_GetInsert]
	@O_IP nvarchar(50),
	@O_SessionID nvarchar(50),
	@O_UpdateTime datetime,
	@O_Name nvarchar(50),
	@Uid int,
	@O_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_OnlineUsers] (
	[O_IP],
	[O_SessionID],
	[O_UpdateTime],
	[O_Name],
	[Uid]
) VALUES (
	@O_IP,
	@O_SessionID,
	@O_UpdateTime,
	@O_Name,
	@Uid
)

SET @O_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_GetDelete]
	@O_ID int
AS

DELETE FROM [dbo].[ZL_OnlineUsers]
WHERE
	[O_ID] = @O_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_OnlineUser_Select_All]
AS


SELECT
	[O_ID],
	[O_IP],
	[O_SessionID],
	[O_UpdateTime],
	[O_Name],
	[Uid]
FROM
	[dbo].[ZL_OnlineUsers]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_OnlineUser_Select_onlineusers]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_OnlineUser_Select_onlineusers] 
	@times int,
	@O_IP nvarchar(50),
	@O_SessionID nvarchar(50),
	@O_Name nvarchar(50),
	@Uid int,
	@Type int
AS
	IF EXISTS(SELECT [O_ID] FROM [dbo].[ZL_OnlineUsers] WHERE [O_SessionID] = @O_SessionID)
BEGIN
	IF @Type <>0
	UPDATE [dbo].[ZL_OnlineUsers] SET [O_UpdateTime] = getDate() WHERE [O_SessionID]=@O_SessionID
	ELSE
	DELETE FROM  [dbo].[ZL_OnlineUsers] WHERE [O_SessionID]=@O_SessionID
END
ELSE IF @Type <> 0
BEGIN
	INSERT INTO [dbo].[ZL_OnlineUsers] (	
	[O_IP],
	[O_SessionID],
	[O_UpdateTime],
	[O_Name],
	[Uid]
	) VALUES (
	@O_IP,
	@O_SessionID,
	getDate(),
	@O_Name,
	@Uid
	)
END
	DELETE  FROM [dbo].[ZL_OnlineUsers] WHERE DATEADD(SECOND,@times*2,O_UpdateTime)<getDate()
	SELECT * FROM [dbo].[ZL_OnlineUsers]
' 
END

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Orderinfo_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Orderinfo_GetById]
	@id int
as
	select * from ZL_Orderinfo where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Orderinfo_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Orderinfo_Del]
	@id int
as
	delete from ZL_Orderinfo  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Orderinfo_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Orderinfo_Add]
	@id int,
	@OrderNo varchar(50),
	@Reuser varchar(255),
	@Receiver varchar(50),
	@Rename varchar(255),
	@Guojia varchar(255),
	@Shengfen varchar(255),
	@Chengshi varchar(255),
	@Diqu varchar(255),
	@Jiedao varchar(255),
	@ZipCode varchar(50),
	@Phone varchar(50),
	@Email varchar(50),
	@Mobile int,
	@Delivery int,
	@Outstock int,
	@Deliverytime int,
	@Payment int,
	@Invoice text,
	@Ordermessage text,
	@Merchandiser varchar(50),
	@Internalrecords text,
	@Ordersamount money,
	@Receivablesamount money,
	@Specifiedprice money,
	@Freight money,
	@Invoiceneeds int,
	@Developedvotes int,
	@OrderStatus int,
	@Paymentstatus int,
	@StateLogistics int,
	@Signed int,
	@Settle int,
	@Aside int,
	@Suspended int,
	@Ordertype int,
	@AddTime datetime,
	@AddUser varchar(255),
	@Userid int,
    @city nvarchar(100),
    @IsCount  bit,
    @Integral int,
    @parentID int,
    @service_charge float,
    @Balance_price float,
    @Balance_remark nvarchar(1000),
    @Freight_remark nvarchar(1000),
    @MobileNum nvarchar(20)
as
	insert into ZL_Orderinfo(OrderNo,Reuser,Receiver,Rename,Guojia,Shengfen,Chengshi,Diqu,Jiedao,ZipCode,Phone,Email,Mobile,Delivery,Outstock,Deliverytime,Payment,Invoice,Ordermessage,Merchandiser,Internalrecords,Ordersamount,Receivablesamount,Specifiedprice,Freight,Invoiceneeds,Developedvotes,OrderStatus,Paymentstatus,StateLogistics,Signed,Settle,Aside,Suspended,Ordertype,AddTime,AddUser,Userid,city,IsCount,Integral,parentID,service_charge,Balance_price,Balance_remark,Freight_remark,MobileNum)
	values (@OrderNo,@Reuser,@Receiver,@Rename,@Guojia,@Shengfen,@Chengshi,@Diqu,@Jiedao,@ZipCode,@Phone,@Email,@Mobile,@Delivery,@Outstock,@Deliverytime,@Payment,@Invoice,@Ordermessage,@Merchandiser,@Internalrecords,@Ordersamount,@Receivablesamount,@Specifiedprice,@Freight,@Invoiceneeds,@Developedvotes,@OrderStatus,@Paymentstatus,@StateLogistics,@Signed,@Settle,@Aside,@Suspended,@Ordertype,@AddTime,@AddUser,@Userid,@city,@IsCount,@Integral,@parentID,@service_charge,@Balance_price,@Balance_remark,@Freight_remark,@MobileNum)

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Orderinfo_Getallmoney]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Orderinfo_Getallmoney]
as
	select sum(Ordersamount) from ZL_Orderinfo


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Orderinfo_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Orderinfo_Update]
	@id int,
	@OrderNo varchar(50),
	@Reuser varchar(255),
	@Receiver varchar(50),
	@Rename varchar(255),
	@Guojia varchar(255),
	@Shengfen varchar(255),
	@Chengshi varchar(255),
	@Diqu varchar(255),
	@Jiedao varchar(255),
	@ZipCode varchar(50),
	@Phone varchar(50),
	@Email varchar(50),
	@Mobile int,
	@Delivery int,
	@Outstock int,
	@Deliverytime int,
	@Payment int,
	@Invoice text,
	@Ordermessage text,
	@Merchandiser varchar(50),
	@Internalrecords text,
	@Ordersamount money,
	@Receivablesamount money,
	@Specifiedprice money,
	@Freight money,
	@Invoiceneeds int,
	@Developedvotes int,
	@OrderStatus int,
	@Paymentstatus int,
	@StateLogistics int,
	@Signed int,
	@Settle int,
	@Aside int,
	@Suspended int,
	@Ordertype int,
	@AddTime datetime,
	@AddUser varchar(255),
	@Userid int,
    @Integral int,
    @parentID int,
    @service_charge float,
    @Balance_price float,
    @Freight_remark nvarchar(1000),
    @Balance_remark nvarchar(1000)
as
	update ZL_Orderinfo set 
		OrderNo=@OrderNo,
		Reuser=@Reuser,
		Receiver=@Receiver,
		Rename=@Rename,
		Guojia=@Guojia,
		Shengfen=@Shengfen,
		Chengshi=@Chengshi,
		Diqu=@Diqu,
		Jiedao=@Jiedao,
		ZipCode=@ZipCode,
		Phone=@Phone,
		Email=@Email,
		Mobile=@Mobile,
		Delivery=@Delivery,
		Outstock=@Outstock,
		Deliverytime=@Deliverytime,
		Payment=@Payment,
		Invoice=@Invoice,
		Ordermessage=@Ordermessage,
		Merchandiser=@Merchandiser,
		Internalrecords=@Internalrecords,
		Ordersamount=@Ordersamount,
		Receivablesamount=@Receivablesamount,
		Specifiedprice=@Specifiedprice,
		Freight=@Freight,
		Invoiceneeds=@Invoiceneeds,
		Developedvotes=@Developedvotes,
		OrderStatus=@OrderStatus,
		Paymentstatus=@Paymentstatus,
		StateLogistics=@StateLogistics,
		Signed=@Signed,
		Settle=@Settle,
		Aside=@Aside,
		Suspended=@Suspended,
		Ordertype=@Ordertype,
		AddTime=@AddTime,
		AddUser=@AddUser,
		Userid=@Userid,
		Integral=@Integral,
		parentID=@parentID,
		service_charge=@service_charge,
		Balance_price=@Balance_price,
		Freight_remark=@Freight_remark,
		Balance_remark=@Balance_remark
	where id=@id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageStyle_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PageStyle_Add]
@PageNodeid int output,
@PageNodeName varchar(255),
@Istrue int,
@Orderid int,
@Addtime datetime,
@IsDefault int

 AS 
	INSERT INTO [ZL_PageStyle](
	[PageNodeName],[Istrue],[Orderid],[Addtime],[IsDefault]
	)VALUES(
	@PageNodeName,@Istrue,@Orderid,@Addtime,@IsDefault
	)
	SET @PageNodeid = @@IDENTITY




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageStyle_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PageStyle_Update]
@PageNodeid int,
@PageNodeName varchar(255),
@Istrue int,
@Orderid int,
@Addtime datetime,
@IsDefault int
 AS 
	UPDATE [ZL_PageStyle] SET 
	[PageNodeName] = @PageNodeName,[Istrue] = @Istrue,[Orderid] = @Orderid,[Addtime] = @Addtime,[IsDefault] = @IsDefault
	WHERE PageNodeid=@PageNodeid 




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageStyle_TrueGetList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_PageStyle_TrueGetList]
 AS 

	SELECT 
	PageNodeid,PageNodeName,Istrue,Orderid,Addtime,IsDefault
	 FROM [ZL_PageStyle] where istrue=1 order by OrderID desc


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageStyle_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PageStyle_Del]
@PageNodeid int
 AS 
	DELETE [ZL_PageStyle]
	 WHERE PageNodeid=@PageNodeid 




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageStyle_Exists]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PageStyle_Exists]
@PageNodeid int
AS
	DECLARE @TempID int
	SELECT @TempID = count(1) FROM [ZL_PageStyle] WHERE PageNodeid=@PageNodeid 
	IF @TempID = 0
		RETURN 0
	ELSE
		RETURN 1




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageStyle_GetList]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_PageStyle_GetList]
@PageNodeid int
 AS 
	if @PageNodeid=0
	SELECT 
	PageNodeid,PageNodeName,Istrue,Orderid,Addtime,IsDefault
	 FROM [ZL_PageStyle] order by OrderID desc
	else
	SELECT 
	PageNodeid,PageNodeName,Istrue,Orderid,Addtime,IsDefault
	 FROM [ZL_PageStyle] where PageNodeid=@PageNodeid


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_PageTemplate_Add]
	@TemplateID int,
	@TemplateName varchar(50),
	@TemplateUrl varchar(50),
	@TemplateType int,
	@UserGroup varchar(50),
	@Addtime datetime,
	@IsTrue int,
	@Userid int,
	@Username varchar(255),
	@ParentID int,
	@OrderID int,
	@OpenType varchar(50),
	@Modelinfo text,
	@identifiers varchar(255),
	@nodeFileEx varchar(50),
	@contentFileEx varchar(50),
	@nodeimgurl varchar(255),
	@nodeimgtext varchar(255),
	@pagecontent text,
	@pageMetakeyword varchar(255),
	@pageMetakeyinfo varchar(255),
	@linkurl  varchar(255),
	@linkimg  varchar(255),
	@linktxt varchar(255),
	@ParentNode int
as
	insert into ZL_PageTemplate(TemplateName,TemplateUrl,TemplateType,UserGroup,Addtime,IsTrue,Userid,Username,ParentID,OrderID,OpenType,Modelinfo,identifiers,nodeFileEx,contentFileEx,nodeimgurl,nodeimgtext,pagecontent,pageMetakeyword,pageMetakeyinfo,linkurl,linkimg,linktxt,ParentNode)
	values (@TemplateName,@TemplateUrl,@TemplateType,@UserGroup,@Addtime,@IsTrue,@Userid,@Username,@ParentID,@OrderID,@OpenType,@Modelinfo,@identifiers,@nodeFileEx,@contentFileEx,@nodeimgurl,@nodeimgtext,@pagecontent,@pageMetakeyword,@pageMetakeyinfo,@linkurl,@linkimg,@linktxt,@ParentNode)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_PageTemplate_GetById]
	@TemplateID int
as
	select * from ZL_PageTemplate where TemplateID=@TemplateID
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_PageTemplate_Del]
	@TemplateID int
as
	delete from ZL_PageTemplate  
	where TemplateID=@TemplateID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_PageTemplate_Update]
	@TemplateID int,
	@TemplateName varchar(50),
	@TemplateUrl varchar(50),
	@TemplateType int,
	@UserGroup varchar(50),
	@Addtime datetime,
	@IsTrue int,
	@Userid int,
	@Username varchar(255),
	@ParentID int,
	@OrderID int,
	@OpenType varchar(50),
	@Modelinfo text,
 	@identifiers varchar(255),
	@nodeFileEx varchar(50),
	@contentFileEx varchar(50),
	@nodeimgurl varchar(255),
	@nodeimgtext varchar(255),
	@pagecontent text,
	@pageMetakeyword varchar(255),
	@pageMetakeyinfo varchar(255),
	@linkurl  varchar(255),
	@linkimg  varchar(255),
	@linktxt varchar(255),
	@ParentNode int
as
	update ZL_PageTemplate set 
		TemplateName=@TemplateName,
		TemplateUrl=@TemplateUrl,
		TemplateType=@TemplateType,
		UserGroup=@UserGroup,
		Addtime=@Addtime,
		IsTrue=@IsTrue,
		Userid=@Userid,
		Username=@Username,
		ParentID=@ParentID,
		OrderID=@OrderID,
		OpenType=@OpenType,
		Modelinfo=@Modelinfo,
		identifiers=@identifiers,
    	nodeFileEx=@nodeFileEx,
    	contentFileEx=@contentFileEx,
    	nodeimgurl=@nodeimgurl,
    	nodeimgtext=@nodeimgtext,
    	pagecontent=@pagecontent,
    	pageMetakeyword=@pageMetakeyword,
    	pageMetakeyinfo=@pageMetakeyinfo,
    	linkurl=@linkurl,
    	linkimg=@linkimg,
    	linktxt=@linktxt,
    	ParentNode=@ParentNode

	where TemplateID=@TemplateID


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_Getall]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_PageTemplate_Getall]
as
	select * from ZL_PageTemplate order by orderid desc


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_GetParentID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_PageTemplate_GetParentID]
@ParentID int
 AS 
	SELECT *  FROM [ZL_PageTemplate] where ParentID=@ParentID  order by orderid desc


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_GetSysall]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_PageTemplate_GetSysall]
@ParentID int
 AS 
	SELECT *  FROM [ZL_PageTemplate] where ParentID=@ParentID and  Userid=0  order by orderid desc


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PageTemplate_GetUserall]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_PageTemplate_GetUserall]
@UserGroup int,
@ParentID int,
@Userid int
 AS 
--	SELECT *  FROM [ZL_PageTemplate] where ParentID=@ParentID and  Userid=0 or (TemplateID in (select TemplateID from ZL_PageTemplate where userid=@Userid and ParentID=@ParentID))  order by orderid desc
select * from ZL_PageTemplate where (UserGroup=@UserGroup and ParentID=@ParentID and userid=0)  or (userid=@Userid and ParentID=@ParentID and UserGroup=@UserGroup) order by orderid desc


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PayPlat_ListAll]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PayPlat_ListAll]
AS
select * from ZL_PayPlat Order by IsDefault desc,OrderID asc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PayPlat_Search]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PayPlat_Search]
AS
select * from ZL_PayPlat where IsDisabled=0 Order by IsDefault desc,OrderID asc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PayPlat_SearchID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PayPlat_SearchID]
@PayPlatID int
AS
select * from ZL_PayPlat where PayPlatID=@PayPlatID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PayPlat_SetDefault]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PayPlat_SetDefault]
@PayPlatID int
AS
Update ZL_PayPlat set IsDefault=1,IsDisabled=0 where PayPlatID=@PayPlatID
Update ZL_PayPlat set IsDefault=0 where PayPlatID<>@PayPlatID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_AllSucc]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_AllSucc]
AS
select a.*,b.PayPlatName from ZL_Payment a left outer join ZL_PayPlat b on a.PayPlatID=b.PayPlatID where a.Status=3 order by a.Status asc,a.PaymentID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PayPlat_AddUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PayPlat_AddUpdate]
(
@PayPlatID int,
@PayClass int,
@PayPlatName nvarchar(255),
@AccountID nvarchar(255),
@MD5Key nvarchar(255),
@Rate float,
@SellerEmail nvarchar(255),
@OrderID int,
@IsDisabled bit,
@IsDefault bit,
@payType nvarchar(50),
@leadtoGroup nvarchar(500)
)
AS
if(@PayPlatID=0)
BEGIN
Insert into ZL_PayPlat
(
PayClass,
PayPlatName,
AccountID,
MD5Key,
Rate,
SellerEmail,
OrderID,
IsDisabled,
IsDefault,
payType,
leadtoGroup
)
values(
@PayClass,
@PayPlatName,
@AccountID,
@MD5Key,
@Rate,
@SellerEmail,
@OrderID,
@IsDisabled,
@IsDefault,
@payType,
@leadtoGroup
)
END
ELSE
BEGIN
Update ZL_PayPlat Set
PayClass=@PayClass,
PayPlatName=@PayPlatName,
AccountID=@AccountID,
MD5Key=@MD5Key,
Rate=@Rate,
SellerEmail=@SellerEmail,
OrderID=@OrderID,
IsDisabled=@IsDisabled,
IsDefault=@IsDefault,
payType=@payType,
leadtoGroup=@leadtoGroup
Where PayPlatID=@PayPlatID
END

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_PayPlat_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_PayPlat_Del]
@PayPlatID int
AS
delete from ZL_PayPlat Where PayPlatID=@PayPlatID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_PlatSucc]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_PlatSucc]
@PayPlatID int
AS
select a.*,b.PayPlatName from ZL_Payment a left outer join ZL_PayPlat b on a.PayPlatID=b.PayPlatID where a.PayPlatID=@PayPlatID and a.Status=3 order by a.Status asc,a.PaymentID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_PlatUnSucc]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_PlatUnSucc]
@PayPlatID int
AS
select a.*,b.PayPlatName from ZL_Payment a left outer join ZL_PayPlat b on a.PayPlatID=b.PayPlatID where a.PayPlatID=@PayPlatID and a.Status<>3 order by a.Status asc,a.PaymentID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_AllUnSucc]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_AllUnSucc]
AS
select a.*,b.PayPlatName from ZL_Payment a left outer join ZL_PayPlat b on a.PayPlatID=b.PayPlatID where a.Status<3 order by a.Status asc,a.PaymentID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_ByID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_ByID]
@PaymentID int
AS
select * from ZL_Payment where PaymentID=@PaymentID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_Del]
@PaymentID int
AS
delete from ZL_Payment where PaymentID=@PaymentID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_Set]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_Set]
@PaymentID int
AS
Update  ZL_Payment set CStatus=1 where PaymentID=@PaymentID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_Update]
(
@PaymentID int,
@PaymentNum nvarchar(50),
@UserID int,
@PayPlatID int,
@MoneyPay money,
@MoneyTrue money,
@PayTime datetime,
@SuccessTime datetime,
@Status int,
@PlatformInfo nvarchar(200),
@Remark nvarchar(255)
)
AS
Update ZL_Payment set
PaymentNum=@PaymentNum,
UserID=@UserID,
PayPlatID=@PayPlatID,
MoneyPay=@MoneyPay,
MoneyTrue=@MoneyTrue,
PayTime=@PayTime,
SuccessTime=@SuccessTime,
Status=@Status,
PlatformInfo=@PlatformInfo,
Remark=@Remark
Where PaymentID=@PaymentID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Payment_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Payment_Add]
(
@PaymentID int,
@PaymentNum nvarchar(50),
@UserID int,
@PayPlatID int,
@MoneyPay money,
@MoneyTrue money,
@PayTime datetime,
@SuccessTime datetime,
@Status int,
@PlatformInfo nvarchar(200),
@Remark nvarchar(255)
)
AS
insert into ZL_Payment
(
PaymentNum,
UserID,
PayPlatID,
MoneyPay,
MoneyTrue,
PayTime,
SuccessTime,
Status,
PlatformInfo,
Remark
)
values(
@PaymentNum,
@UserID,
@PayPlatID,
@MoneyPay,
@MoneyTrue,
@PayTime,
@SuccessTime,
@Status,
@PlatformInfo,
@Remark
)
select @@IDENTITY AS newID




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF OBJECT_ID(N'[dbo].[PR_Permission_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_Permission_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_Permission_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_Permission_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_Permission_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_Permission_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_Permission_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_Permission_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Permission_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_Permission_GetInsert]
	@RoleName nvarchar(255),
	@RoleImg nvarchar(255),
	@Info nvarchar(255),
	@Perlist ntext,
	@UserGroup ntext,
	@Precedence int,
	@IsTrue bit,
	@ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_Permission] (
	[RoleName],
	[RoleImg],
	[Info],
	[Perlist],
	[UserGroup],
	[Precedence],
	[IsTrue]
) VALUES (
	@RoleName,
	@RoleImg,
	@Info,
	@Perlist,
	@UserGroup,
	@Precedence,
	@IsTrue
)

SET @ID = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_Permission_GetUpdate]
	@ID int,
	@RoleName nvarchar(255),
	@RoleImg nvarchar(255),
	@Info nvarchar(255),
	@Perlist ntext,
	@UserGroup ntext,
	@Precedence int,
	@IsTrue bit
AS

UPDATE [dbo].[ZL_Permission] SET
	[RoleName] = @RoleName,
	[RoleImg] = @RoleImg,
	[Info] = @Info,
	[Perlist] = @Perlist,
	[UserGroup] = @UserGroup,
	[Precedence] = @Precedence,
	[IsTrue] = @IsTrue
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_Permission_InsertUpdate]
	@ID int,
	@RoleName nvarchar(255),
	@RoleImg nvarchar(255),
	@Info nvarchar(255),
	@Perlist ntext,
	@UserGroup ntext,
	@Precedence int,
	@IsTrue bit
AS

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_Permission] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_Permission] SET
		[RoleName] = @RoleName,
		[RoleImg] = @RoleImg,
		[Info] = @Info,
		[Perlist] = @Perlist,
		[UserGroup] = @UserGroup,
		[Precedence] = @Precedence,
		[IsTrue] = @IsTrue
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Permission] (	
	[RoleName],
	[RoleImg],
	[Info],
	[Perlist],
	[UserGroup],
	[Precedence],
	[IsTrue]
	) VALUES (
	@RoleName,
	@RoleImg,
	@Info,
	@Perlist,
	@UserGroup,
	@Precedence,
	@IsTrue
	)

END

GO


CREATE PROCEDURE [dbo].[PR_Permission_GetDelete]
	@ID int
AS

DELETE FROM [dbo].[ZL_Permission]
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_Permission_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_Permission]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Permission_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[RoleName],
	[RoleImg],
	[Info],
	[Perlist],
	[UserGroup],
	[Precedence],
	[IsTrue]
FROM
	[dbo].[ZL_Permission]
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_Permission_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Permission]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Permission_Select_All]
AS


SELECT
	[ID],
	[RoleName],
	[RoleImg],
	[Info],
	[Perlist],
	[UserGroup],
	[Precedence],
	[IsTrue]
FROM
	[dbo].[ZL_Permission]

GO



IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Present_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Present_GetById]
	@id int
as
	select * from ZL_Present where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Present_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Present_Update]
	@id int,
	@Prename varchar(50),
	@Pretype varchar(50),
	@procode varchar(50),
	@ShiPrice money,
	@LinPrice money,
	@ProUnit varchar(50),
	@Stock int,
	@StockDown int,
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@Preinfo text,
	@precontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Adduser varchar(50),
	@Addtime datetime,
	@Updatetime datetime
as
	update ZL_Present set 
		Prename=@Prename,
		Pretype=@Pretype,
		procode=@procode,
		ShiPrice=@ShiPrice,
		LinPrice=@LinPrice,
		ProUnit=@ProUnit,
		Stock=@Stock,
		StockDown=@StockDown,
		Weight=@Weight,
		ServerPeriod=@ServerPeriod,
		ServerType=@ServerType,
		Preinfo=@Preinfo,
		precontent=@precontent,
		Clearimg=@Clearimg,
		Thumbnails=@Thumbnails,
		Adduser=@Adduser,
		Addtime=@Addtime,
		Updatetime=@Updatetime
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Present_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Present_Add]
	@id int,
	@Prename varchar(50),
	@Pretype varchar(50),
	@procode varchar(50),
	@ShiPrice money,
	@LinPrice money,
	@ProUnit varchar(50),
	@Stock int,
	@StockDown int,
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@Preinfo text,
	@precontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Adduser varchar(50),
	@Addtime datetime,
	@Updatetime datetime
as
	insert into ZL_Present
(Prename,Pretype,procode,ShiPrice,LinPrice,ProUnit,Stock,StockDown,Weight,ServerPeriod,ServerType,Preinfo,precontent,Clearimg,Thumbnails,Adduser,Addtime,Updatetime)
	values 
(@Prename,@Pretype,@procode,@ShiPrice,@LinPrice,@ProUnit,@Stock,@StockDown,@Weight,@ServerPeriod,@ServerType,@Preinfo,@precontent,@Clearimg,@Thumbnails,@Adduser,@Addtime,@Updatetime)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Present_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Present_Del]
	@id int
as
	delete from ZL_Present  
	where id=@id


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_Project_Update] 
    (
    @ProjectID Int,
   @ProjectName NVarChar(255),
    @ProjectIntro ntext,
    @UserID Int,
    @RequireID int,
    @StartDate datetime,
    @EndDate datetime,
    @Status int,
   @ProCateid int
	)	
AS
	UPDATE ZL_Project
    SET    
  ProjectName = @ProjectName,ProjectCategoryID=@ProCateid,ProjectIntro=@ProjectIntro,UserID=@UserID,RequireID =@RequireID,StartDate=@StartDate,Status=@Status,EndDate =@EndDate
    WHERE  ProjectID= @ProjectID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_PassedCancel]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Project_PassedCancel]
@projectid int
as update dbo.ZL_Project set Passed=0 where ProjectID=@projectid




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_Passed]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Project_Passed]
@projectid int
as update dbo.ZL_Project set Passed=1 where ProjectID=@projectid





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_SelByUid]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_Project_SelByUid] 
@Uid int
AS
		SELECT * FROM ZL_Project where UserID=@Uid ORDER BY ProjectID DESC 	
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_GetProjectByID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_Project_GetProjectByID]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
        SELECT * FROM ZL_Project WHERE ProjectID=@ID
	END
	
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_Project_Delete]
	@ID int
AS
	/* SET NOCOUNT ON */ 
	delete from [ZL_Project] where ProjectID=@ID
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Project_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_Project_Add]
(
@ProjectID int,
@ProjectName nvarchar(255),
@ProjectIntro ntext,
@RequireID int,
@StartDate datetime,
@EndDate datetime ,
@Status int,
@UserID int,
@ProCateid int
)
AS
INSERT INTO ZL_Project (ProjectName,ProjectIntro,RequireID,StartDate,EndDate,Status ,UserID,ProjectCategoryID) VALUES (@ProjectName ,@ProjectIntro,@RequireID,@StartDate ,@EndDate,@Status,@UserID,@ProCateid)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectAffairs_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_ProjectAffairs_Add]
(
@ID int,
@MainTitleID int,
@SubTitleID int,
@Title nvarchar(50),
@Content ntext,
@AuthorID int,
@AuthorName nvarchar(50),
@EditTime datetime,
@LastModifyTime datetime
)
AS
Insert into ZL_ProjectAffairs (MainTitleID,SubTitleID,Title,Content,AuthorID,AuthorName,EditTime,LastModifyTime ) values (@MainTitleID,@SubTitleID,@Title,@Content,@AuthorID,@AuthorName,@EditTime,@LastModifyTime )




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectAffairs_GetSub]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectAffairs_GetSub]
@MID int 
AS
select * from ZL_ProjectAffairs where MainTitleID=@MID order by SubTitleID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectAffairs_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectAffairs_Delete]
@ID int 
AS
delete  from ZL_ProjectAffairs where ID=@ID




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectAffairs_GetByID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectAffairs_GetByID]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
        SELECT * FROM ZL_ProjectAffairs WHERE ID=@ID
	END
	
	RETURN




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectAffairs_GetMain]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_ProjectAffairs_GetMain]
AS
select * from ZL_ProjectAffairs where MainTitleID>0 order by ID desc




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectCategory_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectCategory_Add] 
(   
   @ProjectCategoryID int, 	
   @ProjectCategoryName nvarchar(50),
    @ProjectCategoryIntro nvarchar(255)
)
AS
	INSERT INTO
	ZL_ProjectCategory(ProjectCategoryName,ProjectCategoryIntro) VALUES(@ProjectCategoryName,@ProjectCategoryIntro )




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectCategory_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectCategory_Delete]
	@ID int
AS
	delete from ZL_ProjectCategory where ProjectCategoryID=@ID
	RETURN




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectCategory_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectCategory_Update] 
(
   @ProjectCategoryID int,  
   @ProjectCategoryName nvarchar(50),
   @ProjectCategoryIntro nvarchar(255)
)
AS
	IF @ProjectCategoryID > 0
	BEGIN
		UPDATE ZL_ProjectCategory SET
ProjectCategoryName=@ProjectCategoryName,ProjectCategoryIntro=@ProjectCategoryIntro WHERE ProjectCategoryID=@ProjectCategoryID
		
	END




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectDiscuss_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectDiscuss_Add]
(
@DiscussID int,
@ProjectID int,
@WorkID int,
@UserID int,
@Content ntext,
@DiscussDate datetime
)
AS
INSERT INTO ZL_ProjectDiscuss (ProjectID,WorkID,UserID,Content,DiscussDate ) VALUES (@ProjectID,@WorkID,@UserID,@Content ,@DiscussDate)






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectDiscuss_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectDiscuss_Delete]
	@ID int
AS
	/* SET NOCOUNT ON */ 
	delete from [ZL_ProjectDiscuss] where DiscussID=@ID
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectDiscuss_SelByWid]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectDiscuss_SelByWid]
(
	@WID int
)
AS
    IF @WID > 0
    BEGIN
        SELECT * FROM ZL_ProjectDiscuss WHERE WorkID=@WID
	END
	
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectDiscuss_GetAll]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectDiscuss_GetAll]
AS
SELECt *  FROM ZL_ProjectDiscuss ORDER BY DiscussDate desc






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectField_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectField_Add] 
(   
   @ID int, 	
   @ProjectID int,
    @FieldName nvarchar(100),
    @Alias nvarchar(100),
   @Type varchar(50),
    @FieldValue ntext
)
AS
	INSERT INTO
	ZL_ProjectField(ProjectID,FieldName,Alias,Type,FieldValue) VALUES(@ProjectID,@FieldName,@Alias,@Type,@FieldValue)




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectField_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectField_Update] 
(
   @ID int,  
   @ProjectID int,
   @FieldName nvarchar(100),
   @Alias nvarchar(100),
   @Type varchar(50),
   @FieldValue ntext   
)
AS
	IF @ID > 0
	BEGIN
		UPDATE ZL_ProjectField SET
[ProjectID]=@ProjectID,FieldName=@FieldName,Alias=@Alias,Type=@Type,FieldValue=@FieldValue WHERE ID=@ID
		
	END




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectField_GetByPFID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectField_GetByPFID]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
        SELECT * FROM ZL_ProjectField WHERE ID=@ID
	END
	
	RETURN




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectField_GetByPriD]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_ProjectField_GetByPriD]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
        SELECT*FROM ZL_ProjectField WHERE ProjectID=@ID order by  ID desc
	END
	
	RETURN




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectField_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectField_Delete]
	@ID int
AS
	delete from [ZL_ProjectField] where ProjectID=@ID
	RETURN




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectField_DeleteByFid]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ProjectField_DeleteByFid]
	@ID int
AS
	delete from [ZL_ProjectField] where ID=@ID
	RETURN




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectWork_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectWork_Update] 
    (
    @WorkID Int,
   @WorkName NVarChar(255),
    @WorkIntro ntext,
    @ProjectID Int,
    @Approving int,
    @Status int,
    @EndDate datetime
	)	
AS
	UPDATE ZL_ProjectWork
    SET         WorkName = @WorkName, WorkIntro=@WorkIntro,ProjectID=@ProjectID,Approving =@Approving,Status=@Status,EndDate =@EndDate
    WHERE 
         WorkID = @WorkID






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectWork_SelByWID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectWork_SelByWID]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
        SELECT * FROM ZL_ProjectWork  WHERE WorkID=@ID
	END
	
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectWork_SelByPID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectWork_SelByPID]
(
	@ProjectID Int
)
 AS 
 
	SELECT * FROM ZL_ProjectWork WHERE ProjectID = @ProjectID






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectWork_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectWork_Del]
	@ID int
AS
	/* SET NOCOUNT ON */ 
	delete from [ZL_ProjectWork] where WorkID=@ID
	RETURN






' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ProjectWork_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE PROCEDURE [dbo].[PR_ProjectWork_Add]
(
@WorkID int,
@WorkName nvarchar(255),
@WorkIntro ntext,
@ProjectID int,
@Approving int,
@Status int,
@EndDate datetime
)
AS
	Insert Into ZL_ProjectWork (WorkName,WorkIntro,ProjectID,Approving,Status,EndDate) values(@WorkName,@WorkIntro,@ProjectID,@Approving,@Status,@EndDate)






' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Promotions_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Promotions_Add]
	@id int,
	@Promoname varchar(255),
	@Promostart datetime,
	@Promoend datetime,
	@Pricetop money,
	@Priceend money,
	@AddUser varchar(50),
	@Integral int,
	@GetPresent int,
	@Presentmoney money,
	@IntegralTure int,
	@PromoProlist varchar(255),
	@Addtime datetime,
	@TureUser varchar(50)
as
	insert into ZL_Promotions(Promoname,Promostart,Promoend,Pricetop,Priceend,AddUser,Integral,GetPresent,Presentmoney,IntegralTure,PromoProlist,Addtime,TureUser)
	values (@Promoname,@Promostart,@Promoend,@Pricetop,@Priceend,@AddUser,@Integral,@GetPresent,@Presentmoney,@IntegralTure,@PromoProlist,@Addtime,@TureUser)


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Promotions_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Promotions_GetById]
	@id int
as
	select * from ZL_Promotions where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Promotions_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Promotions_Del]
	@id int
as
	delete from ZL_Promotions  
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Promotions_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Promotions_Update]
	@id int,
	@Promoname varchar(255),
	@Promostart datetime,
	@Promoend datetime,
	@Pricetop money,
	@Priceend money,
	@AddUser varchar(50),
	@Integral int,
	@GetPresent int,
	@Presentmoney money,
	@IntegralTure int,
	@PromoProlist varchar(255),
	@Addtime datetime,
	@TureUser varchar(50)
as
	update ZL_Promotions set 
		Promoname=@Promoname,
		Promostart=@Promostart,
		Promoend=@Promoend,
		Pricetop=@Pricetop,
		Priceend=@Priceend,
		AddUser=@AddUser,
		Integral=@Integral,
		GetPresent=@GetPresent,
		Presentmoney=@Presentmoney,
		IntegralTure=@IntegralTure,
		PromoProlist=@PromoProlist,
		Addtime=@Addtime,
		TureUser=@TureUser
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_Select_All]
AS


SELECT
	[Pubid],
	[PubName],
	[PubClass],
	[PubTableName],
	[PubType],
	[PubOneOrMore],
	[PubIPOneOrMore],
	[PubTemplate],
	[PubLoadstr],
	[PubModelID],
	[PubNodeID],
	[PubTemplateID],
	[Pubinfo],
	[PubIsTrue],
	[PubCode],
	[PubLogin],
	[PubAddnum],
	[PubBindPub],
	[PubShowType],
	[PubInputTM],
	[PubInputLoadStr],
	[PubCreateTime],
	[PubLoginUrl],
	[PubOpenComment],
	[PubEndTime],
	[PubIsDel],
	[Pubkeep],
	[Puberrmsg],
	[PubGourl],
	[PubSiteID],
	[Public]
FROM
	[dbo].[ZL_Pub]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_GetDelete]
	@Pubid int
AS

DELETE FROM [dbo].[ZL_Pub]
WHERE
	[Pubid] = @Pubid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_GetInsert]
	@PubName nvarchar(255),
	@PubClass int,
	@PubTableName nvarchar(255),
	@PubType int,
	@PubOneOrMore int,
	@PubIPOneOrMore int,
	@PubTemplate nvarchar(1000),
	@PubLoadstr nvarchar(1000),
	@PubModelID int,
	@PubNodeID nvarchar(1000),
	@PubTemplateID nvarchar(1000),
	@Pubinfo ntext,
	@PubIsTrue int,
	@PubCode int,
	@PubLogin int,
	@PubAddnum int,
	@PubBindPub int,
	@PubShowType int,
	@PubInputTM nvarchar(1000),
	@PubInputLoadStr nvarchar(255),
	@PubCreateTime datetime,
	@PubLoginUrl nvarchar(255),
	@PubOpenComment int,
	@PubEndTime datetime,
	@PubIsDel int,
	@PubTimeSlot int,
	@Pubkeep int,
	@Puberrmsg nvarchar(1000),
	@PubGourl nvarchar(1000),
	@PubSiteID int,
	@Public int,
	@Pubid int OUTPUT
AS

INSERT INTO [dbo].[ZL_Pub] (
	[PubName],
	[PubClass],
	[PubTableName],
	[PubType],
	[PubOneOrMore],
	[PubIPOneOrMore],
	[PubTemplate],
	[PubLoadstr],
	[PubModelID],
	[PubNodeID],
	[PubTemplateID],
	[Pubinfo],
	[PubIsTrue],
	[PubCode],
	[PubLogin],
	[PubAddnum],
	[PubBindPub],
	[PubShowType],
	[PubInputTM],
	[PubInputLoadStr],
	[PubCreateTime],
	[PubLoginUrl],
	[PubOpenComment],
	[PubEndTime],
	[PubIsDel],
	[PubTimeSlot],
	[Pubkeep],
	[Puberrmsg],
	[PubGourl],
	[PubSiteID],
	[Public]
) VALUES (
	@PubName,
	@PubClass,
	@PubTableName,
	@PubType,
	@PubOneOrMore,
	@PubIPOneOrMore,
	@PubTemplate,
	@PubLoadstr,
	@PubModelID,
	@PubNodeID,
	@PubTemplateID,
	@Pubinfo,
	@PubIsTrue,
	@PubCode,
	@PubLogin,
	@PubAddnum,
	@PubBindPub,
	@PubShowType,
	@PubInputTM,
	@PubInputLoadStr,
	@PubCreateTime,
	@PubLoginUrl,
	@PubOpenComment,
	@PubEndTime,
	@PubIsDel,
	@PubTimeSlot,
	@Pubkeep,
	@Puberrmsg,
	@PubGourl,
	@PubSiteID,
	@Public
)

SET @Pubid = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_GetSelect]
	@Pubid int
AS

SELECT
	[Pubid],
	[PubName],
	[PubClass],
	[PubTableName],
	[PubType],
	[PubOneOrMore],
	[PubIPOneOrMore],
	[PubTemplate],
	[PubLoadstr],
	[PubModelID],
	[PubNodeID],
	[PubTemplateID],
	[Pubinfo],
	[PubIsTrue],
	[PubCode],
	[PubLogin],
	[PubAddnum],
	[PubBindPub],
	[PubShowType],
	[PubInputTM],
	[PubInputLoadStr],
	[PubCreateTime],
	[PubLoginUrl],
	[PubOpenComment],
	[PubEndTime],
	[PubIsDel],
	[PubTimeSlot],
	[Pubkeep],
	[Puberrmsg],
	[PubGourl],
	[PubSiteID],
	[Public]
FROM
	[dbo].[ZL_Pub]
WHERE
	[Pubid] = @Pubid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_GetUpdate]
	@Pubid int,
	@PubName nvarchar(255),
	@PubClass int,
	@PubTableName nvarchar(255),
	@PubType int,
	@PubOneOrMore int,
	@PubIPOneOrMore int,
	@PubTemplate nvarchar(1000),
	@PubLoadstr nvarchar(1000),
	@PubModelID int,
	@PubNodeID nvarchar(1000),
	@PubTemplateID nvarchar(1000),
	@Pubinfo ntext,
	@PubIsTrue int,
	@PubCode int,
	@PubLogin int,
	@PubAddnum int,
	@PubBindPub int,
	@PubShowType int,
	@PubInputTM nvarchar(1000),
	@PubInputLoadStr nvarchar(255),
	@PubCreateTime datetime,
	@PubLoginUrl nvarchar(255),
	@PubOpenComment int,
	@PubEndTime datetime,
	@PubIsDel int,
	@PubTimeSlot int,
	@Pubkeep int,
	@Puberrmsg nvarchar(1000),
	@PubGourl nvarchar(1000),
	@PubSiteID int,
	@Public int
AS

UPDATE [dbo].[ZL_Pub] SET
	[PubName] = @PubName,
	[PubClass] = @PubClass,
	[PubTableName] = @PubTableName,
	[PubType] = @PubType,
	[PubOneOrMore] = @PubOneOrMore,
	[PubIPOneOrMore] = @PubIPOneOrMore,
	[PubTemplate] = @PubTemplate,
	[PubLoadstr] = @PubLoadstr,
	[PubModelID] = @PubModelID,
	[PubNodeID] = @PubNodeID,
	[PubTemplateID] = @PubTemplateID,
	[Pubinfo] = @Pubinfo,
	[PubIsTrue] = @PubIsTrue,
	[PubCode] = @PubCode,
	[PubLogin] = @PubLogin,
	[PubAddnum] = @PubAddnum,
	[PubBindPub] = @PubBindPub,
	[PubShowType] = @PubShowType,
	[PubInputTM] = @PubInputTM,
	[PubInputLoadStr] = @PubInputLoadStr,
	[PubCreateTime] = @PubCreateTime,
	[PubLoginUrl] = @PubLoginUrl,
	[PubOpenComment] = @PubOpenComment,
	[PubEndTime] = @PubEndTime,
	[PubIsDel] = @PubIsDel,
	[PubTimeSlot]=@PubTimeSlot,
	[Pubkeep]=@Pubkeep,
	[Puberrmsg]=@Puberrmsg,
	[PubGourl]=@PubGourl,
	[PubSiteID]=@PubSiteID,
	[Public]=@Public
WHERE
	[Pubid] = @Pubid



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Pub_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Pub_InsertUpdate]
	@Pubid int,
	@PubName nvarchar(255),
	@PubClass int,
	@PubTableName nvarchar(255),
	@PubType int,
	@PubOneOrMore int,
	@PubIPOneOrMore int,
	@PubTemplate nvarchar(1000),
	@PubLoadstr nvarchar(1000),
	@PubModelID int,
	@PubNodeID nvarchar(1000),
	@PubTemplateID nvarchar(1000),
	@Pubinfo ntext,
	@PubIsTrue int,
	@PubCode int,
	@PubLogin int,
	@PubAddnum int,
	@PubBindPub int,
	@PubShowType int,
	@PubInputTM nvarchar(1000),
	@PubInputLoadStr nvarchar(255),
	@PubCreateTime datetime,
	@PubLoginUrl nvarchar(255),
	@PubOpenComment int,
	@PubEndTime datetime,
	@PubIsDel int,
	@PubTimeSlot int,
	@Pubkeep int,
	@Puberrmsg nvarchar(1000),
	@PubGourl nvarchar(1000),
	@PubSiteID int,
	@Public int
AS

IF EXISTS(SELECT [Pubid] FROM [dbo].[ZL_Pub] WHERE [Pubid] = @Pubid)
BEGIN
	UPDATE [dbo].[ZL_Pub] SET
		[PubName] = @PubName,
		[PubClass] = @PubClass,
		[PubTableName] = @PubTableName,
		[PubType] = @PubType,
		[PubOneOrMore] = @PubOneOrMore,
		[PubIPOneOrMore] = @PubIPOneOrMore,
		[PubTemplate] = @PubTemplate,
		[PubLoadstr] = @PubLoadstr,
		[PubModelID] = @PubModelID,
		[PubNodeID] = @PubNodeID,
		[PubTemplateID] = @PubTemplateID,
		[Pubinfo] = @Pubinfo,
		[PubIsTrue] = @PubIsTrue,
		[PubCode] = @PubCode,
		[PubLogin] = @PubLogin,
		[PubAddnum] = @PubAddnum,
		[PubBindPub] = @PubBindPub,
		[PubShowType] = @PubShowType,
		[PubInputTM] = @PubInputTM,
		[PubInputLoadStr] = @PubInputLoadStr,
		[PubCreateTime] = @PubCreateTime,
		[PubLoginUrl] = @PubLoginUrl,
		[PubOpenComment] = @PubOpenComment,
		[PubEndTime] = @PubEndTime,
		[PubIsDel] = @PubIsDel,
		[PubTimeSlot]=@PubTimeSlot,
		[Pubkeep]=@Pubkeep,
		[Puberrmsg]=@Puberrmsg,
		[PubGourl]=@PubGourl,
		[PubSiteID]=@PubSiteID,
		[Public]=@Public
	WHERE
		[Pubid] = @Pubid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Pub] (	
	[PubName],
	[PubClass],
	[PubTableName],
	[PubType],
	[PubOneOrMore],
	[PubIPOneOrMore],
	[PubTemplate],
	[PubLoadstr],
	[PubModelID],
	[PubNodeID],
	[PubTemplateID],
	[Pubinfo],
	[PubIsTrue],
	[PubCode],
	[PubLogin],
	[PubAddnum],
	[PubBindPub],
	[PubShowType],
	[PubInputTM],
	[PubInputLoadStr],
	[PubCreateTime],
	[PubLoginUrl],
	[PubOpenComment],
	[PubEndTime],
	[PubIsDel],
	[PubTimeSlot],
	[Pubkeep],
	[Puberrmsg],
	[PubGourl],
	[PubSiteID],
	[Public]
	) VALUES (
	@PubName,
	@PubClass,
	@PubTableName,
	@PubType,
	@PubOneOrMore,
	@PubIPOneOrMore,
	@PubTemplate,
	@PubLoadstr,
	@PubModelID,
	@PubNodeID,
	@PubTemplateID,
	@Pubinfo,
	@PubIsTrue,
	@PubCode,
	@PubLogin,
	@PubAddnum,
	@PubBindPub,
	@PubShowType,
	@PubInputTM,
	@PubInputLoadStr,
	@PubCreateTime,
	@PubLoginUrl,
	@PubOpenComment,
	@PubEndTime,
	@PubIsDel,
	@PubTimeSlot,
	@Pubkeep,
	@Puberrmsg,
	@PubGourl,
	@PubSiteID,
	@Public
	)

END



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Question_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Question_Add]
(
@QID int,
@SurveyID int,
@TypeID int,
@QTitle nvarchar(255),
@QContent Text,
@OrderID int

)
AS
BEGIN
        insert into ZL_QUESTION (SurveyID,TypeID,QTitle,QContent,OrderID)values(
         @SurveyID,
         @TypeID,
         @QTitle,
         @QContent,
         @OrderID
        ) 

END


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Question_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Question_Del]
(
@QID int
)
AS
   delete from ZL_Answer where QID=@QID
   delete from ZL_Question where QID=@QID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_Select_Paged]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_Select_Paged]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Result],
	[ResultTime],
	[ProblemID],
	[UserID]
FROM
	[dbo].[ZL_Result]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_InsertUpdate]
	@ID int,
	@Result varchar(2000),
	@ResultTime datetime,
	@ProblemID int,
	@UserID int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_Result] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_Result] SET
		[Result] = @Result,
		[ResultTime] = @ResultTime,
		[ProblemID] = @ProblemID,
		[UserID] = @UserID
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Result] (	
	[Result],
	[ResultTime],
	[ProblemID],
	[UserID]
	) VALUES (
	@Result,
	@ResultTime,
	@ProblemID,
	@UserID
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Result],
	[ResultTime],
	[ProblemID],
	[UserID]
FROM
	[dbo].[ZL_Result]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[Result],
	[ResultTime],
	[ProblemID],
	[UserID]
FROM
	[dbo].[ZL_Result]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_GetUpdate]
	@ID int,
	@Result varchar(2000),
	@ResultTime datetime,
	@ProblemID int,
	@UserID int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_Result] SET
	[Result] = @Result,
	[ResultTime] = @ResultTime,
	[ProblemID] = @ProblemID,
	[UserID] = @UserID
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_Result]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Result_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Result_GetInsert]
	@Result varchar(2000),
	@ResultTime datetime,
	@ProblemID int,
	@UserID int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_Result] (
	[Result],
	[ResultTime],
	[ProblemID],
	[UserID]
) VALUES (
	@Result,
	@ResultTime,
	@ProblemID,
	@UserID
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_GetDelete]
	@AID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_RoomActive]
WHERE
	[AID] = @AID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_GetInsert]
	@ActiveUserID int,
	@ActiveTitle nvarchar(225),
	@ActiveContext nvarchar(4000),
	@ActiveStateTime datetime,
	@ActiveEndTime datetime,
	@ActiveAddTime datetime,
	@ActivePic nvarchar(200),
	@RoomID int,
	@AID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_RoomActive] (
	[ActiveUserID],
	[ActiveTitle],
	[ActiveContext],
	[ActiveStateTime],
	[ActiveEndTime],
	[ActiveAddTime],
	[ActivePic],
	[RoomID]
) VALUES (
	@ActiveUserID,
	@ActiveTitle,
	@ActiveContext,
	@ActiveStateTime,
	@ActiveEndTime,
	@ActiveAddTime,
	@ActivePic,
	@RoomID
)

SET @AID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_GetUpdate]
	@AID int,
	@ActiveUserID int,
	@ActiveTitle nvarchar(225),
	@ActiveContext nvarchar(4000),
	@ActiveStateTime datetime,
	@ActiveEndTime datetime,
	@ActiveAddTime datetime,
	@ActivePic nvarchar(200),
	@RoomID int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_RoomActive] SET
	[ActiveUserID] = @ActiveUserID,
	[ActiveTitle] = @ActiveTitle,
	[ActiveContext] = @ActiveContext,
	[ActiveStateTime] = @ActiveStateTime,
	[ActiveEndTime] = @ActiveEndTime,
	[ActiveAddTime] = @ActiveAddTime,
	[ActivePic] = @ActivePic,
	[RoomID] = @RoomID
WHERE
	[AID] = @AID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_GetSelect]
	@AID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[AID],
	[ActiveUserID],
	[ActiveTitle],
	[ActiveContext],
	[ActiveStateTime],
	[ActiveEndTime],
	[ActiveAddTime],
	[ActivePic],
	[RoomID]
FROM
	[dbo].[ZL_RoomActive]
WHERE
	[AID] = @AID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_InsertUpdate]
	@AID int,
	@ActiveUserID int,
	@ActiveTitle nvarchar(225),
	@ActiveContext nvarchar(4000),
	@ActiveStateTime datetime,
	@ActiveEndTime datetime,
	@ActiveAddTime datetime,
	@ActivePic nvarchar(200),
	@RoomID int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [AID] FROM [dbo].[ZL_RoomActive] WHERE [AID] = @AID)
BEGIN
	UPDATE [dbo].[ZL_RoomActive] SET
		[ActiveUserID] = @ActiveUserID,
		[ActiveTitle] = @ActiveTitle,
		[ActiveContext] = @ActiveContext,
		[ActiveStateTime] = @ActiveStateTime,
		[ActiveEndTime] = @ActiveEndTime,
		[ActiveAddTime] = @ActiveAddTime,
		[ActivePic] = @ActivePic,
		[RoomID] = @RoomID
	WHERE
		[AID] = @AID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_RoomActive] (	
	[ActiveUserID],
	[ActiveTitle],
	[ActiveContext],
	[ActiveStateTime],
	[ActiveEndTime],
	[ActiveAddTime],
	[ActivePic],
	[RoomID]
	) VALUES (
	@ActiveUserID,
	@ActiveTitle,
	@ActiveContext,
	@ActiveStateTime,
	@ActiveEndTime,
	@ActiveAddTime,
	@ActivePic,
	@RoomID
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActive_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActive_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[AID],
	[ActiveUserID],
	[ActiveTitle],
	[ActiveContext],
	[ActiveStateTime],
	[ActiveEndTime],
	[ActiveAddTime],
	[ActivePic],
	[RoomID]
FROM
	[dbo].[ZL_RoomActive]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_InsertUpdate]
	@ID int,
	@ActiveID int,
	@UserID int,
	@UserName nvarchar(255),
	@AddTime datetime
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_RoomActiveJoin] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_RoomActiveJoin] SET
		[ActiveID] = @ActiveID,
		[UserID] = @UserID,
		[UserName] = @UserName,
		[AddTime] = @AddTime
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_RoomActiveJoin] (	
	[ActiveID],
	[UserID],
	[UserName],
	[AddTime]
	) VALUES (
	@ActiveID,
	@UserID,
	@UserName,
	@AddTime
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[ActiveID],
	[UserID],
	[UserName],
	[AddTime]
FROM
	[dbo].[ZL_RoomActiveJoin]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[ActiveID],
	[UserID],
	[UserName],
	[AddTime]
FROM
	[dbo].[ZL_RoomActiveJoin]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_GetUpdate]
	@ID int,
	@ActiveID int,
	@UserID int,
	@UserName nvarchar(255),
	@AddTime datetime
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_RoomActiveJoin] SET
	[ActiveID] = @ActiveID,
	[UserID] = @UserID,
	[UserName] = @UserName,
	[AddTime] = @AddTime
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_GetInsert]
	@ActiveID int,
	@UserID int,
	@UserName nvarchar(255),
	@AddTime datetime,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_RoomActiveJoin] (
	[ActiveID],
	[UserID],
	[UserName],
	[AddTime]
) VALUES (
	@ActiveID,
	@UserID,
	@UserName,
	@AddTime
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomActiveJoin_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomActiveJoin_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_RoomActiveJoin]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_RoomNotify]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[NotifyTitle],
	[NotifyContext],
	[AddTime],
	[RoomID],
	[UserID]
FROM
	[dbo].[ZL_RoomNotify]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_GetInsert]
	@NotifyTitle nvarchar(200),
	@NotifyContext nvarchar(1000),
	@AddTime datetime,
	@RoomID int,
	@UserID int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_RoomNotify] (
	[NotifyTitle],
	[NotifyContext],
	[AddTime],
	[RoomID],
	[UserID]
) VALUES (
	@NotifyTitle,
	@NotifyContext,
	@AddTime,
	@RoomID,
	@UserID
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[NotifyTitle],
	[NotifyContext],
	[AddTime],
	[RoomID],
	[UserID]
FROM
	[dbo].[ZL_RoomNotify]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_GetUpdate]
	@ID int,
	@NotifyTitle nvarchar(200),
	@NotifyContext nvarchar(1000),
	@AddTime datetime,
	@RoomID int,
	@UserID int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_RoomNotify] SET
	[NotifyTitle] = @NotifyTitle,
	[NotifyContext] = @NotifyContext,
	[AddTime] = @AddTime,
	[RoomID] = @RoomID,
	[UserID] = @UserID
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomNotify_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomNotify_InsertUpdate]
	@ID int,
	@NotifyTitle nvarchar(200),
	@NotifyContext nvarchar(1000),
	@AddTime datetime,
	@RoomID int,
	@UserID int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_RoomNotify] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_RoomNotify] SET
		[NotifyTitle] = @NotifyTitle,
		[NotifyContext] = @NotifyContext,
		[AddTime] = @AddTime,
		[RoomID] = @RoomID,
		[UserID] = @UserID
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_RoomNotify] (	
	[NotifyTitle],
	[NotifyContext],
	[AddTime],
	[RoomID],
	[UserID]
	) VALUES (
	@NotifyTitle,
	@NotifyContext,
	@AddTime,
	@RoomID,
	@UserID
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_GetUpdate]
	@ID int,
	@FileName nvarchar(100),
	@UpFileUrl nvarchar(300),
	@Course nvarchar(10),
	@UserType int,
	@FileType int,
	@UserID int,
	@RoomID int,
	@UpDateTime datetime,
	@FileState int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_RoomUpFile] SET
	[FileName] = @FileName,
	[UpFileUrl] = @UpFileUrl,
	[Course] = @Course,
	[UserType] = @UserType,
	[FileType] = @FileType,
	[UserID] = @UserID,
	[RoomID] = @RoomID,
	[UpDateTime] = @UpDateTime,
	[FileState] = @FileState
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_GetInsert]
	@FileName nvarchar(100),
	@UpFileUrl nvarchar(300),
	@Course nvarchar(10),
	@UserType int,
	@FileType int,
	@UserID int,
	@RoomID int,
	@UpDateTime datetime,
	@FileState int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_RoomUpFile] (
	[FileName],
	[UpFileUrl],
	[Course],
	[UserType],
	[FileType],
	[UserID],
	[RoomID],
	[UpDateTime],
	[FileState]
) VALUES (
	@FileName,
	@UpFileUrl,
	@Course,
	@UserType,
	@FileType,
	@UserID,
	@RoomID,
	@UpDateTime,
	@FileState
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[FileName],
	[UpFileUrl],
	[Course],
	[UserType],
	[FileType],
	[UserID],
	[RoomID],
	[UpDateTime],
	[FileState]
FROM
	[dbo].[ZL_RoomUpFile]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_RoomUpFile]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[FileName],
	[UpFileUrl],
	[Course],
	[UserType],
	[FileType],
	[UserID],
	[RoomID],
	[UpDateTime],
	[FileState]
FROM
	[dbo].[ZL_RoomUpFile]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_RoomUpFile_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_RoomUpFile_InsertUpdate]
	@ID int,
	@FileName nvarchar(100),
	@UpFileUrl nvarchar(300),
	@Course nvarchar(10),
	@UserType int,
	@FileType int,
	@UserID int,
	@RoomID int,
	@UpDateTime datetime,
	@FileState int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_RoomUpFile] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_RoomUpFile] SET
		[FileName] = @FileName,
		[UpFileUrl] = @UpFileUrl,
		[Course] = @Course,
		[UserType] = @UserType,
		[FileType] = @FileType,
		[UserID] = @UserID,
		[RoomID] = @RoomID,
		[UpDateTime] = @UpDateTime,
		[FileState] = @FileState
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_RoomUpFile] (	
	[FileName],
	[UpFileUrl],
	[Course],
	[UserType],
	[FileType],
	[UserID],
	[RoomID],
	[UpDateTime],
	[FileState]
	) VALUES (
	@FileName,
	@UpFileUrl,
	@Course,
	@UserType,
	@FileType,
	@UserID,
	@RoomID,
	@UpDateTime,
	@FileState
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_Scheme]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_GetInsert]
	@SName nvarchar(255),
	@SStartTime datetime,
	@SEndTime datetime,
	@SList nvarchar(50),
	@SAddTime datetime,
	@SType int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_Scheme] (
	[SName],
	[SStartTime],
	[SEndTime],
	[SList],
	[SAddTime],
	[SType]
) VALUES (
	@SName,
	@SStartTime,
	@SEndTime,
	@SList,
	@SAddTime,
	@SType
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_InsertUpdate]
	@ID int,
	@SName nvarchar(255),
	@SStartTime datetime,
	@SEndTime datetime,
	@SList nvarchar(50),
	@SAddTime datetime,
	@SType int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_Scheme] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_Scheme] SET
		[SName] = @SName,
		[SStartTime] = @SStartTime,
		[SEndTime] = @SEndTime,
		[SList] = @SList,
		[SAddTime] = @SAddTime,
		[SType] = @SType
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Scheme] (	
	[SName],
	[SStartTime],
	[SEndTime],
	[SList],
	[SAddTime],
	[SType]
	) VALUES (
	@SName,
	@SStartTime,
	@SEndTime,
	@SList,
	@SAddTime,
	@SType
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_GetUpdate]
	@ID int,
	@SName nvarchar(255),
	@SStartTime datetime,
	@SEndTime datetime,
	@SList nvarchar(50),
	@SAddTime datetime,
	@SType int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_Scheme] SET
	[SName] = @SName,
	[SStartTime] = @SStartTime,
	[SEndTime] = @SEndTime,
	[SList] = @SList,
	[SAddTime] = @SAddTime,
	[SType] = @SType
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SName],
	[SStartTime],
	[SEndTime],
	[SList],
	[SAddTime],
	[SType]
FROM
	[dbo].[ZL_Scheme]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Scheme_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_Scheme_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SName],
	[SStartTime],
	[SEndTime],
	[SList],
	[SAddTime],
	[SType]
FROM
	[dbo].[ZL_Scheme]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SIULimit],
	[SILLimit],
	[SIAgio],
	[SID],
	[SIAddTime]
FROM
	[dbo].[ZL_SchemeInfo]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_SchemeInfo]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SIULimit],
	[SILLimit],
	[SIAgio],
	[SID],
	[SIAddTime]
FROM
	[dbo].[ZL_SchemeInfo]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_GetInsert]
	@SIULimit int,
	@SILLimit int,
	@SIAgio int,
	@SID int,
	@SIAddTime datetime,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_SchemeInfo] (
	[SIULimit],
	[SILLimit],
	[SIAgio],
	[SID],
	[SIAddTime]
) VALUES (
	@SIULimit,
	@SILLimit,
	@SIAgio,
	@SID,
	@SIAddTime
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_InsertUpdate]
	@ID int,
	@SIULimit int,
	@SILLimit int,
	@SIAgio int,
	@SID int,
	@SIAddTime datetime
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_SchemeInfo] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_SchemeInfo] SET
		[SIULimit] = @SIULimit,
		[SILLimit] = @SILLimit,
		[SIAgio] = @SIAgio,
		[SID] = @SID,
		[SIAddTime] = @SIAddTime
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SchemeInfo] (	
	[SIULimit],
	[SILLimit],
	[SIAgio],
	[SID],
	[SIAddTime]
	) VALUES (
	@SIULimit,
	@SILLimit,
	@SIAgio,
	@SID,
	@SIAddTime
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_SchemeInfo_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_SchemeInfo_GetUpdate]
	@ID int,
	@SIULimit int,
	@SILLimit int,
	@SIAgio int,
	@SID int,
	@SIAddTime datetime
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_SchemeInfo] SET
	[SIULimit] = @SIULimit,
	[SILLimit] = @SILLimit,
	[SIAgio] = @SIAgio,
	[SID] = @SID,
	[SIAddTime] = @SIAddTime
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SchoolName],
	[Country],
	[Province],
	[SchoolType],
	[Visage],
	[Addtime],
	[SchoolInfo]
FROM
	[dbo].[ZL_School]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_Select_Paged]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_Select_Paged]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SchoolName],
	[Country],
	[Province],
	[SchoolType],
	[Visage],
	[Addtime],
	[SchoolInfo]
FROM
	[dbo].[ZL_School]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_InsertUpdate]
	@ID int,
	@SchoolName nvarchar(255),
	@Country nvarchar(255),
	@Province nvarchar(255),
	@SchoolType int,
	@Visage int,
	@Addtime datetime,
	@SchoolInfo ntext
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_School] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_School] SET
		[SchoolName] = @SchoolName,
		[Country] = @Country,
		[Province] = @Province,
		[SchoolType] = @SchoolType,
		[Visage] = @Visage,
		[Addtime] = @Addtime,
		[SchoolInfo] = @SchoolInfo
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_School] (	
	[SchoolName],
	[Country],
	[Province],
	[SchoolType],
	[Visage],
	[Addtime],
	[SchoolInfo]
	) VALUES (
	@SchoolName,
	@Country,
	@Province,
	@SchoolType,
	@Visage,
	@Addtime,
	@SchoolInfo
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[SchoolName],
	[Country],
	[Province],
	[SchoolType],
	[Visage],
	[Addtime],
	[SchoolInfo]
FROM
	[dbo].[ZL_School]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_GetUpdate]
	@ID int,
	@SchoolName nvarchar(255),
	@Country nvarchar(255),
	@Province nvarchar(255),
	@SchoolType int,
	@Visage int,
	@Addtime datetime,
	@SchoolInfo ntext
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_School] SET
	[SchoolName] = @SchoolName,
	[Country] = @Country,
	[Province] = @Province,
	[SchoolType] = @SchoolType,
	[Visage] = @Visage,
	[Addtime] = @Addtime,
	[SchoolInfo] = @SchoolInfo
WHERE
	[ID] = @ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_School]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_School_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_School_GetInsert]
	@SchoolName nvarchar(255),
	@Country nvarchar(255),
	@Province nvarchar(255),
	@SchoolType int,
	@Visage int,
	@Addtime datetime,
	@SchoolInfo ntext,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_School] (
	[SchoolName],
	[Country],
	[Province],
	[SchoolType],
	[Visage],
	[Addtime],
	[SchoolInfo]
) VALUES (
	@SchoolName,
	@Country,
	@Province,
	@SchoolType,
	@Visage,
	@Addtime,
	@SchoolInfo
)

SET @ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_GetDelete]
	@S_ID int
AS

DELETE FROM [dbo].[ZL_ServiceSeat]
WHERE
	[S_ID] = @S_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_GetInsert]
	@S_Name nvarchar(50),
	@S_AdminID int,
	@S_DateTime nvarchar(50),
	@S_Index int,
	@S_Remrk nvarchar(500),
	@S_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_ServiceSeat] (
	[S_Name],
	[S_AdminID],
	[S_DateTime],
	[S_Index],
	[S_Remrk]
) VALUES (
	@S_Name,
	@S_AdminID,
	@S_DateTime,
	@S_Index,
	@S_Remrk
)

SET @S_ID = SCOPE_IDENTITY()


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_InsertUpdate]
	@S_ID int,
	@S_Name nvarchar(50),
	@S_AdminID int,
	@S_DateTime nvarchar(50),
	@S_Index int,
	@S_Remrk nvarchar(500)
AS

IF EXISTS(SELECT [S_ID] FROM [dbo].[ZL_ServiceSeat] WHERE [S_ID] = @S_ID)
BEGIN
	UPDATE [dbo].[ZL_ServiceSeat] SET
		[S_Name] = @S_Name,
		[S_AdminID] = @S_AdminID,
		[S_DateTime] = @S_DateTime,
		[S_Index] = @S_Index,
		[S_Remrk] = @S_Remrk
	WHERE
		[S_ID] = @S_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_ServiceSeat] (	
	[S_Name],
	[S_AdminID],
	[S_DateTime],
	[S_Index],
	[S_Remrk]
	) VALUES (
	@S_Name,
	@S_AdminID,
	@S_DateTime,
	@S_Index,
	@S_Remrk
	)

END


' 
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_InsertUpdateByAid]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
create PROCEDURE [dbo].[PR_ServiceSeat_InsertUpdateByAid]
	@S_ID int,
	@S_Name nvarchar(50),
	@S_AdminID int,
	@S_DateTime nvarchar(50),
	@S_Index int,
	@S_Remrk nvarchar(500)
AS

IF EXISTS(SELECT [S_ID] FROM [dbo].[ZL_ServiceSeat] WHERE [S_AdminID] = @S_AdminID)
BEGIN
	UPDATE [dbo].[ZL_ServiceSeat] SET
		[S_Name] = @S_Name,
		[S_AdminID] = @S_AdminID,
		[S_DateTime] = @S_DateTime,
		[S_Index] = @S_Index,
		[S_Remrk] = @S_Remrk
	WHERE
		[S_ID] = @S_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_ServiceSeat] (	
	[S_Name],
	[S_AdminID],
	[S_DateTime],
	[S_Index],
	[S_Remrk]
	) VALUES (
	@S_Name,
	@S_AdminID,
	@S_DateTime,
	@S_Index,
	@S_Remrk
	)

END

' 
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_Select_All]
AS


SELECT
	[S_ID],
	[S_Name],
	[S_AdminID],
	[S_DateTime],
	[S_Index],
	[S_Remrk]
FROM
	[dbo].[ZL_ServiceSeat]


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_GetSelect]
	@S_ID int
AS

SELECT
	[S_ID],
	[S_Name],
	[S_AdminID],
	[S_DateTime],
	[S_Index],
	[S_Remrk]
FROM
	[dbo].[ZL_ServiceSeat]
WHERE
	[S_ID] = @S_ID


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ServiceSeat_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE PROCEDURE [dbo].[PR_ServiceSeat_GetUpdate]
	@S_ID int,
	@S_Name nvarchar(50),
	@S_AdminID int,
	@S_DateTime nvarchar(50),
	@S_Index int,
	@S_Remrk nvarchar(500)
AS

UPDATE [dbo].[ZL_ServiceSeat] SET
	[S_Name] = @S_Name,
	[S_AdminID] = @S_AdminID,
	[S_DateTime] = @S_DateTime,
	[S_Index] = @S_Index,
	[S_Remrk] = @S_Remrk
WHERE
	[S_ID] = @S_ID


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopBrand_all]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopBrand_all]
as
	select * from ZL_ShopBrand


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopBrand_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopBrand_Update]
	@id int,
	@BrandName nvarchar(255),
	@Nodeid nvarchar(255),
	@Orders int,
	@IsTrue bit
as
	update ZL_ShopBrand set 
		BrandName=@BrandName,
		Nodeid=@Nodeid,
		Orders=@Orders,
		IsTrue=@IsTrue
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopBrand_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopBrand_GetById]
	@id int
as
	select * from ZL_ShopBrand where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopBrand_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopBrand_Del]
	@id int
as
	delete from ZL_ShopBrand  
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopBrand_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopBrand_Add]
	@id int,
	@BrandName nvarchar(255),
	@Nodeid nvarchar(255),
	@Orders int,
	@IsTrue bit
as
	insert into ZL_ShopBrand(BrandName,Nodeid,Orders,IsTrue)
	values (@BrandName,@Nodeid,@Orders,@IsTrue)
	



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_all]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopCommentary_all]

as
	select * from ZL_ShopCommentary


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopCommentary_Add]
	@id int,
	@ComType int,
	@Comtitle nvarchar(255),
	@ComContent ntext,
	@ComUser nvarchar(100),
	@Proid int,
	@ProName nvarchar(255),
	@Istopic bit,
	@Putip nvarchar(255),
	@Addtime datetime,
	@COrderid int,
	@CUserid int,
	@Storeid int,
	@Istrue bit,
	@Comid int,
	@ComOption int
as
	insert into ZL_ShopCommentary(ComType,Comtitle,ComContent,ComUser,Proid,ProName,Istopic,Putip,Addtime,COrderid,CUserid,Storeid,Istrue,Comid,ComOption)
	values (@ComType,@Comtitle,@ComContent,@ComUser,@Proid,@ProName,@Istopic,@Putip,@Addtime,@COrderid,@CUserid,@Storeid,@Istrue,@Comid,@ComOption)

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_Bytype]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE proc [dbo].[PR_ShopCommentary_Bytype]
@type int,
@Comid int
as
if @type=0
 select * from ZL_ShopCommentary where ComType=0 and Istopic=1 and istrue=1 order by Addtime desc,id desc
if @type=1
 select * from ZL_ShopCommentary where ComType=1 and Istopic=1 and istrue=1 order by Addtime desc,id desc
if @type=2
 select * from ZL_ShopCommentary where ComType=2 and Istopic=1 and istrue=1 order by Addtime desc,id desc
if @type=3
 select * from ZL_ShopCommentary where ComType=0 and Istopic=1 order by Addtime desc,id desc
if @type=4
 select * from ZL_ShopCommentary where ComType=1 and Istopic=1 order by Addtime desc,id desc
if @type=5
 select * from ZL_ShopCommentary where ComType=2 and Istopic=1 order by Addtime desc,id desc
if @type=6
 select * from ZL_ShopCommentary where ComType=0 and Istopic=0 and Comid=@Comid and istrue=1 order by Addtime desc,id desc
if @type=7
 select * from ZL_ShopCommentary where ComType=1 and Istopic=0 and Comid=@Comid and istrue=1 order by Addtime desc,id desc
if @type=8
 select * from ZL_ShopCommentary where ComType=2 and Istopic=0 and Comid=@Comid and istrue=1 order by Addtime desc,id desc
if @type=9
 select * from ZL_ShopCommentary where ComType=0 and Istopic=0 and Comid=@Comid order by Addtime desc,id desc
if @type=10
 select * from ZL_ShopCommentary where ComType=1 and Istopic=0 and Comid=@Comid order by Addtime desc,id desc
if @type=11
 select * from ZL_ShopCommentary where ComType=2 and Istopic=0 and Comid=@Comid order by Addtime desc,id desc


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_BytypeAndID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



create proc [dbo].[PR_ShopCommentary_BytypeAndID]
@type int,
@Byid int
as
if @type=0
 select * from ZL_ShopCommentary where ComType=0 AND Proid=@Byid order by Addtime desc,id desc
if @type=1
 select * from ZL_ShopCommentary where ComType=1 and CUserid=@Byid order by Addtime desc,id desc
if @type=2
 select * from ZL_ShopCommentary where ComType=2 and COrderid=@Byid order by Addtime desc,id desc


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopCommentary_Del]
	@id int
as
	delete from ZL_ShopCommentary  
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopCommentary_GetById]
	@id int
as
	select * from ZL_ShopCommentary where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCommentary_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopCommentary_Update]
	@id int,
	@ComType int,
	@Comtitle nvarchar(255),
	@ComContent ntext,
	@ComUser nvarchar(100),
	@Proid int,
	@ProName nvarchar(255),
	@Istopic bit,
	@Putip nvarchar(255),
	@Addtime datetime,
	@COrderid int,
	@CUserid int,
	@Storeid int,
	@Istrue bit,
	@Comid int
as
	update ZL_ShopCommentary set 
		ComType=@ComType,
		Comtitle=@Comtitle,
		ComContent=@ComContent,
		ComUser=@ComUser,
		Proid=@Proid,
		ProName=@ProName,
		Istopic=@Istopic,
		Putip=@Putip,
		Addtime=@Addtime,
		COrderid=@COrderid,
		CUserid=@CUserid,
		Storeid=@Storeid,
		Istrue=@Istrue,
		Comid=@Comid
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_GetDelete]
	@ID int
AS

DELETE FROM [dbo].[ZL_ShopCompete]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[ProID],
	[PMoney],
	[AddTime],
	[UserID],
	[ShopType],
	[ShopNum]
FROM
	[dbo].[ZL_ShopCompete]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_GetUpdate]
	@ID int,
	@ProID int,
	@PMoney money,
	@AddTime datetime,
	@UserID int,
	@ShopType int,
	@ShopNum int
AS

UPDATE [dbo].[ZL_ShopCompete] SET
	[ProID] = @ProID,
	[PMoney] = @PMoney,
	[AddTime] = @AddTime,
	[UserID] = @UserID,
	[ShopType] = @ShopType,
	[ShopNum] = @ShopNum
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_GetInsert]
	@ProID int,
	@PMoney money,
	@AddTime datetime,
	@UserID int,
	@ShopType int,
	@ShopNum int,
	@ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_ShopCompete] (
	[ProID],
	[PMoney],
	[AddTime],
	[UserID],
	[ShopType],
	[ShopNum]
) VALUES (
	@ProID,
	@PMoney,
	@AddTime,
	@UserID,
	@ShopType,
	@ShopNum
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_Select_All]
AS


SELECT
	[ID],
	[ProID],
	[PMoney],
	[AddTime],
	[UserID],
	[ShopType],
	[ShopNum]
FROM
	[dbo].[ZL_ShopCompete]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopCompete_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_ShopCompete_InsertUpdate]
	@ID int,
	@ProID int,
	@PMoney money,
	@AddTime datetime,
	@UserID int,
	@ShopType int,
	@ShopNum int
AS

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_ShopCompete] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_ShopCompete] SET
		[ProID] = @ProID,
		[PMoney] = @PMoney,
		[AddTime] = @AddTime,
		[UserID] = @UserID,
		[ShopType] = @ShopType,
		[ShopNum] = @ShopNum
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_ShopCompete] (	
	[ProID],
	[PMoney],
	[AddTime],
	[UserID],
	[ShopType],
	[ShopNum]
	) VALUES (
	@ProID,
	@PMoney,
	@AddTime,
	@UserID,
	@ShopType,
	@ShopNum
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopGrade_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopGrade_Del]
	@id int
as
	delete from ZL_ShopGrade  
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopGrade_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopGrade_Add]
	@id int,
	@GradeName nvarchar(255),
	@Gradeimg nvarchar(255),
	@CommentNum int,
	@OtherName nvarchar(255),
	@Istrue bit,
	@GradeType int,
	@Imgnum int
as
	insert into ZL_ShopGrade(GradeName,Gradeimg,CommentNum,OtherName,Istrue,GradeType,Imgnum)
	values (@GradeName,@Gradeimg,@CommentNum,@OtherName,@Istrue,@GradeType,@Imgnum)


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopGrade_all]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopGrade_all]

as
	select * from ZL_ShopGrade order by GradeType,CommentNum

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopGrade_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopGrade_Update]
	@id int,
	@GradeName nvarchar(255),
	@Gradeimg nvarchar(255),
	@CommentNum int,
	@OtherName nvarchar(255),
	@Istrue bit,
	@GradeType int,
	@Imgnum int
as
	update ZL_ShopGrade set 
		GradeName=@GradeName,
		Gradeimg=@Gradeimg,
		CommentNum=@CommentNum,
		OtherName=@OtherName,
		Istrue=@Istrue,
		GradeType=@GradeType,
		Imgnum=@Imgnum
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopGrade_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopGrade_GetById]
	@id int
as
	select * from ZL_ShopGrade where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopLable_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopLable_Del]
	@id int
as
	delete from ZL_ShopLable  
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopLable_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopLable_Add]
	@id int,
	@LableName nvarchar(255),
	@LableType int,
	@LableContent ntext,
	@LableInfo nvarchar(255),
	@IsTrue bit,
	@LableClass nvarchar(255),
	@Separator nvarchar(255),
	@Initial int,
	@Derive nvarchar(255),
	@Fildsinfo nvarchar(1000)
as
	insert into ZL_ShopLable(LableName,LableType,LableContent,LableInfo,IsTrue,LableClass,Separator,Initial,Derive,Fildsinfo)
	values (@LableName,@LableType,@LableContent,@LableInfo,@IsTrue,@LableClass,@Separator,@Initial,@Derive,@Fildsinfo)

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopLable_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopLable_All]

as
	select * from ZL_ShopLable order by LableType desc


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopLable_GetByname]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[PR_ShopLable_GetByname]
	@LableName nvarchar(255)
as
	select * from ZL_ShopLable where Lablename=@LableName

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopLable_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopLable_Update]
	@id int,
	@LableName nvarchar(255),
	@LableType int,
	@LableContent ntext,
	@LableInfo nvarchar(255),
	@IsTrue bit,
	@LableClass nvarchar(255),
	@Separator nvarchar(255),
	@Initial int,
	@Derive nvarchar(255),
	@Fildsinfo nvarchar(1000)
as
	update ZL_ShopLable set 
		LableName=@LableName,
		LableType=@LableType,
		LableContent=@LableContent,
		LableInfo=@LableInfo,
		IsTrue=@IsTrue,
		LableClass=@LableClass,
		Separator=@Separator,
		Initial=@Initial,
		Derive=@Derive,
		Fildsinfo=@Fildsinfo
	where id=@id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopLable_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopLable_GetById]
	@id int
as
	select * from ZL_ShopLable where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopNodeinfo_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopNodeinfo_Add]
	@id int,
	@Nodeid int,
	@NodeName nvarchar(255),
	@Incorporation bit,
	@Auction bit,
	@Warehouse bit,
	@Comment bit,
	@PageNum int,
	@ShowType int,
	@Anonymity bit,
	@Pointcard bit,
	@Dummymoney bit
as
	insert into ZL_ShopNodeinfo(Nodeid,NodeName,Incorporation,Auction,Warehouse,Comment,PageNum,ShowType,Anonymity,Pointcard,Dummymoney)
	values (@Nodeid,@NodeName,@Incorporation,@Auction,@Warehouse,@Comment,@PageNum,@ShowType,@Anonymity,@Pointcard,@Dummymoney)
	



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopNodeinfo_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopNodeinfo_All]
	@id int
as
	select * from ZL_ShopNodeinfo


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopNodeinfo_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopNodeinfo_Del]
	@id int
as
	delete from ZL_ShopNodeinfo  
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopNodeinfo_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_ShopNodeinfo_GetById]
	@id int
as
	select * from ZL_ShopNodeinfo where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_ShopNodeinfo_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_ShopNodeinfo_Update]
	@id int,
	@Nodeid int,
	@NodeName nvarchar(255),
	@Incorporation bit,
	@Auction bit,
	@Warehouse bit,
	@Comment bit,
	@PageNum int,
	@ShowType int,
	@Anonymity bit,
	@Pointcard bit,
	@Dummymoney bit
as
	update ZL_ShopNodeinfo set 
		Nodeid=@Nodeid,
		NodeName=@NodeName,
		Incorporation=@Incorporation,
		Auction=@Auction,
		Warehouse=@Warehouse,
		Comment=@Comment,
		PageNum=@PageNum,
		ShowType=@ShowType,
		Anonymity=@Anonymity,
		Pointcard=@Pointcard,
		Dummymoney=@Dummymoney
	where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopconfig_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Shopconfig_Add]
	@IsOpen bit,
	@BankInfo ntext,
	@Anonymity bit,
	@Pointcard bit,
	@Dummymoney bit,
	@Comment bit,
	@goodpl int,
	@centerpl int,
	@badpl int,
	@Auditing int
as
	insert into ZL_Shopconfig(IsOpen,BankInfo,Anonymity,Pointcard,Dummymoney,Comment,goodpl,centerpl,badpl,Auditing)
	values (@IsOpen,@BankInfo,@Anonymity,@Pointcard,@Dummymoney,@Comment,@goodpl,@centerpl,@badpl,@Auditing)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopconfig_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_Shopconfig_Del]
as
	delete from ZL_Shopconfig  
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopconfig_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Shopconfig_GetById]
as
	select top 1 * from ZL_Shopconfig


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopconfig_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Shopconfig_Update]
	@IsOpen bit,
	@BankInfo ntext,
	@Anonymity bit,
	@Pointcard bit,
	@Dummymoney bit,
	@Comment bit,
	@goodpl int,
	@centerpl int,
	@badpl int,
	@Auditing int
as
	update ZL_Shopconfig set 
		IsOpen=@IsOpen,
		BankInfo=@BankInfo,
		Anonymity=@Anonymity,
		Pointcard=@Pointcard,
		Dummymoney=@Dummymoney,
		Comment=@Comment,
		goodpl=@goodpl,
		centerpl=@centerpl,
		badpl=@badpl,
		Auditing=@Auditing

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopsearch_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Shopsearch_Add]
	@id int,
	@Searchkey nvarchar(255),
	@SearchNum int,
	@Commend int,
	@SearchTime datetime,
	@Class nvarchar(255),
	@Showtop bit
as
	insert into ZL_Shopsearch(Searchkey,SearchNum,Commend,SearchTime,Class,Showtop)
	values (@Searchkey,@SearchNum,@Commend,@SearchTime,@Class,@Showtop)


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopsearch_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Shopsearch_All]

as
	select * from ZL_Shopsearch order by id desc


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopsearch_GetById]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_Shopsearch_GetById]
	@id int
as
	select * from ZL_Shopsearch where id=@id
	



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopsearch_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE proc [dbo].[PR_Shopsearch_Update]
	@id int,
	@Searchkey nvarchar(255),
	@SearchNum int,
	@Commend int,
	@SearchTime datetime,
	@Class nvarchar(255),
	@Showtop bit
as
	update ZL_Shopsearch set 
		Searchkey=@Searchkey,
		SearchNum=@SearchNum,
		Commend=@Commend,
		SearchTime=@SearchTime,
		Class=@Class,
		Showtop=@Showtop
	where id=@id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Shopsearch_Del]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




create proc [dbo].[PR_Shopsearch_Del]
	@id int
as
	delete from ZL_Shopsearch  
	where id=@id
	



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_adzone_copy]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'



CREATE proc [dbo].[dt_adzone_copy]
@zone int
as
declare
@ZoneId int,
@ZoneName nvarchar(100),
@ZoneJSName nvarchar(100),
@ZoneIntro  nvarchar(255),
@ZoneType   int ,
@DefaultSetting bit,
@ZoneSetting nvarchar(255),
@ZoneWidth int ,
@ZoneHeight int,
@Active bit,
@ShowType int ,
@UpdateTime datetime
select @ZoneName=''复制''+ZoneName,@ZoneJSName=ZoneJSName,@ZoneIntro=ZoneIntro,@ZoneType=ZoneType,@DefaultSetting=DefaultSetting,@ZoneSetting=ZoneSetting,
@ZoneWidth=ZoneWidth,@ZoneHeight=ZoneHeight,@Active=Active,@ShowType=ShowType,@UpdateTime=UpdateTime 
from dbo.ZL_AdZone
where ZoneID=@zone
select  @ZoneId=max(ZoneID)+1 from ZL_AdZone
declare @year varchar(4)
declare @month varchar(2)
set @year = datepart(yy,getdate()) 
set @month = datepart(mm,getdate())

--begin
--if @month<10
--set @month=''0'' + @month
--end

set @ZoneJSName=@year+@month+''/''+CAST(@ZoneId as varchar)+''.js''
insert dbo.ZL_AdZone values(@ZoneId,@ZoneName,@ZoneJSName,@ZoneIntro,@ZoneType,@DefaultSetting,@ZoneSetting,@ZoneWidth,@ZoneHeight,@Active,@ShowType,@UpdateTime)
select @ZoneId as ''newID''

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_ADZone_Upadte]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create   proc [dbo].[dt_ADZone_Upadte]
@ZoneId int,
@ZoneName nvarchar(100),
@ZoneJSName nvarchar(100),
@ZoneIntro  nvarchar(255),
@ZoneType   int ,
@DefaultSetting bit,
@ZoneSetting nvarchar(255),
@ZoneWidth int ,
@ZoneHeight int,
@Active bit,
@ShowType int ,
@UpdateTime datetime
as 
update dbo.ZL_AdZone
set ZoneName=@ZoneName,ZoneJSName=@ZoneJSName,ZoneIntro=@ZoneIntro,
ZoneType=@ZoneType,DefaultSetting=@DefaultSetting,ZoneSetting=@ZoneSetting,ZoneWidth=@ZoneWidth,ZoneHeight=@ZoneHeight,Active=@Active,ShowType=@ShowType,UpdateTime=@UpdateTime
where ZoneID=@ZoneId





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_ADZone_Pause]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE proc [dbo].[dt_ADZone_Pause]
@ZoneID int
as
update dbo.ZL_AdZone set Active=0 where ZoneID=@ZoneID





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_ADZone_Remove]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[dt_ADZone_Remove]
@ZoneID int
as
delete dbo.ZL_AdZone from dbo.ZL_AdZone  where ZoneID=@ZoneID





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_ADZone_Active]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[dt_ADZone_Active]
@ZoneID int
as
update dbo.ZL_AdZone set Active=1 where ZoneID=@ZoneID





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_ADZone_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE  proc [dbo].[dt_ADZone_Add]
@ZoneId int,
@ZoneName nvarchar(100),
@ZoneJSName nvarchar(100),
@ZoneIntro  nvarchar(255),
@ZoneType   int ,
@DefaultSetting bit,
@ZoneSetting nvarchar(255),
@ZoneWidth int ,
@ZoneHeight int,
@Active bit,
@ShowType int ,
@UpdateTime datetime
as 
insert into ZL_AdZone
(
ZoneID,
ZoneName,
ZoneJSName,
ZoneIntro,
ZoneType,
DefaultSetting,
ZoneSetting,
ZoneWidth,
ZoneHeight,
Active,
ShowType,
UpdateTime
) values(
@ZoneId,
@ZoneName,
@ZoneJSName,
@ZoneIntro,
@ZoneType,
@DefaultSetting,
@ZoneSetting,
@ZoneWidth,
@ZoneHeight,
@Active,
@ShowType,
@UpdateTime
)




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_GetInsert]
	@UserID int,
	@AddRessContext nvarchar(4000),
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_AddRessList] (
	[UserID],
	[AddRessContext]
) VALUES (
	@UserID,
	@AddRessContext
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_AddRessList]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[UserID],
	[AddRessContext]
FROM
	[dbo].[ZL_AddRessList]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_InsertUpdate]
	@ID int,
	@UserID int,
	@AddRessContext nvarchar(4000)
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_AddRessList] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_AddRessList] SET
		[UserID] = @UserID,
		[AddRessContext] = @AddRessContext
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_AddRessList] (	
	[UserID],
	[AddRessContext]
	) VALUES (
	@UserID,
	@AddRessContext
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[UserID],
	[AddRessContext]
FROM
	[dbo].[ZL_AddRessList]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_AddRessList_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_AddRessList_GetUpdate]
	@ID int,
	@UserID int,
	@AddRessContext nvarchar(4000)
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_AddRessList] SET
	[UserID] = @UserID,
	[AddRessContext] = @AddRessContext
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_advertisement_copy]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE  proc [dbo].[dt_advertisement_copy] 
@ad int
as 
declare
@ADID int,
@UserID int,
@ADType int,
@ADName nvarchar(100),
@ImgUrl nvarchar(255),
@ImgWidth int ,
@ImgHeight int,
@FlashWmode int,
@ADIntro  nvarchar(4000),
@LinkUrl nvarchar(255),
@LinkTarget int,
@LinkAlt nvarchar(255),
@Priority int,
@Setting nvarchar(255),
@CountView bit,
@Views int,
@CountClick bit,
@Clicks int,
@Passed bit,
@OverdueDate datetime,
@ImgUrl1 nvarchar(255),
@ImgHeight1 int,
@ImgWidth1 int,
@LinkUrl1 nvarchar(255),
@LinkTarget1 int,
@LinkAlt1 nvarchar(255),
@ADIntro1 nvarchar(4000),
@FlashWmode1 int


select @UserID=UserID,@ADType=ADType,@ADName=''复制''+ADName,@ImgUrl=ImgUrl,
@ImgWidth=ImgWidth,@ImgHeight=ImgHeight,@FlashWmode=FlashWmode,@ADIntro=ADIntro,
@LinkUrl=LinkUrl,@LinkTarget=LinkTarget,@LinkAlt=LinkAlt,
@Priority=Priority,@Setting=Setting,@CountView =CountView,@Views=[Views],@CountClick=CountClick,
@Clicks=Clicks,@Passed=Passed,@OverdueDate=OverdueDate,@ImgUrl1=ImgUrl1,@ImgHeight1=ImgHeight1,@ImgWidth1=ImgWidth1,@LinkUrl1=LinkUrl1,@LinkTarget1=LinkTarget1,@LinkAlt1=LinkAlt1,@ADIntro1=ADIntro1,@FlashWmode1=FlashWmode1
from dbo.ZL_Advertisement where ADID=@ad
insert dbo.ZL_Advertisement values(@UserID,@ADType,@ADName,@ImgUrl,@ImgWidth,@ImgHeight,@FlashWmode,@ADIntro,@LinkUrl,@LinkTarget,@LinkAlt,@Priority,@Setting,@CountView,@Views,@CountClick,@Clicks,@Passed,@OverdueDate,@ImgUrl1,@ImgHeight1,@ImgWidth1,@LinkUrl1,@LinkTarget1,@LinkAlt1,@ADIntro1,@FlashWmode1)





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_Advertisement_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'






CREATE  proc [dbo].[dt_Advertisement_Add] 
@ADID int,
@UserID int,
@ADType int,
@ADName nvarchar(100),
@ImgUrl nvarchar(255),
@ImgWidth int ,
@ImgHeight int,
@FlashWmode int,
@ADIntro  ntext,
@LinkUrl nvarchar(255),
@LinkTarget int,
@LinkAlt nvarchar(255),
@Priority int,
@Setting ntext,
@CountView bit,
@Views int,
@CountClick bit,
@Clicks int,
@Passed bit,
@OverdueDate datetime,
@ImgUrl1 nvarchar(255),
@ImgHeight1 int,
@ImgWidth1 int,
@LinkUrl1 nvarchar(255),
@LinkTarget1 int,
@LinkAlt1 nvarchar(255),
@ADIntro1 ntext,
@FlashWmode1 int


as 

INSERT INTO [dbo].[ZL_Advertisement] (
	[UserID],
	[ADType],
	[ADName],
	[ImgUrl],
	[ImgWidth],
	[ImgHeight],
	[FlashWmode],
	[ADIntro],
	[LinkUrl],
	[LinkTarget],
	[LinkAlt],
	[Priority],
	[Setting],
	[CountView],
	[Views],
	[CountClick],
	[Clicks],
	[Passed],
	[OverdueDate],
	[ImgUrl1],
	[ImgHeight1],
	[ImgWidth1],
	[LinkUrl1],
	[LinkTarget1],
	[LinkAlt1],
	[ADIntro1],
	[FlashWmode1]
) VALUES (
	@UserID,
	@ADType,
	@ADName,
	@ImgUrl,
	@ImgWidth,
	@ImgHeight,
	@FlashWmode,
	@ADIntro,
	@LinkUrl,
	@LinkTarget,
	@LinkAlt,
	@Priority,
	@Setting,
	@CountView,
	@Views,
	@CountClick,
	@Clicks,
	@Passed,
	@OverdueDate,
	@ImgUrl1,
	@ImgHeight1,
	@ImgWidth1,
	@LinkUrl1,
	@LinkTarget1,
	@LinkAlt1,
	@ADIntro1,
	@FlashWmode1
)

SET @ADID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_Advertisement_CancelPassed]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[dt_Advertisement_CancelPassed]
@strAdId int
as update dbo.ZL_Advertisement set Passed=0 where ADID=@strAdId





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_Advertisement_remove]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE proc [dbo].[dt_Advertisement_remove]
@strAdId  int
as 
delete from  ZL_Advertisement 
where  ADID=@strAdId




' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_Advertisement_Passed]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





create proc [dbo].[dt_Advertisement_Passed]
@strAdId int
as update dbo.ZL_Advertisement set Passed=1 where ADID=@strAdId





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[dt_Advertisement_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE  proc [dbo].[dt_Advertisement_Update]
@ADID int,
@UserID int,
@ADType int,
@ADName nvarchar(100),
@ImgUrl nvarchar(255),
@ImgWidth int ,
@ImgHeight int,
@FlashWmode int,
@ADIntro  ntext,
@LinkUrl nvarchar(255),
@LinkTarget int,
@LinkAlt nvarchar(255),
@Priority int,
@Setting ntext,
@CountView bit,
@Views int,
@CountClick bit,
@Clicks int,
@Passed bit,
@OverdueDate datetime,
@ImgUrl1 nvarchar(255),
@ImgHeight1 int,
@ImgWidth1 int,
@LinkUrl1 nvarchar(255),
@LinkTarget1 int,
@LinkAlt1 nvarchar(255),
@ADIntro1 ntext,
@FlashWmode1 int


as update dbo.ZL_Advertisement set
UserID=@UserID,ADType=@ADType
,ADName=@ADName,
ImgUrl=@ImgUrl,ImgWidth=@ImgWidth,ImgHeight=@ImgHeight,FlashWmode=@FlashWmode
,ADIntro=@ADIntro,LinkUrl=@LinkUrl,LinkTarget=@LinkTarget,LinkAlt=@LinkAlt,
Priority=@Priority,Setting=@Setting,CountView=@CountView,
[Views]=@Views,CountClick=@CountClick,Clicks=@Clicks,Passed=@Passed,OverdueDate=@OverdueDate,ImgUrl1=@ImgUrl1,ImgHeight1=@ImgHeight1,ImgWidth1=@ImgWidth1,LinkUrl1=@LinkUrl1,LinkTarget1=@LinkTarget1,LinkAlt1=@LinkAlt1,ADIntro1=@ADIntro1,FlashWmode1=@FlashWmode1
where ADID=@ADID





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Answer_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Answer_Add]
(
@AID int,
@SurveyID int,
@QID int,
@AnswerContent Text,
@UserID int,
@SubmitDate Datetime,
@SubmitIP nvarchar(50)

)
AS
BEGIN

        insert into ZL_ANSWER (SurveyID,QID,AnswerContent,UserID,SubmitDate,SubmitIP)values(
         @SurveyID,
         @QID,
         @AnswerContent,
         @UserID,
         @SubmitDate,
         @SubmitIP
        )   

END


' 
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=NULL ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'PROCEDURE', @level1name=N'PR_Answer_Add'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Author_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Author_Add] 
(   @ID int, 	
    @UserId int,
    @Name varchar(50),
    @Type varchar(50),
    @Passed bit,
    @onTop bit,
    @IsElite bit,
    @Hits int,
    @LastUseTime DateTime,
    @TemplateID int,
    @Photo varchar(255),
    @Intro nvarchar(255),
    @Address varchar(50),
    @Tel varchar(50),
    @Fax varchar(50),
    @Mail varchar(50),
    @Email varchar(50),
    @ZipCode int,
    @HomePage varchar(50),
    @Im varchar(50),
    @Sex smallint,
    @BirthDay DateTime,
    @Company varchar(50),
    @Department varchar(50)
)
AS

	INSERT INTO
	ZL_Author(UserID,Type,[Name],Passed,onTop,IsElite,Hits,LastUseTime,TemplateID,Photo,Intro,Address,Tel,Fax,Mail,Email,ZipCode,HomePage,Im,Sex,BirthDay,Company,Department) VALUES(@UserId,@Type,@Name,@Passed,@onTop,@IsElite,@Hits,@LastUseTime,@TemplateID,@Photo,@Intro,@Address,@Tel,@Fax,@Mail,@Email,@ZipCode,@HomePage,@Im,@Sex,@BirthDay,@Company,@Department)





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Author_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Author_Delete] 
(
    @ID nvarchar(100)
)
AS	
	IF @ID IS NOT NULL 
	BEGIN
		DELETE FROM ZL_Author WHERE ID in(@ID) 
	END





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Author_GetAuthorInfoByID]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Author_GetAuthorInfoByID]
(
	@ID int
)
AS
    IF @ID > 0
    BEGIN
        SELECT
		ID,
		UserID,
		Type,
		[Name],
		Passed,
		onTop,
		IsElite,
		Hits,
		LastUseTime,
		TemplateID,
		Photo,
		Intro,
		Address,
		Tel,
		Fax,
		Mail,
		Email,
		ZipCode,
		HomePage,
		Im,
		Sex,
		BirthDay,
		Company,
		Department
		FROM ZL_Author WHERE ID=@ID
	END
	
	RETURN





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Author_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE PROCEDURE [dbo].[PR_Author_Update]
(
    @ID int,
    @UserId int,
    @Name varchar(50),
    @Type varchar(50),
    @Passed bit,
    @onTop bit,
    @IsElite bit,
    @Hits int,
    @LastUseTime DateTime,
    @TemplateID int,
    @Photo varchar(255),
    @Intro nvarchar(255),
    @Address varchar(50),
    @Tel varchar(50),
    @Fax varchar(50),
    @Mail varchar(50),
    @Email varchar(50),
    @ZipCode int,
    @HomePage varchar(50),
    @Im varchar(50),
    @Sex smallint,
    @BirthDay DateTime,
    @Company varchar(50),
    @Department varchar(50)
)
AS
	IF @ID > 0
	BEGIN

		UPDATE ZL_Author SET
		UserID=@UserId,Type=@Type,[Name]=@Name,Passed=@Passed,onTop=@onTop,IsElite=@IsElite,Hits=@Hits,LastUseTime=@LastUseTime,TemplateID=@TemplateID,Photo=@Photo,Intro=@Intro,Address=@Address,Tel=@Tel,Fax=@Fax,Mail=@Mail,Email=@Email,ZipCode=@ZipCode,HomePage=@HomePage,Im=@Im,Sex=@Sex,BirthDay=@BirthDay,Company=@Company,Department=@Department
		WHERE ID=@ID
		
	END





' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Cate_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Cate_Add]
(
@CateID int,
@CateName nvarchar(50),
@CateType int
)
AS
BEGIN
     IF @CateID=0
	BEGIN
        insert into ZL_BBSCATE (CateName,CateType)values(
         @CateName,
         @CateType
        )
	END
    Else
        update ZL_BBSCATE set 
        CateName=@CateName,
        CateType=@CateType
        where CateID=@CateID

END


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Cate_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Cate_Delete]
(
@CateID int
)
AS
    delete from ZL_BBSTIPS where CateID=@CateID
    delete from ZL_BBSCATE where CateID=@CateID


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Tips_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Tips_Delete]
(
@TID int
)
AS
delete from ZL_BBSTIPS where TID=@TID or ParentID=@TID


' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_Tips_Add]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Tips_Add]
(
@TID int,
@ParentID int,
@CateID int,
@UserID int,
@TTitle nvarchar(255),
@TContent Text,
@TipsClick int,
@TipsDate Datetime

)
AS
BEGIN


     if @TID=0
	BEGIN
        insert into ZL_BBSTIPS (ParentID,CateID,UserID,TTitle,TContent,TipsClick,TipsDate)values(
         @ParentID,
         @CateID,
         @UserID,
         @TTitle,
         @TContent,
         @TipsClick,
         @TipsDate
        )
	END
    else
        update ZL_BBSTIPS set 
         ParentID=@ParentID,
         CateID=@CateID,
         UserID=@UserID,
         TTitle=@TTitle,
         TContent=@TContent,
         TipsClick=@TipsClick,
         TipsDate=@TipsDate
        where TID=@TID

END


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_InsertUpdate]
	@ID int,
	@BindProID int,
	@ProID int,
	@ProName nvarchar(255),
	@Jiage money,
	@Pronum int
AS
SET NOCOUNT ON

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_BindPro] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_BindPro] SET
		[BindProID] = @BindProID,
		[ProID] = @ProID,
		[ProName] = @ProName,
		[Jiage] = @Jiage,
		[Pronum] = @Pronum
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_BindPro] (	
	[BindProID],
	[ProID],
	[ProName],
	[Jiage],
	[Pronum]
	) VALUES (
	@BindProID,
	@ProID,
	@ProName,
	@Jiage,
	@Pronum
	)

END



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_Select_All]
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[BindProID],
	[ProID],
	[ProName],
	[Jiage],
	[Pronum]
FROM
	[dbo].[ZL_BindPro]



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_GetUpdate]
	@ID int,
	@BindProID int,
	@ProID int,
	@ProName nvarchar(255),
	@Jiage money,
	@Pronum int
AS

SET NOCOUNT ON

UPDATE [dbo].[ZL_BindPro] SET
	[BindProID] = @BindProID,
	[ProID] = @ProID,
	[ProName] = @ProName,
	[Jiage] = @Jiage,
	[Pronum] = @Pronum
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_GetSelect]
	@ID int
AS

SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ COMMITTED

SELECT
	[ID],
	[BindProID],
	[ProID],
	[ProName],
	[Jiage],
	[Pronum]
FROM
	[dbo].[ZL_BindPro]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_GetDelete]
	@ID int
AS

SET NOCOUNT ON

DELETE FROM [dbo].[ZL_BindPro]
WHERE
	[ID] = @ID



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_BindPro_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_BindPro_GetInsert]
	@BindProID int,
	@ProID int,
	@ProName nvarchar(255),
	@Jiage money,
	@Pronum int,
	@ID int OUTPUT
AS

SET NOCOUNT ON

INSERT INTO [dbo].[ZL_BindPro] (
	[BindProID],
	[ProID],
	[ProName],
	[Jiage],
	[Pronum]
) VALUES (
	@BindProID,
	@ProID,
	@ProName,
	@Jiage,
	@Pronum
)

SET @ID = SCOPE_IDENTITY()



' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_GetSelect]
	@C_Nid int
AS

SELECT
	[C_Nid],
	[CName],
	[Ctype]
FROM
	[dbo].[ZL_CallNode]
WHERE
	[C_Nid] = @C_Nid




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_GetInsert]
	@CName nvarchar(1000),
	@Ctype int,
	@C_Nid int OUTPUT
AS

INSERT INTO [dbo].[ZL_CallNode] (
	[CName],
	[Ctype]
) VALUES (
	@CName,
	@Ctype
)

SET @C_Nid = SCOPE_IDENTITY()




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_InsertUpdate]
	@C_Nid int,
	@CName nvarchar(1000),
	@Ctype int
AS

IF EXISTS(SELECT [C_Nid] FROM [dbo].[ZL_CallNode] WHERE [C_Nid] = @C_Nid)
BEGIN
	UPDATE [dbo].[ZL_CallNode] SET
		[CName] = @CName,
		[Ctype] = @Ctype
	WHERE
		[C_Nid] = @C_Nid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_CallNode] (	
	[CName],
	[Ctype]
	) VALUES (
	@CName,
	@Ctype
	)

END




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_GetDelete]
	@C_Nid int
AS

DELETE FROM [dbo].[ZL_CallNode]
WHERE
	[C_Nid] = @C_Nid




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_GetUpdate]
	@C_Nid int,
	@CName nvarchar(1000),
	@Ctype int
AS

UPDATE [dbo].[ZL_CallNode] SET
	[CName] = @CName,
	[Ctype] = @Ctype
WHERE
	[C_Nid] = @C_Nid




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_CallNode_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'




CREATE PROCEDURE [dbo].[PR_CallNode_Select_All]
AS


SELECT
	[C_Nid],
	[CName],
	[Ctype]
FROM
	[dbo].[ZL_CallNode]




' 
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_WapGolds]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_WapGolds](
	[G_ID] [int] IDENTITY(1,1) NOT NULL,
	[userid] [int] NOT NULL,
	[TableType] [int] NULL,
	[TableID] [int] NULL,
	[addtime] [datetime] NULL,
	[endtime] [datetime] NULL,
	[Golds] [int] NULL,
 CONSTRAINT [PK_ZL_WapGolds] PRIMARY KEY CLUSTERED 
(
	[G_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'表类型1文章' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapGolds', @level2type=N'COLUMN', @level2name=N'TableType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'表ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapGolds', @level2type=N'COLUMN', @level2name=N'TableID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'积分数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_WapGolds', @level2type=N'COLUMN', @level2name=N'Golds'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_WapGolds]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_WapGolds]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_Select_All]
AS


SELECT
	[G_ID],
	[userid],
	[TableType],
	[TableID],
	[addtime],
	[endtime],
	[Golds]
FROM
	[dbo].[ZL_WapGolds]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_GetSelect]
	@G_ID int
AS

SELECT
	[G_ID],
	[userid],
	[TableType],
	[TableID],
	[addtime],
	[endtime],
	[Golds]
FROM
	[dbo].[ZL_WapGolds]
WHERE
	[G_ID] = @G_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_GetInsert]
	@userid int,
	@TableType int,
	@TableID int,
	@addtime datetime,
	@endtime datetime,
	@Golds int,
	@G_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_WapGolds] (
	[userid],
	[TableType],
	[TableID],
	[addtime],
	[endtime],
	[Golds]
) VALUES (
	@userid,
	@TableType,
	@TableID,
	@addtime,
	@endtime,
	@Golds
)

SET @G_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_GetUpdate]
	@G_ID int,
	@userid int,
	@TableType int,
	@TableID int,
	@addtime datetime,
	@endtime datetime,
	@Golds int
AS

UPDATE [dbo].[ZL_WapGolds] SET
	[userid] = @userid,
	[TableType] = @TableType,
	[TableID] = @TableID,
	[addtime] = @addtime,
	[endtime] = @endtime,
	[Golds] = @Golds
WHERE
	[G_ID] = @G_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_InsertUpdate]
	@G_ID int,
	@userid int,
	@TableType int,
	@TableID int,
	@addtime datetime,
	@endtime datetime,
	@Golds int
AS

IF EXISTS(SELECT [G_ID] FROM [dbo].[ZL_WapGolds] WHERE [G_ID] = @G_ID)
BEGIN
	UPDATE [dbo].[ZL_WapGolds] SET
		[userid] = @userid,
		[TableType] = @TableType,
		[TableID] = @TableID,
		[addtime] = @addtime,
		[endtime] = @endtime,
		[Golds] = @Golds
	WHERE
		[G_ID] = @G_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_WapGolds] (	
	[userid],
	[TableType],
	[TableID],
	[addtime],
	[endtime],
	[Golds]
	) VALUES (
	@userid,
	@TableType,
	@TableID,
	@addtime,
	@endtime,
	@Golds
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_WapGold_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_WapGold_GetDelete]
	@G_ID int
AS

DELETE FROM [dbo].[ZL_WapGolds]
WHERE
	[G_ID] = @G_ID

' 
END

--end
--add5-5
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SNum]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SNum](
	[s_id] [int] IDENTITY(1,1) NOT NULL,
	[Sname] [nvarchar](255) NULL CONSTRAINT [DF_ZL_SNum_Sname]  DEFAULT (0),
	[SUserID] [int] NULL CONSTRAINT [DF_ZL_SNum_SUserID]  DEFAULT (0),
	[addtime] [smalldatetime] NULL,
	[endtime] [smalldatetime] NULL,
	[states] [int] NULL,
 CONSTRAINT [PK_ZL_SNum] PRIMARY KEY CLUSTERED 
(
	[s_id] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'号码名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SNum', @level2type=N'COLUMN', @level2name=N'Sname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'选号者ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SNum', @level2type=N'COLUMN', @level2name=N'SUserID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态0停用，1启用' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SNum', @level2type=N'COLUMN', @level2name=N'states'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SUser]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SUser](
	[su_id] [int] IDENTITY(1,1) NOT NULL,
	[SNID] [int] NULL CONSTRAINT [DF_ZL_SUser_SNID]  DEFAULT (0),
	[Uname] [nvarchar](255) NULL,
	[IDType] [int] NULL,
	[IDnum] [nvarchar](255) NULL,
	[VinNum] [nvarchar](255) NULL,
	[Invoice] [int] NULL,
	[InvoiceTime] [datetime] NULL,
	[jinkou] [int] NULL,
	[LivingNum] [nvarchar](255) NULL,
	[tel] [nvarchar](255) NULL,
	[motel] [nvarchar](255) NULL,
	[adress] [nvarchar](500) NULL,
	[adressgo] [nvarchar](500) NULL,
	[postcode] [nvarchar](255) NULL,
	[addtime] [datetime] NULL,
	[endtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_SUser] PRIMARY KEY CLUSTERED 
(
	[su_id] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'号码ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'SNID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名或单位名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'Uname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证明名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'IDType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证明号码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'IDnum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'车辆识别代号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'VinNum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发票号码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'Invoice'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否进口' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'jinkou'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'住所地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'adress'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'邮寄地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'adressgo'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'邮政编码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SUser', @level2type=N'COLUMN', @level2name=N'postcode'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SNum]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SNum]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SUser]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SUser]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_GetSelect]
	@s_id int
AS

SELECT
	[s_id],
	[Sname],
	[SUserID],
	[addtime],
	[endtime],
	[states]
FROM
	[dbo].[ZL_SNum]
WHERE
	[s_id] = @s_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_Select_All]
AS


SELECT
	[s_id],
	[Sname],
	[SUserID],
	[addtime],
	[endtime],
	[states]
FROM
	[dbo].[ZL_SNum]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_GetInsert]
	@Sname nvarchar(255),
	@SUserID int,
	@addtime smalldatetime,
	@endtime smalldatetime,
	@states int,
	@s_id int OUTPUT
AS

INSERT INTO [dbo].[ZL_SNum] (
	[Sname],
	[SUserID],
	[addtime],
	[endtime],
	[states]
) VALUES (
	@Sname,
	@SUserID,
	@addtime,
	@endtime,
	@states
)

SET @s_id = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_GetUpdate]
	@s_id int,
	@Sname nvarchar(255),
	@SUserID int,
	@addtime smalldatetime,
	@endtime smalldatetime,
	@states int
AS

UPDATE [dbo].[ZL_SNum] SET
	[Sname] = @Sname,
	[SUserID] = @SUserID,
	[addtime] = @addtime,
	[endtime] = @endtime,
	[states] = @states
WHERE
	[s_id] = @s_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_InsertUpdate]
	@s_id int,
	@Sname nvarchar(255),
	@SUserID int,
	@addtime smalldatetime,
	@endtime smalldatetime,
	@states int
AS

IF EXISTS(SELECT [s_id] FROM [dbo].[ZL_SNum] WHERE [s_id] = @s_id)
BEGIN
	UPDATE [dbo].[ZL_SNum] SET
		[Sname] = @Sname,
		[SUserID] = @SUserID,
		[addtime] = @addtime,
		[endtime] = @endtime,
		[states] = @states
	WHERE
		[s_id] = @s_id
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SNum] (	
	[Sname],
	[SUserID],
	[addtime],
	[endtime],
	[states]
	) VALUES (
	@Sname,
	@SUserID,
	@addtime,
	@endtime,
	@states
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SNum_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SNum_GetDelete]
	@s_id int
AS

DELETE FROM [dbo].[ZL_SNum]
WHERE
	[s_id] = @s_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_GetInsert]
	@SNID int,
	@Uname nvarchar(255),
	@IDType int,
	@IDnum nvarchar(255),
	@VinNum nvarchar(255),
	@Invoice int,
	@InvoiceTime datetime,
	@jinkou int,
	@LivingNum nvarchar(255),
	@tel nvarchar(255),
	@motel nvarchar(255),
	@adress nvarchar(500),
	@adressgo nvarchar(500),
	@postcode nvarchar(255),
	@addtime datetime,
	@endtime datetime,
	@su_id int OUTPUT
AS

INSERT INTO [dbo].[ZL_SUser] (
	[SNID],
	[Uname],
	[IDType],
	[IDnum],
	[VinNum],
	[Invoice],
	[InvoiceTime],
	[jinkou],
	[LivingNum],
	[tel],
	[motel],
	[adress],
	[adressgo],
	[postcode],
	[addtime],
	[endtime]
) VALUES (
	@SNID,
	@Uname,
	@IDType,
	@IDnum,
	@VinNum,
	@Invoice,
	@InvoiceTime,
	@jinkou,
	@LivingNum,
	@tel,
	@motel,
	@adress,
	@adressgo,
	@postcode,
	@addtime,
	@endtime
)

SET @su_id = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_GetUpdate]
	@su_id int,
	@SNID int,
	@Uname nvarchar(255),
	@IDType int,
	@IDnum nvarchar(255),
	@VinNum nvarchar(255),
	@Invoice int,
	@InvoiceTime datetime,
	@jinkou int,
	@LivingNum nvarchar(255),
	@tel nvarchar(255),
	@motel nvarchar(255),
	@adress nvarchar(500),
	@adressgo nvarchar(500),
	@postcode nvarchar(255),
	@addtime datetime,
	@endtime datetime
AS

UPDATE [dbo].[ZL_SUser] SET
	[SNID] = @SNID,
	[Uname] = @Uname,
	[IDType] = @IDType,
	[IDnum] = @IDnum,
	[VinNum] = @VinNum,
	[Invoice] = @Invoice,
	[InvoiceTime] = @InvoiceTime,
	[jinkou] = @jinkou,
	[LivingNum] = @LivingNum,
	[tel] = @tel,
	[motel] = @motel,
	[adress] = @adress,
	[adressgo] = @adressgo,
	[postcode] = @postcode,
	[addtime] = @addtime,
	[endtime] = @endtime
WHERE
	[su_id] = @su_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_InsertUpdate]
	@su_id int,
	@SNID int,
	@Uname nvarchar(255),
	@IDType int,
	@IDnum nvarchar(255),
	@VinNum nvarchar(255),
	@Invoice int,
	@InvoiceTime datetime,
	@jinkou int,
	@LivingNum nvarchar(255),
	@tel nvarchar(255),
	@motel nvarchar(255),
	@adress nvarchar(500),
	@adressgo nvarchar(500),
	@postcode nvarchar(255),
	@addtime datetime,
	@endtime datetime
AS

IF EXISTS(SELECT [su_id] FROM [dbo].[ZL_SUser] WHERE [su_id] = @su_id)
BEGIN
	UPDATE [dbo].[ZL_SUser] SET
		[SNID] = @SNID,
		[Uname] = @Uname,
		[IDType] = @IDType,
		[IDnum] = @IDnum,
		[VinNum] = @VinNum,
		[Invoice] = @Invoice,
		[InvoiceTime] = @InvoiceTime,
		[jinkou] = @jinkou,
		[LivingNum] = @LivingNum,
		[tel] = @tel,
		[motel] = @motel,
		[adress] = @adress,
		[adressgo] = @adressgo,
		[postcode] = @postcode,
		[addtime] = @addtime,
		[endtime] = @endtime
	WHERE
		[su_id] = @su_id
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SUser] (	
	[SNID],
	[Uname],
	[IDType],
	[IDnum],
	[VinNum],
	[Invoice],
	[InvoiceTime],
	[jinkou],
	[LivingNum],
	[tel],
	[motel],
	[adress],
	[adressgo],
	[postcode],
	[addtime],
	[endtime]
	) VALUES (
	@SNID,
	@Uname,
	@IDType,
	@IDnum,
	@VinNum,
	@Invoice,
	@InvoiceTime,
	@jinkou,
	@LivingNum,
	@tel,
	@motel,
	@adress,
	@adressgo,
	@postcode,
	@addtime,
	@endtime
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_GetDelete]
	@su_id int
AS

DELETE FROM [dbo].[ZL_SUser]
WHERE
	[su_id] = @su_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_GetSelect]
	@su_id int
AS

SELECT
	[su_id],
	[SNID],
	[Uname],
	[IDType],
	[IDnum],
	[VinNum],
	[Invoice],
	[InvoiceTime],
	[jinkou],
	[LivingNum],
	[tel],
	[motel],
	[adress],
	[adressgo],
	[postcode],
	[addtime],
	[endtime]
FROM
	[dbo].[ZL_SUser]
WHERE
	[su_id] = @su_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SUser_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SUser_Select_All]
AS


SELECT
	[su_id],
	[SNID],
	[Uname],
	[IDType],
	[IDnum],
	[VinNum],
	[Invoice],
	[InvoiceTime],
	[jinkou],
	[LivingNum],
	[tel],
	[motel],
	[adress],
	[adressgo],
	[postcode],
	[addtime],
	[endtime]
FROM
	[dbo].[ZL_SUser]

' 
END

--end

/****** 对象:  Table [dbo].[ZL_PrintType]    脚本日期: 05/09/2009 09:48:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_PrintType](
	[PID] [int] IDENTITY(1,1) NOT NULL,
	[P_Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[P_Ream] [nvarchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[P_PicLocality] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[P_AddTime] [datetime] NULL,
	[P_Mask] [int] NULL,
	[P_MaskUrl] [varchar](4000) COLLATE Chinese_PRC_CI_AS NULL,
	[P_Proportion] [nchar](10) COLLATE Chinese_PRC_CI_AS NULL,
	[P_ShopID] [int] NULL,
	[P_ShopType] [int] NULL,
 CONSTRAINT [PK_ZL_PrintType] PRIMARY KEY CLUSTERED 
(
	[PID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'显示图片' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_Ream'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片显示位置' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_PicLocality'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_AddTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'遮罩，1：单个遮罩，2：遮罩库' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_Mask'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'遮罩地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_MaskUrl'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片比例' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_Proportion'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关联的商品ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_ShopID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否关联商品ID 1：关联，2：不关联' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_PrintType', @level2type=N'COLUMN', @level2name=N'P_ShopType'


IF OBJECT_ID(N'[dbo].[PR_PrintType_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_PrintType_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_PrintType_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_PrintType_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_PrintType_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_PrintType_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_PrintType_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_PrintType_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_PrintType_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_PrintType_GetInsert]
	@P_Name nvarchar(50),
	@P_Ream nvarchar(4000),
	@P_PicLocality nvarchar(50),
	@P_AddTime datetime,
	@P_Mask int,
	@P_MaskUrl varchar(4000),
	@P_Proportion nchar(10),
	@P_ShopID int,
	@P_ShopType int,
	@PID int OUTPUT
AS

INSERT INTO [dbo].[ZL_PrintType] (
	[P_Name],
	[P_Ream],
	[P_PicLocality],
	[P_AddTime],
	[P_Mask],
	[P_MaskUrl],
	[P_Proportion],
	[P_ShopID],
	[P_ShopType]
) VALUES (
	@P_Name,
	@P_Ream,
	@P_PicLocality,
	@P_AddTime,
	@P_Mask,
	@P_MaskUrl,
	@P_Proportion,
	@P_ShopID,
	@P_ShopType
)

SET @PID = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_PrintType_GetUpdate]
	@PID int,
	@P_Name nvarchar(50),
	@P_Ream nvarchar(4000),
	@P_PicLocality nvarchar(50),
	@P_AddTime datetime,
	@P_Mask int,
	@P_MaskUrl varchar(4000),
	@P_Proportion nchar(10),
	@P_ShopID int,
	@P_ShopType int
AS

UPDATE [dbo].[ZL_PrintType] SET
	[P_Name] = @P_Name,
	[P_Ream] = @P_Ream,
	[P_PicLocality] = @P_PicLocality,
	[P_AddTime] = @P_AddTime,
	[P_Mask] = @P_Mask,
	[P_MaskUrl] = @P_MaskUrl,
	[P_Proportion] = @P_Proportion,
	[P_ShopID] = @P_ShopID,
	[P_ShopType] = @P_ShopType
WHERE
	[PID] = @PID

GO


CREATE PROCEDURE [dbo].[PR_PrintType_InsertUpdate]
	@PID int,
	@P_Name nvarchar(50),
	@P_Ream nvarchar(4000),
	@P_PicLocality nvarchar(50),
	@P_AddTime datetime,
	@P_Mask int,
	@P_MaskUrl varchar(4000),
	@P_Proportion nchar(10),
	@P_ShopID int,
	@P_ShopType int
AS

IF EXISTS(SELECT [PID] FROM [dbo].[ZL_PrintType] WHERE [PID] = @PID)
BEGIN
	UPDATE [dbo].[ZL_PrintType] SET
		[P_Name] = @P_Name,
		[P_Ream] = @P_Ream,
		[P_PicLocality] = @P_PicLocality,
		[P_AddTime] = @P_AddTime,
		[P_Mask] = @P_Mask,
		[P_MaskUrl] = @P_MaskUrl,
		[P_Proportion] = @P_Proportion,
		[P_ShopID] = @P_ShopID,
		[P_ShopType] = @P_ShopType
	WHERE
		[PID] = @PID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_PrintType] (	
	[P_Name],
	[P_Ream],
	[P_PicLocality],
	[P_AddTime],
	[P_Mask],
	[P_MaskUrl],
	[P_Proportion],
	[P_ShopID],
	[P_ShopType]
	) VALUES (
	@P_Name,
	@P_Ream,
	@P_PicLocality,
	@P_AddTime,
	@P_Mask,
	@P_MaskUrl,
	@P_Proportion,
	@P_ShopID,
	@P_ShopType
	)

END

GO


CREATE PROCEDURE [dbo].[PR_PrintType_GetDelete]
	@PID int
AS

DELETE FROM [dbo].[ZL_PrintType]
WHERE
	[PID] = @PID

GO


CREATE PROCEDURE [dbo].[PR_PrintType_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_PrintType]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_PrintType_GetSelect]
	@PID int
AS

SELECT
	[PID],
	[P_Name],
	[P_Ream],
	[P_PicLocality],
	[P_AddTime],
	[P_Mask],
	[P_MaskUrl],
	[P_Proportion],
	[P_ShopID],
	[P_ShopType]
FROM
	[dbo].[ZL_PrintType]
WHERE
	[PID] = @PID

GO


CREATE PROCEDURE [dbo].[PR_PrintType_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_PrintType]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_PrintType_Select_All]
AS


SELECT
	[PID],
	[P_Name],
	[P_Ream],
	[P_PicLocality],
	[P_AddTime],
	[P_Mask],
	[P_MaskUrl],
	[P_Proportion],
	[P_ShopID],
	[P_ShopType]
FROM
	[dbo].[ZL_PrintType]

GO

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Print](
	[P_ID] [int] IDENTITY(1,1) NOT NULL,
	[P_Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[P_UserID] [int] NULL,
	[P_Type_ID] [int] NULL,
	[P_Ream] [text] COLLATE Chinese_PRC_CI_AS NULL,
	[P_PID] [int] NULL,
	[P_AddTime] [datetime] NULL,
	[P_State] [int] NULL,
	[P_PrintUrl] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'作品名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_UserID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'打印类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_Type_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'合成内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_Ream'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商品ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_PID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_AddTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态 1，为打印，2为已打印' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_State'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'已生成打印文件' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Print', @level2type=N'COLUMN', @level2name=N'P_PrintUrl'
GO

IF OBJECT_ID(N'[dbo].[PR_Print_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_Print_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_Print_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_Print_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_Print_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_Print_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_Print_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_Print_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Print_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_Print_GetInsert]
	@P_Name nvarchar(50),
	@P_UserID int,
	@P_Type_ID int,
	@P_Ream text,
	@P_PID int,
	@P_AddTime datetime,
	@P_State int,
	@P_PrintUrl nvarchar(1000),
	@P_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_Print] (
	[P_Name],
	[P_UserID],
	[P_Type_ID],
	[P_Ream],
	[P_PID],
	[P_AddTime],
	[P_State],
	[P_PrintUrl]
) VALUES (
	@P_Name,
	@P_UserID,
	@P_Type_ID,
	@P_Ream,
	@P_PID,
	@P_AddTime,
	@P_State,
	@P_PrintUrl
)

SET @P_ID = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_Print_GetUpdate]
	@P_ID int,
	@P_Name nvarchar(50),
	@P_UserID int,
	@P_Type_ID int,
	@P_Ream text,
	@P_PID int,
	@P_AddTime datetime,
	@P_State int,
	@P_PrintUrl nvarchar(1000)
AS

UPDATE [dbo].[ZL_Print] SET
	[P_Name] = @P_Name,
	[P_UserID] = @P_UserID,
	[P_Type_ID] = @P_Type_ID,
	[P_Ream] = @P_Ream,
	[P_PID] = @P_PID,
	[P_AddTime] = @P_AddTime,
	[P_State] = @P_State,
	[P_PrintUrl] = @P_PrintUrl
WHERE
	[P_ID] = @P_ID

GO


CREATE PROCEDURE [dbo].[PR_Print_InsertUpdate]
	@P_ID int,
	@P_Name nvarchar(50),
	@P_UserID int,
	@P_Type_ID int,
	@P_Ream text,
	@P_PID int,
	@P_AddTime datetime,
	@P_State int,
	@P_PrintUrl nvarchar(1000)
AS

IF EXISTS(SELECT [P_ID] FROM [dbo].[ZL_Print] WHERE [P_ID] = @P_ID)
BEGIN
	UPDATE [dbo].[ZL_Print] SET
		[P_Name] = @P_Name,
		[P_UserID] = @P_UserID,
		[P_Type_ID] = @P_Type_ID,
		[P_Ream] = @P_Ream,
		[P_PID] = @P_PID,
		[P_AddTime] = @P_AddTime,
		[P_State] = @P_State,
		[P_PrintUrl] = @P_PrintUrl
	WHERE
		[P_ID] = @P_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Print] (	
	[P_Name],
	[P_UserID],
	[P_Type_ID],
	[P_Ream],
	[P_PID],
	[P_AddTime],
	[P_State],
	[P_PrintUrl]
	) VALUES (
	@P_Name,
	@P_UserID,
	@P_Type_ID,
	@P_Ream,
	@P_PID,
	@P_AddTime,
	@P_State,
	@P_PrintUrl
	)

END

GO


CREATE PROCEDURE [dbo].[PR_Print_GetDelete]
	@P_ID int
AS

DELETE FROM [dbo].[ZL_Print]
WHERE
	[P_ID] = @P_ID

GO


CREATE PROCEDURE [dbo].[PR_Print_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_Print]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Print_GetSelect]
	@P_ID int
AS

SELECT
	[P_ID],
	[P_Name],
	[P_UserID],
	[P_Type_ID],
	[P_Ream],
	[P_PID],
	[P_AddTime],
	[P_State],
	[P_PrintUrl]
FROM
	[dbo].[ZL_Print]
WHERE
	[P_ID] = @P_ID

GO


CREATE PROCEDURE [dbo].[PR_Print_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Print]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Print_Select_All]
AS


SELECT
	[P_ID],
	[P_Name],
	[P_UserID],
	[P_Type_ID],
	[P_Ream],
	[P_PID],
	[P_AddTime],
	[P_State],
	[P_PrintUrl]
FROM
	[dbo].[ZL_Print]

GO


--2009-5.27
--开发者：甘小菊
--开发时间:20059.5.21
--功能说明：为批量导入数据新建模板时动态添内容和创建表
--	   新建模板添加内容到zl_model/字段加入zl_modelField/根据字段创建内容表
-- select * from ZL_ModelField where modelid=121
-- 
-- select * from zl_model
-- 
-- select * from zl_c_0521

-- select * from ZL_ModelField
-- delete from t_m
-- delete from filed
-- select * from t_m
-- select * from filed
--select * from 表1
--select * into t_m from ZL_Model where 1=2
--exec PR_ModelField_Single_NewTable 1,'测试6','lz_c_测试6','a;b;c;d',''
--USE zoomla
IF EXISTS (SELECT name FROM sysobjects 
         WHERE name = 'PR_ModelField_Single_NewTable' AND type = 'P')
   DROP PROCEDURE PR_ModelField_Single_NewTable
GO

create PROCEDURE PR_ModelField_Single_NewTable
@NodeID int,
@ModelName NVarChar(50),
@TableName nvarchar(50),
@FieldNames nvarchar(1000) ,--接收以分号分隔的字段名称
@FieldAliass nvarchar(1000)--接收以分号分隔的字段描述 此功能暂未开发
--@FieldTypes nvarchar(50)--统一字段类型nvarchar 255 TextType
AS

select * from ZL_Model
	declare @ModelID int
	INSERT INTO 
	[ZL_Model] 
	(  
		[ModelName],  
		[TableName],
		ItemName,
	 	ModelType,
	        MultiFlag,
		ItemIcon
		)
		VALUES
		(
		@ModelName,	
		@TableName,
		@ModelName,
		1,1,'Default.gif'
		)
	
	--获取模型id
	select @ModelID = @@identity

	--更新此模型与Node的关联
	update zl_Node set contentmodel=
	case contentmodel when '' then cast(@ModelID as varchar(10))
		else contentmodel+','+cast(@ModelID as varchar(10)) end
	where nodeid=@NodeID
	
	declare @fieldname   varchar(50),   
		@s_point   int,   
		@t_point   int,   
		--@t   int,
		@fieldnamesublen   int,
		@pos   int   
    
	--临时变量   
	select @s_point=0,@t_point=0,@pos=0
	--获取第一个值
	select   @t_point=charindex(';',@fieldNames,@s_point) 

	--存储创建表sql语句的变量
	declare @creatTable nvarchar(1000)
	set @creatTable = N'CREATE TABLE dbo.'+ @TableName+' ([ID] [int] IDENTITY (1, 1) PRIMARY Key'

	while(1=1)
	begin
		if @t_point>0
		begin
			set   @fieldnamesublen=@t_point-@s_point
			set   @fieldname=rtrim(ltrim(substring(@fieldNames,@s_point,@fieldnamesublen)))
			--insert   filed(modelid,fieldname,FieldAlias,FieldType)  values(@modelId,@fieldname,@fieldname,'textType')
		end
		else
		begin
			set   @fieldnamesublen=datalength(@fieldNames)-@t_point+1
			set   @fieldname=rtrim(ltrim(substring(@fieldNames,@s_point,@fieldnamesublen)))
			--insert   filed(modelid,fieldname,FieldAlias,FieldType)  values(@modelId,@fieldname,@fieldname,'textType')
		
		end
		insert into  ZL_ModelField(modelid,fieldname,FieldAlias,FieldType,content)  values(@modelId,@fieldname,@fieldname,'TextType','TitleSize=35,IsPassword=text,DefaultValue=')
		set @creatTable = @creatTable + N',' +  @fieldname + N' nvarchar(255)' 	
		if   @t_point<=0	
	 		goto tend
	-- 	
	 	select   @s_point=@t_point+1
	 	select   @t_point=charindex(';',@fieldNames,@s_point)
		
	end 
	    tend:
	 	set @creatTable = @creatTable + N')'
		execute sp_executesql @creatTable
	return @ModelID
--add6-1
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_UnionInfo]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_UnionInfo](
	[U_ID] [int] IDENTITY(1,1) NOT NULL,
	[MainID] [int] NULL,
	[ChildID] [int] NULL,
	[GFID] [int] NULL,
	[FType] [int] NULL,
	[ISTYPE] [int] NULL,
	[addtime] [datetime] NULL,
	[SID] [int] NULL CONSTRAINT [DF_ZL_UnionInfo_SID]  DEFAULT (0),
 CONSTRAINT [PK_ZL_UnionInfo] PRIMARY KEY CLUSTERED 
(
	[U_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'主站节点ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UnionInfo', @level2type=N'COLUMN', @level2name=N'MainID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'主站节点ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UnionInfo', @level2type=N'COLUMN', @level2name=N'ChildID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'方案ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UnionInfo', @level2type=N'COLUMN', @level2name=N'GFID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'方案类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UnionInfo', @level2type=N'COLUMN', @level2name=N'FType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型1节点，2方案，3模型,4文章id,5标签ID,6子站节点，7子站模型,8子站文章id,9子站标签ID,10从表ID.11子站从表ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UnionInfo', @level2type=N'COLUMN', @level2name=N'ISTYPE'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站站点ID,主站ID为0' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UnionInfo', @level2type=N'COLUMN', @level2name=N'SID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_UnionInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_GetInsert]
	@S_ID int,
	@SiteIP nvarchar(255),
	@SiteAccount nvarchar(255),
	@SitePas nvarchar(500),
	@addTime datetime,
	@endTime datetime,
	@states int,
	@PasType int,
	@Pas nvarchar(500),
	@P_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_SitePas] (
	[S_ID],
	[SiteIP],
	[SiteAccount],
	[SitePas],
	[addTime],
	[endTime],
	[states],
	[PasType],
	[Pas]
) VALUES (
	@S_ID,
	@SiteIP,
	@SiteAccount,
	@SitePas,
	@addTime,
	@endTime,
	@states,
	@PasType,
	@Pas
)

SET @P_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_GetUpdate]
	@P_ID int,
	@S_ID int,
	@SiteIP nvarchar(255),
	@SiteAccount nvarchar(255),
	@SitePas nvarchar(500),
	@addTime datetime,
	@endTime datetime,
	@states int,
	@PasType int,
	@Pas nvarchar(500)
AS

UPDATE [dbo].[ZL_SitePas] SET
	[S_ID] = @S_ID,
	[SiteIP] = @SiteIP,
	[SiteAccount] = @SiteAccount,
	[SitePas] = @SitePas,
	[addTime] = @addTime,
	[endTime] = @endTime,
	[states] = @states,
	[PasType] = @PasType,
	[Pas] = @Pas
WHERE
	[P_ID] = @P_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_InsertUpdate]
	@P_ID int,
	@S_ID int,
	@SiteIP nvarchar(255),
	@SiteAccount nvarchar(255),
	@SitePas nvarchar(500),
	@addTime datetime,
	@endTime datetime,
	@states int,
	@PasType int,
	@Pas nvarchar(500)
AS

IF EXISTS(SELECT [P_ID] FROM [dbo].[ZL_SitePas] WHERE [P_ID] = @P_ID)
BEGIN
	UPDATE [dbo].[ZL_SitePas] SET
		[S_ID] = @S_ID,
		[SiteIP] = @SiteIP,
		[SiteAccount] = @SiteAccount,
		[SitePas] = @SitePas,
		[addTime] = @addTime,
		[endTime] = @endTime,
		[states] = @states,
		[PasType] = @PasType,
		[Pas] = @Pas
	WHERE
		[P_ID] = @P_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SitePas] (	
	[S_ID],
	[SiteIP],
	[SiteAccount],
	[SitePas],
	[addTime],
	[endTime],
	[states],
	[PasType],
	[Pas]
	) VALUES (
	@S_ID,
	@SiteIP,
	@SiteAccount,
	@SitePas,
	@addTime,
	@endTime,
	@states,
	@PasType,
	@Pas
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_GetDelete]
	@P_ID int
AS

DELETE FROM [dbo].[ZL_SitePas]
WHERE
	[P_ID] = @P_ID

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_pagelistContent]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_pagelistContent]
@tablename nvarchar(50),
@fieldname nvarchar(50)=''*'',
@pagesize int,--每页显示记录条数
@currentpage int,--第几页
@GeneralIDs  nvarchar(500),--ids
@orderid nvarchar(50),--主键排序
@sort int,--排序方式，1表示升序，0表示降序排列
@rowcount int output,--总记录数，共有几条信息
@pagecount int output--总页数，共有多少页

AS
declare @countsql nvarchar(4000)
declare @sql nvarchar(4000)
declare @subsql nvarchar(4000)--not in子sql语句
declare @tmpOrderid nvarchar(50)
--返回总记录数，并赋值给输出参数@rowcount



set @countsql=''select @totalcount=count(*) from ''+@tablename +'' where ''+@orderid+''  in (''+@GeneralIDs+'' )''
exec sp_executesql @countsql,N''@totalcount int out'',@rowcount output

--判断字段名是否为空
if @fieldname is null or @fieldname=''''
set @fieldname='' * ''

--判断是否排序及排序方式
if @orderid is null or @orderid=''''
set @tmpOrderid='' ''
else
begin
if @sort=0
set @tmpOrderid=''order by ''+@orderid+'' desc''
else
set @tmpOrderid=''order by ''+@orderid+'' asc''
end

--计算页数
if @rowcount%@pagesize>0
set @pagecount =(@rowcount/@pagesize)+1;
else
set @pagecount=@rowcount/@pagesize;

--分页算法实现
set @subsql=''select top''+str(@pagesize*(@currentpage-1))+'' ''+@orderid+'' from ''+@tablename+''  where  ''+@orderid+''  in ( ''+@GeneralIDs+'')''+'' ''+@tmpOrderid
set @sql=''select top''+str(@pagesize)+'' ''+@fieldname+'' from ''+@tablename+'' where ''+@orderid+'' not in (''+@subsql+'')''+''''+'' and ''+@orderid+''  in ( ''+@GeneralIDs+'')''+'' ''+@tmpOrderid
exec(@sql)' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SitePas]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_GetSelect]
	@P_ID int
AS

SELECT
	[P_ID],
	[S_ID],
	[SiteIP],
	[SiteAccount],
	[SitePas],
	[addTime],
	[endTime],
	[states],
	[PasType],
	[Pas]
FROM
	[dbo].[ZL_SitePas]
WHERE
	[P_ID] = @P_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_UnionInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SiteInfoXMl]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SiteInfoXMl]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SitePas]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SitePa_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SitePa_Select_All]
AS


SELECT
	[P_ID],
	[S_ID],
	[SiteIP],
	[SiteAccount],
	[SitePas],
	[addTime],
	[endTime],
	[states],
	[PasType],
	[Pas]
FROM
	[dbo].[ZL_SitePas]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SiteChild]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SiteChild](
	[S_ID] [int] IDENTITY(1,1) NOT NULL,
	[SiteNum] [nvarchar](1000) NULL,
	[SiteName] [nvarchar](255) NULL,
	[Pname] [nvarchar](255) NULL,
	[tel] [nvarchar](255) NULL,
	[SiteAdd] [nvarchar](500) NULL,
	[states] [int] NULL,
 CONSTRAINT [PK_ZL_SiteChild] PRIMARY KEY CLUSTERED 
(
	[S_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站账号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteChild', @level2type=N'COLUMN', @level2name=N'SiteNum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteChild', @level2type=N'COLUMN', @level2name=N'SiteName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'站长名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteChild', @level2type=N'COLUMN', @level2name=N'Pname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'联系地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteChild', @level2type=N'COLUMN', @level2name=N'SiteAdd'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'密匙状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteChild', @level2type=N'COLUMN', @level2name=N'states'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SendList]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SendList]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_SiteChild]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_Program]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_Program](
	[F_ID] [int] IDENTITY(1,1) NOT NULL,
	[Fname] [nvarchar](50) NULL,
	[ArticleS] [nvarchar](4000) NULL,
	[SID] [nvarchar](4000) NULL,
	[IsOpen] [int] NULL,
	[addTime] [datetime] NULL,
	[endTime] [datetime] NULL,
	[Type] [int] NULL,
	[orderid] [int] NULL,
	[isGO] [int] NULL,
	[sendType] [int] NULL,
	[SiteNode] [nvarchar](2000) NULL,
 CONSTRAINT [PK_ZL_Program] PRIMARY KEY CLUSTERED 
(
	[F_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'方案名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'Fname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'文章ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'ArticleS'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'SID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型1文章，2节点，3标签，4模型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'Type'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'权重数字越大优先级越高' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'orderid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站是否以获取' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'isGO'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发送方式' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'sendType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站节点' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Program', @level2type=N'COLUMN', @level2name=N'SiteNode'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SiteInfoXMl]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SiteInfoXMl](
	[X_ID] [int] IDENTITY(1,1) NOT NULL,
	[Xcontent] [ntext] NULL,
	[Xaddtime] [datetime] NULL CONSTRAINT [DF_ZL_SiteInfoXMl_addtime]  DEFAULT (getdate()),
	[Xtype] [int] NULL CONSTRAINT [DF_ZL_SiteInfoXMl_Xtype]  DEFAULT (0),
	[XISGO] [int] NULL CONSTRAINT [DF_ZL_SiteInfoXMl_ISGO]  DEFAULT (0),
	[orderid] [int] NULL,
	[Xendtime] [datetime] NULL,
	[FID] [int] NULL,
	[SID] [int] NULL CONSTRAINT [DF_ZL_SiteInfoXMl_SID]  DEFAULT (0),
	[GID] [int] NULL,
 CONSTRAINT [PK_ZL_SiteInfoXMl] PRIMARY KEY CLUSTERED 
(
	[X_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'xml内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'Xcontent'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'Xaddtime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'xml信息类型类型1文章，2节点，3标签，4模型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'Xtype'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否导入' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'XISGO'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'权重：数字越大优先级越高' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'orderid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'处理时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'Xendtime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'方案ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'FID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站站点ID,主站ID为0' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'SID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'传送过来的信息id' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SiteInfoXMl', @level2type=N'COLUMN', @level2name=N'GID'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_pagelistProgram]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_pagelistProgram]
@tablename nvarchar(50),
@fieldname nvarchar(50)=''*'',
@pagesize int,--每页显示记录条数
@currentpage int,--第几页
@sid  nvarchar(200),--ids
@orderid nvarchar(50),--主键排序
@sort int,--排序方式，1表示升序，0表示降序排列
@rowcount int output,--总记录数，共有几条信息
@pagecount int output--总页数，共有多少页

AS
declare @countsql nvarchar(4000)
declare @sql nvarchar(4000)
declare @subsql nvarchar(4000)--not in子sql语句
declare @tmpOrderid nvarchar(50)
--返回总记录数，并赋值给输出参数@rowcount



set @countsql=''select @totalcount=count(*) from ''+@tablename+'' where  ''+@sid
exec sp_executesql @countsql,N''@totalcount int out'',@rowcount output

--判断字段名是否为空
if @fieldname is null or @fieldname=''''
set @fieldname='' * ''

--判断是否排序及排序方式
if @orderid is null or @orderid=''''
set @tmpOrderid='' ''
else
begin
if @sort=0
set @tmpOrderid=''order by ''+@orderid+'' desc''
else
set @tmpOrderid=''order by ''+@orderid+'' asc''
end

--计算页数
if @rowcount%@pagesize>0
set @pagecount =(@rowcount/@pagesize)+1;
else
set @pagecount=@rowcount/@pagesize;

--分页算法实现
set @subsql=''select top''+str(@pagesize*(@currentpage-1))+'' ''+@orderid+'' from ''+@tablename+'' where ''+@sid
set @sql=''select top''+str(@pagesize)+'' ''+@fieldname+'' from ''+@tablename+'' where ''+@orderid+'' not in (''+@subsql+'')''+'' and ''+@sid+'' ''+@tmpOrderid
exec(@sql)' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SendList]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SendList](
	[L_ID] [int] IDENTITY(1,1) NOT NULL,
	[L_Class] [int] NULL,
	[LC_ID] [int] NULL,
	[Success] [int] NULL,
	[SendType] [int] NULL,
	[SendTime] [datetime] NULL,
	[SendNum] [int] NULL,
	[SendOrder] [int] NULL,
	[PID] [int] NULL,
	[SID] [int] NULL,
	[Arites] [nvarchar](4000) NULL CONSTRAINT [DF_ZL_SendList_Arites]  DEFAULT (0),
 CONSTRAINT [PK_ZL_SendList] PRIMARY KEY CLUSTERED 
(
	[L_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'自增长编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'L_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型，1：文章，2：节点，3：标签，4：模型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'L_Class'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'对应ID L_Class为1，该列则为文章ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'LC_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'0：未发送，1：已发送等待回复，2：成功，3：失败' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'Success'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发送类型 1：强制发送，0：意愿发送' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'SendType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'SendTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发送次数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'SendNum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'队列优先级' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'SendOrder'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'方案ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'PID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'SID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站请求信息ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SendList', @level2type=N'COLUMN', @level2name=N'Arites'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_SiteChild]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Program]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Program]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_pagelist]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_pagelist]
@tablename nvarchar(50),
@fieldname nvarchar(50)=''*'',
@pagesize int,--每页显示记录条数
@currentpage int,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式，1表示升序，0表示降序排列
@nodeid  int,--主键排序
@rowcount int output,--总记录数，共有几条信息
@pagecount int output--总页数，共有多少页

AS
declare @countsql nvarchar(50)
declare @sql nvarchar(400)
declare @subsql nvarchar(110)--not in子sql语句
declare @tmpOrderid nvarchar(50)
--返回总记录数，并赋值给输出参数@rowcount



set @countsql=''select @totalcount=count(*) from ''+@tablename +''  where nodeid=@nodeid''
exec sp_executesql @countsql,N''@totalcount int out'',@rowcount output

--判断字段名是否为空
if @fieldname is null or @fieldname=''''
set @fieldname='' * ''

--判断是否排序及排序方式
if @orderid is null or @orderid=''''
set @tmpOrderid='' ''
else
begin
if @sort=0
set @tmpOrderid=''order by ''+@orderid+'' desc''
else
set @tmpOrderid=''order by ''+@orderid+'' asc''
end

--计算页数
if @rowcount%@pagesize>0
set @pagecount =(@rowcount/@pagesize)+1;
else
set @pagecount=@rowcount/@pagesize;

--分页算法实现
set @subsql=''select top''+str(@pagesize*(@currentpage-1))+'' ''+@orderid+'' from ''+@tablename+''  where nodeid= ''+str(@nodeid)+@tmpOrderid
set @sql=''select top''+str(@pagesize)+'' ''+@fieldname+'' from ''+@tablename+'' where ''+@orderid+'' not in (''+@subsql+'')''+''''+'' and nodeid=''+str(@nodeid)+''''+@tmpOrderid
exec(@sql)' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SitePas]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SitePas](
	[P_ID] [int] IDENTITY(1,1) NOT NULL,
	[S_ID] [int] NULL,
	[SiteIP] [nvarchar](255) NULL,
	[SiteAccount] [nvarchar](255) NULL,
	[SitePas] [nvarchar](500) NULL,
	[addTime] [datetime] NULL,
	[endTime] [datetime] NULL,
	[states] [int] NULL,
	[PasType] [int] NULL,
	[Pas] [nvarchar](500) NULL,
 CONSTRAINT [PK_ZL_SitePas] PRIMARY KEY CLUSTERED 
(
	[P_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站id' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'S_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站IP' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'SiteIP'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站账号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'SiteAccount'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'子站密码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'SitePas'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'addTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'到期时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'endTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'states'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'加密方式' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'PasType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'密钥' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_SitePas', @level2type=N'COLUMN', @level2name=N'Pas'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_GetSelect]
	@U_ID int
AS

SELECT
	[U_ID],
	[MainID],
	[ChildID],
	[GFID],
	[FType],
	[ISTYPE],
	[addtime],
	[SID]
FROM
	[dbo].[ZL_UnionInfo]
WHERE
	[U_ID] = @U_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_Select_All]
AS


SELECT
	[U_ID],
	[MainID],
	[ChildID],
	[GFID],
	[FType],
	[ISTYPE],
	[addtime],
	[SID]
FROM
	[dbo].[ZL_UnionInfo]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_GetInsert]
	@MainID int,
	@ChildID int,
	@GFID int,
	@FType int,
	@ISTYPE int,
	@addtime datetime,
	@SID int,
	@U_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_UnionInfo] (
	[MainID],
	[ChildID],
	[GFID],
	[FType],
	[ISTYPE],
	[addtime],
	[SID]
) VALUES (
	@MainID,
	@ChildID,
	@GFID,
	@FType,
	@ISTYPE,
	@addtime,
	@SID
)

SET @U_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_GetUpdate]
	@U_ID int,
	@MainID int,
	@ChildID int,
	@GFID int,
	@FType int,
	@ISTYPE int,
	@addtime datetime,
	@SID int
AS

UPDATE [dbo].[ZL_UnionInfo] SET
	[MainID] = @MainID,
	[ChildID] = @ChildID,
	[GFID] = @GFID,
	[FType] = @FType,
	[ISTYPE] = @ISTYPE,
	[addtime] = @addtime,
	[SID] = @SID
WHERE
	[U_ID] = @U_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_InsertUpdate]
	@U_ID int,
	@MainID int,
	@ChildID int,
	@GFID int,
	@FType int,
	@ISTYPE int,
	@addtime datetime,
	@SID int
AS

IF EXISTS(SELECT [U_ID] FROM [dbo].[ZL_UnionInfo] WHERE [U_ID] = @U_ID)
BEGIN
	UPDATE [dbo].[ZL_UnionInfo] SET
		[MainID] = @MainID,
		[ChildID] = @ChildID,
		[GFID] = @GFID,
		[FType] = @FType,
		[ISTYPE] = @ISTYPE,
		[addtime] = @addtime,
		[SID] = @SID
	WHERE
		[U_ID] = @U_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_UnionInfo] (	
	[MainID],
	[ChildID],
	[GFID],
	[FType],
	[ISTYPE],
	[addtime],
	[SID]
	) VALUES (
	@MainID,
	@ChildID,
	@GFID,
	@FType,
	@ISTYPE,
	@addtime,
	@SID
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_UnionInfo_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_UnionInfo_GetDelete]
	@U_ID int
AS

DELETE FROM [dbo].[ZL_UnionInfo]
WHERE
	[U_ID] = @U_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_InsertUpdate]
	@S_ID int,
	@SiteNum nvarchar(1000),
	@SiteName nvarchar(255),
	@Pname nvarchar(255),
	@tel nvarchar(255),
	@SiteAdd nvarchar(500),
	@states int
AS

IF EXISTS(SELECT [S_ID] FROM [dbo].[ZL_SiteChild] WHERE [S_ID] = @S_ID)
BEGIN
	UPDATE [dbo].[ZL_SiteChild] SET
		[SiteNum] = @SiteNum,
		[SiteName] = @SiteName,
		[Pname] = @Pname,
		[tel] = @tel,
		[SiteAdd] = @SiteAdd,
		[states] = @states
	WHERE
		[S_ID] = @S_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SiteChild] (	
	[SiteNum],
	[SiteName],
	[Pname],
	[tel],
	[SiteAdd],
	[states]
	) VALUES (
	@SiteNum,
	@SiteName,
	@Pname,
	@tel,
	@SiteAdd,
	@states
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_GetInsert]
	@SiteNum nvarchar(1000),
	@SiteName nvarchar(255),
	@Pname nvarchar(255),
	@tel nvarchar(255),
	@SiteAdd nvarchar(500),
	@states int,
	@S_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_SiteChild] (
	[SiteNum],
	[SiteName],
	[Pname],
	[tel],
	[SiteAdd],
	[states]
) VALUES (
	@SiteNum,
	@SiteName,
	@Pname,
	@tel,
	@SiteAdd,
	@states
)

SET @S_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_Select_All]
AS


SELECT
	[S_ID],
	[SiteNum],
	[SiteName],
	[Pname],
	[tel],
	[SiteAdd],
	[states]
FROM
	[dbo].[ZL_SiteChild]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_GetSelect]
	@S_ID int
AS

SELECT
	[S_ID],
	[SiteNum],
	[SiteName],
	[Pname],
	[tel],
	[SiteAdd],
	[states]
FROM
	[dbo].[ZL_SiteChild]
WHERE
	[S_ID] = @S_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_GetUpdate]
	@S_ID int,
	@SiteNum nvarchar(1000),
	@SiteName nvarchar(255),
	@Pname nvarchar(255),
	@tel nvarchar(255),
	@SiteAdd nvarchar(500),
	@states int
AS

UPDATE [dbo].[ZL_SiteChild] SET
	[SiteNum] = @SiteNum,
	[SiteName] = @SiteName,
	[Pname] = @Pname,
	[tel] = @tel,
	[SiteAdd] = @SiteAdd,
	[states] = @states
WHERE
	[S_ID] = @S_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteChild_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_SiteChild_GetDelete]
	@S_ID int
AS

DELETE FROM [dbo].[ZL_SiteChild]
WHERE
	[S_ID] = @S_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_GetSelect]
	@L_ID int
AS

SELECT
	[L_ID],
	[L_Class],
	[LC_ID],
	[Success],
	[SendType],
	[SendTime],
	[SendNum],
	[SendOrder],
	[PID],
	[SID],
	[Arites]
FROM
	[dbo].[ZL_SendList]
WHERE
	[L_ID] = @L_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_Select_All]
AS


SELECT
	[L_ID],
	[L_Class],
	[LC_ID],
	[Success],
	[SendType],
	[SendTime],
	[SendNum],
	[SendOrder],
	[PID],
	[SID],
	[Arites]
FROM
	[dbo].[ZL_SendList]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_GetDelete]
	@L_ID int
AS

DELETE FROM [dbo].[ZL_SendList]
WHERE
	[L_ID] = @L_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_InsertUpdate]
	@L_ID int,
	@L_Class int,
	@LC_ID int,
	@Success int,
	@SendType int,
	@SendTime datetime,
	@SendNum int,
	@SendOrder int,
	@PID int,
	@SID int,
	@Arites nvarchar(4000)
AS

IF EXISTS(SELECT [L_ID] FROM [dbo].[ZL_SendList] WHERE [L_ID] = @L_ID)
BEGIN
	UPDATE [dbo].[ZL_SendList] SET
		[L_Class] = @L_Class,
		[LC_ID] = @LC_ID,
		[Success] = @Success,
		[SendType] = @SendType,
		[SendTime] = @SendTime,
		[SendNum] = @SendNum,
		[SendOrder] = @SendOrder,
		[PID] = @PID,
		[SID] = @SID,
		[Arites] = @Arites
	WHERE
		[L_ID] = @L_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SendList] (	
	[L_Class],
	[LC_ID],
	[Success],
	[SendType],
	[SendTime],
	[SendNum],
	[SendOrder],
	[PID],
	[SID],
	[Arites]
	) VALUES (
	@L_Class,
	@LC_ID,
	@Success,
	@SendType,
	@SendTime,
	@SendNum,
	@SendOrder,
	@PID,
	@SID,
	@Arites
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_GetUpdate]
	@L_ID int,
	@L_Class int,
	@LC_ID int,
	@Success int,
	@SendType int,
	@SendTime datetime,
	@SendNum int,
	@SendOrder int,
	@PID int,
	@SID int,
	@Arites nvarchar(4000)
AS

UPDATE [dbo].[ZL_SendList] SET
	[L_Class] = @L_Class,
	[LC_ID] = @LC_ID,
	[Success] = @Success,
	[SendType] = @SendType,
	[SendTime] = @SendTime,
	[SendNum] = @SendNum,
	[SendOrder] = @SendOrder,
	[PID] = @PID,
	[SID] = @SID,
	[Arites] = @Arites
WHERE
	[L_ID] = @L_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SendList_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SendList_GetInsert]
	@L_Class int,
	@LC_ID int,
	@Success int,
	@SendType int,
	@SendTime datetime,
	@SendNum int,
	@SendOrder int,
	@PID int,
	@SID int,
	@Arites nvarchar(4000),
	@L_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_SendList] (
	[L_Class],
	[LC_ID],
	[Success],
	[SendType],
	[SendTime],
	[SendNum],
	[SendOrder],
	[PID],
	[SID],
	[Arites]
) VALUES (
	@L_Class,
	@LC_ID,
	@Success,
	@SendType,
	@SendTime,
	@SendNum,
	@SendOrder,
	@PID,
	@SID,
	@Arites
)

SET @L_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_GetInsert]
	@Fname nvarchar(50),
	@ArticleS nvarchar(4000),
	@SID nvarchar(4000),
	@IsOpen int,
	@addTime datetime,
	@endTime datetime,
	@Type int,
	@orderid int,
	@isGO int,
	@sendType int,
	@SiteNode nvarchar(2000),
	@F_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_Program] (
	[Fname],
	[ArticleS],
	[SID],
	[IsOpen],
	[addTime],
	[endTime],
	[Type],
	[orderid],
	[isGO],
	[sendType],
	[SiteNode]
) VALUES (
	@Fname,
	@ArticleS,
	@SID,
	@IsOpen,
	@addTime,
	@endTime,
	@Type,
	@orderid,
	@isGO,
	@sendType,
	@SiteNode
)

SET @F_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_GetUpdate]
	@F_ID int,
	@Fname nvarchar(50),
	@ArticleS nvarchar(4000),
	@SID nvarchar(4000),
	@IsOpen int,
	@addTime datetime,
	@endTime datetime,
	@Type int,
	@orderid int,
	@isGO int,
	@sendType int,
	@SiteNode nvarchar(2000)
AS

UPDATE [dbo].[ZL_Program] SET
	[Fname] = @Fname,
	[ArticleS] = @ArticleS,
	[SID] = @SID,
	[IsOpen] = @IsOpen,
	[addTime] = @addTime,
	[endTime] = @endTime,
	[Type] = @Type,
	[orderid] = @orderid,
	[isGO] = @isGO,
	[sendType] = @sendType,
	[SiteNode] = @SiteNode
WHERE
	[F_ID] = @F_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_InsertUpdate]
	@F_ID int,
	@Fname nvarchar(50),
	@ArticleS nvarchar(4000),
	@SID nvarchar(4000),
	@IsOpen int,
	@addTime datetime,
	@endTime datetime,
	@Type int,
	@orderid int,
	@isGO int,
	@sendType int,
	@SiteNode nvarchar(2000)
AS

IF EXISTS(SELECT [F_ID] FROM [dbo].[ZL_Program] WHERE [F_ID] = @F_ID)
BEGIN
	UPDATE [dbo].[ZL_Program] SET
		[Fname] = @Fname,
		[ArticleS] = @ArticleS,
		[SID] = @SID,
		[IsOpen] = @IsOpen,
		[addTime] = @addTime,
		[endTime] = @endTime,
		[Type] = @Type,
		[orderid] = @orderid,
		[isGO] = @isGO,
		[sendType] = @sendType,
		[SiteNode] = @SiteNode
	WHERE
		[F_ID] = @F_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Program] (	
	[Fname],
	[ArticleS],
	[SID],
	[IsOpen],
	[addTime],
	[endTime],
	[Type],
	[orderid],
	[isGO],
	[sendType],
	[SiteNode]
	) VALUES (
	@Fname,
	@ArticleS,
	@SID,
	@IsOpen,
	@addTime,
	@endTime,
	@Type,
	@orderid,
	@isGO,
	@sendType,
	@SiteNode
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_GetDelete]
	@F_ID int
AS

DELETE FROM [dbo].[ZL_Program]
WHERE
	[F_ID] = @F_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_GetSelect]
	@F_ID int
AS

SELECT
	[F_ID],
	[Fname],
	[ArticleS],
	[SID],
	[IsOpen],
	[addTime],
	[endTime],
	[Type],
	[orderid],
	[isGO],
	[sendType],
	[SiteNode]
FROM
	[dbo].[ZL_Program]
WHERE
	[F_ID] = @F_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Program_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_Program_Select_All]
AS


SELECT
	[F_ID],
	[Fname],
	[ArticleS],
	[SID],
	[IsOpen],
	[addTime],
	[endTime],
	[Type],
	[orderid],
	[isGO],
	[sendType],
	[SiteNode]
FROM
	[dbo].[ZL_Program]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_GetInsert]
	@Xcontent ntext,
	@Xaddtime datetime,
	@Xtype int,
	@XISGO int,
	@orderid int,
	@Xendtime datetime,
	@FID int,
	@SID int,
	@GID int,
	@X_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_SiteInfoXMl] (
	[Xcontent],
	[Xaddtime],
	[Xtype],
	[XISGO],
	[orderid],
	[Xendtime],
	[FID],
	[SID],
	[GID]
) VALUES (
	@Xcontent,
	@Xaddtime,
	@Xtype,
	@XISGO,
	@orderid,
	@Xendtime,
	@FID,
	@SID,
	@GID
)

SET @X_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_GetUpdate]
	@X_ID int,
	@Xcontent ntext,
	@Xaddtime datetime,
	@Xtype int,
	@XISGO int,
	@orderid int,
	@Xendtime datetime,
	@FID int,
	@SID int,
	@GID int
AS

UPDATE [dbo].[ZL_SiteInfoXMl] SET
	[Xcontent] = @Xcontent,
	[Xaddtime] = @Xaddtime,
	[Xtype] = @Xtype,
	[XISGO] = @XISGO,
	[orderid] = @orderid,
	[Xendtime] = @Xendtime,
	[FID] = @FID,
	[SID] = @SID,
	[GID] = @GID
WHERE
	[X_ID] = @X_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_InsertUpdate]
	@X_ID int,
	@Xcontent ntext,
	@Xaddtime datetime,
	@Xtype int,
	@XISGO int,
	@orderid int,
	@Xendtime datetime,
	@FID int,
	@SID int,
	@GID int
AS

IF EXISTS(SELECT [X_ID] FROM [dbo].[ZL_SiteInfoXMl] WHERE [X_ID] = @X_ID)
BEGIN
	UPDATE [dbo].[ZL_SiteInfoXMl] SET
		[Xcontent] = @Xcontent,
		[Xaddtime] = @Xaddtime,
		[Xtype] = @Xtype,
		[XISGO] = @XISGO,
		[orderid] = @orderid,
		[Xendtime] = @Xendtime,
		[FID] = @FID,
		[SID] = @SID,
		[GID] = @GID
	WHERE
		[X_ID] = @X_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_SiteInfoXMl] (	
	[Xcontent],
	[Xaddtime],
	[Xtype],
	[XISGO],
	[orderid],
	[Xendtime],
	[FID],
	[SID],
	[GID]
	) VALUES (
	@Xcontent,
	@Xaddtime,
	@Xtype,
	@XISGO,
	@orderid,
	@Xendtime,
	@FID,
	@SID,
	@GID
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_GetDelete]
	@X_ID int
AS

DELETE FROM [dbo].[ZL_SiteInfoXMl]
WHERE
	[X_ID] = @X_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_Select_All]
AS


SELECT
	[X_ID],
	[Xcontent],
	[Xaddtime],
	[Xtype],
	[XISGO],
	[orderid],
	[Xendtime],
	[FID],
	[SID],
	[GID]
FROM
	[dbo].[ZL_SiteInfoXMl]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_SiteInfoXMl_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE PROCEDURE [dbo].[PR_SiteInfoXMl_GetSelect]
	@X_ID int
AS

SELECT
	[X_ID],
	[Xcontent],
	[Xaddtime],
	[Xtype],
	[XISGO],
	[orderid],
	[Xendtime],
	[FID],
	[SID],
	[GID]
FROM
	[dbo].[ZL_SiteInfoXMl]
WHERE
	[X_ID] = @X_ID

' 
END


--end6-1
-- begin 6-5
IF OBJECT_ID(N'[dbo].[PR_UserBaseField_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_UserBaseField_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_UserBaseField_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_GetInsert]
	@FieldName nvarchar(50),
	@FieldAlias nvarchar(50),
	@FieldTips nvarchar(50),
	@Description nvarchar(255),
	@IsNotNull int,
	@FieldType nvarchar(50),
	@Content ntext,
	@OrderId int,
	@ShowList int,
	@ShowWidth int,
	@NoEdit int,
	@FieldID int OUTPUT
AS

INSERT INTO [dbo].[ZL_UserBaseField] (
	[FieldName],
	[FieldAlias],
	[FieldTips],
	[Description],
	[IsNotNull],
	[FieldType],
	[Content],
	[OrderId],
	[ShowList],
	[ShowWidth],
	[NoEdit]
) VALUES (
	@FieldName,
	@FieldAlias,
	@FieldTips,
	@Description,
	@IsNotNull,
	@FieldType,
	@Content,
	@OrderId,
	@ShowList,
	@ShowWidth,
	@NoEdit
)

SET @FieldID = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_GetUpdate]
	@FieldID int,
	@FieldName nvarchar(50),
	@FieldAlias nvarchar(50),
	@FieldTips nvarchar(50),
	@Description nvarchar(255),
	@IsNotNull int,
	@FieldType nvarchar(50),
	@Content ntext,
	@OrderId int,
	@ShowList int,
	@ShowWidth int,
	@NoEdit int
AS

UPDATE [dbo].[ZL_UserBaseField] SET
	[FieldName] = @FieldName,
	[FieldAlias] = @FieldAlias,
	[FieldTips] = @FieldTips,
	[Description] = @Description,
	[IsNotNull] = @IsNotNull,
	[FieldType] = @FieldType,
	[Content] = @Content,
	[OrderId] = @OrderId,
	[ShowList] = @ShowList,
	[ShowWidth] = @ShowWidth,
	[NoEdit]=@NoEdit
WHERE
	[FieldID] = @FieldID

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_InsertUpdate]
	@FieldID int,
	@FieldName nvarchar(50),
	@FieldAlias nvarchar(50),
	@FieldTips nvarchar(50),
	@Description nvarchar(255),
	@IsNotNull int,
	@FieldType nvarchar(50),
	@Content ntext,
	@OrderId int,
	@ShowList int,
	@ShowWidth int,
	@NoEdit int
AS

IF EXISTS(SELECT [FieldID] FROM [dbo].[ZL_UserBaseField] WHERE [FieldID] = @FieldID)
BEGIN
	UPDATE [dbo].[ZL_UserBaseField] SET
		[FieldName] = @FieldName,
		[FieldAlias] = @FieldAlias,
		[FieldTips] = @FieldTips,
		[Description] = @Description,
		[IsNotNull] = @IsNotNull,
		[FieldType] = @FieldType,
		[Content] = @Content,
		[OrderId] = @OrderId,
		[ShowList] = @ShowList,
		[ShowWidth] = @ShowWidth,
		[NoEdit]=@NoEdit
	WHERE
		[FieldID] = @FieldID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_UserBaseField] (	
	[FieldName],
	[FieldAlias],
	[FieldTips],
	[Description],
	[IsNotNull],
	[FieldType],
	[Content],
	[OrderId],
	[ShowList],
	[ShowWidth],
	[NoEdit]
	) VALUES (
	@FieldName,
	@FieldAlias,
	@FieldTips,
	@Description,
	@IsNotNull,
	@FieldType,
	@Content,
	@OrderId,
	@ShowList,
	@ShowWidth,
	@NoEdit
	)

END

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_GetDelete]
	@FieldID int
AS

DELETE FROM [dbo].[ZL_UserBaseField]
WHERE
	[FieldID] = @FieldID

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_UserBaseField]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_GetSelect]
	@FieldID int
AS

SELECT
	[FieldID],
	[FieldName],
	[FieldAlias],
	[FieldTips],
	[Description],
	[IsNotNull],
	[FieldType],
	[Content],
	[OrderId],
	[ShowList],
	[ShowWidth],
	[NoEdit]
FROM
	[dbo].[ZL_UserBaseField]
WHERE
	[FieldID] = @FieldID

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_UserBaseField]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_UserBaseField_Select_All]
AS


SELECT
	[FieldID],
	[FieldName],
	[FieldAlias],
	[FieldTips],
	[Description],
	[IsNotNull],
	[FieldType],
	[Content],
	[OrderId],
	[ShowList],
	[ShowWidth],
	[NoEdit]
FROM
	[dbo].[ZL_UserBaseField] ORDER BY OrderID

GO



--end 6-5

---add 2009.7.16

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Area](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[gID] [int] NULL,
	[areaName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[serverIP] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[commPort] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[commPwd] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[exchangeScale] [int] NULL,
	[reward] [text] COLLATE Chinese_PRC_CI_AS NULL,
	[GMID] [int] NOT NULL,
	[Sqlstr] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Rules] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[coinName] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[PointMax] [int] NULL ,
	[Condition] [int] NULL ,
 CONSTRAINT [PK_GM_Area] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分区ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属游戏ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'gID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分区名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'areaName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务器IP' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'serverIP'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'端口号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'commPort'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'通讯密钥' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'commPwd'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'GM ID号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'GMID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'执行SQL语句;分割' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'Sqlstr'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'丢单规则' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'Rules'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏币名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'coinName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上限' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'PointMax'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'条件' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Area', @level2type=N'COLUMN', @level2name=N'Condition'

GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Balance](
	[B_ID] [int] IDENTITY(1,1) NOT NULL,
	[userID] [int] NOT NULL,
	[userName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[BalMoney] [money] NULL,
	[BalTime] [datetime] NULL,
	[BalRemark] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[BalCount] [int] NULL,
 CONSTRAINT [PK_GM_Balance] PRIMARY KEY CLUSTERED 
(
	[B_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Balance', @level2type=N'COLUMN', @level2name=N'userID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Balance', @level2type=N'COLUMN', @level2name=N'userName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'本次支付金额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Balance', @level2type=N'COLUMN', @level2name=N'BalMoney'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'本次支付时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Balance', @level2type=N'COLUMN', @level2name=N'BalTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Balance', @level2type=N'COLUMN', @level2name=N'BalRemark'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结算个数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Balance', @level2type=N'COLUMN', @level2name=N'BalCount'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[GM_Buy](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[areaId] [int] NOT NULL,
	[gameId] [int] NOT NULL,
	[userName] [varchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[paySet] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[banlance] [int] NOT NULL,
 CONSTRAINT [PK_GM_Buy] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Card](
	[faceno] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[money] [float] NOT NULL,
 CONSTRAINT [PK_GM_Card] PRIMARY KEY CLUSTERED 
(
	[faceno] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO




SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Game](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[gameName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[gameComy] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[status] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[gTabName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[pointPart] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[GMID] [int] NOT NULL,
	[search] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_GM_Game_search]  DEFAULT (''),
	[Sqlstr] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Doff] [int] NOT NULL CONSTRAINT [DF_GM_Game_Doff]  DEFAULT (0),
	[InOther] [int] NULL,
	[DataBasetxt] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChargeIndex] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[DataBase1] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[searchTable] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[namefiled] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Infiled] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[PointMax] [int] NULL ,
	[Condition] [int] NULL ,
 CONSTRAINT [PK_GM_Game] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'gameName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏公司' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'gameComy'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'status'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏点数所在表名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'gTabName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点数游戏点数所在字段名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'pointPart'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'GMID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'GMID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号或角色字段名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'search'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'执行SQL语句' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'Sqlstr'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'允许掉单' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'Doff'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'充值对象标准' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'ChargeIndex'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'DataBase1'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'主数据库名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'DataBasetxt'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'ID所在字段名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'Infiled'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'名字是否在另一表中' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'InOther'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号或角色字段' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'namefiled'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号或角色所在表名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'searchTable'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上限' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'PointMax'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'条件' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Game', @level2type=N'COLUMN', @level2name=N'Condition'

GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Game_Area](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[aID] [int] NOT NULL,
	[gID] [int] NOT NULL
) ON [PRIMARY]

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Order](
	[OID] [int] NOT NULL,
	[aID] [int] NOT NULL,
	[PLCardID] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[paymentMode] [int] NOT NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单ID号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Order', @level2type=N'COLUMN', @level2name=N'OID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分区ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Order', @level2type=N'COLUMN', @level2name=N'aID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'玩家帐号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Order', @level2type=N'COLUMN', @level2name=N'PLCardID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付方式，每种支付都有它代号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Order', @level2type=N'COLUMN', @level2name=N'paymentMode'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_Pay](
	[PayID] [int] IDENTITY(1,1) NOT NULL,
	[paymentNum] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[payPlatID] [int] NULL,
	[GameID] [int] NULL,
	[AreaID] [int] NULL,
	[CardNum] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[Money] [float] NULL CONSTRAINT [DF_GM_Pay_Money]  DEFAULT (0),
	[IsSend] [int] NULL CONSTRAINT [DF_GM_Pay_IsSend]  DEFAULT (0),
	[IsChange] [int] NULL CONSTRAINT [DF_GM_Pay_IsChange]  DEFAULT (0),
	[GameUser] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[GMID] [int] NULL,
	[Points] [int] NULL,
	[PayTime] [datetime] NULL CONSTRAINT [DF_GM_Pay_PayTime]  DEFAULT (getdate()),
	[GamePort] [int] NULL,
	[GameIP] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Status] [int] NULL CONSTRAINT [DF_GM_Pay_Status]  DEFAULT (0),
	[IsHidden] [int] NOT NULL CONSTRAINT [DF_GM_Pay_IsHidden]  DEFAULT (0),
	[Ismobile] [int] NULL,
	[Mobile] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Post_x] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_GM_Pay] PRIMARY KEY CLUSTERED 
(
	[PayID] DESC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'paymentNum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付平台号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'payPlatID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'GameID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分区ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'AreaID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'充值卡号，若是用网银则为空' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'CardNum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'冲值金钱' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'Money'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否发送' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'IsSend'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否充值0:未发送 1:已发送' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'IsChange'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'玩家用户' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'GameUser'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'GMID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'GMID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'Points'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'端口' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'GamePort'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏服务器IP地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'GameIP'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付状态(0-失败 1-成功)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'Status'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否掉单' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'IsHidden'

GO

EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否手机充值' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'Ismobile'

GO

EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'Mobile'

GO

EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点播通道号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_Pay', @level2type=N'COLUMN', @level2name=N'Post_x'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_PayList](
	[PL_ID] [int] IDENTITY(1,1) NOT NULL,
	[userID] [int] NOT NULL,
	[userName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[payMoney] [money] NULL,
	[payTime] [datetime] NULL,
	[payRemark] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[BankName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[BankUserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[BankNumber] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[payCount] [int] NOT NULL
 CONSTRAINT [PK_GM_PayList] PRIMARY KEY CLUSTERED 
(
	[PL_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'userID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'userName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'本次支付金额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'payMoney'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'本次支付时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'payTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'payRemark'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'银行信息' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'BankName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户人' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'BankUserName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'银行卡号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayList', @level2type=N'COLUMN', @level2name=N'BankNumber'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_PayToGM](
	[PT_ID] [int] IDENTITY(1,1) NOT NULL,
	[userID] [int] NOT NULL,
	[userName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[almoney] [money] NULL,
	[nonemoney] [money] NULL,
	[payTime] [datetime] NOT NULL,
 CONSTRAINT [PK_GM_PayToGM] PRIMARY KEY CLUSTERED 
(
	[PT_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayToGM', @level2type=N'COLUMN', @level2name=N'userID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayToGM', @level2type=N'COLUMN', @level2name=N'userName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'已经支付的金额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayToGM', @level2type=N'COLUMN', @level2name=N'almoney'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'为支付金额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayToGM', @level2type=N'COLUMN', @level2name=N'nonemoney'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付时间，最近一次支付时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_PayToGM', @level2type=N'COLUMN', @level2name=N'payTime'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_platCard](
	[platCardID] [int] IDENTITY(1,1) NOT NULL,
	[platClass] [int] NOT NULL,
	[cardno] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[cardName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[faceno] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_GM_platCard] PRIMARY KEY CLUSTERED 
(
	[platCardID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO


 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'zfk' , '支付卡' , 'zfk001|zfk010|zfk030|zfk050|zfk053|zfk100|zfk105|zfk200|zfk210' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'szx' , '神州行' , 'szx010|szx30|szx50|szx100|szx300' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'qqb' , 'QQ币卡' , 'qqb005|qqb010|qqb015|qqb030|qqb060|qqb100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'sdk' , '盛大一卡通' , 'sdk005|sdk010|sdk015|sdk025|sdk030|sdk035|sdk045|sdk050|sdk100|sdk300|sdk350|sdk1000' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'ztk' , '征途卡' , 'ztk010|ztk015|ztk020|ztk025|ztk030|ztk050|ztk060|ztk100|ztk300|ztk468' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'shk' , '搜狐卡支付' , 'shk005|shk010|shk015|shk030|shk040|shk100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , '517' , '5173卡' , '517030|517060|517120|517360' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'jyk' , '久游一卡通' , 'jyk005|jyk010|jyk015|jyk020|jyk025|jyk030|jyk050|jyk100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES ( 6 , 'jwk' , '骏网一卡通' , 'jwk005|jwk006|jwk010|jwk015|jwk030|jwk050|jwk100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  6 , 'rxk' , '热血传奇卡' , 'rxk005|rxk010|rxk035|rxk0100|rxk0350|rxk1000' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  6 , 'msk' , '魔兽世界卡' , 'msk015|msk030' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  6 , 'wmk' , '完美卡' , 'wmk015|wmk030|wmk050|wmk100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  6 , 'ltk' , '联通卡' , 'ltk020|ltk030|ltk050|ltk100|ltk300|ltk500' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  6 , 'sxk' , '全国声讯卡' , 'sxk005|sxk010|sxk015' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  6 , 'wyk' , '网易卡' , 'wyk010|wyk015|wyk030' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'a' , '神州行卡' , '4|5|52|92|114' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'b' , '骏网一卡通' , '10|11|12|13|14|49|66' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'c' , '盛大卡' , '6|7|8|9|38|47|48|93|110|111|112|113' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'd' , '征途游戏卡' , '39|40|41|42|43|44|45|70|121|122' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'n' , '搜孤一卡通' , '55|56|57|58|63|77' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'q' , '久游一卡通' , '71|72|73|74|75|76|147' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'r' , '腾讯Q币卡' , '78|79|80|81|82|86|134' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 's' , '热血传奇卡游戏卡' , '96|97|98|99|100|101' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'u' , '完美一卡通' , '115|116|117|118' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'x' , '联通全国充值卡' , '129|130|135|136|137|138' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'm' , '网易一卡通' , '53|54|146' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  8 , 'y' , '中国电信付费充值卡' , '148|149' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'SNDACARD' , '盛大卡
' , '5|10|15|25|30|35|45|50|100|300|350|1000' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'ZHENGTU' , '征途卡
' , '10|15|20|25|30|50|60|100|300|468' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'SZX' , '神州行标准版网关' , '10|30|50|100|300' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'UNICOM' , '联通卡' , '20|30|50|100|300|500' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'JUNNET' , '骏网一卡通' , '5|6|10|15|30|50|100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'QQCARD' , 'Q币支付' , '5|10|15|30|60|100' )
 INSERT [GM_platCard] (  [platClass] , [cardno] , [cardName] , [faceno] ) VALUES (  7 , 'YPCARD' , '易宝一卡通' , '4|5|10|30' )

 
 
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '10' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '100' , 350.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '101' , 1000.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '11' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '110' , 25.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '111' , 35.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '112' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '113' , 350.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '114' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '115' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '116' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '117' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '118' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '12' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '121' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '122' , 25.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '129' , 20.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '13' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '130' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '134' , 200.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '135' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '136' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '137' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '138' , 500.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '14' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '145' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '146' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '147' , 20.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '148' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '149' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '38' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '39' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '4' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '40' , 20.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '41' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '42' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '43' , 60.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '44' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '45' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '47' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '48' , 1000.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '49' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '5' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '517030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '517060' , 60.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '517120' , 120.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '517360' , 360.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '52' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '53' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '54' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '55' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '56' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '57' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '58' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '6' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '63' , 40.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '66' , 6.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '7' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '70' , 468.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '71' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '72' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '73' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '74' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '75' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '76' , 25.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '77' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '78' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '79' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '8' , 45.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '80' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '81' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '82' , 60.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '86' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '9' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '92' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '93' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '96' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '97' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '98' , 35.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( '99' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk006' , 6.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jwk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk020' , 20.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk025' , 25.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'jyk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ltk020' , 20.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ltk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ltk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ltk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ltk300' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ltk500' , 500.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'msk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'msk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'qqb005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'qqb010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'qqb015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'qqb030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'qqb060' , 60.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'qqb100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'rxk000' , 1000.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'rxk005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'rxk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'rxk0100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'rxk035' , 35.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'rxk0350' , 350.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk000' , 1000.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk025' , 25.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk035' , 35.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk045' , 45.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk300' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sdk350' , 350.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'shk005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'shk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'shk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'shk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'shk040' , 40.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'shk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sxk005' , 5.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sxk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'sxk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'szx010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'szx030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'szx050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'szx100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'szx300' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wmk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wmk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wmk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wmk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wyk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wyk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'wyk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk001' , 0.01 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk053' , 53.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk105' , 105.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk200' , 200.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'zfk210' , 210.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk001' , 0.01 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk010' , 10.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk015' , 15.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk020' , 20.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk025' , 25.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk030' , 30.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk050' , 50.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk060' , 60.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk100' , 100.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk300' , 300.0 )
 INSERT [GM_Card] ( [faceno] , [money] ) VALUES ( 'ztk468' , 468.0 )



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_GmSql]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_GmSql](
	[Eid] [int] IDENTITY(1,1) NOT NULL,
	[ExecuteGid] [int] NULL CONSTRAINT [DF_ZL_GmSql_ExecuteGid]  DEFAULT (0),
	[ExecuteSql] [nvarchar](50) NULL,
	[IsExecute] [int] NULL CONSTRAINT [DF_ZL_GmSql_IsExecute]  DEFAULT (0),
 CONSTRAINT [PK_ZL_GmSql] PRIMARY KEY CLUSTERED 
(
	[Eid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏ID' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GmSql', @level2type=N'COLUMN', @level2name=N'ExecuteGid'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏玩家' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GmSql', @level2type=N'COLUMN', @level2name=N'ExecuteSql'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否执行' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_GmSql', @level2type=N'COLUMN', @level2name=N'IsExecute'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GM_User](
	[GMID] [nchar](10) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[tradeName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[password] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[tradeBank] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[bankFullName] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[bankAccount] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[E_Mail] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[tradeGName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Website_address] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[TrueName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[IDCardNO] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[phone] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[QQNum] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'tradeName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户银行' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'tradeBank'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户行全称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'bankFullName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'银行帐号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'bankAccount'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'电子邮件' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'E_Mail'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商户游戏名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'tradeGName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'网站地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'Website_address'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'真实姓名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'TrueName'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证号码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'IDCardNO'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'联系方式' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'GM_User', @level2type=N'COLUMN', @level2name=N'phone'
GO



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[GM_PayList]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_Select_All]
AS


SELECT
	[PL_ID],
	[userID],
	[userName],
	[payMoney],
	[payTime],
	[payRemark],
	[BankName],
	[BankUserName],
	[BankNumber]
FROM
	[dbo].[GM_PayList]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_GetSelect]
	@PL_ID int
AS

SELECT
	[PL_ID],
	[userID],
	[userName],
	[payMoney],
	[payTime],
	[payRemark],
	[BankName],
	[BankUserName],
	[BankNumber]
FROM
	[dbo].[GM_PayList]
WHERE
	[PL_ID] = @PL_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_GetDelete]
	@PL_ID int
AS

DELETE FROM [dbo].[GM_PayList]
WHERE
	[PL_ID] = @PL_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[GM_PayList]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_InsertUpdate]
	@PL_ID int,
	@userID int,
	@userName nvarchar(255),
	@payMoney money,
	@payTime datetime,
	@payRemark ntext,
	@BankName nvarchar(50),
	@BankUserName nvarchar(255),
	@BankNumber nvarchar(50)
AS

IF EXISTS(SELECT [PL_ID] FROM [dbo].[GM_PayList] WHERE [PL_ID] = @PL_ID)
BEGIN
	UPDATE [dbo].[GM_PayList] SET
		[userID] = @userID,
		[userName] = @userName,
		[payMoney] = @payMoney,
		[payTime] = @payTime,
		[payRemark] = @payRemark,
		[BankName] = @BankName,
		[BankUserName] = @BankUserName,
		[BankNumber] = @BankNumber
	WHERE
		[PL_ID] = @PL_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[GM_PayList] (	
	[userID],
	[userName],
	[payMoney],
	[payTime],
	[payRemark],
	[BankName],
	[BankUserName],
	[BankNumber]
	) VALUES (
	@userID,
	@userName,
	@payMoney,
	@payTime,
	@payRemark,
	@BankName,
	@BankUserName,
	@BankNumber
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_GetInsert]
	@userID int,
	@userName nvarchar(255),
	@payMoney money,
	@payTime datetime,
	@payRemark ntext,
	@BankName nvarchar(50),
	@BankUserName nvarchar(255),
	@BankNumber nvarchar(50),
	@PL_ID int OUTPUT
AS

INSERT INTO [dbo].[GM_PayList] (
	[userID],
	[userName],
	[payMoney],
	[payTime],
	[payRemark],
	[BankName],
	[BankUserName],
	[BankNumber]
) VALUES (
	@userID,
	@userName,
	@payMoney,
	@payTime,
	@payRemark,
	@BankName,
	@BankUserName,
	@BankNumber
)

SET @PL_ID = SCOPE_IDENTITY()


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayList_GetUpdate]
	@PL_ID int,
	@userID int,
	@userName nvarchar(255),
	@payMoney money,
	@payTime datetime,
	@payRemark ntext,
	@BankName nvarchar(50),
	@BankUserName nvarchar(255),
	@BankNumber nvarchar(50)
AS

UPDATE [dbo].[GM_PayList] SET
	[userID] = @userID,
	[userName] = @userName,
	[payMoney] = @payMoney,
	[payTime] = @payTime,
	[payRemark] = @payRemark,
	[BankName] = @BankName,
	[BankUserName] = @BankUserName,
	[BankNumber] = @BankNumber
WHERE
	[PL_ID] = @PL_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_UserBank]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_GetSelect]
	@Bank_ID int
AS

SELECT
	[Bank_ID],
	[UserID],
	[BankName],
	[BankUserName],
	[BankNumber],
	[CardType],
	[Remark]
FROM
	[dbo].[ZL_UserBank]
WHERE
	[Bank_ID] = @Bank_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_Select_All]
AS


SELECT
	[Bank_ID],
	[UserID],
	[BankName],
	[BankUserName],
	[BankNumber],
	[CardType],
	[Remark]
FROM
	[dbo].[ZL_UserBank]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_UserBank]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_InsertUpdate]
	@Bank_ID int,
	@UserID int,
	@BankName nvarchar(50),
	@BankUserName nvarchar(255),
	@BankNumber nvarchar(50),
	@CardType nvarchar(50),
	@Remark ntext
AS

IF EXISTS(SELECT [Bank_ID] FROM [dbo].[ZL_UserBank] WHERE [Bank_ID] = @Bank_ID)
BEGIN
	UPDATE [dbo].[ZL_UserBank] SET
		[UserID] = @UserID,
		[BankName] = @BankName,
		[BankUserName] = @BankUserName,
		[BankNumber] = @BankNumber,
		[CardType] = @CardType,
		[Remark] = @Remark
	WHERE
		[Bank_ID] = @Bank_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_UserBank] (	
	[UserID],
	[BankName],
	[BankUserName],
	[BankNumber],
	[CardType],
	[Remark]
	) VALUES (
	@UserID,
	@BankName,
	@BankUserName,
	@BankNumber,
	@CardType,
	@Remark
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_GetDelete]
	@Bank_ID int
AS

DELETE FROM [dbo].[ZL_UserBank]
WHERE
	[Bank_ID] = @Bank_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_GetInsert]
	@UserID int,
	@BankName nvarchar(50),
	@BankUserName nvarchar(255),
	@BankNumber nvarchar(50),
	@CardType nvarchar(50),
	@Remark ntext,
	@Bank_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_UserBank] (
	[UserID],
	[BankName],
	[BankUserName],
	[BankNumber],
	[CardType],
	[Remark]
) VALUES (
	@UserID,
	@BankName,
	@BankUserName,
	@BankNumber,
	@CardType,
	@Remark
)

SET @Bank_ID = SCOPE_IDENTITY()


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_UserBank_GetUpdate]
	@Bank_ID int,
	@UserID int,
	@BankName nvarchar(50),
	@BankUserName nvarchar(255),
	@BankNumber nvarchar(50),
	@CardType nvarchar(50),
	@Remark ntext
AS

UPDATE [dbo].[ZL_UserBank] SET
	[UserID] = @UserID,
	[BankName] = @BankName,
	[BankUserName] = @BankUserName,
	[BankNumber] = @BankNumber,
	[CardType] = @CardType,
	[Remark] = @Remark
WHERE
	[Bank_ID] = @Bank_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[GM_Pay]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_Select_All]
AS


SELECT
	[PayID],
	[paymentNum],
	[payPlatID],
	[GameID],
	[AreaID],
	[CardNum],
	[Money],
	[IsSend],
	[IsChange],
	[GameUser],
	[GMID],
	[Points],
	[PayTime],
	[GamePort],
	[GameIP],
	[Status],
	[IsHidden],
	[Ismobile],
	[Mobile],
	[Post_x]
FROM
	[dbo].[GM_Pay]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_GetDelete]
	@PayID int
AS

DELETE FROM [dbo].[GM_Pay]
WHERE
	[PayID] = @PayID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[GM_Pay]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_GetSelect]
	@PayID int
AS

SELECT
	[PayID],
	[paymentNum],
	[payPlatID],
	[GameID],
	[AreaID],
	[CardNum],
	[Money],
	[IsSend],
	[IsChange],
	[GameUser],
	[GMID],
	[Points],
	[PayTime],
	[GamePort],
	[GameIP],
	[Status],
	[IsHidden],
	[Ismobile],
	[Mobile],
	[Post_x]
FROM
	[dbo].[GM_Pay]
WHERE
	[PayID] = @PayID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_InsertUpdate]
	@PayID int,
	@paymentNum nvarchar(50),
	@payPlatID int,
	@GameID int,
	@AreaID int,
	@CardNum nvarchar(500),
	@Money float,
	@IsSend int,
	@IsChange int,
	@GameUser nvarchar(50),
	@GMID int,
	@Points int,
	@PayTime datetime,
	@GamePort int,
	@GameIP nvarchar(50),
	@Status int,
	@IsHidden int,
	@Ismobile int,
	@Mobile nvarchar(255),
	@Post_x nvarchar(255)
AS

IF EXISTS(SELECT [PayID] FROM [dbo].[GM_Pay] WHERE [PayID] = @PayID)
BEGIN
	UPDATE [dbo].[GM_Pay] SET
		[paymentNum] = @paymentNum,
		[payPlatID] = @payPlatID,
		[GameID] = @GameID,
		[AreaID] = @AreaID,
		[CardNum] = @CardNum,
		[Money] = @Money,
		[IsSend] = @IsSend,
		[IsChange] = @IsChange,
		[GameUser] = @GameUser,
		[GMID] = @GMID,
		[Points] = @Points,
		[PayTime] = @PayTime,
		[GamePort] = @GamePort,
		[GameIP] = @GameIP,
		[Status] = @Status,
		[IsHidden] = @IsHidden,
		[Ismobile] = @Ismobile,
		[Mobile] = @Mobile,
		[Post_x] = @Post_x
	WHERE
		[PayID] = @PayID
END
ELSE
BEGIN
	INSERT INTO [dbo].[GM_Pay] (	
	[paymentNum],
	[payPlatID],
	[GameID],
	[AreaID],
	[CardNum],
	[Money],
	[IsSend],
	[IsChange],
	[GameUser],
	[GMID],
	[Points],
	[PayTime],
	[GamePort],
	[GameIP],
	[Status],
	[IsHidden],
	[Ismobile],
	[Mobile],
	[Post_x]
	) VALUES (
	@paymentNum,
	@payPlatID,
	@GameID,
	@AreaID,
	@CardNum,
	@Money,
	@IsSend,
	@IsChange,
	@GameUser,
	@GMID,
	@Points,
	@PayTime,
	@GamePort,
	@GameIP,
	@Status,
	@IsHidden,
	@Ismobile,
	@Mobile,
	@Post_x
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_GetInsert]
	@paymentNum nvarchar(50),
	@payPlatID int,
	@GameID int,
	@AreaID int,
	@CardNum nvarchar(500),
	@Money float,
	@IsSend int,
	@IsChange int,
	@GameUser nvarchar(50),
	@GMID int,
	@Points int,
	@PayTime datetime,
	@GamePort int,
	@GameIP nvarchar(50),
	@Status int,
	@IsHidden int,
	@Ismobile int,
	@Mobile nvarchar(255),
	@Post_x nvarchar(255),
	@PayID int OUTPUT
AS

INSERT INTO [dbo].[GM_Pay] (
	[paymentNum],
	[payPlatID],
	[GameID],
	[AreaID],
	[CardNum],
	[Money],
	[IsSend],
	[IsChange],
	[GameUser],
	[GMID],
	[Points],
	[PayTime],
	[GamePort],
	[GameIP],
	[Status],
	[IsHidden],
	[Ismobile],
	[Mobile],
	[Post_x]
) VALUES (
	@paymentNum,
	@payPlatID,
	@GameID,
	@AreaID,
	@CardNum,
	@Money,
	@IsSend,
	@IsChange,
	@GameUser,
	@GMID,
	@Points,
	@PayTime,
	@GamePort,
	@GameIP,
	@Status,
	@IsHidden,
	@Ismobile,
	@Mobile,
	@Post_x
)

SET @PayID = SCOPE_IDENTITY()


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Pay_GetUpdate]
	@PayID int,
	@paymentNum nvarchar(50),
	@payPlatID int,
	@GameID int,
	@AreaID int,
	@CardNum nvarchar(500),
	@Money float,
	@IsSend int,
	@IsChange int,
	@GameUser nvarchar(50),
	@GMID int,
	@Points int,
	@PayTime datetime,
	@GamePort int,
	@GameIP nvarchar(50),
	@Status int,
	@IsHidden int,
	@Ismobile int,
	@Mobile nvarchar(255),
	@Post_x nvarchar(255)
AS

UPDATE [dbo].[GM_Pay] SET
	[paymentNum] = @paymentNum,
	[payPlatID] = @payPlatID,
	[GameID] = @GameID,
	[AreaID] = @AreaID,
	[CardNum] = @CardNum,
	[Money] = @Money,
	[IsSend] = @IsSend,
	[IsChange] = @IsChange,
	[GameUser] = @GameUser,
	[GMID] = @GMID,
	[Points] = @Points,
	[PayTime] = @PayTime,
	[GamePort] = @GamePort,
	[GameIP] = @GameIP,
	[Status] = @Status,
	[IsHidden] = @IsHidden,
	[Ismobile] = @Ismobile,
	[Mobile] = @Mobile,
	[Post_x] = @Post_x
WHERE
	[PayID] = @PayID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_Select_All]
AS


SELECT
	[B_ID],
	[userID],
	[userName],
	[BalMoney],
	[BalTime],
	[BalRemark],
	[BalCount]
FROM
	[dbo].[GM_Balance]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_GetSelect]
	@B_ID int
AS

SELECT
	[B_ID],
	[userID],
	[userName],
	[BalMoney],
	[BalTime],
	[BalRemark],
	[BalCount]
FROM
	[dbo].[GM_Balance]
WHERE
	[B_ID] = @B_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[GM_Balance]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[GM_Balance]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_GetDelete]
	@B_ID int
AS

DELETE FROM [dbo].[GM_Balance]
WHERE
	[B_ID] = @B_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_InsertUpdate]
	@B_ID int,
	@userID int,
	@userName nvarchar(255),
	@BalMoney money,
	@BalTime datetime,
	@BalRemark ntext,
	@BalCount int
AS

IF EXISTS(SELECT [B_ID] FROM [dbo].[GM_Balance] WHERE [B_ID] = @B_ID)
BEGIN
	UPDATE [dbo].[GM_Balance] SET
		[userID] = @userID,
		[userName] = @userName,
		[BalMoney] = @BalMoney,
		[BalTime] = @BalTime,
		[BalRemark] = @BalRemark,
		[BalCount] = @BalCount
	WHERE
		[B_ID] = @B_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[GM_Balance] (	
	[userID],
	[userName],
	[BalMoney],
	[BalTime],
	[BalRemark],
	[BalCount]
	) VALUES (
	@userID,
	@userName,
	@BalMoney,
	@BalTime,
	@BalRemark,
	@BalCount
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_GetUpdate]
	@B_ID int,
	@userID int,
	@userName nvarchar(255),
	@BalMoney money,
	@BalTime datetime,
	@BalRemark ntext,
	@BalCount int
AS

UPDATE [dbo].[GM_Balance] SET
	[userID] = @userID,
	[userName] = @userName,
	[BalMoney] = @BalMoney,
	[BalTime] = @BalTime,
	[BalRemark] = @BalRemark,
	[BalCount] = @BalCount
WHERE
	[B_ID] = @B_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Balance_GetInsert]
	@userID int,
	@userName nvarchar(255),
	@BalMoney money,
	@BalTime datetime,
	@BalRemark ntext,
	@BalCount int,
	@B_ID int OUTPUT
AS

INSERT INTO [dbo].[GM_Balance] (
	[userID],
	[userName],
	[BalMoney],
	[BalTime],
	[BalRemark],
	[BalCount]
) VALUES (
	@userID,
	@userName,
	@BalMoney,
	@BalTime,
	@BalRemark,
	@BalCount
)

SET @B_ID = SCOPE_IDENTITY()


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[PR_Payment_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Payment]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_Select_All]
AS


SELECT
	[Eid],
	[ExecuteGid],
	[ExecuteSql],
	[IsExecute]
FROM
	[dbo].[ZL_GmSql]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_GmSql_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_GmSql]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_GetSelect]
	@Eid int
AS

SELECT
	[Eid],
	[ExecuteGid],
	[ExecuteSql],
	[IsExecute]
FROM
	[dbo].[ZL_GmSql]
WHERE
	[Eid] = @Eid
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_GmSql]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_GetDelete]
	@Eid int
AS

DELETE FROM [dbo].[ZL_GmSql]
WHERE
	[Eid] = @Eid


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_InsertUpdate]
	@Eid int,
	@ExecuteGid int,
	@ExecuteSql nvarchar(50),
	@IsExecute int
AS

IF EXISTS(SELECT [Eid] FROM [dbo].[ZL_GmSql] WHERE [Eid] = @Eid)
BEGIN
	UPDATE [dbo].[ZL_GmSql] SET
		[ExecuteGid] = @ExecuteGid,
		[ExecuteSql] = @ExecuteSql,
		[IsExecute] = @IsExecute
	WHERE
		[Eid] = @Eid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_GmSql] (	
	[ExecuteGid],
	[ExecuteSql],
	[IsExecute]
	) VALUES (
	@ExecuteGid,
	@ExecuteSql,
	@IsExecute
	)

END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_GetUpdate]
	@Eid int,
	@ExecuteGid int,
	@ExecuteSql nvarchar(50),
	@IsExecute int
AS

UPDATE [dbo].[ZL_GmSql] SET
	[ExecuteGid] = @ExecuteGid,
	[ExecuteSql] = @ExecuteSql,
	[IsExecute] = @IsExecute
WHERE
	[Eid] = @Eid
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GmSql_GetInsert]
	@ExecuteGid int,
	@ExecuteSql nvarchar(50),
	@IsExecute int,
	@Eid int OUTPUT
AS

INSERT INTO [dbo].[ZL_GmSql] (
	[ExecuteGid],
	[ExecuteSql],
	[IsExecute]
) VALUES (
	@ExecuteGid,
	@ExecuteSql,
	@IsExecute
)

SET @Eid = SCOPE_IDENTITY()
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[GM_PayToGM]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_GetSelect]
	@PT_ID int
AS

SELECT
	[PT_ID],
	[userID],
	[userName],
	[almoney],
	[nonemoney],
	[payTime]
FROM
	[dbo].[GM_PayToGM]
WHERE
	[PT_ID] = @PT_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_Select_All]
AS


SELECT
	[PT_ID],
	[userID],
	[userName],
	[almoney],
	[nonemoney],
	[payTime]
FROM
	[dbo].[GM_PayToGM]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_GetDelete]
	@PT_ID int
AS

DELETE FROM [dbo].[GM_PayToGM]
WHERE
	[PT_ID] = @PT_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[GM_PayToGM]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_InsertUpdate]
	@PT_ID int,
	@userID int,
	@userName nvarchar(255),
	@almoney money,
	@nonemoney money,
	@payTime datetime
AS

IF EXISTS(SELECT [PT_ID] FROM [dbo].[GM_PayToGM] WHERE [PT_ID] = @PT_ID)
BEGIN
	UPDATE [dbo].[GM_PayToGM] SET
		[userID] = @userID,
		[userName] = @userName,
		[almoney] = @almoney,
		[nonemoney] = @nonemoney,
		[payTime] = @payTime
	WHERE
		[PT_ID] = @PT_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[GM_PayToGM] (	
	[userID],
	[userName],
	[almoney],
	[nonemoney],
	[payTime]
	) VALUES (
	@userID,
	@userName,
	@almoney,
	@nonemoney,
	@payTime
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_GetInsert]
	@userID int,
	@userName nvarchar(255),
	@almoney money,
	@nonemoney money,
	@payTime datetime,
	@PT_ID int OUTPUT
AS

INSERT INTO [dbo].[GM_PayToGM] (
	[userID],
	[userName],
	[almoney],
	[nonemoney],
	[payTime]
) VALUES (
	@userID,
	@userName,
	@almoney,
	@nonemoney,
	@payTime
)

SET @PT_ID = SCOPE_IDENTITY()


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_PayToGM_GetUpdate]
	@PT_ID int,
	@userID int,
	@userName nvarchar(255),
	@almoney money,
	@nonemoney money,
	@payTime datetime
AS

UPDATE [dbo].[GM_PayToGM] SET
	[userID] = @userID,
	[userName] = @userName,
	[almoney] = @almoney,
	[nonemoney] = @nonemoney,
	[payTime] = @payTime
WHERE
	[PT_ID] = @PT_ID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_Select_All]
AS


SELECT
	[faceno],
	[money]
FROM
	[dbo].[GM_Card]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[GM_Card]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_GetSelect]
	@faceno nvarchar(50)
AS

SELECT
	[faceno],
	[money]
FROM
	[dbo].[GM_Card]
WHERE
	[faceno] = @faceno


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[GM_Card]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_GetUpdate]
	@faceno nvarchar(50),
	@money float
AS

UPDATE [dbo].[GM_Card] SET
	[money] = @money
WHERE
	[faceno] = @faceno


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_GetDelete]
	@faceno nvarchar(50)
AS

DELETE FROM [dbo].[GM_Card]
WHERE
	[faceno] = @faceno


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_Card_GetInsert]
	@faceno nvarchar(50),
	@money float
AS

INSERT INTO [dbo].[GM_Card] (
	[faceno],
	[money]
) VALUES (
	@faceno,
	@money
)


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[GM_platCard]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_Select_All]
AS


SELECT
	[platCardID],
	[platClass],
	[cardno],
	[cardName],
	[faceno]
FROM
	[dbo].[GM_platCard]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[GM_platCard]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_GetSelect]
	@platCardID int
AS

SELECT
	[platCardID],
	[platClass],
	[cardno],
	[cardName],
	[faceno]
FROM
	[dbo].[GM_platCard]
WHERE
	[platCardID] = @platCardID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_GetDelete]
	@platCardID int
AS

DELETE FROM [dbo].[GM_platCard]
WHERE
	[platCardID] = @platCardID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_InsertUpdate]
	@platCardID int,
	@platClass int,
	@cardno nvarchar(50),
	@cardName nvarchar(50),
	@faceno nvarchar(500)
AS

IF EXISTS(SELECT [platCardID] FROM [dbo].[GM_platCard] WHERE [platCardID] = @platCardID)
BEGIN
	UPDATE [dbo].[GM_platCard] SET
		[platClass] = @platClass,
		[cardno] = @cardno,
		[cardName] = @cardName,
		[faceno] = @faceno
	WHERE
		[platCardID] = @platCardID
END
ELSE
BEGIN
	INSERT INTO [dbo].[GM_platCard] (	
	[platClass],
	[cardno],
	[cardName],
	[faceno]
	) VALUES (
	@platClass,
	@cardno,
	@cardName,
	@faceno
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_GetInsert]
	@platClass int,
	@cardno nvarchar(50),
	@cardName nvarchar(50),
	@faceno nvarchar(500),
	@platCardID int OUTPUT
AS

INSERT INTO [dbo].[GM_platCard] (
	[platClass],
	[cardno],
	[cardName],
	[faceno]
) VALUES (
	@platClass,
	@cardno,
	@cardName,
	@faceno
)

SET @platCardID = SCOPE_IDENTITY()


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_GM_platCard_GetUpdate]
	@platCardID int,
	@platClass int,
	@cardno nvarchar(50),
	@cardName nvarchar(50),
	@faceno nvarchar(500)
AS

UPDATE [dbo].[GM_platCard] SET
	[platClass] = @platClass,
	[cardno] = @cardno,
	[cardName] = @cardName,
	[faceno] = @faceno
WHERE
	[platCardID] = @platCardID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_PayPlat]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_GetDelete]
	@PayPlatID int
AS

DELETE FROM [dbo].[ZL_PayPlat]
WHERE
	[PayPlatID] = @PayPlatID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_PayPlat]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_GetSelect]
	@PayPlatID int
AS

SELECT
	[PayPlatID],
	[PayClass],
	[PayPlatName],
	[AccountID],
	[MD5Key],
	[SellerEmail],
	[IsDisabled],
	[IsDefault],
	[Rate],
	[OrderID],
	[payType],
	[leadtoGroup]
	
FROM
	[dbo].[ZL_PayPlat]
WHERE
	[PayPlatID] = @PayPlatID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_Select_All]
AS


SELECT
	[PayPlatID],
	[PayClass],
	[PayPlatName],
	[AccountID],
	[MD5Key],
	[SellerEmail],
	[IsDisabled],
	[IsDefault],
	[Rate],
	[OrderID],
	[payType],
	[leadtoGroup]
FROM
	[dbo].[ZL_PayPlat]


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_GetUpdate]
	@PayPlatID int,
	@PayClass int,
	@PayPlatName nvarchar(255),
	@AccountID nvarchar(255),
	@MD5Key nvarchar(255),
	@SellerEmail nvarchar(255),
	@IsDisabled bit,
	@IsDefault bit,
	@Rate float,
	@OrderID int,
	@payType nvarchar(50),
	@leadtoGroup nvarchar(500)
AS

UPDATE [dbo].[ZL_PayPlat] SET
	[PayClass] = @PayClass,
	[PayPlatName] = @PayPlatName,
	[AccountID] = @AccountID,
	[MD5Key] = @MD5Key,
	[SellerEmail] = @SellerEmail,
	[IsDisabled] = @IsDisabled,
	[IsDefault] = @IsDefault,
	[Rate] = @Rate,
	[OrderID] = @OrderID,
	[payType] = @payType,
	[leadtoGroup]=@leadtoGroup
WHERE
	[PayPlatID] = @PayPlatID


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_InsertUpdate]
	@PayPlatID int,
	@PayClass int,
	@PayPlatName nvarchar(255),
	@AccountID nvarchar(255),
	@MD5Key nvarchar(255),
	@SellerEmail nvarchar(255),
	@IsDisabled bit,
	@IsDefault bit,
	@Rate float,
	@OrderID int,
	@payType nvarchar(50),
	@leadtoGroup nvarchar(500)
AS

IF EXISTS(SELECT [PayPlatID] FROM [dbo].[ZL_PayPlat] WHERE [PayPlatID] = @PayPlatID)
BEGIN
	UPDATE [dbo].[ZL_PayPlat] SET
		[PayClass] = @PayClass,
		[PayPlatName] = @PayPlatName,
		[AccountID] = @AccountID,
		[MD5Key] = @MD5Key,
		[SellerEmail] = @SellerEmail,
		[IsDisabled] = @IsDisabled,
		[IsDefault] = @IsDefault,
		[Rate] = @Rate,
		[OrderID] = @OrderID,
		[payType] = @payType,
		[leadtoGroup]=@leadtoGroup
	WHERE
		[PayPlatID] = @PayPlatID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_PayPlat] (	
	[PayClass],
	[PayPlatName],
	[AccountID],
	[MD5Key],
	[SellerEmail],
	[IsDisabled],
	[IsDefault],
	[Rate],
	[OrderID],
	[payType],
	[leadtoGroup]
	) VALUES (
	@PayClass,
	@PayPlatName,
	@AccountID,
	@MD5Key,
	@SellerEmail,
	@IsDisabled,
	@IsDefault,
	@Rate,
	@OrderID,
	@payType,
	@leadtoGroup
	)

END


GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO



CREATE PROCEDURE [dbo].[PR_PayPlat_GetInsert]
	@PayClass int,
	@PayPlatName nvarchar(255),
	@AccountID nvarchar(255),
	@MD5Key nvarchar(255),
	@SellerEmail nvarchar(255),
	@IsDisabled bit,
	@IsDefault bit,
	@Rate float,
	@OrderID int,
	@payType nvarchar(50),
	@leadtoGroup nvarchar(500),
	@PayPlatID int OUTPUT
AS

INSERT INTO [dbo].[ZL_PayPlat] (
	[PayClass],
	[PayPlatName],
	[AccountID],
	[MD5Key],
	[SellerEmail],
	[IsDisabled],
	[IsDefault],
	[Rate],
	[OrderID],
	[payType],
	[leadtoGroup]
) VALUES (
	@PayClass,
	@PayPlatName,
	@AccountID,
	@MD5Key,
	@SellerEmail,
	@IsDisabled,
	@IsDefault,
	@Rate,
	@OrderID,
	@payType,
	@leadtoGroup
)

SET @PayPlatID = SCOPE_IDENTITY()



SET ANSI_NULLS ON

GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[ZL_MobilePay]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[ZL_MobilePay](
	[Mid] [int] IDENTITY(1,1) NOT NULL,
	[Mip] [nvarchar](255) NULL,
	[Mact1] [nvarchar](255) NULL,
	[Mact2] [nvarchar](255) NULL,
	[Mact3] [nvarchar](255) NULL,
	[MNo1] [nvarchar](255) NULL,
	[MNo2] [nvarchar](255) NULL,
	[MNo3] [nvarchar](255) NULL,
	[LinkUrl] [nvarchar](1000) NULL,
 CONSTRAINT [PK_Zl_MobilePay] PRIMARY KEY CLUSTERED 
(
	[Mid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授权IP' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'Mip'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'移动指令' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'Mact1'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联通指令' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'Mact2'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'灵通指令' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'Mact3'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'移动指令号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'MNo1'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联通指令号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'MNo2'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'灵通指令号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'MNo3'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'连接通道接口URL' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MobilePay', @level2type=N'COLUMN', @level2name=N'LinkUrl'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_Delete_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MobilePay]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_Select_Where]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MobilePay]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_Select_All]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_Select_All]
AS


SELECT
	[Mid],
	[Mip],
	[Mact1],
	[Mact2],
	[Mact3],
	[MNo1],
	[MNo2],
	[MNo3],
	[LinkUrl]
FROM
	[dbo].[ZL_MobilePay]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_GetSelect]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_GetSelect]
	@Mid int
AS

SELECT
	[Mid],
	[Mip],
	[Mact1],
	[Mact2],
	[Mact3],
	[MNo1],
	[MNo2],
	[MNo3],
	[LinkUrl]
FROM
	[dbo].[ZL_MobilePay]
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_GetInsert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_GetInsert]
	@Mip nvarchar(255),
	@Mact1 nvarchar(255),
	@Mact2 nvarchar(255),
	@Mact3 nvarchar(255),
	@MNo1 nvarchar(255),
	@MNo2 nvarchar(255),
	@MNo3 nvarchar(255),
	@LinkUrl nvarchar(1000),
	@Mid int OUTPUT
AS

INSERT INTO [dbo].[ZL_MobilePay] (
	[Mip],
	[Mact1],
	[Mact2],
	[Mact3],
	[MNo1],
	[MNo2],
	[MNo3],
	[LinkUrl]
) VALUES (
	@Mip,
	@Mact1,
	@Mact2,
	@Mact3,
	@MNo1,
	@MNo2,
	@MNo3,
	@LinkUrl
)

SET @Mid = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_GetUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_GetUpdate]
	@Mid int,
	@Mip nvarchar(255),
	@Mact1 nvarchar(255),
	@Mact2 nvarchar(255),
	@Mact3 nvarchar(255),
	@MNo1 nvarchar(255),
	@MNo2 nvarchar(255),
	@MNo3 nvarchar(255),
	@LinkUrl nvarchar(1000)
AS

UPDATE [dbo].[ZL_MobilePay] SET
	[Mip] = @Mip,
	[Mact1] = @Mact1,
	[Mact2] = @Mact2,
	[Mact3] = @Mact3,
	[MNo1] = @MNo1,
	[MNo2] = @MNo2,
	[MNo3] = @MNo3,
	[LinkUrl] = @LinkUrl
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_InsertUpdate]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_InsertUpdate]
	@Mid int,
	@Mip nvarchar(255),
	@Mact1 nvarchar(255),
	@Mact2 nvarchar(255),
	@Mact3 nvarchar(255),
	@MNo1 nvarchar(255),
	@MNo2 nvarchar(255),
	@MNo3 nvarchar(255),
	@LinkUrl nvarchar(1000)
AS

IF EXISTS(SELECT [Mid] FROM [dbo].[ZL_MobilePay] WHERE [Mid] = @Mid)
BEGIN
	UPDATE [dbo].[ZL_MobilePay] SET
		[Mip] = @Mip,
		[Mact1] = @Mact1,
		[Mact2] = @Mact2,
		[Mact3] = @Mact3,
		[MNo1] = @MNo1,
		[MNo2] = @MNo2,
		[MNo3] = @MNo3,
		[LinkUrl] = @LinkUrl
	WHERE
		[Mid] = @Mid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MobilePay] (	
	[Mip],
	[Mact1],
	[Mact2],
	[Mact3],
	[MNo1],
	[MNo2],
	[MNo3],
	[LinkUrl]
	) VALUES (
	@Mip,
	@Mact1,
	@Mact2,
	@Mact3,
	@MNo1,
	@MNo2,
	@MNo3,
	@LinkUrl
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_MobilePay_GetDelete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MobilePay_GetDelete]
	@Mid int
AS

DELETE FROM [dbo].[ZL_MobilePay]
WHERE
	[Mid] = @Mid

' 
END
GO

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

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE VIEW dbo.zltv_GM_order
AS
SELECT dbo.GM_Pay.GMID, dbo.ZL_User.UserName, dbo.ZL_PayPlat.PayPlatName, 
      dbo.GM_Pay.paymentNum, dbo.GM_Area.areaName, dbo.GM_Pay.GameUser, 
      dbo.GM_Pay.CardNum, dbo.GM_Pay.Money, dbo.ZL_Payment.MoneyTrue, 
      dbo.GM_Pay.IsChange, dbo.GM_Pay.IsHidden, dbo.GM_Pay.PayTime, 
      dbo.GM_Pay.AreaID, dbo.GM_Pay.Status, dbo.GM_Pay.IsSend, 
      dbo.ZL_PayPlat.PayPlatID
FROM dbo.ZL_PayPlat INNER JOIN
      dbo.GM_Pay ON dbo.ZL_PayPlat.PayPlatID = dbo.GM_Pay.payPlatID INNER JOIN
      dbo.GM_Area ON dbo.GM_Pay.AreaID = dbo.GM_Area.ID INNER JOIN
      dbo.ZL_User ON dbo.GM_Pay.GMID = dbo.ZL_User.UserID INNER JOIN
      dbo.ZL_Payment ON dbo.GM_Pay.paymentNum = dbo.ZL_Payment.PaymentNum

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

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

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE VIEW dbo.zltv_GameArea
AS
SELECT dbo.GM_Area.ID, dbo.GM_Area.areaName, dbo.GM_Area.gID, 
      dbo.GM_Game.gameName, dbo.ZL_User.UserName, dbo.ZL_User.UserID
FROM dbo.GM_Area INNER JOIN
      dbo.ZL_User ON dbo.GM_Area.GMID = dbo.ZL_User.UserID LEFT OUTER JOIN
      dbo.GM_Game ON dbo.GM_Area.gID = dbo.GM_Game.ID

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO





---end

--2009.07.31
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_IPpara]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_IPpara](
	[IP_ID] [int] IDENTITY(1,1) NOT NULL,
	[class_ID] [int] NULL,
	[pro_name] [nvarchar](255) NULL,
	[city_name] [nvarchar](255) NULL,
	[startIP] [int] NULL,
	[endIp] [int] NULL,
 CONSTRAINT [PK_ZL_IPpara] PRIMARY KEY CLUSTERED 
(
	[IP_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'此IP段所属分类ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IPpara', @level2type=N'COLUMN', @level2name=N'class_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'此IP段所属省级名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IPpara', @level2type=N'COLUMN', @level2name=N'pro_name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'此IP段所属城市名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IPpara', @level2type=N'COLUMN', @level2name=N'city_name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'此IP段起始IP' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IPpara', @level2type=N'COLUMN', @level2name=N'startIP'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'此IP段结束IP' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IPpara', @level2type=N'COLUMN', @level2name=N'endIp'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_IPUrl]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_IPUrl](
	[Url_ID] [int] IDENTITY(1,1) NOT NULL,
	[Url] [nvarchar](255) NULL,
	[class_ID] [int] NULL,
	[Node_ID] [int] NULL,
 CONSTRAINT [PK_ZL_IPUrl] PRIMARY KEY CLUSTERED 
(
	[Url_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'此分类标识' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IPUrl', @level2type=N'COLUMN', @level2name=N'Url_ID'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_IPclass]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_IPclass](
	[class_ID] [int] IDENTITY(1,1) NOT NULL,
	[leadto_ID] [int] NULL,
	[class_name] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_IPclass] PRIMARY KEY CLUSTERED 
(
	[class_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END


--end
---start 20090803

CREATE TABLE [dbo].[ZL_BossInfo](
	[nodeid] [int] IDENTITY(1,1) NOT NULL,
	[parentid] [int] NULL,
	[shoptype] [int] NULL,
	[userid] [int] NULL,
	[Childs] [int] NULL CONSTRAINT [DF_ZL_BossInfo_Childs]  DEFAULT ((0)),
	[CMoney] [money] NULL,
	[Province] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[city] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[CName] [nchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[Address] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[Agent] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[license] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[CTel] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[CInfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[ContractNum] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[AccountPeople] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[Bank] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[BankNum] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[AccountPeople2] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[Bank2] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[BankNum2] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[linkname] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[linksex] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[linkPositions] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[linktel] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[fax] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[PostCode] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[email] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[Documents] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[DocumentsNUm] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_BossInfo] PRIMARY KEY CLUSTERED 
(
	[nodeid] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'省' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'Province'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'招商名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'CName'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'法定代理人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'Agent'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'营业执照' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'license'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理商电话' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'CTel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'公司介绍' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'CInfo'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'合同协议号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'ContractNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开户人' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'AccountPeople'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开户银行' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'Bank'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'银行账号' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'BankNum'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系人姓名' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'linkname'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'性别' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'linksex'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系人职务' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'linkPositions'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'联系电话' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'linktel'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'传真' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'fax'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮政编码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'PostCode'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'证件类型' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'Documents'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'证件类型号码' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_BossInfo', @level2type=N'COLUMN', @level2name=N'DocumentsNUm'




SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_BossInfo]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_GetDelete]
	@nodeid int
AS

DELETE FROM [dbo].[ZL_BossInfo]
WHERE
	[nodeid] = @nodeid
	
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_GetInsert]
	@parentid int,
	@shoptype int,
	@userid int,
	@Childs int,
	@CMoney money,
	@Province nvarchar(250),
	@city nvarchar(250),
	@CName nchar(250),
	@Address nvarchar(250),
	@Agent nvarchar(250),
	@license nvarchar(250),
	@CTel nvarchar(250),
	@CInfo ntext,
	@ContractNum nvarchar(250),
	@AccountPeople nvarchar(250),
	@Bank nvarchar(250),
	@BankNum nvarchar(250),
	@AccountPeople2 nvarchar(250),
	@Bank2 nvarchar(250),
	@BankNum2 nvarchar(250),
	@linkname nvarchar(250),
	@linksex nvarchar(250),
	@linkPositions nvarchar(250),
	@linktel nvarchar(250),
	@fax nvarchar(250),
	@PostCode nvarchar(250),
	@email nvarchar(250),
	@Documents nvarchar(250),
	@DocumentsNUm nvarchar(250),
	@nodeid int OUTPUT
AS

INSERT INTO [dbo].[ZL_BossInfo] (
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
) VALUES (
	@parentid,
	@shoptype,
	@userid,
	@Childs,
	@CMoney,
	@Province,
	@city,
	@CName,
	@Address,
	@Agent,
	@license,
	@CTel,
	@CInfo,
	@ContractNum,
	@AccountPeople,
	@Bank,
	@BankNum,
	@AccountPeople2,
	@Bank2,
	@BankNum2,
	@linkname,
	@linksex,
	@linkPositions,
	@linktel,
	@fax,
	@PostCode,
	@email,
	@Documents,
	@DocumentsNUm
)

SET @nodeid = SCOPE_IDENTITY()

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_GetSelect]
	@nodeid int
AS

SELECT
	[nodeid],
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
FROM
	[dbo].[ZL_BossInfo]
WHERE
	[nodeid] = @nodeid

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO




CREATE PROCEDURE [dbo].[PR_BossInfo_GetSelectUserid]
	@userid int
AS

SELECT
	[nodeid],
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm],
[cmoney]
FROM
	[dbo].[ZL_BossInfo]
WHERE
	[userid] = @userid

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_GetUpdate]
	@nodeid int,
	@parentid int,
	@shoptype int,
	@userid int,
	@Childs int,
	@CMoney money,
	@Province nvarchar(250),
	@city nvarchar(250),
	@CName nchar(250),
	@Address nvarchar(250),
	@Agent nvarchar(250),
	@license nvarchar(250),
	@CTel nvarchar(250),
	@CInfo ntext,
	@ContractNum nvarchar(250),
	@AccountPeople nvarchar(250),
	@Bank nvarchar(250),
	@BankNum nvarchar(250),
	@AccountPeople2 nvarchar(250),
	@Bank2 nvarchar(250),
	@BankNum2 nvarchar(250),
	@linkname nvarchar(250),
	@linksex nvarchar(250),
	@linkPositions nvarchar(250),
	@linktel nvarchar(250),
	@fax nvarchar(250),
	@PostCode nvarchar(250),
	@email nvarchar(250),
	@Documents nvarchar(250),
	@DocumentsNUm nvarchar(250)
AS

UPDATE [dbo].[ZL_BossInfo] SET
	[parentid] = @parentid,
	[shoptype] = @shoptype,
	[userid] = @userid,
	[Childs] = @Childs,
	[CMoney] = @CMoney,
	[Province] = @Province,
	[city] = @city,
	[CName] = @CName,
	[Address] = @Address,
	[Agent] = @Agent,
	[license] = @license,
	[CTel] = @CTel,
	[CInfo] = @CInfo,
	[ContractNum] = @ContractNum,
	[AccountPeople] = @AccountPeople,
	[Bank] = @Bank,
	[BankNum] = @BankNum,
	[AccountPeople2] = @AccountPeople2,
	[Bank2] = @Bank2,
	[BankNum2] = @BankNum2,
	[linkname] = @linkname,
	[linksex] = @linksex,
	[linkPositions] = @linkPositions,
	[linktel] = @linktel,
	[fax] = @fax,
	[PostCode] = @PostCode,
	[email] = @email,
	[Documents] = @Documents,
	[DocumentsNUm] = @DocumentsNUm
WHERE
	[nodeid] = @nodeid

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_InsertUpdate]
	@nodeid int,
	@parentid int,
	@shoptype int,
	@userid int,
	@Childs int,
	@CMoney money,
	@Province nvarchar(250),
	@city nvarchar(250),
	@CName nchar(250),
	@Address nvarchar(250),
	@Agent nvarchar(250),
	@license nvarchar(250),
	@CTel nvarchar(250),
	@CInfo ntext,
	@ContractNum nvarchar(250),
	@AccountPeople nvarchar(250),
	@Bank nvarchar(250),
	@BankNum nvarchar(250),
	@AccountPeople2 nvarchar(250),
	@Bank2 nvarchar(250),
	@BankNum2 nvarchar(250),
	@linkname nvarchar(250),
	@linksex nvarchar(250),
	@linkPositions nvarchar(250),
	@linktel nvarchar(250),
	@fax nvarchar(250),
	@PostCode nvarchar(250),
	@email nvarchar(250),
	@Documents nvarchar(250),
	@DocumentsNUm nvarchar(250)
AS

IF EXISTS(SELECT [nodeid] FROM [dbo].[ZL_BossInfo] WHERE [nodeid] = @nodeid)
BEGIN
	UPDATE [dbo].[ZL_BossInfo] SET
		[parentid] = @parentid,
		[shoptype] = @shoptype,
		[userid] = @userid,
		[Childs] = @Childs,
		[CMoney] = @CMoney,
		[Province] = @Province,
		[city] = @city,
		[CName] = @CName,
		[Address] = @Address,
		[Agent] = @Agent,
		[license] = @license,
		[CTel] = @CTel,
		[CInfo] = @CInfo,
		[ContractNum] = @ContractNum,
		[AccountPeople] = @AccountPeople,
		[Bank] = @Bank,
		[BankNum] = @BankNum,
		[AccountPeople2] = @AccountPeople2,
		[Bank2] = @Bank2,
		[BankNum2] = @BankNum2,
		[linkname] = @linkname,
		[linksex] = @linksex,
		[linkPositions] = @linkPositions,
		[linktel] = @linktel,
		[fax] = @fax,
		[PostCode] = @PostCode,
		[email] = @email,
		[Documents] = @Documents,
		[DocumentsNUm] = @DocumentsNUm
	WHERE
		[nodeid] = @nodeid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_BossInfo] (	
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
	) VALUES (
	@parentid,
	@shoptype,
	@userid,
	@Childs,
	@CMoney,
	@Province,
	@city,
	@CName,
	@Address,
	@Agent,
	@license,
	@CTel,
	@CInfo,
	@ContractNum,
	@AccountPeople,
	@Bank,
	@BankNum,
	@AccountPeople2,
	@Bank2,
	@BankNum2,
	@linkname,
	@linksex,
	@linkPositions,
	@linktel,
	@fax,
	@PostCode,
	@email,
	@Documents,
	@DocumentsNUm
	)

END

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_Select_All]
AS


SELECT
	[nodeid],
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
FROM
	[dbo].[ZL_BossInfo]

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE PROCEDURE [dbo].[PR_BossInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_BossInfo]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

---end 20090803
---start 20090827
CREATE PROCEDURE [dbo].[PR_GuessGame_GetInsert]
	@matchType nvarchar(50),
	@matchTime datetime,
	@firstTeam nvarchar(255),
	@secondTeam nvarchar(255),
	@concedePoints nvarchar(255),
	@firstReturn nvarchar(255),
	@secondReturn nvarchar(255),
	@bsPoints nvarchar(255),
	@bigPReturn nvarchar(255),
	@sPReturn nvarchar(255),
	@IsOver nvarchar(255),
	@concedeResult nvarchar(255),
	@bsResult nvarchar(255),
	@score nvarchar(255),
	@OverTime datetime,
	@ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_GuessGame] (
	[matchType],
	[matchTime],
	[firstTeam],
	[secondTeam],
	[concedePoints],
	[firstReturn],
	[secondReturn],
	[bsPoints],
	[bigPReturn],
	[sPReturn],
	[IsOver],
	[concedeResult],
	[bsResult],
	[score],
	[OverTime]
) VALUES (
	@matchType,
	@matchTime,
	@firstTeam,
	@secondTeam,
	@concedePoints,
	@firstReturn,
	@secondReturn,
	@bsPoints,
	@bigPReturn,
	@sPReturn,
	@IsOver,
	@concedeResult,
	@bsResult,
	@score,
	@OverTime
)

SET @ID = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_GetUpdate]
	@ID int,
	@matchType nvarchar(50),
	@matchTime datetime,
	@firstTeam nvarchar(255),
	@secondTeam nvarchar(255),
	@concedePoints nvarchar(255),
	@firstReturn nvarchar(255),
	@secondReturn nvarchar(255),
	@bsPoints nvarchar(255),
	@bigPReturn nvarchar(255),
	@sPReturn nvarchar(255),
	@IsOver nvarchar(255),
	@concedeResult nvarchar(255),
	@bsResult nvarchar(255),
	@score nvarchar(255),
	@OverTime datetime
AS

UPDATE [dbo].[ZL_GuessGame] SET
	[matchType] = @matchType,
	[matchTime] = @matchTime,
	[firstTeam] = @firstTeam,
	[secondTeam] = @secondTeam,
	[concedePoints] = @concedePoints,
	[firstReturn] = @firstReturn,
	[secondReturn] = @secondReturn,
	[bsPoints] = @bsPoints,
	[bigPReturn] = @bigPReturn,
	[sPReturn] = @sPReturn,
	[IsOver] = @IsOver,
	[concedeResult] = @concedeResult,
	[bsResult] = @bsResult,
	[score] = @score,
	[OverTime] = @OverTime
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_InsertUpdate]
	@ID int,
	@matchType nvarchar(50),
	@matchTime datetime,
	@firstTeam nvarchar(255),
	@secondTeam nvarchar(255),
	@concedePoints nvarchar(255),
	@firstReturn nvarchar(255),
	@secondReturn nvarchar(255),
	@bsPoints nvarchar(255),
	@bigPReturn nvarchar(255),
	@sPReturn nvarchar(255),
	@IsOver nvarchar(255),
	@concedeResult nvarchar(255),
	@bsResult nvarchar(255),
	@score nvarchar(255),
	@OverTime datetime
AS

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_GuessGame] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_GuessGame] SET
		[matchType] = @matchType,
		[matchTime] = @matchTime,
		[firstTeam] = @firstTeam,
		[secondTeam] = @secondTeam,
		[concedePoints] = @concedePoints,
		[firstReturn] = @firstReturn,
		[secondReturn] = @secondReturn,
		[bsPoints] = @bsPoints,
		[bigPReturn] = @bigPReturn,
		[sPReturn] = @sPReturn,
		[IsOver] = @IsOver,
		[concedeResult] = @concedeResult,
		[bsResult] = @bsResult,
		[score] = @score,
		[OverTime] = @OverTime
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_GuessGame] (	
	[matchType],
	[matchTime],
	[firstTeam],
	[secondTeam],
	[concedePoints],
	[firstReturn],
	[secondReturn],
	[bsPoints],
	[bigPReturn],
	[sPReturn],
	[IsOver],
	[concedeResult],
	[bsResult],
	[score],
	[OverTime]
	) VALUES (
	@matchType,
	@matchTime,
	@firstTeam,
	@secondTeam,
	@concedePoints,
	@firstReturn,
	@secondReturn,
	@bsPoints,
	@bigPReturn,
	@sPReturn,
	@IsOver,
	@concedeResult,
	@bsResult,
	@score,
	@OverTime
	)

END

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_GetDelete]
	@ID int
AS

DELETE FROM [dbo].[ZL_GuessGame]
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_GuessGame]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[matchType],
	[matchTime],
	[firstTeam],
	[secondTeam],
	[concedePoints],
	[firstReturn],
	[secondReturn],
	[bsPoints],
	[bigPReturn],
	[sPReturn],
	[IsOver],
	[concedeResult],
	[bsResult],
	[score],
	[OverTime]
FROM
	[dbo].[ZL_GuessGame]
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_GuessGame]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_GuessGame_Select_All]
AS


SELECT
	[ID],
	[matchType],
	[matchTime],
	[firstTeam],
	[secondTeam],
	[concedePoints],
	[firstReturn],
	[secondReturn],
	[bsPoints],
	[bigPReturn],
	[sPReturn],
	[IsOver],
	[concedeResult],
	[bsResult],
	[score],
	[OverTime]
FROM
	[dbo].[ZL_GuessGame]
order by [IsOver] asc, [ID]
GO
CREATE PROCEDURE [dbo].[PR_GuessBet_GetInsert]
	@userName nvarchar(255),
	@betTime datetime,
	@betGameID int,
	@betType int,
	@betTeam int,
	@betMoney int,
	@betWin float,
	@betRemark text,
	@ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_GuessBet] (
	[userName],
	[betTime],
	[betGameID],
	[betType],
	[betTeam],
	[betMoney],
	[betWin],
	[betRemark]
) VALUES (
	@userName,
	@betTime,
	@betGameID,
	@betType,
	@betTeam,
	@betMoney,
	@betWin,
	@betRemark
)

SET @ID = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_GetUpdate]
	@ID int,
	@userName nvarchar(255),
	@betTime datetime,
	@betGameID int,
	@betType int,
	@betTeam int,
	@betMoney int,
	@betWin float,
	@betRemark text
AS

UPDATE [dbo].[ZL_GuessBet] SET
	[userName] = @userName,
	[betTime] = @betTime,
	[betGameID] = @betGameID,
	[betType] = @betType,
	[betTeam] = @betTeam,
	[betMoney] = @betMoney,
	[betWin] = @betWin,
	[betRemark] = @betRemark
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_InsertUpdate]
	@ID int,
	@userName nvarchar(255),
	@betTime datetime,
	@betGameID int,
	@betType int,
	@betTeam int,
	@betMoney int,
	@betWin float,
	@betRemark text
AS

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_GuessBet] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_GuessBet] SET
		[userName] = @userName,
		[betTime] = @betTime,
		[betGameID] = @betGameID,
		[betType] = @betType,
		[betTeam] = @betTeam,
		[betMoney] = @betMoney,
		[betWin] = @betWin,
		[betRemark] = @betRemark
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_GuessBet] (	
	[userName],
	[betTime],
	[betGameID],
	[betType],
	[betTeam],
	[betMoney],
	[betWin],
	[betRemark]
	) VALUES (
	@userName,
	@betTime,
	@betGameID,
	@betType,
	@betTeam,
	@betMoney,
	@betWin,
	@betRemark
	)

END

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_GetDelete]
	@ID int
AS

DELETE FROM [dbo].[ZL_GuessBet]
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_GuessBet]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[userName],
	[betTime],
	[betGameID],
	[betType],
	[betTeam],
	[betMoney],
	[betWin],
	[betRemark]
FROM
	[dbo].[ZL_GuessBet]
WHERE
	[ID] = @ID

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_GuessBet]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_GuessBet_Select_All]
AS


SELECT
	[ID],
	[userName],
	[betTime],
	[betGameID],
	[betType],
	[betTeam],
	[betMoney],
	[betWin],
	[betRemark]
FROM
	[dbo].[ZL_GuessBet]
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_GetInsert]
	@username nvarchar(255),
	@MPNum float,
	@ID int OUTPUT
AS
INSERT INTO [dbo].[ZL_GuessMP] (
	[username],
	[MPNum]
) VALUES (
	@username,
	@MPNum
)
SET @ID = SCOPE_IDENTITY()
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_GetUpdate]
	@ID int,
	@username nvarchar(255),
	@MPNum float
AS
UPDATE [dbo].[ZL_GuessMP] SET
	[username] = @username,
	[MPNum] = @MPNum
WHERE
	[ID] = @ID
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_InsertUpdate]
	@ID int,
	@username nvarchar(255),
	@MPNum float
AS
IF EXISTS(SELECT [ID] FROM [dbo].[ZL_GuessMP] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_GuessMP] SET
		[username] = @username,
		[MPNum] = @MPNum
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_GuessMP] (	
	[username],
	[MPNum]
	) VALUES (
	@username,
	@MPNum
	)
END
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_GetDelete]
	@ID int
AS
DELETE FROM [dbo].[ZL_GuessMP]
WHERE
	[ID] = @ID
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_Delete_Where]
	@WhereCondition nvarchar(500)
AS
DECLARE @SQL nvarchar(3250)
SET @SQL = '
DELETE FROM
	[dbo].[ZL_GuessMP]
WHERE
	' + @WhereCondition
EXEC sp_executesql @SQL
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_GetSelect]
	@ID int
AS
SELECT
	[ID],
	[username],
	[MPNum]
FROM
	[dbo].[ZL_GuessMP]
WHERE
	[ID] = @ID
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS
DECLARE @SQL nvarchar(3250)
SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_GuessMP]
WHERE
	' + @WhereCondition
IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END
EXEC sp_executesql @SQL
GO
CREATE PROCEDURE [dbo].[PR_GuessMP_Select_All]
AS
SELECT
	[ID],
	[username],
	[MPNum]
FROM
	[dbo].[ZL_GuessMP]
GO
---end 20090827

--- begin 2009-9-29   wlb

create    PROCEDURE PR_ModelField_AddFrom 
(@modelid int=0)
 AS

begin

declare @fieldid int
Declare Cur Cursor For Select fieldid from zl_modelfield where modelid=0 order by orderid
Open Cur
Fetch next From Cur Into @fieldid
While @@fetch_status=0     
Begin
    insert into zl_modelfield(modelid,fieldname,fieldalias,isnotnull,fieldtype,orderid,isshow,Sys_type)
select @modelid,fieldname,fieldalias,isnotnull,fieldtype,orderid,isshow,Sys_type from zl_modelfield where fieldid=@fieldid
    Fetch Next From Cur Into @fieldid
End   
Close Cur   
Deallocate Cur

return
end
------end
------begin 2009-8-31 wlb
Go
create   proc pr_nodelist_find
 @nodeid int=0 
as

declare @a int,@i int
create table #Temp(parent_id int,parent_name varchar(50))
begin

set @i=0
set @a=(select Depth from zl_node where nodeid=@nodeid)
while @i<@a-2
begin

set @nodeid=(select parentid from zl_node where nodeid=@nodeid)

insert into #temp(parent_id) select parentid from zl_node where nodeid=@nodeid

set @nodeid=(select parentid from zl_node where nodeid=@nodeid)

update #temp set parent_name=(select nodename from zl_node where nodeid=@nodeid)
where parent_id=@nodeid

set @i=@i+1

end

update #temp  set parent_name=rtrim(ltrim(parent_name))

select * from #temp order by parent_id

return

end
Go

-------end

---------h
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_GetInsert]
	@P_Name nvarchar(500),
	@P_Class int,
	@P_Guige nvarchar(500),
	@P_Dback nvarchar(50),
	@P_PageType int,
	@P_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_MuPa] (
	[P_Name],
	[P_Class],
	[P_Guige],
	[P_Dback],
	[P_PageType]
) VALUES (
	@P_Name,
	@P_Class,
	@P_Guige,
	@P_Dback,
	@P_PageType
)

SET @P_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_GetUpdate]
	@P_ID int,
	@P_Name nvarchar(500),
	@P_Class int,
	@P_Guige nvarchar(500),
	@P_Dback nvarchar(50),
	@P_PageType int
AS

UPDATE [dbo].[ZL_MuPa] SET
	[P_Name] = @P_Name,
	[P_Class] = @P_Class,
	[P_Guige] = @P_Guige,
	[P_Dback] = @P_Dback,
	[P_PageType] = @P_PageType
WHERE
	[P_ID] = @P_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_InsertUpdate]
	@P_ID int,
	@P_Name nvarchar(500),
	@P_Class int,
	@P_Guige nvarchar(500),
	@P_Dback nvarchar(50),
	@P_PageType int
AS

IF EXISTS(SELECT [P_ID] FROM [dbo].[ZL_MuPa] WHERE [P_ID] = @P_ID)
BEGIN
	UPDATE [dbo].[ZL_MuPa] SET
		[P_Name] = @P_Name,
		[P_Class] = @P_Class,
		[P_Guige] = @P_Guige,
		[P_Dback] = @P_Dback,
		[P_PageType] = @P_PageType
	WHERE
		[P_ID] = @P_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MuPa] (	
	[P_Name],
	[P_Class],
	[P_Guige],
	[P_Dback],
	[P_PageType]
	) VALUES (
	@P_Name,
	@P_Class,
	@P_Guige,
	@P_Dback,
	@P_PageType
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_DeleteByP_ID]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_DeleteByP_ID]
	@P_ID int
AS

DELETE FROM [dbo].[ZL_MuPa]
WHERE
	[P_ID] = @P_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MuPa]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_GetSelect]
	@P_ID int
AS

SELECT
	[P_ID],
	[P_Name],
	[P_Class],
	[P_Guige],
	[P_Dback],
	[P_PageType]
FROM
	[dbo].[ZL_MuPa]
WHERE
	[P_ID] = @P_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MuPa]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPa_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPa_Select_All]
AS


SELECT
	[P_ID],
	[P_Name],
	[P_Class],
	[P_Guige],
	[P_Dback],
	[P_PageType]
FROM
	[dbo].[ZL_MuPa]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MuPic]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MuPic](
	[P_id] [int] IDENTITY(1,1) NOT NULL,
	[p_pic1] [nvarchar](500) NULL,
	[p_pic2] [nvarchar](500) NULL,
	[p_tempid] [int] NULL,
	[p_picid] [nvarchar](500) NULL,
	[p_addtime] [datetime] NULL CONSTRAINT [DF_ZL_MuPic_p_addtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_MuPic] PRIMARY KEY CLUSTERED 
(
	[P_id] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPic', @level2type=N'COLUMN', @level2name=N'P_id'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'大图' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPic', @level2type=N'COLUMN', @level2name=N'p_pic1'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'小图' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPic', @level2type=N'COLUMN', @level2name=N'p_pic2'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模板ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPic', @level2type=N'COLUMN', @level2name=N'p_tempid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPic', @level2type=N'COLUMN', @level2name=N'p_picid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPic', @level2type=N'COLUMN', @level2name=N'p_addtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MuProduct]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MuProduct](
	[p_ID] [int] IDENTITY(1,1) NOT NULL,
	[p_Name] [nvarchar](50) NULL,
	[p_Type] [int] NULL,
	[p_DoublePage] [int] NULL,
	[p_IspageTemplate] [int] NULL,
	[p_num] [int] NULL CONSTRAINT [DF_ZL_MuProduct_p_num]  DEFAULT (0),
	[p_info] [ntext] NULL,
 CONSTRAINT [PK_ZL_MuProduct] PRIMARY KEY CLUSTERED 
(
	[p_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_Type'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为双面' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_DoublePage'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'像册专用/公用Flex模板' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_IspageTemplate'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_num'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuProduct', @level2type=N'COLUMN', @level2name=N'p_info'

GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MultiNode_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_MultiNode_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MultiNode]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MuPic]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MuProduct]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MuClass]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MuClass](
	[cl_ID] [int] IDENTITY(1,1) NOT NULL,
	[cl_PClass] [int] NULL,
	[cl_Name] [nvarchar](500) NULL,
	[cl_Num] [int] NULL CONSTRAINT [DF_ZL_MuC_cl_Num]  DEFAULT (0),
	[cl_GuiGe] [nvarchar](255) NULL,
	[cl_Paiban] [int] NULL CONSTRAINT [DF_ZL_MuClass_cl_Paiban]  DEFAULT (0),
	[cl_Class] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_MuC] PRIMARY KEY CLUSTERED 
(
	[cl_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_PClass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_Num'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'规格' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_GuiGe'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排版分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_Paiban'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类类别' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuClass', @level2type=N'COLUMN', @level2name=N'cl_Class'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MuPic]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MuProduct]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MuClass]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MuClass]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MuPage]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MuPage](
	[U_PageID] [int] IDENTITY(1,1) NOT NULL,
	[U_PClass] [int] NULL,
	[U_Class] [int] NULL,
	[U_Pagenum] [int] NULL,
	[U_PageUrl] [nvarchar](255) NULL,
	[U_Xml] [ntext] NULL,
	[U_Tid] [int] NULL,
 CONSTRAINT [PK_ZL_MuPage] PRIMARY KEY CLUSTERED 
(
	[U_PageID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPage', @level2type=N'COLUMN', @level2name=N'U_PClass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPage', @level2type=N'COLUMN', @level2name=N'U_Class'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'页码' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPage', @level2type=N'COLUMN', @level2name=N'U_Pagenum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分页默认图片' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPage', @level2type=N'COLUMN', @level2name=N'U_PageUrl'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'页面数据' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPage', @level2type=N'COLUMN', @level2name=N'U_Xml'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'礼品ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPage', @level2type=N'COLUMN', @level2name=N'U_Tid'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MuPa]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MuPa](
	[P_ID] [int] IDENTITY(1,1) NOT NULL,
	[P_PClass] [int] NULL,
	[P_Class] [int] NULL,
	[P_Name] [nvarchar](500) NULL,
	[P_Guige] [nvarchar](500) NULL,
	[P_Dback] [nvarchar](50) NULL,
	[P_PageType] [int] NULL,
 CONSTRAINT [PK_ZL_MuPa] PRIMARY KEY CLUSTERED 
(
	[P_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'相册ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_PClass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'像册分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_Class'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'像册名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'规格' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_Guige'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'默认背景' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_Dback'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'大页/小页' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuPa', @level2type=N'COLUMN', @level2name=N'P_PageType'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MuPage]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MuTemp]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MuTemp](
	[Mu_ID] [int] IDENTITY(1,1) NOT NULL,
	[Mu_Class] [int] NULL,
	[Mu_Title] [nvarchar](255) NULL,
	[Mu_BackImg] [nvarchar](500) NULL,
	[Mu_Guige] [nvarchar](255) NULL,
	[Mu_UserChange] [int] NULL CONSTRAINT [DF_ZL_MuTemp_Mu_UserChange]  DEFAULT (0),
	[Mu_Xml] [ntext] NULL,
	[Mu_PageType] [int] NULL CONSTRAINT [DF_ZL_MuTemp_Mu_PageType]  DEFAULT (0),
	[Mu_ModelTemp] [int] NULL,
	[Mu_PClass] [int] NULL,
	[Mu_Num] [int] NULL CONSTRAINT [DF_ZL_MuTemp_Mu_Num]  DEFAULT (0),
 CONSTRAINT [PK_ZL_MuT] PRIMARY KEY CLUSTERED 
(
	[Mu_ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模板ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模板分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_Class'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模板名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_Title'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'背景图片' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_BackImg'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'尺寸规格' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_Guige'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户是否允许修改' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_UserChange'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模板内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_Xml'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'页面类型（大页，小页）' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_PageType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模板类型（页面模板，成套模板）' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_ModelTemp'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'产品分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_PClass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_MuTemp', @level2type=N'COLUMN', @level2name=N'Mu_Num'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MuPage]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MuTemp]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MuTemp]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_Select_All]
AS


SELECT
	[P_id],
	[p_pic1],
	[p_pic2],
	[p_tempid],
	[p_picid],
	[p_addtime]
FROM
	[dbo].[ZL_MuPic]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_GetSelect]
	@P_id int
AS

SELECT
	[P_id],
	[p_pic1],
	[p_pic2],
	[p_tempid],
	[p_picid],
	[p_addtime]
FROM
	[dbo].[ZL_MuPic]
WHERE
	[P_id] = @P_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_DeleteByP_id]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_DeleteByP_id]
	@P_id int
AS

DELETE FROM [dbo].[ZL_MuPic]
WHERE
	[P_id] = @P_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_GetUpdate]
	@P_id int,
	@p_pic1 nvarchar(500),
	@p_pic2 nvarchar(500),
	@p_tempid int,
	@p_picid nvarchar(500),
	@p_addtime datetime
AS

UPDATE [dbo].[ZL_MuPic] SET
	[p_pic1] = @p_pic1,
	[p_pic2] = @p_pic2,
	[p_tempid] = @p_tempid,
	[p_picid] = @p_picid,
	[p_addtime] = @p_addtime
WHERE
	[P_id] = @P_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_InsertUpdate]
	@P_id int,
	@p_pic1 nvarchar(500),
	@p_pic2 nvarchar(500),
	@p_tempid int,
	@p_picid nvarchar(500),
	@p_addtime datetime
AS

IF EXISTS(SELECT [P_id] FROM [dbo].[ZL_MuPic] WHERE [P_id] = @P_id)
BEGIN
	UPDATE [dbo].[ZL_MuPic] SET
		[p_pic1] = @p_pic1,
		[p_pic2] = @p_pic2,
		[p_tempid] = @p_tempid,
		[p_picid] = @p_picid,
		[p_addtime] = @p_addtime
	WHERE
		[P_id] = @P_id
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MuPic] (	
	[p_pic1],
	[p_pic2],
	[p_tempid],
	[p_picid],
	[p_addtime]
	) VALUES (
	@p_pic1,
	@p_pic2,
	@p_tempid,
	@p_picid,
	@p_addtime
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPic_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPic_GetInsert]
	@p_pic1 nvarchar(500),
	@p_pic2 nvarchar(500),
	@p_tempid int,
	@p_picid nvarchar(500),
	@p_addtime datetime,
	@P_id int OUTPUT
AS

INSERT INTO [dbo].[ZL_MuPic] (
	[p_pic1],
	[p_pic2],
	[p_tempid],
	[p_picid],
	[p_addtime]
) VALUES (
	@p_pic1,
	@p_pic2,
	@p_tempid,
	@p_picid,
	@p_addtime
)

SET @P_id = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_GetInsert]
	@p_Name nvarchar(50),
	@p_Type int,
	@p_DoublePage int,
	@p_IspageTemplate int,
	@p_num int,
	@p_info ntext,
	@p_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_MuProduct] (
	[p_Name],
	[p_Type],
	[p_DoublePage],
	[p_IspageTemplate],
	[p_num],
	[p_info]
) VALUES (
	@p_Name,
	@p_Type,
	@p_DoublePage,
	@p_IspageTemplate,
	@p_num,
	@p_info
)

SET @p_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_InsertUpdate]
	@p_ID int,
	@p_Name nvarchar(50),
	@p_Type int,
	@p_DoublePage int,
	@p_IspageTemplate int,
	@p_num int,
	@p_info ntext
AS

IF EXISTS(SELECT [p_ID] FROM [dbo].[ZL_MuProduct] WHERE [p_ID] = @p_ID)
BEGIN
	UPDATE [dbo].[ZL_MuProduct] SET
		[p_Name] = @p_Name,
		[p_Type] = @p_Type,
		[p_DoublePage] = @p_DoublePage,
		[p_IspageTemplate] = @p_IspageTemplate,
		[p_num] = @p_num,
		[p_info] = @p_info
	WHERE
		[p_ID] = @p_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MuProduct] (	
	[p_Name],
	[p_Type],
	[p_DoublePage],
	[p_IspageTemplate],
	[p_num],
	[p_info]
	) VALUES (
	@p_Name,
	@p_Type,
	@p_DoublePage,
	@p_IspageTemplate,
	@p_num,
	@p_info
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_GetUpdate]
	@p_ID int,
	@p_Name nvarchar(50),
	@p_Type int,
	@p_DoublePage int,
	@p_IspageTemplate int,
	@p_num int,
	@p_info ntext
AS

UPDATE [dbo].[ZL_MuProduct] SET
	[p_Name] = @p_Name,
	[p_Type] = @p_Type,
	[p_DoublePage] = @p_DoublePage,
	[p_IspageTemplate] = @p_IspageTemplate,
	[p_num] = @p_num,
	[p_info] = @p_info
WHERE
	[p_ID] = @p_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_DeleteByp_ID]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_DeleteByp_ID]
	@p_ID int
AS

DELETE FROM [dbo].[ZL_MuProduct]
WHERE
	[p_ID] = @p_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_GetSelect]
	@p_ID int
AS

SELECT
	[p_ID],
	[p_Name],
	[p_Type],
	[p_DoublePage],
	[p_IspageTemplate],
	[p_num],
	[p_info]
FROM
	[dbo].[ZL_MuProduct]
WHERE
	[p_ID] = @p_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuProduct_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuProduct_Select_All]
AS


SELECT
	[p_ID],
	[p_Name],
	[p_Type],
	[p_DoublePage],
	[p_IspageTemplate],
	[p_num],
	[p_info]
FROM
	[dbo].[ZL_MuProduct]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_GetSelect]
	@cl_ID int
AS

SELECT
	[cl_ID],
	[cl_PClass],
	[cl_Name],
	[cl_Num],
	[cl_GuiGe],
	[cl_Paiban],
	[cl_Class]
FROM
	[dbo].[ZL_MuClass]
WHERE
	[cl_ID] = @cl_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_DeleteBycl_ID]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_DeleteBycl_ID]
	@cl_ID int
AS

DELETE FROM [dbo].[ZL_MuClass]
WHERE
	[cl_ID] = @cl_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_Select_All]
AS


SELECT
	[cl_ID],
	[cl_PClass],
	[cl_Name],
	[cl_Num],
	[cl_GuiGe],
	[cl_Paiban],
	[cl_Class]
FROM
	[dbo].[ZL_MuClass]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_GetUpdate]
	@cl_ID int,
	@cl_PClass int,
	@cl_Name nvarchar(500),
	@cl_Num int,
	@cl_GuiGe nvarchar(255),
	@cl_Paiban int,
	@cl_Class nvarchar(255)
AS

UPDATE [dbo].[ZL_MuClass] SET
	[cl_PClass] = @cl_PClass,
	[cl_Name] = @cl_Name,
	[cl_Num] = @cl_Num,
	[cl_GuiGe] = @cl_GuiGe,
	[cl_Paiban] = @cl_Paiban,
	[cl_Class] = @cl_Class
WHERE
	[cl_ID] = @cl_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_InsertUpdate]
	@cl_ID int,
	@cl_PClass int,
	@cl_Name nvarchar(500),
	@cl_Num int,
	@cl_GuiGe nvarchar(255),
	@cl_Paiban int,
	@cl_Class nvarchar(255)
AS

IF EXISTS(SELECT [cl_ID] FROM [dbo].[ZL_MuClass] WHERE [cl_ID] = @cl_ID)
BEGIN
	UPDATE [dbo].[ZL_MuClass] SET
		[cl_PClass] = @cl_PClass,
		[cl_Name] = @cl_Name,
		[cl_Num] = @cl_Num,
		[cl_GuiGe] = @cl_GuiGe,
		[cl_Paiban] = @cl_Paiban,
		[cl_Class] = @cl_Class
	WHERE
		[cl_ID] = @cl_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MuClass] (	
	[cl_PClass],
	[cl_Name],
	[cl_Num],
	[cl_GuiGe],
	[cl_Paiban],
	[cl_Class]
	) VALUES (
	@cl_PClass,
	@cl_Name,
	@cl_Num,
	@cl_GuiGe,
	@cl_Paiban,
	@cl_Class
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuClas_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuClas_GetInsert]
	@cl_PClass int,
	@cl_Name nvarchar(500),
	@cl_Num int,
	@cl_GuiGe nvarchar(255),
	@cl_Paiban int,
	@cl_Class nvarchar(255),
	@cl_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_MuClass] (
	[cl_PClass],
	[cl_Name],
	[cl_Num],
	[cl_GuiGe],
	[cl_Paiban],
	[cl_Class]
) VALUES (
	@cl_PClass,
	@cl_Name,
	@cl_Num,
	@cl_GuiGe,
	@cl_Paiban,
	@cl_Class
)

SET @cl_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_InsertUpdate]
	@U_PageID int,
	@U_PClass int,
	@U_Class int,
	@U_Pagenum int,
	@U_PageUrl nvarchar(255),
	@U_Xml ntext,
	@U_Tid int
AS

IF EXISTS(SELECT [U_PageID] FROM [dbo].[ZL_MuPage] WHERE [U_PageID] = @U_PageID)
BEGIN
	UPDATE [dbo].[ZL_MuPage] SET
		[U_PClass] = @U_PClass,
		[U_Class] = @U_Class,
		[U_Pagenum] = @U_Pagenum,
		[U_PageUrl] = @U_PageUrl,
		[U_Xml] = @U_Xml,
		[U_Tid] = @U_Tid
	WHERE
		[U_PageID] = @U_PageID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MuPage] (	
	[U_PClass],
	[U_Class],
	[U_Pagenum],
	[U_PageUrl],
	[U_Xml],
	[U_Tid]
	) VALUES (
	@U_PClass,
	@U_Class,
	@U_Pagenum,
	@U_PageUrl,
	@U_Xml,
	@U_Tid
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_GetUpdate]
	@U_PageID int,
	@U_PClass int,
	@U_Class int,
	@U_Pagenum int,
	@U_PageUrl nvarchar(255),
	@U_Xml ntext,
	@U_Tid int
AS

UPDATE [dbo].[ZL_MuPage] SET
	[U_PClass] = @U_PClass,
	[U_Class] = @U_Class,
	[U_Pagenum] = @U_Pagenum,
	[U_PageUrl] = @U_PageUrl,
	[U_Xml] = @U_Xml,
	[U_Tid] = @U_Tid
WHERE
	[U_PageID] = @U_PageID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_GetSelect]
	@U_PageID int
AS

SELECT
	[U_PageID],
	[U_PClass],
	[U_Class],
	[U_Pagenum],
	[U_PageUrl],
	[U_Xml],
	[U_Tid]
FROM
	[dbo].[ZL_MuPage]
WHERE
	[U_PageID] = @U_PageID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_DeleteByU_PageID]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_DeleteByU_PageID]
	@U_PageID int
AS

DELETE FROM [dbo].[ZL_MuPage]
WHERE
	[U_PageID] = @U_PageID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_GetInsert]
	@U_PClass int,
	@U_Class int,
	@U_Pagenum int,
	@U_PageUrl nvarchar(255),
	@U_Xml ntext,
	@U_Tid int,
	@U_PageID int OUTPUT
AS

INSERT INTO [dbo].[ZL_MuPage] (
	[U_PClass],
	[U_Class],
	[U_Pagenum],
	[U_PageUrl],
	[U_Xml],
	[U_Tid]
) VALUES (
	@U_PClass,
	@U_Class,
	@U_Pagenum,
	@U_PageUrl,
	@U_Xml,
	@U_Tid
)

SET @U_PageID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuPage_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuPage_Select_All]
AS


SELECT
	[U_PageID],
	[U_PClass],
	[U_Class],
	[U_Pagenum],
	[U_PageUrl],
	[U_Xml],
	[U_Tid]
FROM
	[dbo].[ZL_MuPage]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_GetSelect]
	@Mu_ID int
AS

SELECT
	[Mu_ID],
	[Mu_Class],
	[Mu_Title],
	[Mu_BackImg],
	[Mu_Guige],
	[Mu_UserChange],
	[Mu_Xml],
	[Mu_PageType],
	[Mu_ModelTemp],
	[Mu_PClass],
	[Mu_Num]
FROM
	[dbo].[ZL_MuTemp]
WHERE
	[Mu_ID] = @Mu_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_GetInsert]
	@Mu_Class int,
	@Mu_Title nvarchar(255),
	@Mu_BackImg nvarchar(500),
	@Mu_Guige nvarchar(255),
	@Mu_UserChange int,
	@Mu_Xml ntext,
	@Mu_PageType int,
	@Mu_ModelTemp int,
	@Mu_PClass int,
	@Mu_Num int,
	@Mu_ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_MuTemp] (
	[Mu_Class],
	[Mu_Title],
	[Mu_BackImg],
	[Mu_Guige],
	[Mu_UserChange],
	[Mu_Xml],
	[Mu_PageType],
	[Mu_ModelTemp],
	[Mu_PClass],
	[Mu_Num]
) VALUES (
	@Mu_Class,
	@Mu_Title,
	@Mu_BackImg,
	@Mu_Guige,
	@Mu_UserChange,
	@Mu_Xml,
	@Mu_PageType,
	@Mu_ModelTemp,
	@Mu_PClass,
	@Mu_Num
)

SET @Mu_ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_GetUpdate]
	@Mu_ID int,
	@Mu_Class int,
	@Mu_Title nvarchar(255),
	@Mu_BackImg nvarchar(500),
	@Mu_Guige nvarchar(255),
	@Mu_UserChange int,
	@Mu_Xml ntext,
	@Mu_PageType int,
	@Mu_ModelTemp int,
	@Mu_PClass int,
	@Mu_Num int
AS

UPDATE [dbo].[ZL_MuTemp] SET
	[Mu_Class] = @Mu_Class,
	[Mu_Title] = @Mu_Title,
	[Mu_BackImg] = @Mu_BackImg,
	[Mu_Guige] = @Mu_Guige,
	[Mu_UserChange] = @Mu_UserChange,
	[Mu_Xml] = @Mu_Xml,
	[Mu_PageType] = @Mu_PageType,
	[Mu_ModelTemp] = @Mu_ModelTemp,
	[Mu_PClass] = @Mu_PClass,
	[Mu_Num] = @Mu_Num
WHERE
	[Mu_ID] = @Mu_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_InsertUpdate]
	@Mu_ID int,
	@Mu_Class int,
	@Mu_Title nvarchar(255),
	@Mu_BackImg nvarchar(500),
	@Mu_Guige nvarchar(255),
	@Mu_UserChange int,
	@Mu_Xml ntext,
	@Mu_PageType int,
	@Mu_ModelTemp int,
	@Mu_PClass int,
	@Mu_Num int
AS

IF EXISTS(SELECT [Mu_ID] FROM [dbo].[ZL_MuTemp] WHERE [Mu_ID] = @Mu_ID)
BEGIN
	UPDATE [dbo].[ZL_MuTemp] SET
		[Mu_Class] = @Mu_Class,
		[Mu_Title] = @Mu_Title,
		[Mu_BackImg] = @Mu_BackImg,
		[Mu_Guige] = @Mu_Guige,
		[Mu_UserChange] = @Mu_UserChange,
		[Mu_Xml] = @Mu_Xml,
		[Mu_PageType] = @Mu_PageType,
		[Mu_ModelTemp] = @Mu_ModelTemp,
		[Mu_PClass] = @Mu_PClass,
		[Mu_Num] = @Mu_Num
	WHERE
		[Mu_ID] = @Mu_ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MuTemp] (	
	[Mu_Class],
	[Mu_Title],
	[Mu_BackImg],
	[Mu_Guige],
	[Mu_UserChange],
	[Mu_Xml],
	[Mu_PageType],
	[Mu_ModelTemp],
	[Mu_PClass],
	[Mu_Num]
	) VALUES (
	@Mu_Class,
	@Mu_Title,
	@Mu_BackImg,
	@Mu_Guige,
	@Mu_UserChange,
	@Mu_Xml,
	@Mu_PageType,
	@Mu_ModelTemp,
	@Mu_PClass,
	@Mu_Num
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_DeleteByMu_ID]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_DeleteByMu_ID]
	@Mu_ID int
AS

DELETE FROM [dbo].[ZL_MuTemp]
WHERE
	[Mu_ID] = @Mu_ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MuTemp_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MuTemp_Select_All]
AS


SELECT
	[Mu_ID],
	[Mu_Class],
	[Mu_Title],
	[Mu_BackImg],
	[Mu_Guige],
	[Mu_UserChange],
	[Mu_Xml],
	[Mu_PageType],
	[Mu_ModelTemp],
	[Mu_PClass],
	[Mu_Num]
FROM
	[dbo].[ZL_MuTemp]

' 
END
GO
--
--w

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_MoneyManage]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_MoneyManage]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_Select_All]
AS

SELECT * from ZL_MoneyManage
where (select money_code from ZL_defray) like  ''%''+money_code+''%''

order by is_flag desc,flow
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_GetSelect]
	@Flow int
AS

SELECT
	[Flow],
	[Money_code],
	[Money_descp],
	[Money_sign],
	[Money_rate],
	[Is_flag]
FROM
	[dbo].[ZL_MoneyManage]
WHERE
	[Flow] = @Flow

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_GetInsert]
	@Money_code varchar(10),
	@Money_descp varchar(20),
	@Money_sign varchar(4),
	@Money_rate numeric(18, 5),
	@Is_flag char(1),
	@Flow int OUTPUT
AS

INSERT INTO [dbo].[ZL_MoneyManage] (
	[Money_code],
	[Money_descp],
	[Money_sign],
	[Money_rate],
	[Is_flag]
) VALUES (
	@Money_code,
	@Money_descp,
	@Money_sign,
	@Money_rate,
	@Is_flag
)

SET @Flow = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_GetUpdate]
	@Flow int,
	@Money_code varchar(10),
	@Money_descp varchar(20),
	@Money_sign varchar(4),
	@Money_rate numeric(18, 5),
	@Is_flag char(1)
AS

UPDATE [dbo].[ZL_MoneyManage] SET
	[Money_code] = @Money_code,
	[Money_descp] = @Money_descp,
	[Money_sign] = @Money_sign,
	[Money_rate] = @Money_rate,
	[Is_flag] = @Is_flag
WHERE
	[Flow] = @Flow

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_InsertUpdate]
	@Flow int,
	@Money_code varchar(10),
	@Money_descp varchar(20),
	@Money_sign varchar(4),
	@Money_rate numeric(18, 5),
	@Is_flag char(1)
AS

IF EXISTS(SELECT [Flow] FROM [dbo].[ZL_MoneyManage] WHERE [Flow] = @Flow)
BEGIN
	UPDATE [dbo].[ZL_MoneyManage] SET
		[Money_code] = @Money_code,
		[Money_descp] = @Money_descp,
		[Money_sign] = @Money_sign,
		[Money_rate] = @Money_rate,
		[Is_flag] = @Is_flag
	WHERE
		[Flow] = @Flow
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_MoneyManage] (	
	[Money_code],
	[Money_descp],
	[Money_sign],
	[Money_rate],
	[Is_flag]
	) VALUES (
	@Money_code,
	@Money_descp,
	@Money_sign,
	@Money_rate,
	@Is_flag
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_MoneyManage_DeleteByFlow]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_MoneyManage_DeleteByFlow]
	@Flow int
AS

DELETE FROM [dbo].[ZL_MoneyManage]
WHERE
	[Flow] = @Flow

' 
END
GO
--
--20090907start
CREATE proc [dbo].[PR_Commodities_Adds]
	@id int,
	@Class int,
	@Nodeid int,
	@ModelID int,
	@Categoryid int,
	@ProCode varchar(50),
	@BarCode varchar(50),
	@Proname varchar(255),
	@Kayword varchar(255),
	@ProUnit varchar(50),
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@ProClass int,
	@Properties int,
	@Sales int,
	@Rateset int,
	@Proinfo text,
	@Procontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Producer varchar(255),
	@Brand varchar(50),
	@Allowed int,
	@Quota int,
	@DownQuota int,
	@Stock int,
	@StockDown int,
	@JisuanFs int,
	@Rate money,
	@Dengji int,
	@ShiPrice money,
	@LinPrice money,
	@Wholesales int,
	@Wholesaleone int,
	@Preset varchar(255),
	@Integral int,
	@Propeid int,
	@Recommend int,
	@Priority int,
	@AllClickNum int,
	@UpdateTime datetime,
	@ModeTemplate varchar(255),
	@AddUser varchar(50),
	@DownCar int,
	@AddTime datetime,
	@TableName varchar(50),
	@Istrue int,
	@Isgood int,
	@MakeHtml int,
	@Sold int,
	@isnew int,
	@ishot int,
	@isbest int,
	@Wholesalesinfo varchar(255),
	@ItemID int,
	@ComModelID int,
	@Largess int,
	@Largesspirx money,
	@ProjectType int,
	@ProjectPronum int,
	@ProjectMoney money,
	@IntegralNum int,
	@PesentNames nvarchar(255),
	@PesentNameid int,
	@ProSeller nvarchar(255),
	@FirstNodeID int
as
	DECLARE @OrderID int
	Set @OrderID=(select max(OrderID) from ZL_Commodities)+1
	insert into ZL_Commodities
(OrderID,Class,Nodeid,ModelID,Categoryid,ProCode,BarCode,Proname,Kayword,ProUnit,Weight,ServerPeriod,ServerType,ProClass,Properties,Sales,Proinfo,Procontent,Clearimg,Thumbnails,Producer,Brand,Allowed,Quota,DownQuota,Stock,StockDown,JisuanFs,Rate,Rateset,Dengji,ShiPrice,LinPrice,Wholesales,Wholesaleone,Preset,Integral,Propeid,Recommend,Priority,AllClickNum,UpdateTime,ModeTemplate,AddUser,DownCar,AddTime,TableName,Istrue,Isgood,MakeHtml,Sold,isnew,ishot,isbest,Wholesalesinfo,ItemID,ComModelID,Largess,Largesspirx,ProjectType,ProjectPronum,ProjectMoney,IntegralNum,PesentNames,PesentNameid,ProSeller,FirstNodeID)
	values
(@OrderID,@Class,@Nodeid,@ModelID,@Categoryid,@ProCode,@BarCode,@Proname,@Kayword,@ProUnit,@Weight,@ServerPeriod,@ServerType,@ProClass,@Properties,@Sales,@Proinfo,@Procontent,@Clearimg,@Thumbnails,@Producer,@Brand,@Allowed,@Quota,@DownQuota,@Stock,@StockDown,@JisuanFs,@Rate,@Rateset,@Dengji,@ShiPrice,@LinPrice,@Wholesales,@Wholesaleone,@Preset,@Integral,@Propeid,@Recommend,@Priority,@AllClickNum,@UpdateTime,@ModeTemplate,@AddUser,@DownCar,@AddTime,@TableName,@Istrue,@Isgood,@MakeHtml,@Sold,@isnew,@ishot,@isbest,@Wholesalesinfo,@ItemID,@ComModelID,@Largess,@Largesspirx,@ProjectType,@ProjectPronum,@ProjectMoney,@IntegralNum,@PesentNames,@PesentNameid,@ProSeller,@FirstNodeID)


GO

CREATE PROCEDURE [dbo].[PR_Commodities_Updates]
	@ID int,
	@Class int,
	@Nodeid int,
	@ModelID int,
	@Categoryid int,
	@ProCode varchar(50),
	@BarCode varchar(50),
	@Proname varchar(255),
	@Kayword varchar(255),
	@ProUnit varchar(50),
	@Weight int,
	@ServerPeriod int,
	@ServerType int,
	@ProClass int,
	@Properties int,
	@Sales int,
	@Proinfo text,
	@Procontent text,
	@Clearimg varchar(255),
	@Thumbnails varchar(255),
	@Producer varchar(255),
	@Brand varchar(50),
	@Allowed int,
	@Quota int,
	@DownQuota int,
	@Stock int,
	@StockDown int,
	@JisuanFs int,
	@Rate money,
	@Rateset int,
	@Dengji int,
	@ShiPrice money,
	@LinPrice money,
	@MemberPrice varchar(255),
	@ActPrice varchar(255),
	@Wholesales int,
	@Wholesaleone int,
	@Wholesalesinfo varchar(255),
	@Preset varchar(255),
	@Integral int,
	@Propeid int,
	@Recommend int,
	@Priority int,
	@MonthClickNum int,
	@UpdateTime datetime,
	@ModeTemplate varchar(255),
	@AddUser varchar(50),
	@DownCar int,
	@AddTime datetime,
	@TableName varchar(50),
	@Istrue int,
	@Isgood int,
	@MakeHtml int,
	@Sold int,
	@isnew int,
	@ishot int,
	@isbest int,
	@ItemID int,
	@ComModelID int,
	@AllClickNum int,
	@Largess int,
	@Largesspirx money,
	@ProjectType int,
	@ProjectPronum int,
	@ProjectMoney money,
	@IntegralNum int,
	@PesentNames nvarchar(255),
	@PesentNameid int,
	@ProSeller nvarchar(255),
	@FirstNodeID int
AS

UPDATE [dbo].[ZL_Commodities] SET
	[Class] = @Class,
	[Nodeid] = @Nodeid,
	[ModelID] = @ModelID,
	[Categoryid] = @Categoryid,
	[ProCode] = @ProCode,
	[BarCode] = @BarCode,
	[Proname] = @Proname,
	[Kayword] = @Kayword,
	[ProUnit] = @ProUnit,
	[Weight] = @Weight,
	[ServerPeriod] = @ServerPeriod,
	[ServerType] = @ServerType,
	[ProClass] = @ProClass,
	[Properties] = @Properties,
	[Sales] = @Sales,
	[Proinfo] = @Proinfo,
	[Procontent] = @Procontent,
	[Clearimg] = @Clearimg,
	[Thumbnails] = @Thumbnails,
	[Producer] = @Producer,
	[Brand] = @Brand,
	[Allowed] = @Allowed,
	[Quota] = @Quota,
	[DownQuota] = @DownQuota,
	[Stock] = @Stock,
	[StockDown] = @StockDown,
	[JisuanFs] = @JisuanFs,
	[Rate] = @Rate,
	[Rateset] = @Rateset,
	[Dengji] = @Dengji,
	[ShiPrice] = @ShiPrice,
	[LinPrice] = @LinPrice,
	[MemberPrice] = @MemberPrice,
	[ActPrice] = @ActPrice,
	[Wholesales] = @Wholesales,
	[Wholesaleone] = @Wholesaleone,
	[Wholesalesinfo] = @Wholesalesinfo,
	[Preset] = @Preset,
	[Integral] = @Integral,
	[Propeid] = @Propeid,
	[Recommend] = @Recommend,
	[Priority] = @Priority,
	[MonthClickNum] = @MonthClickNum,
	[UpdateTime] = @UpdateTime,
	[ModeTemplate] = @ModeTemplate,
	[AddUser] = @AddUser,
	[DownCar] = @DownCar,
	[AddTime] = @AddTime,
	[TableName] = @TableName,
	[Istrue] = @Istrue,
	[Isgood] = @Isgood,
	[MakeHtml] = @MakeHtml,
	[Sold] = @Sold,
	[isnew] = @isnew,
	[ishot] = @ishot,
	[isbest] = @isbest,
	[ItemID] = @ItemID,
	[ComModelID] = @ComModelID,
	[AllClickNum] = @AllClickNum,
	[Largess] = @Largess,
	[Largesspirx] = @Largesspirx,
	[ProjectType] = @ProjectType,
	[ProjectPronum] = @ProjectPronum,
	[ProjectMoney] = @ProjectMoney,
	[IntegralNum] = @IntegralNum,
	[PesentNames] = @PesentNames,
	[PesentNameid] = @PesentNameid,
	[ProSeller] = @ProSeller,
	[FirstNodeID]=@FirstNodeID
WHERE
	[ID] = @ID


GO

CREATE PROCEDURE [dbo].[PR_CartPro_Updates]
	@ID int,
	@CartID int,
	@ProID int,
	@Pronum int,
	@Username varchar(255),
	@Proname varchar(255),
	@Danwei varchar(50),
	@Shijia money,
	@AllMoney money,
	@Addtime datetime,
	@Bindpro nvarchar(50),
	@ProSeller nvarchar(255)
AS

UPDATE [dbo].[ZL_CartPro] SET
	[CartID] = @CartID,
	[ProID] = @ProID,
	[Pronum] = @Pronum,
	[Username] = @Username,
	[Proname] = @Proname,
	[Danwei] = @Danwei,
	[Shijia] = @Shijia,
	[AllMoney] = @AllMoney,
	[Addtime] = @Addtime,
	[Bindpro] = @Bindpro,
	[ProSeller] = @ProSeller
WHERE
	[ID] = @ID


GO


CREATE PROCEDURE [dbo].[PR_CartPro_Adds]
	@CartID int,
	@ProID int,
	@Pronum int,
	@Username varchar(255),
	@Proname varchar(255),
	@Danwei varchar(50),
	@Shijia money,
	@AllMoney money,
	@Addtime datetime,
	@Bindpro nvarchar(50),
	@ProSeller nvarchar(255),
	@ID int OUTPUT,
	@PerID nvarchar(20),
	@city nvarchar(50),
	@type int
AS

INSERT INTO [dbo].[ZL_CartPro] (
	[CartID],
	[ProID],
	[Pronum],
	[Username],
	[Proname],
	[Danwei],
	[Shijia],
	[AllMoney],
	[Addtime],
	[Bindpro],
	[ProSeller],
	[PerID],
	[city],
	[type]
) VALUES (
	@CartID,
	@ProID,
	@Pronum,
	@Username,
	@Proname,
	@Danwei,
	@Shijia,
	@AllMoney,
	@Addtime,
	@Bindpro,
	@ProSeller,
	@PerID,
	@city,
	@type
)
SET @ID = SCOPE_IDENTITY()
GO


--20090907end

 CREATE TABLE [dbo].[ZL_Defray](
	[flow] [int] IDENTITY(1,1) NOT NULL,
	[Pay_name] [varchar](100) NULL,
	[Pay_intf] [varchar](100) NULL,
	[Client_id] [varchar](50) NOT NULL,
	[Title] [varchar](100) NULL,
	[money_code] [varchar](100) NULL,
	[number] [varchar](50) NULL,
 CONSTRAINT [PK_ZL_Defray] PRIMARY KEY CLUSTERED 
(
	[flow] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO

EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'方式名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Defray', @level2type=N'COLUMN', @level2name=N'Pay_name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'接品类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Defray', @level2type=N'COLUMN', @level2name=N'Pay_intf'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Defray', @level2type=N'COLUMN', @level2name=N'Client_id'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'身份标记' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Defray', @level2type=N'COLUMN', @level2name=N'Title'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支持交易货币' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Defray', @level2type=N'COLUMN', @level2name=N'money_code'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付手续费' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Defray', @level2type=N'COLUMN', @level2name=N'number'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Defray]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Defray]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_Select_All]
AS


SELECT
	[flow],
	[Pay_name],
	[Pay_intf],
	[Client_id],
	[Title],
	[money_code],
	[number]
FROM
	[dbo].[ZL_Defray]

' 
END
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

create   PROCEDURE [dbo].[PR_Defray_InsertUpdate]
	@flow int,
	@Pay_name varchar(100),
	@Pay_intf varchar(100),
	@Client_id varchar(50),
	@Title varchar(100),
	@money_code varchar(100),
	@number varchar(50)
AS

if (select count(*) from  ZL_Defray)>0
begin
UPDATE [dbo].[ZL_Defray] SET	
	[Pay_name] = @Pay_name,
	[Pay_intf] = @Pay_intf,
	[Title] = @Title,
	[money_code] = @money_code,
	[number] = @number,
	[Client_id] = @Client_id
end
else
begin
INSERT INTO [dbo].[ZL_Defray] (

	[Pay_name],
	[Pay_intf],
	[Client_id],
	[Title],
	[money_code],
	[number]
) VALUES (

	@Pay_name,
	@Pay_intf,
	@Client_id,
	@Title,
	@money_code,
	@number
)
end

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_GetSelect]
	@Client_id varchar(50)
AS

SELECT
	[Pay_name],
	[Pay_intf],
	[Client_id],
	[Title],
	[money_code],
	[number]
FROM
	[dbo].[ZL_Defray]
WHERE
	[Client_id] = @Client_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_GetInsert]
	@Pay_name varchar(100),
	@Pay_intf varchar(100),
	@Client_id varchar(50),
	@Title varchar(100),
	@money_code varchar(100),
	@number varchar(50)
AS

INSERT INTO [dbo].[ZL_Defray] (
	[Pay_name],
	[Pay_intf],
	[Client_id],
	[Title],
	[money_code],
	[number]
) VALUES (
	@Pay_name,
	@Pay_intf,
	@Client_id,
	@Title,
	@money_code,
	@number
)

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_GetUpdate]
	@Pay_name varchar(100),
	@Pay_intf varchar(100),
	@Client_id varchar(50),
	@Title varchar(100),
	@money_code varchar(100),
	@number varchar(50)
AS

UPDATE [dbo].[ZL_Defray] SET
	[Pay_name] = @Pay_name,
	[Pay_intf] = @Pay_intf,
	[Title] = @Title,
	[money_code] = @money_code,
	[number] = @number
WHERE
	[Client_id] = @Client_id

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Defray_DeleteByClient_id]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Defray_DeleteByClient_id]
	@Client_id varchar(50)
AS

DELETE FROM [dbo].[ZL_Defray]
WHERE
	[Client_id] = @Client_id

' 
END
 ---end
 ---wlb 2009-9-12
 GO
 
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

Create  proc [dbo].[pr_GetNodeIdOption] (@nodeid varchar(100),@generalid varchar(100))
as
BEGIN

CREATE TABLE #temp1(nodeid int)
while(charindex(',',@nodeid)>1)
begin
INSERT INTO #temp1 VALUES(cast(substring(@nodeid,0,charindex(',',@nodeid)) AS int))
SET @nodeid = substring(@nodeid,charindex(',',@nodeid)+1,len(@nodeid))
end 
IF len(@nodeid)>1
INSERT INTO #temp1 VALUES(cast(@nodeid AS int))

CREATE TABLE #temp2(generalid int)	
while(charindex(',',@generalid)>1)
begin
INSERT INTO #temp2 VALUES(cast(substring(@generalid,0,charindex(',',@generalid)) AS int))
SET @generalid = substring(@generalid,charindex(',',@generalid)+1,len(@generalid))
end 
IF len(@generalid)>1
INSERT INTO #temp2 VALUES(cast(@generalid AS int))


if(select count(*) from zl_node a,ZL_Model b 
where a.nodeid IN (SELECT NodeID FROM #temp1) AND b.ModelID LIKE '%'+a.contentmodel+'%'
and b.frommodel NOT in
(select b.frommodel from zl_commonmodel a,zl_model b 
where a.generalid IN (SELECT GeneralID FROM #temp2) AND a.modelid=b.modelid)
)>0
begin
select a.* from zl_node a,ZL_Model b 
where a.nodeid IN (SELECT NodeID FROM #temp1) AND b.ModelID LIKE '%'+a.contentmodel+'%'
and b.frommodel NOT in
(select b.frommodel from zl_commonmodel a,zl_model b 
where a.generalid IN (SELECT GeneralID FROM #temp2) AND a.modelid=b.modelid)
return
end


if(select count(*) from zl_node a,ZL_Model b 
where a.nodeid IN (SELECT NodeID FROM #temp1) AND b.ModelID LIKE '%'+a.contentmodel+'%'
and b.frommodel in
(select b.frommodel from zl_commonmodel a,zl_model b 
where a.generalid IN (SELECT GeneralID FROM #temp2) AND a.modelid=b.modelid)
)=(SELECT count(*)FROM #temp1)

begin
Declare @nid int,@gid int,@modelid int,@column varchar(50),@co varchar(500)
declare @sql varchar(500),@itemid varchar(200),@tbname varchar(50),@tbname1 varchar(50),@tb varchar(50)

BEGIN TRANSACTION

Declare Cur Cursor for select a.NodeID,b.ModelID,b.tablename from zl_node a,ZL_Model b 
where a.nodeid IN (SELECT NodeID FROM #temp1) AND b.ModelID LIKE '%'+a.contentmodel+'%'
and b.frommodel in
(select b.frommodel from zl_commonmodel a,zl_model b 
where a.generalid IN (SELECT GeneralID FROM #temp2) AND a.modelid=b.modelid)

Open Cur
Fetch next From Cur Into @nid,@modelid,@tb
While @@fetch_status=0     
begin

Declare Cur1 Cursor for select generalid from zl_commonmodel where  generalid IN(SELECT GeneralID FROM #temp2)
Open Cur1
Fetch next From Cur1 Into @gid
While @@fetch_status=0     
begin

insert into zl_commonmodel(nodeid,modelid,itemid,tablename,title,inputer,hits,CreateTime,status,elitelevel,
infoid,specialid,iscreate,htmllink,template,tagkey,UpDateTime,titlecolor,pdflink,cast_file)
 select @nid,@modelid,itemid,@tb,title,inputer,hits,getdate(),0,elitelevel,
infoid,specialid,iscreate,htmllink,template,tagkey,getdate(),titlecolor,pdflink,@gid from zl_commonmodel where generalid=@gid


set @tbname=(select tablename from zl_commonmodel where generalid=@gid)
set @itemid=(select itemid from zl_commonmodel where generalid=@gid)
set @tbname1=(select tablename from zl_commonmodel where generalid=(select max(generalid) from zl_commonmodel))--新内容

--将表中的所有字段获取
if(select count(*) from zl_model where modelid=(select frommodel from zl_model 
	where modeLid=(select modeLid from zl_commonmodel where generalid=@gid)))>0
begin
set @tbname=(select tablename from zl_model where modelid=(select frommodel from zl_model 
				where modeLid=(select modeLid from zl_commonmodel where generalid=@gid)))
end

set @co=''
Declare Cur4 Cursor for select column_name from information_schema.columns where table_name=
 @tbname  and column_name<>'id' order by column_name
 open cur4
fetch next from cur4 into @column
while @@fetch_status=0
begin 
	set @co=@co+@column+','
fetch next from cur4 into @column
end 
close cur4 
deallocate cur4 

set @tbname=(select tablename from zl_commonmodel where generalid=@gid)
--插入一条数据
set @co=substring(@co,1,len(@co)-1)
set @sql=' insert into '+@tbname1+'('+@co+') select '+@co+' from '+@tbname+' where id='+@itemid

exec(@sql)

--更新zl_commonmodel 中新插入的 itemid
 set @sql='update zl_commonmodel set itemid=(select max(id) from '+@tbname1+') where generalid=(select max(generalid) from zl_commonmodel)'
exec(@sql)

 Fetch Next From Cur1 Into @gid
end
Close Cur1   
Deallocate Cur1

 Fetch Next From Cur Into @nid,@modelid,@tb
end
Close Cur   
Deallocate Cur

IF @@error <> 0
BEGIN
     ROLLBACK TRANSACTION
select top 1 ' ' as NodeName from zl_node
return

end
else
begin
COMMIT TRANSACTION
select top 1 '1' as NodeName from zl_node
return 
end

end
end

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO 
 ---end
 ---20090912
 CREATE PROCEDURE [dbo].[PR_GuessGameCate_GetInsert]
	@GuessCateName nvarchar(255),
	@GuessCateColor nvarchar(50),
	@OrderID int,
	@ID int OUTPUT
AS
INSERT INTO [dbo].[ZL_GuessGameCate] (
	[GuessCateName],
	[GuessCateColor],
	[OrderID]
) VALUES (
	@GuessCateName,
	@GuessCateColor,
	@OrderID
)
SET @ID = SCOPE_IDENTITY()
GO
CREATE PROCEDURE [dbo].[PR_GuessGameCate_GetUpdate]
	@ID int,
	@GuessCateName nvarchar(255),
	@GuessCateColor nvarchar(50),
	@OrderID int
AS
UPDATE [dbo].[ZL_GuessGameCate] SET
	[GuessCateName] = @GuessCateName,
	[GuessCateColor] = @GuessCateColor,
	[OrderID] = @OrderID
WHERE
	[ID] = @ID
GO
CREATE PROCEDURE [dbo].[PR_GuessGameCate_GetSelect]
	@ID int
AS
SELECT
	[ID],
	[GuessCateName],
	[GuessCateColor],
	[OrderID]
FROM
	[dbo].[ZL_GuessGameCate]
WHERE
	[ID] = @ID
GO
CREATE PROCEDURE [dbo].[PR_GuessGameCate_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS
DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_GuessGameCate]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END
EXEC sp_executesql @SQL
GO
CREATE PROCEDURE [dbo].[PR_GuessGameCate_Select_All]
AS
SELECT
	[ID],
	[GuessCateName],
	[GuessCateColor],
	[OrderID]
FROM
	[dbo].[ZL_GuessGameCate]
GO

 ---20090912end
 
 
 ---2009.09.13  lxy
 
 SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_CopyCommonModel](
	[GeneralID] [int]  NOT NULL,
	[NodeID] [int] NOT NULL,
	[ModelID] [int] NOT NULL,
	[ItemID] [int] NOT NULL,
	[TableName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Title] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Inputer] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_CopyCommonModel_Inputer]  DEFAULT (''),
	[Hits] [int] NULL CONSTRAINT [DF_ZL_CopyCommonModel_Hits]  DEFAULT (0),
	[CreateTime] [datetime] NULL CONSTRAINT [DF_ZL_CopyCommonModel_CreateTime]  DEFAULT (getdate()),
	[Status] [int] NULL CONSTRAINT [DF_ZL_CopyCommonModel_Status]  DEFAULT (0),
	[EliteLevel] [int] NULL CONSTRAINT [DF_ZL_CopyCommonModel_EliteLevel]  DEFAULT (0),
	[InfoID] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_CopyCommonModel_InfoID]  DEFAULT (''),
	[SpecialID] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_CopyCommonModel_SpecialID]  DEFAULT (''),
	[IsCreate] [int] NULL CONSTRAINT [DF_ZL_CopyCommonModel_IsCreate]  DEFAULT (0),
	[HtmlLink] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_CopyCommonModel_HtmlLink]  DEFAULT (''),
	[Template] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Tagkey] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[UpDateTime] [datetime] NULL,
	[UpDateType] [int] NULL,
	[cast_file] [int] null,
	[because_back] [nvarchar] (200) null,
	[Titlecolor] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[PdfLink] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_CopyCommonModel_PdfLink]  DEFAULT (''),
	[Rtype] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_CopyCommonModel] PRIMARY KEY CLUSTERED 
(
	[GeneralID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容全局ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'GeneralID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属节点ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'NodeID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属内容模型ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'ModelID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'相应表的记录ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'ItemID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容标题' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'Title'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'录入者' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'Inputer'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点击数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'Hits'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'生成时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'CreateTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'信息状态 -2为删除，-1为退稿，0为待审核，99为终审通过，其它为自定义' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'Status'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'EliteLevel'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属其他节点数组' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'InfoID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属专题ID数组' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'SpecialID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已生成0=未生成 1=已生成' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'IsCreate'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'生成的静态页面地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'HtmlLink'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'Tagkey'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'UpDateTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'UpDateType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题颜色' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'Titlecolor'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'生成PDF地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_CopyCommonModel', @level2type=N'COLUMN', @level2name=N'PdfLink'

GO
 ---end
  --begin  2009-9-24  wlb
 create proc [dbo].[PR_CartPro_DelPre]
	@id int
AS
DECLARE @orderlistid int,@cartid int,@su money,@num int
BEGIN
	SET @orderlistid=(SELECT TOP 1 orderlistid FROM ZL_CartPro WHERE id=@id)
	SET @cartid=(SELECT TOP 1 cartid FROM ZL_CartPro WHERE id=@id)	
	delete from ZL_CartPro  where id=@id
	SET @su=isnull((SELECT sum(allmoney) FROM ZL_CartPro WHERE cartid=@cartid),0)
	SET @num=isnull((SELECT sum(pronum) FROM ZL_CartPro WHERE cartid=@cartid),0)	
	
	UPDATE ZL_Orderinfo SET Ordersamount=@su WHERE id=@orderlistid		
	UPDATE ZL_Cart SET allmoney=@su, pronum=@num WHERE id=@cartid	
end

GO

--end
--begin209-10-9 wlb
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Client_Service](
	[Flow] [int] IDENTITY(1,1) NOT NULL,
	[ServiceTitle] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[SelectClient] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ContacterList] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Processor] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ServiceType] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ServiceMode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ServiceTime] [datetime] NULL,
	[TakeTime] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Point] [varchar](5) COLLATE Chinese_PRC_CI_AS NULL,
	[ServiceContent] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ServiceResult] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Feedback] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Remark] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[Add_date] [datetime] NULL CONSTRAINT [DF_ZL_Client_Service_Add_date]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Client_Service] PRIMARY KEY CLUSTERED 
(
	[Flow] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务主题' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ServiceTitle'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'对应客户' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'SelectClient'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户方联系人' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ContacterList'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务人员' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'Processor'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ServiceType'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务方式' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ServiceMode'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ServiceTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'花费时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'TakeTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务积分' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'Point'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ServiceContent'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'服务结果' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'ServiceResult'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户反馈' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'Feedback'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Service', @level2type=N'COLUMN', @level2name=N'Remark'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_Client_Basic]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_Client_Basic](
	[Flow] [int] IDENTITY(1,1) NOT NULL,
	[Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[P_name] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[P_alias] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Upper] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Area] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Calling] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Value] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Credit] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Importance] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Connection] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Group] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Source] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Phase] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Client_Type] [char](1) COLLATE Chinese_PRC_CI_AS NULL CONSTRAINT [DF_ZL_Client_Basic_Client_Type]  DEFAULT (0),
	[Add_Date] [datetime] NULL CONSTRAINT [DF_Table_1_add_date]  DEFAULT (getdate()),
	[Add_Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Unit_Name] [nvarchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Unit_Post] [nvarchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Unit_Title] [nvarchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Unit_Class] [nvarchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Unit_Operation] [nvarchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Unit_Address] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Title] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_Client_Basic] PRIMARY KEY CLUSTERED 
(
	[Code] ASC
) ON [PRIMARY]
) ON [PRIMARY]
End
GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'流水号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Flow'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户(企业)编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Code'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'P_name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户别名' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'P_alias'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上级客户' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Upper'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'区域' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Area'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'行业' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Calling'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'价值评估' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Value'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'信用等级' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Credit'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'重要程度' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Importance'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关系等级' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Connection'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户组别' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Group'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户来源' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Source'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'阶段' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Phase'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户类别(0为个人，1为企业)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Client_Type'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Add_Date'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'操作员' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Add_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'单位名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Unit_Name'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Unit_Post'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'称谓' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Unit_Title'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属部门' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Unit_Class'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'负责业务' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Unit_Operation'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'单位地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Unit_Address'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Basic', @level2type=N'COLUMN', @level2name=N'Title'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_Client_Enterprise]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_Client_Enterprise](
	[Flow] [int] IDENTITY(1,1) NOT NULL,
	[Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Bank_Open] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Bank_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Tax_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Co_Status] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Co_Size] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Co_Management] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Reg_Capital] [money] NULL,
	[Sales] [money] NULL,
	[Operation_Bound] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Homepage] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Message_Address] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Phone] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Fax_phone] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ZipCodeW] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[country] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[province] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[city] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_Client_Enterprise] PRIMARY KEY CLUSTERED 
(
	[Code] ASC
) ON [PRIMARY]
) ON [PRIMARY]
End
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'企业编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Code'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户银行' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Bank_Open'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'银行帐号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Bank_Code'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'税号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Tax_Code'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'行业地位' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Co_Status'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'公司规模' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Co_Size'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'经营状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Co_Management'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'注册资本' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Reg_Capital'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'年销售额' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Sales'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'业务范围' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Operation_Bound'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'网址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Enterprise', @level2type=N'COLUMN', @level2name=N'Homepage'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_Client_Penson]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_Client_Penson](
	[Flow] [int] IDENTITY(1,1) NOT NULL,
	[Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Id_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS  NULL,
	[Sex] [char](1) COLLATE Chinese_PRC_CI_AS NULL,
	[Native] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Nation] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Marriage] [char](1) COLLATE Chinese_PRC_CI_AS NULL,
	[Finish_School] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Cultrue_Love] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Sport_Love] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Life_Love] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[FUN_Love] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Other_Love] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Birthday] [datetime] NULL,
	[Income] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Home_Circs] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[Education] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Message_Address] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Work_Phone] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Home_Phone] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Fax_phone] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Telephone] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Little_Smart] [varchar](12) COLLATE Chinese_PRC_CI_AS NULL,
	[Homepage] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[QQ_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ICQ_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[UC_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Email_Address] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[MSN_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[YaoHu_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Aim_Code] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ZipCodeW] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[country] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[province] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[city] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_Client_Penson] PRIMARY KEY CLUSTERED 
(
	[Code] ASC
) ON [PRIMARY]
) ON [PRIMARY]
End

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客户编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Code'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'性别（0为女，1为男，2为未知）' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Sex'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'籍贯' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Native'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'民族' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Nation'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'婚姻状况(0为未知，1为未婚，2为已婚，3为离异)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Marriage'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'毕业学校' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Finish_School'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'文化爱好' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Cultrue_Love'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'体育爱好' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Sport_Love'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'生活爱好' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Life_Love'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'娱乐休闲爱好' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'FUN_Love'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'其他爱好' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Other_Love'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'学历' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Client_Penson', @level2type=N'COLUMN', @level2name=N'Education'

GO

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Basic_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Basic_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_GetInsert]
	@Flow int,
	@Code varchar(50),
	@P_name varchar(12),
	@P_alias varchar(12),
	@Client_Upper nvarchar(50),
	@Client_Area nvarchar(50),
	@Client_Calling nvarchar(50),
	@Client_Value nvarchar(50),
	@Client_Credit nvarchar(50),
	@Client_Importance nvarchar(50),
	@Client_Connection nvarchar(50),
	@Client_Group nvarchar(50),
	@Client_Source nvarchar(50),
	@Client_Phase nvarchar(50),
	@Client_Type char(1),
	@Add_Date datetime,
	@Add_Name nvarchar(50),
	@Unit_Name nvarchar(12),
	@Unit_Post nvarchar(12),
	@Unit_Title nvarchar(12),
	@Unit_Class nvarchar(12),
	@Unit_Operation nvarchar(12),
	@Unit_Address nvarchar(50),
	@Title nvarchar(1000)
AS

INSERT INTO [dbo].[ZL_Client_Basic] (
	[Code],
	[P_name],
	[P_alias],
	[Client_Upper],
	[Client_Area],
	[Client_Calling],
	[Client_Value],
	[Client_Credit],
	[Client_Importance],
	[Client_Connection],
	[Client_Group],
	[Client_Source],
	[Client_Phase],
	[Client_Type],
	[Add_Date],
	[Add_Name],
	[Unit_Name],
	[Unit_Post],
	[Unit_Title],
	[Unit_Class],
	[Unit_Operation],
	[Unit_Address],
	[Title]
) VALUES (
	@Code,
	@P_name,
	@P_alias,
	@Client_Upper,
	@Client_Area,
	@Client_Calling,
	@Client_Value,
	@Client_Credit,
	@Client_Importance,
	@Client_Connection,
	@Client_Group,
	@Client_Source,
	@Client_Phase,
	@Client_Type,
	@Add_Date,
	@Add_Name,
	@Unit_Name,
	@Unit_Post,
	@Unit_Title,
	@Unit_Class,
	@Unit_Operation,
	@Unit_Address,
	@Title
)

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_GetUpdate]
	@Flow int,
	@Code varchar(50),
	@P_name varchar(12),
	@P_alias varchar(12),
	@Client_Upper nvarchar(50),
	@Client_Area nvarchar(50),
	@Client_Calling nvarchar(50),
	@Client_Value nvarchar(50),
	@Client_Credit nvarchar(50),
	@Client_Importance nvarchar(50),
	@Client_Connection nvarchar(50),
	@Client_Group nvarchar(50),
	@Client_Source nvarchar(50),
	@Client_Phase nvarchar(50),
	@Client_Type char(1),
	@Add_Date datetime,
	@Add_Name nvarchar(50),
	@Unit_Name nvarchar(12),
	@Unit_Post nvarchar(12),
	@Unit_Title nvarchar(12),
	@Unit_Class nvarchar(12),
	@Unit_Operation nvarchar(12),
	@Unit_Address nvarchar(50),
	@Title nvarchar(1000)
AS

UPDATE [dbo].[ZL_Client_Basic] SET
	[P_name] = @P_name,
	[P_alias] = @P_alias,
	[Client_Upper] = @Client_Upper,
	[Client_Area] = @Client_Area,
	[Client_Calling] = @Client_Calling,
	[Client_Value] = @Client_Value,
	[Client_Credit] = @Client_Credit,
	[Client_Importance] = @Client_Importance,
	[Client_Connection] = @Client_Connection,
	[Client_Group] = @Client_Group,
	[Client_Source] = @Client_Source,
	[Client_Phase] = @Client_Phase,
	[Client_Type] = @Client_Type,
	[Add_Date] = @Add_Date,
	[Add_Name] = @Add_Name,
	[Unit_Name] = @Unit_Name,
	[Unit_Post] = @Unit_Post,
	[Unit_Title] = @Unit_Title,
	[Unit_Class] = @Unit_Class,
	[Unit_Operation] = @Unit_Operation,
	[Unit_Address] = @Unit_Address,
	[Title] = @Title
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_InsertUpdate]
	@Flow int,
	@Code varchar(50),
	@P_name varchar(12),
	@P_alias varchar(12),
	@Client_Upper nvarchar(50),
	@Client_Area nvarchar(50),
	@Client_Calling nvarchar(50),
	@Client_Value nvarchar(50),
	@Client_Credit nvarchar(50),
	@Client_Importance nvarchar(50),
	@Client_Connection nvarchar(50),
	@Client_Group nvarchar(50),
	@Client_Source nvarchar(50),
	@Client_Phase nvarchar(50),
	@Client_Type char(1),
	@Add_Date datetime,
	@Add_Name nvarchar(50),
	@Unit_Name nvarchar(12),
	@Unit_Post nvarchar(12),
	@Unit_Title nvarchar(12),
	@Unit_Class nvarchar(12),
	@Unit_Operation nvarchar(12),
	@Unit_Address nvarchar(50),
	@Title nvarchar(1000)
AS

IF EXISTS(SELECT [Code] FROM [dbo].[ZL_Client_Basic] WHERE [Flow] = @Flow)
BEGIN
	UPDATE [dbo].[ZL_Client_Basic] SET
		[P_name] = @P_name,
		[P_alias] = @P_alias,
		[Client_Upper] = @Client_Upper,
		[Client_Area] = @Client_Area,
		[Client_Calling] = @Client_Calling,
		[Client_Value] = @Client_Value,
		[Client_Credit] = @Client_Credit,
		[Client_Importance] = @Client_Importance,
		[Client_Connection] = @Client_Connection,
		[Client_Group] = @Client_Group,
		[Client_Source] = @Client_Source,
		[Client_Phase] = @Client_Phase,
		[Client_Type] = @Client_Type,
		[Add_Date] = @Add_Date,
		[Add_Name] = @Add_Name,
		[Unit_Name] = @Unit_Name,
		[Unit_Post] = @Unit_Post,
		[Unit_Title] = @Unit_Title,
		[Unit_Class] = @Unit_Class,
		[Unit_Operation] = @Unit_Operation,
		[Unit_Address] = @Unit_Address,
		[Title] = @Title
	WHERE
		[Flow] = @Flow
END

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_GetDelete]
	@Flow int
AS

DELETE FROM [dbo].[ZL_Client_Basic]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_Client_Basic]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_GetSelect]
	@Flow int
AS

SELECT
	[Flow],
	[Code],
	[P_name],
	[P_alias],
	[Client_Upper],
	[Client_Area],
	[Client_Calling],
	[Client_Value],
	[Client_Credit],
	[Client_Importance],
	[Client_Connection],
	[Client_Group],
	[Client_Source],
	[Client_Phase],
	[Client_Type],
	[Add_Date],
	[Add_Name],
	[Unit_Name],
	[Unit_Post],
	[Unit_Title],
	[Unit_Class],
	[Unit_Operation],
	[Unit_Address],
	[Title]
FROM
	[dbo].[ZL_Client_Basic]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Client_Basic]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Basic_Select_All]
AS


SELECT
	[Flow],
	[Code],
	[P_name],
	[P_alias],
	[Client_Upper],
	[Client_Area],
	[Client_Calling],
	[Client_Value],
	[Client_Credit],
	[Client_Importance],
	[Client_Connection],
	[Client_Group],
	[Client_Source],
	[Client_Phase],
	[Client_Type],
	[Add_Date],
	[Add_Name],
	[Unit_Name],
	[Unit_Post],
	[Unit_Title],
	[Unit_Class],
	[Unit_Operation],
	[Unit_Address],
	[Title]
FROM
	[dbo].[ZL_Client_Basic]

GO
IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Enterprise_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Enterprise_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_GetInsert]
	@Flow int,
	@Code varchar(50),
	@Bank_Open varchar(50),
	@Bank_Code varchar(50),
	@Tax_Code varchar(50),
	@Co_Status nvarchar(50),
	@Co_Size nvarchar(50),
	@Co_Management nvarchar(50),
	@Reg_Capital money,
	@Sales money,
	@Operation_Bound nvarchar(50),
	@Homepage nvarchar(50),
	@Message_Address nvarchar(50),
	@Phone varchar(50),
	@Fax_phone varchar(50),
	@ZipCodeW nvarchar(255),
	@country nvarchar(255),
	@province nvarchar(255),
	@city nvarchar(255)
AS

INSERT INTO [dbo].[ZL_Client_Enterprise] (
	[Code],
	[Bank_Open],
	[Bank_Code],
	[Tax_Code],
	[Co_Status],
	[Co_Size],
	[Co_Management],
	[Reg_Capital],
	[Sales],
	[Operation_Bound],
	[Homepage],
	[Message_Address],
	[Phone],
	[Fax_phone],
	[ZipCodeW],
	[country],
	[province],
	[city]
) VALUES (
	@Code,
	@Bank_Open,
	@Bank_Code,
	@Tax_Code,
	@Co_Status,
	@Co_Size,
	@Co_Management,
	@Reg_Capital,
	@Sales,
	@Operation_Bound,
	@Homepage,
	@Message_Address,
	@Phone,
	@Fax_phone,
	@ZipCodeW,
	@country,
	@province,
	@city
)

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_GetUpdate]
	@Flow int,
	@Code varchar(50),
	@Bank_Open varchar(50),
	@Bank_Code varchar(50),
	@Tax_Code varchar(50),
	@Co_Status nvarchar(50),
	@Co_Size nvarchar(50),
	@Co_Management nvarchar(50),
	@Reg_Capital money,
	@Sales money,
	@Operation_Bound nvarchar(50),
	@Homepage nvarchar(50),
	@Message_Address nvarchar(50),
	@Phone varchar(50),
	@Fax_phone varchar(50),
	@ZipCodeW nvarchar(255),
	@country nvarchar(255),
	@province nvarchar(255),
	@city nvarchar(255)
AS

UPDATE [dbo].[ZL_Client_Enterprise] SET
	[Bank_Open] = @Bank_Open,
	[Bank_Code] = @Bank_Code,
	[Tax_Code] = @Tax_Code,
	[Co_Status] = @Co_Status,
	[Co_Size] = @Co_Size,
	[Co_Management] = @Co_Management,
	[Reg_Capital] = @Reg_Capital,
	[Sales] = @Sales,
	[Operation_Bound] = @Operation_Bound,
	[Homepage] = @Homepage,
	[Message_Address] = @Message_Address,
	[Phone] = @Phone,
	[Fax_phone] = @Fax_phone,
	[ZipCodeW]=@ZipCodeW,
	[country] = @country,
	[province] = @province,
	[city] = @city
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_InsertUpdate]
	@Flow int,
	@Code varchar(50),
	@Bank_Open varchar(50),
	@Bank_Code varchar(50),
	@Tax_Code varchar(50),
	@Co_Status nvarchar(50),
	@Co_Size nvarchar(50),
	@Co_Management nvarchar(50),
	@Reg_Capital money,
	@Sales money,
	@Operation_Bound nvarchar(50),
	@Homepage nvarchar(50),
	@Message_Address nvarchar(50),
	@Phone varchar(50),
	@Fax_phone varchar(50),
	@ZipCodeW nvarchar(255),
	@country nvarchar(255),
	@province nvarchar(255),
	@city nvarchar(255)
AS

IF EXISTS(SELECT [Code] FROM [dbo].[ZL_Client_Enterprise] WHERE [Flow] = @Flow)
BEGIN
	UPDATE [dbo].[ZL_Client_Enterprise] SET
		[Bank_Open] = @Bank_Open,
		[Bank_Code] = @Bank_Code,
		[Tax_Code] = @Tax_Code,
		[Co_Status] = @Co_Status,
		[Co_Size] = @Co_Size,
		[Co_Management] = @Co_Management,
		[Reg_Capital] = @Reg_Capital,
		[Sales] = @Sales,
		[Operation_Bound] = @Operation_Bound,
		[Homepage] = @Homepage,
		[Message_Address] = @Message_Address,
		[Phone] = @Phone,
		[Fax_phone] = @Fax_phone,
		[ZipCodeW]=@ZipCodeW,
		[country]=@country,
		[province]=@province,
		[city]=@city
	WHERE
		[Flow] = @Flow
END

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_GetDelete]
	@Flow int
AS

DELETE FROM [dbo].[ZL_Client_Enterprise]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_Client_Enterprise]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_GetSelect]
	@Flow int
AS

SELECT
	[Flow],
	[Code],
	[Bank_Open],
	[Bank_Code],
	[Tax_Code],
	[Co_Status],
	[Co_Size],
	[Co_Management],
	[Reg_Capital],
	[Sales],
	[Operation_Bound],
	[Homepage],
	[Message_Address],
	[Phone],
	[Fax_phone],
	[ZipCodeW],
	[country],
	[province],
	[city]
FROM
	[dbo].[ZL_Client_Enterprise]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Client_Enterprise]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Enterprise_Select_All]
AS


SELECT
	[Flow],
	[Code],
	[Bank_Open],
	[Bank_Code],
	[Tax_Code],
	[Co_Status],
	[Co_Size],
	[Co_Management],
	[Reg_Capital],
	[Sales],
	[Operation_Bound],
	[Homepage],
	[Message_Address],
	[Phone],
	[Fax_phone],
	[ZipCodeW],
	[country],
	[province],
	[city]
FROM
	[dbo].[ZL_Client_Enterprise]

GO
IF OBJECT_ID(N'[dbo].[PR_Client_Penson_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Penson_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Penson_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_GetInsert]
	@Flow int,
	@Code varchar(50),
	@Sex char(1),
	@Native nvarchar(50),
	@Nation varchar(12),
	@Marriage char(1),
	@Finish_School nvarchar(50),
	@Cultrue_Love nvarchar(50),
	@Sport_Love nvarchar(50),
	@Life_Love nvarchar(50),
	@FUN_Love nvarchar(50),
	@Other_Love nvarchar(50),
	@Birthday datetime,
	@Income nvarchar(50),
	@Home_Circs nvarchar(100),
	@Education nvarchar(50),
	@Message_Address nvarchar(50),
	@Work_Phone varchar(50),
	@Home_Phone varchar(50),
	@Fax_phone varchar(50),
	@Telephone varchar(50),
	@Little_Smart varchar(50),
	@Homepage nvarchar(50),
	@QQ_Code varchar(50),
	@ICQ_Code varchar(50),
	@UC_Code varchar(50),
	@Email_Address nvarchar(50),
	@MSN_Code varchar(50),
	@YaoHu_Code varchar(50),
	@Aim_Code varchar(50),
	@Id_Code varchar(50),
	@ZipCodeW nvarchar(255),
	@country nvarchar(255),
	@province nvarchar(255),
	@city nvarchar(255)
AS

INSERT INTO [dbo].[ZL_Client_Penson] (
	[Code],
	[Sex],
	[Native],
	[Nation],
	[Marriage],
	[Finish_School],
	[Cultrue_Love],
	[Sport_Love],
	[Life_Love],
	[FUN_Love],
	[Other_Love],
	[Birthday],
	[Income],
	[Home_Circs],
	[Education],
	[Message_Address],
	[Work_Phone],
	[Home_Phone],
	[Fax_phone],
	[Telephone],
	[Little_Smart],
	[Homepage],
	[QQ_Code],
	[ICQ_Code],
	[UC_Code],
	[Email_Address],
	[MSN_Code],
	[YaoHu_Code],
	[Aim_Code],
	[Id_Code],
	[ZipCodeW],
	[country],
	[province],
	[city]
) VALUES (
	@Code,
	@Sex,
	@Native,
	@Nation,
	@Marriage,
	@Finish_School,
	@Cultrue_Love,
	@Sport_Love,
	@Life_Love,
	@FUN_Love,
	@Other_Love,
	@Birthday,
	@Income,
	@Home_Circs,
	@Education,
	@Message_Address,
	@Work_Phone,
	@Home_Phone,
	@Fax_phone,
	@Telephone,
	@Little_Smart,
	@Homepage,
	@QQ_Code,
	@ICQ_Code,
	@UC_Code,
	@Email_Address,
	@MSN_Code,
	@YaoHu_Code,
	@Aim_Code,
	@Id_Code,
	@ZipCodeW,
	@country,
	@province,
	@city
)

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_GetUpdate]
	@Flow int,
	@Code varchar(50),
	@Sex char(1),
	@Native nvarchar(50),
	@Nation varchar(12),
	@Marriage char(1),
	@Finish_School nvarchar(50),
	@Cultrue_Love nvarchar(50),
	@Sport_Love nvarchar(50),
	@Life_Love nvarchar(50),
	@FUN_Love nvarchar(50),
	@Other_Love nvarchar(50),
	@Birthday datetime,
	@Income nvarchar(50),
	@Home_Circs nvarchar(100),
	@Education nvarchar(50),
	@Message_Address nvarchar(50),
	@Work_Phone varchar(50),
	@Home_Phone varchar(50),
	@Fax_phone varchar(50),
	@Telephone varchar(50),
	@Little_Smart varchar(50),
	@Homepage nvarchar(50),
	@QQ_Code varchar(50),
	@ICQ_Code varchar(50),
	@UC_Code varchar(50),
	@Email_Address nvarchar(50),
	@MSN_Code varchar(50),
	@YaoHu_Code varchar(50),
	@Aim_Code varchar(50),
	@Id_Code varchar(50),
	@ZipCodeW nvarchar(255),
	@country nvarchar(255),
	@province nvarchar(255),
	@city nvarchar(255)
AS

UPDATE [dbo].[ZL_Client_Penson] SET
	[Sex] = @Sex,
	[Native] = @Native,
	[Nation] = @Nation,
	[Marriage] = @Marriage,
	[Finish_School] = @Finish_School,
	[Cultrue_Love] = @Cultrue_Love,
	[Sport_Love] = @Sport_Love,
	[Life_Love] = @Life_Love,
	[FUN_Love] = @FUN_Love,
	[Other_Love] = @Other_Love,
	[Birthday] = @Birthday,
	[Income] = @Income,
	[Home_Circs] = @Home_Circs,
	[Education] = @Education,
	[Message_Address] = @Message_Address,
	[Work_Phone] = @Work_Phone,
	[Home_Phone] = @Home_Phone,
	[Fax_phone] = @Fax_phone,
	[Telephone] = @Telephone,
	[Little_Smart] = @Little_Smart,
	[Homepage] = @Homepage,
	[QQ_Code] = @QQ_Code,
	[ICQ_Code] = @ICQ_Code,
	[UC_Code] = @UC_Code,
	[Email_Address] = @Email_Address,
	[MSN_Code] = @MSN_Code,
	[YaoHu_Code] = @YaoHu_Code,
	[Aim_Code] = @Aim_Code,
	[Id_Code]=@Id_Code,
	[ZipCodeW]=@ZipCodeW,
	[country]=@country,
	[province]=@province,
	[city]=@city
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_InsertUpdate]
	@Flow int,
	@Code varchar(50),
	@Sex char(1),
	@Native nvarchar(50),
	@Nation varchar(12),
	@Marriage char(1),
	@Finish_School nvarchar(50),
	@Cultrue_Love nvarchar(50),
	@Sport_Love nvarchar(50),
	@Life_Love nvarchar(50),
	@FUN_Love nvarchar(50),
	@Other_Love nvarchar(50),
	@Birthday datetime,
	@Income nvarchar(50),
	@Home_Circs nvarchar(100),
	@Education nvarchar(50),
	@Message_Address nvarchar(50),
	@Work_Phone varchar(50),
	@Home_Phone varchar(50),
	@Fax_phone varchar(50),
	@Telephone varchar(50),
	@Little_Smart varchar(50),
	@Homepage nvarchar(50),
	@QQ_Code varchar(50),
	@ICQ_Code varchar(50),
	@UC_Code varchar(50),
	@Email_Address nvarchar(50),
	@MSN_Code varchar(50),
	@YaoHu_Code varchar(50),
	@Aim_Code varchar(50),
	@Id_Code varchar(50),
	@ZipCodeW nvarchar(255),
	@country nvarchar(255),
	@province nvarchar(255),
	@city nvarchar(255)
AS

IF EXISTS(SELECT [Code] FROM [dbo].[ZL_Client_Penson] WHERE [Flow] = @Flow)
BEGIN
	UPDATE [dbo].[ZL_Client_Penson] SET
		[Sex] = @Sex,
		[Native] = @Native,
		[Nation] = @Nation,
		[Marriage] = @Marriage,
		[Finish_School] = @Finish_School,
		[Cultrue_Love] = @Cultrue_Love,
		[Sport_Love] = @Sport_Love,
		[Life_Love] = @Life_Love,
		[FUN_Love] = @FUN_Love,
		[Other_Love] = @Other_Love,
		[Birthday] = @Birthday,
		[Income] = @Income,
		[Home_Circs] = @Home_Circs,
		[Education] = @Education,
		[Message_Address] = @Message_Address,
		[Work_Phone] = @Work_Phone,
		[Home_Phone] = @Home_Phone,
		[Fax_phone] = @Fax_phone,
		[Telephone] = @Telephone,
		[Little_Smart] = @Little_Smart,
		[Homepage] = @Homepage,
		[QQ_Code] = @QQ_Code,
		[ICQ_Code] = @ICQ_Code,
		[UC_Code] = @UC_Code,
		[Email_Address] = @Email_Address,
		[MSN_Code] = @MSN_Code,
		[YaoHu_Code] = @YaoHu_Code,
		[Aim_Code] = @Aim_Code,
		[Id_Code]=@Id_Code,
		[ZipCodeW]=@ZipCodeW,
		[country]=@country,
		[province]=@province,
		[city]=@city
	WHERE
		[Flow] = @Flow
END

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_GetDelete]
	@Flow int
AS

DELETE FROM [dbo].[ZL_Client_Penson]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_Client_Penson]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_GetSelect]
	@Flow int
AS

SELECT
	[Flow],
	[Code],
	[Sex],
	[Native],
	[Nation],
	[Marriage],
	[Finish_School],
	[Cultrue_Love],
	[Sport_Love],
	[Life_Love],
	[FUN_Love],
	[Other_Love],
	[Birthday],
	[Income],
	[Home_Circs],
	[Education],
	[Message_Address],
	[Work_Phone],
	[Home_Phone],
	[Fax_phone],
	[Telephone],
	[Little_Smart],
	[Homepage],
	[QQ_Code],
	[ICQ_Code],
	[UC_Code],
	[Email_Address],
	[MSN_Code],
	[YaoHu_Code],
	[Aim_Code],
	[Id_Code],
	[ZipCodeW],
	[country],
	[province],
	[city]
FROM
	[dbo].[ZL_Client_Penson]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Client_Penson]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Penson_Select_All]
AS


SELECT
	[Flow],
	[Code],
	[Sex],
	[Native],
	[Nation],
	[Marriage],
	[Finish_School],
	[Cultrue_Love],
	[Sport_Love],
	[Life_Love],
	[FUN_Love],
	[Other_Love],
	[Birthday],
	[Income],
	[Home_Circs],
	[Education],
	[Message_Address],
	[Work_Phone],
	[Home_Phone],
	[Fax_phone],
	[Telephone],
	[Little_Smart],
	[Homepage],
	[QQ_Code],
	[ICQ_Code],
	[UC_Code],
	[Email_Address],
	[MSN_Code],
	[YaoHu_Code],
	[Aim_Code],
	[Id_Code],
	[ZipCodeW],
	[country],
	[province],
	[city]
FROM
	[dbo].[ZL_Client_Penson]

GO
IF OBJECT_ID(N'[dbo].[PR_Client_Service_GetInsert]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_GetInsert]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_GetUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_GetUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_InsertUpdate]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_InsertUpdate]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_GetDelete]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_GetDelete]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_Delete_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_Delete_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_GetSelect]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_GetSelect]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_Select_Where]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_Select_Where]

IF OBJECT_ID(N'[dbo].[PR_Client_Service_Select_All]') IS NOT NULL
	DROP PROCEDURE [dbo].[PR_Client_Service_Select_All]


GO


CREATE PROCEDURE [dbo].[PR_Client_Service_GetInsert]
	@ServiceTitle nvarchar(50),
	@SelectClient nvarchar(50),
	@ContacterList nvarchar(50),
	@Processor nvarchar(50),
	@ServiceType nvarchar(50),
	@ServiceMode nvarchar(50),
	@ServiceTime datetime,
	@TakeTime nvarchar(50),
	@Point varchar(5),
	@ServiceContent nvarchar(50),
	@ServiceResult nvarchar(50),
	@Feedback nvarchar(50),
	@Remark nvarchar(100),
	@Add_date datetime,
	@Flow int OUTPUT
AS

INSERT INTO [dbo].[ZL_Client_Service] (
	[ServiceTitle],
	[SelectClient],
	[ContacterList],
	[Processor],
	[ServiceType],
	[ServiceMode],
	[ServiceTime],
	[TakeTime],
	[Point],
	[ServiceContent],
	[ServiceResult],
	[Feedback],
	[Remark],
	[Add_date]
) VALUES (
	@ServiceTitle,
	@SelectClient,
	@ContacterList,
	@Processor,
	@ServiceType,
	@ServiceMode,
	@ServiceTime,
	@TakeTime,
	@Point,
	@ServiceContent,
	@ServiceResult,
	@Feedback,
	@Remark,
	@Add_date
)

SET @Flow = SCOPE_IDENTITY()

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_GetUpdate]
	@Flow int,
	@ServiceTitle nvarchar(50),
	@SelectClient nvarchar(50),
	@ContacterList nvarchar(50),
	@Processor nvarchar(50),
	@ServiceType nvarchar(50),
	@ServiceMode nvarchar(50),
	@ServiceTime datetime,
	@TakeTime nvarchar(50),
	@Point varchar(5),
	@ServiceContent nvarchar(50),
	@ServiceResult nvarchar(50),
	@Feedback nvarchar(50),
	@Remark nvarchar(100),
	@Add_date datetime
AS

UPDATE [dbo].[ZL_Client_Service] SET
	[ServiceTitle] = @ServiceTitle,
	[SelectClient] = @SelectClient,
	[ContacterList] = @ContacterList,
	[Processor] = @Processor,
	[ServiceType] = @ServiceType,
	[ServiceMode] = @ServiceMode,
	[ServiceTime] = @ServiceTime,
	[TakeTime] = @TakeTime,
	[Point] = @Point,
	[ServiceContent] = @ServiceContent,
	[ServiceResult] = @ServiceResult,
	[Feedback] = @Feedback,
	[Remark] = @Remark,
	[Add_date] = @Add_date
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_InsertUpdate]
	@Flow int,
	@ServiceTitle nvarchar(50),
	@SelectClient nvarchar(50),
	@ContacterList nvarchar(50),
	@Processor nvarchar(50),
	@ServiceType nvarchar(50),
	@ServiceMode nvarchar(50),
	@ServiceTime datetime,
	@TakeTime nvarchar(50),
	@Point varchar(5),
	@ServiceContent nvarchar(50),
	@ServiceResult nvarchar(50),
	@Feedback nvarchar(50),
	@Remark nvarchar(100),
	@Add_date datetime
AS

IF EXISTS(SELECT [Flow] FROM [dbo].[ZL_Client_Service] WHERE [Flow] = @Flow)
BEGIN
	UPDATE [dbo].[ZL_Client_Service] SET
		[ServiceTitle] = @ServiceTitle,
		[SelectClient] = @SelectClient,
		[ContacterList] = @ContacterList,
		[Processor] = @Processor,
		[ServiceType] = @ServiceType,
		[ServiceMode] = @ServiceMode,
		[ServiceTime] = @ServiceTime,
		[TakeTime] = @TakeTime,
		[Point] = @Point,
		[ServiceContent] = @ServiceContent,
		[ServiceResult] = @ServiceResult,
		[Feedback] = @Feedback,
		[Remark] = @Remark,
		[Add_date] = @Add_date
	WHERE
		[Flow] = @Flow
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Client_Service] (	
	[ServiceTitle],
	[SelectClient],
	[ContacterList],
	[Processor],
	[ServiceType],
	[ServiceMode],
	[ServiceTime],
	[TakeTime],
	[Point],
	[ServiceContent],
	[ServiceResult],
	[Feedback],
	[Remark],
	[Add_date]
	) VALUES (
	@ServiceTitle,
	@SelectClient,
	@ContacterList,
	@Processor,
	@ServiceType,
	@ServiceMode,
	@ServiceTime,
	@TakeTime,
	@Point,
	@ServiceContent,
	@ServiceResult,
	@Feedback,
	@Remark,
	@Add_date
	)

END

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_GetDelete]
	@Flow int
AS

DELETE FROM [dbo].[ZL_Client_Service]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_Client_Service]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_GetSelect]
	@Flow int
AS

SELECT
	[Flow],
	[ServiceTitle],
	[SelectClient],
	[ContacterList],
	[Processor],
	[ServiceType],
	[ServiceMode],
	[ServiceTime],
	[TakeTime],
	[Point],
	[ServiceContent],
	[ServiceResult],
	[Feedback],
	[Remark],
	[Add_date]
FROM
	[dbo].[ZL_Client_Service]
WHERE
	[Flow] = @Flow

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_Client_Service]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL

GO


CREATE PROCEDURE [dbo].[PR_Client_Service_Select_All]
AS


SELECT
	[Flow],
	[ServiceTitle],
	[SelectClient],
	[ContacterList],
	[Processor],
	[ServiceType],
	[ServiceMode],
	[ServiceTime],
	[TakeTime],
	[Point],
	[ServiceContent],
	[ServiceResult],
	[Feedback],
	[Remark],
	[Add_date]
FROM
	[dbo].[ZL_Client_Service]

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

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

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

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

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

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

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

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NPosition_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_NPosition]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE PROCEDURE [dbo].[PR_NPosition_GetDelete]
	@PositionID int
AS

DELETE FROM [dbo].[ZL_NPosition]
WHERE
	[PositionID] = @PositionID


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE PROCEDURE [dbo].[PR_NPosition_GetInsert]
	@PositionType nvarchar(50),
	@PositionName nvarchar(50),
	@CompanyID int,
	@CompanyName nvarchar(255),
	@WorkPlace nvarchar(255),
	@NeedPerson int,
	@PositionDescribe nvarchar(500),
	@Status int,
	@PostTime datetime,
	@EndTime datetime,
	@IsCreateHouse int,
	@Remark nvarchar(500),
	@PositionID int OUTPUT
AS

INSERT INTO [dbo].[ZL_NPosition] (
	[PositionType],
	[PositionName],
	[CompanyID],
	[CompanyName],
	[WorkPlace],
	[NeedPerson],
	[PositionDescribe],
	[Status],
	[PostTime],
	[EndTime],
	[IsCreateHouse],
	[Remark]
) VALUES (
	@PositionType,
	@PositionName,
	@CompanyID,
	@CompanyName,
	@WorkPlace,
	@NeedPerson,
	@PositionDescribe,
	@Status,
	@PostTime,
	@EndTime,
	@IsCreateHouse,
	@Remark
)

SET @PositionID = SCOPE_IDENTITY()
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NPosition_GetSelect]
	@PositionID int
AS

SELECT
	[PositionID],
	[PositionType],
	[PositionName],
	[CompanyID],
	[CompanyName],
	[WorkPlace],
	[NeedPerson],
	[PositionDescribe],
	[Status],
	[PostTime],
	[EndTime],
	[IsCreateHouse],
	[Remark]
FROM
	[dbo].[ZL_NPosition]
WHERE
	[PositionID] = @PositionID


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NPosition_GetUpdate]
	@PositionID int,
	@PositionType nvarchar(50),
	@PositionName nvarchar(50),
	@CompanyID int,
	@CompanyName nvarchar(255),
	@WorkPlace nvarchar(255),
	@NeedPerson int,
	@PositionDescribe nvarchar(500),
	@Status int,
	@PostTime datetime,
	@EndTime datetime,
	@IsCreateHouse int,
	@Remark nvarchar(500)
AS

UPDATE [dbo].[ZL_NPosition] SET
	[PositionType] = @PositionType,
	[PositionName] = @PositionName,
	[CompanyID] = @CompanyID,
	[CompanyName] = @CompanyName,
	[WorkPlace] = @WorkPlace,
	[NeedPerson] = @NeedPerson,
	[PositionDescribe] = @PositionDescribe,
	[Status] = @Status,
	[PostTime] = @PostTime,
	[EndTime] = @EndTime,
	[IsCreateHouse] = @IsCreateHouse,
	[Remark] = @Remark
WHERE
	[PositionID] = @PositionID


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NPosition_Select_All]
AS


SELECT
	[PositionID],
	[PositionType],
	[PositionName],
	[CompanyID],
	[CompanyName],
	[WorkPlace],
	[NeedPerson],
	[PositionDescribe],
	[Status],
	[PostTime],
	[EndTime],
	[IsCreateHouse],
	[Remark]
FROM
	[dbo].[ZL_NPosition]


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NPosition_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_NPosition]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END

EXEC sp_executesql @SQL


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

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

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

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

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

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

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

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NRes_interview_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = '
DELETE FROM
	[dbo].[ZL_NRes_interview]
WHERE
	' + @WhereCondition

EXEC sp_executesql @SQL


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE PROCEDURE [dbo].[PR_NRes_interview_GetDelete]
	@ID int
AS

DELETE FROM [dbo].[ZL_NRes_interview]
WHERE
	[ID] = @ID


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NRes_interview_GetInsert]
	@VideoID int,
	@PositionID int,
	@PositionName nvarchar(255),
	@CompanyID int,
	@CompanyName nvarchar(255),
	@UserID int,
	@UserName nvarchar(255),
	@IsInvited int,
	@InterViewTime nvarchar(255),
	@IsInHouse int,
	@InterViewRecord nvarchar(500),
	@ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_NRes_interview] (
	[VideoID],
	[PositionID],
	[PositionName],
	[CompanyID],
	[CompanyName],
	[UserID],
	[UserName],
	[IsInvited],
	[InterViewTime],
	[IsInHouse],
	[InterViewRecord]
) VALUES (
	@VideoID,
	@PositionID,
	@PositionName,
	@CompanyID,
	@CompanyName,
	@UserID,
	@UserName,
	@IsInvited,
	@InterViewTime,
	@IsInHouse,
	@InterViewRecord
)

SET @ID = SCOPE_IDENTITY()


GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO



CREATE PROCEDURE [dbo].[PR_NRes_interview_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[VideoID],
	[PositionID],
	[PositionName],
	[CompanyID],
	[CompanyName],
	[UserID],
	[UserName],
	[IsInvited],
	[InterViewTime],
	[IsInHouse],
	[InterViewRecord]
FROM
	[dbo].[ZL_NRes_interview]
WHERE
	[ID] = @ID

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE PROCEDURE [dbo].[PR_NRes_interview_Select_All]
AS
SELECT
	[ID],
	[VideoID],
	[PositionID],
	[PositionName],
	[CompanyID],
	[CompanyName],
	[UserID],
	[UserName],
	[IsInvited],
	[InterViewTime],
	[IsInHouse],
	[InterViewRecord]
FROM
	[dbo].[ZL_NRes_interview]

GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS ON 
GO

CREATE PROCEDURE [dbo].[PR_NRes_interview_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS
DECLARE @SQL nvarchar(3250)

SET @SQL = '
SELECT
	' + @SelectCondition + '
FROM
	[dbo].[ZL_NRes_interview]
WHERE
	' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + '
ORDER BY
	' + @OrderByExpression
END
EXEC sp_executesql @SQL

GO
--end2009-1014

--2009.10.20 lxy
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_VJobInfo]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_VJobInfo](
	[Jid] [int] IDENTITY(1,1) NOT NULL,
	[JBclass] [int] NULL,
	[JSclass] [int] NULL,
	[Jname] [nvarchar](255) NULL,
	[Jadd] [nvarchar](255) NULL,
	[Jnum] [int] NULL,
	[Jaddtime] [datetime] NULL,
	[Jendtime] [datetime] NULL,
	[Jinfo] [ntext] NULL,
	[JotherClass] [nvarchar](255) NULL,
 CONSTRAINT [PK_ZL_VJobInfo] PRIMARY KEY CLUSTERED 
(
	[Jid] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位大类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'JBclass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位小类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'JSclass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jadd'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'人数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jnum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发布时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jaddtime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jendtime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'Jinfo'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'其他分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VJobInfo', @level2type=N'COLUMN', @level2name=N'JotherClass'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_VJobInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_VJobInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_VideoInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_VideoHouseApply]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_VideoHouseApply](
	[Rid] [int] IDENTITY(1,1) NOT NULL,
	[Rname] [nvarchar](255) NULL,
	[RMinSize] [int] NULL,
	[RMaxSize] [int] NULL,
	[Ristrue] [int] NULL,
	[RJob] [int] NULL,
	[ComapnyID] [int] NULL,
	[Expires] [int] NULL,
	[Addtime] [datetime] NULL,
	[Rusernum] [int] NULL,
	[Dredgetime] [datetime] NULL,
 CONSTRAINT [PK_ZL_VideoHouseApply] PRIMARY KEY CLUSTERED 
(
	[Rid] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_VideoInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_VideoHouseApply]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_VideoHouseApply]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouse_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_VideoHouse]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouse_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_VideoHouse]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_VRoom]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_VRoom](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[RID] [int] NULL,
	[UserID] [int] NULL,
	[ComeTime] [datetime] NULL,
	[ActionTiem] [datetime] NULL,
	[IsOut] [int] NULL,
	[Spack] [int] NULL,
 CONSTRAINT [PK_ZL_VRoom] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'ID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'RID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'进入时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'ComeTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'活动时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'ActionTiem'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'请出房间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'IsOut'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'请求' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VRoom', @level2type=N'COLUMN', @level2name=N'Spack'

GO



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_VideoHouse]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_VideoHouse](
	[Rid] [int] IDENTITY(1,1) NOT NULL,
	[Rname] [nvarchar](255) NULL,
	[RMinSize] [int] NULL,
	[RMaxSize] [int] NULL,
	[Ristrue] [int] NULL,
	[RJob] [int] NULL,
	[ComapnyID] [int] NULL,
	[Expires] [int] NULL,
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_VideoHouse_Addtime]  DEFAULT (getdate()),
	[Rusernum] [int] NULL CONSTRAINT [DF_ZL_VideoHouse_Rusernum]  DEFAULT (0),
	[Dredgetime] [datetime] NULL CONSTRAINT [DF_ZL_VideoHouse_Dredgetime]  DEFAULT (getdate()),
	[IsUse] [int] NULL,
 CONSTRAINT [PK_ZL_VideoHouse] PRIMARY KEY CLUSTERED 
(
	[Rid] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Rid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间名称' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Rname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间人数下限' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'RMinSize'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间人数上限' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'RMaxSize'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(1-通过 0-未通过)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Ristrue'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'RJob'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'企业用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'ComapnyID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'房间是否开启' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Expires'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Addtime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'当前房间人数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Rusernum'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开通时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'Dredgetime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否使用中' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoHouse', @level2type=N'COLUMN', @level2name=N'IsUse'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_Vinvite]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_VRoom]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_Vinvite]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_VRoom]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_VideoInfo]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_VideoInfo](
	[Vid] [int] IDENTITY(1,1) NOT NULL,
	[VidClass] [int] NULL,
	[VidTitle] [nvarchar](50) NULL,
	[UserID] [int] NULL,
	[ComapnyID] [int] NULL,
	[Uploadtime] [datetime] NULL,
	[State] [int] NULL CONSTRAINT [DF_ZL_VideoInfo_State]  DEFAULT (0),
	[VideoUrl] [nvarchar](255) NULL,
	[Vinfo] [ntext] NULL,
	[Vxml] [ntext] NULL,
 CONSTRAINT [PK_ZL_VideoInfo] PRIMARY KEY CLUSTERED 
(
	[Vid] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'视频ID/简历' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'Vid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'视频分类' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'VidClass'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'视频标题' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'VidTitle'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'企业ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'ComapnyID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上传时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'Uploadtime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(1-审核通过 0-未审核)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'State'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'视频地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'VideoUrl'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'简历内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'Vinfo'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'其他信息xml形式显示' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VideoInfo', @level2type=N'COLUMN', @level2name=N'Vxml'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_VResume]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_VResume](
	[Mid] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[ComapnyID] [int] NULL,
	[Start] [int] NULL,
	[SendVideoUrl] [nvarchar](255) NULL,
	[JobID] [int] NULL,
	[Mtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_VResume] PRIMARY KEY CLUSTERED 
(
	[Mid] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投递ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'Mid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'来源ID-用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'目标ID-企业ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'ComapnyID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'Start'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投递视频地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'SendVideoUrl'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'JobID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投递时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_VResume', @level2type=N'COLUMN', @level2name=N'Mtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_Vinvite]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_Vinvite](
	[Mid] [int] IDENTITY(1,1) NOT NULL,
	[ComapnyID] [int] NULL,
	[UserID] [int] NULL,
	[Start] [int] NULL,
	[SendVideoUrl] [nvarchar](255) NULL,
	[JobID] [int] NULL,
	[Mtime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Vinvite] PRIMARY KEY CLUSTERED 
(
	[Mid] ASC
) ON [PRIMARY]
) ON [PRIMARY]
END
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'邀请面试ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'Mid'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'企业ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'ComapnyID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'UserID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'Start'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'投递视频地址' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'SendVideoUrl'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'职位ID' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'JobID'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'邀请时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Vinvite', @level2type=N'COLUMN', @level2name=N'Mtime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_VResume]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_VResume]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_GetSelect]
	@Jid int
AS

SELECT
	[Jid],
	[JBclass],
	[JSclass],
	[Jname],
	[Jadd],
	[Jnum],
	[Jaddtime],
	[Jendtime],
	[Jinfo],
	[JotherClass]
FROM
	[dbo].[ZL_VJobInfo]
WHERE
	[Jid] = @Jid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_Select_All]
AS


SELECT
	[Jid],
	[JBclass],
	[JSclass],
	[Jname],
	[Jadd],
	[Jnum],
	[Jaddtime],
	[Jendtime],
	[Jinfo],
	[JotherClass]
FROM
	[dbo].[ZL_VJobInfo]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_GetInsert]
	@JBclass int,
	@JSclass int,
	@Jname nvarchar(255),
	@Jadd nvarchar(255),
	@Jnum int,
	@Jaddtime datetime,
	@Jendtime datetime,
	@Jinfo ntext,
	@JotherClass nvarchar(255),
	@Jid int OUTPUT
AS

INSERT INTO [dbo].[ZL_VJobInfo] (
	[JBclass],
	[JSclass],
	[Jname],
	[Jadd],
	[Jnum],
	[Jaddtime],
	[Jendtime],
	[Jinfo],
	[JotherClass]
) VALUES (
	@JBclass,
	@JSclass,
	@Jname,
	@Jadd,
	@Jnum,
	@Jaddtime,
	@Jendtime,
	@Jinfo,
	@JotherClass
)

SET @Jid = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_GetUpdate]
	@Jid int,
	@JBclass int,
	@JSclass int,
	@Jname nvarchar(255),
	@Jadd nvarchar(255),
	@Jnum int,
	@Jaddtime datetime,
	@Jendtime datetime,
	@Jinfo ntext,
	@JotherClass nvarchar(255)
AS

UPDATE [dbo].[ZL_VJobInfo] SET
	[JBclass] = @JBclass,
	[JSclass] = @JSclass,
	[Jname] = @Jname,
	[Jadd] = @Jadd,
	[Jnum] = @Jnum,
	[Jaddtime] = @Jaddtime,
	[Jendtime] = @Jendtime,
	[Jinfo] = @Jinfo,
	[JotherClass] = @JotherClass
WHERE
	[Jid] = @Jid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_InsertUpdate]
	@Jid int,
	@JBclass int,
	@JSclass int,
	@Jname nvarchar(255),
	@Jadd nvarchar(255),
	@Jnum int,
	@Jaddtime datetime,
	@Jendtime datetime,
	@Jinfo ntext,
	@JotherClass nvarchar(255)
AS

IF EXISTS(SELECT [Jid] FROM [dbo].[ZL_VJobInfo] WHERE [Jid] = @Jid)
BEGIN
	UPDATE [dbo].[ZL_VJobInfo] SET
		[JBclass] = @JBclass,
		[JSclass] = @JSclass,
		[Jname] = @Jname,
		[Jadd] = @Jadd,
		[Jnum] = @Jnum,
		[Jaddtime] = @Jaddtime,
		[Jendtime] = @Jendtime,
		[Jinfo] = @Jinfo,
		[JotherClass] = @JotherClass
	WHERE
		[Jid] = @Jid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_VJobInfo] (	
	[JBclass],
	[JSclass],
	[Jname],
	[Jadd],
	[Jnum],
	[Jaddtime],
	[Jendtime],
	[Jinfo],
	[JotherClass]
	) VALUES (
	@JBclass,
	@JSclass,
	@Jname,
	@Jadd,
	@Jnum,
	@Jaddtime,
	@Jendtime,
	@Jinfo,
	@JotherClass
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VJobInfo_DeleteByJid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VJobInfo_DeleteByJid]
	@Jid int
AS

DELETE FROM [dbo].[ZL_VJobInfo]
WHERE
	[Jid] = @Jid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_GetInsert]
	@Rname nvarchar(255),
	@RMinSize int,
	@RMaxSize int,
	@Ristrue int,
	@RJob int,
	@ComapnyID int,
	@Expires int,
	@Addtime datetime,
	@Rusernum int,
	@Dredgetime datetime,
	@Rid int OUTPUT
AS

INSERT INTO [dbo].[ZL_VideoHouseApply] (
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime]
) VALUES (
	@Rname,
	@RMinSize,
	@RMaxSize,
	@Ristrue,
	@RJob,
	@ComapnyID,
	@Expires,
	@Addtime,
	@Rusernum,
	@Dredgetime
)

SET @Rid = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_GetUpdate]
	@Rid int,
	@Rname nvarchar(255),
	@RMinSize int,
	@RMaxSize int,
	@Ristrue int,
	@RJob int,
	@ComapnyID int,
	@Expires int,
	@Addtime datetime,
	@Rusernum int,
	@Dredgetime datetime
AS

UPDATE [dbo].[ZL_VideoHouseApply] SET
	[Rname] = @Rname,
	[RMinSize] = @RMinSize,
	[RMaxSize] = @RMaxSize,
	[Ristrue] = @Ristrue,
	[RJob] = @RJob,
	[ComapnyID] = @ComapnyID,
	[Expires] = @Expires,
	[Addtime] = @Addtime,
	[Rusernum] = @Rusernum,
	[Dredgetime] = @Dredgetime
WHERE
	[Rid] = @Rid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_InsertUpdate]
	@Rid int,
	@Rname nvarchar(255),
	@RMinSize int,
	@RMaxSize int,
	@Ristrue int,
	@RJob int,
	@ComapnyID int,
	@Expires int,
	@Addtime datetime,
	@Rusernum int,
	@Dredgetime datetime
AS

IF EXISTS(SELECT [Rid] FROM [dbo].[ZL_VideoHouseApply] WHERE [Rid] = @Rid)
BEGIN
	UPDATE [dbo].[ZL_VideoHouseApply] SET
		[Rname] = @Rname,
		[RMinSize] = @RMinSize,
		[RMaxSize] = @RMaxSize,
		[Ristrue] = @Ristrue,
		[RJob] = @RJob,
		[ComapnyID] = @ComapnyID,
		[Expires] = @Expires,
		[Addtime] = @Addtime,
		[Rusernum] = @Rusernum,
		[Dredgetime] = @Dredgetime
	WHERE
		[Rid] = @Rid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_VideoHouseApply] (	
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime]
	) VALUES (
	@Rname,
	@RMinSize,
	@RMaxSize,
	@Ristrue,
	@RJob,
	@ComapnyID,
	@Expires,
	@Addtime,
	@Rusernum,
	@Dredgetime
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_DeleteByRid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_DeleteByRid]
	@Rid int
AS

DELETE FROM [dbo].[ZL_VideoHouseApply]
WHERE
	[Rid] = @Rid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_Select_All]
AS


SELECT
	[Rid],
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime]
FROM
	[dbo].[ZL_VideoHouseApply]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouseApply_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouseApply_GetSelect]
	@Rid int
AS

SELECT
	[Rid],
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime]
FROM
	[dbo].[ZL_VideoHouseApply]
WHERE
	[Rid] = @Rid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_GetInsert]
	@RID int,
	@UserID int,
	@ComeTime datetime,
	@ActionTiem datetime,
	@IsOut int,
	@Spack int,
	@ID int OUTPUT
AS

INSERT INTO [dbo].[ZL_VRoom] (
	[RID],
	[UserID],
	[ComeTime],
	[ActionTiem],
	[IsOut],
	[Spack]
) VALUES (
	@RID,
	@UserID,
	@ComeTime,
	@ActionTiem,
	@IsOut,
	@Spack
)

SET @ID = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_Select_All]
AS


SELECT
	[ID],
	[RID],
	[UserID],
	[ComeTime],
	[ActionTiem],
	[IsOut],
	[Spack]
FROM
	[dbo].[ZL_VRoom]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_DeleteByID]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_DeleteByID]
	@ID int
AS

DELETE FROM [dbo].[ZL_VRoom]
WHERE
	[ID] = @ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_GetSelect]
	@ID int
AS

SELECT
	[ID],
	[RID],
	[UserID],
	[ComeTime],
	[ActionTiem],
	[IsOut],
	[Spack]
FROM
	[dbo].[ZL_VRoom]
WHERE
	[ID] = @ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_GetUpdate]
	@ID int,
	@RID int,
	@UserID int,
	@ComeTime datetime,
	@ActionTiem datetime,
	@IsOut int,
	@Spack int
AS

UPDATE [dbo].[ZL_VRoom] SET
	[RID] = @RID,
	[UserID] = @UserID,
	[ComeTime] = @ComeTime,
	[ActionTiem] = @ActionTiem,
	[IsOut] = @IsOut,
	[Spack]=@Spack
WHERE
	[ID] = @ID

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VRoom_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VRoom_InsertUpdate]
	@ID int,
	@RID int,
	@UserID int,
	@ComeTime datetime,
	@ActionTiem datetime,
	@IsOut int,
	@Spack int
AS

IF EXISTS(SELECT [ID] FROM [dbo].[ZL_VRoom] WHERE [ID] = @ID)
BEGIN
	UPDATE [dbo].[ZL_VRoom] SET
		[RID] = @RID,
		[UserID] = @UserID,
		[ComeTime] = @ComeTime,
		[ActionTiem] = @ActionTiem,
		[IsOut] = @IsOut,
		[Spack] = @Spack
	WHERE
		[ID] = @ID
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_VRoom] (	
	[RID],
	[UserID],
	[ComeTime],
	[ActionTiem],
	[IsOut],
	[Spack]
	) VALUES (
	@RID,
	@UserID,
	@ComeTime,
	@ActionTiem,
	@IsOut,
	@Spack
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouse_Select_All]
AS


SELECT
	[Rid],
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime]
FROM
	[dbo].[ZL_VideoHouse]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_VideoHouse_GetSelect]
	@Rid int
AS

SELECT
	[Rid],
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime],
	[IsUse]
FROM
	[dbo].[ZL_VideoHouse]
WHERE
	[Rid] = @Rid' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_VideoHouse_GetInsert]
	@Rname nvarchar(255),
	@RMinSize int,
	@RMaxSize int,
	@Ristrue int,
	@RJob int,
	@ComapnyID int,
	@Expires int,
	@Addtime datetime,
	@Rusernum int,
	@Dredgetime datetime,
	@IsUse int,
	@Rid int OUTPUT
AS

INSERT INTO [dbo].[ZL_VideoHouse] (
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime],
	[IsUse]
) VALUES (
	@Rname,
	@RMinSize,
	@RMaxSize,
	@Ristrue,
	@RJob,
	@ComapnyID,
	@Expires,
	@Addtime,
	@Rusernum,
	@Dredgetime,
	@IsUse
)

SET @Rid = SCOPE_IDENTITY()
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_VideoHouse_GetUpdate]
	@Rid int,
	@Rname nvarchar(255),
	@RMinSize int,
	@RMaxSize int,
	@Ristrue int,
	@RJob int,
	@ComapnyID int,
	@Expires int,
	@Addtime datetime,
	@Rusernum int,
	@Dredgetime datetime,
	@IsUse int 
AS

UPDATE [dbo].[ZL_VideoHouse] SET
	[Rname] = @Rname,
	[RMinSize] = @RMinSize,
	[RMaxSize] = @RMaxSize,
	[Ristrue] = @Ristrue,
	[RJob] = @RJob,
	[ComapnyID] = @ComapnyID,
	[Expires] = @Expires,
	[Addtime] = @Addtime,
	[Rusernum] = @Rusernum,
	[Dredgetime] = @Dredgetime,
	[IsUse]=@IsUse
WHERE
	[Rid] = @Rid' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE [dbo].[PR_VideoHouse_InsertUpdate]
	@Rid int,
	@Rname nvarchar(255),
	@RMinSize int,
	@RMaxSize int,
	@Ristrue int,
	@RJob int,
	@ComapnyID int,
	@Expires int,
	@Addtime datetime,
	@Rusernum int,
	@Dredgetime datetime,
	@IsUse int
AS

IF EXISTS(SELECT [Rid] FROM [dbo].[ZL_VideoHouse] WHERE [Rid] = @Rid)
BEGIN
	UPDATE [dbo].[ZL_VideoHouse] SET
		[Rname] = @Rname,
		[RMinSize] = @RMinSize,
		[RMaxSize] = @RMaxSize,
		[Ristrue] = @Ristrue,
		[RJob] = @RJob,
		[ComapnyID] = @ComapnyID,
		[Expires] = @Expires,
		[Addtime] = @Addtime,
		[Rusernum] = @Rusernum,
		[Dredgetime] = @Dredgetime,
		[IsUse]=@IsUse
	WHERE
		[Rid] = @Rid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_VideoHouse] (	
	[Rname],
	[RMinSize],
	[RMaxSize],
	[Ristrue],
	[RJob],
	[ComapnyID],
	[Expires],
	[Addtime],
	[Rusernum],
	[Dredgetime],
	[IsUse]
	) VALUES (
	@Rname,
	@RMinSize,
	@RMaxSize,
	@Ristrue,
	@RJob,
	@ComapnyID,
	@Expires,
	@Addtime,
	@Rusernum,
	@Dredgetime,
	@IsUse
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoHouse_DeleteByRid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoHouse_DeleteByRid]
	@Rid int
AS

DELETE FROM [dbo].[ZL_VideoHouse]
WHERE
	[Rid] = @Rid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_Select_All]
AS


SELECT
	[Vid],
	[VidClass],
	[VidTitle],
	[UserID],
	[ComapnyID],
	[Uploadtime],
	[State],
	[VideoUrl],
	[Vinfo],
	[Vxml]
FROM
	[dbo].[ZL_VideoInfo]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_GetSelect]
	@Vid int
AS

SELECT
	[Vid],
	[VidClass],
	[VidTitle],
	[UserID],
	[ComapnyID],
	[Uploadtime],
	[State],
	[VideoUrl],
	[Vinfo],
	[Vxml]
FROM
	[dbo].[ZL_VideoInfo]
WHERE
	[Vid] = @Vid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_GetInsert]
	@VidClass int,
	@VidTitle nvarchar(50),
	@UserID int,
	@ComapnyID int,
	@Uploadtime datetime,
	@State int,
	@VideoUrl nvarchar(255),
	@Vinfo ntext,
	@Vxml ntext,
	@Vid int OUTPUT
AS

INSERT INTO [dbo].[ZL_VideoInfo] (
	[VidClass],
	[VidTitle],
	[UserID],
	[ComapnyID],
	[Uploadtime],
	[State],
	[VideoUrl],
	[Vinfo],
	[Vxml]
) VALUES (
	@VidClass,
	@VidTitle,
	@UserID,
	@ComapnyID,
	@Uploadtime,
	@State,
	@VideoUrl,
	@Vinfo,
	@Vxml
)

SET @Vid = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_GetUpdate]
	@Vid int,
	@VidClass int,
	@VidTitle nvarchar(50),
	@UserID int,
	@ComapnyID int,
	@Uploadtime datetime,
	@State int,
	@VideoUrl nvarchar(255),
	@Vinfo ntext,
	@Vxml ntext
AS

UPDATE [dbo].[ZL_VideoInfo] SET
	[VidClass] = @VidClass,
	[VidTitle] = @VidTitle,
	[UserID] = @UserID,
	[ComapnyID] = @ComapnyID,
	[Uploadtime] = @Uploadtime,
	[State] = @State,
	[VideoUrl] = @VideoUrl,
	[Vinfo] = @Vinfo,
	[Vxml] = @Vxml
WHERE
	[Vid] = @Vid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_InsertUpdate]
	@Vid int,
	@VidClass int,
	@VidTitle nvarchar(50),
	@UserID int,
	@ComapnyID int,
	@Uploadtime datetime,
	@State int,
	@VideoUrl nvarchar(255),
	@Vinfo ntext,
	@Vxml ntext
AS

IF EXISTS(SELECT [Vid] FROM [dbo].[ZL_VideoInfo] WHERE [Vid] = @Vid)
BEGIN
	UPDATE [dbo].[ZL_VideoInfo] SET
		[VidClass] = @VidClass,
		[VidTitle] = @VidTitle,
		[UserID] = @UserID,
		[ComapnyID] = @ComapnyID,
		[Uploadtime] = @Uploadtime,
		[State] = @State,
		[VideoUrl] = @VideoUrl,
		[Vinfo] = @Vinfo,
		[Vxml] = @Vxml
	WHERE
		[Vid] = @Vid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_VideoInfo] (	
	[VidClass],
	[VidTitle],
	[UserID],
	[ComapnyID],
	[Uploadtime],
	[State],
	[VideoUrl],
	[Vinfo],
	[Vxml]
	) VALUES (
	@VidClass,
	@VidTitle,
	@UserID,
	@ComapnyID,
	@Uploadtime,
	@State,
	@VideoUrl,
	@Vinfo,
	@Vxml
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VideoInfo_DeleteByVid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VideoInfo_DeleteByVid]
	@Vid int
AS

DELETE FROM [dbo].[ZL_VideoInfo]
WHERE
	[Vid] = @Vid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_GetInsert]
	@UserID int,
	@ComapnyID int,
	@Start int,
	@SendVideoUrl nvarchar(255),
	@JobID int,
	@Mtime datetime,
	@Mid int OUTPUT
AS

INSERT INTO [dbo].[ZL_VResume] (
	[UserID],
	[ComapnyID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
) VALUES (
	@UserID,
	@ComapnyID,
	@Start,
	@SendVideoUrl,
	@JobID,
	@Mtime
)

SET @Mid = SCOPE_IDENTITY()

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_GetUpdate]
	@Mid int,
	@UserID int,
	@ComapnyID int,
	@Start int,
	@SendVideoUrl nvarchar(255),
	@JobID int,
	@Mtime datetime
AS

UPDATE [dbo].[ZL_VResume] SET
	[UserID] = @UserID,
	[ComapnyID] = @ComapnyID,
	[Start] = @Start,
	[SendVideoUrl] = @SendVideoUrl,
	[JobID] = @JobID,
	[Mtime] = @Mtime
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_InsertUpdate]
	@Mid int,
	@UserID int,
	@ComapnyID int,
	@Start int,
	@SendVideoUrl nvarchar(255),
	@JobID int,
	@Mtime datetime
AS

IF EXISTS(SELECT [Mid] FROM [dbo].[ZL_VResume] WHERE [Mid] = @Mid)
BEGIN
	UPDATE [dbo].[ZL_VResume] SET
		[UserID] = @UserID,
		[ComapnyID] = @ComapnyID,
		[Start] = @Start,
		[SendVideoUrl] = @SendVideoUrl,
		[JobID] = @JobID,
		[Mtime] = @Mtime
	WHERE
		[Mid] = @Mid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_VResume] (	
	[UserID],
	[ComapnyID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
	) VALUES (
	@UserID,
	@ComapnyID,
	@Start,
	@SendVideoUrl,
	@JobID,
	@Mtime
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_DeleteByMid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_DeleteByMid]
	@Mid int
AS

DELETE FROM [dbo].[ZL_VResume]
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_Select_All]
AS


SELECT
	[Mid],
	[UserID],
	[ComapnyID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
FROM
	[dbo].[ZL_VResume]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_VResume_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_VResume_GetSelect]
	@Mid int
AS

SELECT
	[Mid],
	[UserID],
	[ComapnyID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
FROM
	[dbo].[ZL_VResume]
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_Select_All]
AS


SELECT
	[Mid],
	[ComapnyID],
	[UserID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
FROM
	[dbo].[ZL_Vinvite]

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_DeleteByMid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_DeleteByMid]
	@Mid int
AS

DELETE FROM [dbo].[ZL_Vinvite]
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_InsertUpdate]
	@Mid int,
	@ComapnyID int,
	@UserID int,
	@Start int,
	@SendVideoUrl nvarchar(255),
	@JobID int,
	@Mtime datetime
AS

IF EXISTS(SELECT [Mid] FROM [dbo].[ZL_Vinvite] WHERE [Mid] = @Mid)
BEGIN
	UPDATE [dbo].[ZL_Vinvite] SET
		[ComapnyID] = @ComapnyID,
		[UserID] = @UserID,
		[Start] = @Start,
		[SendVideoUrl] = @SendVideoUrl,
		[JobID] = @JobID,
		[Mtime] = @Mtime
	WHERE
		[Mid] = @Mid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_Vinvite] (	
	[ComapnyID],
	[UserID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
	) VALUES (
	@ComapnyID,
	@UserID,
	@Start,
	@SendVideoUrl,
	@JobID,
	@Mtime
	)

END

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_GetSelect]
	@Mid int
AS

SELECT
	[Mid],
	[ComapnyID],
	[UserID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
FROM
	[dbo].[ZL_Vinvite]
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_GetUpdate]
	@Mid int,
	@ComapnyID int,
	@UserID int,
	@Start int,
	@SendVideoUrl nvarchar(255),
	@JobID int,
	@Mtime datetime
AS

UPDATE [dbo].[ZL_Vinvite] SET
	[ComapnyID] = @ComapnyID,
	[UserID] = @UserID,
	[Start] = @Start,
	[SendVideoUrl] = @SendVideoUrl,
	[JobID] = @JobID,
	[Mtime] = @Mtime
WHERE
	[Mid] = @Mid

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_Vinvite_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'


CREATE PROCEDURE [dbo].[PR_Vinvite_GetInsert]
	@ComapnyID int,
	@UserID int,
	@Start int,
	@SendVideoUrl nvarchar(255),
	@JobID int,
	@Mtime datetime,
	@Mid int OUTPUT
AS

INSERT INTO [dbo].[ZL_Vinvite] (
	[ComapnyID],
	[UserID],
	[Start],
	[SendVideoUrl],
	[JobID],
	[Mtime]
) VALUES (
	@ComapnyID,
	@UserID,
	@Start,
	@SendVideoUrl,
	@JobID,
	@Mtime
)

SET @Mid = SCOPE_IDENTITY()

' 
END

--end 2009.10.20


---2009.10.31
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_Delete_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_Delete_Where]
	@WhereCondition nvarchar(500)
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
DELETE FROM
	[dbo].[ZL_BossInfo]
WHERE
	'' + @WhereCondition

EXEC sp_executesql @SQL

' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_Select_Where]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_Select_Where]
	@WhereCondition nvarchar(500),
	@SelectCondition nvarchar(500),
	@OrderByExpression nvarchar(250) = NULL
AS

DECLARE @SQL nvarchar(3250)

SET @SQL = ''
SELECT
	'' + @SelectCondition + ''
FROM
	[dbo].[ZL_BossInfo]
WHERE
	'' + @WhereCondition

IF @OrderByExpression IS NOT NULL AND LEN(@OrderByExpression) > 0
BEGIN
	SET @SQL = @SQL + ''
ORDER BY
	'' + @OrderByExpression
END

EXEC sp_executesql @SQL
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_GetDelete]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_GetDelete]
	@nodeid int
AS

DELETE FROM [dbo].[ZL_BossInfo]
WHERE
	[nodeid] = @nodeid
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_GetInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_GetInsert]
	@parentid int,
	@shoptype int,
	@userid int,
	@Childs int,
	@CMoney money,
	@Province nvarchar(250),
	@city nvarchar(250),
	@CName nchar(250),
	@Address nvarchar(250),
	@Agent nvarchar(250),
	@license nvarchar(250),
	@CTel nvarchar(250),
	@CInfo ntext,
	@ContractNum nvarchar(250),
	@AccountPeople nvarchar(250),
	@Bank nvarchar(250),
	@BankNum nvarchar(250),
	@AccountPeople2 nvarchar(250),
	@Bank2 nvarchar(250),
	@BankNum2 nvarchar(250),
	@linkname nvarchar(250),
	@linksex nvarchar(250),
	@linkPositions nvarchar(250),
	@linktel nvarchar(250),
	@fax nvarchar(250),
	@PostCode nvarchar(250),
	@email nvarchar(250),
	@Documents nvarchar(250),
	@DocumentsNUm nvarchar(250),
	@nodeid int OUTPUT
AS

INSERT INTO [dbo].[ZL_BossInfo] (
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
) VALUES (
	@parentid,
	@shoptype,
	@userid,
	@Childs,
	@CMoney,
	@Province,
	@city,
	@CName,
	@Address,
	@Agent,
	@license,
	@CTel,
	@CInfo,
	@ContractNum,
	@AccountPeople,
	@Bank,
	@BankNum,
	@AccountPeople2,
	@Bank2,
	@BankNum2,
	@linkname,
	@linksex,
	@linkPositions,
	@linktel,
	@fax,
	@PostCode,
	@email,
	@Documents,
	@DocumentsNUm
)
SET @nodeid = SCOPE_IDENTITY()
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_GetSelect]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_GetSelect]
	@nodeid int
AS

SELECT
	[nodeid],
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
FROM
	[dbo].[ZL_BossInfo]
WHERE
	[nodeid] = @nodeid 
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_GetSelectUserid]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_GetSelectUserid]
	@userid int
AS

SELECT
	[nodeid],
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm],
[cmoney]
FROM
	[dbo].[ZL_BossInfo]
WHERE
	[userid] = @userid
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_GetUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_GetUpdate]
	@nodeid int,
	@parentid int,
	@shoptype int,
	@userid int,
	@Childs int,
	@CMoney money,
	@Province nvarchar(250),
	@city nvarchar(250),
	@CName nchar(250),
	@Address nvarchar(250),
	@Agent nvarchar(250),
	@license nvarchar(250),
	@CTel nvarchar(250),
	@CInfo ntext,
	@ContractNum nvarchar(250),
	@AccountPeople nvarchar(250),
	@Bank nvarchar(250),
	@BankNum nvarchar(250),
	@AccountPeople2 nvarchar(250),
	@Bank2 nvarchar(250),
	@BankNum2 nvarchar(250),
	@linkname nvarchar(250),
	@linksex nvarchar(250),
	@linkPositions nvarchar(250),
	@linktel nvarchar(250),
	@fax nvarchar(250),
	@PostCode nvarchar(250),
	@email nvarchar(250),
	@Documents nvarchar(250),
	@DocumentsNUm nvarchar(250)
AS

UPDATE [dbo].[ZL_BossInfo] SET
	[parentid] = @parentid,
	[shoptype] = @shoptype,
	[userid] = @userid,
	[Childs] = @Childs,
	[CMoney] = @CMoney,
	[Province] = @Province,
	[city] = @city,
	[CName] = @CName,
	[Address] = @Address,
	[Agent] = @Agent,
	[license] = @license,
	[CTel] = @CTel,
	[CInfo] = @CInfo,
	[ContractNum] = @ContractNum,
	[AccountPeople] = @AccountPeople,
	[Bank] = @Bank,
	[BankNum] = @BankNum,
	[AccountPeople2] = @AccountPeople2,
	[Bank2] = @Bank2,
	[BankNum2] = @BankNum2,
	[linkname] = @linkname,
	[linksex] = @linksex,
	[linkPositions] = @linkPositions,
	[linktel] = @linktel,
	[fax] = @fax,
	[PostCode] = @PostCode,
	[email] = @email,
	[Documents] = @Documents,
	[DocumentsNUm] = @DocumentsNUm
WHERE
	[nodeid] = @nodeid
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_InsertUpdate]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_InsertUpdate]
	@nodeid int,
	@parentid int,
	@shoptype int,
	@userid int,
	@Childs int,
	@CMoney money,
	@Province nvarchar(250),
	@city nvarchar(250),
	@CName nchar(250),
	@Address nvarchar(250),
	@Agent nvarchar(250),
	@license nvarchar(250),
	@CTel nvarchar(250),
	@CInfo ntext,
	@ContractNum nvarchar(250),
	@AccountPeople nvarchar(250),
	@Bank nvarchar(250),
	@BankNum nvarchar(250),
	@AccountPeople2 nvarchar(250),
	@Bank2 nvarchar(250),
	@BankNum2 nvarchar(250),
	@linkname nvarchar(250),
	@linksex nvarchar(250),
	@linkPositions nvarchar(250),
	@linktel nvarchar(250),
	@fax nvarchar(250),
	@PostCode nvarchar(250),
	@email nvarchar(250),
	@Documents nvarchar(250),
	@DocumentsNUm nvarchar(250)
AS

IF EXISTS(SELECT [nodeid] FROM [dbo].[ZL_BossInfo] WHERE [nodeid] = @nodeid)
BEGIN
	UPDATE [dbo].[ZL_BossInfo] SET
		[parentid] = @parentid,
		[shoptype] = @shoptype,
		[userid] = @userid,
		[Childs] = @Childs,
		[CMoney] = @CMoney,
		[Province] = @Province,
		[city] = @city,
		[CName] = @CName,
		[Address] = @Address,
		[Agent] = @Agent,
		[license] = @license,
		[CTel] = @CTel,
		[CInfo] = @CInfo,
		[ContractNum] = @ContractNum,
		[AccountPeople] = @AccountPeople,
		[Bank] = @Bank,
		[BankNum] = @BankNum,
		[AccountPeople2] = @AccountPeople2,
		[Bank2] = @Bank2,
		[BankNum2] = @BankNum2,
		[linkname] = @linkname,
		[linksex] = @linksex,
		[linkPositions] = @linkPositions,
		[linktel] = @linktel,
		[fax] = @fax,
		[PostCode] = @PostCode,
		[email] = @email,
		[Documents] = @Documents,
		[DocumentsNUm] = @DocumentsNUm
	WHERE
		[nodeid] = @nodeid
END
ELSE
BEGIN
	INSERT INTO [dbo].[ZL_BossInfo] (	
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
	) VALUES (
	@parentid,
	@shoptype,
	@userid,
	@Childs,
	@CMoney,
	@Province,
	@city,
	@CName,
	@Address,
	@Agent,
	@license,
	@CTel,
	@CInfo,
	@ContractNum,
	@AccountPeople,
	@Bank,
	@BankNum,
	@AccountPeople2,
	@Bank2,
	@BankNum2,
	@linkname,
	@linksex,
	@linkPositions,
	@linktel,
	@fax,
	@PostCode,
	@email,
	@Documents,
	@DocumentsNUm
	)

END
' 
END
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[PR_BossInfo_Select_All]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_BossInfo_Select_All] AS
SELECT
	[nodeid],
	[parentid],
	[shoptype],
	[userid],
	[Childs],
	[CMoney],
	[Province],
	[city],
	[CName],
	[Address],
	[Agent],
	[license],
	[CTel],
	[CInfo],
	[ContractNum],
	[AccountPeople],
	[Bank],
	[BankNum],
	[AccountPeople2],
	[Bank2],
	[BankNum2],
	[linkname],
	[linksex],
	[linkPositions],
	[linktel],
	[fax],
	[PostCode],
	[email],
	[Documents],
	[DocumentsNUm]
FROM
	[dbo].[ZL_BossInfo]

' 
END


---end 2009.10.31


----2009.12.3 lxy
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_SubscriptionCount](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Classic] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Content] [nvarchar](225) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Price] [decimal](18, 0) NOT NULL,
	[Send] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Logo] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[Hits] [int] NOT NULL
) ON [PRIMARY]

---end 2009.12.3

--2009.12.1 tangl
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_MySubscription]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_MySubscription](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Reference_ID] [int] NULL,
	[Order_Time] [datetime] NULL,
	[Period] [int] NULL CONSTRAINT [DF_ZL_MySubscription_Period]  DEFAULT (1),
	[Start_Date] [datetime] NULL,
	[Order_Type] [int] NULL,
	[User_Name] [nvarchar](50) NULL,
	[Tel] [nvarchar](50) NULL,
	[Email] [nvarchar](50) NULL
) ON [PRIMARY]
END
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[ZL_SubscriptionCount]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[ZL_SubscriptionCount](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](50) NOT NULL,
	[Classic] [nvarchar](50) NOT NULL,
	[Content] [nvarchar](225) NOT NULL,
	[Price] [decimal](18, 0) NOT NULL,
	[Send] [nvarchar](50) NOT NULL,
	[Logo] [nvarchar](50) NOT NULL,
	[UpdateTime] [datetime] NOT NULL,
	[Hits] [int] NOT NULL
) ON [PRIMARY]
END
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅的信息编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'Reference_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'Period'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅起始日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'Start_Date'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'信息订购状态,分为：关注；已定；退定' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'Order_Type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅人（注册帐户名）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'User_Name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅人联系电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'Tel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅内容接收邮箱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MySubscription', @level2type=N'COLUMN',@level2name=N'Email'
GO


EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Title'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分为：资讯、数据、报告、书刊、其他' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Classic'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Price'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送方式 ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Send'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接图片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Logo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'UpdateTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关注度 设为0,根据订阅的人数来设' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SubscriptionCount', @level2type=N'COLUMN',@level2name=N'Hits'
GO
--end


---add20091222--hu

SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Sns_LookLog](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[userid] [int] NULL,
	[lookid] [int] NULL,
	[looktime] [datetime] NULL CONSTRAINT [DF_ZL_Sns_LookLog_looktime]  DEFAULT (getdate()),
	[lookip] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_Sns_LookLog] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_LookLog', @level2type=N'COLUMN',@level2name=N'userid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'被浏览的用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_LookLog', @level2type=N'COLUMN',@level2name=N'lookid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_LookLog', @level2type=N'COLUMN',@level2name=N'looktime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览者Ip' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_LookLog', @level2type=N'COLUMN',@level2name=N'lookip'
GO



SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Bid](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Participation] [float] NULL,
	[Compliance] [float] NULL,
	[Successful] [float] NULL,
	[Website] [float] NULL,
 CONSTRAINT [PK_ZL_Bid] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'参与者分成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid', @level2type=N'COLUMN',@level2name=N'Participation'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'达标者分成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid', @level2type=N'COLUMN',@level2name=N'Compliance'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'中标者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid', @level2type=N'COLUMN',@level2name=N'Successful'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'网站商分成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid', @level2type=N'COLUMN',@level2name=N'Website'
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_BigLog](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[type] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[num] [int] NULL,
	[Cid] [int] NULL,
	[Ctime] [datetime] NULL CONSTRAINT [DF_ZL_BigLog_Ctime]  DEFAULT (getdate()),
	[userID] [int] NULL,
 CONSTRAINT [PK_ZL_BigLog] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BigLog', @level2type=N'COLUMN',@level2name=N'title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BigLog', @level2type=N'COLUMN',@level2name=N'type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'金钱' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BigLog', @level2type=N'COLUMN',@level2name=N'num'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BigLog', @level2type=N'COLUMN',@level2name=N'Cid'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_SettlementInfoList](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SettlementTitle] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[SettlementID] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[SettlementAllMoney] [money] NULL,
	[SuccessfulMoney] [money] NULL,
	[ComplianceMoney] [money] NULL,
	[ParticipantsMoney] [money] NULL,
	[WebSiteMoney] [money] NULL,
	[SettlementTime] [datetime] NULL CONSTRAINT [DF_ZL_SettlementInfoList_SettlementTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_SettlementInfoList] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结算标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'SettlementTitle'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关联内容ID列表' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'SettlementID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结算总价格' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'SettlementAllMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'中标者分成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'SuccessfulMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'达标者分成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'ComplianceMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'参与者分成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'ParticipantsMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结算时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SettlementInfoList', @level2type=N'COLUMN',@level2name=N'SettlementTime'
GO
---end


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_ProjectsComments](
	[CommentsID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectsID] [int] NULL,
	[ProcessesID] [int] NOT NULL,
	[UserID] [int] NULL,
	[Rating] [int] NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[CommentsDate] [datetime] NULL,
 CONSTRAINT [PK_ZL_ProjectsComments] PRIMARY KEY CLUSTERED 
(
	[CommentsID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'CommentsID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论所属项目ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'ProjectsID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论所属项目流程ID 为0时是对项目的评论而非对流程的评论' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'ProcessesID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论者ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目评分' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'Rating'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsComments', @level2type=N'COLUMN',@level2name=N'CommentsDate'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Projects](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[TypeID] [int] NULL,
	[OrderID] [int] NULL,
	[UserID] [int] NULL,
	[UserInfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Requirements] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Price] [decimal](18, 0) NULL,
	[BeginTime] [datetime] NULL,
	[Leader] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[WebCoding] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[AuditStatus] [int] NULL,
	[ProStatus] [int] NULL,
	[Progress] [int] NULL,
	[CompletionTime] [datetime] NULL,
	[Rating] [int] NULL,
	[Evaluation] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[ApplicationTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Projects] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'ID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属项目类型ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'TypeID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关联订单ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'OrderID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关联会员ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'甲方信息' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'UserInfo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目要求' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Requirements'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目价格' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Price'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'启动时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'BeginTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目经理' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Leader'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'审核状态1-审核中2-已通过' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'AuditStatus'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目状态1-启动2-完成3-存档0-未启动' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'ProStatus'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'当前进度流程ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Progress'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'完成时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'CompletionTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评分' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Rating'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目评价' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'Evaluation'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'申请时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Projects', @level2type=N'COLUMN',@level2name=N'ApplicationTime'
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_ProjectType](
	[ProjectTypeID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectTypeName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ProjectTypeInfo] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_ProjectType] PRIMARY KEY CLUSTERED 
(
	[ProjectTypeID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目类型ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectType', @level2type=N'COLUMN',@level2name=N'ProjectTypeID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目类型名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectType', @level2type=N'COLUMN',@level2name=N'ProjectTypeName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目类型简介' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectType', @level2type=N'COLUMN',@level2name=N'ProjectTypeInfo'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Processes](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Info] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[OpjectID] [int] NULL,
	[Progress] [int] NULL,
	[IsComplete] [int] NULL,
	[CompleteTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Processes] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目流程ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'ID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目流程名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目流程简介' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'Info'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属项目ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'OpjectID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'项目当前进度 单位%' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'Progress'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否完成0-未完成 1-已完成' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'IsComplete'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'完成时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Processes', @level2type=N'COLUMN',@level2name=N'CompleteTime'
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_ProjectBaseField](
	[FieldID] [int] IDENTITY(1,1) NOT NULL,
	[FieldName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[FieldAlias] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[FieldTips] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Description] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[IsNotNull] [bit] NULL,
	[FieldType] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[OrderId] [int] NULL,
	[ShowList] [bit] NULL,
	[ShowWidth] [int] NULL,
	[NoEdit] [int] NULL,
 CONSTRAINT [PK_ZL_ProjectBaseField] PRIMARY KEY CLUSTERED 
(
	[FieldID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'FieldName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段别名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'FieldAlias'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段说明' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'FieldTips'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段描述' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'Description'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段允许空，1：允许，2：不允许' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'IsNotNull'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段类型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'FieldType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'字段内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'OrderId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'列表显示。1：显示，2不显示' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'ShowList'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'显示列宽度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'ShowWidth'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许修改' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectBaseField', @level2type=N'COLUMN',@level2name=N'NoEdit'
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_ProjectsBase](
	[ProjectBaseID] [int] IDENTITY(1,1) NOT NULL,
	[ProjectsID] [int] NULL,
 CONSTRAINT [PK_ZL_ProjectsBase] PRIMARY KEY CLUSTERED 
(
	[ProjectBaseID] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'主键 ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsBase', @level2type=N'COLUMN',@level2name=N'ProjectBaseID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属项目ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ProjectsBase', @level2type=N'COLUMN',@level2name=N'ProjectsID'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_PageSkins](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Stylename] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[ShowImg] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[StyleUrl] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[IsDefault] [int] NULL CONSTRAINT [DF_ZL_PageSkins_IsDefault]  DEFAULT (0),
	[DefaultTemplate] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[NodeTemplate] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_PageSkins] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'风格名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PageSkins', @level2type=N'COLUMN',@level2name=N'Stylename'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'缩略图' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PageSkins', @level2type=N'COLUMN',@level2name=N'ShowImg'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'风格路径' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PageSkins', @level2type=N'COLUMN',@level2name=N'StyleUrl'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为默认' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PageSkins', @level2type=N'COLUMN',@level2name=N'IsDefault'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'默认首页模板' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PageSkins', @level2type=N'COLUMN',@level2name=N'DefaultTemplate'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'默认节点模板' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PageSkins', @level2type=N'COLUMN',@level2name=N'NodeTemplate'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Sns_Kiss](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[Inputer] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Sendto] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Otherdel] [int] NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[InputerID] [int] NULL,
	[SendtoID] [int] NULL,
	[SendTime] [datetime] NULL CONSTRAINT [DF_ZL_Sns_Kiss_SendTime]  DEFAULT (getdate()),
	[ReadTime] [datetime] NULL CONSTRAINT [DF_ZL_Sns_Kiss_ReadTime]  DEFAULT (getdate()),
	[IsRead] [int] NULL CONSTRAINT [DF_ZL_Sns_Kiss_IsRead]  DEFAULT (0),
 CONSTRAINT [PK_ZL_Sns_Kiss] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'秋波标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'Title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'Inputer'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'目标' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'Sendto'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'对方删除' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'Otherdel'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'秋波内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'InputerID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'对方ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'SendtoID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发送时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'SendTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'阅读时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'ReadTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否打开' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sns_Kiss', @level2type=N'COLUMN',@level2name=N'IsRead'
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PR_TSQL]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE PROCEDURE [dbo].[PR_TSQL]
@tsql varchar(500)
With ENCRYPTION AS
exec(@tsql)
' 
END
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Search](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[type] [int] NOT NULL,
	[linkType] [int] NULL,
	[fileUrl] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[state] [int] NULL,
	[linkState] [int] NULL,
	[time] [datetime] NULL CONSTRAINT [DF_ZL_Search_time]  DEFAULT (getdate()),
 CONSTRAINT [PK_search] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_IServer](
	[QuestionId] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [int] NOT NULL,
	[Title] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Priority] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Type] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ReadCount] [int] NULL CONSTRAINT [DF_ZL_IServer_ReadCount]  DEFAULT (0),
	[SubTime] [datetime] NULL,
	[State] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[SolveTime] [datetime] NULL,
	[Path] [varchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[Root] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[RootInfo] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_IServer] PRIMARY KEY CLUSTERED 
(
	[QuestionId] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'问题编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'QuestionId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发表问题用户编号' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'UserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'Title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'优先级' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'Priority'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'Type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'已读次数' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'ReadCount'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'提交时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'SubTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'State'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'解决时间' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'SolveTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'附件路径' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'Path'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'问题来源' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'Root'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'来源附件信息' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_IServer', @level2type=N'COLUMN', @level2name=N'RootInfo'
GO


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_IServerReply](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[QuestionId] [int] NOT NULL,
	[UserId] [int] NOT NULL,
	[Title] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[ReplyTime] [datetime] NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Path] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[isRead] [int] NULL,
 CONSTRAINT [PK_ZL_IServerReply] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复编号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'Id'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'问题编号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'QuestionId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复人编号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'UserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'Title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'ReplyTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'附件路径' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'Path'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已读：0为未读,1为已读' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_IServerReply', @level2type=N'COLUMN',@level2name=N'isRead'
GO

--20100317 hmw
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Sensitivity](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[keyname] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[istrue] [int] NULL,
 CONSTRAINT [PK_ZL_Sensitivity] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sensitivity', @level2type=N'COLUMN',@level2name=N'keyname'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Sensitivity', @level2type=N'COLUMN',@level2name=N'istrue'
GO
--end

-- 2010 0321  huzhengxiu
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Bid_Rank](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Bname] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[MinQuali] [int] NOT NULL,
	[price] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[remark] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL,
	[MaxQuali] [int] NOT NULL,
	[Offers] [ntext] COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排位资质' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Bid_Rank', @level2type=N'COLUMN', @level2name=N'Bname'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'最低排位' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Bid_Rank', @level2type=N'COLUMN', @level2name=N'MinQuali'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'价格' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Bid_Rank', @level2type=N'COLUMN', @level2name=N'price'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Bid_Rank', @level2type=N'COLUMN', @level2name=N'remark'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'最高排位' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Bid_Rank', @level2type=N'COLUMN', @level2name=N'MaxQuali'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'优惠' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_Bid_Rank', @level2type=N'COLUMN', @level2name=N'Offers'

GO

SET IDENTITY_INSERT [ZL_Bid_Rank] ON
INSERT [ZL_Bid_Rank] ([ID],[Bname] , [MinQuali] , [price] , [remark] , [MaxQuali] , [Offers]) VALUES (1,'十一国贸易', 1, '19800元(中英文两大网站)9800元(中或应文网站)','<Gui>出价相同情况下1．按会员等级高低，款到先后依次获得排名2．如上一级会员弃拍下一级会员有权获得高于自身等级的排位</Gui><Bank>上海银行西藏南路支行</Bank><Name>上海亚贸信息技术有限公司</Name><Account>316227-00200055120 </Account><Remark1>1. 付款前请了解：付款前，贵公司需具有真实合法有效的工商营业执照；申请人获得企业法定代表人的授权。2. 汇款后，务必将汇款凭证传真到021-53590538-811 以免款项认领不清， 网上银行支付客户请打印付款成功页面。 咨询电话：021-63158066。3. 款项到帐后，我们将开通您的会员权限，并在两个工作日内寄出发票。</Remark1>', 2,'2年90%，3年85%')    
SET IDENTITY_INSERT [ZL_Bid_Rank] OFF

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Bid_Application](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[UserID] [int] NULL,
	[keyWord] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[Qualify] [int] NOT NULL,
	[Website] [int] NOT NULL,
	[Life] [int] NOT NULL,
	[PayTime] [datetime] NOT NULL,
	[Payment] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL
) ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买关键字' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid_Application', @level2type=N'COLUMN',@level2name=N'keyWord'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买排位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid_Application', @level2type=N'COLUMN',@level2name=N'Qualify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站:1为中文网 2为英文网站 3为中英文网' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid_Application', @level2type=N'COLUMN',@level2name=N'Website'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买年限' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid_Application', @level2type=N'COLUMN',@level2name=N'Life'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'付款时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid_Application', @level2type=N'COLUMN',@level2name=N'PayTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'付款方式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Bid_Application', @level2type=N'COLUMN',@level2name=N'Payment'
GO
--end

--20100321 hmw
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_UserClass](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Classname] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Classid] [int] NULL,
	[Username] [nvarchar](250) COLLATE Chinese_PRC_CI_AS NULL,
	[Shopid] [int] NULL,
	[Orderid] [int] NULL,
	[Classinfo] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_UserClass] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserClass', @level2type=N'COLUMN',@level2name=N'Classname'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserClass', @level2type=N'COLUMN',@level2name=N'Classid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserClass', @level2type=N'COLUMN',@level2name=N'Username'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商铺ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserClass', @level2type=N'COLUMN',@level2name=N'Shopid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排列ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserClass', @level2type=N'COLUMN',@level2name=N'Orderid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类说明' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserClass', @level2type=N'COLUMN',@level2name=N'Classinfo'
GO
--end

--20100321 wangb
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_UserRegisterIP](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[LimitTime] [int] NULL,
	[IsLimit] [int] NULL,
	[IsIPpart] [int] NULL,
	[BeginIP] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[EndIP] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_UserRegisterManage] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'限制间隔时间(单位为小时)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserRegisterIP', @level2type=N'COLUMN', @level2name=N'LimitTime'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否限制(-----0为不限制-----其他为限制)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserRegisterIP', @level2type=N'COLUMN', @level2name=N'IsLimit'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否设置受限IP段(------0为不设置------其他为设置)' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserRegisterIP', @level2type=N'COLUMN', @level2name=N'IsIPpart'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'受限起始IP' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserRegisterIP', @level2type=N'COLUMN', @level2name=N'BeginIP'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结束IP' ,@level0type=N'USER', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'ZL_UserRegisterIP', @level2type=N'COLUMN', @level2name=N'EndIP'

--end

--20100326 huzhengxiu
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_Passenger](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Name_EN] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Nation] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[CreID] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Insurance] [int] NULL,
	[Sex] [char](10) COLLATE Chinese_PRC_CI_AS NULL,
	[BirthDay] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Mobile] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ticType] [int] NULL,
	[flyerCart] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[UserID] [int] NULL,
	[isConst] [int] NULL,
	[OrderNO] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'中文姓名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单id' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'OrderNO'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'英文姓名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'Name_EN'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'国籍' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'Nation'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'证件类型:证件号码(如身份证:36012247458474|护照:G120044)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'CreID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'保险' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'Insurance'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'性别' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'Sex'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'出生日期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'BirthDay'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'Mobile'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'购票类型:1为成人票 2为儿童 3为婴儿' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'ticType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'国航常旅客卡' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'flyerCart'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为常用客户 0为否 1为是' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Passenger', @level2type=N'COLUMN',@level2name=N'isConst'
-- end


-- 20100327 huzhengxiu 
GO
/****** 对象:  Table [dbo].[ZL_Papers_System]    脚本日期: 03/27/2010 11:52:15 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Papers_System](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[p_name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[p_type] [int] NOT NULL,
 CONSTRAINT [PK_Papers_System] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'试卷名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Papers_System', @level2type=N'COLUMN',@level2name=N'p_name'

GO
/****** 对象:  Table [dbo].[ZL_Papers_User]    脚本日期: 03/27/2010 11:55:43 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Papers_User](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[p_name] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[p_type] [int] NOT NULL,
	[p_User] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NOT NULL,
 CONSTRAINT [PK_ZL_Papers_User] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'试卷名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Papers_User', @level2type=N'COLUMN',@level2name=N'p_name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分类' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Papers_User', @level2type=N'COLUMN',@level2name=N'p_type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Papers_User', @level2type=N'COLUMN',@level2name=N'p_User'


/****** 对象:  Table [dbo].[ZL_Questions]    脚本日期: 03/27/2010 11:56:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Questions](
	[p_id] [int] IDENTITY(1,1) NOT NULL,
	[p_title] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[p_Difficulty] [int] NULL,
	[p_Class] [int] NULL,
	[p_Views] [int] NULL,
	[p_Inputer] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[p_Type] [int] NULL,
	[p_Knowledge] [int] NOT NULL,
	[p_Answer] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[p_Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[p_CreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Questions_p_CreateTime]  DEFAULT (getdate()),
	[Paper_Id] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'试题标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'难度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Difficulty'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Class'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Views'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Inputer'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'题型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'知识点' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Knowledge'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'答案' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Answer'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'试题内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'p_CreateTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属试卷ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions', @level2type=N'COLUMN',@level2name=N'Paper_Id'


GO
/****** 对象:  Table [dbo].[ZL_Questions_Class]    脚本日期: 03/27/2010 11:57:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Questions_Class](
	[C_id] [int] IDENTITY(1,1) NOT NULL,
	[C_ClassName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[C_Classid] [int] NULL,
	[C_OrderBy] [int] NOT NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Class', @level2type=N'COLUMN',@level2name=N'C_ClassName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Class', @level2type=N'COLUMN',@level2name=N'C_Classid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Class', @level2type=N'COLUMN',@level2name=N'C_OrderBy'

GO
/****** 对象:  Table [dbo].[ZL_Questions_Knowledge]    脚本日期: 03/27/2010 11:58:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Questions_Knowledge](
	[k_id] [int] IDENTITY(1,1) NOT NULL,
	[k_name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
	[k_Class_id] [int] NOT NULL,
	[k_OrderBy] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'知识点' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Knowledge', @level2type=N'COLUMN',@level2name=N'k_name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分类ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Knowledge', @level2type=N'COLUMN',@level2name=N'k_Class_id'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Knowledge', @level2type=N'COLUMN',@level2name=N'k_OrderBy'

GO
/****** 对象:  Table [dbo].[ZL_Questions_Type]    脚本日期: 03/27/2010 11:59:13 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Questions_Type](
	[t_id] [int] IDENTITY(1,1) NOT NULL,
	[t_name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NOT NULL,
 CONSTRAINT [PK_ZL_Questions_Type] PRIMARY KEY CLUSTERED 
(
	[t_id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Type', @level2type=N'COLUMN',@level2name=N't_id'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'题型名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_Type', @level2type=N'COLUMN',@level2name=N't_name'

GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Questions_User](
	[p_id] [int] IDENTITY(1,1) NOT NULL,
	[p_title] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[p_Difficulty] [int] NULL,
	[p_Class] [int] NULL,
	[p_Views] [int] NULL,
	[p_Inputer] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[p_Type] [int] NULL,
	[p_Knowledge] [int] NOT NULL,
	[p_Answer] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[p_Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[p_CreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Questions_User_p_CreateTime]  DEFAULT (getdate()),
	[p_User] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[paper_Id] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'试题标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'难度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Difficulty'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Class'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Views'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Inputer'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'题型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'知识点' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Knowledge'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'答案' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Answer'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_CreateTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'p_User'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属试卷ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Questions_User', @level2type=N'COLUMN',@level2name=N'paper_Id'
GO

-- 20100401 huzhengxiu
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Arrive](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ArriveNO] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[UserID] [int] NULL,
	[Amount] [money] NULL,
	[AgainTime] [datetime] NULL,
	[EndTime] [datetime] NULL,
	[State] [int] NULL,
	[ArriveName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'ArriveNO'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'Amount'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开始时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'AgainTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'EndTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'State'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'抵用劵名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Arrive', @level2type=N'COLUMN',@level2name=N'ArriveName'
GO
 -- end

-- 20100402  huzhengxiu
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_CreateJS](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Jsname] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[JsReadme] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[ContentType] [int] NULL,
	[JsFileName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[JsType] [int] NULL,
	[JsXmlContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_CreateJS] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'代码名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_CreateJS', @level2type=N'COLUMN',@level2name=N'Jsname'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'简介' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_CreateJS', @level2type=N'COLUMN',@level2name=N'JsReadme'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容代码格式' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_CreateJS', @level2type=N'COLUMN',@level2name=N'ContentType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'文件名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_CreateJS', @level2type=N'COLUMN',@level2name=N'JsFileName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'JS类型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_CreateJS', @level2type=N'COLUMN',@level2name=N'JsType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'配置XML内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_CreateJS', @level2type=N'COLUMN',@level2name=N'JsXmlContent'
GO
-- end
-- 20100403 hmw
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_UserPromotions](
	[pid] [int] IDENTITY(1,1) NOT NULL,
	[GroupID] [int] NULL,
	[look] [int] NULL,
	[addTo] [int] NULL,
	[Modify] [int] NULL,
	[Columns] [int] NULL,
	[Comments] [int] NULL,
	[Deleted] [int] NULL,
	[NodeID] [int] NULL,
	[ModelID] [int] NULL,
 CONSTRAINT [PK_ZL_UserPromotions] PRIMARY KEY CLUSTERED 
(
	[pid] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'权限ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户组ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'GroupID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'查看' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'look'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'addTo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'修改' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'Modify'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'仅当前节点' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'Columns'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'允许评论' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'Comments'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'删除' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'Deleted'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'节点ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'NodeID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模型ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_UserPromotions', @level2type=N'COLUMN',@level2name=N'ModelID'
GO
--end

-- 20100406 huzhengxiu
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Wap_Forum_Class](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[classId] [int] NULL,
 CONSTRAINT [PK_ZL_Wap_Forum_Class] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Class', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分类ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Class', @level2type=N'COLUMN',@level2name=N'classId'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Wap_Forum_Posts](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[userId] [int] NULL,
	[title] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[classId] [int] NULL,
	[isBest] [bit] NULL,
	[postTime] [datetime] NULL ,
 CONSTRAINT [PK_ZL_WapForumPosts] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Posts', @level2type=N'COLUMN',@level2name=N'userId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Posts', @level2type=N'COLUMN',@level2name=N'title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Posts', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分类ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Posts', @level2type=N'COLUMN',@level2name=N'classId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为精华' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Posts', @level2type=N'COLUMN',@level2name=N'isBest'

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发表时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Posts', @level2type=N'COLUMN',@level2name=N'postTime'

GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Wap_Forum_Replies](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[postId] [int] NULL,
	[title] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[userId] [int] NULL,
	[ReTime] [datetime] NULL,
 CONSTRAINT [PK_ZL_Wap_Forum_Replies] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帖子ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Replies', @level2type=N'COLUMN',@level2name=N'postId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Replies', @level2type=N'COLUMN',@level2name=N'title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Replies', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Replies', @level2type=N'COLUMN',@level2name=N'userId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'回复时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Wap_Forum_Replies', @level2type=N'COLUMN',@level2name=N'ReTime'
GO

-- end
 --  20100408 huzhengxiu
 
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_NovelNVedio](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Url] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[type] [char](10) COLLATE Chinese_PRC_CI_AS NULL,
	[classid] [char](10) COLLATE Chinese_PRC_CI_AS NULL,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_NovelNVedio] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'链接地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_NovelNVedio', @level2type=N'COLUMN',@level2name=N'Url'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型:小说 或视频 友情链接...' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_NovelNVedio', @level2type=N'COLUMN',@level2name=N'type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类别' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_NovelNVedio', @level2type=N'COLUMN',@level2name=N'classid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'简介' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_NovelNVedio', @level2type=N'COLUMN',@level2name=N'content'
GO
 -- end
 
 -- 20100412 hmw
 SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_MbClass](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ClassName] [nvarchar](255) NULL,
	[Classid] [int] NULL,
 CONSTRAINT [PK_ZL_MbClass] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MbClass', @level2type=N'COLUMN',@level2name=N'ClassName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分类' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_MbClass', @level2type=N'COLUMN',@level2name=N'Classid'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Microb](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Mbtitle] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[MbContent] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[MbAdd] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[Keywords] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[Record] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[Description] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[Start] [int] NULL,
	[Attention] [int] NULL,
	[Comment] [int] NULL,
	[Reprinted] [int] NULL,
	[Fans] [int] NULL,
	[MicroBoUrl] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[BlogURL] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Certification] [int] NULL,
	[Elect] [int] NULL,
 CONSTRAINT [PK_ZL_Microb] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'微博标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Microb', @level2type=N'COLUMN',@level2name=N'Mbtitle'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'微博说明' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Microb', @level2type=N'COLUMN',@level2name=N'MbContent'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'微博地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Microb', @level2type=N'COLUMN',@level2name=N'MbAdd'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'meta关键字,多个以,隔开' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Microb', @level2type=N'COLUMN',@level2name=N'Keywords'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备案信息' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Microb', @level2type=N'COLUMN',@level2name=N'Record'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'Meta描述,建议少于等于200个字符' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Microb', @level2type=N'COLUMN',@level2name=N'Description'
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Mbtopic](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ClassID] [int] NULL,
	[ParentID] [int] NULL,
	[TopicClass] [int] NULL,
	[Title] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[Inputer] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Recommend] [int] NULL,
	[Comment] [int] NULL,
	[Sendto] [int] NULL,
	[CreateTime] [datetime] NULL CONSTRAINT [DF_ZL_Mtopic_CreateTime]  DEFAULT (getdate()),
	[ChangeTime] [datetime] NULL,
	[CreateIP] [nvarchar](20) COLLATE Chinese_PRC_CI_AS NULL,
	[ChangeIP] [nvarchar](20) COLLATE Chinese_PRC_CI_AS NULL,
	[MbID] [int] NULL,
	[Start] [int] NULL,
	[SendType] [int] NULL,
	[TopicType] [int] NULL,
	[Elect] [int] NULL,
 CONSTRAINT [PK_ZL_Mtopic] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'ClassID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属话题ID(0-话题)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'ParentID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'话题分类(0-官方话题 1-用户话题)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'TopicClass'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帖子标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'Title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'作者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'Inputer'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帖子内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'Recommend'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'评论数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'Comment'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'转发数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'Sendto'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'CreateTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'ChangeTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发布IP' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'CreateIP'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'修改IP' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'ChangeIP'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'微博ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Mbtopic', @level2type=N'COLUMN',@level2name=N'MbID'
GO
--end

  -- 20100413 huzhengxiu


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_School_Daren](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[pid] [int] NULL,
	[userId] [int] NULL,
	[addtime] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'留言内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_School_Daren', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'校园达人ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_School_Daren', @level2type=N'COLUMN',@level2name=N'pid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'留言者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_School_Daren', @level2type=N'COLUMN',@level2name=N'userId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_School_Daren', @level2type=N'COLUMN',@level2name=N'addtime'
GO
--end

--20100415 huzhengxiu

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_BookRead](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[userId] [int] NULL,
	[effectTime] [datetime] NULL,
	[endTime] [datetime] NULL,
	[IsNotRead] [int] NULL,
	[isAudit] [int] NULL,
	[Reserve] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Gid] [int] NULL,
	[userType] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订阅者' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'userId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'生效时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'effectTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'到期时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'endTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否终止订阅:0为否,1为是' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'IsNotRead'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已审核:0为未审核,1为已审核' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'isAudit'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许退订' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'Reserve'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'Gid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户类型:0为个人,1为用户组' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_BookRead', @level2type=N'COLUMN',@level2name=N'userType'
GO
--end

 -- huzhengxiu 20100417
SET IDENTITY_INSERT [ZL_Questions] ON

 INSERT [ZL_Questions] ( [p_id] , [p_title] , [p_Difficulty] , [p_Class] , [p_Views] , [p_Inputer] , [p_Type] , [p_Knowledge] , [p_Answer] , 
[p_Content] , [p_CreateTime] , [Paper_Id] ) VALUES ( 1 , 'sdfsf' , 1 , 1 , 1 , 'admin' , 1 , 0 , '' , 'sdfdsfsdsfdsfsd' ,
 '2010-04-17 00:00:00.000' , 0 )
 INSERT [ZL_Questions] ( [p_id] , [p_title] , [p_Difficulty] , [p_Class] , [p_Views] , [p_Inputer] , [p_Type] , [p_Knowledge] , [p_Answer] , 
[p_Content] , [p_CreateTime] , [Paper_Id] ) VALUES ( 2 , '此次抽查' , 2 , 2 , 1 , 'admin' , 2 , 0 , '' , '梵蒂冈但是' ,
 '2010-04-17 00:00:00.000' , 0 )
 INSERT [ZL_Questions] ( [p_id] , [p_title] , [p_Difficulty] , [p_Class] , [p_Views] , [p_Inputer] , [p_Type] , [p_Knowledge] , [p_Answer] , 
[p_Content] , [p_CreateTime] , [Paper_Id] ) VALUES ( 3 , '第一章　声现象' , 1 , 1 , 1 , 'admin' , 3 , 0 , '<div _extended="true" class="daan" 
id="daan-62928">
	<p>
		<span>I=U/R </span><span>电阻一定时，电流与是压成正比</span></p>
	<p>
		<span>U=IR&nbsp; </span><span>电压一定时，电流与电阻成反比</span></p>
	<p>
		<span>R=U/I&nbsp; </span><span>电阻等于电压和电流的比值</span></p>
</div>' , '欧姆定律揭示了I、U、R三个物理量之间的规律，并可以写出三个物理公式。请你分别写出三个公式并说出每个公式所表示的意义？' ,
 '2010-04-17 00:00:00.000' , 0 )
 INSERT [ZL_Questions] ( [p_id] , [p_title] , [p_Difficulty] , [p_Class] , [p_Views] , [p_Inputer] , [p_Type] , [p_Knowledge] , [p_Answer] , 
[p_Content] , [p_CreateTime] , [Paper_Id] ) VALUES ( 4 , '初二物理第二学期期末检测 ' , 4 , 1 , 1 , 'admin' , 3 , 2 , '<div _extended="true" 
class="daan" id="daan-62927">
	<p>
		<span>用电器和电线是串联的，电流相同，但用电器的电阻比电线的电阻要大很多，据</span><span>P=I<sup>2</sup>R</span></p>
	<p>
		<span>&nbsp;&nbsp; </span><span>电阻越大，发热就越厉害。</span></p>
</div>' , '莉莉学习了《电功率》一章的知识后，回家仔细观察了家里的电水壶、电饭锅等较大功率的用电器在工作时的情况是：电水壶、电饭锅都很热而连接
它们的电线却不热。请你和莉莉共同探究这个问题并把你的想法写在下面： ' , '2010-04-17 00:00:00.000' , 0 )
 INSERT [ZL_Questions] ( [p_id] , [p_title] , [p_Difficulty] , [p_Class] , [p_Views] , [p_Inputer] , [p_Type] , [p_Knowledge] , [p_Answer] , 
[p_Content] , [p_CreateTime] , [Paper_Id] ) VALUES ( 5 , '第一章 力' , 2 , 2 , 1 , 'admin' , 3 , 1 , '<div _extended="true" class="daan" 
id="daan-218816">
	<p>
		<span>（</span><span>1</span><span>）由</span><span><sub><img height="44" 
src="http://gzwl.cooco.net.cn/files/down/test/2010/04/14/17/2010041417061723933126.files/image033.gif" width="279" /></sub></span><span>得
</span></p>
	<p>
		<span><sub><img height="44" 
src="http://gzwl.cooco.net.cn/files/down/test/2010/04/14/17/2010041417061723933126.files/image034.gif" width="352" /></sub>&nbsp;&nbsp;&nbsp; 
</span><span>（</span><span>2</span><span>）当</span><span>ab</span><span>棒达到最大速度时有</span><span><sub><img height="44" 
src="http://gzwl.cooco.net.cn/files/down/test/2010/04/14/17/2010041417061723933126.files/image035.gif" width="125" /></sub></span><span>所以
：</span></p>
	<p>
		<span><sub><img height="41" 
src="http://gzwl.cooco.net.cn/files/down/test/2010/04/14/17/2010041417061723933126.files/image036.gif" width="253" /></sub></span></p>
	<p>
		<span>当</span><span>ab</span><span>棒达到最大速度后，撤去外力</span><span>F</span><span>，此后物体的动能全用来克服安培力作功
，所以感应电流产生的热量为：</span><span><sub><img height="41" 
src="http://gzwl.cooco.net.cn/files/down/test/2010/04/14/17/2010041417061723933126.files/image037.gif" width="215" /></sub></span></p>
	<p>
		&nbsp;</p>
</div>' , '水平放置的平行金属框架L=0.2m,质量为0.1kg的金属棒ab放在框架上，并且与框架的两个边垂直。整个装置放于方向竖直向下、B=0.5T的匀强磁场中
，如图所示。金属棒ab在F=2N的水平向右的恒力作用下由静止开始运动。电路中除R=0.05外，其他电阻、摩擦阻力均不考虑。求：① ab速度是5m/s时，棒的加速
度是多大？

② 当ab棒达到最大速度后，撤去外力F，此后感应电流还能产生多少热量？' , '2010-04-17 00:00:00.000' , 0 )

 SET IDENTITY_INSERT [ZL_Questions] OFF


 SET IDENTITY_INSERT [ZL_Questions_Class] ON

 INSERT [ZL_Questions_Class] ( [C_id] , [C_ClassName] , [C_Classid] , [C_OrderBy] ) VALUES ( 1 , '初中物理' , 0 , 0 )
 INSERT [ZL_Questions_Class] ( [C_id] , [C_ClassName] , [C_Classid] , [C_OrderBy] ) VALUES ( 2 , '高中物理' , 0 , 0 )
 INSERT [ZL_Questions_Class] ( [C_id] , [C_ClassName] , [C_Classid] , [C_OrderBy] ) VALUES ( 3 , '第一章、 直线运动' , 1 , 0 )
 INSERT [ZL_Questions_Class] ( [C_id] , [C_ClassName] , [C_Classid] , [C_OrderBy] ) VALUES ( 4 , '第二章、物体的平衡' , 1 , 0 )
 INSERT [ZL_Questions_Class] ( [C_id] , [C_ClassName] , [C_Classid] , [C_OrderBy] ) VALUES ( 5 , '第一章、机械波' , 2 , 0 )
 INSERT [ZL_Questions_Class] ( [C_id] , [C_ClassName] , [C_Classid] , [C_OrderBy] ) VALUES ( 6 , '第二章、固体、液体和气体' , 2 , 0 )

 SET IDENTITY_INSERT [ZL_Questions_Class] OFF


 SET IDENTITY_INSERT [ZL_Questions_Knowledge] ON

 INSERT [ZL_Questions_Knowledge] ( [k_id] , [k_name] , [k_Class_id] , [k_OrderBy] ) VALUES ( 1 , '二、欧姆定律及其应用' , 2 , 0 )
 INSERT [ZL_Questions_Knowledge] ( [k_id] , [k_name] , [k_Class_id] , [k_OrderBy] ) VALUES ( 2 , '四、电与热' , 1 , 0 )

 SET IDENTITY_INSERT [ZL_Questions_Knowledge] OFF


 SET IDENTITY_INSERT [ZL_Questions_Type] ON

 INSERT [ZL_Questions_Type] ( [t_id] , [t_name] ) VALUES ( 1 , '选择题' )
 INSERT [ZL_Questions_Type] ( [t_id] , [t_name] ) VALUES ( 2 , '填空题' )
 INSERT [ZL_Questions_Type] ( [t_id] , [t_name] ) VALUES ( 3 , '应用题' )

 SET IDENTITY_INSERT [ZL_Questions_Type] OFF

-- end
-- huzhengxiu 20100419
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_RebateOrder](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[OrderNo] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[WebsiteId] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[OrderState] [int] NULL,
	[OrderData] [datetime] NULL,
	[OrderMoney] [money] NULL,
	[ProfileMoney] [money] NULL,
	[Commision] [money] NULL,
	[OrderFbackData] [datetime] NULL,
	[UnionId] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[UserId] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[ParentRebate] [money] NULL,
	[Shopsite] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[MerNum] [int] NULL,
	[MerPrice] [money] NULL,
	[MerSumPrice] [money] NULL,
	[parentUser] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[parentPUser] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Remark] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[ParentPRebate] [money] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单编号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'OrderNo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'网站编号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'WebsiteId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单状态:0为未确认；1为有效订单；2为无效订单' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'OrderState'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'下单日期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'OrderData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'OrderMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'返利金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'ProfileMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'佣金' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'Commision'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'订单反馈日期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'OrderFbackData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'联盟主' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'UnionId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户Id' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'UserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上一级用户获得返利值' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'ParentRebate'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上上级用户返利比率' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'ParentPRebate'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'广告主(购物商城)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'Shopsite'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商品数量' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'MerNum'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商品单价' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'MerPrice'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商品总价' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'MerSumPrice'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上一级用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'parentUser'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上上级用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'parentPUser'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RebateOrder', @level2type=N'COLUMN',@level2name=N'Remark'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Shopsite](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[url] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Sname] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[cid] [int] NULL,
	[UnionNo] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[aid] [int] NULL,
	[aurl] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[ToParaname] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[lablename] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[RebateRate] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[PageRebateRate] [float] NULL,
	[PrantPageRebate] [float] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商城简称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商城网址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'url'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商城名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'Sname'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属类别' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'cid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'联盟的广告主ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'UnionNo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'最高返利比率' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'RebateRate'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'第一级子站返利比率' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'PageRebateRate'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上一级子站返利比率' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Shopsite', @level2type=N'COLUMN',@level2name=N'PrantPageRebate'
GO
--end
--  huzhengxiu 20100421
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Honor](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[OrderData] [datetime] NULL,
	[HonorMoney] [money] NULL,
	[Fee] [money] NULL,
	[State] [int] NULL,
	[payData] [datetime] NULL,
	[Payinfo] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[userId] [int] NULL,
	[adminId] [int] NULL,
	[type] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'申请时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'OrderData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'兑现金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'HonorMoney'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'扣除手续费' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'Fee'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'状态' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'State'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付日期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'payData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付信息' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'Payinfo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'userId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'负责人' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'adminId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'兑现类型:0为订单返利,1为分站返利' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Honor', @level2type=N'COLUMN',@level2name=N'type'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Accountinfo](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[BankOfDeposit] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[NameOfDeposit] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Account] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[CardID] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Lock] [int] NULL,
	[UserId] [int] NULL,
	[PayId] [int] NULL 
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户行及支行全称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'BankOfDeposit'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户人真实姓名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'NameOfDeposit'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'开户帐号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'Account'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'会员真实姓名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'Name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'会员身份证号码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'CardID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否绑定用户真实姓名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'Lock'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'UserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Accountinfo', @level2type=N'COLUMN',@level2name=N'PayId'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Redindulgence](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Account] [money] NULL,
	[UserId] [int] NULL,
	[mail] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[InvitePeople] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[FriendName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Url][ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[isUse] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'Account'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'注册链接地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'Url'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'UserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'发送邮箱' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'mail'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'邀请人' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'InvitePeople'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'朋友姓名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'FriendName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已使用:0为未使用,1为已使用' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Redindulgence', @level2type=N'COLUMN',@level2name=N'isUse'
GO

-- end

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Page](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Proname] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[PageTitle] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[KeyWords] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[Description] [nvarchar](2000) COLLATE Chinese_PRC_CI_AS NULL,
	[LOGO] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Domain] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[Style] [int] NULL,
	[HeadHeight] [int] NULL,
	[HeadColor] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[CommonModelID] [int] NOT NULL,
	[TableName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Hits] [int] NULL,
	[InfoID] [int] NOT NULL,
	[Best] [int] NULL CONSTRAINT [DF_ZL_Page_Best]  DEFAULT (0),
	[Status] [int] NULL,
	[UserID] [int] NULL,
	[UserName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[ParentPageID] [int] NULL,
	[ParentUserID] [int] NULL,
	[PageInfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[TopWords] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[BottonWords] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[CreateTime] [datetime] NULL,
	[NodeStyle] [int] NULL CONSTRAINT [DF_ZL_Page_NodeStyle]  DEFAULT (0),
	[HeadBackGround] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_Page] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'企业名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Proname'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'黄页标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'PageTitle'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'KeyWords'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Description'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'LOGO' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'LOGO'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'访问域名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Domain'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'风格' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Style'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'导航条高度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'HeadHeight'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'导航条颜色' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'HeadColor'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'ZL_CommonModel中的ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'CommonModelID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模型名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'TableName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点击数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Hits'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'模型内容ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'InfoID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐级别' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Best'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'审核状态' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'Status'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'UserID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'UserName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上级黄页ID(上级商铺)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'ParentPageID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'上级用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'ParentUserID'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'黄页说明' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'PageInfo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'头部自定义HTML内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'TopWords'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'底部HTML内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'BottonWords'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'CreateTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'节点样式' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'NodeStyle'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'导航背景' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Page', @level2type=N'COLUMN',@level2name=N'HeadBackGround'
GO
-- huzhengxiu 20100423
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_GiftCard_User](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ShopCardId] [int] NULL,
	[CardNO] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[CardPass] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[password] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[CardType] [int] NULL,
	[UserId] [int] NULL,
	[OrderData] [datetime] NULL,
	[confirmData] [datetime] NULL,
	[State] [int] NULL,
	[confirmState] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商城礼品ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'ShopCardId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'卡号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'CardNO'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'卡号密码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'CardPass'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'确认密码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'password'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'卡类别:1为积分兑换,2为返利金额兑换' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'CardType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'UserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'申请时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'OrderData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'确认日期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'confirmData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'兑现状态:0为未兑现,1为已兑现' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'State'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'确认状态' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'confirmState'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_User', @level2type=N'COLUMN',@level2name=N'remark'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_GiftCard_shop](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Period] [datetime] NULL,
	[Cardinfo] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Points] [int] NULL,
	[shopId] [int] NULL ,
	[rebateVal] [money] NULL,
	[Days] [int] NULL,
	[Num] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'有效期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'Period'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'卡信息' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'Cardinfo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'remark'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'积分数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'Points'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'返利金额' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'rebateVal'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'限制:几天可兑换一次' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'Days'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商家ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'shopId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_GiftCard_shop', @level2type=N'COLUMN',@level2name=N'Num'
GO
-- end
-- huzhengxiu 20100423
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_RedEnvelope](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[OrderData] [datetime] NULL,
	[OrderState] [int] NULL,
	[DeducFee] [money] NULL,
	[RebateId] [int] NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[RedEnvelope] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[type] [int] NULL,
	[Userid] [int] NULL,
	[payData] [datetime] NULL,
	[adminid] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'申请时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'OrderData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'申请状态' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'OrderState'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'扣除手续费' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'DeducFee'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'红包' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'RedEnvelope'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型:0为现金，1为礼品卡' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'Userid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'返利ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'RebateId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'支付日期' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'payData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'负责人' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_RedEnvelope', @level2type=N'COLUMN',@level2name=N'adminid'
GO
-- end
 --huzhengxiu 20100424
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Keyword](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Tag] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[count] [int] NULL,
	[SeachData] [datetime] NULL,
	[StorageData] [datetime] NULL,
	[otherinfo] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[UpdateTime] [datetime] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'关键字' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Keyword', @level2type=N'COLUMN',@level2name=N'Tag'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'搜索次数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Keyword', @level2type=N'COLUMN',@level2name=N'count'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'搜索时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Keyword', @level2type=N'COLUMN',@level2name=N'SeachData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'入库时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Keyword', @level2type=N'COLUMN',@level2name=N'StorageData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'其他信息' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Keyword', @level2type=N'COLUMN',@level2name=N'otherinfo'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Keyword', @level2type=N'COLUMN',@level2name=N'UpdateTime'
GO
--end
-- huzhengxiu 20100424
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_PointRecord](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[AddTime] [datetime] NULL,
	[Points] [int] NULL,
	[Type] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Remark] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[UserId] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PointRecord', @level2type=N'COLUMN',@level2name=N'AddTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所得积分' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PointRecord', @level2type=N'COLUMN',@level2name=N'Points'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PointRecord', @level2type=N'COLUMN',@level2name=N'Type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PointRecord', @level2type=N'COLUMN',@level2name=N'Remark'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PointRecord', @level2type=N'COLUMN',@level2name=N'UserId'
-- end
--huzhengxiu 20100424
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_InviteRecord](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[userid] [int] NULL,
	[RecommUserId] [int] NULL,
	[RegData] [datetime] NULL,
	[isValid] [int] NULL,
	[isReset] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'当前用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_InviteRecord', @level2type=N'COLUMN',@level2name=N'userid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐注册用户' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_InviteRecord', @level2type=N'COLUMN',@level2name=N'RecommUserId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_InviteRecord', @level2type=N'COLUMN',@level2name=N'RegData'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否是有效用户:0为否,1为是' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_InviteRecord', @level2type=N'COLUMN',@level2name=N'isValid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已重置:0为否,1为是' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_InviteRecord', @level2type=N'COLUMN',@level2name=N'isReset'
GO
-- end
-- huzhengxiu 20100505
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ZL_Promotion](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[userId] [int] NULL,
	[LinkUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[PromoUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[type] [char](10) COLLATE Chinese_PRC_CI_AS NULL,
	[AllinaceUrl] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
 CONSTRAINT [PK_ZL_Promotion] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推广用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Promotion', @level2type=N'COLUMN',@level2name=N'userId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'原始地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Promotion', @level2type=N'COLUMN',@level2name=N'LinkUrl'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推广URl' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Promotion', @level2type=N'COLUMN',@level2name=N'PromoUrl'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'链接类型:1为链接注册推广,2为红包涵注册,3为商品,4为商城,5为活动' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Promotion', @level2type=N'COLUMN',@level2name=N'type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'联盟地址(实际链接地址)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Promotion', @level2type=N'COLUMN',@level2name=N'AllinaceUrl'
GO
--end
-- huzhengxiu 20100512
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Allianceinfo](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[alanceName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[uid] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[pass] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[wid] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'联盟名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Allianceinfo', @level2type=N'COLUMN',@level2name=N'alanceName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Allianceinfo', @level2type=N'COLUMN',@level2name=N'uid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'密码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Allianceinfo', @level2type=N'COLUMN',@level2name=N'pass'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'网站编号(该网站在联盟的id)' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Allianceinfo', @level2type=N'COLUMN',@level2name=N'wid'
GO
-- end
-- huzhengxiu 20100517
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_PromoCount](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PromotionUrl] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[sid] [int] NULL,
	[linkCount] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推广Url' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PromoCount', @level2type=N'COLUMN',@level2name=N'PromotionUrl'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商家id' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PromoCount', @level2type=N'COLUMN',@level2name=N'sid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点击链接次数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_PromoCount', @level2type=N'COLUMN',@level2name=N'linkCount'
GO
-- end
-- 20100518 huzhengxiu 
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_ShopsiteClass](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[cid] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商家分类' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ShopsiteClass', @level2type=N'COLUMN',@level2name=N'name'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'所属分类' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_ShopsiteClass', @level2type=N'COLUMN',@level2name=N'cid'
GO
-- end
-- huzhengxiu 20100519
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_OnlineCusServ](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[usersessionid] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[adminid] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[content] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[talkTime] [datetime] NULL,
	[type] [int] NULL,
	[SessionId] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[IP] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[isShow] [int] NULL,
	[userid] [int] NULL,
	[seatid] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户sessionid' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'usersessionid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'客服人员id' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'adminid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'talkTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'0为:用户内容 1:为客服回复内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'本次会话ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'SessionId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'ip地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'IP'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已显示:0为否,1为是' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'isShow'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户id:0为游客' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'userid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'席位id' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_OnlineCusServ', @level2type=N'COLUMN',@level2name=N'seatid'
GO 
-- end
-- huzhengxiu 20100608
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_SitePicAdv](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Url] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[AdvPic] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[PWidth] [float] NULL,
	[PHeight] [float] NULL,
	[picTitle] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[addTime] [datetime] NULL,
	[tikNum] [int] NULL,
	[ZoneName] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[ZoneJSName] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
	[ZoneIntro] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[ZoneType] [int] NULL CONSTRAINT [DF_ZL_SitePicAdv_ZoneType]  DEFAULT (0),
	[DefaultSetting] [bit] NULL CONSTRAINT [DF_ZL_SitePicAdv_DefaultSetting]  DEFAULT (1),
	[ZoneSetting] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[ZoneWidth] [int] NULL CONSTRAINT [DF_ZL_SitePicAdv_ZoneWidth]  DEFAULT (0),
	[ZoneHeight] [int] NULL CONSTRAINT [DF_ZL_SitePicAdv_ZoneHeight]  DEFAULT (0),
	[ShowType] [int] NULL CONSTRAINT [DF_ZL_SitePicAdv_ShowType]  DEFAULT (0),
	[advName] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[advType] [int] NULL CONSTRAINT [DF_ZL_SitePicAdv_advType]  DEFAULT (1),
	[LinkTarget] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'链接地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'Url'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'AdvPic'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片宽度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'PWidth'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'图片高度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'PHeight'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'链接标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'picTitle'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'addTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'点击数' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'tikNum'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'板块名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'JS文件名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneJSName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'版位介绍' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneIntro'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'版位类型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否默认设置' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'DefaultSetting'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'具体自定义设置信息' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneSetting'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'版位宽度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneWidth'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'版位高度' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ZoneHeight'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'显示方式' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'ShowType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'广告名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'advName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'广告类型' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'advType'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'打开形式:新窗口,原窗口' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SitePicAdv', @level2type=N'COLUMN',@level2name=N'LinkTarget'
GO
-- end
--huzhengxiu 20100609
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_SiteTextAdv](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Title] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[Url] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
	[Type] [int] NULL,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[Rebate] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
	[AddTime] [datetime] NULL ,
	[LinkTarget] [int] NULL,
	[ShopId] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'Title'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'链接地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'Url'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'类型:1为文字,2为博客' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'Type'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商家最高返利' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'Rebate'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'商家Id' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'ShopId'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'AddTime'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'内容' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'Content'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'打开目标:0为新窗口,1为原窗口' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_SiteTextAdv', @level2type=N'COLUMN',@level2name=N'LinkTarget'
GO
-- end
-- huzhengxiu 20100611
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_Regsterapi](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Userid] [int] NULL,
	[Url] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Pageid] [int] NULL
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Regsterapi', @level2type=N'COLUMN',@level2name=N'Userid'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'接口路径' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Regsterapi', @level2type=N'COLUMN',@level2name=N'Url'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'黄页ID' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_Regsterapi', @level2type=N'COLUMN',@level2name=N'Pageid'
GO
-- end


SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_3DMusic](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[MusicName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[MusicUrl] [nvarchar](1000) COLLATE Chinese_PRC_CI_AS NULL,
	[IsTrue] [int] NULL,
	[AddTime] [datetime] NULL CONSTRAINT [DF_ZL_AddTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DMusic', @level2type=N'COLUMN',@level2name=N'MusicName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐地址' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DMusic', @level2type=N'COLUMN',@level2name=N'MusicUrl'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DMusic', @level2type=N'COLUMN',@level2name=N'IsTrue'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DMusic', @level2type=N'COLUMN',@level2name=N'AddTime'
GO
SET IDENTITY_INSERT [ZL_ProjectWork] ON
INSERT [ZL_ProjectWork] ([WorkID],[WorkName],[WorkIntro],[ProjectID],[Approving],[Status],[EndDate]) VALUES ( 1 , '非正常中止' , '失败记录' , 0 , 0 , 1 ,getdate())
SET IDENTITY_INSERT [ZL_ProjectWork] OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ZL_3DPanoramic](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PanoramicName] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[Istrue] [int] NULL CONSTRAINT [DF_ZL_Panoramic_Istrue]  DEFAULT (1),
	[Callabel] [nvarchar](255) COLLATE Chinese_PRC_CI_AS NULL,
	[PanoramicViewList] [ntext] COLLATE Chinese_PRC_CI_AS NULL,
	[OrderBy] [int] NULL CONSTRAINT [DF_ZL_Panoramic_OrderBy]  DEFAULT (0),
	[Addtime] [datetime] NULL CONSTRAINT [DF_ZL_Panoramic_Addtime]  DEFAULT (getdate()),
 CONSTRAINT [PK_ZL_Panoramic] PRIMARY KEY CLUSTERED 
(
	[id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'全景名称' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DPanoramic', @level2type=N'COLUMN',@level2name=N'PanoramicName'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DPanoramic', @level2type=N'COLUMN',@level2name=N'Istrue'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'调用标签' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DPanoramic', @level2type=N'COLUMN',@level2name=N'Callabel'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'全景地图' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DPanoramic', @level2type=N'COLUMN',@level2name=N'PanoramicViewList'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DPanoramic', @level2type=N'COLUMN',@level2name=N'OrderBy'
GO
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZL_3DPanoramic', @level2type=N'COLUMN',@level2name=N'Addtime'
GO


--附加数据
CREATE TABLE [ZL_C_Announce] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [content] [ntext] NULL , [author] [nvarchar] (255) NULL , [sadfsad] [nvarchar] (255) NULL , [sdfsd] [nvarchar] (255) NULL , [ww] [datetime]  NULL , [Istrue] [ntext] NULL )
 ALTER TABLE [ZL_C_Announce] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_Announce_content] DEFAULT ('') FOR [content],CONSTRAINT [DF_ZL_C_Announce_author] DEFAULT ('') FOR [author],CONSTRAINT [DF_ZL_C_Announce_sadfsad] DEFAULT ('') FOR [sadfsad],CONSTRAINT [DF_ZL_C_Announce_sdfsd] DEFAULT ('') FOR [sdfsd],CONSTRAINT [DF_ZL_C_Announce_ww] DEFAULT (getdate()) FOR [ww],CONSTRAINT [DF_ZL_C_Announce_Istrue] DEFAULT ('') FOR [Istrue],CONSTRAINT [PK_ZL_C_Announce] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_C_Article] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [author] [nvarchar] (255) NULL , [source] [nvarchar] (255) NULL , [synopsis] [ntext] NULL , [content] [ntext] NULL , [Edit] [nvarchar] (255) NULL , [pic] [nvarchar] (255) NULL , [pages] [nvarchar] (255) NULL , [K_pages] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_C_Article] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_Article_author] DEFAULT ('') FOR [author],CONSTRAINT [DF_ZL_C_Article_source] DEFAULT ('') FOR [source],CONSTRAINT [DF_ZL_C_Article_synopsis] DEFAULT ('') FOR [synopsis],CONSTRAINT [DF_ZL_C_Article_content] DEFAULT ('') FOR [content],CONSTRAINT [DF_ZL_C_Article_Edit] DEFAULT ('') FOR [Edit],CONSTRAINT [DF_ZL_C_Article_pic] DEFAULT ('') FOR [pic],CONSTRAINT [DF_ZL_C_Article_pages] DEFAULT ('') FOR [pages],CONSTRAINT [DF_ZL_C_Article_K_pages] DEFAULT ('') FOR [K_pages],CONSTRAINT [PK_ZL_C_Article] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_C_FriendSite] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [url] [nvarchar] (255) NULL , [logo] [nvarchar] (255) NULL , [leis] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_C_FriendSite] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_FriendSite_url] DEFAULT ('') FOR [url],CONSTRAINT [DF_ZL_C_FriendSite_logo] DEFAULT ('') FOR [logo],CONSTRAINT [DF_ZL_C_FriendSite_leis] DEFAULT ('') FOR [leis],CONSTRAINT [PK_ZL_C_FriendSite] PRIMARY KEY  NONCLUSTERED ( [ID] )


 CREATE TABLE [ZL_C_Photo] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [source] [nvarchar] (255) NULL , [synopsis] [ntext] NULL , [PhotoUrlThum] [nvarchar] (255) NULL , [PhotoUrl] [ntext] NULL )
 ALTER TABLE [ZL_C_Photo] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_Photo_source] DEFAULT ('') FOR [source],CONSTRAINT [DF_ZL_C_Photo_synopsis] DEFAULT ('') FOR [synopsis],CONSTRAINT [DF_ZL_C_Photo_PhotoUrlThum] DEFAULT ('') FOR [PhotoUrlThum],CONSTRAINT [DF_ZL_C_Photo_PhotoUrl] DEFAULT ('') FOR [PhotoUrl],CONSTRAINT [PK_ZL_C_Photo] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_C_RedirectLink] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [RedirectLink] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_C_RedirectLink] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_RedirectLink_RedirectLink] DEFAULT ('') FOR [RedirectLink],CONSTRAINT [PK_ZL_C_RedirectLink] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_C_soft] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [source] [nvarchar] (255) NULL , [explain] [ntext] NULL , [content] [ntext] NULL , [Edit] [nvarchar] (255) NULL , [Soft_pic] [nvarchar] (255) NULL , [DownUrlthum] [nvarchar] (255) NULL , [DownUrl] [ntext] NULL , [ww] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_C_soft] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_soft_source] DEFAULT ('') FOR [source],CONSTRAINT [DF_ZL_C_soft_explain] DEFAULT ('') FOR [explain],CONSTRAINT [DF_ZL_C_soft_content] DEFAULT ('') FOR [content],CONSTRAINT [DF_ZL_C_soft_Edit] DEFAULT ('') FOR [Edit],CONSTRAINT [DF_ZL_C_soft_Soft_pic] DEFAULT ('') FOR [Soft_pic],CONSTRAINT [DF_ZL_C_soft_DownUrlthum] DEFAULT ('') FOR [DownUrlthum],CONSTRAINT [DF_ZL_C_soft_DownUrl] DEFAULT ('') FOR [DownUrl],CONSTRAINT [DF_ZL_C_soft_ww] DEFAULT ('') FOR [ww],CONSTRAINT [PK_ZL_C_soft] PRIMARY KEY  NONCLUSTERED ( [ID] )


 CREATE TABLE [ZL_C_video] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [author] [nvarchar] (255) NULL , [source] [nvarchar] (255) NULL , [synopsis] [ntext] NULL , [content] [ntext] NULL , [url] [nvarchar] (255) NULL , [pic] [nvarchar] (255) NULL , [Edit] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_C_video] WITH NOCHECK ADD CONSTRAINT [DF_ZL_C_video_author] DEFAULT ('') FOR [author],CONSTRAINT [DF_ZL_C_video_source] DEFAULT ('') FOR [source],CONSTRAINT [DF_ZL_C_video_synopsis] DEFAULT ('') FOR [synopsis],CONSTRAINT [DF_ZL_C_video_content] DEFAULT ('') FOR [content],CONSTRAINT [DF_ZL_C_video_url] DEFAULT ('') FOR [url],CONSTRAINT [DF_ZL_C_video_pic] DEFAULT ('') FOR [pic],CONSTRAINT [DF_ZL_C_video_Edit] DEFAULT ('') FOR [Edit],CONSTRAINT [PK_ZL_C_video] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_Page_Content] (  [ID] [int] IDENTITY (1, 1) NOT NULL , [Content] [ntext] NULL )
 ALTER TABLE [ZL_Page_Content] WITH NOCHECK ADD CONSTRAINT [DF_ZL_Page_Content_Content] DEFAULT ('') FOR [Content],CONSTRAINT [PK_ZL_Page_Content] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_Reg_Page] (  [ID] [int] IDENTITY (1, 1) NOT NULL ,  [UserID] [int] NOT NULL , [UserName] [nvarchar] (255) NULL ,  [Styleid] [int] NULL , [fi] [nvarchar] (255) NULL , [logo] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_Reg_Page] WITH NOCHECK ADD CONSTRAINT [DF_ZL_Reg_Page_Styleid] DEFAULT (0) FOR [Styleid],CONSTRAINT [DF_ZL_Reg_Page_fi] DEFAULT ('') FOR [fi],CONSTRAINT [DF_ZL_Reg_Page_logo] DEFAULT ('') FOR [logo],CONSTRAINT [PK_ZL_Reg_Page] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_U_comp] (  [ID] [int] IDENTITY (1, 1) NOT NULL ,  [UserID] [int] NOT NULL , [UserName] [varchar] (255) NULL ,  [Styleid] [int] NULL , [Recycler] [bit] NULL , [IsCreate] [bit] NULL , [NewTime] [datetime]  NULL , [name] [nvarchar] (255) NULL , [time] [nvarchar] (255) NULL , [info] [ntext] NULL , [jobs] [nvarchar] (255) NULL , [fad] [real] NULL )
 ALTER TABLE [ZL_U_comp] WITH NOCHECK ADD CONSTRAINT [DF_ZL_U_comp_UserID] DEFAULT (null) FOR [UserID],CONSTRAINT [DF_ZL_U_comp_Styleid] DEFAULT (0) FOR [Styleid],CONSTRAINT [DF_ZL_U_comp_Recycler] DEFAULT (0) FOR [Recycler],CONSTRAINT [DF_ZL_U_comp_IsCreate] DEFAULT (0) FOR [IsCreate],CONSTRAINT [DF_ZL_U_comp_name] DEFAULT ('') FOR [name],CONSTRAINT [DF_ZL_U_comp_time] DEFAULT ('') FOR [time],CONSTRAINT [DF_ZL_U_comp_info] DEFAULT ('') FOR [info],CONSTRAINT [DF_ZL_U_comp_jobs] DEFAULT ('是') FOR [jobs],CONSTRAINT [PK_ZL_U_comp] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_U_jl] (  [ID] [int] IDENTITY (1, 1) NOT NULL ,  [UserID] [int] NOT NULL , [UserName] [varchar] (255) NULL ,  [Styleid] [int] NULL , [Recycler] [bit] NULL , [IsCreate] [bit] NULL , [NewTime] [datetime]  NULL , [jiguan] [nvarchar] (255) NULL , [hukou] [nvarchar] (255) NULL , [zhuanye] [nvarchar] (255) NULL , [zhiwei] [nvarchar] (255) NULL , [name] [nvarchar] (255) NULL , [sex] [nvarchar] (255) NULL )
 ALTER TABLE [ZL_U_jl] WITH NOCHECK ADD CONSTRAINT [DF_ZL_U_jl_UserID] DEFAULT (null) FOR [UserID],CONSTRAINT [DF_ZL_U_jl_Styleid] DEFAULT (0) FOR [Styleid],CONSTRAINT [DF_ZL_U_jl_Recycler] DEFAULT (0) FOR [Recycler],CONSTRAINT [DF_ZL_U_jl_IsCreate] DEFAULT (0) FOR [IsCreate],CONSTRAINT [DF_ZL_U_jl_jiguan] DEFAULT ('') FOR [jiguan],CONSTRAINT [DF_ZL_U_jl_hukou] DEFAULT ('') FOR [hukou],CONSTRAINT [DF_ZL_U_jl_zhuanye] DEFAULT ('') FOR [zhuanye],CONSTRAINT [DF_ZL_U_jl_zhiwei] DEFAULT ('') FOR [zhiwei],CONSTRAINT [DF_ZL_U_jl_name] DEFAULT ('') FOR [name],CONSTRAINT [DF_ZL_U_jl_sex] DEFAULT ('') FOR [sex],CONSTRAINT [PK_ZL_U_jl] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_U_zp] (  [ID] [int] IDENTITY (1, 1) NOT NULL ,  [UserID] [int] NOT NULL , [UserName] [varchar] (255) NULL ,  [Styleid] [int] NULL , [Recycler] [bit] NULL , [IsCreate] [bit] NULL , [NewTime] [datetime]  NULL , [name] [varchar] (255) NULL , [edu] [varchar] (255) NULL , [shi] [varchar] (255) NULL , [menoy] [nvarchar] (255) NULL , [aaa] [ntext] NULL )
 ALTER TABLE [ZL_U_zp] WITH NOCHECK ADD CONSTRAINT [DF_ZL_U_zp_UserID] DEFAULT (null) FOR [UserID],CONSTRAINT [DF_ZL_U_zp_Styleid] DEFAULT (0) FOR [Styleid],CONSTRAINT [DF_ZL_U_zp_Recycler] DEFAULT (0) FOR [Recycler],CONSTRAINT [DF_ZL_U_zp_IsCreate] DEFAULT (0) FOR [IsCreate],CONSTRAINT [DF_ZL_U_zp_menoy] DEFAULT ('') FOR [menoy],CONSTRAINT [DF_ZL_U_zp_aaa] DEFAULT ('') FOR [aaa],CONSTRAINT [PK_ZL_U_zp] PRIMARY KEY  NONCLUSTERED ( [ID] )

 CREATE TABLE [ZL_Pub_SYHD] (  [ID] [int] IDENTITY (1, 1) NOT NULL ,  [Pubupid] [int] NULL , [PubUserName] [nvarchar] (255) NULL ,  [PubUserID] [int] NULL ,  [PubContentid] [int] NULL ,  [Parentid] [int] NULL , [PubIP] [nvarchar] (255) NULL ,  [Pubnum] [int] NULL ,  [Pubstart] [int] NULL , [PubTitle] [nvarchar] (255) NULL , [PubContent] [ntext] NULL , [PubAddTime] [datetime]  NULL ,  [Optimal] [int] NULL )
 ALTER TABLE [ZL_Pub_SYHD] WITH NOCHECK ADD CONSTRAINT [DF_ZL_Pub_SYHD_Parentid] DEFAULT (0) FOR [Parentid],CONSTRAINT [DF_ZL_Pub_SYHD_Pubnum] DEFAULT (0) FOR [Pubnum],CONSTRAINT [DF_ZL_Pub_SYHD_Pubstart] DEFAULT (0) FOR [Pubstart],CONSTRAINT [DF_ZL_Pub_SYHD_PubAddTime] DEFAULT (getdate()) FOR [PubAddTime],CONSTRAINT [DF_ZL_Pub_SYHD_Optimal] DEFAULT (0) FOR [Optimal],CONSTRAINT [PK_ZL_Pub_SYHD] PRIMARY KEY  NONCLUSTERED ( [ID] )

 
 
 SET IDENTITY_INSERT [ZL_3DMusic] ON

 INSERT [ZL_3DMusic] ( [id] , [MusicName] , [MusicUrl] , [IsTrue] , [AddTime] ) VALUES ( 1 , '梦中的婚礼' , 'http://www.czsan.com/hl.mp3' , 1 , '2010-06-19 11:12:05.000' )
 INSERT [ZL_3DMusic] ( [id] , [MusicName] , [MusicUrl] , [IsTrue] , [AddTime] ) VALUES ( 2 , '卡农' , 'http://yt-jy.cn/newEbiz1/535yt-jyres/images/images/11.mp3' , 1 , '2010-06-19 11:12:19.750' )
 INSERT [ZL_3DMusic] ( [id] , [MusicName] , [MusicUrl] , [IsTrue] , [AddTime] ) VALUES ( 3 , '献给爱丽丝' , 'http://www.ehuayu.com/uploadfile/audio/171.mp3' , 1 , '2010-06-19 11:12:40.970' )
 INSERT [ZL_3DMusic] ( [id] , [MusicName] , [MusicUrl] , [IsTrue] , [AddTime] ) VALUES ( 4 , '罗密欧与朱丽叶' , 'http://mp3.ysmp.net.cn/beijingyinyue/10000hb/罗密欧与朱丽叶.mp3' , 1 , '2010-06-19 11:12:58.923' )
 INSERT [ZL_3DMusic] ( [id] , [MusicName] , [MusicUrl] , [IsTrue] , [AddTime] ) VALUES ( 5 , '蓝色的爱' , 'http://www.fzjsjx.com/upload/zydir/39/z20081028_5876_4027.mp3' , 1 , '2010-06-19 11:13:30.297' )

 SET IDENTITY_INSERT [ZL_3DMusic] OFF


 SET IDENTITY_INSERT [ZL_3DPanoramic] ON

 INSERT [ZL_3DPanoramic] ( [id] , [PanoramicName] , [Istrue] , [Callabel] , [PanoramicViewList] , [OrderBy] , [Addtime] ) VALUES ( 1 , '全景范例：夏日农庄' , 1 , '' , '<musiclist>
<music_url name="梦中的婚礼">http://www.czsan.com/hl.mp3</music_url>
<music_url name="卡农">http://yt-jy.cn/newEbiz1/535yt-jyres/images/images/11.mp3</music_url>
<music_url name="献给爱丽丝">http://www.ehuayu.com/uploadfile/audio/171.mp3</music_url>
<music_url name="罗密欧与朱丽叶">http://mp3.ysmp.net.cn/beijingyinyue/10000hb/罗密欧与朱丽叶.mp3</music_url>
<music_url name="蓝色的爱">http://www.fzjsjx.com/upload/zydir/39/z20081028_5876_4027.mp3</music_url>
</musiclist>
<Panoramic>
<Panoramic_name>场景1</Panoramic_name>
<Panoramic_option><ScanName>场景1</ScanName>
<ScanPic>UploadFiles/2010-6-19/20106191124478908535.jpg</ScanPic>
<MapPic>UploadFiles/2010-6-19/20106191125288599326.jpg</MapPic>
<TopLogo>/Panoramic3D/assets/opt/logo.png</TopLogo>
<defaultTopLogo></defaultTopLogo>
<LoGoLink>http://www.zoomla.cn/</LoGoLink>
<defaultlink></defaultlink>
<BottomLogo>/Panoramic3D/assets/opt/Bottonlogo.png</BottomLogo>
<DefaultBottomLogo></DefaultBottomLogo>
<BottomLogoLink>http://www.zoomla.cn/</BottomLogoLink>
<DefaultBottomLogoLink></DefaultBottomLogoLink>
<InputButtonPic>/Panoramic3D/assets/opt/goto.png</InputButtonPic>
<ReturnButtonPic>/Panoramic3D/assets/opt/goreturn.png</ReturnButtonPic>
<OtherButtonPic>/Panoramic3D/assets/opt/gourl.png</OtherButtonPic>
<AutoMarquee>on</AutoMarquee>
<ShowMap>on</ShowMap>
<camz>-595</camz><campanangle>221</campanangle><camtiltangle>-1</camtiltangle><camtargetpanangle>221</camtargetpanangle><camtargettiltangle>-1</camtargettiltangle><putintxt><btn>Putin0: x:0 y:0 z:-1150 rotationX:90 rotationY:-180</btn></putintxt><returnbuttontxt><btn>returnbutton0: x:-1013 y:18 z:543 rotationX:90 rotationY:-61</btn></returnbuttontxt><OtherButtontxt><btn>OtherButton0: x:574 y:48 z:995 rotationX:90 rotationY:29.000000000000004</btn></OtherButtontxt><OtherButton0><url>http://wwww.zoomla.cn</url><opentype>新窗口弹出</opentype></OtherButton0></Panoramic_option>
</Panoramic>

<Panoramic>
<Panoramic_name>场景2</Panoramic_name>
<Panoramic_option><ScanName>场景2</ScanName>
<ScanPic>UploadFiles/2010-6-19/20106191126489218705.jpg</ScanPic>
<MapPic>UploadFiles/2010-6-19/20106191127225464218.jpg</MapPic>
<TopLogo>/Panoramic3D/assets/opt/logo.png</TopLogo>
<defaultTopLogo></defaultTopLogo>
<LoGoLink>http://www.zoomla.cn</LoGoLink>
<defaultlink></defaultlink>
<BottomLogo>/Panoramic3D/assets/opt/Bottonlogo.png</BottomLogo>
<DefaultBottomLogo></DefaultBottomLogo>
<BottomLogoLink>http://www.zoomla.cn</BottomLogoLink>
<DefaultBottomLogoLink></DefaultBottomLogoLink>
<InputButtonPic>/Panoramic3D/assets/opt/goto.png</InputButtonPic>
<ReturnButtonPic>/Panoramic3D/assets/opt/goreturn.png</ReturnButtonPic>
<OtherButtonPic>/Panoramic3D/assets/opt/gourl.png</OtherButtonPic>
<AutoMarquee>on</AutoMarquee>
<ShowMap>on</ShowMap>
<camz>-612</camz><campanangle>219</campanangle><camtiltangle>3</camtiltangle><camtargetpanangle>219</camtargetpanangle><camtargettiltangle>3</camtargettiltangle><putintxt><btn>Putin0: x:0 y:0 z:-1150 rotationX:90 rotationY:-180</btn></putintxt><returnbuttontxt><btn>returnbutton0: x:-1129 y:-6 z:-215 rotationX:90 rotationY:-100</btn></returnbuttontxt><OtherButtontxt><btn>OtherButton0: x:395 y:54 z:1079 rotationX:90 rotationY:20</btn></OtherButtontxt><OtherButton0><url>http://www.hx008.cn</url><opentype>本窗口弹出</opentype></OtherButton0></Panoramic_option>
</Panoramic>

<Panoramic>
<Panoramic_name>场景3</Panoramic_name>
<Panoramic_option><ScanName>场景3</ScanName>
<ScanPic>UploadFiles/2010-6-19/20106191129378751947.jpg</ScanPic>
<MapPic>UploadFiles/2010-6-19/2010619113034215942.jpg</MapPic>
<TopLogo>/Panoramic3D/assets/opt/logo.png</TopLogo>
<defaultTopLogo></defaultTopLogo>
<LoGoLink>http://www.zoomla.cn</LoGoLink>
<defaultlink></defaultlink>
<BottomLogo>/Panoramic3D/assets/opt/Bottonlogo.png</BottomLogo>
<DefaultBottomLogo></DefaultBottomLogo>
<BottomLogoLink>http://www.zoomla.cn</BottomLogoLink>
<DefaultBottomLogoLink></DefaultBottomLogoLink>
<InputButtonPic>/Panoramic3D/assets/opt/goto.png</InputButtonPic>
<ReturnButtonPic>/Panoramic3D/assets/opt/goreturn.png</ReturnButtonPic>
<OtherButtonPic>/Panoramic3D/assets/opt/gourl.png</OtherButtonPic>
<AutoMarquee>on</AutoMarquee>
<ShowMap>on</ShowMap>
<camz>70</camz><campanangle>275</campanangle><camtiltangle>6</camtiltangle><camtargetpanangle>275</camtargetpanangle><camtargettiltangle>6</camtargettiltangle><putintxt><btn>Putin0: x:0 y:0 z:-1150 rotationX:90 rotationY:-180</btn></putintxt><returnbuttontxt><btn>returnbutton0: x:-554 y:-138 z:1007 rotationX:90 rotationY:-28</btn></returnbuttontxt><OtherButtontxt><btn>OtherButton0: x:1145 y:-126 z:-102 rotationX:90 rotationY:95</btn></OtherButtontxt><OtherButton0><url>http://bbs.zoomal.cn</url><opentype>本窗口弹出</opentype></OtherButton0></Panoramic_option>
</Panoramic>

<autoplay>1</autoplay>
' , 0 , '2010-06-19 13:04:52.390' )

 SET IDENTITY_INSERT [ZL_3DPanoramic] OFF

 SET IDENTITY_INSERT [ZL_Model] ON

 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 1 , '公告' , '发布简明信息' , 'ZL_C_Announce' , '公告' , '条' , 'Announce.gif' , '/内容页/默认公告内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 2 , '文章模型' , '用于装载常见的文章信息，如文章、新闻、资讯等。' , 'ZL_C_Article' , '文章' , '篇' , 'Article.gif' , '/内容页/两列式标准内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 1 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 3 , '图库模型' , '可发布图文并茂的信息，并通过丰富的图片展示分享网络的乐趣。' , 'ZL_C_Photo' , '图片' , '张' , 'Photo.gif' , '/内容页/默认图库模型内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 4 , '下载模型' , '基于文件发布与资源共享的功能，并可进行下载收费等二次开发。' , 'ZL_C_soft' , '软件' , '个' , 'Soft.gif' , '/内容页/默认下载模型内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 5 , '转向链接模型' , '访客点击此模型下信息，则跳入指定第三方链接，便于流量管理。' , 'ZL_C_RedirectLink' , '跳转' , '个' , 'RedirectLink.gif' , '/内容页/默认转向链接模型内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 6 , '商品模型' , '建立起商品模型用于销售，开展网上电子业务。' , 'ZL_P_Shop' , '商品' , '件' , 'Product.gif' , '/内容页/默认商品模型内容页.html' , 2 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 7 , '视频模型' , '基于FLV等类型的视频发布系统，高速视频抢占信息时代之商机。' , 'ZL_C_video' , '视频' , '个' , 'video.gif' , '/内容页/默认视频模型内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 8 , '友情链接' , '通过与网民交换友情链接，提升网站PR值和友好的互访机制。' , 'ZL_C_FriendSite' , '网站' , '个' , 'FriendSite.gif' , '/内容页/默认友情链接内容页.html' , 1 , 1 , 0 , 1 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 11 , '默认申请样式' , '默认申请样式' , 'ZL_Reg_Page' , '' , '' , '' , '' , 3 , 0 , 0 , 0 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 12 , '企业信息' , '' , 'ZL_Page_Content' , '信息' , '条' , 'Article.gif' , '' , 4 , 0 , 0 , 0 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 14 , '招聘信息' , '提供给企业用户发布招聘信息' , 'ZL_U_ZP' , '信息' , '' , '' , '' , 3 , 1 , 0 , 0 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 15 , '个人简历' , '提供给个人用户录入' , 'ZL_U_jl' , '信息' , '' , '' , '' , 3 , 0 , 0 , 0 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Thumbnail] , [Islotsize] ) VALUES ( 16 , '企业信息' , '仅提供企业发布自我介绍等信息' , 'ZL_U_comp' , '信息' , '' , '' , '' , 3 , 0 , 0 , 0 , 0 , '' , 0 )
 INSERT [ZL_Model] ( [ModelID] , [ModelName] , [Description] , [TableName] , [ItemName] , [ItemUnit] , [ItemIcon] , [ContentTemplate] , [ModelType] , [MultiFlag] , [NodeID] , [SysModel] , [FromModel] , [Islotsize] ) VALUES ( 23 , '评论首页互动的模型' , '' , 'ZL_Pub_SYHD' , '评论' , '条' , 'GuestBook.gif' , '/互动模板/默认评论首页互动模板.html' , 7 , 0 , 0 , 2 , 0 , 0 )

 SET IDENTITY_INSERT [ZL_Model] OFF


 SET IDENTITY_INSERT [ZL_ModelField] ON

 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 1 , 0 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 2 , 0 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 3 , 0 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 4 , 0 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 5 , 0 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 6 , 0 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 7 , 0 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 8 , 0 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 9 , 0 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 10 , 0 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 12 , 0 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 13 , 0 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 14 , 0 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 15 , 0 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 16 , 0 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 17 , 0 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 18 , 0 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 19 , 0 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 20 , 0 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 21 , 0 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 22 , 0 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 23 , 0 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 24 , 0 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 25 , 0 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 26 , 1 , 'Title' , '公告标题' , '' , '' , 1 , 0 , 'TextType' , 'TitleSize=30,IsPassword=text,DefaultValue=' , 0 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 27 , 1 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 28 , 1 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 29 , 1 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 30 , 1 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 31 , 1 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 32 , 1 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 33 , 1 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 34 , 1 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 35 , 1 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 36 , 1 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 37 , 1 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 38 , 1 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 39 , 1 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 40 , 1 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 41 , 1 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 42 , 1 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 43 , 1 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 44 , 1 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 45 , 1 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 46 , 1 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 47 , 1 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 48 , 1 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 49 , 1 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 50 , 1 , 'content' , '公告内容' , '' , '' , 0 , 0 , 'MultipleHtmlType' , 'Width=715,Height=400,IsEditor=3' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 51 , 1 , 'author' , '发布者' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue={nowuser}' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 52 , 2 , 'Title' , '内容标题' , '' , '' , 1 , 0 , 'TextType' , 'TitleSize=30,IsPassword=text,DefaultValue=' , 0 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 1 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 53 , 2 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 54 , 2 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 55 , 2 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 56 , 2 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 57 , 2 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 58 , 2 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 59 , 2 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 60 , 2 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 61 , 2 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 62 , 2 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 63 , 2 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 64 , 2 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 65 , 2 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 66 , 2 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 67 , 2 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 68 , 2 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 69 , 2 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 70 , 2 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 71 , 2 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 72 , 2 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 73 , 2 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 74 , 2 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 75 , 2 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 76 , 2 , 'author' , '作者' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue={nowuser}' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 77 , 2 , 'source' , '来源' , '' , '' , 1 , 0 , 'OptionType' , '1=本站原创|本站原创$0||网络摘抄|网络摘抄$0||网友投稿|网友投稿$0,Property=True,Default=' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 78 , 2 , 'synopsis' , '简介' , '' , '' , 0 , 0 , 'MultipleTextType' , 'Width=715,Height=80' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 79 , 2 , 'content' , '内容' , '' , '' , 1 , 0 , 'MultipleHtmlType' , 'Width=715,Height=400,IsEditor=3' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 80 , 2 , 'Edit' , '责任编辑' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=本站编辑' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 81 , 2 , 'pic' , '附属图片' , '' , '' , 0 , 0 , 'PicType' , 'Warter=0,MaxPicSize=102400,PicFileExt=jpg|gif|bmp|jpeg|png' , 25 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 82 , 2 , 'pages' , '分页字符数' , '' , '请输入分页字符数,为空则不分页。' , 0 , 0 , 'TextType' , 'TitleSize=8,IsPassword=text,DefaultValue=' , 26 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 83 , 2 , 'K_pages' , '分页形式' , '' , '如选择手动分页,则请将[PageCode/]手动分页符放到想要分页的位置即可。' , 0 , 0 , 'OptionType' , '1=不分页|0$0||自动分页|1$0||手动分页|2$0,Property=True,Default=' , 27 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 84 , 3 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 85 , 3 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 86 , 3 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 87 , 3 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 88 , 3 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 89 , 3 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 90 , 3 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 91 , 3 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 92 , 3 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 93 , 3 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 94 , 3 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 95 , 3 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 96 , 3 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 97 , 3 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 98 , 3 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 99 , 3 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 100 , 3 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 101 , 3 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 102 , 3 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 103 , 3 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 104 , 3 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 105 , 3 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 106 , 3 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 107 , 3 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 108 , 3 , 'source' , '来源' , '' , '' , 1 , 0 , 'OptionType' , '1=本站原创|本站原创$0||佚名|佚名$0||无名氏|无名氏$0||网友投稿|网友投稿$0,Property=True,Default=' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 109 , 3 , 'synopsis' , '简介' , '' , '' , 0 , 0 , 'MultipleTextType' , 'Width=500,Height=200' , 25 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 110 , 3 , 'PhotoUrl' , '图片地址' , '' , '' , 0 , 0 , 'MultiPicType' , 'ChkThumb=1,ThumbField=PhotoUrlThum,Warter=0,MaxPicSize=1024,PicFileExt=jpg|gif|bmp|jpeg|png' , 26 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 111 , 4 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 112 , 4 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 113 , 4 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 114 , 4 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 115 , 4 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 116 , 4 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 117 , 4 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 118 , 4 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 119 , 4 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 120 , 4 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 121 , 4 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 122 , 4 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 123 , 4 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 124 , 4 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 125 , 4 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 126 , 4 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 127 , 4 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 128 , 4 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 129 , 4 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 130 , 4 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 131 , 4 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 132 , 4 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 133 , 4 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 134 , 4 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 135 , 4 , 'source' , '来源' , '' , '' , 1 , 0 , 'OptionType' , '1=本站原创|本站原创$0||佚名|佚名$0||无名氏|无名氏$0||网友投稿|网友投稿$0,Property=True,Default=' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 136 , 4 , 'explain' , '简介' , '' , '' , 0 , 0 , 'MultipleTextType' , 'Width=500,Height=200' , 25 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 137 , 4 , 'content' , '下载说明' , '' , '' , 1 , 0 , 'MultipleHtmlType' , 'Width=715,Height=400,IsEditor=3' , 26 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 138 , 4 , 'Edit' , '责任编辑' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=本站编辑' , 27 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 139 , 4 , 'Soft_pic' , '软件缩略图' , '' , '' , 0 , 0 , 'PicType' , 'Warter=0,MaxPicSize=102400,PicFileExt=jpg|jpeg|bmp|gif|png' , 28 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 140 , 5 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 141 , 5 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 142 , 5 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 143 , 5 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 144 , 5 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 145 , 5 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 146 , 5 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 147 , 5 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 148 , 5 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 149 , 5 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 150 , 5 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 151 , 5 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 152 , 5 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 153 , 5 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 154 , 5 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 155 , 5 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 156 , 5 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 157 , 5 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 158 , 5 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 159 , 5 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 160 , 5 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 161 , 5 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 162 , 5 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 163 , 5 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 164 , 5 , 'RedirectLink' , '跳转网址' , '' , '' , 1 , 0 , 'SuperLinkType' , 'TitleSize=50,DefaultValue=http://' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 165 , 6 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 166 , 6 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 167 , 6 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 168 , 6 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 169 , 6 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 170 , 6 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 171 , 6 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 172 , 6 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 173 , 6 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 174 , 6 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 175 , 6 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 176 , 6 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 177 , 6 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 178 , 6 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 179 , 6 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 180 , 6 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 181 , 6 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 182 , 6 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 183 , 6 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 184 , 6 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 185 , 6 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 186 , 6 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 187 , 6 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 188 , 6 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 189 , 6 , 'is_chu' , '是否促销' , '' , '' , 0 , 0 , 'OptionType' , '2=是||否,Property=True,Default=' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 190 , 7 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 191 , 7 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 192 , 7 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 193 , 7 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 194 , 7 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 195 , 7 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 196 , 7 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 197 , 7 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 198 , 7 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 199 , 7 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 200 , 7 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 201 , 7 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 202 , 7 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 203 , 7 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 204 , 7 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 205 , 7 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 206 , 7 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 207 , 7 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 208 , 7 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 209 , 7 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 210 , 7 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 211 , 7 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 212 , 7 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 213 , 7 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 214 , 7 , 'author' , '作者' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue={nowuser}' , 24 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 215 , 7 , 'source' , '来源' , '' , '' , 1 , 0 , 'OptionType' , '1=本站原创|本站原创$0||网络摘抄|网络摘抄$0||网友投稿|网友投稿$0,Property=True,Default=' , 25 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 216 , 7 , 'synopsis' , '简介' , '' , '' , 0 , 0 , 'MultipleTextType' , 'Width=500,Height=200' , 26 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 217 , 7 , 'content' , '视频说明' , '' , '' , 0 , 0 , 'MultipleHtmlType' , 'Width=715,Height=400,IsEditor=2' , 27 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 218 , 7 , 'url' , '视频地址' , '' , '请输入视频网址，如http://www.zoomla.cn/video.flv' , 1 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=http://' , 28 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 219 , 8 , 'Title' , '网站名称' , '' , '' , 1 , 0 , 'TextType' , 'TitleSize=30,IsPassword=text,DefaultValue=' , 0 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 220 , 8 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 221 , 8 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 222 , 8 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 223 , 8 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 224 , 8 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 225 , 8 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 226 , 8 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 227 , 8 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 228 , 8 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 229 , 8 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 230 , 8 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 231 , 8 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 232 , 8 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 233 , 8 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 234 , 8 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 235 , 8 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 236 , 8 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 237 , 8 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 238 , 8 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 239 , 8 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 240 , 8 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 241 , 8 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 242 , 8 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 243 , 8 , 'url' , '网址' , '' , '' , 1 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=http://' , 21 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 244 , 8 , 'logo' , '网站LOGO' , '' , '输入网站LOGO地址' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 22 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 245 , 8 , 'leis' , '链接类型' , '' , '' , 0 , 0 , 'OptionType' , '1=合作网站||媒体推介||财经分享||学术研究,Property=True,Default=' , 20 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 250 , 12 , 'Content' , '详细信息' , '' , '' , 0 , 0 , 'MultipleHtmlType' , 'Width=715,Height=400,IsEditor=3' , 0 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 251 , 7 , 'pic' , '缩略图' , '' , '用于显示视频播放效果的缩图略，推荐为JPG格式。' , 0 , 0 , 'PicType' , 'Warter=0,MaxPicSize=102400,PicFileExt=jpg|jpeg|bmp|gif|png' , 25 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 252 , 7 , 'Edit' , '责任编辑' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=本站编辑' , 26 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 253 , 4 , 'DownUrl' , '下载地址' , '' , '' , 0 , 0 , 'FileType' , 'ChkFileSize=1,FileSizeField=DownUrlthum,MaxFileSize=1024000,UploadFileExt=rar|zip|doc|docx|xls|ppt|pptx|pps' , 27 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 254 , 16 , 'name' , '企业名称' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 0 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 255 , 14 , 'name' , '职位名称' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 0 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 256 , 14 , 'menoy' , '薪资待遇' , '' , '' , 0 , 0 , 'OptionType' , '1=1500以下|1500以下||1500-2000|1500-2000||2000-3000|2000-3000||3000-4000|3000-4000||4000-5000|4000-5000||5000以上|5000以上||面议|面议,Property=True,Default=' , 1 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 257 , 14 , 'edu' , '学历要求' , '' , '' , 0 , 0 , 'OptionType' , '1=不限学历|不限学历||高中以上|高中以上||中专以上|中专以上||大学以上|大学以上||更高学历|更高学历,Property=True,Default=' , 2 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 258 , 14 , 'shi' , '就职形式' , '' , '' , 0 , 0 , 'OptionType' , '1=全职|全职||兼职|兼职||家政|家政||临时工|临时工,Property=True,Default=' , 3 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 259 , 16 , 'time' , '成立时间' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 1 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 260 , 16 , 'info' , '公司简介' , '' , '' , 0 , 0 , 'MultipleTextType' , 'Width=500,Height=200' , 2 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 261 , 16 , 'jobs' , '求职职位' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 3 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 262 , 15 , 'jiguan' , '籍贯' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 2 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 263 , 15 , 'hukou' , '户口' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 3 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 264 , 15 , 'zhuanye' , '专业' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 4 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 265 , 15 , 'zhiwei' , '求职职位' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 5 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 266 , 15 , 'name' , '个人姓名' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 0 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 267 , 15 , 'sex' , '性别' , '' , '' , 0 , 0 , 'OptionType' , '2=男||女,Property=True,Default=' , 1 , 0 , 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 271 , 11 , 'logo' , 'logo' , 'logo' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [FieldTips] , [Description] , [IsNotNull] , [IsSearchForm] , [FieldType] , [Content] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 274 , 28 , 'cet' , '测试' , '' , '' , 0 , 0 , 'TextType' , 'TitleSize=35,IsPassword=text,DefaultValue=' , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 275 , 29 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 276 , 29 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 277 , 29 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 278 , 29 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 279 , 29 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 280 , 29 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 281 , 29 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 282 , 29 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 283 , 29 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 284 , 29 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 285 , 29 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 286 , 29 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 287 , 29 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 288 , 29 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 289 , 29 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 290 , 29 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 291 , 29 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 292 , 29 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 293 , 29 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 294 , 29 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 295 , 29 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 296 , 29 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 297 , 29 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 298 , 29 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 300 , 30 , 'Title' , '内容标题' , 1 , 0 , 'TextType' , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 301 , 30 , 'NodeID' , '所属节点' , 1 , 0 , 'TextType' , 1 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 302 , 30 , 'SpecialID' , '所属专题' , 0 , 0 , 'TextType' , 2 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 303 , 30 , 'InfoID' , '其他节点' , 0 , 0 , 'TextType' , 3 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 304 , 30 , 'Titlecolor' , '标题颜色' , 0 , 0 , 'TextType' , 4 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 305 , 30 , 'Hits' , '点击数' , 0 , 0 , 'NumType' , 5 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 306 , 30 , 'GeneralID' , '内容ID' , 0 , 0 , 'TextType' , 6 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 307 , 30 , 'Tagkey' , '关键字' , 0 , 0 , 'TextType' , 7 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 308 , 30 , 'EliteLevel' , '推荐级别' , 0 , 0 , 'NumType' , 8 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 309 , 30 , 'HtmlLink' , '静态页面地址' , 0 , 0 , 'TextType' , 9 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 310 , 30 , 'IsCreate' , '是否已生成' , 0 , 0 , 'NumType' , 10 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 311 , 30 , 'InPuter' , '录入者' , 0 , 0 , 'TextType' , 11 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 312 , 30 , 'Status' , '状态' , 0 , 0 , 'NumType' , 12 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 313 , 30 , 'UpDateTime' , '更新时间' , 0 , 0 , 'DateType' , 13 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 314 , 30 , 'CreateTime' , '生成时间' , 0 , 0 , 'DateType' , 14 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 315 , 30 , 'UpDateType' , '更新时间类型' , 0 , 0 , 'NumType' , 15 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 316 , 30 , 'PdfLink' , 'PDF地址' , 0 , 0 , 'TextType' , 16 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 317 , 30 , 'tablename' , '表名' , 1 , 0 , 'TextType' , 17 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 318 , 30 , 'ItemID' , '表的记录' , 0 , 0 , 'TextType' , 18 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 319 , 30 , 'Template' , '模板' , 0 , 0 , 'TextType' , 19 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 320 , 30 , 'Subtitle' , '副标题' , 0 , 0 , 'TextType' , 20 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 321 , 30 , 'PYtitle' , '拼音缩写' , 0 , 0 , 'TextType' , 21 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 322 , 30 , 'FirstNodeID' , '根节点ID' , 0 , 0 , 'NumType' , 22 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )
 INSERT [ZL_ModelField] ( [FieldID] , [ModelId] , [FieldName] , [FieldAlias] , [IsNotNull] , [IsSearchForm] , [FieldType] , [OrderId] , [ShowList] , [ShowWidth] , [IsShow] , [IsView] , [IsDownField] , [DownServerID] , [RestoreField] , [Sys_type] , [IsCopy] , [Islotsize] ) VALUES ( 323 , 30 , 'TitleStyle' , '标题样式' , 0 , 0 , 'TextType' , 23 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 )

 SET IDENTITY_INSERT [ZL_ModelField] OFF

 SET IDENTITY_INSERT [ZL_MoneyManage] ON

 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 7 , 'HKD' , '港币' , 'HK＄' , 5.00000 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 8 , 'CNY' , '人民币' , '￥' , 10.00000 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 9 , 'RUB' , '卢布' , 'Re.' , 55.00000 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 14 , 'NOK' , '挪威克朗' , '32' , .25500 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 15 , 'MYR' , '马元' , 'M.＄' , .55000 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 16 , 'USD' , '美元' , '$' , 10.00000 , '1' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 17 , 'GBP' , '英镑' , '￡' , .25000 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 18 , 'EUR' , '欧元' , '€ ' , .25500 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 19 , 'TWD' , '新台币' , 'c$' , 5.00000 , '0' )
 INSERT [ZL_MoneyManage] ( [Flow] , [Money_code] , [Money_descp] , [Money_sign] , [Money_rate] , [Is_flag] ) VALUES ( 20 , 'JPY' , '日元' , 'J.￥' , .50000 , '0' )

 SET IDENTITY_INSERT [ZL_MoneyManage] OFF

SET IDENTITY_INSERT [ZL_Label] ON

 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 58 , '获得子栏目' , 4 , '黄页' , '获得子栏目' , 'username,默认值,1,黄页用户名|Styles,默认值,1,样式ID|ParentID,默认值,1,父节点ID' , 'ZL_PageTemplate' , '*' , '(UserName=''@username'' And UserGroup=@Styles And ParentID=@ParentID And IsTrue=1 And TemplateType<>4) Or (userid=0 And UserGroup=@Styles And ParentID=@ParentID And IsTrue=1 And TemplateType<>4)' , 'OrderID DESC' , '{Repeate}
<a href="Pagelist.aspx?Nodeid={Field="TemplateID"/}&pageid={ZL.Label id="栏目下获取黄页ID" /}" target="{Field="OpenType"/}">{Field="TemplateName"/}</a>
{/Repeate}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 59 , '调用栏目表' , 3 , '黄页' , '调用栏目表' , 'nodeid,默认值,2,栏目ID' , 'ZL_PageTemplate' , 'TemplateID,TemplateName,TemplateUrl,TemplateType,OpenType,UserGroup,Addtime,IsTrue,Userid,UserName,OrderID,ParentID,Modelinfo,identifiers,NodeFileEx,ContentFileEx,Nodeimgurl,Nodeimgtext,Pagecontent,PageMetakeyword,PageMetakeyinfo,linkurl,linkimg,linktxt' , 'TemplateID=@nodeid' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 60 , '栏目下获取黄页ID' , 2 , '黄页' , '栏目下获取黄页ID' , 'nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID' , 'GeneralID=@pageid' , '' , '{Field="GeneralID"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 61 , '栏目下获得子栏目列表' , 4 , '黄页' , '栏目下获得子栏目列表' , 'nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID|username,默认值,1,参数说明|Styles,默认值,1,参数说明' , 'ZL_PageTemplate' , 'TemplateID,TemplateName,TemplateUrl,TemplateType,OpenType,UserGroup,Addtime,IsTrue,Userid,UserName,OrderID,ParentID,Modelinfo,identifiers,NodeFileEx,ContentFileEx,Nodeimgurl,Nodeimgtext,Pagecontent,PageMetakeyword,PageMetakeyinfo,linkurl,linkimg,linktxt' , '(UserName=''@username'' And UserGroup=@Styles And ParentID=@nodeid And IsTrue=1 And TemplateType<>4) Or (userid=0 And UserGroup=@Styles And ParentID=@nodeid And IsTrue=1 And TemplateType<>4)' , 'OrderID DESC' , '{Repeate}
<a href="Pagelist.aspx?Nodeid={Field="TemplateID"/}&pageid={ZL.Label id="栏目下获取黄页ID" /}">{Field="TemplateName"/}</a>
{/Repeate}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 62 , '首页下查询黄页内容列表' , 4 , '黄页' , '首页下查询黄页内容列表' , 'username,默认值,1,黄页用户名|nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'TableName like ''ZL_Page_%'' And Status=99 And Inputer=''@username''' , 'CreateTime DESC' , '{Repeate}
<li><a href="PageContent.aspx?ItemID={Field="GeneralID"/}">{Field="Title"/}<a/></li><br>
{/Repeate}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 63 , '查询页显示上一内容' , 2 , '黄页' , '查询页显示上一内容' , 'ItemID,默认值,2,内容ID|Inputer,默认值,1,黄页用户|NodeID,默认值,1,栏目ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID IN (select top 1 GeneralID From ZL_CommonModel Where GeneralID<@ItemID And Inputer=''@Inputer'' And NodeID=@NodeID Order by GeneralID desc) And Inputer=''@Inputer'' And NodeID=@NodeID' , '' , '<a href="PageContent.aspx?ItemID={Field="GeneralID"/}">{Field="Title"/}</a>' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 64 , '查询页显示下一内容' , 2 , '黄页' , '查询页显示下一内容' , 'ItemID,默认值,2,内容ID|Inputer,默认值,1,黄页用户|NodeID,默认值,1,栏目ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID IN (select top 1 GeneralID From ZL_CommonModel Where GeneralID>@ItemID And Inputer=''@Inputer'' And NodeID=@NodeID Order by GeneralID) And Inputer=''@Inputer'' And NodeID=@NodeID' , '' , '<a href="PageContent.aspx?ItemID={Field="GeneralID"/}">{Field="Title"/}</a>' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 65 , '内容页查询所属栏目ID' , 2 , '黄页' , '内容页查询所属栏目ID' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel Inner join ZL_PageTemplate on ZL_CommonModel.NodeID=ZL_PageTemplate.TemplateID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Template,ZL_PageTemplate.TemplateID,ZL_PageTemplate.TemplateName,ZL_PageTemplate.TemplateUrl,ZL_PageTemplate.TemplateType,ZL_PageTemplate.OpenType,ZL_PageTemplate.UserGroup,ZL_PageTemplate.Addtime,ZL_PageTemplate.IsTrue,ZL_PageTemplate.Userid,ZL_PageTemplate.UserName,ZL_PageTemplate.OrderID,ZL_PageTemplate.ParentID,ZL_PageTemplate.Modelinfo,ZL_PageTemplate.identifiers,ZL_PageTemplate.NodeFileEx,ZL_PageTemplate.ContentFileEx,ZL_PageTemplate.Nodeimgurl,ZL_PageTemplate.Nodeimgtext,ZL_PageTemplate.Pagecontent,ZL_PageTemplate.PageMetakeyword,ZL_PageTemplate.PageMetakeyinfo,ZL_PageTemplate.linkurl,ZL_PageTemplate.linkimg,ZL_PageTemplate.linktxt' , 'ZL_CommonModel.GeneralID=@ItemID' , '' , '{Field="NodeID"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 66 , '内容页下查询黄页信息' , 2 , '黄页' , '内容页下查询黄页信息' , 'Inputer,默认值,1,黄页用户' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'Inputer=''@Inputer'' And TableName like ''ZL_Reg_%'' And Status=99' , '' , '{Field="GeneralID"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 67 , '内容页查询黄页用户' , 2 , '黄页' , '查询内容所属栏目数据' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel Inner join ZL_PageTemplate on ZL_CommonModel.NodeID=ZL_PageTemplate.TemplateID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Template,ZL_PageTemplate.TemplateID,ZL_PageTemplate.TemplateName,ZL_PageTemplate.TemplateUrl,ZL_PageTemplate.TemplateType,ZL_PageTemplate.OpenType,ZL_PageTemplate.UserGroup,ZL_PageTemplate.Addtime,ZL_PageTemplate.IsTrue,ZL_PageTemplate.Userid,ZL_PageTemplate.UserName,ZL_PageTemplate.OrderID,ZL_PageTemplate.ParentID,ZL_PageTemplate.Modelinfo,ZL_PageTemplate.identifiers,ZL_PageTemplate.NodeFileEx,ZL_PageTemplate.ContentFileEx,ZL_PageTemplate.Nodeimgurl,ZL_PageTemplate.Nodeimgtext,ZL_PageTemplate.Pagecontent,ZL_PageTemplate.PageMetakeyword,ZL_PageTemplate.PageMetakeyinfo,ZL_PageTemplate.linkurl,ZL_PageTemplate.linkimg,ZL_PageTemplate.linktxt' , 'ZL_CommonModel.GeneralID=@ItemID' , '' , '{Field="Inputer"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 68 , '内容页查询黄页ID' , 2 , '黄页' , '查询内容所属栏目数据' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel Inner join ZL_PageTemplate on ZL_CommonModel.NodeID=ZL_PageTemplate.TemplateID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Template,ZL_PageTemplate.TemplateID,ZL_PageTemplate.TemplateName,ZL_PageTemplate.TemplateUrl,ZL_PageTemplate.TemplateType,ZL_PageTemplate.OpenType,ZL_PageTemplate.UserGroup,ZL_PageTemplate.Addtime,ZL_PageTemplate.IsTrue,ZL_PageTemplate.Userid,ZL_PageTemplate.UserName,ZL_PageTemplate.OrderID,ZL_PageTemplate.ParentID,ZL_PageTemplate.Modelinfo,ZL_PageTemplate.identifiers,ZL_PageTemplate.NodeFileEx,ZL_PageTemplate.ContentFileEx,ZL_PageTemplate.Nodeimgurl,ZL_PageTemplate.Nodeimgtext,ZL_PageTemplate.Pagecontent,ZL_PageTemplate.PageMetakeyword,ZL_PageTemplate.PageMetakeyinfo,ZL_PageTemplate.linkurl,ZL_PageTemplate.linkimg,ZL_PageTemplate.linktxt' , 'ZL_CommonModel.GeneralID=@ItemID' , '' , '{ZL.Label id="内容页下查询黄页信息" Inputer="{Field="Inputer"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 69 , '内容页查询栏目' , 4 , '黄页' , '内容页查询栏目' , 'username,默认值,1,黄页用户名|Styles,默认值,1,样式ID' , 'ZL_PageTemplate' , '*' , '(UserName=''@username'' And UserGroup=@Styles And ParentID=0 And IsTrue=1 And TemplateType<>4) Or (userid=0 And UserGroup=@Styles And ParentID=0 And IsTrue=1 And TemplateType<>4)' , 'OrderID DESC' , '{Repeate}
<a href="Pagelist.aspx?Nodeid={Field="TemplateID"/}&pageid={ZL.Label id="内容页查询黄页ID"/}" target="{Field="OpenType"/}">{Field="TemplateName"/}</a>
{/Repeate}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 70 , '内容页显示黄页栏目列表' , 2 , '黄页' , '内容页显示黄页栏目列表' , 'Inputer,默认值,1,黄页用户' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'Inputer=''@Inputer'' And TableName like ''ZL_Reg_%'' And Status=99' , '' , '{ZL.Label id="内容页查询栏目" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 71 , '显示栏目列表' , 4 , '黄页' , '显示栏目列表' , 'username,默认值,1,黄页用户名|Styles,默认值,1,样式ID' , 'ZL_PageTemplate' , '*' , '(UserName=''@username'' And UserGroup=@Styles And ParentID=0 And IsTrue=1 And TemplateType<>4) Or (userid=0 And UserGroup=@Styles And ParentID=0 And IsTrue=1 And TemplateType<>4)' , 'OrderID DESC' , '{Repeate}
<a href="Pagelist.aspx?Nodeid={Field="TemplateID"/}&pageid={ZL.Label id="调用黄页ID"/}" target="{Field="OpenType"/}">{Field="TemplateName"/}</a>
{/Repeate}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 72 , '调用黄页ID' , 2 , '黄页' , '调用黄页参数' , 'pageid,默认值,2,参数说明' , 'ZL_CommonModel' , '*' , 'GeneralID=@pageid' , '' , '{Field="GeneralID"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 73 , '查询栏目下内容' , 4 , '黄页' , '查询栏目下内容' , 'username,默认值,1,黄页用户名|nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'TableName like ''ZL_Page_%'' And Status=99 And Inputer=''@username'' And NodeID=@nodeid' , 'CreateTime DESC' , '{Repeate}
<li><a href="PageContent.aspx?ItemID={Field="GeneralID"/}">{Field="Title"/}<a/></li><br>
{/Repeate}
{ZL.Page/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 74 , '调用黄页用户名' , 2 , '黄页' , '调用黄页用户名' , 'nodeid,默认值,2,节点ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@pageid' , '' , '{Field="Inputer"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 75 , '调用栏目信息' , 3 , '黄页' , '调用栏目信息' , 'nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID' , 'ZL_PageTemplate' , 'TemplateID,TemplateName,TemplateUrl,TemplateType,OpenType,UserGroup,Addtime,IsTrue,Userid,UserName,OrderID,ParentID,Modelinfo,identifiers,NodeFileEx,ContentFileEx,Nodeimgurl,Nodeimgtext,Pagecontent,PageMetakeyword,PageMetakeyinfo,linkurl,linkimg,linktxt' , 'TemplateID=@nodeid And IsTrue=1 And TemplateType<>4' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 76 , '调用黄页内容(View)' , 3 , '黄页' , '调用黄页内容' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel Inner join ZL_Page_productlist on ZL_CommonModel.ItemID=ZL_Page_productlist.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Template,ZL_Page_productlist.ID,ZL_Page_productlist.content,ZL_Page_productlist.addd' , 'ZL_CommonModel.GeneralID=@ItemID' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 77 , '在栏目下显示黄页子栏目(View)' , 2 , '黄页' , '在栏目下显示黄页子栏目(View)' , 'nodeid,默认值,2,节点ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@pageid' , '' , '{ZL.Label id="获得子栏目" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" ParentID="0" /}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 78 , '在栏目下显示黄页栏目(View)' , 2 , '黄页' , '显示黄页栏目' , 'nodeid,默认值,2,节点ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@pageid' , '' , '{ZL.Label id="获得子栏目" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" ParentID="0" /}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 79 , '显示栏目下子栏目的列表(View)' , 2 , '黄页' , '显示栏目下子栏目的列表(View)' , 'nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@pageid' , '' , '{ZL.Label id="栏目下获得子栏目列表" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 80 , '内容页显示上一内容(View)' , 2 , '黄页' , '内容页显示上一内容(View)' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@ItemID' , '' , '{ZL.Label id="查询页显示上一内容" Inputer="{Field="Inputer"/}" NodeID="{Field="NodeID"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 81 , '内容页显示下一内容(View)' , 2 , '黄页' , '内容页显示下一内容(View)' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@ItemID' , '' , '{ZL.Label id="查询页显示下一内容" Inputer="{Field="Inputer"/}" NodeID="{Field="NodeID"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 82 , '内容页显示黄页栏目列表(View)' , 2 , '黄页' , '内容页显示黄页栏目列表(View)' , 'ItemID,默认值,2,内容ID' , 'ZL_CommonModel Inner join ZL_PageTemplate on ZL_CommonModel.NodeID=ZL_PageTemplate.TemplateID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Template,ZL_PageTemplate.TemplateID,ZL_PageTemplate.TemplateName,ZL_PageTemplate.TemplateUrl,ZL_PageTemplate.TemplateType,ZL_PageTemplate.OpenType,ZL_PageTemplate.UserGroup,ZL_PageTemplate.Addtime,ZL_PageTemplate.IsTrue,ZL_PageTemplate.Userid,ZL_PageTemplate.UserName,ZL_PageTemplate.OrderID,ZL_PageTemplate.ParentID,ZL_PageTemplate.Modelinfo,ZL_PageTemplate.identifiers,ZL_PageTemplate.NodeFileEx,ZL_PageTemplate.ContentFileEx,ZL_PageTemplate.Nodeimgurl,ZL_PageTemplate.Nodeimgtext,ZL_PageTemplate.Pagecontent,ZL_PageTemplate.PageMetakeyword,ZL_PageTemplate.PageMetakeyinfo,ZL_PageTemplate.linkurl,ZL_PageTemplate.linkimg,ZL_PageTemplate.linktxt' , 'ZL_CommonModel.GeneralID=@ItemID' , '' , '{ZL.Label id="内容页显示黄页栏目列表" Inputer="{Field="Inputer"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 83 , '栏目下显示栏目内容列表(View)' , 2 , '黄页' , '栏目下显示栏目内容列表(View)' , 'nodeid,默认值,2,栏目ID|pageid,默认值,2,黄页ID' , 'ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@pageid' , '' , '{ZL.Label id="查询栏目下内容" username="{Field="Inputer"/}"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 84 , '首页显示黄页栏目(View)' , 3 , '黄页' , '首页显示黄页栏目(View)' , 'pageid,默认值,2,参数说明' , '{table1}.dbo.ZL_CommonModel' , 'GeneralID,NodeID,ModelID,ItemID,TableName,Title,Inputer,Hits,CreateTime,Status,EliteLevel,InfoID,SpecialID,IsCreate,HtmlLink,Template' , 'GeneralID=@pageid' , '' , '<b>[黄页栏目]</b><br>
{ZL.Label id="显示栏目列表" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" /}
<br><b>[内容列表]:</b><br>
{ZL.Label id="首页下查询黄页内容列表" username="{Field="Inputer"/}" /}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 85 , '①首页显示(View)' , 2 , '[黄页模板一]' , '首页显示(View)' , 'pageid,默认值,2,参数说明' , 'ZL_CommonModel Inner join ZL_Reg_User on ZL_CommonModel.ItemID=ZL_Reg_User.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Template,ZL_Reg_User.ID,ZL_Reg_User.UserID,ZL_Reg_User.UserName,ZL_Reg_User.Styleid,ZL_Reg_User.local,ZL_Reg_User.Proname,ZL_Reg_User.logo,ZL_Reg_User.licence,ZL_Reg_User.Createdate,ZL_Reg_User.proinfo,ZL_Reg_User.contact' , 'GeneralID=@pageid' , '' , '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$SiteName/}:黄页系统-{Field="Proname"/}</title>
<link href="page.css" rel="stylesheet" type="text/css" />
<SCRIPT LANGUAGE="JavaScript"> 
<!-- 
function gettimes(times)
{
var a,aD,aS;
var b,bD,bS;
var c,cD,cS;
var myDate = new Date(); 
b=myDate.getYear();//现在的年份
c=myDate.getMonth()+1;//现在的月份
a=times; //输入的时间

if(a.indexOf(" ")>0)
{
var ss= a.split(" ");
if(ss[0].indexOf("-")>0)
{
ass=ss[0].split("-");
aD=new Date(ass[0],ass[1],ass[2]); 
}		
}

aS=b-aD.getYear();
cS=c-aD.getMonth();

if(aS<0){
aS=0;
}

if(aS==0 && cS>0)
{
document.write(cS+''月'');
}else
{
document.write(aS+''年'');
}
}
//--> 
</SCRIPT>


</head>
<body>
<div id="din"></div>
<div id="top">
<div id="top_logo"><img src="images/c3495.jpg" width="100" height="80" /></div>
<div id="top_title">{Field="Proname"/}</div>
<div id="top_url">网址：<a href="{$SiteURL/}/page/index.aspx?pageid={Field="GeneralID"/}">{$SiteURL/}/page/index.aspx?pageid={Field="GeneralID"/}</a></div>
<div id="top_sitename"><a href="{$SiteURL/}" target="_blank">{$SiteName/}</a></div>
</div>

<!--导航开始 -->
<div id="nav">
<div id="nav_left">【<img src="images/icon_b.gif" />上有名第<script>gettimes("{Field="Createdate"/}");</script>】</div>
<div id="nav_right">
<ul>
{ZL.Label id="①显示栏目列表" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" /}
</ul>
</div>
</div>
<!--导航结束 -->

<!--主体开始 -->
<div id="main">
<!--左边开始 -->
<div id="main_left">
<div class="left_tite">栏目导航</div>
<ul>
{ZL.Label id="①显示栏目列表" username="{Field="Inputer"/}" Styles="{Field="InfoID"/}" /}
</ul>
<div class="left_tite">友情链接</div>
<ul>
{ZL.Label id="①首页显示友情链接" Nodeid="145" username="{Field="Inputer"/}" /}
</ul>
<div class="left_tite">联系方式</div>
<div class="main_txt">
{Field="contact"/}
</div>
</div>
<!--左边结束 -->
<!--右边开始 -->
<div id="main_right">
<div id="main_right_path">您现在的位置：黄页名>>栏目名或功能名</div>
<div class="right_tite">公司介绍</div>
<div class="right_main">
{Field="proinfo"/}
</div>
<div class="main_txt">
<ul>
<li style="width:23%"></li>
<li style="width:23%"></li>
<li style="width:23%"></li>
<li style="width:23%"></li>
</ul>
</div>
<div style="clear:both"></div>
<div class="right_bottom"></div>
</div>
<!--右边结束 -->


</div>
<!--主体结束 -->
<!--底部开始 -->
<div style="clear:both"></div>
<div id="bottom">
<div id="bootom_nav">
<ul>
<li><a href="#">展台首页</a></li>
<li><a href="#">公司介绍</a></li>
<li><a href="#">产品展示</a></li>
<li><a href="#">最新供应</a></li>
<li><a href="#">公司动态</a></li>
<li><a href="#">询价留言</a></li>
<li><a href="#">联系我们</a></li>
<li><a href="#">会员管理</a></li>
</ul>
</div>
<div style="clear:both"></div>
<div id="bottom_left"><a href="#" target="_blank"><img src="images/b.gif" /></a></div>
<div id="bottom_right">中国包装印刷展览网 设计制作，未经允许翻录必究.Copyright(C) <script LANGUAGE="JavaScript"> <!-- var year="";mydate=new Date();myyear=mydate.getYear();year=(myyear > 200) ? myyear : 1900 + myyear;document.write(year); --> </script> http://www.zoomla.cn, All rights reserved. <br />
联系电话：0791-8303707 7532723  E-mail:web@hx008.cn。<br />
以上信息由企业自行提供，信息内容的真实性、准确性和合法性由相关企业负责，中国包装印刷展览网网对此不承担任何保证责任。 </div>

</div>
<!--底部结事 -->
<!--参照http://www.ppzhan.com/st3495 -->
</body>
</html>
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 86 , '①显示栏目列表' , 4 , '[黄页模板一]' , '①显示栏目列表' , 'username,默认值,1,黄页用户名|Styles,默认值,1,样式ID' , 'ZL_PageTemplate' , '*' , '(UserName=''@username'' And UserGroup=@Styles And ParentID=0 And IsTrue=1 And TemplateType<>4) Or (userid=0 And UserGroup=@Styles And ParentID=0 And IsTrue=1 And TemplateType<>4)' , 'OrderID DESC' , '{Repeate}
<li><a href="Pagelist.aspx?Nodeid={Field="TemplateID"/}&pageid={ZL.Label id="调用黄页ID"/}" target="{Field="OpenType"/}">{Field="TemplateName"/}</a></li>
{/Repeate}
' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 87 , '①查询友情链接' , 2 , '[黄页模板一]' , '①查询友情链接' , 'ItemID,默认值,2,参数说明' , 'ZL_CommonModel Inner join ZL_Page_link on ZL_CommonModel.ItemID=ZL_Page_link.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Titlecolor,ZL_CommonModel.Template,ZL_Page_link.ID,ZL_Page_link.linkname,ZL_Page_link.linkurl' , 'ZL_CommonModel.GeneralID=@ItemID' , '' , '<script language="javascript">location.href=''{Field="linkurl"/}'';</script>' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 88 , '①首页显示友情链接' , 4 , '[黄页模板一]' , '①首页显示友情链接' , 'pageid,默认值,2,黄页ID|Nodeid,默认值,1,节点ID|username,默认值,1,黄页用户名' , 'ZL_CommonModel Inner join ZL_Page_link on ZL_CommonModel.ItemID=ZL_Page_link.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.NodeID,ZL_CommonModel.ModelID,ZL_CommonModel.ItemID,ZL_CommonModel.TableName,ZL_CommonModel.Title,ZL_CommonModel.Inputer,ZL_CommonModel.Hits,ZL_CommonModel.CreateTime,ZL_CommonModel.Status,ZL_CommonModel.EliteLevel,ZL_CommonModel.InfoID,ZL_CommonModel.SpecialID,ZL_CommonModel.IsCreate,ZL_CommonModel.HtmlLink,ZL_CommonModel.Titlecolor,ZL_CommonModel.TitlecolorZL_CommonModel.TitlecolorZL_CommonModel.Template,ZL_Page_link.ID,ZL_Page_link.linkname,ZL_Page_link.linkurl' , 'ZL_CommonModel.TableName like ''ZL_Page_%'' And ZL_CommonModel.Inputer=''@username'' And ZL_CommonModel.Status=99 And ZL_CommonModel.NodeID=@Nodeid' , 'ZL_CommonModel.CreateTime DESC' , '{Repeate}
<li><a href="{Field="linkurl"/}" target="_blank">{Field="Title"/}</a></li>
{/Repeate}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 89 , '文章模型数据源标签' , 3 , '数据源标签' , '文章模型数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_Article on ZL_CommonModel.ItemID=ZL_C_Article.ID' , 'ZL_CommonModel.*,ZL_C_Article.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 90 , '图库模型数据源标签' , 3 , '数据源标签' , '图库模型数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_Photo on ZL_CommonModel.ItemID=ZL_C_Photo.ID' , 'ZL_CommonModel.*,ZL_C_Photo.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 91 , '下载模型数据源标签' , 3 , '数据源标签' , '下载模型数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_soft on ZL_CommonModel.ItemID=ZL_C_soft.ID' , 'ZL_CommonModel.*,ZL_C_soft.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 92 , '转向链接模型数据源标签' , 3 , '数据源标签' , '转向链接模型数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_RedirectLink on ZL_CommonModel.ItemID=ZL_C_RedirectLink.ID' , 'ZL_CommonModel.*,ZL_C_RedirectLink.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 93 , 'top' , 1 , '静态标签' , '' , '' , '' , '' , '' , '' , '       <div id="top">
       <div id="logo"><a href="/"><img src="/skin/default/logo.jpg" title="网站首页" /></a></div>
        <div id="ilogo"><a href="http://subject.csdn.net/zoomla_cms/" target="_blank"><img src="/skin/default/ilogo.jpg" alt="点击进入专题报道|世界第一中文开发门户强烈推荐Zoomla逐浪CMS！" /></a></div>
        <div id="top2">
          <!--文字背景-->
          <div id="top_1">
            <!--文字-->
            <div class="top_w"> <a href="/ColumnList.aspx?NodeID=34">客服中心</a> <a href="/ColumnList.aspx?NodeID=32">商业订制</a> <a href="/ColumnList.aspx?NodeID=33">模板开发</a> <a href="http://www.hx008.cn/" target="_blank">主机域名</a></div>
            <!--文字结束-->
          </div>
          <!--文字背景END-->
          <div id="top_2">
            <div class="top_p"><a href="/ColumnList.aspx?NodeID=45">购买</a>| <a href="/ColumnList.aspx?NodeID=20" target="_blank">演示</a>| <a href="/ColumnList.aspx?NodeID=30">博客</a>| <a href="/ColumnList.aspx?NodeID=31">开发者俱乐部</a></div>
          </div>
        </div>
        
      </div>

         <div style="clear:both"></div>
         <!--顶部导航开始 -->
        <div id="topmenu">
          <div id="topmenu_left"></div>
          <div id="topmenu_gg"><!--公告区：--></div>
          <div id="topmenu_mid">
          <div style="float:left;width:500px; margin-top:5px; ">
          <iframe src="../Search/indexSearch.aspx" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" width="500px" height="28px"></iframe>
           <div style="margin-top:2px;float:left;width:500px; height:16px; line-height:16px; color:#FFFFFF">
           <img src="../../skin/default/btn_best_key.gif" />&nbsp;模板&nbsp;节点&nbsp;模型&nbsp;智能替换&nbsp;采集
           </div>
          </div>
          <div style="width:200px; margin-left:520px;">
          <a href="#" target="_blank"><img src="../../skin/default/top_ask.gif" /></a>
          </div>
          <div id="top_6">
    <div id="nav">
      <ul>
        <li id="nav_l"><a id="aa"  class="aa" href="/">网站首页</a></li>
        <li><a id="bb1" class="bb1" href="/ColumnList.aspx?NodeID=3">走进逐浪</a></li>
        <li><a id="bb2" class="bb2" href="/ColumnList.aspx?NodeID=2">产品中心</a></li>
        <li><a id="bb3" class="bb3" href="/ColumnList.aspx?NodeID=9">成功案例</a></li>
        <li><a id="bb4" class="bb4" href="/ColumnList.aspx?NodeID=24">解决方案</a></li>
        <li><a id="bb5" class="bb5" href="/ColumnList.aspx?NodeID=25">模板中心</a></li>
        <li><a id="bb6" class="bb6" href="http://bbs.zoomla.cn" target="_blank">技术社区</a></li>
      </ul>
      </div>

          </div>
          </div>
          <div id="topmenu_right"><img src="/skin/default/h.jpg" /></div>
		</div>
        <!--顶部导航结束 -->

' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 94 , 'bottom' , 1 , '静态标签' , '' , '' , '' , '' , '' , '' , '      <div id="bottom"> <a href="/ColumnList.aspx?NodeID=21">媒体报道</a> | <a href="/NodePage.aspx?NodeID=3">关于我们</a> | <a href="/Content.aspx?ItemID=93">资质证件</a> | <a href="/Content.aspx?ItemID=94">合同文档</a> | <a href="/Content.aspx?ItemID=84">汇款方式</a> | <a href="/Content.aspx?ItemID=83">联系我们</a> | <a href="/ColumnList.aspx?NodeID=27">工作机会</a> | <a href="http://www.hx008.cn/magazine/" target="_blank">电子会刊</a> | <a href="/Content.aspx?ItemID=95">版权申明</a> | <a href="/NodePage.aspx?NodeID=26">慈善公益</a> | <a href="/ColumnList.aspx?NodeID=18">参观公司</a> | <a href="javascript:CorrectReport();">纠错报告</a> |  <a href="/manage/login.aspx" target="_blank">后台管理</a>
     </div>' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 95 , '点击复制网址代码' , 1 , '静态标签' , '23' , '' , '' , '' , '' , '' , '当前网址：
<script language="javascript" type="text/javascript">
  document.writeln ("<input id=\"thisweburl\" type=\"text\" size=\"78\" value=\"" + location + "\" onmouseover=\"this.select()\"/>")
  </script><br />

<input type="button" name="Submit" onClick=''copyToClipBoard()'' value="复制当前网址，传给QQ/MSN上的好友">
<script language="javascript">
    function copyToClipBoard(){
     var clipBoardContent="";
       clipBoardContent+=this.location.href;
     window.clipboardData.setData("Text",clipBoardContent);
     alert("{$SiteName/}恭喜您:网址复制成功，请使用CTRL+V粘贴到你的QQ/MSN上推荐给你的好友!");
   }
</script>


' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 96 , '节点栏目信息数据源' , 3 , '数据源标签' , '' , 'NodeID,0,2,当前栏目ID赋值' , 'ZL_Node' , '*' , 'NodeID=@NodeID' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 97 , '默认内容分页标签' , 6 , '内容分页导航' , '' , '' , '' , '' , '' , '' , ' <a href="{firsturl/}"><p>首页</p></a>  <a href="{prvurl/}"><p>上一页</p></a>  {loop range=\''显示半径\''}<a href="{pageurl/}" class="p{pageid/}"><span>{pageid/}</span></a>$$$<a href="{currenturl/}"  class="p{pageid/}"><span>{currentpage/}</span></a>{/loop}  <a href="{nexturl/}"><p>下一页</p></a> <a href="{endurl/}"><p>末页</p></a>
' , '0' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 98 , '图片数据源标签' , 3 , '数据源标签' , '图片数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_image on ZL_CommonModel.ItemID=ZL_C_image.ID' , 'ZL_CommonModel.*,ZL_C_image.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 99 , '输出指定节点标题_带时间属性' , 2 , '全站通用' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,调用信息数' , 'ZL_CommonModel' , 'CreateTime,GeneralID,NodeID,Title,Titlecolor' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and status=99' , 'OrderID DESC' , '{Repeate}
<li><span>{ZL:FormatDate({Field="CreateTime"/},yyyy-MM-dd)/}</span><a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}" style="color:{Field="Titlecolor"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a></li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 100 , '输出指定节点标题_无时间属性' , 2 , '全站通用' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,调用信息数' , 'ZL_CommonModel' , 'GeneralID,NodeID,Title,Titlecolor' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and status=99' , 'OrderID DESC' , '{Repeate}
<li><a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}" style="color:{Field="Titlecolor"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a></li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 101 , '公告数据源标签' , 3 , '数据源标签' , '公告数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_Announce on ZL_CommonModel.ItemID=ZL_C_Announce.ID' , 'ZL_CommonModel.*,ZL_C_Announce.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 102 , '友情链接数据源标签' , 3 , '数据源标签' , '友情链接数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_FriendSite on ZL_CommonModel.ItemID=ZL_C_FriendSite.ID' , 'ZL_CommonModel.*,ZL_C_FriendSite.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 103 , '视频数据源标签' , 3 , '数据源标签' , '视频数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_video on ZL_CommonModel.ItemID=ZL_C_video.ID' , 'ZL_CommonModel.*,ZL_C_video.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 104 , '输出指定节点标题列表_带时间属性_指定新窗口大小' , 2 , '全站通用' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,调用信息数|T_width,400,1,弹窗宽度|T_height,440,1,弹窗高度' , 'ZL_CommonModel' , 'CreateTime,GeneralID,NodeID,Title' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and status=99' , 'OrderID DESC' , '{Repeate}
<li><span>{ZL:FormatDate({Field="CreateTime"/},yyyy-MM-dd)/}</span><a href="#" onclick="javascript:window.open(''{ZL:GetInfoUrl({Field="GeneralID"/})/}'', ''newwindow'', ''height=@T_height, width=@T_width, toolbar=no, menubar=no, scrollbars=auto, resizable=no, location=no, status=no'')" title="{Field="Title"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a></li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 105 , '输出指定节点标题列表_带时间属性_分页' , 4 , '全站通用' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,分页显示数' , '{table1}.dbo.ZL_CommonModel' , 'CreateTime,GeneralID,NodeID,Title' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and status=99' , 'OrderID DESC' , '<ul>{Repeate}  <li><span>{ZL:FormatDate({Field="CreateTime"/},yyyy-MM-dd)/}</span><a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a></li>  {/Repeate}  </ul><div style="clear:both"></div>  {ZL.Page/}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 106 , '指定节点下列表块循环' , 2 , '列表专用' , '' , 'ParentID,0,1,父节点ID|ShowNum,10,1,调用栏目数|TitleNum,30,1,标题长度|Nums,10,1,每块抽取数' , 'ZL_Node' , 'NodeID,NodeName' , 'ParentID=@ParentID' , 'OrderID ASC' , '{Repeate}
<div class="main_r_show">
<div class="main_r_title"><span><a href="{ZL:GetNodeUrl({Field="NodeID"/})/}">More..</a></span>{Field="NodeName"/}</div>
<ul>
{ZL.Label id="输出指定节点标题_带时间属性" NodeID="{Field="NodeID"/}" TitleNum="@TitleNum" ShowNum="@Nums" /}
</ul>
</div><!--右边循环块之一结束 -->
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 107 , '输出指定ID节点名' , 2 , '列表专用' , '' , 'NodeID,0,1,节点ID' , 'ZL_Node' , 'NodeName' , 'NodeID=@NodeID' , '' , '{Field="NodeName"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 108 , '抽取父节点ID名与链接' , 2 , '列表专用' , '' , 'NodeID,0,1,当前节点ID' , 'ZL_Node' , 'NodeID,NodeName' , 'Nodeid=(select ParentID from ZL_Node where NodeID=@NodeID)' , '' , '<a href="{ZL:GetNodeUrl({Field="NodeID"/})/}">{Field="NodeName"/}</a>' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 109 , '抽取父节点ID' , 2 , '列表专用' , '' , 'NodeID,0,1,当前节点ID' , 'ZL_Node' , 'NodeID' , 'Nodeid=(select ParentID from ZL_Node where NodeID=@NodeID)' , '' , '{Field="NodeID"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 110 , '相关文章列表输出' , 2 , '列表专用' , '' , 'ShowNum,10,1,调用信息数|TitleNum,30,1,标题长度|KeyWord,0,1,关键字输入' , 'ZL_CommonModel' , 'GeneralID,NodeID,Title' , '{ZL:GetKeyWord(@KeyWord)/}  And Status=99' , 'CreateTime DESC' , '{Repeate}
<li><a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a></li>

{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 111 , '上一篇文章' , 2 , '文章中心' , '' , 'ID,0,2,信息ID' , 'ZL_CommonModel' , 'GeneralID,Title' , 'GeneralID<@ID and Status=99' , 'GeneralID desc' , '<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}">{Field="Title"/}</a>' , '1' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 112 , '下一篇文章' , 2 , '文章中心' , '' , 'ID,0,2,信息ID' , 'ZL_CommonModel' , 'GeneralID,Title' , 'GeneralID>@ID and Status=99' , 'GeneralID asc' , '<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}">{Field="Title"/}</a>' , '1' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 113 , '指定父ID下节点名称与链接列表' , 2 , '列表专用' , '' , 'ParentID,0,1,父节点ID|ShowNum,100,1,调用信息数' , 'ZL_Node' , 'NodeID,NodeName' , 'ParentID=@ParentID' , 'OrderID ASC' , '{Repeate}
<li><a href="{ZL:GetNodeUrl({Field="NodeID"/})/}" title="{Field="NodeName"/}" target="{ZL:GetNodeOpen({Field="NodeID"/})/}">{Field="NodeName"/}</a></li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 114 , '节点互动绑定调用标签' , 4 , '互动标签' , 'ZL_Pub_JDHDBD分页标签' , '' , 'ZL_Pub_JDHDBD left join ZL_Pub on ZL_Pub_JDHDBD.Pubupid=ZL_Pub.Pubid' , 'ZL_Pub_JDHDBD.*,ZL_Pub.*' , 'ZL_Pub_JDHDBD.Pubupid=23 And ZL_Pub_JDHDBD.PubContentid={$GetRequest(Nodeid)$} And ZL_Pub_JDHDBD.Pubstart=1' , 'ZL_Pub_JDHDBD.ID DESC' , '{Repeate}
用户名:{Field="PubUserName"/}<br />
评论说明:{Field="PubContent"/}<br />
用户IP:{Field="PubIP"/}<br />
评论时间:{Field="PubAddTime"/}<br />{/Repeate}<br />
{ZL.Page/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 115 , '兼容FF六图轮循_输出广告图片' , 2 , '广告代码' , '' , 'NodeID,0,1,节点ID' , 'ZL_CommonModel left join ZL_C_Article on ZL_CommonModel.ItemID=ZL_C_Article.ID' , 'ZL_CommonModel.ItemID,ZL_C_Article.pic' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and status=99 And ZL_C_Article.pic like ''%.jpg%''' , 'ZL_CommonModel.CreateTime DESC' , '{Repeate}{$UploadDir/}{Field="pic"/}|{/Repeate}' , '6' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 116 , '兼容FF六图轮循_输出广告标题' , 2 , '广告代码' , '' , 'NodeID,0,1,节点ID' , 'ZL_CommonModel left join ZL_C_Article on ZL_CommonModel.ItemID=ZL_C_Article.ID' , 'ZL_CommonModel.Title' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and status=99 And ZL_C_Article.pic like ''%.jpg%''' , 'ZL_CommonModel.CreateTime DESC' , '{Repeate}{Field="Title"/}|{/Repeate}' , '6' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 117 , '兼容FF六图轮循_输出广告链接' , 2 , '广告代码' , '232' , 'NodeID,0,1,节点ID' , '{table1}.dbo.ZL_CommonModel left join {table1}.dbo.ZL_C_Article on {table1}.dbo.ZL_CommonModel.ModelID={table1}.dbo.ZL_C_Article.ID' , 'ZL_CommonModel.GeneralID' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and status=99 And ZL_C_Article.pic like ''%.jpg%''' , 'ZL_CommonModel.CreateTime DESC,{table1}.dbo.ZL_CommonModel.because_back DESC' , '{Repeate}{ZL:GetInfoUrl({Field="GeneralID"/})/}{/Repeate}' , '6' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 118 , '输出指定节点标题_无时间属性[商城]' , 2 , '商城' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,调用信息数' , '{table1}.dbo.ZL_Commodities' , 'ID,Nodeid,Proname' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and sales=1' , 'addtime DESC' , '{Repeate}
<li><a href="{ZL:GetShopUrl({Field="ID"/})/}" title="{Field="Proname"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}">{ZL:CutText({Field="Proname"/},@TitleNum,)/}</a></li>
{/Repeate}
' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 119 , '商城商品标签_分页' , 4 , '商城' , '' , 'NodeID,0,1,节点ID|TitleNum,30,1,标题长度|ShowNum,20,1,每页显示数' , '{table1}.dbo.ZL_Commodities' , 'ID,LinPrice,Proname,Thumbnails' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and sales=1' , 'addtime DESC' , '<ul>
{Repeate}
<li>
<a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank"><img src="/{Field="Thumbnails"/}" alt="{Field="Proname"/}" class="imgs" /></a>
<p><a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank">{ZL:CutText({Field="Proname"/},@TitleNum,)/}</a></p>
<span>商城价：<font class="red">￥{ZL:GetMoney({Field="LinPrice"/},2,1)/}</font></span>

</li><!--商品展示之一 -->
{/Repeate}
</ul>
{ZL.Page/} ' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 120 , '商城普通商品标签_不分页列表' , 2 , '商城' , '' , 'NodeID,0,1,节点ID|TitleNum,30,1,标题长度|ShowNum,20,1,每页显示数' , 'ZL_Commodities' , 'ID,LinPrice,Proname,Thumbnails' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and sales=1' , 'addtime DESC' , '{Repeate}
<li>
<a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank"><img src="/{Field="Thumbnails"/}" alt="{Field="Proname"/}" class="imgs" /></a>
<p><a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank">{ZL:CutText({Field="Proname"/},@TitleNum,)/}</a></p>
<span>商城价：<font class="red">￥{ZL:GetMoney({Field="LinPrice"/},2,1)/}</font></span>

</li><!--商品展示之一 -->
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 121 , '商城热卖商品标签_不分页列表' , 2 , '商城' , '' , 'NodeID,0,1,节点ID|TitleNum,30,1,标题长度|ShowNum,20,1,每页显示数' , '{table1}.dbo.ZL_Commodities' , 'ID,LinPrice,Proname,Thumbnails' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and sales=1 and ishot=1' , 'addtime DESC' , '{Repeate}
<li>
<a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank"><img src="/{Field="Thumbnails"/}" alt="{Field="Proname"/}" class="imgs" /></a>
<p><a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank">{ZL:CutText({Field="Proname"/},@TitleNum,)/}</a></p>
<span>商城价：<font class="red">￥{ZL:GetMoney({Field="LinPrice"/},2,1)/}</font></span>

</li><!--商品展示之一 -->
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 122 , '常规商品数据源' , 3 , '数据源标签' , '用于商品内容页输出数据源' , 'InfoID,0,2,内容ID' , '{table1}.dbo.ZL_Commodities left join {table1}.dbo.ZL_P_Shop on {table1}.dbo.ZL_Commodities.ItemID={table1}.dbo.ZL_P_Shop.ID' , 'ZL_Commodities.*,ZL_P_Shop.*' , 'ZL_Commodities.ID={$GetRequest(ItemID)$}' , '' , '' , '0' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 123 , '二级栏目导航' , 2 , '列表专用' , '' , 'Parentid,0,1,父栏目ID|ShowNum,30,1,调用数' , '{table1}.dbo.ZL_Node' , 'NodeID,NodeName,Description' , 'Parentid=@Parentid' , 'orderid asc' , '{Repeate}
<li><a href="{ZL:GetNodeUrl({Field="NodeID"/})/}" target="_blank"><img src="/skin/caa/images/view.jpg" /></a><strong>{Field="NodeName"/}</strong>[{Field="Description"/}]</li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 124 , '全站栏目导航' , 2 , '列表专用' , '' , 'ShowNum,30,1,调用数' , '{table1}.dbo.ZL_Node' , 'NodeID,NodeName,Description' , 'Depth=1' , 'orderid asc' , '{Repeate}
<div class="dao_show"><p><a href="{ZL:GetNodeUrl({Field="NodeID"/})/}" target="_blank"><img src="/skin/caa/images/view.jpg" /></a><strong>{Field="NodeName"/}</strong>{Field="Description"/}</p>
<ul>
{ZL.Label id="二级栏目导航" Parentid="{Field="NodeID"/}" ShowNum="30" /}
</ul>
</div>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 125 , '标准黄页申请信息数据源_内容页' , 3 , '数据源标签' , '' , '' , 'ZL_CommonModel left join ZL_Reg_Page on ZL_CommonModel.Inputer=ZL_Reg_Page.UserName' , 'ZL_CommonModel.*,ZL_Reg_Page.*' , 'GeneralID={$GetRequest(ItemID)$}' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 126 , '输出指定节点标题列表_带时间属性_分页[商城]' , 4 , '商城' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,分页显示数' , '{table1}.dbo.ZL_Commodities' , 'AddTime,ID,Nodeid,Proname' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and sales=1' , 'addTime DESC' , '{Repeate}
<li><span>{ZL:FormatDate({Field="addTime"/},yyyy-MM-dd)/}</span><a href="{ZL:GetShopUrl({Field="ID"/})/}" title="{Field="Proname"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}">{ZL:CutText({Field="Proname"/},@TitleNum,)/}</a></li>
{/Repeate}
<div style="clear:both"></div>
{ZL.Page/}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 127 , '输出指定节点图标' , 2 , '列表专用' , '' , 'NodeID,0,1,节点ID' , '{table1}.dbo.ZL_Node' , 'NodePicUrl' , 'NodeID=@NodeID' , 'NodeDir DESC,PurviewType DESC' , '{Field="NodePicUrl"/}' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 128 , '友情链接缩略图列表输出' , 2 , '全站通用' , '' , 'ShowNum,10,1,调用信息数|NodeID,0,1,节点ID' , 'ZL_CommonModel left join ZL_C_FriendSite on ZL_CommonModel.ItemID=ZL_C_FriendSite.ID' , 'ZL_CommonModel.Title,ZL_C_FriendSite.logo,ZL_C_FriendSite.url
' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and Status=99' , 'OrderID DESC' , '{Repeate}
<li><a href="{Field="url"/}" target="_blank"><img src="{Field="logo"/}" alt="{Field="Title"/}" /></a></li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 129 , '文章缩略图列表_带标题' , 2 , '全站通用' , '' , 'NodeID,0,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,调用信息数' , '{table1}.dbo.ZL_CommonModel left join {table1}.dbo.ZL_C_Article on {table1}.dbo.ZL_CommonModel.ItemID={table1}.dbo.ZL_C_Article.ID' , '{table1}.dbo.ZL_CommonModel.GeneralID,{table1}.dbo.ZL_CommonModel.NodeID,{table1}.dbo.ZL_CommonModel.Title,{table1}.dbo.ZL_CommonModel.Titlecolor,{table1}.dbo.ZL_C_Article.pic' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and status=99' , 'OrderID DESC' , '{Repeate}
<li>
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}"><img src="{ZL:GetPicUrl({Field="pic"/})/}" alt="{Field="Title"/}" /></a>
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}" style="color:{Field="Titlecolor"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a></li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 130 , '文章缩略图列表_无标题' , 2 , '全站通用' , '' , 'NodeID,0,1,节点ID|ShowNum,10,1,调用信息数' , '{table1}.dbo.ZL_CommonModel left join {table1}.dbo.ZL_C_Article on {table1}.dbo.ZL_CommonModel.ItemID={table1}.dbo.ZL_C_Article.ID' , '{table1}.dbo.ZL_CommonModel.GeneralID,{table1}.dbo.ZL_CommonModel.NodeID,{table1}.dbo.ZL_CommonModel.Title,{table1}.dbo.ZL_C_Article.pic' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and status=99' , 'OrderID DESC' , '{Repeate}
<li>
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}"><img src="{ZL:GetPicUrl({Field="pic"/})/}" alt="{Field="Title"/}" /></a>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 141 , '企业信息数据源标签' , 3 , '数据源标签' , '企业信息数据源标签' , 'InfoID,0,2,内容ID' , '{table1}.dbo.ZL_CommonModel left join {table1}.dbo.ZL_Page_Content on {table1}.dbo.ZL_CommonModel.ItemID={table1}.dbo.ZL_Page_Content.ID' , 'ZL_CommonModel.*,ZL_Page_Content.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '0' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 144 , '视频列表输出_带播放器' , 2 , '视频' , '' , 'NodeID,86,1,节点ID|TitieNum,30,1,标题长度|ShowNum,10,1,调用数|width,300,1,播放器宽度|height,200,1,播放器高度' , '{table1}.dbo.ZL_CommonModel left join {table1}.dbo.ZL_C_video on {table1}.dbo.ZL_CommonModel.ItemID={table1}.dbo.ZL_C_video.ID' , '{table1}.dbo.ZL_CommonModel.GeneralID,{table1}.dbo.ZL_CommonModel.NodeID,{table1}.dbo.ZL_CommonModel.Title,{table1}.dbo.ZL_CommonModel.Titlecolor,{table1}.dbo.ZL_C_video.pic,{table1}.dbo.ZL_C_video.url' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and status=99' , '{table1}.dbo.ZL_CommonModel.CreateTime DESC' , '<p style="clear:both"><a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="{ZL:GetInfoOpen({Field="NodeID"/})/}" style="color:{Field="Titlecolor"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a><p>
<div id="player{Field="GeneralID"/}" style="width:@widthpx;height:@heightpx;color:#ffffff;" ></div>

<script type="text/javascript">
	var s5 = new SWFObject("/skin/blue/swf/FlvPlayer201002.swf","playlist","@width","@height","7");
	s5.addParam("allowfullscreen","true");
	s5.addVariable("autostart","false");
	s5.addVariable("image","{ZL:GetPicUrl({Field="pic"/})/}");
	s5.addVariable("file","{Field="url"/}");
	s5.addVariable("width","@width");
	s5.addVariable("height","@height");
	s5.write("player{Field="GeneralID"/}");
</script>' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 146 , '图库模型列表输出' , 2 , '列表专用' , '' , 'NodeID,0,1,节点ID|ShowNum,10,1,调用信息数|TitleNum,30,1,标题长度' , 'ZL_CommonModel left join ZL_C_Photo on ZL_CommonModel.ItemID=ZL_C_Photo.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.Title,ZL_C_Photo.PhotoUrlThum,Titlecolor' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and status=99' , 'ZL_CommonModel.CreateTime DESC' , '{Repeate}
<li>
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" target="_blank" title="{Field="Title"/}"><img src="{ZL:GetPicUrl({Field="PhotoUrlThum"/})/}" /></a><br />
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" targt="_blank" title="{Field="Title"/}" style="color:{Field="Titlecolor"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a>
</li>
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 147 , '图库模型列表输出_分页' , 4 , '列表专用' , '' , 'NodeID,0,1,节点ID|ShowNum,10,1,分页显示数|TitleNum,30,1,标题长度' , 'ZL_CommonModel left join ZL_C_Photo on ZL_CommonModel.ItemID=ZL_C_Photo.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.Title,ZL_C_Photo.PhotoUrlThum' , 'nodeid in(select nodeid from zl_node
where parentid=@NodeID or nodeid=@NodeID or parentid in (select nodeid from zl_node where 
parentid=@NodeID)  or  parentid in (select nodeid  from zl_node 
where parentid in (select nodeid from zl_node where parentid=@NodeID))
) and status=99' , 'ZL_CommonModel.CreateTime DESC' , '<ul>
{Repeate}
<li>
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" target="_blank" title="{Field="Title"/}"><img src="{ZL:GetPicUrl({Field="PhotoUrlThum"/})/}" /></a><br />
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" targt="_blank" title="{Field="Title"/}">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a>
</li>
{/Repeate}
</ul>
{ZL.Page/}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 148 , '输出指定节点文章模型附图' , 2 , '全站通用' , '' , 'NodeID,1,1,节点ID|ShowNum,10,1,调用信息数' , 'ZL_CommonModel left join ZL_C_Article on ZL_CommonModel.ItemID=ZL_C_Article.ID' , 'ZL_CommonModel.GeneralID,ZL_C_Article.pic,ZL_CommonModel.Title,Titlecolor' , '(NodeID=@NodeID or FirstNodeID=@NodeID) And Status=99 And ZL_C_Article.pic <>''''' , 'OrderID DESC' , '{Repeate}
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title"{Field="Title"/}" target="_blank" style="color:{Field="Titlecolor"/}"><img src="{ZL:GetPicUrl({Field="pic"/})/}" /></a>

{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 149 , '输出指定节点缩略图与标题列表' , 2 , '全站通用' , '' , 'NodeID,1,1,节点ID|TitleNum,30,1,标题长度|ShowNum,10,1,每页显示数' , 'ZL_CommonModel left join ZL_C_Article on ZL_CommonModel.ItemID=ZL_C_Article.ID' , 'ZL_CommonModel.GeneralID,ZL_CommonModel.Title,ZL_C_Article.pic' , '(NodeID=@NodeID or FirstNodeID=@NodeID) and Status=99 And ZL_C_Article.pic<>''''' , 'OrderID DESC' , '{Repeate}
<li>
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="_blank"><img src="{ZL:GetPicUrl({Field="pic"/})/}" /></a><br />
<a href="{ZL:GetInfoUrl({Field="GeneralID"/})/}" title="{Field="Title"/}" target="_blank">{ZL:CutText({Field="Title"/},@TitleNum,)/}</a>
</li>
{/Repeate}
' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 150 , '循环显示父栏目下信息列表' , 2 , '列表专用' , '' , 'ParentID,0,1,父节点ID|TitleNum,60,1,标题长度|ShowNum,10,1,特环显示信息数' , 'ZL_Node' , 'NodeID,NodeName' , 'ParentID=@ParentID' , 'OrderID aSC' , '{Repeate}
<div class="main_title"><span><a href="{ZL:GetNodeUrl({Field="NodeID"/})/}">More...</a></span>{Field="NodeName"/}</div>
<ul>
{ZL.Label id="输出指定节点标题_带时间属性" NodeID="{Field="NodeID"/}" TitleNum="@TitleNum" ShowNum="@ShowNum" /}
</ul>

{/Repeate}' , '100' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 151 , '蓝色头部' , 1 , '静态标签' , '' , '' , '' , '' , '' , '' , '<!-- 网站顶部 -->
<div id="WebTop">
    <p id="logo"><a href="/" target="_blank">  <img src="{$LogoUrl/}" border="0" /></a></p>
    <ul id="TopNavBar">
    	<li><iframe src="../Search/indexSearch.aspx" marginwidth="1" marginheight="1" scrolling="no" border="0" frameborder="0" width="480px" height="28px"></iframe></li>
        <li><a href="../../User/Register.aspx" target="_blank"><strong>注册会员</strong></a>|</li>
        <li><a href="../../User/Login.aspx" target="_blank"><strong>用户登陆</strong></a>|</li>
        <li><a href=''#'' onclick="javascript:window.open(''{$SiteURL/}'',''_blank'',''left=280,top=250,width=439,height=282,scrollbars=yes'')">设为首页</a>|</li>
        <li><a href="{$SiteURL/}" onclick="this.style.behavior=''url(#default#homepage)'';this.setHomePage(document.location.href);">加入收藏</a>|</li>
    </ul>
    <ul id="Menu">
        <li id="Menu0"><a href="{$SiteURL/}" target="_blank"><span>首页</span></a></li>
        {ZL.Label id="蓝色经典_顶部节点列表" ParentID="0" ShowNum="7" /}
    </ul>
</div>
<!-- 网站搜索 -->
<div id="WebSer">
<a href="/user/" target="_blank">社区空间精彩导航：</a>
<a href="/User/UserZone/Parking/Default.aspx">抢车位</a>
<a href="/User/UserZone/Book/BookList.aspx">读书</a>
<a href="/User/UserZone/LogManage/SelfLogManage.aspx">日记</a>
<a href="/User/UserZone/Memo/MemoList.aspx">备忘</a>
<a href="/User/UserZone/Pic/CategList.aspx">相册</a>
<a href="/User/UserFriend/Index.aspx">好友</a>
<a href="/User/UserZone/Book/MusicList.aspx">音乐</a>
<a href="/User/UserZone/Book/MovieList.aspx">电影</a>
<a href="/User/UserZone/Home/MyHome.aspx">小屋</a>
<a href="/User/userzone/GatherStrainManage/GSManage.aspx">族群</a>
<a href="/User/UserZone/Message/MyMessage.aspx">留言板</a>
<a href="/User/UserZone/ChitChat.aspx">蒙面聊</a>
<a href="/User/UserZone/Book/ItineraryList.aspx">旅途</a>
<a href="/User/UserZone/School/MySchoolList.aspx">班级</a>
<a href="/guestbook/">问答</a>
<a href="/User/UserZone/School/AddRessList.aspx">通讯录</a>
</div>
<!-- 广告位 -->
' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 152 , '蓝色底部' , 1 , '静态标签' , '' , '' , '' , '' , '' , '' , '<div id="Class_showpic">
<div class="main_title">最新图文</div>
{ZL.Label id="输出指定节点缩略图与标题列表" NodeID="{SField sid="节点栏目信息数据源" FD="NodeID" page="0"/}" TitleNum="26" ShowNum="10" /}</div>
<div id="bottom">
<a href="">关于我们</a>
<a href="">联系我们</a>
<a href="">创办宗旨</a>
<a href="">免责条款</a>
<a href="">会员约定</a>
<a href="">版权申明</a>
<a href="">服务条款</a>
<a href="">合作加盟</a>
<a href="">网站帮助</a>
<a href="{$ManageDir/}" target="_blank">管理登陆</a>
</div>

<div id="copyright">
{$Copyright/}
</div>
' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 153 , '循环显示父栏目下信息列表商城' , 2 , '列表专用' , '' , 'ParentID,0,1,父节点ID|TitleNum,60,1,标题长度|ShowNum,10,1,特环显示信息数' , 'ZL_Node' , 'NodeID,NodeName' , 'ParentID=@ParentID' , 'OrderID aSC' , '{Repeate}
<div class="main_title"><span><a href="{ZL:GetNodeUrl({Field="NodeID"/})/}">More...</a></span>{Field="NodeName"/}</div>
<ul>
{ZL.Label id="商城普通商品标签_不分页列表" NodeID="{Field="NodeID"/}" TitleNum="@TitleNum" ShowNum="@ShowNum" /}
</ul>

{/Repeate}' , '100' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 154 , '商城商品列表_分页' , 2 , '商城' , '' , 'NodeID,1,1,节点ID|ShowNum,10,1,显示数' , 'ZL_Commodities left join ZL_P_Shop on ZL_Commodities.ItemID=ZL_P_Shop.ID' , 'ZL_Commodities.AddTime,ZL_Commodities.LinPrice,ZL_Commodities.Nodeid,ZL_Commodities.Proname,ZL_Commodities.ShiPrice,ZL_Commodities.Thumbnails,ZL_Commodities.id' , 'ZL_Commodities.Nodeid=@NodeID and isnews=1' , 'ZL_Commodities.AddTime DESC' , '{Repeate}
<li>
<a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank"><img src="/{Field="Thumbnails"/}" alt="{Field="Proname"/}" class="imgs" /></a>
<p><a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank">{ZL:CutText({Field="Proname"/},@TitleNum,)/}</a></p>
<span>商城价：￥{ZL:GetMoney({Field="LinPrice"/},2,1)/}</span>
<a href="{ZL:GetShopUrl({Field="ID"/})/}" target="_blank"><img src="/skin/caa/images/g_09.gif" /></a>
</li><!--商品展示之一 -->
{/Repeate}' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 157 , '招聘模型数据源标签' , 3 , '数据源标签' , '' , '' , '{table1}.dbo.ZL_U_zp' , '*' , '' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 158 , '招聘信息列表' , 2 , '招聘' , '招聘信息列表用于首页显示，不分页' , '' , '{table1}.dbo.ZL_U_zp' , '*' , '' , '' , '' , '10' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 355 , '蓝色经典_顶部节点列表' , 2 , '列表专用' , '' , 'ParentID,0,1,父节点ID|ShowNum,100,1,调用信息数' , 'ZL_Node' , 'NodeID,NodeName' , 'ParentID=@ParentID' , 'OrderID ASC' , '{Repeate}
<li id="Menu{Field="NodeID"/}"><a href="{ZL:GetNodeLinkUrl({Field="NodeID"/})/}" title="{Field="NodeName"/}" target="{ZL:GetNodeOpen({Field="NodeID"/})/}"><span>{Field="NodeName"/}</span></a></li>
{/Repeate}

' , '@ShowNum' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 357 , '列表分页标签' , 1 , '列表分页' , '' , '' , '' , '' , '' , '' , '<div style=''width:100%;height:50px; line-height:50px;''>
<div class="badoo" style="width:600px; text-align:left;margin-left:20px;">
<li style=" float:left;display:block; width:65px;">
<a href="{firsturl/}"><<</a> <a href="{prvurl/}"><</a></li>
<li style="float:left;display:block;min-width:240px;overflow:hidden;text-overflow: ellipsis; "> {loop range=\''4\''}
<a href="{pageurl/}" class="p{pageid/}"><span>{pageid/}</span></a>
$$$<span class="current">{currentpage/}</span>{/loop} </li>
 <li style=" float:left;display:block; width:65px;"><a href="{nexturl/}">></a> <a href="{endurl/}">>></a></li></div>
</div>
' , '' , '' , 0 , 0 )
 INSERT [ZL_Label] ( [LabelID] , [LabelName] , [LabelType] , [LabelCate] , [LabelDesc] , [LabelParam] , [LabelTable] , [LabelField] , [LabelWhere] , [LabelOrder] , [LabelContent] , [LabelCount] , [LabelIdentity] , [LabelAddUser] , [LabelNodeID] ) VALUES ( 358 , 'ATSATSF数据源标签' , 3 , '数据源标签' , 'ATSATSF数据源标签' , 'InfoID,0,2,内容ID' , 'ZL_CommonModel left join ZL_C_ATSATSF on ZL_CommonModel.ItemID=ZL_C_ATSATSF.ID' , 'ZL_CommonModel.*,ZL_C_ATSATSF.*' , 'ZL_CommonModel.GeneralID=@InfoID' , '' , '' , '' , '' , 0 , 0 )

 SET IDENTITY_INSERT [ZL_Label] OFF


 SET IDENTITY_INSERT [ZL_LabelJude] ON

 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 1 , '计数判断' , '循环计算' , '等于' , '0' , '' , 47 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 2 , '计数判断' , '循环计算' , '等于' , '0' , '' , 49 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 3 , '计数判断' , '循环计算' , '等于' , '0' , '' , 50 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 4 , '计数判断' , '循环计算' , '等于' , '0' , '' , 51 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 5 , '计数判断' , '循环计算' , '等于' , '0' , '' , 52 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 6 , '计数判断' , '循环计算' , '等于' , '0' , '' , 53 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 7 , '计数判断' , '循环计算' , '等于' , '0' , '' , 54 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 8 , '计数判断' , '循环计算' , '等于' , '0' , '' , 43 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 9 , '计数判断' , '循环计算' , '等于' , '0' , '' , 42 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 10 , '计数判断' , '循环计算' , '等于' , '0' , '' , 57 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 11 , '计数判断' , '循环计算' , '等于' , '0' , '' , 122 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 12 , '计数判断' , '循环计算' , '等于' , '0' , '' , 141 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 13 , '计数判断' , '循环计算' , '等于' , '0' , '' , 142 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 14 , '计数判断' , '循环计算' , '等于' , '0' , '' , 143 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 15 , '计数判断' , '循环计算' , '等于' , '0' , '' , 105 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 16 , '计数判断' , '循环计算' , '等于' , '0' , '' , 144 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 17 , '计数判断' , '循环计算' , '等于' , '0' , '' , 126 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 18 , '计数判断' , '循环计算' , '等于' , '0' , '' , 119 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 19 , '计数判断' , '循环计算' , '等于' , '0' , '' , 150 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 20 , '计数判断' , '循环计算' , '等于' , '0' , '' , 151 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 21 , '计数判断' , '循环计算' , '等于' , '0' , '' , 152 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 22 , '计数判断' , '循环计算' , '等于' , '0' , '' , 153 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 23 , '计数判断' , '循环计算' , '等于' , '0' , '' , 120 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 24 , '计数判断' , '循环计算' , '等于' , '0' , '' , 154 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 25 , '计数判断' , '循环计算' , '等于' , '0' , '' , 155 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 26 , '计数判断' , '循环计算' , '等于' , '0' , '' , 121 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 27 , '计数判断' , '循环计算' , '等于' , '0' , '' , 157 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 28 , '计数判断' , '循环计算' , '等于' , '0' , '' , 158 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 29 , '计数判断' , '循环计算' , '等于' , '0' , '' , 159 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 30 , '计数判断' , '循环计算' , '等于' , '0' , '' , 160 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 31 , '计数判断' , '循环计算' , '等于' , '0' , '' , 161 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 32 , '计数判断' , '循环计算' , '等于' , '0' , '' , 104 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 33 , '计数判断' , '循环计算' , '等于' , '0' , '' , 164 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 34 , '计数判断' , '循环计算' , '等于' , '0' , '' , 342 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 35 , '计数判断' , '循环计算' , '等于' , '0' , '' , 350 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 36 , '计数判断' , '循环计算' , '等于' , '0' , '' , 352 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 37 , '计数判断' , '循环计算' , '等于' , '0' , '' , 353 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 38 , '计数判断' , '循环计算' , '等于' , '0' , '' , 354 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 39 , '计数判断' , '循环计算' , '等于' , '0' , '' , 128 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 40 , '计数判断' , '循环计算' , '等于' , '0' , '' , 149 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 41 , '计数判断' , '循环计算' , '等于' , '0' , '' , 148 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 42 , '计数判断' , '循环计算' , '等于' , '0' , '' , 130 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 43 , '计数判断' , '循环计算' , '等于' , '0' , '' , 129 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 44 , '计数判断' , '循环计算' , '等于' , '0' , '' , 100 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 45 , '计数判断' , '循环计算' , '等于' , '0' , '' , 99 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 46 , '计数判断' , '循环计算' , '等于' , '0' , '' , 113 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 47 , '计数判断' , '循环计算' , '等于' , '0' , '' , 355 , 0 , '' )
 INSERT [ZL_LabelJude] ( [JudeID] , [Modeltypeinfo] , [addroot] , [setroot] , [Modelvalue] , [Valueroot] , [LabelID] , [IsOpen] , [FalseContent] ) VALUES ( 48 , '计数判断' , '循环计算' , '等于' , '0' , '' , 357 , 0 , '' )

 SET IDENTITY_INSERT [ZL_LabelJude] OFF

 SET IDENTITY_INSERT [ZL_Guestcate] ON

 INSERT [ZL_Guestcate] ( [Cateid] , [Catename] , [Permibit] , [NeedLog] ) VALUES ( 1 , '用户留言' , '' , 1 )
 INSERT [ZL_Guestcate] ( [Cateid] , [Catename] , [Permibit] , [NeedLog] ) VALUES ( 2 , '站长互动' , '' , 0 )
 INSERT [ZL_Guestcate] ( [Cateid] , [Catename] , [Permibit] , [NeedLog] ) VALUES ( 3 , '互动帮助' , '' , 1 )

 SET IDENTITY_INSERT [ZL_Guestcate] OFF

 INSERT [ZL_GroupModel] ( [GroupID] , [UserModel] ) VALUES ( 2 , 0 )
 INSERT [ZL_GroupModel] ( [GroupID] , [UserModel] ) VALUES ( 1 , 15 )

 SET IDENTITY_INSERT [ZL_Group] ON

 INSERT [ZL_Group] ( [GroupID] , [GroupName] , [OtherName] , [Description] , [RegSelect] , [IsDefault] , [CCountPerDay] , [FavCount] , [ConsumeType] , [UpGradeMoney] , [CompanyGroup] , [VIPNum] , [VIPGroup] , [RebateRate] ) VALUES ( 1 , '普通会员' , '普通' , '普通会员注册' , 1 , 1 , 0 , 0 , 0 , .0000 , 0 , 0 , 0 , 0.69999998807907104 )
 INSERT [ZL_Group] ( [GroupID] , [GroupName] , [OtherName] , [Description] , [RegSelect] , [IsDefault] , [CCountPerDay] , [FavCount] , [ConsumeType] , [UpGradeMoney] , [CompanyGroup] , [VIPNum] , [VIPGroup] , [RebateRate] ) VALUES ( 2 , '企业会员' , '企业' , '企业用户注册' , 1 , 0 , 0 , 0 , 0 , .0000 , 1 , 0 , 0 , 0.80000001192092896 )

 SET IDENTITY_INSERT [ZL_Group] OFF


 SET IDENTITY_INSERT [ZL_Grade] ON

 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 1 , 1 , 0 , '北京市' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 2 , 1 , 0 , '上海市' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 3 , 1 , 0 , '天津市' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 4 , 1 , 0 , '重庆市' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 5 , 1 , 0 , '河北省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 6 , 1 , 0 , '江苏省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 7 , 1 , 0 , '安徽省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 8 , 1 , 1 , '海淀区' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 9 , 1 , 1 , '朝阳区' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 10 , 1 , 7 , '合肥' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 11 , 1 , 7 , '安庆' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 12 , 1 , 7 , '蚌埠' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 13 , 1 , 7 , '巢湖' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 14 , 1 , 7 , '池州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 15 , 1 , 7 , '滁州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 16 , 1 , 7 , '阜阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 17 , 1 , 7 , '淮北' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 18 , 1 , 7 , '淮南' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 19 , 1 , 7 , '黄山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 20 , 1 , 7 , '六安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 21 , 1 , 7 , '马鞍山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 22 , 1 , 7 , '宿州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 23 , 1 , 7 , '铜陵' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 24 , 1 , 7 , '芜湖' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 25 , 1 , 7 , '宣城' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 26 , 1 , 7 , '亳州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 27 , 1 , 5 , '石家庄' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 28 , 1 , 5 , '保定' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 29 , 1 , 5 , '沧州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 30 , 1 , 5 , '承德' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 31 , 1 , 5 , '邯郸' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 32 , 1 , 5 , '衡水' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 33 , 1 , 5 , '廊坊' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 34 , 1 , 5 , '秦皇岛' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 35 , 1 , 5 , '唐山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 36 , 1 , 5 , '邢台' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 37 , 1 , 5 , '张家口' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 38 , 1 , 6 , '南京' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 39 , 1 , 6 , '常州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 40 , 1 , 6 , '淮安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 41 , 1 , 6 , '连云港' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 42 , 1 , 6 , '南通' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 43 , 1 , 6 , '苏州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 44 , 1 , 6 , '宿迁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 45 , 1 , 6 , '泰州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 46 , 1 , 6 , '无锡' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 47 , 1 , 6 , '徐州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 48 , 1 , 6 , '盐城' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 49 , 1 , 6 , '扬州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 50 , 1 , 6 , '镇江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 51 , 1 , 0 , '福建省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 52 , 1 , 51 , '福州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 53 , 1 , 51 , '龙岩' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 54 , 1 , 51 , '南平' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 55 , 1 , 51 , '宁德' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 56 , 1 , 51 , '莆田' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 57 , 1 , 51 , '泉州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 58 , 1 , 51 , '三明' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 59 , 1 , 51 , '厦门' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 60 , 1 , 51 , '漳州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 61 , 1 , 0 , '甘肃省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 62 , 1 , 61 , '兰州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 63 , 1 , 61 , '白银' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 64 , 1 , 61 , '定西' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 65 , 1 , 61 , '甘南藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 66 , 1 , 61 , '嘉峪关' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 67 , 1 , 61 , '金昌' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 68 , 1 , 61 , '酒泉' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 69 , 1 , 61 , '临夏回族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 70 , 1 , 61 , '陇南' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 71 , 1 , 61 , '淮南' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 72 , 1 , 61 , '平凉' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 73 , 1 , 61 , '庆阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 74 , 1 , 61 , '天水' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 75 , 1 , 61 , '武威' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 76 , 1 , 61 , '张掖' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 77 , 1 , 0 , '广东省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 78 , 1 , 77 , '深圳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 79 , 1 , 77 , '潮州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 80 , 1 , 77 , '东莞' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 81 , 1 , 77 , '佛山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 82 , 1 , 77 , '广州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 83 , 1 , 77 , '河源' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 84 , 1 , 77 , '惠州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 85 , 1 , 77 , '江门' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 86 , 1 , 77 , '揭阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 87 , 1 , 77 , '茂名' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 89 , 1 , 77 , '梅州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 90 , 1 , 77 , '清远' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 91 , 1 , 77 , '汕头' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 92 , 1 , 77 , '汕尾' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 93 , 1 , 77 , '韶关' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 94 , 1 , 77 , '阳江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 95 , 1 , 77 , '云浮' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 96 , 1 , 77 , '湛江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 98 , 1 , 77 , '肇庆' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 99 , 1 , 77 , '中山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 100 , 1 , 77 , '珠海' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 101 , 1 , 0 , '广西省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 102 , 1 , 101 , '南宁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 103 , 1 , 101 , '百色' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 104 , 1 , 101 , '北海' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 105 , 1 , 101 , '崇左' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 106 , 1 , 101 , '防城港' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 107 , 1 , 101 , '桂林' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 108 , 1 , 101 , '贵港' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 109 , 1 , 101 , '河池' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 110 , 1 , 101 , '贺州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 111 , 1 , 101 , '来宾' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 112 , 1 , 101 , '柳州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 113 , 1 , 101 , '钦州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 114 , 1 , 101 , '梧州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 115 , 1 , 101 , '玉林' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 116 , 1 , 0 , '贵州省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 117 , 1 , 116 , '贵阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 118 , 1 , 116 , '安顺' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 119 , 1 , 116 , '毕节' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 120 , 1 , 116 , '六盘水' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 121 , 1 , 116 , '黔东南苗族侗族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 122 , 1 , 116 , '黔南布依族苗族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 123 , 1 , 116 , '黔西南布依族苗族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 124 , 1 , 116 , '遵义' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 125 , 1 , 0 , '海南省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 126 , 1 , 125 , '海口' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 127 , 1 , 125 , '白沙黎族自治县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 128 , 1 , 125 , '保亭黎族苗族自治县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 129 , 1 , 125 , '昌江黎族自治县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 130 , 1 , 125 , '澄迈县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 131 , 1 , 125 , '定安县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 132 , 1 , 125 , '东方' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 133 , 1 , 125 , '乐东黎族自治县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 134 , 1 , 125 , '临高县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 135 , 1 , 125 , '陵水黎族自治县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 136 , 1 , 125 , '琼海' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 137 , 1 , 125 , '琼中黎族苗族自治县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 138 , 1 , 125 , '三亚' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 139 , 1 , 125 , '屯昌县' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 140 , 1 , 125 , '万宁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 141 , 1 , 125 , '文昌' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 142 , 1 , 125 , '五指山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 143 , 1 , 125 , '儋州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 144 , 1 , 0 , '河北省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 145 , 1 , 144 , '保定' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 146 , 1 , 144 , '沧州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 147 , 1 , 144 , '承德' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 148 , 1 , 144 , '邯郸' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 149 , 1 , 144 , '衡水' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 150 , 1 , 144 , '廊坊' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 151 , 1 , 144 , '秦皇岛' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 152 , 1 , 144 , '唐山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 153 , 1 , 144 , '邢台' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 154 , 1 , 144 , '张家口' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 156 , 1 , 0 , '河南省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 157 , 1 , 156 , '郑州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 158 , 1 , 156 , '安阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 159 , 1 , 156 , '鹤壁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 160 , 1 , 156 , '济源' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 161 , 1 , 156 , '焦作' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 162 , 1 , 156 , '开封' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 163 , 1 , 156 , '洛阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 164 , 1 , 156 , '南阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 165 , 1 , 156 , '平顶山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 166 , 1 , 156 , '三门峡' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 167 , 1 , 156 , '商丘' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 168 , 1 , 156 , '新乡' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 169 , 1 , 156 , '信阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 170 , 1 , 156 , '许昌' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 171 , 1 , 156 , '周口' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 172 , 1 , 156 , '驻马店' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 173 , 1 , 156 , '漯河' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 174 , 1 , 156 , '濮阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 175 , 1 , 0 , '黑龙江' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 176 , 1 , 175 , '哈尔滨' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 177 , 1 , 175 , '大庆' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 178 , 1 , 175 , '大兴安岭' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 179 , 1 , 175 , '鹤岗' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 180 , 1 , 175 , '黑河' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 181 , 1 , 175 , '鸡西' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 182 , 1 , 175 , '佳木斯' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 183 , 1 , 175 , '牡丹江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 184 , 1 , 175 , '七台河' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 185 , 1 , 175 , '齐齐哈尔' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 186 , 1 , 175 , '双鸭山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 187 , 1 , 175 , '绥化' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 188 , 1 , 175 , '伊春' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 189 , 1 , 0 , '湖北省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 190 , 1 , 189 , '武汉' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 191 , 1 , 189 , '鄂州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 192 , 1 , 189 , '恩施土家族苗族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 193 , 1 , 189 , '黄冈' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 194 , 1 , 189 , '黄石' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 195 , 1 , 189 , '荆门' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 196 , 1 , 189 , '荆州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 197 , 1 , 189 , '潜江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 198 , 1 , 189 , '神农架林区' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 199 , 1 , 189 , '十堰' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 200 , 1 , 189 , '随州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 201 , 1 , 189 , '天门' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 202 , 1 , 189 , '仙桃' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 203 , 1 , 189 , '咸宁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 204 , 1 , 189 , '襄樊' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 205 , 1 , 189 , '襄樊' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 206 , 1 , 189 , '宜昌' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 207 , 1 , 0 , '湖南省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 208 , 1 , 207 , '长沙' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 209 , 1 , 207 , '常德' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 210 , 1 , 207 , '郴州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 211 , 1 , 207 , '衡阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 212 , 1 , 207 , '娄底' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 213 , 1 , 207 , '邵阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 214 , 1 , 207 , '湘潭' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 215 , 1 , 207 , '湘西土家族苗族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 216 , 1 , 207 , '益阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 217 , 1 , 207 , '永州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 218 , 1 , 207 , '岳阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 219 , 1 , 207 , '张家界' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 220 , 1 , 207 , '株洲' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 221 , 1 , 0 , '吉林省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 222 , 1 , 221 , '白城' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 223 , 1 , 221 , '白山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 224 , 1 , 221 , '长春' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 225 , 1 , 221 , '辽源' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 226 , 1 , 221 , '四平' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 227 , 1 , 221 , '松原' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 228 , 1 , 221 , '通化' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 229 , 1 , 221 , '延边朝鲜族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 230 , 1 , 0 , '江西省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 231 , 1 , 230 , '南昌' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 232 , 1 , 230 , '九江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 233 , 1 , 230 , '抚州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 234 , 1 , 230 , '赣州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 235 , 1 , 230 , '吉安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 236 , 1 , 230 , '景德镇' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 237 , 1 , 230 , '萍乡' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 238 , 1 , 230 , '上饶' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 239 , 1 , 230 , '新余' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 240 , 1 , 230 , '宜春' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 241 , 1 , 230 , '鹰潭' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 242 , 1 , 0 , '辽宁省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 243 , 1 , 242 , '沈阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 244 , 1 , 242 , '鞍山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 245 , 1 , 242 , '本溪' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 246 , 1 , 242 , '朝阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 247 , 1 , 242 , '大连' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 248 , 1 , 242 , '丹东' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 249 , 1 , 242 , '抚顺' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 250 , 1 , 242 , '阜新' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 251 , 1 , 242 , '葫芦岛' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 252 , 1 , 242 , '锦州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 253 , 1 , 242 , '辽阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 254 , 1 , 242 , '盘锦' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 255 , 1 , 242 , '铁岭' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 256 , 1 , 242 , '营口' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 257 , 1 , 0 , '内蒙古' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 258 , 1 , 257 , '包头' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 259 , 1 , 257 , '阿拉善盟' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 261 , 1 , 257 , '巴彦淖尔盟' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 262 , 1 , 257 , '赤峰' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 263 , 1 , 257 , '鄂尔多斯' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 264 , 1 , 257 , '呼和浩特' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 265 , 1 , 257 , '呼伦贝尔' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 266 , 1 , 257 , '通辽' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 267 , 1 , 257 , '乌海' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 268 , 1 , 257 , '乌兰察布盟' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 269 , 1 , 257 , '锡林郭勒盟' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 270 , 1 , 257 , '兴安盟' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 271 , 1 , 0 , '宁夏' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 272 , 1 , 271 , '银川' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 273 , 1 , 271 , '固原' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 274 , 1 , 271 , '石嘴山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 275 , 1 , 271 , '吴忠' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 276 , 1 , 0 , '青海省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 277 , 1 , 276 , '西宁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 278 , 1 , 276 , '果洛藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 279 , 1 , 276 , '海北藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 280 , 1 , 276 , '海南藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 281 , 1 , 276 , '海西蒙古族藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 282 , 1 , 276 , '黄南藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 283 , 1 , 276 , '玉树藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 284 , 1 , 0 , '山东省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 285 , 1 , 284 , '济南' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 286 , 1 , 284 , '滨州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 287 , 1 , 284 , '德州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 288 , 1 , 284 , '东营' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 289 , 1 , 284 , '菏泽' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 290 , 1 , 284 , '济宁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 291 , 1 , 284 , '莱芜' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 292 , 1 , 284 , '聊城' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 293 , 1 , 284 , '临沂' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 294 , 1 , 284 , '青岛' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 295 , 1 , 284 , '日照' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 296 , 1 , 284 , '泰安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 297 , 1 , 284 , '威海' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 298 , 1 , 284 , '潍坊' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 299 , 1 , 284 , '烟台' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 300 , 1 , 284 , '枣庄' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 301 , 1 , 284 , '淄博' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 302 , 1 , 0 , '山西省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 303 , 1 , 302 , '太原' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 304 , 1 , 302 , '长治' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 305 , 1 , 302 , '大同' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 306 , 1 , 302 , '晋城' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 307 , 1 , 302 , '晋中' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 308 , 1 , 302 , '临汾' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 309 , 1 , 302 , '吕梁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 310 , 1 , 302 , '朔州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 311 , 1 , 302 , '忻州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 312 , 1 , 302 , '阳泉' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 313 , 1 , 302 , '运城' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 314 , 1 , 0 , '陕西省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 315 , 1 , 314 , '西安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 316 , 1 , 314 , '安康' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 317 , 1 , 314 , '宝鸡' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 318 , 1 , 314 , '汉中' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 319 , 1 , 314 , '商洛' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 320 , 1 , 314 , '铜川' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 321 , 1 , 314 , '渭南' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 322 , 1 , 314 , '咸阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 323 , 1 , 314 , '延安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 324 , 1 , 314 , '榆林' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 325 , 1 , 2 , '上海' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 326 , 1 , 0 , '四川省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 327 , 1 , 326 , '成都' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 328 , 1 , 326 , '阿坝藏族羌族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 329 , 1 , 326 , '巴中' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 330 , 1 , 326 , '达州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 331 , 1 , 326 , '德阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 332 , 1 , 326 , '甘孜藏族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 333 , 1 , 326 , '广安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 334 , 1 , 326 , '广元' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 335 , 1 , 326 , '乐山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 336 , 1 , 326 , '凉山彝族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 337 , 1 , 326 , '眉山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 338 , 1 , 326 , '绵阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 339 , 1 , 326 , '南充' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 340 , 1 , 326 , '内江' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 341 , 1 , 326 , '攀枝花' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 342 , 1 , 326 , '遂宁' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 343 , 1 , 326 , '雅安' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 344 , 1 , 326 , '宜宾' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 345 , 1 , 326 , '资阳' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 346 , 1 , 326 , '自贡' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 347 , 1 , 326 , '泸州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 348 , 1 , 3 , '天津' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 349 , 1 , 0 , '西藏' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 350 , 1 , 349 , '拉萨' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 351 , 1 , 349 , '阿里' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 352 , 1 , 349 , '昌都' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 353 , 1 , 349 , '林芝' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 354 , 1 , 349 , '那曲' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 355 , 1 , 349 , '日喀则' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 356 , 1 , 349 , '山南' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 357 , 1 , 0 , '新疆' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 358 , 1 , 357 , '乌鲁木齐' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 359 , 1 , 357 , '阿克苏' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 361 , 1 , 357 , '巴音郭楞蒙古自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 362 , 1 , 357 , '博尔塔拉蒙古自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 363 , 1 , 357 , '昌吉回族自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 364 , 1 , 357 , '哈密' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 365 , 1 , 357 , '和田' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 366 , 1 , 357 , '喀什' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 367 , 1 , 357 , '克拉玛依' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 368 , 1 , 357 , '克孜勒苏柯尔克孜自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 369 , 1 , 357 , '石河子' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 370 , 1 , 357 , '图木舒克' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 371 , 1 , 357 , '吐鲁番' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 372 , 1 , 357 , '五家渠' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 373 , 1 , 357 , '伊犁哈萨克自治州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 374 , 1 , 0 , '浙江省' , 1 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 375 , 1 , 374 , '杭州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 376 , 1 , 374 , '湖州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 377 , 1 , 374 , '嘉兴' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 378 , 1 , 374 , '金华' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 379 , 1 , 374 , '丽水' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 380 , 1 , 374 , '宁波' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 381 , 1 , 374 , '绍兴' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 382 , 1 , 374 , '台州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 383 , 1 , 374 , '温州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 384 , 1 , 374 , '舟山' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 385 , 1 , 374 , '衢州' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 386 , 1 , 4 , '重庆' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 387 , 1 , 1 , '丰台区' , 2 )
 INSERT [ZL_Grade] ( [GradeID] , [Cate] , [ParentID] , [GradeName] , [Grade] ) VALUES ( 388 , 1 , 1 , '通州区' , 2 )

 SET IDENTITY_INSERT [ZL_Grade] OFF

 SET IDENTITY_INSERT [ZL_Duser] ON

 INSERT [ZL_Duser] ( [Duserid] , [DuShow] , [Dbooth] , [Dmetier] , [Dcorp] , [Daddress] , [Dphone] , [Dmobile] , [Dfax] , [DEmail] , [Dmessage] , [Dexpiry] , [Dactiva] , [Dscene] , [Dislogin] , [DtopicTime] , [Dutype] , [Dupicnum] , [DendLogtime] , [Duid] , [DNewInfo] , [Dlogo] ) VALUES ( 1 , 0 , '' , '' , '' , '' , '' , '' , '' , 'admin@admin.com' , 0 , '9999-12-31 23:59:59.000' , 1 , 0 , 0 , '2009-05-09 11:04:51.000' , 0 , 20 , '2010-06-19 12:08:31.000' , 1 , '' , '' )

 SET IDENTITY_INSERT [ZL_Duser] OFF


 SET IDENTITY_INSERT [ZL_DShowUser] ON

 INSERT [ZL_DShowUser] ( [D_Sid] , [D_ShowUserid] , [D_ShowX] , [D_ShowY] , [DupdateTime] , [D_Remark] , [D_ShopID] ) VALUES ( 1 , 1 , 39 , 26 , '2010-06-19 12:19:34.343' , '' , 0 )

 SET IDENTITY_INSERT [ZL_DShowUser] OFF

 SET IDENTITY_INSERT [ZL_Defray] ON

 INSERT [ZL_Defray] ( [flow] , [Pay_name] , [Pay_intf] , [Client_id] , [Title] , [money_code] , [number] ) VALUES ( 2 , 'Paypal或Visa,Master,Solo等银行卡在线支付' , 'PayPal外贸必选(标准版)' , 'server@hx008.cn' , 'zoomla' , 'CNY,USD,EUR,GBP,CAD,AUD,NZD,RUB,HKD,TWD,KRW,SGD,JPY,MYR,CHF,SEK,DKK,PLZ,HUF,CSK,' , 'p*0.05' )

 SET IDENTITY_INSERT [ZL_Defray] OFF

 SET IDENTITY_INSERT [ZL_Datadiccategory] ON

 INSERT [ZL_Datadiccategory] ( [Diccateid] , [Categoryname] , [Isused] ) VALUES ( 1 , '地区选择' , 1 )
 INSERT [ZL_Datadiccategory] ( [Diccateid] , [Categoryname] , [Isused] ) VALUES ( 2 , '学历信息' , 1 )
 INSERT [ZL_Datadiccategory] ( [Diccateid] , [Categoryname] , [Isused] ) VALUES ( 3 , '从事行业' , 1 )

 SET IDENTITY_INSERT [ZL_Datadiccategory] OFF


 SET IDENTITY_INSERT [ZL_Datadic] ON

 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 1 , 1 , '北京' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 2 , 1 , '上海' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 3 , 1 , '天津' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 4 , 1 , '重庆' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 5 , 1 , '江苏' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 6 , 1 , '浙江' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 7 , 1 , '广东' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 8 , 1 , '海南' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 9 , 1 , '福建' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 10 , 1 , '山东' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 11 , 1 , '江西' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 12 , 1 , '四川' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 13 , 1 , '安徽' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 14 , 1 , '河北' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 15 , 1 , '河南' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 16 , 1 , '湖北' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 17 , 1 , '湖南' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 18 , 1 , '陕西' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 19 , 1 , '山西' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 20 , 1 , '黑龙' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 21 , 1 , '辽宁' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 22 , 1 , '吉林' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 23 , 1 , '广西' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 24 , 1 , '云南' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 25 , 1 , '贵州' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 26 , 1 , '甘肃' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 27 , 1 , '内蒙' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 28 , 1 , '宁夏' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 29 , 1 , '西藏' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 30 , 1 , '新疆' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 31 , 1 , '青海' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 32 , 1 , '香港' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 33 , 1 , '澳门' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 34 , 1 , '台湾' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 35 , 1 , '国外' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 36 , 2 , '在读学生' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 37 , 2 , '应届毕业生' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 38 , 2 , '一年以上' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 39 , 2 , '二年以上' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 40 , 2 , '三年以上' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 41 , 2 , '五年以上' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 42 , 2 , '八年以上' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 43 , 2 , '十年以上' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 44 , 3 , '计算机硬件' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 45 , 3 , '计算机软件' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 46 , 3 , '互联网开发及应用' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 47 , 3 , 'IT-管理' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 48 , 3 , 'IT-品管' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 49 , 3 , '技术支持及其它' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 50 , 3 , '通信技术' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 51 , 3 , '销售管理' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 52 , 3 , '销售人员' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 53 , 3 , '销售行政及商务' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 54 , 3 , '客服及技术支持' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 55 , 3 , '银行' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 56 , 3 , '保险' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 57 , 3 , '质量安全管理' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 58 , 3 , '工程机械' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 59 , 3 , '能源' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 60 , 3 , '汽车' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 61 , 3 , '技工' , 1 )
 INSERT [ZL_Datadic] ( [Dicid] , [Diccate] , [Dicname] , [Isused] ) VALUES ( 62 , 3 , '服装' , 1 )

 SET IDENTITY_INSERT [ZL_Datadic] OFF


 SET IDENTITY_INSERT [ZL_Node] ON

 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 1 , '文章中心' , 1 , 'artcile' , '/artcile/index.html' , '' , '' , 0 , 2 , 6 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/频道首页/多列并排频道首页.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 2 , '在线商城' , 1 , 'shop' , '' , '' , '' , 0 , 8 , 1 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/频道首页/商城频道首页.html' , '' , '' , '' , '6' , 0 , 2 , 3 , 3 , 1 , 2 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 3 , '网店频道' , 1 , 'mall' , '' , '' , '' , 0 , 7 , 10 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/频道首页/商城频道首页.html' , '' , '' , '' , '' , 0 , 2 , 3 , 3 , 1 , 0 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 8 , '男人' , 1 , 'NR' , '' , '' , '' , 3 , 1 , 5 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 9 , '女人' , 1 , 'NR' , '' , '' , '' , 3 , 2 , 1 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 10 , '服饰' , 1 , 'FS' , '' , '' , '' , 3 , 3 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 11 , '美容' , 1 , 'MR' , '' , '' , '' , 3 , 4 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 12 , '美容' , 1 , 'MR' , '' , '' , '' , 3 , 5 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 13 , '时尚' , 1 , 'SS' , '' , '' , '' , 3 , 6 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 15 , '母婴' , 1 , 'MY' , '' , '' , '' , 3 , 8 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 16 , '手机数码' , 1 , 'SJSM' , '' , '' , '' , 3 , 9 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 17 , '运动' , 1 , 'YD' , '' , '' , '' , 3 , 10 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 18 , '机票/酒店' , 1 , 'JPJD' , '' , '' , '' , 3 , 11 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 19 , '运动/户外/健身 ' , 1 , '' , '' , '' , '' , 8 , 1 , 10 , 3 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 20 , '男装/T恤/衬衫 ' , 1 , '' , '' , '' , '' , 8 , 2 , 12 , 3 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 21 , '休闲裤/牛仔裤/内衣 ' , 1 , '' , '' , '' , '' , 8 , 3 , 9 , 3 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 22 , '男鞋/休闲鞋/皮鞋 ' , 1 , '' , '' , '' , '' , 8 , 4 , 9 , 3 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 23 , '男女箱包/出门配件 ' , 1 , '' , '' , '' , '' , 8 , 5 , 10 , 3 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 24 , '女鞋' , 1 , 'shoes' , '' , '' , '' , 9 , 1 , 0 , 3 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 25 , '耐克' , 1 , 'NK' , '' , '' , '' , 19 , 1 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 26 , '彪马' , 1 , 'BM' , '' , '' , '' , 19 , 2 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 27 , '李宁' , 1 , 'LN' , '' , '' , '' , 19 , 3 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 28 , '阿迪' , 1 , 'AD' , '' , '' , '' , 19 , 4 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 29 , '匡威' , 1 , 'KW' , '' , '' , '' , 19 , 5 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 30 , 'Kappa' , 1 , 'KAPPA' , '' , '' , '' , 19 , 6 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 31 , '运动套装' , 1 , 'YDTZ' , '' , '' , '' , 19 , 7 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 32 , '专柜代购' , 1 , 'ZGDG' , '' , '' , '' , 19 , 8 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 33 , '08款' , 1 , 'K08' , '' , '' , '' , 19 , 9 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 34 , '三叶草' , 1 , 'SYC' , '' , '' , '' , 19 , 10 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 35 , 'T恤' , 1 , 'TX' , '' , '' , '' , 20 , 1 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 36 , '衬衫' , 1 , 'CS' , '' , '' , '' , 20 , 2 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 37 , 'polo衫' , 1 , 'POLOS' , '' , '' , '' , 20 , 3 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 38 , '纯棉' , 1 , 'CM' , '' , '' , '' , 20 , 4 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 39 , '夹克' , 1 , 'JK' , '' , '' , '' , 20 , 5 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 40 , '马甲' , 1 , 'MJ' , '' , '' , '' , 20 , 6 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 41 , '秋装' , 1 , 'QZ' , '' , '' , '' , 20 , 7 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 42 , '西装' , 1 , 'XZ' , '' , '' , '' , 20 , 8 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 43 , '卫衣' , 1 , 'WY' , '' , '' , '' , 20 , 9 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 44 , '外套' , 1 , 'WT' , '' , '' , '' , 20 , 10 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 45 , 'jack' , 1 , 'JACK' , '' , '' , '' , 20 , 11 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 46 , 'jones' , 1 , 'JONES' , '' , '' , '' , 20 , 12 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 47 , '直筒裤' , 1 , 'ZTK' , '' , '' , '' , 21 , 1 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 48 , '牛仔裤' , 1 , 'NZK' , '' , '' , '' , 21 , 2 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 49 , '休闲裤' , 1 , 'XXK' , '' , '' , '' , 21 , 3 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 50 , '休闲西裤' , 1 , 'XXXK' , '' , '' , '' , 21 , 4 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 51 , '工装裤' , 1 , 'GZK' , '' , '' , '' , 21 , 5 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 52 , '短裤' , 1 , 'DK' , '' , '' , '' , 21 , 6 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 53 , '新款秋裤' , 1 , 'XKQK' , '' , '' , '' , 21 , 7 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 54 , 'ck内裤' , 1 , 'CKNK' , '' , '' , '' , 21 , 8 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 55 , '内衣' , 1 , 'NY' , '' , '' , '' , 21 , 9 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 56 , '帆布鞋' , 1 , 'FBX' , '' , '' , '' , 22 , 1 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 57 , '运动鞋' , 1 , 'YDX' , '' , '' , '' , 22 , 2 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 58 , '休闲鞋' , 1 , 'XXX' , '' , '' , '' , 22 , 3 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 59 , '热卖男鞋' , 1 , 'RMNX' , '' , '' , '' , 22 , 4 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 60 , '皮鞋' , 1 , 'PX' , '' , '' , '' , 22 , 5 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 61 , '男靴' , 1 , 'NX' , '' , '' , '' , 22 , 6 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 62 , '篮球鞋' , 1 , 'LQX' , '' , '' , '' , 22 , 7 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 63 , '户外靴' , 1 , 'HWX' , '' , '' , '' , 22 , 8 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 64 , '板鞋' , 1 , 'BX' , '' , '' , '' , 22 , 9 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 65 , '斜挎包' , 1 , 'XKB' , '' , '' , '' , 23 , 1 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 66 , '手提包' , 1 , 'STB' , '' , '' , '' , 23 , 2 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 67 , '休闲包' , 1 , 'XXB' , '' , '' , '' , 23 , 3 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 68 , '单肩包' , 1 , 'DJB' , '' , '' , '' , 23 , 4 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 69 , '爱车族' , 1 , 'ACZ' , '' , '' , '' , 23 , 5 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 70 , '汽车坐垫' , 1 , 'QCZD' , '' , '' , '' , 23 , 6 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 71 , '皮带' , 1 , 'PD' , '' , '' , '' , 23 , 7 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 72 , '眼镜' , 1 , 'YJ' , '' , '' , '' , 23 , 8 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 73 , '饰品' , 1 , 'SP' , '' , '' , '' , 23 , 9 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 74 , '秋款帽' , 1 , 'QKM' , '' , '' , '' , 23 , 10 , 0 , 4 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '11' , 0 , 2 , 3 , 3 , 1 , 5 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 75 , '商城栏目' , 1 , 'calss' , '' , '' , '' , 2 , 1 , 1 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/列表页/商城列表页.html' , '' , '' , '' , '6' , 0 , 2 , 3 , 3 , 1 , 2 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 76 , '网站公告' , 1 , 'Announce' , '/Announce/index.html' , '' , '' , 0 , 1 , 0 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/通用一列子栏目列表.html' , '' , '' , '' , '1,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , 'sdffasdsdfsafasd{SplitCustom}' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 77 , '网站帮助' , 1 , 'help' , '' , '' , '' , 0 , 9 , 0 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 78 , '公司信息' , 1 , 'news' , '' , '' , '' , 1 , 1 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 79 , '新闻动态' , 1 , 'stu' , '' , '' , '' , 1 , 2 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , 'asdfasfsafsa{SplitCustom}' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 80 , '国际新闻' , 1 , 'GJXW' , '' , '' , '' , 1 , 3 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 81 , '经典阅读' , 1 , 'JDYD' , '' , '' , '' , 1 , 4 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 82 , '海外文摘' , 1 , 'HWWZ' , '' , '' , '' , 1 , 5 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 83 , '奇闻轶事' , 1 , 'qi' , '' , '' , '' , 1 , 6 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '2,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 84 , '下载中心' , 1 , 'soft' , '' , '' , '' , 0 , 3 , 6 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/通用资讯父栏目列表页.html' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 85 , '图库中心' , 1 , 'photo' , '' , '' , '' , 0 , 4 , 2 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/通用图库父栏目列表页.html' , '' , '' , '' , '3' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 86 , '在线视频' , 1 , 'Movie' , '' , '' , '' , 0 , 5 , 2 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/频道首页/视频频道首页.html' , '' , '' , '' , '7' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 87 , '人才招聘' , 1 , 'job' , '' , '' , '' , 0 , 6 , 0 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/频道首页/招聘频道首页.html' , '/内容页/招聘模型内容页.html' , '' , '' , '' , 0 , 2 , 3 , 3 , 1 , 0 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 88 , '友情链接' , 1 , 'Friendsite' , '' , '' , '' , 0 , 10 , 0 , 1 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '8' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 89 , '计算机资料' , 1 , 'JSJZL' , '' , '' , '' , 84 , 1 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 90 , '行业资料 ' , 1 , 'XYZL' , '' , '' , '' , 84 , 2 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 91 , '管理资料' , 1 , 'GLZL' , '' , '' , '' , 84 , 3 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 92 , '电子书籍' , 1 , 'DZSJ' , '' , '' , '' , 84 , 4 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 93 , '音乐下载' , 1 , 'YLXZ' , '' , '' , '' , 84 , 5 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 94 , '程序源码' , 1 , 'soft' , '' , '' , '' , 84 , 6 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '' , '' , '' , '' , '4,5' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 95 , '科技视频' , 1 , 'KJSP' , '' , '' , '' , 86 , 1 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '7' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 96 , '娱乐视频' , 1 , 'YLSP' , '' , '' , '' , 86 , 2 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '7' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '_self' , '_self' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 97 , '产品图库' , 1 , 'CPTK' , '' , '' , '' , 85 , 1 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '3' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )
 INSERT [ZL_Node] ( [NodeID] , [NodeName] , [NodeType] , [NodeDir] , [NodeUrl] , [NodeListUrl] , [Tips] , [ParentID] , [OrderID] , [Child] , [Depth] , [NodePicUrl] , [Description] , [Meta_Keywords] , [Meta_Description] , [OpenType] , [PurviewType] , [CommentType] , [HitsOfHot] , [ListTemplateFile] , [IndexTemplate] , [LastinfoTemplate] , [HotinfoTemplate] , [ProposeTemplate] , [ContentModel] , [ItemOpenType] , [ContentHtmlRule] , [ListPageHtmlEx] , [ContentFileEx] , [HtmlPosition] , [NodeListType] , [ConsumePoint] , [ConsumeType] , [ConsumeTime] , [ConsumeCount] , [Shares] , [Custom] , [OpenTypeTrue] , [ItemOpenTypeTrue] , [SafeGuard] , [NodeBySite] , [SiteConfige] , [Contribute] , [SiteContentAudit] , [AuditNodeList] , [AddPoint] , [AddMoney] , [ClickTimeout] ) VALUES ( 98 , '明星收藏' , 1 , 'MXSC' , '' , '' , '' , 85 , 2 , 0 , 2 , '' , '' , '' , '' , 0 , 0 , 0 , 0 , '' , '/栏目列表/一列式左小右大子栏目列表.html' , '' , '' , '' , '3' , 0 , 2 , 3 , 3 , 1 , 1 , 0 , 0 , 0 , 0 , 0.0 , '' , '0' , '0' , 0 , 0 , '' , 0 , 0 , '' , 0 , .0000 , 1 )

 SET IDENTITY_INSERT [ZL_Node] OFF


 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 1 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 1 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 76 , 1 , '/内容页/默认公告内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 77 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 77 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 78 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 78 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 79 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 79 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 80 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 80 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 82 , 2 , '/内容页/默认文章模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 82 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 85 , 3 , '/内容页/默认图库模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 81 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 81 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 83 , 2 , '/内容页/两列式标准内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 83 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 84 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 88 , 8 , '/内容页/默认友情链接内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 76 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 86 , 7 , '/内容页/默认视频模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 75 , 6 , '/内容页/默认商城模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 89 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 89 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 84 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 90 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 90 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 91 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 91 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 92 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 92 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 93 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 93 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 94 , 4 , '/内容页/默认下载模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 94 , 5 , '/内容页/默认转向链接模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 97 , 3 , '/内容页/默认图库模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 98 , 3 , '/内容页/默认图库模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 2 , 6 , '/内容页/默认商城模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 99 , 6 , '/内容页/默认商品模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 95 , 7 , '/内容页/默认视频模型内容页.html' )
 INSERT [ZL_Node_ModelTemplate] ( [NodeID] , [ModelID] , [Template] ) VALUES ( 96 , 7 , '/内容页/默认视频模型内容页.html' )

 SET IDENTITY_INSERT [ZL_NodeBindDroit] ON

 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 1 , 76 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 2 , 88 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 3 , 76 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 4 , 78 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 5 , 79 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 6 , 80 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 7 , 81 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 8 , 82 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 9 , 83 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 10 , 84 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 11 , 84 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 12 , 85 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 13 , 86 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 14 , 75 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 15 , 77 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 16 , 88 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 17 , 89 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 18 , 84 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 19 , 90 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 20 , 91 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 21 , 92 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 22 , 93 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 23 , 94 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 24 , 1 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 25 , 84 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 26 , 95 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 27 , 96 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 28 , 86 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 29 , 1 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 30 , 95 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 31 , 96 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 32 , 97 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 33 , 85 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 34 , 98 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 35 , 85 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 36 , 85 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 37 , 85 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 38 , 85 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 39 , 84 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 40 , 84 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 41 , 2 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 42 , 99 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 43 , 75 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 44 , 75 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 45 , 2 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 46 , 87 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 47 , 87 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 48 , 82 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 49 , 79 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 50 , 76 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 51 , 76 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 52 , 76 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 53 , 76 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 54 , 99 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 55 , 100 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 56 , 101 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 57 , 102 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 58 , 103 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 59 , 104 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 60 , 78 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 61 , 87 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 62 , 3 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 63 , 78 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 64 , 78 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 65 , 79 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 66 , 80 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 67 , 81 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 68 , 83 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 69 , 77 , 0 )
 INSERT [ZL_NodeBindDroit] ( [ID] , [NodeID] , [FID] ) VALUES ( 70 , 78 , 0 )

 SET IDENTITY_INSERT [ZL_NodeBindDroit] OFF

 SET IDENTITY_INSERT [ZL_Role] ON

 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 1 , '超级管理员' , '拥有最高的权限' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 2 , '内容管理员' , '仅能管理与发布信息' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 3 , '商铺管理员' , '仅能拥有管理商铺与网店权限' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 4 , '商城管理员' , '仅具备商城管理权限' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 5 , '用户管理员' , '具备管理系统用户权限' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 6 , '网站设计师' , '仅能管理网站模板风格等权限,提供给设计师使用' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 7 , '黄页管理员' , '仅具备管理黄页的权限' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 8 , '配置管理员' , '具备管理系统节点、栏目、专题、广告等权限' , 0 )
 INSERT [ZL_Role] ( [RoleID] , [RoleName] , [Description] , [NodeID] ) VALUES ( 9 , '空间管理员' , '具备管理SNS空间的权限' , 0 )

 SET IDENTITY_INSERT [ZL_Role] OFF

INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ContentMange' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ContentEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ContentSpec' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ContentRecycle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ComentManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'CreateHtmL' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ModelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ModelEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ShopModelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ShopModelEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PageModelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'AddPageModel' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'NodeManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'NodeEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'SpecCateManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'SpecManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'TemplateManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'TemplateEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'CssManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'CssEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'LabelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'LabelEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'LabelImport' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'LabelExport' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'AdminManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'AdminEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'RoleMange' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'RoleEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserGroup' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserModel' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserModelField' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserRoleMange' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserRoleEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'MessManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'EmailManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ProductManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StockManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'AddStock' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'CartManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'OrderList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'BankRollList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'SaleList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PayList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'InvoiceList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'TotalSale' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ProductSale' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'CategotySale' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserOrders' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'UserExpenditure' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'DeliverType' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PageModel' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PageManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PageAudit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PageContent' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'PageStyle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'AddPageStyle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ApplyStoreStyle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ApplyStoreStyleAdd' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StoreManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StoreExamine' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StoreStyleManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StoreStyleAdd' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StoreProductManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'StoreinfoManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneConfig' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneApply' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneStyleManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneProductManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneParking' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneMoney' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneGS' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ZoneInfo' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'ADManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'SurveyManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'FileManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'AuthorManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'DownServerManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'SourceManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 1 , 'DicManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 2 , 'ContentMange' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 2 , 'ContentEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 2 , 'ContentSpec' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 2 , 'ContentRecycle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 2 , 'ComentManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 2 , 'CreateHtmL' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'ApplyStoreStyle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'ApplyStoreStyleAdd' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'StoreManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'StoreExamine' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'StoreStyleManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'StoreStyleAdd' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'StoreProductManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 3 , 'StoreinfoManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'ProductManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'StockManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'AddStock' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'CartManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'OrderList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'BankRollList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'SaleList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'PayList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'InvoiceList' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'TotalSale' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'ProductSale' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'CategotySale' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'UserOrders' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'UserExpenditure' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 4 , 'DeliverType' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'AdminManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'AdminEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'RoleMange' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'RoleEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'UserManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'UserGroup' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'UserModel' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'UserModelField' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'UserRoleMange' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'UserRoleEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'MessManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 5 , 'EmailManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'TemplateManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'TemplateEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'CssManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'CssEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'LabelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'LabelEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'LabelImport' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 6 , 'LabelExport' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'PageModelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'PageModel' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'PageManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'PageAudit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'PageContent' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'PageStyle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 7 , 'AddPageStyle' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'ModelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'ModelEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'ShopModelManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'ShopModelEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'ADManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'AddPageModel' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'NodeManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'NodeEdit' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'SpecCateManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'SpecManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'SurveyManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'FileManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'AuthorManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'DownServerManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'SourceManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 8 , 'DicManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneConfig' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneApply' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneStyleManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneProductManage' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneParking' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneMoney' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneGS' )
 INSERT [ZL_RolePermissions] ( [RoleID] , [OperateCode] ) VALUES ( 9 , 'ZoneInfo' )

 SET IDENTITY_INSERT [ZL_Search] ON

 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 1 , '会员管理' , 2 , 1 , '/manage/User/UserManage.aspx' , 1 , 1 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 2 , '系统配置' , 1 , 1 , '/manage/Config/SiteInfo.aspx' , 1 , 1 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 3 , '网站参数' , 1 , 1 , '/manage/Config/SiteOption.aspx' , 1 , 1 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 4 , '邮件配置' , 1 , 1 , '/manage/Config/MailConfig.aspx' , 1 , 1 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 5 , '水印设置' , 1 , 1 , '/manage/Config/ThumbConfig.aspx' , 1 , 1 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 6 , '广告管理' , 1 , 1 , '/manage/Plus/ADZoneManage.aspx' , 1 , 1 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 7 , 'CSDN' , 1 , 2 , 'http://www.csdn.net' , 1 , 2 , '1755-01-01 00:00:00.000' )
 INSERT [ZL_Search] ( [id] , [name] , [type] , [linkType] , [fileUrl] , [state] , [linkState] , [time] ) VALUES ( 8 , '逐浪技术论坛' , 1 , 2 , 'http://bbs.zoomla.cn' , 1 , 2 , '1755-01-01 00:00:00.000' )
 
 SET IDENTITY_INSERT [ZL_Search] OFF

 SET IDENTITY_INSERT [ZL_UserFriendGroup] ON

 INSERT [ZL_UserFriendGroup] ( [ID] , [UserID] , [GroupName] , [BlackGroup] , [OrderID] ) VALUES ( 1 , 1 , '黑名单' , 1 , 99 )
 INSERT [ZL_UserFriendGroup] ( [ID] , [UserID] , [GroupName] , [BlackGroup] , [OrderID] ) VALUES ( 2 , 1 , '默认分组' , 2 , 1 )

 SET IDENTITY_INSERT [ZL_UserFriendGroup] OFF

SET IDENTITY_INSERT [ZL_UserPromotions] ON

 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 1 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 47 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 2 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 56 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 3 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 65 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 4 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 19 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 5 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 75 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 6 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 76 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 7 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 78 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 8 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 89 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 9 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 95 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 10 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 82 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 11 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 82 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 12 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 79 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 13 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 79 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 14 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 76 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 15 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 78 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 16 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 87 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 17 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 87 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 18 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 3 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 19 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 3 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 20 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 80 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 21 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 80 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 22 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 81 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 23 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 81 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 24 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 83 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 25 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 83 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 26 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 77 )
 INSERT [ZL_UserPromotions] ( [pid] , [GroupID] , [look] , [addTo] , [Modify] , [Columns] , [Comments] , [Deleted] , [NodeID] ) VALUES ( 27 , 2 , 0 , 0 , 0 , 0 , 0 , 0 , 77 )

 SET IDENTITY_INSERT [ZL_UserPromotions] OFF

 SET IDENTITY_INSERT [ZL_PageTemplate] ON

 INSERT [ZL_PageTemplate] ( [TemplateID] , [TemplateName] , [TemplateUrl] , [TemplateType] , [OpenType] , [UserGroup] , [Addtime] , [IsTrue] , [Userid] , [UserName] , [OrderID] , [ParentID] , [Modelinfo] , [identifiers] , [NodeFileEx] , [ContentFileEx] , [Nodeimgurl] , [Nodeimgtext] , [Pagecontent] , [PageMetakeyword] , [PageMetakeyinfo] , [linkurl] , [linkimg] , [linktxt] ) VALUES ( 1 , '企业介绍' , '' , 2 , '_blank' , '1' , '2010-02-27 20:22:54.000' , 1 , 0 , '' , 0 , 0 , '12,' , 'QYJS' , 'html' , 'html' , '' , '' , '' , '' , '' , '' , '' , '' )
 INSERT [ZL_PageTemplate] ( [TemplateID] , [TemplateName] , [TemplateUrl] , [TemplateType] , [OpenType] , [UserGroup] , [Addtime] , [IsTrue] , [Userid] , [UserName] , [OrderID] , [ParentID] , [Modelinfo] , [identifiers] , [NodeFileEx] , [ContentFileEx] , [Nodeimgurl] , [Nodeimgtext] , [Pagecontent] , [PageMetakeyword] , [PageMetakeyinfo] , [linkurl] , [linkimg] , [linktxt] ) VALUES ( 2 , '产品发布' , '' , 2 , '_blank' , '1' , '2010-02-27 20:24:11.000' , 1 , 0 , '' , 0 , 0 , '12,' , 'CPFB' , 'html' , 'html' , 'product' , '' , '' , '' , '' , '' , '' , '' )

 SET IDENTITY_INSERT [ZL_PageTemplate] OFF

 SET IDENTITY_INSERT [ZL_GradeCate] ON

 INSERT [ZL_GradeCate] ( [CateID] , [CateName] , [Remark] , [GradeField] ) VALUES ( 1 , '省市二级联动' , '' , '省或直辖市|地级市' )

 SET IDENTITY_INSERT [ZL_GradeCate] OFF

--end