if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_albumcategories'))
begin
CREATE TABLE [dnt_albumcategories] (
	[albumcateid] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nchar] (50)  NOT NULL ,
	[description] [nchar] (300)  NULL ,
	[albumcount] [int] NOT NULL ,
	[displayorder] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_albums'))
begin
CREATE TABLE [dnt_albums] (
	[albumid] [int] IDENTITY (1, 1) NOT NULL ,
	[albumcateid] [int] NOT NULL ,
	[userid] [int] NOT NULL ,
	[username] [nchar] (20)  NOT NULL ,
	[title] [nchar] (50)  NOT NULL ,
	[description] [nchar] (200)  NOT NULL ,
	[logo] [nchar] (255)  NOT NULL ,
	[password] [nchar] (50)  NOT NULL ,
	[imgcount] [int] NOT NULL ,
	[views] [int] NOT NULL ,
	[type] [int] NOT NULL ,
	[createdatetime] [datetime] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_help'))
begin
CREATE TABLE [dnt_help] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nvarchar] (100)  NOT NULL ,
	[message] [ntext]  NULL ,
	[pid] [int] NOT NULL ,
	[orderby] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_myposts'))
begin
CREATE TABLE [dnt_myposts] (
	[uid] [int] NOT NULL ,
	[tid] [int] NOT NULL ,
	[pid] [int] NOT NULL ,
	[dateline] [smalldatetime] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_mytopics'))
begin
CREATE TABLE [dnt_mytopics] (
	[uid] [int] NOT NULL ,
	[tid] [int] NOT NULL ,
	[dateline] [smalldatetime] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_photocomments'))
begin
CREATE TABLE [dnt_photocomments] (
	[commentid] [int] IDENTITY (1, 1) NOT NULL ,
	[photoid] [int] NOT NULL ,
	[username] [nvarchar] (20)  NOT NULL ,
	[userid] [int] NOT NULL ,
	[ip] [varchar] (100)  NOT NULL ,
	[postdatetime] [smalldatetime] NOT NULL ,
	[content] [nvarchar] (2000)  NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_photos'))
begin
CREATE TABLE [dnt_photos] (
	[photoid] [int] IDENTITY (1, 1) NOT NULL ,
	[filename] [char] (255)  NOT NULL ,
	[attachment] [nchar] (255)  NOT NULL ,
	[filesize] [int] NOT NULL ,
	[title] [nchar] (20)  NOT NULL ,
	[description] [nchar] (200)  NOT NULL ,
	[postdate] [datetime] NOT NULL ,
	[albumid] [int] NOT NULL ,
	[userid] [int] NOT NULL ,
	[username] [nchar] (20)  NOT NULL ,
	[views] [int] NOT NULL ,
	[commentstatus] [tinyint] NOT NULL ,
	[tagstatus] [tinyint] NOT NULL ,
	[comments] [int] NOT NULL ,
	[isattachment] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_phototags'))
begin
CREATE TABLE [dnt_phototags] (
	[tagid] [int] NOT NULL ,
	[photoid] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spaceattachments'))
begin
CREATE TABLE [dnt_spaceattachments] (
	[aid] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NOT NULL ,
	[spacepostid] [int] NOT NULL ,
	[postdatetime] [datetime] NOT NULL ,
	[filename] [nchar] (100)  NOT NULL ,
	[filetype] [nchar] (50)  NOT NULL ,
	[filesize] [int] NOT NULL ,
	[attachment] [nchar] (100)  NOT NULL ,
	[downloads] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacecategories'))
begin
CREATE TABLE [dnt_spacecategories] (
	[categoryid] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nvarchar] (50)  NOT NULL ,
	[uid] [int] NOT NULL ,
	[description] [nvarchar] (1000)  NOT NULL ,
	[typeid] [int] NOT NULL ,
	[categorycount] [int] NOT NULL ,
	[displayorder] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacecomments'))
begin
CREATE TABLE [dnt_spacecomments] (
	[commentid] [int] IDENTITY (1, 1) NOT NULL ,
	[postid] [int] NOT NULL ,
	[author] [nvarchar] (50)  NOT NULL ,
	[email] [nvarchar] (100)  NOT NULL ,
	[url] [nvarchar] (255)  NOT NULL ,
	[ip] [varchar] (100)  NOT NULL ,
	[postdatetime] [smalldatetime] NOT NULL ,
	[content] [nvarchar] (2000)  NOT NULL ,
	[parentid] [int] NOT NULL ,
	[uid] [int] NOT NULL ,
	[posttitle] [nvarchar] (60)  NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spaceconfigs'))
begin
CREATE TABLE [dnt_spaceconfigs] (
	[spaceid] [int] IDENTITY (1, 1) NOT NULL ,
	[userid] [int] NOT NULL ,
	[spacetitle] [nchar] (100)  NOT NULL ,
	[description] [nchar] (200)  NOT NULL ,
	[blogdispmode] [tinyint] NOT NULL ,
	[bpp] [int] NOT NULL ,
	[commentpref] [tinyint] NOT NULL ,
	[messagepref] [tinyint] NOT NULL ,
	[rewritename] [char] (100)  NOT NULL ,
	[themeid] [int] NOT NULL ,
	[themepath] [nchar] (50)  NOT NULL ,
	[postcount] [int] NOT NULL ,
	[commentcount] [int] NOT NULL ,
	[visitedtimes] [int] NOT NULL ,
	[createdatetime] [smalldatetime] NOT NULL ,
	[updatedatetime] [smalldatetime] NOT NULL ,
	[defaulttab] [int] NOT NULL ,
	[status] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacecustomizepanels'))
begin
CREATE TABLE [dnt_spacecustomizepanels] (
	[moduleid] [int] NOT NULL ,
	[userid] [int] NOT NULL ,
	[panelcontent] [ntext]  NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacelinks'))
begin
CREATE TABLE [dnt_spacelinks] (
	[linkid] [int] IDENTITY (1, 1) NOT NULL ,
	[userid] [int] NOT NULL ,
	[linktitle] [nvarchar] (50)  NOT NULL ,
	[linkurl] [varchar] (255)  NOT NULL ,
	[description] [nvarchar] (200)  NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacemoduledefs'))
begin
CREATE TABLE [dnt_spacemoduledefs] (
	[moduledefid] [int] IDENTITY (1, 1) NOT NULL ,
	[modulename] [nvarchar] (20)  NOT NULL ,
	[cachetime] [int] NOT NULL ,
	[configfile] [varchar] (100)  NOT NULL ,
	[controller] [varchar] (255)  NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacemodules'))
begin
CREATE TABLE [dnt_spacemodules] (
	[moduleid] [int] NOT NULL ,
	[tabid] [int] NOT NULL ,
	[uid] [int] NOT NULL ,
	[moduledefid] [int] NOT NULL ,
	[panename] [varchar] (10)  NOT NULL ,
	[displayorder] [int] NOT NULL ,
	[userpref] [nvarchar] (4000)  NULL ,
	[val] [tinyint] NOT NULL ,
	[moduleurl] [varchar] (255)  NOT NULL ,
	[moduletype] [tinyint] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacepostcategories'))
begin
CREATE TABLE [dnt_spacepostcategories] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[postid] [int] NOT NULL ,
	[categoryid] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spaceposts'))
begin
CREATE TABLE [dnt_spaceposts] (
	[postid] [int] IDENTITY (1, 1) NOT NULL ,
	[author] [nvarchar] (40)  NOT NULL ,
	[uid] [int] NOT NULL ,
	[postdatetime] [datetime] NOT NULL ,
	[content] [ntext]  NOT NULL ,
	[title] [nvarchar] (120)  NOT NULL ,
	[category] [varchar] (255)  NOT NULL ,
	[poststatus] [tinyint] NOT NULL ,
	[commentstatus] [tinyint] NOT NULL ,
	[postupdatetime] [datetime] NOT NULL ,
	[commentcount] [int] NOT NULL ,
	[views] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spaceposttags'))
begin
CREATE TABLE [dnt_spaceposttags] (
	[tagid] [int] NOT NULL ,
	[spacepostid] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacetabs'))
begin
CREATE TABLE [dnt_spacetabs] (
	[tabid] [int] NOT NULL ,
	[uid] [int] NOT NULL ,
	[displayorder] [int] NOT NULL ,
	[tabname] [nvarchar] (50)  NOT NULL ,
	[iconfile] [varchar] (50)  NULL ,
	[template] [varchar] (50)  NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_spacethemes'))
begin
CREATE TABLE [dnt_spacethemes] (
	[themeid] [int] IDENTITY (1, 1) NOT NULL ,
	[directory] [varchar] (100)  NOT NULL ,
	[name] [nvarchar] (50)  NOT NULL ,
	[type] [int] NOT NULL ,
	[author] [nvarchar] (100)  NOT NULL ,
	[createdate] [nvarchar] (50)  NOT NULL ,
	[copyright] [nvarchar] (100)  NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_tags'))
begin
CREATE TABLE [dnt_tags] (
	[tagid] [int] NOT NULL ,
	[tagname] [nchar] (10)  NOT NULL ,
	[userid] [int] NOT NULL ,
	[postdatetime] [datetime] NOT NULL ,
	[orderid] [int] NOT NULL ,
	[color] [char] (6)  NOT NULL ,
	[count] [int] NOT NULL ,
	[fcount] [int] NOT NULL ,
	[pcount] [int] NOT NULL ,
	[scount] [int] NOT NULL ,
	[vcount] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_topicidentify'))
begin
CREATE TABLE [dnt_topicidentify] (
	[identifyid] [int] IDENTITY (1, 1) NOT NULL ,
	[name] [nvarchar] (50)  NOT NULL ,
	[filename] [varchar] (50)  NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_topictagcaches'))
begin
CREATE TABLE [dnt_topictagcaches] (
	[tid] [int] NOT NULL ,
	[linktid] [int] NOT NULL ,
	[linktitle] [nchar] (60)  NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_topictags'))
begin
CREATE TABLE [dnt_topictags] (
	[tagid] [int] NOT NULL ,
	[tid] [int] NOT NULL 
) ON [PRIMARY]
end
;

if not exists(select 1 from sysobjects where parent_obj=object_id('dnt_topictypes'))
begin
CREATE TABLE [dnt_topictypes] (
	[typeid] [int] IDENTITY (1, 1) NOT NULL ,
	[displayorder] [int] NOT NULL ,
	[name] [nvarchar] (30)  NOT NULL ,
	[description] [nvarchar] (500)  NOT NULL 
) ON [PRIMARY]
end
;

if exists (select * from dbo.sysobjects where id = object_id(N'[dnt_smilies]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dnt_smilies];
CREATE TABLE [dnt_smilies] (
	[id] [int] NOT NULL ,
	[displayorder] [int] NOT NULL ,
	[type] [int] NOT NULL ,
	[code] [nvarchar] (30)  NOT NULL ,
	[url] [varchar] (60)  NOT NULL 
) ON [PRIMARY]
;

ALTER TABLE [dnt_albumcategories] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_albumcategories] PRIMARY KEY  CLUSTERED 
	(
		[albumcateid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_albumcategories] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_albumcategories_albumcount] DEFAULT (0) FOR [albumcount],
	CONSTRAINT [DF_dnt_albumcategories_displayorder] DEFAULT (0) FOR [displayorder]
;

ALTER TABLE [dnt_albums] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacealbums] PRIMARY KEY  CLUSTERED 
	(
		[albumid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_albums] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacealbums_userid] DEFAULT ((-1)) FOR [userid],
	CONSTRAINT [DF_dnt_albums_username] DEFAULT ('') FOR [username],
	CONSTRAINT [DF_dnt_spacealbums_title] DEFAULT ('') FOR [title],
	CONSTRAINT [DF_dnt_spacealbums_description] DEFAULT ('') FOR [description],
	CONSTRAINT [DF_dnt_spacealbums_logo] DEFAULT ('') FOR [logo],
	CONSTRAINT [DF_dnt_spacealbums_password] DEFAULT ('') FOR [password],
	CONSTRAINT [DF_dnt_spacealbums_imgcount] DEFAULT (0) FOR [imgcount],
	CONSTRAINT [DF_dnt_spacealbums_views] DEFAULT (0) FOR [views],
	CONSTRAINT [DF_dnt_spacealbums_type] DEFAULT (0) FOR [type],
	CONSTRAINT [DF_dnt_spacealbums_createdatetime] DEFAULT (getdate()) FOR [createdatetime]
;

ALTER TABLE [dnt_help] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_help_orderby] DEFAULT (0) FOR [orderby]
;

ALTER TABLE [dnt_photocomments] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_photocomments_ip] DEFAULT ('') FOR [ip]
;

ALTER TABLE [dnt_photos] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacephoto] PRIMARY KEY  CLUSTERED 
	(
		[photoid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_photos] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacephoto_description] DEFAULT ('') FOR [description],
	CONSTRAINT [DF_dnt_spacephoto_postdate] DEFAULT (getdate()) FOR [postdate],
	CONSTRAINT [DF_dnt_photos_username] DEFAULT ('') FOR [username],
	CONSTRAINT [DF_dnt_photos_viewcount] DEFAULT (0) FOR [views],
	CONSTRAINT [DF_dnt_photos_commentstatus] DEFAULT (0) FOR [commentstatus],
	CONSTRAINT [DF_dnt_photos_tagstatus] DEFAULT (0) FOR [tagstatus],
	CONSTRAINT [DF_dnt_photos_comments] DEFAULT (0) FOR [comments],
	CONSTRAINT [DF_dnt_photos_isattachment] DEFAULT (0) FOR [isattachment]
;

ALTER TABLE [dnt_phototags] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_phototags_tagid] DEFAULT (0) FOR [tagid],
	CONSTRAINT [DF_Table3_pid] DEFAULT (0) FOR [photoid]
;
ALTER TABLE [dnt_spaceattachments] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spaceattachments] PRIMARY KEY  CLUSTERED 
	(
		[aid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spaceattachments] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spaceattachments_uid] DEFAULT (0) FOR [uid],
	CONSTRAINT [DF_dnt_spaceattachments_spacepostid] DEFAULT (0) FOR [spacepostid],
	CONSTRAINT [DF_dnt_spaceattachments_postdatetime] DEFAULT (getdate()) FOR [postdatetime],
	CONSTRAINT [DF_dnt_spaceattachments_filename] DEFAULT ('') FOR [filename],
	CONSTRAINT [DF_dnt_spaceattachments_filetype] DEFAULT ('') FOR [filetype],
	CONSTRAINT [DF_dnt_spaceattachments_filesize] DEFAULT (0) FOR [filesize],
	CONSTRAINT [DF_dnt_spaceattachments_attachment] DEFAULT ('') FOR [attachment],
	CONSTRAINT [DF_dnt_spaceattachments_downloads] DEFAULT (0) FOR [downloads]
;


ALTER TABLE [dnt_spacecategories] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacecategory] PRIMARY KEY  CLUSTERED 
	(
		[categoryid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spacecategories] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacecategory_title] DEFAULT ('') FOR [title],
	CONSTRAINT [DF_dnt_spacecategory_uid] DEFAULT (0) FOR [uid],
	CONSTRAINT [DF_dnt_spacecategorys_description] DEFAULT ('') FOR [description],
	CONSTRAINT [DF_dnt_spacecategory_typeid] DEFAULT (0) FOR [typeid],
	CONSTRAINT [DF_dnt_spacecategory_categorycount] DEFAULT (0) FOR [categorycount],
	CONSTRAINT [DF_dnt_spacecategory_displayorder] DEFAULT (0) FOR [displayorder]
;

ALTER TABLE [dnt_spacecomments] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacecomments] PRIMARY KEY  CLUSTERED 
	(
		[commentid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spacecomments] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacecomments_postid] DEFAULT (0) FOR [postid],
	CONSTRAINT [DF_dnt_spacecomments_author] DEFAULT ('') FOR [author],
	CONSTRAINT [DF_dnt_spacecomments_email] DEFAULT ('') FOR [email],
	CONSTRAINT [DF_dnt_spacecomments_url] DEFAULT ('') FOR [url],
	CONSTRAINT [DF_dnt_spacecomments_ip] DEFAULT ('') FOR [ip],
	CONSTRAINT [DF_dnt_spacecomments_postdatetime] DEFAULT (getdate()) FOR [postdatetime],
	CONSTRAINT [DF_dnt_spacecomments_content] DEFAULT ('') FOR [content]
;

ALTER TABLE [dnt_spaceconfigs] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spaceconfig] PRIMARY KEY  CLUSTERED 
	(
		[spaceid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spaceconfigs] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spaceconfig_spacetitle] DEFAULT ('') FOR [spacetitle],
	CONSTRAINT [DF_dnt_spaceconfig_description] DEFAULT ('') FOR [description],
	CONSTRAINT [DF_dnt_spaceconfig_blogdispmode] DEFAULT (0) FOR [blogdispmode],
	CONSTRAINT [DF_dnt_spaceconfig_bpp] DEFAULT (16) FOR [bpp],
	CONSTRAINT [DF_dnt_spaceconfig_commentpref] DEFAULT (0) FOR [commentpref],
	CONSTRAINT [DF_dnt_spaceconfig_messagepref] DEFAULT (0) FOR [messagepref],
	CONSTRAINT [DF_dnt_spaceconfig_rewritename] DEFAULT ('') FOR [rewritename],
	CONSTRAINT [DF_dnt_spaceconfig_theme] DEFAULT (0) FOR [themeid],
	CONSTRAINT [DF_dnt_spaceconfig_template] DEFAULT ('') FOR [themepath],
	CONSTRAINT [DF_dnt_spaceconfigs_postcount] DEFAULT (0) FOR [postcount],
	CONSTRAINT [DF_dnt_spaceconfigs_commentcount] DEFAULT (0) FOR [commentcount],
	CONSTRAINT [DF_dnt_spaceconfigs_visitedtimes] DEFAULT (0) FOR [visitedtimes],
	CONSTRAINT [DF_dnt_spaceconfigs_createdatetime] DEFAULT (getdate()) FOR [createdatetime],
	CONSTRAINT [DF_dnt_spaceconfigs_updatedatetime] DEFAULT (getdate()) FOR [updatedatetime],
	CONSTRAINT [DF_dnt_spaceconfigs_defaulttab] DEFAULT (0) FOR [defaulttab],
	CONSTRAINT [DF_dnt_spaceconfigs_status] DEFAULT (0) FOR [status]
;

ALTER TABLE [dnt_spacecustomizepanels] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacecustomizepanels] PRIMARY KEY  CLUSTERED 
	(
		[moduleid],
		[userid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spacecustomizepanels] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacecustomizepanels_panelcontent] DEFAULT ('') FOR [panelcontent]
;

ALTER TABLE [dnt_spacelinks] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacelink] PRIMARY KEY  CLUSTERED 
	(
		[linkid]
	)  ON [PRIMARY] 
;

ALTER TABLE [dnt_spacemoduledefs] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacemoduledefs] PRIMARY KEY  CLUSTERED 
	(
		[moduledefid]
	)  ON [PRIMARY] 
;

ALTER TABLE [dnt_spacemodules] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacemodules_uid] DEFAULT (0) FOR [uid]
;
ALTER TABLE [dnt_spacepostcategories] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacepostcategorys] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spacepostcategories] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spacepostcategorys_postid] DEFAULT (0) FOR [postid],
	CONSTRAINT [DF_dnt_spacepostcategorys_categoryid] DEFAULT (0) FOR [categoryid]
;

ALTER TABLE [dnt_spaceposts] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spaceposts] PRIMARY KEY  CLUSTERED 
	(
		[postid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_spaceposts] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spaceposts_views] DEFAULT (0) FOR [views]
;

ALTER TABLE [dnt_spaceposttags] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_spaceposttags_tagid] DEFAULT (0) FOR [tagid],
	CONSTRAINT [DF_dnt_spaceposttags_spacepostid] DEFAULT (0) FOR [spacepostid]
;

ALTER TABLE [dnt_spacethemes] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_spacethemes] PRIMARY KEY  CLUSTERED 
	(
		[themeid]
	)  ON [PRIMARY] 
;

ALTER TABLE [dnt_tags] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_tags] PRIMARY KEY  CLUSTERED 
	(
		[tagid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_tags] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_tags_userid] DEFAULT (0) FOR [userid],
	CONSTRAINT [DF_dnt_tags_orderid] DEFAULT (0) FOR [orderid],
	CONSTRAINT [DF_dnt_tags_count] DEFAULT (0) FOR [count],
	CONSTRAINT [DF_dnt_tags_fcount] DEFAULT (0) FOR [fcount],
	CONSTRAINT [DF_dnt_tags_pcount] DEFAULT (0) FOR [pcount],
	CONSTRAINT [DF_dnt_tags_scount] DEFAULT (0) FOR [scount],
	CONSTRAINT [DF_dnt_tags_vcount] DEFAULT (0) FOR [vcount]
;

ALTER TABLE [dnt_topicidentify] WITH NOCHECK ADD 
	CONSTRAINT [PK_dnt_topicidentify] PRIMARY KEY  CLUSTERED 
	(
		[identifyid]
	)  ON [PRIMARY] 
;
ALTER TABLE [dnt_topictagcaches] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_topictagcaches_tid] DEFAULT (0) FOR [tid],
	CONSTRAINT [DF_dnt_topictagcaches_linktid] DEFAULT (0) FOR [linktid]
;
ALTER TABLE [dnt_topictags] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_topictags_tagid] DEFAULT (0) FOR [tagid],
	CONSTRAINT [DF_dnt_topictags_tid] DEFAULT (0) FOR [tid]
;
ALTER TABLE [dnt_topictypes] WITH NOCHECK ADD 
	CONSTRAINT [DF_dnt_topictypes_displayorder] DEFAULT (0) FOR [displayorder],
	CONSTRAINT [DF_dnt_topictypes_name] DEFAULT ('') FOR [name],
	CONSTRAINT [DF_dnt_topictypes_description] DEFAULT ('') FOR [description]
;


 CREATE INDEX [albumid] ON [dnt_photos]([albumid]) ON [PRIMARY]
;

 CREATE INDEX [photoiduserid] ON [dnt_photos]([photoid], [userid]) ON [PRIMARY]
;

 CREATE INDEX [userid] ON [dnt_photos]([userid]) ON [PRIMARY]
;

 CREATE INDEX [tid] ON [dnt_spaceattachments]([spacepostid]) ON [PRIMARY]
;

 CREATE INDEX [uid] ON [dnt_spaceattachments]([uid]) ON [PRIMARY]
;

 CREATE INDEX [spacepostiduserid] ON [dnt_spaceattachments]([spacepostid], [uid]) ON [PRIMARY]
;

 CREATE UNIQUE  INDEX [userid] ON [dnt_spacecategories]([uid], [displayorder], [categoryid]) ON [PRIMARY]
;

 CREATE UNIQUE  INDEX [userid] ON [dnt_spaceconfigs]([userid]) ON [PRIMARY]
;

 CREATE INDEX [linkiduserid] ON [dnt_spacelinks]([linkid], [userid]) ON [PRIMARY]
;

 CREATE INDEX [configfile] ON [dnt_spacemoduledefs]([configfile]) ON [PRIMARY]
;

 CREATE INDEX [postiduid] ON [dnt_spaceposts]([postid], [uid]) ON [PRIMARY]
;

 CREATE INDEX [postidcommentcount] ON [dnt_spaceposts]([postid], [commentcount]) ON [PRIMARY]
;

 CREATE INDEX [uid] ON [dnt_spacetabs]([uid]) ON [PRIMARY]
;

 CREATE INDEX [type] ON [dnt_spacethemes]([type]) ON [PRIMARY]
;

 CREATE INDEX [msgtoid] ON [dnt_pms] ([msgtoid]) ON [PRIMARY]
;

ALTER TABLE [dnt_admingroups] ADD [allowviewrealname] [tinyint] NULL;
UPDATE [dnt_admingroups] SET [allowviewrealname] = 1;
ALTER TABLE [dnt_admingroups] ALTER column [allowviewrealname] [tinyint] NOT NULL;

EXEC sp_rename '[dnt_advertisements].[code]',  'code2',  'COLUMN';
ALTER TABLE [dnt_advertisements] ADD [code] [ntext] NOT NULL DEFAULT ('');
UPDATE [dnt_advertisements] SET [code]=[code2];
ALTER TABLE [dnt_advertisements] DROP COLUMN [code2];

EXEC sp_rename '[dnt_advertisements].[parameters]',  'parameters2',  'COLUMN';
ALTER TABLE [dnt_advertisements] ADD [parameters] [ntext] NOT NULL DEFAULT ('');
UPDATE [dnt_advertisements] SET [parameters]=[parameters2];
ALTER TABLE [dnt_advertisements] DROP COLUMN [parameters2];

ALTER TABLE [dnt_favorites] ADD [typeid] [tinyint] NOT NULL DEFAULT ('0');

ALTER TABLE [dnt_forumfields] ADD [applytopictype] [tinyint] NOT NULL DEFAULT ('0');
ALTER TABLE [dnt_forumfields] ADD [postbytopictype] [tinyint] NOT NULL DEFAULT ('0');
ALTER TABLE [dnt_forumfields] ADD [viewbytopictype] [tinyint] NOT NULL DEFAULT ('0');
ALTER TABLE [dnt_forumfields] ADD [topictypeprefix] [tinyint] NOT NULL DEFAULT ('0');
ALTER TABLE [dnt_forumfields] ADD [permuserlist] [ntext]  NULL;

ALTER TABLE [dnt_topics] ADD [identify] [int] NOT NULL DEFAULT ('0');
DECLARE @i varchar(500) SET @i='' SELECT @i=@i+' ALTER TABLE ['+b.name+'] DROP CONSTRAINT ['+d.name+']' FROM syscolumns a JOIN sysobjects b ON a.id=b.id JOIN syscomments c ON a.cdefault=c.id JOIN sysobjects d ON c.id=d.id WHERE b.name='dnt_topics' AND (a.name='identify') EXEC(@i);
ALTER TABLE [dnt_topics] WITH NOCHECK ADD CONSTRAINT [DF_dnt_topics_identify] DEFAULT ('0') FOR [identify];

ALTER TABLE [dnt_userfields] ADD [realname] [nvarchar] (10) NOT NULL DEFAULT ('');
ALTER TABLE [dnt_userfields] ADD [idcard] [varchar] (20) NOT NULL DEFAULT ('');
ALTER TABLE [dnt_userfields] ADD [mobile] [varchar] (20) NOT NULL DEFAULT ('');
ALTER TABLE [dnt_userfields] ADD [phone] [varchar] (20) NOT NULL DEFAULT ('');

ALTER TABLE [dnt_usergroups] ADD [allowspace] [smallint] NOT NULL DEFAULT ('0');
ALTER TABLE [dnt_usergroups] ADD [maxspaceattachsize] [int] NOT NULL DEFAULT ('0');
ALTER TABLE [dnt_usergroups] ADD [maxspacephotosize] [int] NOT NULL DEFAULT ('0');

ALTER TABLE [dnt_users] ADD [spaceid] [int] NOT NULL DEFAULT ('0');

DECLARE @s varchar(500) SET @s='' SELECT @s=@s+' ALTER TABLE ['+b.name+'] DROP CONSTRAINT ['+d.name+']' FROM syscolumns a JOIN sysobjects b ON a.id=b.id JOIN syscomments c ON a.cdefault=c.id JOIN sysobjects d ON c.id=d.id WHERE b.name='dnt_users' AND (a.name='newsletter') EXEC(@s);
ALTER TABLE [dnt_users] DROP COLUMN [newsletter];
ALTER TABLE [dnt_users] ADD [newsletter] [int] NOT NULL DEFAULT ('7');

INSERT INTO [dnt_spacethemes] VALUES ('', '默认皮肤', 0, 'Discuz!NT', '2007-08-23', 'Copyright 2007 Comsenz Inc.');
INSERT INTO [dnt_spacethemes] VALUES ('', '部落窝', 0, '部落窝', '2007-08-23', 'Copyright©2005-2007 BlogWorld. All rights reserved');
INSERT INTO [dnt_spacethemes] VALUES ('default', '默认皮肤', 1, 'Discuz!NT', '2007-08-23', 'Copyright 2007 Comsenz Inc.');
INSERT INTO [dnt_spacethemes] VALUES ('fadgirl', '时尚女孩', 1, 'Discuz!NT', '2007-08-23', 'Copyright 2007 Comsenz Inc.');
INSERT INTO [dnt_spacethemes] VALUES ('dream', '梦幻', 1, 'Discuz!NT', '2007-08-23', 'Copyright 2007 Comsenz Inc.');
INSERT INTO [dnt_spacethemes] VALUES ('patina', '古色古香', 1, 'Discuz!NT', '2007-08-23', 'Copyright 2007 Comsenz Inc.');
INSERT INTO [dnt_spacethemes] VALUES ('romantic', '浪漫传奇', 1, 'Discuz!NT', '2007-08-23', 'Copyright 2007 Comsenz Inc.');
INSERT INTO [dnt_spacethemes] VALUES ('window', '窗', 2, '部落窝', '2007-08-23', 'Copyright©2005-2007 BlogWorld. All rights reserved');
INSERT INTO [dnt_spacethemes] VALUES ('orange', '桔色', 2,  '部落窝', '2007-08-23', 'Copyright©2005-2007 BlogWorld. All rights reserved');
INSERT INTO [dnt_spacethemes] VALUES ('green', '幽静夜空', 2, '部落窝', '2007-08-23', 'Copyright©2005-2007 BlogWorld. All rights reserved');
INSERT INTO [dnt_spacethemes] VALUES ('bird', '山水麻雀', 2,  '部落窝', '2007-08-23', 'Copyright©2005-2007 BlogWorld. All rights reserved');
INSERT INTO [dnt_spacethemes] VALUES ('promise', '约定一生', 2,  '部落窝', '2007-08-23', 'Copyright©2005-2007 BlogWorld. All rights reserved');

INSERT INTO [dnt_spacemoduledefs] VALUES ('友情链接', 0, 'builtin_linkmodule.xml', 'Discuz.Space.Modules.LinkModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('个人信息', 0, 'builtin_userinfomodule.xml', 'Discuz.Space.Modules.builtin.forum.UserInfoModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('帖子调用', 0, 'builtin_showtopicmodule.xml', 'Discuz.Space.Modules.builtin.forum.ShowTopicModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('日历', 0, 'builtin_calendarmodule.xml', 'Discuz.Space.Modules.CalendarModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('用户菜单', 0, 'builtin_leftmenumodule.xml', 'Discuz.Space.Modules.LeftMenuModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('最新评论', 0, 'builtin_newcommentmodule.xml', 'Discuz.Space.Modules.NewCommentModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('最新文章', 0, 'builtin_newpostmodule.xml', 'Discuz.Space.Modules.NewPostModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('文章列表', 0, 'builtin_postlistmodule.xml', 'Discuz.Space.Modules.PostListModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('便条纸', 0, 'builtin_notepadmodule.xml', 'Discuz.Space.Modules.builtin.notepad, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('数据统计', 0, 'builtin_statisticmodule.xml', 'Discuz.Space.Modules.StatisticModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('我的相册', 0, 'builtin_showalbummodule.xml', 'Discuz.Web.space.modules.builtin.album.ShowAlbumModule, Discuz.Web');
INSERT INTO [dnt_spacemoduledefs] VALUES ('自定义面板', 0, 'builtin_customizepanel.xml', 'Discuz.Space.Modules.builtin.CustomizePanel, Discuz.Web');

INSERT INTO [dnt_albumcategories] VALUES ('人物', '生活随拍 朋友恋人 偶像明星 帅哥美女 网友自拍', 0, 1);
INSERT INTO [dnt_albumcategories] VALUES ('风景', '自然风景 名胜古迹 建筑雕塑 民俗风情 城市魅影', 0, 2);
INSERT INTO [dnt_albumcategories] VALUES ('动物', '狗 猫 鸟类 鱼类 昆虫', 0, 3);
INSERT INTO [dnt_albumcategories] VALUES ('植物', '花卉 树木', 0, 4);
INSERT INTO [dnt_albumcategories] VALUES ('艺术', '邮票 古玩 绘画 书法 篆刻', 0, 5);
INSERT INTO [dnt_albumcategories] VALUES ('娱乐', '搞笑 游戏 动漫 电影', 0, 6);
INSERT INTO [dnt_albumcategories] VALUES ('体育', '足球 篮球 奥运会 世界杯', 0, 7);
INSERT INTO [dnt_albumcategories] VALUES ('时尚', '汽车 时装 家居 美食 手机', 0, 8);
INSERT INTO [dnt_albumcategories] VALUES ('科技', '天文 地理 海洋 科普 计算机', 0, 9);

INSERT INTO [dnt_topicidentify] VALUES ('找抽帖', 'zc.gif');
INSERT INTO [dnt_topicidentify] VALUES ('变态帖', 'bt.gif');
INSERT INTO [dnt_topicidentify] VALUES ('吵架帖', 'cj.gif');
INSERT INTO [dnt_topicidentify] VALUES ('炫耀帖', 'xy.gif');
INSERT INTO [dnt_topicidentify] VALUES ('炒作帖', 'cz.gif');
INSERT INTO [dnt_topicidentify] VALUES ('委琐帖', 'ws.gif');
INSERT INTO [dnt_topicidentify] VALUES ('火星帖', 'hx.gif');
INSERT INTO [dnt_topicidentify] VALUES ('精彩帖', 'jc.gif');
INSERT INTO [dnt_topicidentify] VALUES ('无聊帖', 'wl.gif');
INSERT INTO [dnt_topicidentify] VALUES ('温情帖', 'wq.gif');
INSERT INTO [dnt_topicidentify] VALUES ('XX帖', 'xx.gif');
INSERT INTO [dnt_topicidentify] VALUES ('跟风帖', 'gf.gif');
INSERT INTO [dnt_topicidentify] VALUES ('垃圾帖', 'lj.gif');
INSERT INTO [dnt_topicidentify] VALUES ('推荐帖', 'tj.gif');
INSERT INTO [dnt_topicidentify] VALUES ('搞笑帖', 'gx.gif');
INSERT INTO [dnt_topicidentify] VALUES ('悲情帖', 'bq.gif');
INSERT INTO [dnt_topicidentify] VALUES ('牛帖', 'nb.gif');

INSERT INTO [dnt_smilies] VALUES (1, 0, 0, '默认表情', 'default');
INSERT INTO [dnt_smilies] VALUES (2, 0, 1, ':default1:', 'default/0.gif');
INSERT INTO [dnt_smilies] VALUES (3, 0, 1, ':default2:', 'default/1.gif');
INSERT INTO [dnt_smilies] VALUES (4, 0, 1, ':default3:', 'default/10.gif');
INSERT INTO [dnt_smilies] VALUES (5, 0, 1, ':default4:', 'default/11.gif');
INSERT INTO [dnt_smilies] VALUES (6, 0, 1, ':default5:', 'default/12.gif');
INSERT INTO [dnt_smilies] VALUES (7, 0, 1, ':default6:', 'default/13.gif');
INSERT INTO [dnt_smilies] VALUES (8, 0, 1, ':default7:', 'default/14.gif');
INSERT INTO [dnt_smilies] VALUES (9, 0, 1, ':default8:', 'default/15.gif');
INSERT INTO [dnt_smilies] VALUES (10, 0, 1, ':default9:', 'default/16.gif');
INSERT INTO [dnt_smilies] VALUES (11, 0, 1, ':default10:', 'default/17.gif');
INSERT INTO [dnt_smilies] VALUES (12, 0, 1, ':default11:', 'default/18.gif');
INSERT INTO [dnt_smilies] VALUES (13, 0, 1, ':default12:', 'default/19.gif');
INSERT INTO [dnt_smilies] VALUES (14, 0, 1, ':default13:', 'default/2.gif');
INSERT INTO [dnt_smilies] VALUES (15, 0, 1, ':default14:', 'default/20.gif');
INSERT INTO [dnt_smilies] VALUES (16, 0, 1, ':default15:', 'default/21.gif');
INSERT INTO [dnt_smilies] VALUES (17, 0, 1, ':default16:', 'default/22.gif');
INSERT INTO [dnt_smilies] VALUES (18, 0, 1, ':default17:', 'default/23.gif');
INSERT INTO [dnt_smilies] VALUES (19, 0, 1, ':default18:', 'default/24.gif');
INSERT INTO [dnt_smilies] VALUES (20, 0, 1, ':default19:', 'default/25.gif');
INSERT INTO [dnt_smilies] VALUES (21, 0, 1, ':default20:', 'default/26.gif');
INSERT INTO [dnt_smilies] VALUES (22, 0, 1, ':default21:', 'default/27.gif');
INSERT INTO [dnt_smilies] VALUES (23, 0, 1, ':default22:', 'default/28.gif');
INSERT INTO [dnt_smilies] VALUES (24, 0, 1, ':default23:', 'default/29.gif');
INSERT INTO [dnt_smilies] VALUES (25, 0, 1, ':default24:', 'default/3.gif');
INSERT INTO [dnt_smilies] VALUES (26, 0, 1, ':default25:', 'default/30.gif');
INSERT INTO [dnt_smilies] VALUES (27, 0, 1, ':default26:', 'default/31.gif');
INSERT INTO [dnt_smilies] VALUES (28, 0, 1, ':default27:', 'default/32.gif');
INSERT INTO [dnt_smilies] VALUES (29, 0, 1, ':default28:', 'default/33.gif');
INSERT INTO [dnt_smilies] VALUES (30, 0, 1, ':default29:', 'default/34.gif');
INSERT INTO [dnt_smilies] VALUES (31, 0, 1, ':default30:', 'default/35.gif');
INSERT INTO [dnt_smilies] VALUES (32, 0, 1, ':default31:', 'default/36.gif');
INSERT INTO [dnt_smilies] VALUES (33, 0, 1, ':default32:', 'default/37.gif');
INSERT INTO [dnt_smilies] VALUES (34, 0, 1, ':default33:', 'default/38.gif');
INSERT INTO [dnt_smilies] VALUES (35, 0, 1, ':default34:', 'default/39.gif');
INSERT INTO [dnt_smilies] VALUES (36, 0, 1, ':default35:', 'default/4.gif');
INSERT INTO [dnt_smilies] VALUES (37, 0, 1, ':default36:', 'default/40.gif');
INSERT INTO [dnt_smilies] VALUES (38, 0, 1, ':default37:', 'default/41.gif');
INSERT INTO [dnt_smilies] VALUES (39, 0, 1, ':default38:', 'default/42.gif');
INSERT INTO [dnt_smilies] VALUES (40, 0, 1, ':default39:', 'default/43.gif');
INSERT INTO [dnt_smilies] VALUES (41, 0, 1, ':default40:', 'default/44.gif');
INSERT INTO [dnt_smilies] VALUES (42, 0, 1, ':default41:', 'default/45.gif');
INSERT INTO [dnt_smilies] VALUES (43, 0, 1, ':default42:', 'default/46.gif');
INSERT INTO [dnt_smilies] VALUES (44, 0, 1, ':default43:', 'default/47.gif');
INSERT INTO [dnt_smilies] VALUES (45, 0, 1, ':default44:', 'default/48.gif');
INSERT INTO [dnt_smilies] VALUES (46, 0, 1, ':default45:', 'default/49.gif');
INSERT INTO [dnt_smilies] VALUES (47, 0, 1, ':default46:', 'default/5.gif');
INSERT INTO [dnt_smilies] VALUES (48, 0, 1, ':default47:', 'default/50.gif');
INSERT INTO [dnt_smilies] VALUES (49, 0, 1, ':default48:', 'default/51.gif');
INSERT INTO [dnt_smilies] VALUES (50, 0, 1, ':default49:', 'default/52.gif');
INSERT INTO [dnt_smilies] VALUES (51, 0, 1, ':default50:', 'default/53.gif');
INSERT INTO [dnt_smilies] VALUES (52, 0, 1, ':default51:', 'default/54.gif');
INSERT INTO [dnt_smilies] VALUES (53, 0, 1, ':default52:', 'default/55.gif');
INSERT INTO [dnt_smilies] VALUES (54, 0, 1, ':default53:', 'default/56.gif');
INSERT INTO [dnt_smilies] VALUES (55, 0, 1, ':default54:', 'default/57.gif');
INSERT INTO [dnt_smilies] VALUES (56, 0, 1, ':default55:', 'default/58.gif');
INSERT INTO [dnt_smilies] VALUES (57, 0, 1, ':default56:', 'default/59.gif');
INSERT INTO [dnt_smilies] VALUES (58, 0, 1, ':default57:', 'default/6.gif');
INSERT INTO [dnt_smilies] VALUES (59, 0, 1, ':default58:', 'default/60.gif');
INSERT INTO [dnt_smilies] VALUES (60, 0, 1, ':default59:', 'default/61.gif');
INSERT INTO [dnt_smilies] VALUES (61, 0, 1, ':default60:', 'default/62.gif');
INSERT INTO [dnt_smilies] VALUES (62, 0, 1, ':default61:', 'default/63.gif');
INSERT INTO [dnt_smilies] VALUES (63, 0, 1, ':default62:', 'default/64.gif');
INSERT INTO [dnt_smilies] VALUES (64, 0, 1, ':default63:', 'default/65.gif');
INSERT INTO [dnt_smilies] VALUES (65, 0, 1, ':default64:', 'default/66.gif');
INSERT INTO [dnt_smilies] VALUES (66, 0, 1, ':default65:', 'default/67.gif');
INSERT INTO [dnt_smilies] VALUES (67, 0, 1, ':default66:', 'default/68.gif');
INSERT INTO [dnt_smilies] VALUES (68, 0, 1, ':default67:', 'default/69.gif');
INSERT INTO [dnt_smilies] VALUES (69, 0, 1, ':default68:', 'default/7.gif');
INSERT INTO [dnt_smilies] VALUES (70, 0, 1, ':default69:', 'default/70.gif');
INSERT INTO [dnt_smilies] VALUES (71, 0, 1, ':default70:', 'default/71.gif');
INSERT INTO [dnt_smilies] VALUES (72, 0, 1, ':default71:', 'default/72.gif');
INSERT INTO [dnt_smilies] VALUES (73, 0, 1, ':default72:', 'default/73.gif');
INSERT INTO [dnt_smilies] VALUES (74, 0, 1, ':default73:', 'default/74.gif');
INSERT INTO [dnt_smilies] VALUES (75, 0, 1, ':default74:', 'default/75.gif');
INSERT INTO [dnt_smilies] VALUES (76, 0, 1, ':default75:', 'default/76.gif');
INSERT INTO [dnt_smilies] VALUES (77, 0, 1, ':default76:', 'default/77.gif');
INSERT INTO [dnt_smilies] VALUES (78, 0, 1, ':default77:', 'default/78.gif');
INSERT INTO [dnt_smilies] VALUES (79, 0, 1, ':default78:', 'default/79.gif');
INSERT INTO [dnt_smilies] VALUES (80, 0, 1, ':default79:', 'default/8.gif');
INSERT INTO [dnt_smilies] VALUES (81, 0, 1, ':default80:', 'default/80.gif');
INSERT INTO [dnt_smilies] VALUES (82, 0, 1, ':default81:', 'default/81.gif');
INSERT INTO [dnt_smilies] VALUES (83, 0, 1, ':default82:', 'default/82.gif');
INSERT INTO [dnt_smilies] VALUES (84, 0, 1, ':default83:', 'default/83.gif');
INSERT INTO [dnt_smilies] VALUES (86, 0, 1, ':default84:', 'default/84.gif');
INSERT INTO [dnt_smilies] VALUES (87, 0, 1, ':default85:', 'default/85.gif');
INSERT INTO [dnt_smilies] VALUES (88, 0, 1, ':default86:', 'default/86.gif');
INSERT INTO [dnt_smilies] VALUES (89, 0, 1, ':default87:', 'default/9.gif');

UPDATE [dnt_usergroups] SET [maxspaceattachsize]=204800, [maxspacephotosize]=204800 WHERE [groupid] < 4 OR [groupid] > 9;