USE [portal]
GO
/****** Object:  View [dbo].[v_forums_menu]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_menu]'))
DROP VIEW [dbo].[v_forums_menu]
GO
/****** Object:  View [dbo].[v_forums_menubig]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_menubig]'))
DROP VIEW [dbo].[v_forums_menubig]
GO
/****** Object:  View [dbo].[v_forums_nav]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_nav]'))
DROP VIEW [dbo].[v_forums_nav]
GO
/****** Object:  View [dbo].[v_forums_pid]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_pid]'))
DROP VIEW [dbo].[v_forums_pid]
GO
/****** Object:  View [dbo].[v_forums_post]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_post]'))
DROP VIEW [dbo].[v_forums_post]
GO
/****** Object:  View [dbo].[v_forums_reply]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_reply]'))
DROP VIEW [dbo].[v_forums_reply]
GO
/****** Object:  View [dbo].[v_forumsshort]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forumsshort]'))
DROP VIEW [dbo].[v_forumsshort]
GO
/****** Object:  View [dbo].[v_modules]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_modules]'))
DROP VIEW [dbo].[v_modules]
GO
/****** Object:  View [dbo].[v_news]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_news]'))
DROP VIEW [dbo].[v_news]
GO
/****** Object:  View [dbo].[v_pagevote]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_pagevote]'))
DROP VIEW [dbo].[v_pagevote]
GO
/****** Object:  View [dbo].[v_photoes]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_photoes]'))
DROP VIEW [dbo].[v_photoes]
GO
/****** Object:  View [dbo].[v_portalpage]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_portalpage]'))
DROP VIEW [dbo].[v_portalpage]
GO
/****** Object:  View [dbo].[v_tab]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_tab]'))
DROP VIEW [dbo].[v_tab]
GO
/****** Object:  View [dbo].[v_announcedept]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_announcedept]'))
DROP VIEW [dbo].[v_announcedept]
GO
/****** Object:  View [dbo].[v_Announcements]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_Announcements]'))
DROP VIEW [dbo].[v_Announcements]
GO
/****** Object:  View [dbo].[v_documents]    Script Date: 12/20/2015 22:36:48 ******/
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_documents]'))
DROP VIEW [dbo].[v_documents]
GO
/****** Object:  UserDefinedFunction [dbo].[fun_getdeptfullname]    Script Date: 12/20/2015 22:36:47 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fun_getdeptfullname]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[fun_getdeptfullname]
GO
/****** Object:  UserDefinedFunction [dbo].[fun_getpagerootids]    Script Date: 12/20/2015 22:36:47 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fun_getpagerootids]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
DROP FUNCTION [dbo].[fun_getpagerootids]
GO
/****** Object:  Table [dbo].[Portal_Announcements]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Portal_Announcements_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_Announcements] DROP CONSTRAINT [DF_Portal_Announcements_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Portal_Announcements_istop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_Announcements] DROP CONSTRAINT [DF_Portal_Announcements_istop]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Portal_Announcements_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_Announcements] DROP CONSTRAINT [DF_Portal_Announcements_click]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_Announcements]') AND type in (N'U'))
DROP TABLE [dbo].[Portal_Announcements]
GO
/****** Object:  Table [dbo].[Portal_Announcementscat]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Portal_Announcementscat_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_Announcementscat] DROP CONSTRAINT [DF_Portal_Announcementscat_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_Announcementscat]') AND type in (N'U'))
DROP TABLE [dbo].[Portal_Announcementscat]
GO
/****** Object:  Table [dbo].[portal_click]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_click]') AND type in (N'U'))
DROP TABLE [dbo].[portal_click]
GO
/****** Object:  Table [dbo].[Portal_documents]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Portal_Documents_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_documents] DROP CONSTRAINT [DF_Portal_Documents_click]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_documents]') AND type in (N'U'))
DROP TABLE [dbo].[Portal_documents]
GO
/****** Object:  Table [dbo].[portal_documentscat]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_documentscat]') AND type in (N'U'))
DROP TABLE [dbo].[portal_documentscat]
GO
/****** Object:  Table [dbo].[portal_forums_menubig]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menubig_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menubig] DROP CONSTRAINT [DF_portal_forums_menubig_orderid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_menubig]') AND type in (N'U'))
DROP TABLE [dbo].[portal_forums_menubig]
GO
/****** Object:  Table [dbo].[portal_forums_menusmall]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_totalsubject]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_totalsubject]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_totalreply]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_totalreply]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_lastreplyuid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_lastreplyuid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_lastpostid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_lastpostid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_isshow]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_isshow]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_menusmall_todaynew]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_menusmall] DROP CONSTRAINT [DF_portal_forums_menusmall_todaynew]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_menusmall]') AND type in (N'U'))
DROP TABLE [dbo].[portal_forums_menusmall]
GO
/****** Object:  Table [dbo].[portal_forums_pid]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_pid]') AND type in (N'U'))
DROP TABLE [dbo].[portal_forums_pid]
GO
/****** Object:  Table [dbo].[portal_forums_post]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_post_lastreplydate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_post] DROP CONSTRAINT [DF_portal_forums_post_lastreplydate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_post_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_post] DROP CONSTRAINT [DF_portal_forums_post_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_forums_post_islock]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_forums_post] DROP CONSTRAINT [DF_portal_forums_post_islock]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_post]') AND type in (N'U'))
DROP TABLE [dbo].[portal_forums_post]
GO
/****** Object:  Table [dbo].[portal_forums_reply]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_reply]') AND type in (N'U'))
DROP TABLE [dbo].[portal_forums_reply]
GO
/****** Object:  Table [dbo].[portal_html]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_html_isservercode]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_html] DROP CONSTRAINT [DF_portal_html_isservercode]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_html_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_html] DROP CONSTRAINT [DF_portal_html_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_html_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_html] DROP CONSTRAINT [DF_portal_html_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_html]') AND type in (N'U'))
DROP TABLE [dbo].[portal_html]
GO
/****** Object:  Table [dbo].[portal_iframe]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_iframe_width]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_iframe] DROP CONSTRAINT [DF_portal_iframe_width]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_iframe_height]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_iframe] DROP CONSTRAINT [DF_portal_iframe_height]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_iframe_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_iframe] DROP CONSTRAINT [DF_portal_iframe_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_iframe]') AND type in (N'U'))
DROP TABLE [dbo].[portal_iframe]
GO
/****** Object:  Table [dbo].[portal_job]    Script Date: 12/20/2015 22:36:46 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_job]') AND type in (N'U'))
DROP TABLE [dbo].[portal_job]
GO
/****** Object:  Table [dbo].[portal_jobcat]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_jobcat]') AND type in (N'U'))
DROP TABLE [dbo].[portal_jobcat]
GO
/****** Object:  Table [dbo].[Portal_Links]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Portal_Links_catid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_Links] DROP CONSTRAINT [DF_Portal_Links_catid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_Links]') AND type in (N'U'))
DROP TABLE [dbo].[Portal_Links]
GO
/****** Object:  Table [dbo].[portal_messagecat]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_messagecat_needaudit]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_messagecat] DROP CONSTRAINT [DF_portal_messagecat_needaudit]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_messagecat]') AND type in (N'U'))
DROP TABLE [dbo].[portal_messagecat]
GO
/****** Object:  Table [dbo].[portal_messages]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_messages_pid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_messages] DROP CONSTRAINT [DF_portal_messages_pid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_messages_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_messages] DROP CONSTRAINT [DF_portal_messages_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_messages_reply]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_messages] DROP CONSTRAINT [DF_portal_messages_reply]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_messages_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_messages] DROP CONSTRAINT [DF_portal_messages_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_messages]') AND type in (N'U'))
DROP TABLE [dbo].[portal_messages]
GO
/****** Object:  Table [dbo].[portal_moduledefinitions]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_moduledefinitions_moduledefid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_moduledefinitions] DROP CONSTRAINT [DF_portal_moduledefinitions_moduledefid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_moduledefinitions_cachetime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_moduledefinitions] DROP CONSTRAINT [DF_portal_moduledefinitions_cachetime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_moduledefinitions]') AND type in (N'U'))
DROP TABLE [dbo].[portal_moduledefinitions]
GO
/****** Object:  Table [dbo].[portal_modules]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_cachetimeout]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_cachetimeout]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_moduleorder]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_moduleorder]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_width]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_width]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_height]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_height]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_cssclass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_cssclass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_showhand]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_showhand]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_modules_isdelete]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_modules] DROP CONSTRAINT [DF_portal_modules_isdelete]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_modules]') AND type in (N'U'))
DROP TABLE [dbo].[portal_modules]
GO
/****** Object:  Table [dbo].[portal_mycustom]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_mycustom]') AND type in (N'U'))
DROP TABLE [dbo].[portal_mycustom]
GO
/****** Object:  Table [dbo].[portal_news]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_news_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_news] DROP CONSTRAINT [DF_portal_news_adddate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_news_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_news] DROP CONSTRAINT [DF_portal_news_click]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_news_isshenhe]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_news] DROP CONSTRAINT [DF_portal_news_isshenhe]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_news_toptype]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_news] DROP CONSTRAINT [DF_portal_news_toptype]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_news_remarkcount]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_news] DROP CONSTRAINT [DF_portal_news_remarkcount]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_news_isdelete]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_news] DROP CONSTRAINT [DF_portal_news_isdelete]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_news]') AND type in (N'U'))
DROP TABLE [dbo].[portal_news]
GO
/****** Object:  Table [dbo].[portal_newscategory]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_newscategory_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_newscategory] DROP CONSTRAINT [DF_portal_newscategory_orderid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_newscategory]') AND type in (N'U'))
DROP TABLE [dbo].[portal_newscategory]
GO
/****** Object:  Table [dbo].[portal_newspages]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_newspages_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_newspages] DROP CONSTRAINT [DF_portal_newspages_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_newspages]') AND type in (N'U'))
DROP TABLE [dbo].[portal_newspages]
GO
/****** Object:  Table [dbo].[portal_newstag]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_newstag]') AND type in (N'U'))
DROP TABLE [dbo].[portal_newstag]
GO
/****** Object:  Table [dbo].[Portal_page_audit_log]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_log_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_page_audit_log] DROP CONSTRAINT [DF_purchase_log_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_purchase_log_isread]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_page_audit_log] DROP CONSTRAINT [DF_purchase_log_isread]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_appform_log_isprocess]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Portal_page_audit_log] DROP CONSTRAINT [DF_appform_log_isprocess]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_page_audit_log]') AND type in (N'U'))
DROP TABLE [dbo].[Portal_page_audit_log]
GO
/****** Object:  Table [dbo].[portal_pagedoc]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr_docs_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagedoc] DROP CONSTRAINT [DF_hr_docs_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr_docs_isdelete]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagedoc] DROP CONSTRAINT [DF_hr_docs_isdelete]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pagedoc_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagedoc] DROP CONSTRAINT [DF_portal_pagedoc_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pagedoc_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagedoc] DROP CONSTRAINT [DF_portal_pagedoc_guid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pagedoc_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagedoc] DROP CONSTRAINT [DF_portal_pagedoc_click]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pagedoc]') AND type in (N'U'))
DROP TABLE [dbo].[portal_pagedoc]
GO
/****** Object:  Table [dbo].[portal_pageform]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pageform_isdelete]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pageform] DROP CONSTRAINT [DF_portal_pageform_isdelete]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pageform_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pageform] DROP CONSTRAINT [DF_portal_pageform_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pageform_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pageform] DROP CONSTRAINT [DF_portal_pageform_ispass]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pageform]') AND type in (N'U'))
DROP TABLE [dbo].[portal_pageform]
GO
/****** Object:  Table [dbo].[portal_pageimage]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pageimage_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pageimage] DROP CONSTRAINT [DF_portal_pageimage_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pageimage_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pageimage] DROP CONSTRAINT [DF_portal_pageimage_guid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pageimage_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pageimage] DROP CONSTRAINT [DF_portal_pageimage_click]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pageimage]') AND type in (N'U'))
DROP TABLE [dbo].[portal_pageimage]
GO
/****** Object:  Table [dbo].[portal_pages]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_parentid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_parentid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_depth]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_depth]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_path]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_path]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_inherit]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_inherit]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_needaudit]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_needaudit]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pages_ispublic]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pages] DROP CONSTRAINT [DF_portal_pages_ispublic]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pages]') AND type in (N'U'))
DROP TABLE [dbo].[portal_pages]
GO
/****** Object:  Table [dbo].[portal_pagescontents]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pagescontents_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagescontents] DROP CONSTRAINT [DF_portal_pagescontents_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pagescontents_isshowtitle]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagescontents] DROP CONSTRAINT [DF_portal_pagescontents_isshowtitle]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_pagescontents_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_pagescontents] DROP CONSTRAINT [DF_portal_pagescontents_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pagescontents]') AND type in (N'U'))
DROP TABLE [dbo].[portal_pagescontents]
GO
/****** Object:  Table [dbo].[portal_photocategory]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_photocategory_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photocategory] DROP CONSTRAINT [DF_portal_photocategory_orderid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_photocategory]') AND type in (N'U'))
DROP TABLE [dbo].[portal_photocategory]
GO
/****** Object:  Table [dbo].[portal_photoes]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_Photoes_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photoes] DROP CONSTRAINT [DF_Photoes_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_photoes_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photoes] DROP CONSTRAINT [DF_portal_photoes_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_photoes_istop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photoes] DROP CONSTRAINT [DF_portal_photoes_istop]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_photoes_focusnews]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photoes] DROP CONSTRAINT [DF_portal_photoes_focusnews]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_photoes_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photoes] DROP CONSTRAINT [DF_portal_photoes_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_photoes_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_photoes] DROP CONSTRAINT [DF_portal_photoes_click]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_photoes]') AND type in (N'U'))
DROP TABLE [dbo].[portal_photoes]
GO
/****** Object:  Table [dbo].[portal_rss]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_rss_showintro]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_rss] DROP CONSTRAINT [DF_portal_rss_showintro]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_rss_showdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_rss] DROP CONSTRAINT [DF_portal_rss_showdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_rss_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_rss] DROP CONSTRAINT [DF_portal_rss_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_rss_isuseproxy]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_rss] DROP CONSTRAINT [DF_portal_rss_isuseproxy]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_rss]') AND type in (N'U'))
DROP TABLE [dbo].[portal_rss]
GO
/****** Object:  Table [dbo].[portal_singlepage]    Script Date: 12/20/2015 22:36:45 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_singlepage_isshow]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_singlepage] DROP CONSTRAINT [DF_portal_singlepage_isshow]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_singlepage_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_singlepage] DROP CONSTRAINT [DF_portal_singlepage_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_singlepage_click]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_singlepage] DROP CONSTRAINT [DF_portal_singlepage_click]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_singlepage_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_singlepage] DROP CONSTRAINT [DF_portal_singlepage_orderid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_singlepage]') AND type in (N'U'))
DROP TABLE [dbo].[portal_singlepage]
GO
/****** Object:  Table [dbo].[portal_tabs]    Script Date: 12/20/2015 22:36:44 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_tabs_taborder]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_tabs] DROP CONSTRAINT [DF_portal_tabs_taborder]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_tabs_istop]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_tabs] DROP CONSTRAINT [DF_portal_tabs_istop]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_tabs]') AND type in (N'U'))
DROP TABLE [dbo].[portal_tabs]
GO
/****** Object:  Table [dbo].[portal_tabsecurity]    Script Date: 12/20/2015 22:36:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_tabsecurity]') AND type in (N'U'))
DROP TABLE [dbo].[portal_tabsecurity]
GO
/****** Object:  Table [dbo].[portal_votequestions]    Script Date: 12/20/2015 22:36:44 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_votequestions_ps]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[portal_votequestions] DROP CONSTRAINT [DF_portal_votequestions_ps]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_votequestions]') AND type in (N'U'))
DROP TABLE [dbo].[portal_votequestions]
GO
/****** Object:  Table [dbo].[portal_votetitle]    Script Date: 12/20/2015 22:36:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_votetitle]') AND type in (N'U'))
DROP TABLE [dbo].[portal_votetitle]
GO
/****** Object:  StoredProcedure [dbo].[sp_preparecustomPage]    Script Date: 12/20/2015 22:36:44 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_preparecustomPage]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_preparecustomPage]
GO
/****** Object:  Table [dbo].[survery_defineactive]    Script Date: 12/20/2015 22:36:36 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_defineactive_adddate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_defineactive_adddate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_allowmultivote]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_allowmultivote]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_ispublic]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_ispublic]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_defineactive_ispublicresult]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_defineactive] DROP CONSTRAINT [DF_survery_defineactive_ispublicresult]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_defineactive]') AND type in (N'U'))
DROP TABLE [dbo].[survery_defineactive]
GO
/****** Object:  Table [dbo].[survery_lists]    Script Date: 12/20/2015 22:36:36 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_lists_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_lists_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_uid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_uid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_ispass]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_ispass]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_isdeleted]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_isdeleted]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_isfull]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_isfull]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_process]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_process]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_lists_auditstatus]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_lists] DROP CONSTRAINT [DF_survery_lists_auditstatus]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_lists]') AND type in (N'U'))
DROP TABLE [dbo].[survery_lists]
GO
/****** Object:  Table [dbo].[survery_options]    Script Date: 12/20/2015 22:36:36 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_options]') AND type in (N'U'))
DROP TABLE [dbo].[survery_options]
GO
/****** Object:  Table [dbo].[survery_subjects]    Script Date: 12/20/2015 22:36:36 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_mustfilled]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_mustfilled]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_col]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_col]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_survery_subjects_colspan]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[survery_subjects] DROP CONSTRAINT [DF_survery_subjects_colspan]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_subjects]') AND type in (N'U'))
DROP TABLE [dbo].[survery_subjects]
GO
/****** Object:  Table [dbo].[users_dept]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_parentid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_parentid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_orderid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_orderid]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_category_depth]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_portal_category_depth]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_hr_csscategory_path]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_dept] DROP CONSTRAINT [DF_hr_csscategory_path]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_dept]') AND type in (N'U'))
DROP TABLE [dbo].[users_dept]
GO
/****** Object:  Table [dbo].[users_getpwd]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_getpwd_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_getpwd] DROP CONSTRAINT [DF_users_getpwd_createdate]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_getpwd]') AND type in (N'U'))
DROP TABLE [dbo].[users_getpwd]
GO
/****** Object:  Table [dbo].[users_releation]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_releation]') AND type in (N'U'))
DROP TABLE [dbo].[users_releation]
GO
/****** Object:  Table [dbo].[users_roles]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_roles_issystem]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_roles] DROP CONSTRAINT [DF_users_roles_issystem]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_roles]') AND type in (N'U'))
DROP TABLE [dbo].[users_roles]
GO
/****** Object:  Table [dbo].[users_users]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_users_createdate]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_portal_users_createdate]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_portal_users_lastlogin]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_portal_users_lastlogin]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_avtor]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_avtor]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_logintime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_logintime]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_logintime_1]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_logintime_1]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_ismgr]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_ismgr]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_issec]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_issec]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_isstaff]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_isstaff]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_forumpostcount]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_forumpostcount]
END
GO
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_users_users_forumreplycount]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[users_users] DROP CONSTRAINT [DF_users_users_forumreplycount]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_users]') AND type in (N'U'))
DROP TABLE [dbo].[users_users]
GO
/****** Object:  Table [dbo].[users_usersinroles]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_usersinroles]') AND type in (N'U'))
DROP TABLE [dbo].[users_usersinroles]
GO
/****** Object:  Table [dbo].[extdata_rss_cache]    Script Date: 12/20/2015 22:36:35 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_extdata_cache_guid]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[extdata_rss_cache] DROP CONSTRAINT [DF_extdata_cache_guid]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[extdata_rss_cache]') AND type in (N'U'))
DROP TABLE [dbo].[extdata_rss_cache]
GO
/****** Object:  Table [dbo].[extdata_rss_cache]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[extdata_rss_cache]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[extdata_rss_cache](
	[guid] [uniqueidentifier] ROWGUIDCOL  NULL CONSTRAINT [DF_extdata_cache_guid]  DEFAULT (newid()),
	[title] [nvarchar](500) NULL,
	[link] [nvarchar](500) NULL
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_usersinroles]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_usersinroles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_usersinroles](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[uid] [int] NULL,
	[rolename] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_usersinroles] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_usersinroles] ON
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (1, 1, N'Administrators')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (2, 4, N'HR')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (4, 6, N'IT')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (5, 5, N'Manager')
INSERT [dbo].[users_usersinroles] ([id], [uid], [rolename]) VALUES (6, 20, N'Powerusers')
SET IDENTITY_INSERT [dbo].[users_usersinroles] OFF
/****** Object:  Table [dbo].[users_users]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_users]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_users](
	[uid] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](256) NOT NULL,
	[adpath] [nvarchar](1024) NULL,
	[firstname] [nvarchar](50) NULL,
	[lastname] [nvarchar](50) NULL,
	[city] [nvarchar](256) NULL,
	[Office] [nvarchar](256) NULL,
	[Description] [nvarchar](1024) NULL,
	[Tel] [nvarchar](128) NULL,
	[fax] [nvarchar](128) NULL,
	[email] [nvarchar](256) NULL,
	[MailType] [nvarchar](128) NULL,
	[Title] [nvarchar](128) NULL,
	[Department] [nvarchar](128) NULL,
	[Company] [nvarchar](128) NULL,
	[Password] [nvarchar](128) NULL,
	[displayname] [nvarchar](128) NULL,
	[StaffCode] [nvarchar](128) NULL,
	[IsAccountActive] [int] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_users_createdate]  DEFAULT (getdate()),
	[lastlogin] [datetime] NULL CONSTRAINT [DF_portal_users_lastlogin]  DEFAULT (getdate()),
	[sex] [nvarchar](50) NULL,
	[avtor] [nvarchar](300) NULL CONSTRAINT [DF_users_users_avtor]  DEFAULT ('avtor.jpg'),
	[logintimes] [int] NULL CONSTRAINT [DF_users_users_logintime]  DEFAULT ((0)),
	[ip] [nvarchar](50) NULL,
	[logintime] [int] NULL CONSTRAINT [DF_users_users_logintime_1]  DEFAULT ((0)),
	[intro] [nvarchar](500) NULL,
	[ismgr] [int] NULL CONSTRAINT [DF_users_users_ismgr]  DEFAULT ((0)),
	[issec] [int] NULL CONSTRAINT [DF_users_users_issec]  DEFAULT ((0)),
	[isstaff] [int] NULL CONSTRAINT [DF_users_users_isstaff]  DEFAULT ((1)),
	[forumpostcount] [int] NULL CONSTRAINT [DF_users_users_forumpostcount]  DEFAULT ((0)),
	[forumreplycount] [int] NULL CONSTRAINT [DF_users_users_forumreplycount]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_users_1] PRIMARY KEY CLUSTERED 
(
	[uid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_users] ON
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (1, N'admin', NULL, NULL, NULL, NULL, N'上海23F', NULL, N'15001712100', N'', N'dream.li@shuion.com.cn', NULL, N'经理', N'IT部门', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李正', N'1212121', NULL, CAST(0x00009F9F00961EBD AS DateTime), CAST(0x0000A574014609F3 AS DateTime), N'男', N'/worklog/uploads/2014-08/S20140819032309.jpg', 119, N'::1', 0, N'负责日常系统的维护工作', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (10, N'张红', NULL, NULL, NULL, NULL, N'武汉', NULL, N'13444444444', N'021-888565', N'58756585@qq.com', NULL, N'', N'人事部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'张红', N'', NULL, CAST(0x0000A29501311361 AS DateTime), CAST(0x0000A574012CAC02 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075408.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (11, N'lizheng', NULL, NULL, NULL, NULL, N'上海', NULL, N'13526545865', N'021-888565', N'lizheng@dotnetcms.org', NULL, N'', N'环境部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李费', N'', NULL, CAST(0x0000A2950131D0A8 AS DateTime), CAST(0x0000A2950131D0A8 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075425.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (12, N'张倩', NULL, NULL, NULL, NULL, N'上海', NULL, N'13526545865', N'021-888565', N'58756585@qq.com', NULL, N'', N'人事部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'张倩', N'', NULL, CAST(0x0000A29501322B42 AS DateTime), CAST(0x0000A29501322B42 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075440.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (13, N'wnzi', NULL, NULL, NULL, NULL, N'北京', NULL, N'15001712100', N'021-888565', N'aaa@qq.com', NULL, N'', N'环境部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'王字', N'', NULL, CAST(0x0000A29501326691 AS DateTime), CAST(0x0000A29501326691 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075454.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (14, N'mary', NULL, NULL, NULL, NULL, N'北京', NULL, N'13526545865', N'021-888565', N'eco@soh.com', NULL, N'', N'行政部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李月', N'', NULL, CAST(0x0000A2950132B43F AS DateTime), CAST(0x0000A2E800840155 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075511.jpg', 1, N'127.0.0.1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (15, N'sherry', NULL, NULL, NULL, NULL, N'北京', NULL, N'13526545865', N'021-888565', N'she@soh.com', NULL, N'', N'IT部门', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'菲菲', N'', NULL, CAST(0x0000A2950132E1C0 AS DateTime), CAST(0x0000A40200A9B44F AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075526.jpg', 3, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (16, N'kevin', NULL, NULL, NULL, NULL, N'北京', NULL, N'13526545865', N'021-888565', N'kevin@soh.com', NULL, N'', N'光制品部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'黄力', N'', NULL, CAST(0x0000A29501330A36 AS DateTime), CAST(0x0000A29501330A36 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075540.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (17, N'tommy', NULL, NULL, NULL, NULL, N'北京', NULL, N'13526545865', N'021-888565', N'tommy@soh.com', NULL, N'', N'电制品部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'李晨', N'', NULL, CAST(0x0000A29501334449 AS DateTime), CAST(0x0000A29501334449 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075554.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (18, N'fred', NULL, NULL, NULL, NULL, N'北京', NULL, N'13526545865', N'021-888565', N'fedy@soh.com', NULL, N'', N'光制品部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'峰飞', N'', NULL, CAST(0x0000A29501336F2B AS DateTime), CAST(0x0000A29501336F2B AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075705.jpg', 0, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (19, N'keke', NULL, NULL, NULL, NULL, N'北京', NULL, N'13526545865', N'021-888565', N'fedy@soh.com', NULL, N'', N'人事部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'珂珂', N'', NULL, CAST(0x0000A29501338CDE AS DateTime), CAST(0x0000A48300802F58 AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075721.jpg', 1, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
INSERT [dbo].[users_users] ([uid], [username], [adpath], [firstname], [lastname], [city], [Office], [Description], [Tel], [fax], [email], [MailType], [Title], [Department], [Company], [Password], [displayname], [StaffCode], [IsAccountActive], [createdate], [lastlogin], [sex], [avtor], [logintimes], [ip], [logintime], [intro], [ismgr], [issec], [isstaff], [forumpostcount], [forumreplycount]) VALUES (20, N'jery', NULL, NULL, NULL, NULL, N'上海', NULL, N'15001712100', N'021-888565', N'jery@soh.com', NULL, N'', N'行政部', NULL, N'CE-0B-FD-15-05-9B-68-D6-76-88-88-4D-7A-3D-3E-8C', N'戴军', N'', NULL, CAST(0x0000A2950133E1EF AS DateTime), CAST(0x0000A483008A08BF AS DateTime), N'', N'/worklog/uploads/2014-08/S20140829075745.jpg', 4, N'::1', 0, N'', 0, 0, 1, NULL, NULL)
SET IDENTITY_INSERT [dbo].[users_users] OFF
/****** Object:  Table [dbo].[users_roles]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_roles]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_roles](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rolename] [nvarchar](50) NULL,
	[issystem] [int] NULL CONSTRAINT [DF_users_roles_issystem]  DEFAULT ((0)),
	[roletype] [nvarchar](50) NULL,
 CONSTRAINT [PK_users_roles] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_roles] ON
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (1, N'Administrators', 1, N'系统管理员')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (2, N'Powerusers', 1, N'高级用户')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (3, N'Authenticated', 1, N'登录会员')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (5, N'Everyone', 1, N'所有人')
INSERT [dbo].[users_roles] ([id], [rolename], [issystem], [roletype]) VALUES (6, N'MessageAudit', 1, N'留言审批人员')
SET IDENTITY_INSERT [dbo].[users_roles] OFF
/****** Object:  Table [dbo].[users_releation]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_releation]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_releation](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[mgrid] [int] NULL,
	[secid] [int] NULL,
 CONSTRAINT [PK_users_releation] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_getpwd]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_getpwd]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_getpwd](
	[id] [int] NOT NULL,
	[uid] [int] IDENTITY(1,1) NOT NULL,
	[display] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_users_getpwd_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_users_getpwd] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[users_dept]    Script Date: 12/20/2015 22:36:35 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users_dept]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[users_dept](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[parentid] [int] NULL CONSTRAINT [DF_portal_category_parentid]  DEFAULT ((0)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_category_orderid]  DEFAULT ((0)),
	[depth] [int] NULL CONSTRAINT [DF_portal_category_depth]  DEFAULT ((1)),
	[note] [nvarchar](200) NULL,
	[path] [nvarchar](1000) NULL CONSTRAINT [DF_hr_csscategory_path]  DEFAULT (''),
	[types] [nvarchar](50) NULL,
 CONSTRAINT [PK_users_dept] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[users_dept] ON
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (1, N'人事部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (2, N'财务部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (3, N'行政部', 0, 0, 1, NULL, N'', NULL)
INSERT [dbo].[users_dept] ([id], [catname], [parentid], [orderid], [depth], [note], [path], [types]) VALUES (4, N'IT部门', 0, 0, 1, NULL, N'', NULL)
SET IDENTITY_INSERT [dbo].[users_dept] OFF
/****** Object:  Table [dbo].[survery_subjects]    Script Date: 12/20/2015 22:36:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_subjects]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_subjects](
	[autoid] [int] IDENTITY(1,1) NOT NULL,
	[subject] [nvarchar](200) NULL,
	[types] [nvarchar](50) NULL,
	[id] [int] NULL,
	[activeid] [int] NULL,
	[mustfilled] [int] NULL CONSTRAINT [DF_survery_subjects_mustfilled]  DEFAULT ((0)),
	[typesname] [nvarchar](200) NULL,
	[col] [int] NULL CONSTRAINT [DF_survery_subjects_col]  DEFAULT ((1)),
	[IsSingleRow] [int] NULL CONSTRAINT [DF_survery_subjects_colspan]  DEFAULT ((0)),
	[bad] [nvarchar](50) NULL,
	[mid] [nvarchar](50) NULL,
	[good] [nvarchar](50) NULL,
	[coin] [int] NULL,
	[clientfun] [nvarchar](1000) NULL,
	[serverfun] [nvarchar](1000) NULL,
 CONSTRAINT [PK_subjects] PRIMARY KEY CLUSTERED 
(
	[autoid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_subjects] ON
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (1, N'应聘人姓名', N'TextBox', 1, 1, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (2, N'应聘人性别', N'RadioButtonList', 2, 1, 1, N'单选框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (3, N'身高', N'TextBox', 3, 1, 0, N'单行文本框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (4, N'年级', N'TextBox', 4, 1, 0, N'单行文本框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (5, N'应聘部门', N'TextBox', 5, 1, 1, N'单行文本框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (6, N'学历', N'DropDownList', 6, 1, 1, N'下拉框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (7, N'本人自我简介', N'MultiTextBox', 7, 1, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (8, N'工作经历', N'MultiTextBox', 8, 1, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (9, N'考官意见', N'MultiTextBox', 9, 1, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (10, N'人力资源意见', N'MultiTextBox', 10, 1, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (11, N'总经理', N'MultiTextBox', 11, 1, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (12, N'出差目的地', N'TextBox', 1, 2, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (13, N'出差日期', N'Date', 2, 2, 1, N'日期', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (14, N'共计天数', N'TextBox', 3, 2, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (15, N'共计人数', N'TextBox', 4, 2, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (16, N'部门意见', N'MultiTextBox', 5, 2, 0, N'多行文本框', 3, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (17, N'财务部意见', N'MultiTextBox', 6, 2, 0, N'多行文本框', 3, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (18, N'设备类型', N'RadioButtonList', 1, 3, 1, N'单选框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (19, N'紧急程度', N'RadioButtonList', 2, 3, 1, N'单选框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (20, N'是否过保', N'RadioButtonList', 3, 3, 1, N'单选框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (21, N'使用人', N'TextBox', 4, 3, 1, N'单行文本框', 2, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (22, N'问题描述', N'MultiTextBox', 5, 3, 1, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (23, N'部门意见', N'MultiTextBox', 6, 3, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (24, N'IT意见', N'MultiTextBox', 7, 3, 0, N'多行文本框', 2, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (25, N'费用原因', N'MultiTextBox', 1, 4, 1, N'多行文本框', 3, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (26, N'报销金额', N'TextBox', 2, 4, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (27, N'发票数量', N'TextBox', 3, 4, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (28, N'费用日期', N'Date', 4, 4, 1, N'日期', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (29, N'部门意见', N'MultiTextBox', 5, 4, 0, N'多行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (30, N'财务意见', N'MultiTextBox', 6, 4, 0, N'多行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (31, N'设备使用人', N'TextBox', 1, 5, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (32, N'使用部门', N'TextBox', 2, 5, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (33, N'报废设备编号', N'TextBox', 3, 5, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (34, N'资产编号', N'TextBox', 4, 5, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (35, N'部门意见', N'MultiTextBox', 5, 5, 1, N'多行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (36, N'软件名称', N'TextBox', 1, 6, 1, N'单行文本框', 3, 1, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (37, N'软件版本', N'TextBox', 2, 6, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (38, N'并发数', N'TextBox', 3, 6, 1, N'单行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (39, N'部门意见', N'MultiTextBox', 4, 6, 0, N'多行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (40, N'IT意见', N'MultiTextBox', 5, 6, 0, N'多行文本框', 3, 0, N'差', N'中', N'好', 5, NULL, NULL)
INSERT [dbo].[survery_subjects] ([autoid], [subject], [types], [id], [activeid], [mustfilled], [typesname], [col], [IsSingleRow], [bad], [mid], [good], [coin], [clientfun], [serverfun]) VALUES (41, N'附件', N'FileUpload', 8, 3, 0, N'附件', 3, 1, N'差', N'中', N'好', 5, NULL, NULL)
SET IDENTITY_INSERT [dbo].[survery_subjects] OFF
/****** Object:  Table [dbo].[survery_options]    Script Date: 12/20/2015 22:36:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_options]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_options](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[id] [int] NULL,
	[item] [nvarchar](200) NULL,
	[activeid] [int] NULL,
	[subjectid] [int] NULL,
 CONSTRAINT [PK_options] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_options] ON
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (1, 2, N'男', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (2, 2, N'女', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (3, 6, N'初中', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (4, 6, N'高中', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (5, 6, N'大学', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (6, 6, N'研究生', 1, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (7, 1, N'电脑', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (8, 1, N'打印机', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (9, 1, N'扫描仪', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (10, 2, N'高', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (11, 2, N'中', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (12, 2, N'低', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (13, 3, N'是', 3, NULL)
INSERT [dbo].[survery_options] ([itemid], [id], [item], [activeid], [subjectid]) VALUES (14, 3, N'否', 3, NULL)
SET IDENTITY_INSERT [dbo].[survery_options] OFF
/****** Object:  Table [dbo].[survery_lists]    Script Date: 12/20/2015 22:36:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_lists]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_lists](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[activeid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[dept] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[mobile] [nvarchar](50) NULL,
	[ctrl1] [nvarchar](1000) NULL,
	[ctrl2] [nvarchar](1000) NULL,
	[ctrl3] [nvarchar](1000) NULL,
	[ctrl4] [nvarchar](1000) NULL,
	[ctrl5] [nvarchar](1000) NULL,
	[ctrl6] [nvarchar](1000) NULL,
	[ctrl7] [nvarchar](1000) NULL,
	[ctrl8] [nvarchar](1000) NULL,
	[ctrl9] [nvarchar](1000) NULL,
	[ctrl10] [nvarchar](1000) NULL,
	[ctrl11] [nvarchar](1000) NULL,
	[ctrl12] [nvarchar](1000) NULL,
	[ctrl13] [nvarchar](1000) NULL,
	[ctrl14] [nvarchar](1000) NULL,
	[ctrl15] [nvarchar](1000) NULL,
	[ctrl16] [nvarchar](1000) NULL,
	[ctrl17] [nvarchar](1000) NULL,
	[ctrl18] [nvarchar](1000) NULL,
	[ctrl19] [nvarchar](1000) NULL,
	[ctrl20] [nvarchar](1000) NULL,
	[ctrl21] [nvarchar](1000) NULL,
	[ctrl22] [nvarchar](1000) NULL,
	[ctrl23] [nvarchar](1000) NULL,
	[ctrl24] [nvarchar](1000) NULL,
	[ctrl25] [nvarchar](1000) NULL,
	[ctrl26] [nvarchar](1000) NULL,
	[ctrl27] [nvarchar](1000) NULL,
	[ctrl28] [nvarchar](1000) NULL,
	[ctrl29] [nvarchar](1000) NULL,
	[ctrl30] [nvarchar](1000) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_lists_createdate]  DEFAULT (getdate()),
	[updatedate] [datetime] NULL,
	[note1] [nvarchar](50) NULL,
	[note2] [nvarchar](50) NULL,
	[note3] [nvarchar](50) NULL,
	[note4] [nvarchar](50) NULL,
	[note5] [nvarchar](50) NULL,
	[uid] [int] NULL CONSTRAINT [DF_survery_lists_uid]  DEFAULT ((0)),
	[ispass] [int] NULL CONSTRAINT [DF_survery_lists_ispass]  DEFAULT ((0)),
	[treeid] [int] NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_survery_lists_isdeleted]  DEFAULT ((0)),
	[isfull] [int] NULL CONSTRAINT [DF_survery_lists_isfull]  DEFAULT ((0)),
	[orderno] [nvarchar](50) NULL,
	[process] [int] NULL CONSTRAINT [DF_survery_lists_process]  DEFAULT ((0)),
	[auditstatus] [int] NULL CONSTRAINT [DF_survery_lists_auditstatus]  DEFAULT ((0)),
 CONSTRAINT [PK_lists] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_lists] ON
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (1, 1, N'李正', N'IT部门', N'dream.li@shuion.com.cn', N'15001712100', N'张军', N'男', N'178', N'25', N'IT', N'大学', N'我叫张军，今年25岁，应聘IT部门', N'2002年本科毕业，2002--2010在上海工作。', N'同意', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A57401620A1A AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 4, 0, 0, N'HR-001-20151220002', 0, 0)
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (2, 1, N'李正', N'IT部门', N'dream.li@shuion.com.cn', N'15001712100', N'王小丫', N'女', N'170', N'20', N'财务', N'研究生', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A57401622A93 AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 4, 0, 0, N'HR-001-20151220003', 0, 0)
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (3, 3, N'李正', N'IT部门', N'dream.li@shuion.com.cn', N'15001712100', N'电脑', N'高', N'是', N'李飞', N'电脑启动不起来', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A5740162415F AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 6, 0, 0, N'IT-001-20151220004', 0, 0)
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (4, 5, N'李正', N'IT部门', N'dream.li@shuion.com.cn', N'15001712100', N'李飞', N'IT', N'BF-022555', N'BF-022555', N'同意', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A5740162621F AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 8, 0, 0, N'IT-002-20151220005', 0, 0)
INSERT [dbo].[survery_lists] ([id], [activeid], [username], [dept], [email], [mobile], [ctrl1], [ctrl2], [ctrl3], [ctrl4], [ctrl5], [ctrl6], [ctrl7], [ctrl8], [ctrl9], [ctrl10], [ctrl11], [ctrl12], [ctrl13], [ctrl14], [ctrl15], [ctrl16], [ctrl17], [ctrl18], [ctrl19], [ctrl20], [ctrl21], [ctrl22], [ctrl23], [ctrl24], [ctrl25], [ctrl26], [ctrl27], [ctrl28], [ctrl29], [ctrl30], [createdate], [updatedate], [note1], [note2], [note3], [note4], [note5], [uid], [ispass], [treeid], [isdelete], [isfull], [orderno], [process], [auditstatus]) VALUES (5, 6, N'李正', N'IT部门', N'dream.li@shuion.com.cn', N'15001712100', N'申请购买AutoCAD', N'2016', N'4', N'同意', N'同意', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', N'', CAST(0x0000A57401628160 AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, 9, 0, 0, N'IT-003-20151220006', 0, 0)
SET IDENTITY_INSERT [dbo].[survery_lists] OFF
/****** Object:  Table [dbo].[survery_defineactive]    Script Date: 12/20/2015 22:36:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[survery_defineactive]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[survery_defineactive](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_defineactive_adddate]  DEFAULT (getdate()),
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[status] [int] NULL,
	[begintime] [datetime] NULL,
	[endtime] [datetime] NULL,
	[allowmultivote] [int] NULL CONSTRAINT [DF_survery_defineactive_allowmultivote]  DEFAULT ((0)),
	[ispublic] [int] NULL CONSTRAINT [DF_survery_defineactive_ispublic]  DEFAULT ((0)),
	[ispublicresult] [int] NULL CONSTRAINT [DF_survery_defineactive_ispublicresult]  DEFAULT ((1)),
	[treeid] [int] NULL,
	[intro] [nvarchar](1000) NULL,
	[clientfun] [nvarchar](3000) NULL,
	[serverfun] [nvarchar](3000) NULL,
	[showinmyform] [int] NULL,
	[classname] [nvarchar](500) NULL,
	[prefix] [nvarchar](20) NULL,
 CONSTRAINT [PK_defineactive] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[survery_defineactive] ON
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult], [treeid], [intro], [clientfun], [serverfun], [showinmyform], [classname], [prefix]) VALUES (1, N'应聘人员登记表 ', CAST(0x0000A574015B6484 AS DateTime), 1, N'李正', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 1, 0, 1, 4, N'', NULL, NULL, 1, N'人事部', N'HR-001-')
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult], [treeid], [intro], [clientfun], [serverfun], [showinmyform], [classname], [prefix]) VALUES (2, N'出差申请表', CAST(0x0000A574015D79D6 AS DateTime), 1, N'李正', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 1, 0, 1, 5, N'', NULL, NULL, 1, N'人事部', N'HR-002-')
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult], [treeid], [intro], [clientfun], [serverfun], [showinmyform], [classname], [prefix]) VALUES (3, N'设备维修表', CAST(0x0000A574015E41D7 AS DateTime), 1, N'李正', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 1, 0, 1, 6, N'', NULL, NULL, 1, N'IT部门', N'IT-001-')
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult], [treeid], [intro], [clientfun], [serverfun], [showinmyform], [classname], [prefix]) VALUES (4, N'报销申请表', CAST(0x0000A57401601401 AS DateTime), 1, N'李正', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 1, 0, 1, 7, N'', NULL, NULL, 1, N'财务部', N'FIN-001-')
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult], [treeid], [intro], [clientfun], [serverfun], [showinmyform], [classname], [prefix]) VALUES (5, N'硬件报废表', CAST(0x0000A5740160AD4C AS DateTime), 1, N'李正', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 1, 0, 1, 8, N'', NULL, NULL, 1, N'IT部门', N'IT-002-')
INSERT [dbo].[survery_defineactive] ([id], [title], [adddate], [uid], [username], [status], [begintime], [endtime], [allowmultivote], [ispublic], [ispublicresult], [treeid], [intro], [clientfun], [serverfun], [showinmyform], [classname], [prefix]) VALUES (6, N'软件申请表', CAST(0x0000A57401612C00 AS DateTime), 1, N'李正', NULL, CAST(0x0000000000000000 AS DateTime), CAST(0x0000000000000000 AS DateTime), 1, 0, 1, 9, N'', NULL, NULL, 1, N'IT部门', N'IT-003-')
SET IDENTITY_INSERT [dbo].[survery_defineactive] OFF
/****** Object:  StoredProcedure [dbo].[sp_preparecustomPage]    Script Date: 12/20/2015 22:36:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_preparecustomPage]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE PROCEDURE  [dbo].[sp_preparecustomPage]   
(
@Sql nVARCHAR(4000),   
@CurrentPageNo  INT,   
@PageSize INT,   
@TotalNum INT OUTPUT  
)
AS   

SET NOCOUNT ON     

DECLARE @SqlCmd nVARCHAR(4000)     
SET @SqlCmd = ''SELECT * FROM ('' + @Sql + '') A WHERE RowIndex BETWEEN '' +    CONVERT(VARCHAR,(@CurrentPageNo-1) * @PageSize + 1) + '' AND '' +    CONVERT(VARCHAR,@CurrentPageNo * @PageSize)    
EXEC(@SqlCmd) 

IF @TotalNum = -1   
BEGIN    
CREATE TABLE #Temp1(num INT)     

INSERT INTO #Temp1 

EXEC(''SELECT count(*) FROM ('' + @Sql + '') A'')    

SELECT @TotalNum=(SELECT * FROM #Temp1)  

DROP TABLE #Temp1     

END  

 
' 
END
GO
/****** Object:  Table [dbo].[portal_votetitle]    Script Date: 12/20/2015 22:36:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_votetitle]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_votetitle](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[moduleid] [int] NOT NULL,
	[subject] [nvarchar](200) NULL,
	[expiredate] [datetime] NULL,
	[Isdisplayresult] [int] NULL,
	[optiontype] [nvarchar](50) NULL,
	[Allowvotemoretimes] [int] NULL,
	[createdate] [datetime] NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_votetitle] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_votequestions]    Script Date: 12/20/2015 22:36:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_votequestions]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_votequestions](
	[qid] [int] IDENTITY(1,1) NOT NULL,
	[question] [nvarchar](200) NULL,
	[tid] [int] NULL,
	[ps] [int] NULL CONSTRAINT [DF_portal_votequestions_ps]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_votequestions_1] PRIMARY KEY CLUSTERED 
(
	[qid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_tabsecurity]    Script Date: 12/20/2015 22:36:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_tabsecurity]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_tabsecurity](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[tabid] [int] NULL,
	[attribute] [nvarchar](50) NULL,
	[name] [nvarchar](50) NULL,
	[sectype] [nvarchar](50) NULL,
	[roletype] [int] NULL,
 CONSTRAINT [PK_portal_tabsecurity] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_tabsecurity] ON
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (1, 1, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (2, 2, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (3, 3, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (4, 4, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (5, 5, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (6, 6, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (7, 7, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (8, 8, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (9, 9, N'group', N'Everyone', N'tab', 0)
INSERT [dbo].[portal_tabsecurity] ([id], [tabid], [attribute], [name], [sectype], [roletype]) VALUES (10, 10, N'group', N'Everyone', N'tab', 0)
SET IDENTITY_INSERT [dbo].[portal_tabsecurity] OFF
/****** Object:  Table [dbo].[portal_tabs]    Script Date: 12/20/2015 22:36:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_tabs]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_tabs](
	[tabid] [int] IDENTITY(1,1) NOT NULL,
	[tabname] [nvarchar](200) NULL,
	[accessroles] [nvarchar](200) NULL,
	[taborder] [decimal](10, 4) NULL CONSTRAINT [DF_portal_tabs_taborder]  DEFAULT ((0)),
	[istop] [int] NULL CONSTRAINT [DF_portal_tabs_istop]  DEFAULT ((1)),
	[url] [nvarchar](300) NULL,
	[target] [nvarchar](50) NULL,
	[rewritename] [nvarchar](500) NULL,
	[newtabid] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_tabs] PRIMARY KEY CLUSTERED 
(
	[tabid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_tabs] ON
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (1, N'首页', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'/portal', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (2, N'企业新闻', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (3, N'流程表单', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (4, N'企业文档', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (5, N'公司简介', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (6, N'集团公告', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', N'')
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (7, N'活动图片', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (8, N'人事招聘', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (9, N'意见建议', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
INSERT [dbo].[portal_tabs] ([tabid], [tabname], [accessroles], [taborder], [istop], [url], [target], [rewritename], [newtabid]) VALUES (10, N'联系我们', N'Everyone;', CAST(0.0000 AS Decimal(10, 4)), 1, N'', N'', N'', NULL)
SET IDENTITY_INSERT [dbo].[portal_tabs] OFF
/****** Object:  Table [dbo].[portal_singlepage]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_singlepage]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_singlepage](
	[itemId] [int] IDENTITY(1,1) NOT NULL,
	[ModuleId] [int] NULL,
	[Uid] [int] NULL,
	[Catname] [nvarchar](50) NULL,
	[Contents] [nvarchar](max) NULL,
	[isshow] [int] NULL CONSTRAINT [DF_portal_singlepage_isshow]  DEFAULT ((1)),
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_singlepage_createdate]  DEFAULT (getdate()),
	[click] [int] NULL CONSTRAINT [DF_portal_singlepage_click]  DEFAULT ((0)),
	[username] [nvarchar](50) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_portal_singlepage_orderid]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_singlepage] PRIMARY KEY CLUSTERED 
(
	[itemId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_singlepage] ON
INSERT [dbo].[portal_singlepage] ([itemId], [ModuleId], [Uid], [Catname], [Contents], [isshow], [createdate], [click], [username], [orderid]) VALUES (1, 1, 1, N'集团简介', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>新华网是党中央直接部署，国家通讯社新华社主办的中央重点新闻网站。新华网创办于1997年11月7日，前身是新华通讯社网站，2000年3月正式更名为新华网。新华网以&ldquo;传播中国、报道世界&rdquo;为职责，以&ldquo;权威声音、亲切表达&rdquo;为理念，通过中（简、繁体）、英、法、西、俄、阿、日、藏、维等多种语言，24小时不间断发布全球新闻，是名副其实的&ldquo;网上新闻信息总汇&rdquo;。</p>
<p>依托新华社31个国内分社、170余个境外分支机构以及自有采编队伍，新华网形成了全球化新闻信息采集网络，在重大新闻和突发事件报道、权威信息发布方面形成了对其他新闻网站的比较优势，是中国网络媒体中传播力强、覆盖面广、资讯采集手段全、传播形态多样化的全媒体信息采编发平台。</p>
<p>新华网日均访问人次约5800万，页面浏览量约2.8亿，在全球近5亿个网站中的综合排名稳定在前150位。新华网的权威性和品牌影响力得到业界广泛认可，2012年被业内权威的《IT时代周刊》评为&ldquo;2012最受信赖的新闻网站&rdquo;，被《互联网周刊》评为&ldquo;2012年度最具影响力新闻门户&rdquo;并在该刊评出的中国商业网站百强排行榜上位列第九、新闻门户排行榜位列首位。</p>
<p>新华网拥有众多中国新闻奖和中国互联网站获奖作品和品牌栏目，《温家宝总理与网民在线交流》、&ldquo;新华直播&rdquo;等多篇报道和栏目荣获中国新闻奖一等奖；&ldquo;第一回应&rdquo;、&ldquo;新华网评&rdquo;、&ldquo;新华头条&rdquo;等获评中国互联网站品牌栏目。新华网还获得&ldquo;中国优秀文化网站&rdquo;、&ldquo;中国网站最具影响力品牌&rdquo;、&ldquo;中国新媒体年度十大品牌&rdquo;、&ldquo;中国新媒体创新年度品牌&rdquo;、&ldquo;中国互联网行业自律奖&rdquo;等业内重要奖项。</p>
<p>新华网是中国最大规模的政府网站集群的承建者，中国政府网、中国文明网、中国平安网等均由新华网负责网站内容、技术保障等承建工作。温家宝同志连续三次做客新华网和中国政府网访谈间，与网民在线交流。迄今为止，共有近百位省部级领导和数千位企业高层接受新华网和中国政府网联合专访。</p>
<p>近年来，随着市场化步伐的加快，新华网的商业价值日益得到认可，市场盈利能力和综合竞争力不断提高，2012年获评&ldquo;中国最具广告价值的网络媒体&rdquo;。目前，新华网已同100余家世界500强企业建立业务合作关系、与40余家4A级广告代理公司建立长期合作关系、网站供稿业务的客户包括新浪、网易、腾讯等主要商业网站，以及中国移动、中国电信和中国联通三家电信运营商。</p>
<p>在加强内容建设和市场竞争力的同时，新华网不断强化基础网络技术建设和应用功能拓展，自主研发能力进一步增强，在中央重点新闻网站中首获国家高新技术企业认定。先后推出了云盘、祝福、网址导航、好友、群组等10多项社区应用功能以及微博、新华足迹、新华云盘等移动客户端陆续上线，以位置服务、用户管理、社会关系、内容挖掘、移动应用等为中心的&ldquo;大数据+云端应用&rdquo;技术体系初步形成。16项具有完全自主知识产权的软件获得软件著作权证，2项技术发明专利进入实质审查阶段，另有1项技术发明专利初审合格。</p>
<p>2010年起，按照中央要求和新华社党组部署，新华网由文化事业单位向互联网文化企业转型，实行企业化运作。2011年3月新华网股份有限公司正式成立，并引入8家战略投资者，目前正在加紧推进股改上市进程。2012年，获评全国文化体制改革先进单位。</p>
</body>
</html>', 1, CAST(0x0000A57401511F36 AS DateTime), 0, N'李正', 0)
INSERT [dbo].[portal_singlepage] ([itemId], [ModuleId], [Uid], [Catname], [Contents], [isshow], [createdate], [click], [username], [orderid]) VALUES (2, 1, 1, N'企业文化', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><strong>愿景：最受尊敬的互联网企业</strong><br />不断倾听和满足用户需求，引导并超越用户需求，赢得用户尊敬；<br />通过提升企业地位与品牌形象，使员工具有高度的企业荣誉感和自豪感，赢得员工尊敬；<br />推动互联网行业的健康发展，与合作伙伴共同成长，赢得行业尊敬；<br />注重企业责任，关爱社会、回馈社会，赢得社会尊敬。</p>
</body>
</html>', 1, CAST(0x0000A57401513536 AS DateTime), 0, N'李正', 0)
INSERT [dbo].[portal_singlepage] ([itemId], [ModuleId], [Uid], [Catname], [Contents], [isshow], [createdate], [click], [username], [orderid]) VALUES (3, 1, 1, N'公司大记事', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>[ 2014-3-7 ] &nbsp;2014年1月22日，公司举行大型迎新春团拜会</p>
<p>[ 2014-2-20 ] &nbsp;2013年12月16日起，大华&middot;富贵家园到钦北区各乡镇派发挂历及春联</p>
<p>[ 2014-1-15 ] &nbsp;大华&middot;富贵家园于2013年12月29日正式启用</p>
<p>[ 2014-1-13 ] &nbsp;11月20日，大华&middot;富贵家园举行项目动工仪式</p>
<p>[ 2013-12-3 ] &nbsp;7月19日，我公司被评为&ldquo;钦州市2012年度优秀房地产开发企业&rdquo; [ 2013-8-23 ] &nbsp;我公司的房地产开发资质证书升级为贰级资质</p>
<p>[ 2013-7-22 ] &nbsp;7月12日，我公司向钦州市灵山县伯劳镇山塘村捐赠一批物资</p>
</body>
</html>', 1, CAST(0x0000A57401514694 AS DateTime), 0, N'李正', 0)
SET IDENTITY_INSERT [dbo].[portal_singlepage] OFF
/****** Object:  Table [dbo].[portal_rss]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_rss]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_rss](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[moduleid] [int] NOT NULL,
	[rssurl] [nvarchar](500) NULL,
	[cachetime] [int] NOT NULL,
	[number] [int] NULL,
	[uid] [int] NULL,
	[showintro] [int] NULL CONSTRAINT [DF_portal_rss_showintro]  DEFAULT ((0)),
	[showdate] [int] NULL CONSTRAINT [DF_portal_rss_showdate]  DEFAULT ((0)),
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_rss_createdate]  DEFAULT (getdate()),
	[username] [nvarchar](50) NULL,
	[proxyusername] [nvarchar](50) NULL,
	[proxypassword] [nvarchar](50) NULL,
	[isuseproxy] [int] NULL CONSTRAINT [DF_portal_rss_isuseproxy]  DEFAULT ((0)),
	[ip] [nvarchar](50) NULL,
	[port] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_rss] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_photoes]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_photoes]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_photoes](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_Photoes_createdate]  DEFAULT (getdate()),
	[username] [nvarchar](50) NULL,
	[uid] [int] NULL,
	[catid] [int] NULL,
	[ispass] [int] NULL CONSTRAINT [DF_portal_photoes_ispass]  DEFAULT ((0)),
	[groupid] [int] NULL,
	[istop] [int] NULL CONSTRAINT [DF_portal_photoes_istop]  DEFAULT ((0)),
	[url] [nvarchar](200) NULL,
	[thumpath] [nvarchar](100) NULL,
	[picpath] [nvarchar](100) NULL,
	[description] [nvarchar](3000) NULL,
	[focusnews] [int] NULL CONSTRAINT [DF_portal_photoes_focusnews]  DEFAULT ((1)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_photoes_orderid]  DEFAULT ((0)),
	[click] [int] NULL CONSTRAINT [DF_portal_photoes_click]  DEFAULT ((0)),
 CONSTRAINT [PK_photoes_Photoes] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_photoes] ON
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (1, N'美女照片', CAST(0x0000A574016D3FF2 AS DateTime), NULL, 1, 2, 1, 1, 1, N'', N'/portal/uploads/2015-12/S20151220221007.jpg', N'/portal/uploads/2015-12/201512202210_201403251118_1367822831_02840500.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (3, N'公司经理陪同市委书记参观工程', CAST(0x0000A574016DB6FC AS DateTime), NULL, 1, 2, 1, 3, 1, N'', N'/portal/uploads/2015-12/S20151220221147.jpg', N'/portal/uploads/2015-12/201512202211_公司经理陪同市委书记参观工程.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (4, N'参观图书馆', CAST(0x0000A574016DE12E AS DateTime), N'李正', 1, 2, 1, 3, 0, NULL, N'/portal/uploads/2015-12/s201512202212070.jpg', N'/portal/uploads/2015-12/201512202212070.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (5, N'歌手汪苏泷', CAST(0x0000A574016E2C39 AS DateTime), NULL, 1, 1, 1, 4, 1, N'', N'/portal/uploads/2015-12/S20151220221404.jpg', N'/portal/uploads/2015-12/201512202214_歌手.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (6, N'歌手2', CAST(0x0000A574016E738A AS DateTime), N'李正', 1, 1, 1, 4, 0, NULL, N'/portal/uploads/2015-12/s201512202214120.jpg', N'/portal/uploads/2015-12/201512202214120.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (7, N'歌手3', CAST(0x0000A574016E7391 AS DateTime), N'李正', 1, 1, 1, 4, 0, NULL, N'/portal/uploads/2015-12/s201512202214121.jpg', N'/portal/uploads/2015-12/201512202214121.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (8, N'美女照片', CAST(0x0000A574016E96F2 AS DateTime), NULL, 1, 1, 1, 5, 1, N'', N'/portal/uploads/2015-12/S20151220221453.jpg', N'/portal/uploads/2015-12/201512202214_201403251104_201307281958_5902983537690065699.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (9, N'金秀贤', CAST(0x0000A574016ECCFD AS DateTime), NULL, 1, 1, 1, 6, 1, N'', N'/portal/uploads/2015-12/S20151220221540.jpg', N'/portal/uploads/2015-12/201512202215_金秀贤.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (10, N'金秀贤2', CAST(0x0000A574016EE230 AS DateTime), N'李正', 1, 1, 1, 6, 0, NULL, N'/portal/uploads/2015-12/s201512202215460.jpg', N'/portal/uploads/2015-12/201512202215460.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (11, N'汤唯', CAST(0x0000A574016F43E4 AS DateTime), NULL, 1, 1, 1, 7, 1, N'', N'/portal/uploads/2015-12/S20151220221722.jpg', N'/portal/uploads/2015-12/201512202217_汤唯.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (12, N'汤唯2', CAST(0x0000A574016F587A AS DateTime), N'李正', 1, 1, 1, 7, 0, NULL, N'/portal/uploads/2015-12/s201512202217270.jpg', N'/portal/uploads/2015-12/201512202217270.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (14, N'陆星材2', CAST(0x0000A574017029B0 AS DateTime), N'李正', 1, 1, 1, 8, 0, NULL, N'/portal/uploads/2015-12/s201512202220260.jpg', N'/portal/uploads/2015-12/201512202220260.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (15, N'陆星材3', CAST(0x0000A574017029BB AS DateTime), N'李正', 1, 1, 1, 8, 0, NULL, N'/portal/uploads/2015-12/s201512202220261.jpg', N'/portal/uploads/2015-12/201512202220261.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (16, N'李冰冰', CAST(0x0000A57401714E2A AS DateTime), NULL, 1, 1, 1, 9, 1, N'', N'/portal/uploads/2015-12/S20151220222450.jpg', N'/portal/uploads/2015-12/201512202224_李冰冰.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (17, N'李冰冰3', CAST(0x0000A574017169E5 AS DateTime), N'李正', 1, 1, 1, 9, 0, NULL, N'/portal/uploads/2015-12/s201512202224590.jpg', N'/portal/uploads/2015-12/201512202224590.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (18, N'李冰冰2', CAST(0x0000A57401716A11 AS DateTime), N'李正', 1, 1, 1, 9, 0, NULL, N'/portal/uploads/2015-12/s201512202224591.jpg', N'/portal/uploads/2015-12/201512202224591.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (19, N'高圆圆', CAST(0x0000A5740171B8C8 AS DateTime), NULL, 1, 2, 1, 10, 1, N'', N'/portal/uploads/2015-12/S20151220222753.jpg', N'/portal/uploads/2015-12/201512202227_20140818224957_2tkUd.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (20, N'姚元浩', CAST(0x0000A57401731973 AS DateTime), NULL, 1, 2, 1, 11, 1, N'', N'/portal/uploads/2015-12/S20151220223120.jpg', N'/portal/uploads/2015-12/201512202231_姚元浩.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (21, N'姚元浩2', CAST(0x0000A57401732EFF AS DateTime), N'李正', 1, 2, 1, 11, 0, NULL, N'/portal/uploads/2015-12/s201512202231260.jpg', N'/portal/uploads/2015-12/201512202231260.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (22, N'陆星材', CAST(0x0000A5740173E20B AS DateTime), NULL, 1, 1, 1, 12, 1, N'', N'/portal/uploads/2015-12/S20151220223448.jpg', N'/portal/uploads/2015-12/201512202234_陆星材.jpg', N'', 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (23, N'陆星材2', CAST(0x0000A57401742620 AS DateTime), N'李正', 1, 1, 1, 12, 0, NULL, N'/portal/uploads/2015-12/s201512202234570.jpg', N'/portal/uploads/2015-12/201512202234570.jpg', NULL, 1, 0, 0)
INSERT [dbo].[portal_photoes] ([itemid], [title], [createdate], [username], [uid], [catid], [ispass], [groupid], [istop], [url], [thumpath], [picpath], [description], [focusnews], [orderid], [click]) VALUES (24, N'陆星材3', CAST(0x0000A5740174262B AS DateTime), N'李正', 1, 1, 1, 12, 0, NULL, N'/portal/uploads/2015-12/s201512202234571.jpg', N'/portal/uploads/2015-12/201512202234571.jpg', NULL, 1, 0, 0)
SET IDENTITY_INSERT [dbo].[portal_photoes] OFF
/****** Object:  Table [dbo].[portal_photocategory]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_photocategory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_photocategory](
	[catid] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](200) NULL,
	[uid] [int] NULL,
	[moduleid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_portal_photocategory_orderid]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_photocategory] PRIMARY KEY CLUSTERED 
(
	[catid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_photocategory] ON
INSERT [dbo].[portal_photocategory] ([catid], [catname], [uid], [moduleid], [username], [orderid]) VALUES (1, N'员工活动', 1, 9, N'李正', 0)
INSERT [dbo].[portal_photocategory] ([catid], [catname], [uid], [moduleid], [username], [orderid]) VALUES (2, N'领导活动', 1, 9, N'李正', 0)
SET IDENTITY_INSERT [dbo].[portal_photocategory] OFF
/****** Object:  Table [dbo].[portal_pagescontents]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pagescontents]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_pagescontents](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[moduleid] [int] NULL,
	[treeid] [int] NULL,
	[contents] [nvarchar](max) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_portal_pagescontents_orderid]  DEFAULT ((0)),
	[title] [nvarchar](200) NULL,
	[isshowtitle] [int] NULL CONSTRAINT [DF_portal_pagescontents_isshowtitle]  DEFAULT ((1)),
	[width] [nvarchar](50) NULL,
	[height] [nvarchar](50) NULL,
	[isdeleted] [int] NULL CONSTRAINT [DF_portal_pagescontents_isdeleted]  DEFAULT ((0)),
	[uid] [int] NULL,
 CONSTRAINT [PK_portal_pagescontents] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_pages]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pages]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_pages](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pagename] [nvarchar](50) NULL,
	[parentid] [int] NULL CONSTRAINT [DF_portal_pages_parentid]  DEFAULT ((0)),
	[orderid] [int] NULL CONSTRAINT [DF_portal_pages_orderid]  DEFAULT ((0)),
	[depth] [int] NULL CONSTRAINT [DF_portal_pages_depth]  DEFAULT ((1)),
	[note] [nvarchar](200) NULL,
	[path] [nvarchar](1000) NULL CONSTRAINT [DF_portal_pages_path]  DEFAULT (''),
	[types] [nvarchar](50) NULL,
	[moduleid] [int] NULL,
	[pageurl] [nvarchar](500) NULL,
	[tabid] [int] NULL,
	[inherit] [int] NULL CONSTRAINT [DF_portal_pages_inherit]  DEFAULT ((1)),
	[needaudit] [int] NULL CONSTRAINT [DF_portal_pages_needaudit]  DEFAULT ((0)),
	[ispublic] [int] NULL CONSTRAINT [DF_portal_pages_ispublic]  DEFAULT ((1)),
 CONSTRAINT [PK_portal_pages] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_pages] ON
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (1, N'人事部表单', 0, 0, 1, N'', N'.1.', N'pages', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (2, N'IT部门表单', 0, 0, 1, N'', N'.2.', N'pages', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (3, N'财务部表单', 0, 0, 1, N'', N'.3.', N'pages', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (4, N'应聘人员登记表 ', 1, 0, 1, N'', N'.4.', N'pagevote', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (5, N'出差申请表', 3, 0, 1, N'', N'.3.5.', N'pagevote', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (6, N'设备维修表', 2, 0, 1, N'', N'.2.6.', N'pagevote', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (7, N'报销申请表', 3, 0, 1, N'', N'.3.7.', N'pagevote', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (8, N'硬件报废表', 2, 0, 1, N'', N'.2.8.', N'pagevote', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (9, N'软件申请表', 2, 0, 1, N'', N'.2.9.', N'pagevote', 4, NULL, 3, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (10, N'人事部文档', 0, 0, 1, N'', N'.10.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (11, N'财务部文档', 0, 0, 1, N'', N'.11.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (12, N'IT文档', 0, 0, 1, N'', N'.12.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (13, N'规则制度', 0, 0, 1, N'', N'.13.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (14, N'招聘文档', 10, 0, 1, N'', N'.10.14.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (15, N'面试文档', 10, 0, 1, N'', N'.10.15.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
INSERT [dbo].[portal_pages] ([id], [pagename], [parentid], [orderid], [depth], [note], [path], [types], [moduleid], [pageurl], [tabid], [inherit], [needaudit], [ispublic]) VALUES (16, N'IT软件申请制度', 12, 0, 1, N'', N'.12.16.', N'pagedoc', 5, NULL, 4, 1, 0, 1)
SET IDENTITY_INSERT [dbo].[portal_pages] OFF
/****** Object:  Table [dbo].[portal_pageimage]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pageimage]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_pageimage](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](50) NULL,
	[imagedata] [image] NULL,
	[imagethumdata] [image] NULL,
	[filename] [nvarchar](50) NULL,
	[ext] [nvarchar](50) NULL,
	[length] [bigint] NULL,
	[contenttype] [nvarchar](50) NULL,
	[size] [decimal](18, 0) NULL,
	[createdate] [datetime] NULL,
	[treeid] [int] NULL,
	[mid] [int] NULL,
	[isdelete] [int] NULL,
	[uid] [int] NULL,
	[ispass] [int] NULL CONSTRAINT [DF_portal_pageimage_ispass]  DEFAULT ((0)),
	[guid] [uniqueidentifier] NULL CONSTRAINT [DF_portal_pageimage_guid]  DEFAULT (newid()),
	[click] [int] NULL CONSTRAINT [DF_portal_pageimage_click]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_pageimage] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_pageform]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pageform]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_pageform](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](50) NULL,
	[title] [nvarchar](300) NULL,
	[contents] [nvarchar](max) NULL,
	[treeid] [int] NULL,
	[mid] [int] NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_portal_pageform_isdelete]  DEFAULT ((0)),
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_pageform_createdate]  DEFAULT (getdate()),
	[uid] [int] NULL,
	[titleimg] [nvarchar](500) NULL,
	[titlelink] [nvarchar](500) NULL,
	[intro] [nvarchar](1000) NULL,
	[prev1] [nvarchar](1000) NULL,
	[prev2] [nvarchar](1000) NULL,
	[ispass] [int] NULL CONSTRAINT [DF_portal_pageform_ispass]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_pageform] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_pagedoc]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_pagedoc]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_pagedoc](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[username] [nvarchar](50) NULL,
	[docs] [image] NULL,
	[filename] [nvarchar](500) NULL,
	[ext] [nvarchar](50) NULL,
	[length] [bigint] NULL,
	[contenttype] [nvarchar](500) NULL,
	[size] [decimal](18, 0) NULL,
	[doctype] [nvarchar](500) NULL,
	[docname] [nvarchar](500) NULL,
	[docno] [nvarchar](500) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_hr_docs_createdate]  DEFAULT (getdate()),
	[isdelete] [nvarchar](10) NULL CONSTRAINT [DF_hr_docs_isdelete]  DEFAULT ((0)),
	[treeid] [int] NULL,
	[mid] [int] NULL,
	[uid] [int] NULL,
	[ispass] [int] NULL CONSTRAINT [DF_portal_pagedoc_ispass]  DEFAULT ((0)),
	[mUrl] [nvarchar](300) NULL,
	[guid] [uniqueidentifier] NULL CONSTRAINT [DF_portal_pagedoc_guid]  DEFAULT (newid()),
	[click] [int] NULL CONSTRAINT [DF_portal_pagedoc_click]  DEFAULT ((0)),
 CONSTRAINT [PK_hr_history] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_pagedoc] ON
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (1, N'李正', 0x74657374, N'HR员工公积金缴纳提取说明.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740167AE19 AS DateTime), N'0', 10, 5, 1, 0, N'', N'3fb704d9-0e8a-4196-ae28-8d2710434e61', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (2, N'李正', 0x74657374, N'HR员工奖罚制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740167AE1B AS DateTime), N'0', 10, 5, 1, 0, N'', N'ab973610-bcb6-4eda-9d01-54ffd6c11e4a', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (3, N'李正', 0x74657374, N'HR员工请假制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740167AE1B AS DateTime), N'0', 10, 5, 1, 0, N'', N'608af4a5-8460-4131-ab6a-699da0df66f2', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (4, N'李正', 0x74657374, N'HR员工医保卡使用规范.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740167AE1B AS DateTime), N'0', 10, 5, 1, 0, N'', N'766dae2e-ca1b-489a-ae33-5544e3aa3c64', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (5, N'李正', 0x74657374, N'办公制服购买制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740167AE1C AS DateTime), N'0', 10, 5, 1, 0, N'', N'28a079d0-b247-42b0-b134-017e3ec580e9', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (6, N'李正', 0x74657374, N'IT电脑硬件采购制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740167D4AE AS DateTime), N'0', 16, 5, 1, 0, N'', N'be59e786-aa45-40be-8531-0663366c352c', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (7, N'李正', 0x74657374, N'人事培训申请表.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A57401693A53 AS DateTime), N'0', 13, 5, 1, 0, N'', N'93197411-a8b4-41f8-8784-a380a88d6d74', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (8, N'李正', 0x74657374, N'公司员工服装制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A57401697C9D AS DateTime), N'0', 13, 5, 1, 0, N'', N'428d5777-f094-4002-ae33-b48f9b45ca80', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (9, N'李正', 0x74657374, N'公司员工手册.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A57401697C9D AS DateTime), N'0', 13, 5, 1, 0, N'', N'add438f1-fbd1-43c4-a4d9-9ddec142ec49', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (10, N'李正', 0x74657374, N'请假加班制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A57401697CAB AS DateTime), N'0', 13, 5, 1, 0, N'', N'ed701f8b-449c-443f-95e4-0e2a9dccc6e8', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (11, N'李正', 0x74657374, N'人事出差制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A57401697CAB AS DateTime), N'0', 13, 5, 1, 0, N'', N'583d853c-005e-4c29-868d-dea710a45fab', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (12, N'李正', 0x74657374, N'人事培训制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A57401697CAB AS DateTime), N'0', 13, 5, 1, 0, N'', N'378f1e03-9f72-40fe-b945-4bec1a2e952e', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (13, N'李正', 0x74657374, N'财务报销制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740169AB2E AS DateTime), N'0', 13, 5, 1, 0, N'', N'94b43b02-7871-46a4-af7f-4151e37106cf', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (14, N'李正', 0x74657374, N'迟到早退制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740169AB38 AS DateTime), N'0', 13, 5, 1, 0, N'', N'05afa879-7174-43a3-b286-efcc5b508e67', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (15, N'李正', 0x74657374, N'行政用车制度.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A5740169AB38 AS DateTime), N'0', 13, 5, 1, 0, N'', N'3afa40d0-c9a7-4192-8227-9ada35226bf6', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (16, N'李正', 0x74657374, N'关于员工离职申请表的说明.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A574016A3DBE AS DateTime), N'0', 10, 5, 1, 0, N'', N'7b5e2ed7-86f9-4203-aa68-d114311021ed', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (17, N'李正', 0x74657374, N'员工请假申请表.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A574016A3DBF AS DateTime), N'0', 10, 5, 1, 0, N'', N'20271e02-abcb-4ed9-a3b0-b65138edbd88', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (18, N'李正', 0x74657374, N'职工养老金领养指南.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A574016A3DBF AS DateTime), N'0', 10, 5, 1, 0, N'', N'8e3d5267-32eb-4e44-896b-8d9ab63eade7', 0)
INSERT [dbo].[portal_pagedoc] ([id], [username], [docs], [filename], [ext], [length], [contenttype], [size], [doctype], [docname], [docno], [createdate], [isdelete], [treeid], [mid], [uid], [ispass], [mUrl], [guid], [click]) VALUES (19, N'李正', 0x74657374, N'住房公积金制度规范.doc', N'doc', 4, N'application/msword', CAST(0 AS Decimal(18, 0)), NULL, NULL, NULL, CAST(0x0000A574016A3DBF AS DateTime), N'0', 10, 5, 1, 0, N'', N'53f279ee-5de7-43f8-a7be-fbbe176d5bf4', 0)
SET IDENTITY_INSERT [dbo].[portal_pagedoc] OFF
/****** Object:  Table [dbo].[Portal_page_audit_log]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_page_audit_log]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Portal_page_audit_log](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[itemid] [int] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_purchase_log_createdate]  DEFAULT (getdate()),
	[contents] [nvarchar](800) NULL,
	[opusername] [nvarchar](100) NULL,
	[result] [nvarchar](200) NULL,
	[ip] [nvarchar](50) NULL,
	[isread] [int] NULL CONSTRAINT [DF_purchase_log_isread]  DEFAULT ((0)),
	[fromid] [int] NULL,
	[toid] [int] NULL,
	[apptype] [nvarchar](200) NULL,
	[isprocess] [int] NULL CONSTRAINT [DF_appform_log_isprocess]  DEFAULT ((0)),
	[treeid] [int] NULL,
 CONSTRAINT [PK_purchase_log] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_newstag]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_newstag]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_newstag](
	[tagname] [nvarchar](50) NOT NULL,
	[counts] [int] NULL,
 CONSTRAINT [PK_portal_newstag] PRIMARY KEY CLUSTERED 
(
	[tagname] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_newspages]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_newspages]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_newspages](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[newsid] [int] NULL,
	[pageIndex] [int] NULL,
	[pageContents] [nvarchar](max) NULL,
	[pageTitle] [nvarchar](100) NULL,
	[pageStyle] [nvarchar](100) NULL,
	[isdeleted] [int] NULL CONSTRAINT [DF_portal_newspages_isdeleted]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_newspages] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_newscategory]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_newscategory]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_newscategory](
	[catid] [int] IDENTITY(1,1) NOT NULL,
	[moduleid] [int] NULL,
	[catname] [nvarchar](50) NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_portal_newscategory_orderid]  DEFAULT ((0)),
	[opusername] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_newscategory] PRIMARY KEY CLUSTERED 
(
	[catid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_newscategory] ON
INSERT [dbo].[portal_newscategory] ([catid], [moduleid], [catname], [uid], [username], [orderid], [opusername]) VALUES (1, 2, N'企业新闻', 1, N'李正', 0, N'admin')
INSERT [dbo].[portal_newscategory] ([catid], [moduleid], [catname], [uid], [username], [orderid], [opusername]) VALUES (2, 2, N'行业新闻', 1, N'李正', 0, N'admin')
SET IDENTITY_INSERT [dbo].[portal_newscategory] OFF
/****** Object:  Table [dbo].[portal_news]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_news]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_news](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](500) NULL,
	[catid] [int] NULL,
	[contents] [nvarchar](max) NULL,
	[style] [nvarchar](200) NULL,
	[issubmit] [int] NULL,
	[adddate] [datetime] NULL CONSTRAINT [DF_portal_news_adddate]  DEFAULT (getdate()),
	[url] [nvarchar](200) NULL,
	[titleimg] [nvarchar](300) NULL,
	[click] [int] NULL CONSTRAINT [DF_portal_news_click]  DEFAULT ((0)),
	[intro] [nvarchar](1000) NULL,
	[littletitle] [nvarchar](200) NULL,
	[source] [nvarchar](100) NULL,
	[sourcelink] [nvarchar](200) NULL,
	[author] [nvarchar](50) NULL,
	[comment] [int] NULL,
	[isshenhe] [int] NULL CONSTRAINT [DF_portal_news_isshenhe]  DEFAULT ((1)),
	[tags] [nvarchar](100) NULL,
	[toptype] [int] NULL CONSTRAINT [DF_portal_news_toptype]  DEFAULT ((0)),
	[picpath] [nvarchar](100) NULL,
	[moduleid] [int] NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[remarkcounts] [int] NULL CONSTRAINT [DF_portal_news_remarkcount]  DEFAULT ((0)),
	[isdeleted] [int] NULL CONSTRAINT [DF_portal_news_isdelete]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_news] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_news] ON
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (1, N'在淘汰落后产能的背后有一系列非常复杂的问题', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><span id="ContentPlaceHolder1_lbl_title">其实有些时候，之所以有些政策的执行力度不够，是因为实际上要考虑的问题有很多，在淘汰落后产能的背后有一系列非常复杂的问题，如果要强制关停部分排污不合格的钢厂，那么对于当地政府的税收收入、下岗职工再就业等便会造成不利影响。有的时候不是政府不想做而是不敢做。虽然现阶段，国家发布通知，不再以GDP论英雄，甚至将淘汰落后产能作为绩效考核之中，所以，现阶段地区政府开始下狠手，但是谁又能知道其能否长期坚持下去呢。如果说只停一下做做样子，事情的热潮退去后，又重新开始生产，那么便不能真实的解决淘汰落后产能的问题</span></p>
</body>
</html>', N'', NULL, CAST(0x0000A57401524483 AS DateTime), N'', N'', 0, N'', N'在淘汰落后产能的背后有一系列非常复杂的问题', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (2, N'钢铁煤炭转型遭遇“转啥啥过剩”苦恼 ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>&ldquo;经济增速放缓是长期的。短期内，钢铁行业会一蹶不振，而焦炭行业产能过剩，没法转型，转哪儿都是过剩。虽然现在季节是春天，但行业的冬天还在后面。&rdquo;山西焦炭集团总经理张岗峰日前在&ldquo;2014年国际炼焦煤资源与市场高峰论坛&rdquo;上如此表示。</p>
<p>张岗峰的悲观和焦虑情绪在行业内有一定代表性。</p>
<p>中钢协网站消息，钢铁业2014年1、2月份行业效益比前两年更差，1月份重点统计单位又出现亏损，亏损金额达10亿元，企业亏损面达43%，创历史新高。2月份的情况也不好。&ldquo;今年一季度可能是钢铁行业进入新世纪以来效益最差的一季度。这个信号</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401525939 AS DateTime), N'', N'', 0, N'', N'钢铁煤炭转型遭遇“转啥啥过剩”苦恼 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (3, N'钢市是否卷入产能越淘越多怪圈中 ', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>加快淘汰落后产能,优化重点行业区域布局,对环境敏感区重污染企业实施搬迁改造;推进能源清洁利用,优化煤炭利用方式,增加天然气供应。从2013年开始，这些话语便在我们的身边频繁的出现，其实从&ldquo;十二五&rdquo;开始，国家就将淘汰落后产能作为重要事件处理，但是始终逃脱不了产能越淘越多的怪圈，其实笔者认为，现阶段国家开的&ldquo;药方&rdquo;已经差不多了，关键还是要看&ldquo;煎药&rdquo;的过程。简而言之，就是要看政府等利益集团对于钢铁过剩产能的处理方法及执行力度了</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401527C15 AS DateTime), N'', N'', 0, N'', N'钢市是否卷入产能越淘越多怪圈中 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (4, N'钢材价创20年新低 民企受影响最深', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中钢协副会长刘振江近日称，&ldquo;今年一季度可能是钢铁行业进入新世纪以来效益最差的一季度。这个信号很强烈，这个信号给企业的感觉是现在才开始或真正进入冬天&rdquo;</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740152A4DF AS DateTime), N'', N'', 0, N'', N'钢材价创20年新低 民企受影响最深', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (5, N'中铁物资集团云南有限公司集中(钢材)采购招标 ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>本招标项目新建成都至贵阳铁路乐山至贵阳段工程已由国家发展改革委以《国家发展改革委关于新建成都至贵阳铁路乐山至贵阳段可行性研究报告的批复》(发改基础[2010]2862号)、中国铁路总公司以《中国铁路总公司关于新建成都至贵阳铁路乐山至贵阳段初步设计的批复》(铁总办函[2013]568号)批准建设</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740152BEA5 AS DateTime), N'', N'', 0, N'', N'中铁物资集团云南有限公司集中(钢材)采购招标 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (6, N'海鑫钢铁：经营失策还是转型成功', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>日前，一则媒体报道将山西富豪李兆会推上了舆论争议的风口浪尖。这篇报道指，山西最大民营钢企海鑫钢铁集团，已陷入经营危机。而导致危机的主要原因，是掌门人李兆会&ldquo;并没有把心思放在企业上，不是把它作为事业来做的&rdquo;，最主要的表现是其&ldquo;很少和政府和行业组织打交道&rdquo;。由此，作为前山西首富李海仓之子的李兆会被指为&ldquo;败家子&rdquo;。</p>
<p>海鑫钢铁作为李海仓生前一手创办且最为珍视的事业，如果真因为接班人李兆会的无能而陷入衰落甚至破产的地步，那么&ldquo;败家子&rdquo;的大帽只怕是要稳稳戴上。可事实上，李兆会对海鑫钢铁&ldquo;不上心&rdquo;，却并不代表他对其他商业机会也&ldquo;不上心&rdquo;，相反他在继承家业后，进行了大量的资本市场运作和金融投资，并且至今为止获得了相当不错的收益。若从李氏名下整体财富的变化评判，李兆会显然和&ldquo;败家子&rdquo;有着相当的差距。</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740152D561 AS DateTime), N'', N'', 0, N'', N'海鑫钢铁：经营失策还是转型成功', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (7, N'2014年钢铁业面临的两个困境 ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>钢铁业2014年1、2月份行业效益比前两年更差，1月份重点统计单位又出现亏损，亏损金额达10亿元，企业亏损面达43%，创历史新高，钢企生存越来越艰难了，转型升级、摆脱当前困境是摆在所有钢铁企业面前最为急迫的事情。</p>
<p>目前钢铁业面临两个困境，一个是企业盈利水平急剧下降，市场占用率不高;第二个是产业水平比较低，造成排放大，能源消耗大，环境承受不了。转型升级，走新型工业化道路，是破解低迷的钢铁业的根本出路</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740152EC7A AS DateTime), N'', N'', 0, N'', N'2014年钢铁业面临的两个困境 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (8, N'对环境的承载力也带来了越来越大的压力', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>由于重工业对资源的需求量大，对环境的承载力也带来了越来越大的压力，因而大家对转型升级的期待也越来越急迫，工业转型升级刻不容缓。然钢铁业的转型升级和绿色发展是一个长期的过程，涉及到方方面面，在实际操作中不能单打一面，必须形成&lsquo;组合拳&rsquo;。通过压缩过剩产能、兼并重组、产品转型升级、转移过剩产能等多种方式，释放市场空间，这样钢铁业才能有良好的发展。</p>
<p>中央已明确表态不会有大规模刺激政策出台。政府坚持经济转型的决心十分坚定，面对严峻的市场形势，部分钢企开始需求产业的转型升级。国内钢铁企业都在抓紧整合，淘汰落后产能，一些小钢铁企业有可能退出或被兼并，进而形成较大规模的钢铁集团。同时，大型钢铁集团也会在提高精品比例上下功夫，如进行相应的技术改造。</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401530195 AS DateTime), N'', N'', 0, N'', N'对环境的承载力也带来了越来越大的压力', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (9, N'信达策略汇:继续看好房地产和京津冀题材', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>受房地产再融资和京津冀一体化消息影响,昨天房地产板块和京津冀概念成为两市不多的亮点。但大盘仍然乏力,尾盘再度收到2000点以下,显示市场仍处于弱势格局。不过,正如昨天我们提示投资者的那样,目前利空释放地已经比较充分,投资者不应过度悲观。&nbsp;&nbsp;&nbsp; 我们认为,房地产再融资放开以后,投资者可以关注房地产板块的一些反弹,目前部分上市房企高管增持股票,说明管理层对其未来市值是有信心的,毕竟目前房地产估值已经很低了。部分投资者担心今年房地产销售数据不乐观,可能使市场担心未来房企上市公司风险较高。但是我们认为回顾过去几年房地产板块估值和业绩的表现可以看出,虽然房地产上市公司的业绩一直很好,但是二级市场却有较大波动,这说明股票波动主要受政策压制而非公司基本面影响。再融资放开以后,政策的压制将不复存在,&ldquo;分类调控&rdquo;的思路在三四线城市对房企也将主要起正面作用。如果投资者过分担心楼市下跌风险,可以关注一线地产开发商,这些上市公司的基本面比较健康,较少受楼市下跌风险影响。</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153173F AS DateTime), N'', N'', 0, N'', N'信达策略汇:继续看好房地产和京津冀题材', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (10, N'应防范对房地产市场“不恰当刺激” ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>官方高层智囊机构国务院发展研究中心的一份报告显示，前些年房地产投资持续高速增长的态势将难以为继，未来房地产开发投资增速回落是客观规律，这一阶段最需要防范的是对房地产市场进行不恰当的刺激。</p>
<p>　　昨天，中国发展高层论坛发布&ldquo;中国改革的机遇与挑战&rdquo;背景研究报告，国研中心市场经济研究所课题组分析了当前房地产市场的问题和风险点。</p>
<p>　　<strong>高房价使潜在风险持续积累</strong></p>
<p>　　报告称，截至今年1月，一线城市成交土地出让的楼面均价已达10158元。报告认为，一线城市和部分二线城市地价过快上涨，会催生两类风险：一是短期内强化房价继续较快上涨的预期，进一步推高房价；二是存量房较多的城市(如杭州)，开发商采取降价策略回收资金，会增加开发商财务风险，导致开发周期延长，不能及时提供住房，甚至出现资金链紧张、导致土地闲置等现象。</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401532D3B AS DateTime), N'', N'', 0, N'', N'应防范对房地产市场“不恰当刺激” ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (11, N'房地产信托产品门槛抬高 ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>数据显示，自去年开始，房地产信托已经开始提高项目选择门槛，今年成立的集合类房地产信托产品规模较去年同期减少10%。&ldquo;从我们所接触的项目来看，去年开始信托对地产项目就在收紧，尤其是三四线城市的地产信托项目，已经很少看到了。&rdquo;格上理财分析师王燕娱说，&ldquo;在开发商选择上，信托越来越倾向于选择百强等有实力的开发商。&rdquo;</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153427C AS DateTime), N'', N'', 0, N'', N'房地产信托产品门槛抬高 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (12, N'首届中国房地产社区责任论坛在北京举行', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>本届论坛通过搭建思想交流、观点碰撞以及智慧分享的平台，汇集房地产界、金融界、政府机构和公益界的杰出人物和领袖，深入探讨房地产行业的变革路径，寻找与重塑行业的未来。<br />　　中国扶贫基金会副会长江绍高在讲话中说，中共中央、国务院日前印发的《国家新型城镇化规划(2014-2020)》提出：健全社区党组织领导的基层群众自治制度，推进社区居民依法民主管理社区公共事务和公益事业在城市，以人为核心的重要生活载体是社区。社区是城市文明和社会发育的&ldquo;细胞&rdquo;。社区影响着一个城市的整体发展水平和文明程度。社会对城镇社区的发展尤为关注，社区商业和公益服务将成为社区发展的重要方向。</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401535634 AS DateTime), N'', N'', 0, N'', N'首届中国房地产社区责任论坛在北京举行', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (13, N'房地产板块现涨停潮 ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>申银万国证券大连营业部投资顾问崔强认为，房地产行业的销售不悲观，三四线保持稳定，货币政策取向是未来关键。从数据看，2014年1-2月全国商品房销售面积10466万平方米，同比下降0.1%，增速较2013年12月回落0.8个百分点，高于市场的预期。1-2月销售下滑并不意外，也与春节之后杭州等城市出现个别楼盘降价、中介机构到访量及去化率下降等微观情况较为一致，但下滑幅度小于市场预期，差异主要在于三四线城市的销售仍然比较保持平稳增长。目前行业基本面及股价逐步筑底，而龙头公司的PB已在1倍左右，但目前仍在左侧，可逐渐配置，但更建议右侧再出手。在销售回升趋势下，建议优选华夏幸福、万科、阳光</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401536A9E AS DateTime), N'', N'', 0, N'', N'房地产板块现涨停潮 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (14, N'做房地产就像喝酒 不能一味喝高去追求暴利', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>3月22日-24日，&ldquo;中国发展高层论坛2014&rdquo;年会在京召开，本届论坛以&ldquo;全面深化改革的中国&rdquo;为主题，围绕新型城镇化、财税体制改革、社会保障体制建设、开放型经济体制建设、国企改革等一系列重大问题进行探讨。万通控股董事长冯仑在出席&ldquo;2014中国发展高层论坛&mdash;房地产</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401538731 AS DateTime), N'', N'', 0, N'', N'做房地产就像喝酒 不能一味喝高去追求暴利', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (15, N'房地产市场将“因城因地”调控 ', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>据新华社北京3月22日电&nbsp; 在此间举办的中国发展高层论坛2014年会上，无论行业领袖还是专家学者们都越来越清晰地认识到，曾经&ldquo;一人感冒，全家吃药&rdquo;的一刀切调控方式正发生改变，2014年房地产市场分类调控、因地制宜的新思路已然清晰可见。</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153A2FB AS DateTime), N'', N'', 0, N'', N'房地产市场将“因城因地”调控 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (16, N'未来房地产市场的区域分化仍将继', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>华润集团董事长宋林认为，未来房地产市场的区域分化仍将继续。&ldquo;一线城市房价上涨的动力与其他三四线城市不一样，未来还有继续上涨的空间。至于三四线城市房价，我想已经进入调整期。 &rdquo;他说。在非热点的二线、以及相当数量的三四线城市，当前房地产市场却面临着持续增大的去库存压力。</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153BECC AS DateTime), N'', N'', 0, N'', N'未来房地产市场的区域分化仍将继', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (17, N'房地产供需逆转说正不正确', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>从目前整个中国楼市的供需结构上看，确实基本上已经告别了前期的严重供不应求的状态，但这种状况已经维持了好几年，并不是今年才出现的。目前全国的房地产供需比大约为120%，这对房地产来说就是供需相对均衡的状态。但现在看来，对应前一阵说的双向调控，城市之间的分化开始比较严重，全国房产相对过剩城市比例约为37%。这37%的过剩城市，基本上就是集中在三四线。我们再来对比去年的拿地增速数据：2013年一线城市土地出让面积上升7%</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153D4E1 AS DateTime), N'', N'', 0, N'', N'房地产供需逆转说正不正确', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (18, N'向松祚：房地产严重过剩 拐点已经到来', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>据经济之声《天下财经》报道，&ldquo;房地产出现了相当严重的过剩，房地产拐点已经到来。&rdquo;这是中国农业银行首席经济学家向松祚昨天在2014上海铜铝峰会上做出的判断。</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153E987 AS DateTime), N'', N'', 0, N'', N'向松祚：房地产严重过剩 拐点已经到来', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (19, N'重庆上榜2014年城市房地产投资价值城市 ', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><img style="max-width: 700px;" src="http://120.24.86.232/portal/uploads/2014-03/201403231516_100742537.jpg" alt="" /></p>
<p>当越来越多的品牌房企将注意力重新集中在一线城市时，一张新的&ldquo;机会路线图&rdquo;直指中西部广袤的二三线城市。近日，记者综合世联地产与中原集团等机构研究报告发现，中西部地区的房地产市场确实存在大量可以投资的城市，其中成都、重庆、西安等城市均为具投资性的热点区域。</p>
</body>
</html>', N'', NULL, CAST(0x0000A5740153FEBC AS DateTime), N'', N'', 0, N'', N'重庆上榜2014年城市房地产投资价值城市 ', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (20, N'房地产板块大涨3%，个股继续走强', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>大智慧阿思达克通讯社3月21日讯，周五下午，地产股继续走强，截至13：26，大智慧房地产指数涨幅达到3.07%。</p>
<p class="Para">　　龙头股涨幅有所扩大，招商地产（000024.SZ）涨逾6%，万科A（000002.SZ）涨幅超过5%，保利地产（600048.SH）、金地集团（600383.SH）分别涨逾4%和3%。</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401542121 AS DateTime), N'', N'', 0, N'', N'房地产板块大涨3%，个股继续走强', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (21, N'硅谷风投市场降温 创业公司迎来最艰难时刻', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p style="text-indent: 2em;">硅谷资本市场正在降温，虽然还没有达到崩溃的程度。但企业估值开始下滑，随随便便就能获得投资的年代已经结束。</p>
<p style="text-indent: 2em;">基于对十几位风险投资家和科技投资者的采访，对于那些尚未证明自己商业模式，以及以不可思议的高估值获得投资的初创公司，2016年将是投资者为他们&ldquo;打分&rdquo;的一年。</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401545DAA AS DateTime), N'', N'', 0, N'', N'硅谷风投市场降温 创业公司迎来最艰难时刻', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (22, N'苹果Siri的这十三个功能，你可能还不知道', 2, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>有了Siri，你可以检查苏打水中含多少卡路里，还能知道空中有多少飞机正飞过</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401547969 AS DateTime), N'', N'', 0, N'', N'苹果Siri的这十三个功能，你可能还不知道', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
INSERT [dbo].[portal_news] ([itemid], [title], [catid], [contents], [style], [issubmit], [adddate], [url], [titleimg], [click], [intro], [littletitle], [source], [sourcelink], [author], [comment], [isshenhe], [tags], [toptype], [picpath], [moduleid], [uid], [username], [remarkcounts], [isdeleted]) VALUES (23, N'启明星门户网站V10.0测试版发布', 1, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>启明星门户网站V10.0测试版发布</p>
<p>&nbsp;</p>
</body>
</html>', N'', NULL, CAST(0x0000A57401739649 AS DateTime), N'', N'', 0, N'', N'启明星门户网站V10.0测试版发布', N'', N'', N'', 0, 1, N'', 0, NULL, 2, 1, N'李正', 0, 0)
SET IDENTITY_INSERT [dbo].[portal_news] OFF
/****** Object:  Table [dbo].[portal_mycustom]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_mycustom]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_mycustom](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[myid] [int] NULL,
	[url] [nvarchar](400) NULL,
	[name] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_mycustom] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_modules]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_modules]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_modules](
	[moduleid] [int] IDENTITY(1,1) NOT NULL,
	[modulename] [nvarchar](50) NULL,
	[editroles] [nvarchar](1000) NULL,
	[moduledefid] [int] NULL,
	[panelname] [nvarchar](50) NULL,
	[cachetimeout] [int] NULL CONSTRAINT [DF_portal_modules_cachetimeout]  DEFAULT ((0)),
	[moduleorder] [int] NULL CONSTRAINT [DF_portal_modules_moduleorder]  DEFAULT ((0)),
	[tabid] [int] NULL,
	[width] [int] NULL CONSTRAINT [DF_portal_modules_width]  DEFAULT ((0)),
	[height] [int] NULL CONSTRAINT [DF_portal_modules_height]  DEFAULT ((0)),
	[cssclass] [nvarchar](50) NULL CONSTRAINT [DF_portal_modules_cssclass]  DEFAULT (''),
	[showhand] [int] NULL CONSTRAINT [DF_portal_modules_showhand]  DEFAULT ((0)),
	[css] [nvarchar](3000) NULL,
	[isdelete] [int] NULL CONSTRAINT [DF_portal_modules_isdelete]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_modules] PRIMARY KEY CLUSTERED 
(
	[moduleid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_modules] ON
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (1, N'新模块名称', N'', 8, N'LeftPanel', 10, 1, 5, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (2, N'新模块名称', N'', 10, N'LeftPanel', 10, 2, 2, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (3, N'新模块名称', N'', 6, N'LeftPanel', 10, 3, 6, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (4, N'新模块名称', N'', 13, N'LeftPanel', 10, 4, 3, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (5, N'新模块名称', N'', 13, N'LeftPanel', 10, 5, 4, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (6, N'新模块名称', N'', 12, N'LeftPanel', 10, 6, 8, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (7, N'新模块名称', N'', 9, N'LeftPanel', 10, 7, 9, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (8, N'新模块名称', N'', 1, N'LeftPanel', 10, 8, 10, 0, 0, N'', 0, NULL, 0)
INSERT [dbo].[portal_modules] ([moduleid], [modulename], [editroles], [moduledefid], [panelname], [cachetimeout], [moduleorder], [tabid], [width], [height], [cssclass], [showhand], [css], [isdelete]) VALUES (9, N'新模块名称', N'', 11, N'LeftPanel', 10, 9, 7, 0, 0, N'', 0, NULL, 0)
SET IDENTITY_INSERT [dbo].[portal_modules] OFF
/****** Object:  Table [dbo].[portal_moduledefinitions]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_moduledefinitions]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_moduledefinitions](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[moduledefid] [int] NULL CONSTRAINT [DF_portal_moduledefinitions_moduledefid]  DEFAULT ((0)),
	[friendlyname] [nvarchar](50) NULL,
	[sourcefile] [nvarchar](100) NULL,
	[intro] [nvarchar](500) NULL,
	[cachetime] [int] NULL CONSTRAINT [DF_portal_moduledefinitions_cachetime]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_moduledefinitions] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_moduledefinitions] ON
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (1, 1, N'编辑器HTML', N'HtmlModule.ascx', N'HTML', 11)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (2, 2, N'链接Link', N'links.ascx', N'Link', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (3, 3, N'订阅RSS', N'RssModule.ascx', N'RSS', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (4, 4, N'框架IFrame', N'FrameModule.ascx', N'IFrame', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (5, 5, N'下载Doc', N'Document.ascx', N'Doc', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (6, 6, N'通知Announce', N'Announcements.ascx', N'Announce', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (7, 7, N'投票Vote', N'VoteModule.ascx', N'Vote', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (8, 8, N'单页面Singlepage', N'SinglePage.ascx', N'Singlepage', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (9, 9, N'留言Message', N'Messages.ascx', N'Message', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (10, 10, N'新闻News', N'News.ascx', N'News', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (11, 11, N'图像Photo', N'PhotoModule.ascx', N'Photo', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (12, 12, N'招聘Job', N'JobModule.ascx', N'Job', 10)
INSERT [dbo].[portal_moduledefinitions] ([id], [moduledefid], [friendlyname], [sourcefile], [intro], [cachetime]) VALUES (13, 13, N'页面Pages', N'Pages.ascx', N'Pages', 10)
SET IDENTITY_INSERT [dbo].[portal_moduledefinitions] OFF
/****** Object:  Table [dbo].[portal_messages]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_messages]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_messages](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NULL CONSTRAINT [DF_portal_messages_pid]  DEFAULT ((0)),
	[moduleid] [int] NULL,
	[title] [nvarchar](50) NULL,
	[contents] [nvarchar](1000) NULL,
	[adddate] [datetime] NULL,
	[lytype] [nvarchar](50) NULL,
	[replydate] [datetime] NULL,
	[isclose] [int] NULL,
	[username] [nvarchar](50) NULL,
	[contact] [nvarchar](50) NULL,
	[ispass] [int] NULL CONSTRAINT [DF_portal_messages_ispass]  DEFAULT ((0)),
	[ip] [nvarchar](50) NULL,
	[catid] [int] NULL,
	[tel] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[reply] [int] NULL CONSTRAINT [DF_portal_messages_reply]  DEFAULT ((0)),
	[isdeleted] [int] NULL CONSTRAINT [DF_portal_messages_isdeleted]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_messages] PRIMARY KEY CLUSTERED 
(
	[itemid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_messages] ON
INSERT [dbo].[portal_messages] ([itemid], [pid], [moduleid], [title], [contents], [adddate], [lytype], [replydate], [isclose], [username], [contact], [ispass], [ip], [catid], [tel], [email], [reply], [isdeleted]) VALUES (1, 0, NULL, N'关于启明星软件的升级咨询', N'<p>如何升级系统？</p>', CAST(0x0000A574016C1190 AS DateTime), NULL, NULL, NULL, N'李峰', NULL, 0, N'::1', 1, N'15558554565', N'', 0, 0)
INSERT [dbo].[portal_messages] ([itemid], [pid], [moduleid], [title], [contents], [adddate], [lytype], [replydate], [isclose], [username], [contact], [ispass], [ip], [catid], [tel], [email], [reply], [isdeleted]) VALUES (2, 0, NULL, N'关于解决住房公积金贷款的咨询', N'<p>如题</p>', CAST(0x0000A574016C3BC0 AS DateTime), NULL, NULL, NULL, N'李叁', NULL, 0, N'::1', 1, N'15855222222', N'', 0, 0)
INSERT [dbo].[portal_messages] ([itemid], [pid], [moduleid], [title], [contents], [adddate], [lytype], [replydate], [isclose], [username], [contact], [ispass], [ip], [catid], [tel], [email], [reply], [isdeleted]) VALUES (3, 0, NULL, N'关于公司午饭价格的咨询', N'<p>饭非常的不好吃</p>
<p>请问价格贵吗？</p>', CAST(0x0000A574016C626C AS DateTime), NULL, NULL, NULL, N'小王', NULL, 0, N'::1', 1, N'15856565565', N'', 0, 0)
INSERT [dbo].[portal_messages] ([itemid], [pid], [moduleid], [title], [contents], [adddate], [lytype], [replydate], [isclose], [username], [contact], [ispass], [ip], [catid], [tel], [email], [reply], [isdeleted]) VALUES (4, 0, NULL, N'关于员工卡丢失的咨询', N'<p>如何办理？</p>
<p>大约需要多少钱？</p>', CAST(0x0000A574016C8918 AS DateTime), NULL, NULL, NULL, N'校长', NULL, 0, N'::1', 1, N'', N'', 0, 0)
SET IDENTITY_INSERT [dbo].[portal_messages] OFF
/****** Object:  Table [dbo].[portal_messagecat]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_messagecat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_messagecat](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](500) NULL,
	[sendto] [nvarchar](500) NULL,
	[orderid] [int] NULL,
	[note] [nvarchar](500) NULL,
	[needaudit] [int] NULL CONSTRAINT [DF_portal_messagecat_needaudit]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_messagecat] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_messagecat] ON
INSERT [dbo].[portal_messagecat] ([id], [catname], [sendto], [orderid], [note], [needaudit]) VALUES (1, N'意见咨询', NULL, 0, NULL, 0)
INSERT [dbo].[portal_messagecat] ([id], [catname], [sendto], [orderid], [note], [needaudit]) VALUES (2, N'投诉意见', N'', 0, NULL, 0)
SET IDENTITY_INSERT [dbo].[portal_messagecat] OFF
/****** Object:  Table [dbo].[Portal_Links]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_Links]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Portal_Links](
	[ItemID] [int] IDENTITY(1,1) NOT NULL,
	[ModuleID] [int] NOT NULL,
	[uid] [int] NULL,
	[CreateDate] [datetime] NULL,
	[Title] [nvarchar](100) NULL,
	[Url] [nvarchar](250) NULL,
	[ViewOrder] [int] NULL,
	[Description] [nvarchar](2000) NULL,
	[logo] [nvarchar](200) NULL,
	[target] [nvarchar](50) NULL,
	[username] [nvarchar](50) NULL,
	[catid] [int] NULL CONSTRAINT [DF_Portal_Links_catid]  DEFAULT ((0)),
 CONSTRAINT [PK_Links] PRIMARY KEY NONCLUSTERED 
(
	[ItemID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_jobcat]    Script Date: 12/20/2015 22:36:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_jobcat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_jobcat](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[moduleid] [int] NULL,
	[orderid] [int] NULL,
 CONSTRAINT [PK_portal_jobcat] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_jobcat] ON
INSERT [dbo].[portal_jobcat] ([id], [catname], [moduleid], [orderid]) VALUES (1, N'本部招聘', 6, 0)
INSERT [dbo].[portal_jobcat] ([id], [catname], [moduleid], [orderid]) VALUES (2, N'总部招聘', 6, 0)
SET IDENTITY_INSERT [dbo].[portal_jobcat] OFF
/****** Object:  Table [dbo].[portal_job]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_job]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_job](
	[itemid] [int] IDENTITY(1,1) NOT NULL,
	[moduleid] [int] NULL,
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[createdate] [datetime] NULL,
	[jobtitle] [nvarchar](50) NULL,
	[workplace] [nvarchar](50) NULL,
	[showlong] [datetime] NULL,
	[intro] [nvarchar](max) NULL,
	[hidden] [int] NULL,
	[dept] [nvarchar](50) NULL,
	[catid] [int] NULL,
	[contactname] [nvarchar](50) NULL,
	[email] [nvarchar](200) NULL,
	[tel] [nvarchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[portal_job] ON
INSERT [dbo].[portal_job] ([itemid], [moduleid], [uid], [username], [createdate], [jobtitle], [workplace], [showlong], [intro], [hidden], [dept], [catid], [contactname], [email], [tel]) VALUES (1, 6, 1, N'李正', CAST(0x0000A574016B078C AS DateTime), N'招聘IT兼职人员 ', N'北京 ', CAST(0x0000A57F00000000 AS DateTime), N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>1.热爱IT</p>
<p>2.熟悉PS</p>
<p>3。熟悉Oiifce</p>
</body>
</html>', 0, N'IT部门', 1, N'李飞', N'1233333335@qq.com', N'15000000000')
INSERT [dbo].[portal_job] ([itemid], [moduleid], [uid], [username], [createdate], [jobtitle], [workplace], [showlong], [intro], [hidden], [dept], [catid], [contactname], [email], [tel]) VALUES (2, 6, 1, N'李正', CAST(0x0000A574016B3540 AS DateTime), N'招聘司机1名', N'上海', CAST(0x0000000000000000 AS DateTime), N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>3年驾驶禁言</p>
<p>可以驾驶大货车</p>
</body>
</html>', 0, N'行政部', 1, N'李飞', N'', N'11548545854')
INSERT [dbo].[portal_job] ([itemid], [moduleid], [uid], [username], [createdate], [jobtitle], [workplace], [showlong], [intro], [hidden], [dept], [catid], [contactname], [email], [tel]) VALUES (3, 6, 1, N'李正', CAST(0x0000A574016B6678 AS DateTime), N'内部招聘IT经理一名', N'安徽', CAST(0x0000000000000000 AS DateTime), N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>（1）5年工作经验</p>
<p>（2）在大型国企工作过</p>
</body>
</html>', 0, N'IT部门', 2, N'李章', N'', N'15485458565')
SET IDENTITY_INSERT [dbo].[portal_job] OFF
/****** Object:  Table [dbo].[portal_iframe]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_iframe]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_iframe](
	[moduleid] [int] NOT NULL,
	[framesrc] [nvarchar](500) NULL,
	[frmwidth] [int] NULL CONSTRAINT [DF_portal_iframe_width]  DEFAULT ((0)),
	[frmheight] [int] NULL CONSTRAINT [DF_portal_iframe_height]  DEFAULT ((0)),
	[uid] [int] NULL,
	[username] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_iframe_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_portal_iframe_1] PRIMARY KEY CLUSTERED 
(
	[moduleid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_html]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_html]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_html](
	[moduleid] [int] NOT NULL,
	[html] [nvarchar](max) NULL,
	[uid] [int] NULL,
	[isservercode] [int] NULL CONSTRAINT [DF_portal_html_isservercode]  DEFAULT ((0)),
	[username] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_html_createdate]  DEFAULT (getdate()),
	[modifydate] [datetime] NULL,
	[isdeleted] [int] NULL CONSTRAINT [DF_portal_html_isdeleted]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_html_1] PRIMARY KEY CLUSTERED 
(
	[moduleid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
INSERT [dbo].[portal_html] ([moduleid], [html], [uid], [isservercode], [username], [createdate], [modifydate], [isdeleted]) VALUES (8, N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p><strong>关于联系我们的说明</strong></p>
<p>&nbsp;&nbsp;&nbsp; 启明星工作室与2010年创建于上海。一直以来，我们主打企业应用，对产品不断进行更新。 我们提供的核心产品包括：启明星会议室预定系统book，启明星Helpdesk，启明星门户网站系统portal，启明星工作日志worklog和启明星请假系统appform等 <br /> 我们的客户既包括世界500强、大型企业、跨国公司，也包括中小微型企业。</p>
<p><br />&nbsp;&nbsp;&nbsp; 启明星系统采用不同的报价方案，始终为客户提供质优价廉的系统，深受用户的喜爱。 我们提供的产品可以让用户免费试用，试用满意后再购买，免除了用户的后顾之忧。 对品质的追求是我们始终追求的目标，启明星工作室会不断对系统进行完善以保证产品具有更强的竞争力。</p>
<p>&nbsp;</p>
<p><strong>联系方式</strong></p>
<p>如果您对我们的产品有兴趣，赶快拿起电话和我们联系吧！ 咨询电话15001712100. 或者QQ983506039 李先生 EMAIL:983506039@qq.com</p>
</body>
</html>', 1, 0, N'李正', CAST(0x0000A574016CBF00 AS DateTime), NULL, 0)
/****** Object:  Table [dbo].[portal_forums_reply]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_reply]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_forums_reply](
	[replyid] [int] IDENTITY(1,1) NOT NULL,
	[contents] [nvarchar](max) NULL,
	[replyuid] [int] NULL,
	[replyusername] [nvarchar](50) NULL,
	[replydate] [datetime] NULL,
	[postid] [int] NULL,
	[title] [nvarchar](200) NULL,
 CONSTRAINT [PK_portal_forums_reply] PRIMARY KEY CLUSTERED 
(
	[replyid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_forums_post]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_post]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_forums_post](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](200) NULL,
	[contents] [nvarchar](max) NULL,
	[senderid] [int] NULL,
	[senderusername] [nvarchar](50) NULL,
	[smallid] [int] NULL,
	[posttype] [int] NULL,
	[lastreplyuserid] [int] NULL,
	[lastreplyusername] [nvarchar](50) NULL,
	[lastreplydate] [datetime] NULL CONSTRAINT [DF_portal_forums_post_lastreplydate]  DEFAULT (getdate()),
	[replycount] [int] NULL,
	[click] [int] NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_portal_forums_post_createdate]  DEFAULT (getdate()),
	[hearttype] [nvarchar](50) NULL,
	[style] [nvarchar](200) NULL,
	[islock] [int] NULL CONSTRAINT [DF_portal_forums_post_islock]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_forums_post] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_forums_pid]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_pid]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_forums_pid](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[pid] [int] NULL,
	[smallid] [int] NULL,
	[createdate] [datetime] NULL,
 CONSTRAINT [PK_portal_forums_pid] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_forums_menusmall]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_menusmall]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_forums_menusmall](
	[smallid] [int] IDENTITY(1,1) NOT NULL,
	[bigid] [int] NULL,
	[imgurl] [nvarchar](50) NULL,
	[menuname] [nvarchar](50) NULL,
	[description] [nvarchar](500) NULL,
	[totalsubject] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_totalsubject]  DEFAULT ((0)),
	[totalreply] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_totalreply]  DEFAULT ((0)),
	[lastreplyuid] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_lastreplyuid]  DEFAULT ((0)),
	[lastreplyname] [nvarchar](50) NULL,
	[lastreplydate] [datetime] NULL,
	[lastpost] [nvarchar](50) NULL,
	[lastpostid] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_lastpostid]  DEFAULT ((0)),
	[borderids] [nvarchar](400) NULL,
	[bordernames] [nvarchar](50) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_orderid]  DEFAULT ((0)),
	[isshow] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_isshow]  DEFAULT ((1)),
	[style] [nvarchar](200) NULL,
	[todaynew] [int] NULL CONSTRAINT [DF_portal_forums_menusmall_todaynew]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_forums_menusmall] PRIMARY KEY CLUSTERED 
(
	[smallid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_forums_menubig]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_forums_menubig]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_forums_menubig](
	[bigid] [int] IDENTITY(1,1) NOT NULL,
	[menuname] [nvarchar](200) NULL,
	[intro] [nvarchar](500) NULL,
	[orderid] [int] NULL CONSTRAINT [DF_portal_forums_menubig_orderid]  DEFAULT ((0)),
 CONSTRAINT [PK_portal_forum_menubig] PRIMARY KEY CLUSTERED 
(
	[bigid] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_documentscat]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_documentscat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_documentscat](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[orderid] [int] NULL,
	[moduleid] [int] NULL,
	[opusername] [nvarchar](500) NULL,
 CONSTRAINT [PK_portal_documentscat] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[Portal_documents]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_documents]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Portal_documents](
	[ItemID] [int] IDENTITY(1,1) NOT NULL,
	[ModuleID] [int] NOT NULL,
	[uid] [nvarchar](100) NULL,
	[Createdate] [datetime] NULL,
	[docname] [nvarchar](150) NULL,
	[ContentSize] [int] NULL,
	[ext] [nvarchar](50) NULL,
	[intro] [nvarchar](500) NULL,
	[path] [nvarchar](500) NULL,
	[categoryname] [nvarchar](50) NULL,
	[docorder] [int] NULL,
	[click] [int] NULL CONSTRAINT [DF_Portal_Documents_click]  DEFAULT ((0)),
	[username] [nvarchar](50) NULL,
	[catid] [int] NULL,
 CONSTRAINT [PK_Documents] PRIMARY KEY NONCLUSTERED 
(
	[ItemID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[portal_click]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[portal_click]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[portal_click](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[datetime] [datetime] NULL,
	[username] [nvarchar](50) NULL,
	[deptname] [nvarchar](50) NULL,
	[ip] [nvarchar](50) NULL,
	[displayname] [nvarchar](50) NULL,
 CONSTRAINT [PK_portal_click] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
/****** Object:  Table [dbo].[Portal_Announcementscat]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_Announcementscat]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Portal_Announcementscat](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[catname] [nvarchar](50) NULL,
	[moduleid] [int] NULL,
	[orderid] [int] NULL,
	[opusername] [nvarchar](50) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_Portal_Announcementscat_createdate]  DEFAULT (getdate()),
 CONSTRAINT [PK_Portal_Announcementscat] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[Portal_Announcementscat] ON
INSERT [dbo].[Portal_Announcementscat] ([id], [catname], [moduleid], [orderid], [opusername], [createdate]) VALUES (1, N'本地通告', 3, 0, N'admin', CAST(0x0000A5740154EB97 AS DateTime))
INSERT [dbo].[Portal_Announcementscat] ([id], [catname], [moduleid], [orderid], [opusername], [createdate]) VALUES (2, N'集团通告', 3, 0, N'admin', CAST(0x0000A57401550141 AS DateTime))
SET IDENTITY_INSERT [dbo].[Portal_Announcementscat] OFF
/****** Object:  Table [dbo].[Portal_Announcements]    Script Date: 12/20/2015 22:36:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Portal_Announcements]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Portal_Announcements](
	[ItemID] [int] IDENTITY(1,1) NOT NULL,
	[ModuleID] [int] NOT NULL,
	[uid] [int] NULL,
	[Title] [nvarchar](150) NULL,
	[intro] [nvarchar](500) NULL,
	[detail] [nvarchar](2000) NULL,
	[createdate] [datetime] NULL CONSTRAINT [DF_Portal_Announcements_createdate]  DEFAULT (getdate()),
	[istop] [int] NULL CONSTRAINT [DF_Portal_Announcements_istop]  DEFAULT ((0)),
	[releasedepartment] [nvarchar](50) NULL,
	[username] [nvarchar](50) NULL,
	[click] [int] NULL CONSTRAINT [DF_Portal_Announcements_click]  DEFAULT ((0)),
	[catid] [int] NULL,
 CONSTRAINT [PK_Announcements] PRIMARY KEY NONCLUSTERED 
(
	[ItemID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET IDENTITY_INSERT [dbo].[Portal_Announcements] ON
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (1, 3, 1, N'清明节放假的通知', N'根据《国务院关于修改〈全国年节及纪念日放假办法〉的决定》的规定及上级的通知精神，经区政府研究决定 ', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>根据《国务院关于修改〈全国年节及纪念日放假办法〉的决定》的规定及上级的通知精神，经区政府研究决定，今年清明节的放假时间为4月5日（星期六）至4月7日（星期一），其中4月5日（清明节）为法定节假日，4月5日（星期六）公休日调至4月7日（星期一）。不能停止生产和工作的单位的放假办法，由其上级主管部门研究确定。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (2, 3, 1, N'关于公开选聘管理会计咨询专家的通知 ', N'国务院有关部委、有关直属机构财务部门，总后勤部财务部、武警总部后勤部，各省、自治区、直辖市、计划单列市财政厅（局），新疆生产建设兵团财务局', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>国务院有关部委、有关直属机构财务部门，总后勤部财务部、武警总部后勤部，各省、自治区、直辖市、计划单列市财政厅（局），新疆生产建设兵团财务局，有关企业、中介机构、高等院校和科研院所：</p>
<p>　　为全面推进管理会计体系建设，提升会计工作总体水平，推动经济更有效率、更加公平、更可持续发展，根据《会计改革与发展&ldquo;十二五&rdquo;规划纲要》，在总结我国管理会计理论发展与实践经验的基础上，我部印发了《财政部关于全面推进管理会计体系建设的指导意见（征求意见稿）》，并计划在广泛征求意见的基础上，正式印发管理会计体系建设指导意见，做好顶层设计，指导和推动管理会计工作全面系统开展。这是一项庞大的系统工程，需要群策群力、集思广益、共同推进。为此，我部决定公开选聘一批管理会计咨询专家。现将有关选聘事项通知如下：</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (3, 3, 1, N'召开2014年第一次临时股东大会的通知', N'成都利君实业股份有限公司（以下简称“公司”）第二届董事会第十一次会议决定于2014年4月10日召开公司2014年第一次临时股东大会', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>成都利君实业股份有限公司（以下简称&ldquo;公司&rdquo;）第二届董事会第十一次会议决定于2014年4月10日召开公司2014年第一次临时股东大会（以下简称&ldquo;本次股东大会&rdquo;），现就召开本次股东大会的相关事项通知如下：</p>
<p>　　一、会议基本情况：</p>
<p>　　1、股东大会届次：2014年第一次临时股东大会。</p>
<p>　　2、股东大会的召集人：公司董事会，经公司第二届董事会第十一次会议审议通过，同意召开本次股东大会。</p>
<p>　　3、会议召开的合法、合规性：本次股东大会会议的召开符合有关法律、行政法规、部门规章、规范性文件和公司章程的相关规定。</p>
<p>　　4、会议召开的日期、时间：2014年4月10日（星期四）上午10:00开始。</p>
<p>　　5、会议的召开方式：本次股东大会采用现场表决方式召开。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'财务部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (4, 3, 1, N'昆药集团股份有限公司关于质押的公告', N'本公司董事会及全体董事保证本公告内容不存在任何虚假记载、误导性陈述或者重大遗漏，并对其内容的真实性、准确性和完整性承担个别及连带责任。', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>2015年12月18日，昆药集团股份有限公司（以下简称"公司"或"本公司"）收到控股股东华方医药科技有限公司（以下简称"华方医药"）的通知，华方医药于近日将其持有的本公司53，214，133股限售流通股质押给招商银行(17.52, 0.42, 2.46%)股份有限公司杭州分行，用于向其融资，相关质押登记手续已在中国证券登记结算有限责任公司上海分公司办理完毕，质押时间为2015年12月17日至2020年10月19日。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'行政部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (5, 3, 1, N'恒天集团信息化规划项目澄清公告', N'中国恒天集团有限公司信息化规划项目招标公告已于2015年5月14日在公司网站发布。截至5月20日，已有多家公司领取了标书。', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中国恒天集团有限公司信息化规划项目招标公告已于2015年5月14日在公司网站发布。截至5月20日，已有多家公司领取了标书。现就部分公司针对标书中内容提出的疑问作统一回答如下：</p>
<p>1.关于最佳实践分析的范围，本项目要求至少应包含对集团公司所属的纺织机械、纺织贸易、新型纤维材料、商用车及重工机械几项主业做最佳实践研究，具体案例数量无强制要求。</p>
<p>2.集团公司管控模式的研究不属于本项目范围，且恒天集团对于此部分内容已有清晰的定义，即集团公司对各子集团为战略型管控，各子集团对所属企业为运营型管控。但是本项目中应明确集团公司、子集团/事业部在信息化方面的管控模式、分工界面等内容。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (6, 3, 1, N'恒天集团机房改造系统项目招标书澄清公告', N'根据《中国恒天集团机房改造系统项目招标公告》，现就恒天集团机房改造项目招标的问题做统一澄清答复如下', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>根据《中国恒天集团机房改造系统项目招标公告》，现就恒天集团机房改造项目招标的问题做统一澄清答复如下：</p>
<p>1.恒天集团可在中服大厦14楼提供货物周转存放空间。</p>
<p>2.经与大厦物业交流协商，此项目如涉及电焊等专业操作，需要求操作人员有相关资质（证书），同时在进行作业时遵守安全规定。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (7, 3, 1, N'中国恒天集团机房改造项目招标公告', N'中国恒天集团有限公司就机房改造项目进行招标，热忱欢迎各潜在投标人参与本次招标。为保证招标的公开、公平、公正性，并就有关事项通告如下', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中国恒天集团有限公司就机房改造项目进行招标，热忱欢迎各潜在投标人参与本次招标。为保证招标的公开、公平、公正性，并就有关事项通告如下：</p>
<p>一、招标范围</p>
<p>中国恒天集团有限公司将于近期启动机房改造项目建设，实现对恒天集团总部中心机房进行现代化改造，并满足未来5年信息化工作的需要。招标范围：本次项目招标内容包括装修、布线、空调、消防安全、UPS、视频监控、集中报警、门禁等软硬件设备以及整个实施和服务等。机房为在用机房。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (8, 3, 1, N'中国恒天集团数据备份系统项目招标公告', N'中国恒天集团有限公司就数据备份系统项目进行招标，热忱欢迎各潜在投标人参与本次招标。为保证招标的公开、公平、公正性，并就有关事项通告如下', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中国恒天集团有限公司就数据备份系统项目进行招标，热忱欢迎各潜在投标人参与本次招标。为保证招标的公开、公平、公正性，并就有关事项通告如下：</p>
<p>一、招标范围</p>
<p>中国恒天集团有限公司将于近期建设数据备份系统，实现对恒天集团总部虚拟机和物理机的系统文件、数据文件等的统一备份和管理，并满足未来3～5年新建系统备份的需要。招标范围：本次项目招标内容包括存储、软件、网络等设备采购以及集成和服务等</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (12, 3, 1, N'郭建全职务变动情况', N'郭建全不再兼任马里新糖联公司、糖联公司董事长、董事职务', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>郭建全不再兼任马里新糖联公司、糖联公司董事长、董事职务</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (9, 3, 1, N'恒天集团数据备份系统项目招标书澄清公告', N'根据《中国恒天集团数据备份系统项目招标公告》，现就恒天集团数据备份系统项目招标的问题做统一澄清答复如下', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>根据《中国恒天集团数据备份系统项目招标公告》，现就恒天集团数据备份系统项目招标的问题做统一澄清答复如下：</p>
<p>一、招标文件第4章 技术规范书《附件1：恒天集团数据备份系统项目业务需求》中</p>
<p>3.备份方案涉及存储产品(本地+同城)配置说明</p>
<p>前端主机端口配置，本次配置4个8Gb FC/12Gb SAS/万兆ISCSI主机端口，此参数为三个之中满足一个即可。</p>
<p>4.备份服务器要求</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'行政部', N'李正', 0, 2)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (10, 3, 1, N'中国邮政集团公司2014年部门决算', N'中国邮政集团公司是依照《中华人民共和国全民所有制工业企业法》组建的大型国有企业。中国邮政集团公司依法经营邮政专营业务，承担邮政普遍服务义务，受政府委托提供邮政特殊服务', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中国邮政集团公司是依照《中华人民共和国全民所有制工业企业法》组建的大型国有企业。中国邮政集团公司依法经营邮政专营业务，承担邮政普遍服务义务，受政府委托提供邮政特殊服务，对竞争性邮政业务实行商业化运营。中国邮政集团公司在全国各省、自治区、直辖市设置邮政公司。中国邮政集团公司所属石家庄邮电职业技术学院为中央财政补助事业单位。</p>
<p>　　中国邮政集团公司经营的主要业务：国内和国际邮件寄递业务；报刊、图书等出版物发行业务；邮票发行业务；邮政汇兑业务；机要通信业务；邮政金融业务；邮政速递业务；邮政物流业务；电子商务业务；各类邮政代理业务；国家规定开办的其他业务。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (11, 3, 1, N'周后炼等人职务变动情况', N'中国造纸装备有限公司第二届董事会由5名董事组成，周后炼任董事长，张红、樊燕、曹春昱、李耀任董事，马思一不再兼任中国造纸装备有限公司董事', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中国造纸装备有限公司第二届董事会由5名董事组成，周后炼任董事长，张红、樊燕、曹春昱、李耀任董事，马思一不再兼任中国造纸装备有限公司董事长、董事职务，曹振雷不再兼任中国造纸装备有限公司董事职务。第二届监事会由3名监事组成，其中1名职工监事，胡玲任监事会主席，孙波任监事，王汉全不再兼任中国造纸装备有限公司监事长职务。成立中国共产党中国造纸装备有限公司临时委员会，张红任临时党委书记。聘任周后炼为中国造纸装备有限公司总经理（法定代表人）（兼）</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (13, 3, 1, N'严晓俭等人职务变动情况', N'严晓俭任中国海诚工程科技股份有限公司董事长（法定代表人），免去其总裁职务；徐大同任中国海诚工程科技股份有限公司董事、总裁', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>严晓俭任中国海诚工程科技股份有限公司董事长（法定代表人），免去其总裁职务；徐大同任中国海诚工程科技股份有限公司董事、总裁；孙波任中国海诚工程科技股份有限公司监事。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (14, 3, 1, N'2016东方航空信息部诚聘IT人才公告', N'中国东方航空股份有限公司是中国民航三大骨干航空公司之一，公司一直以来视人才为核心竞争力，重视员工职业生涯的发展规划，现因业务发展的需要，特向社会招聘IT人员。', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>中国东方航空股份有限公司是中国民航三大骨干航空公司之一，公司一直以来视人才为核心竞争力，重视员工职业生涯的发展规划，现因业务发展的需要，特向社会招聘IT人员。被录用者与中国东方航空股份有限公司签订劳动合同，工作部门为信息部。</p>
<p>一、2016年应届毕业生</p>
<p>1.国内知名院校2016年应届毕业生。</p>
<p>2.计算机科学和技术、电子信息科学、软件工程、管理信息系统、数学、统筹学，运筹学等相关专业。</p>
<p>3.熟练掌握C/C++/JAVA/.NET中至少一种语言者优先。</p>
<p>4.英语达到CET-4以上。</p>
<p>5.工作内容：程序开发</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'IT部门', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (15, 3, 1, N'2015鄞州银行招聘IT英才公告', N'鄞州银行位居中国银行业100强、中国服务业500强，是区域经济最具影响力的银行，总部位于浙江省宁波市鄞州区。鄞州银行秉承阳光经营、快乐成', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>鄞州银行位居中国银行业100强、中国服务业500强，是区域经济最具影响力的银行，总部位于浙江省宁波市鄞州区。鄞州银行秉承&ldquo;阳光经营、快乐成长、创新服务&rdquo;的经营理念，倡导&ldquo;共享式发展&rdquo;模式，坚持服务区域、服务微小、服务&ldquo;三农&rdquo;的市场定位，倡导&ldquo;不嫌小散、勤于采摘、善于识别、巧于加工、良好治理、乐于共享&rdquo;的蜜蜂式金融文化。</p>
<p>鄞州银行致力于为员工提供极具竞争力的薪酬福利和广阔的职业发展空间。现招聘软件开发岗、系统维护岗、网络管理岗、网点支持岗若干名，欢迎有志之士加盟!</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (16, 3, 1, N'工信部2015年Q3季度度电信服务质量通告发布', N'据报告显示：截至三季度末，全国电话用户总数达到15.37亿户，其中移动电话用户近13亿户。固定宽带接入用户达到2.11亿户，其中8Mbps及以上用户占比60.6%，同比提高25.6个百分点。', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>据报告显示：截至三季度末，全国电话用户总数达到15.37亿户，其中移动电话用户近13亿户。固定宽带接入用户达到2.11亿户，其中8Mbps及以上用户占比60.6%，同比提高25.6个百分点。移动宽带用户达到7.3亿户，同比增长39%，其中4G用户维持高速增长，总数达到3.02亿户，占比达到41.4%，环比提高8个百分点。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'IT部门', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (17, 3, 1, N'关于进一步扩大宽带接入网业务开放试点范围的通告', N'据悉，本次纳入宽带接入网业务试点的城市包括天津、石家庄、晋中、大连、长春、大庆、齐齐哈尔、佳木斯、牡丹江、绥化、苏州、无锡、常州、镇江、嘉兴、合肥', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>据悉，本次纳入宽带接入网业务试点的城市包括天津、石家庄、晋中、大连、长春、大庆、齐齐哈尔、佳木斯、牡丹江、绥化、苏州、无锡、常州、镇江、嘉兴、合肥、福州、南昌、济南、洛阳、孝感、黄冈、鄂州、黄石、咸宁、仙桃、天门、潜江、珠海、佛山、惠州、肇庆、江门、中山、东莞、南宁、海口、三亚、儋州、绵阳、贵阳、昆明、西安、银川</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (18, 3, 1, N'启明星网站演示公告', N'启明星网站演示数据来自互联网，启明星工作室不对演示数据做任何明示或者暗示说明，仅供测试数据。', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>启明星网站演示数据来自互联网（包括新闻，通告，图片等），启明星工作室不对演示数据做任何明示或者暗示说明，仅供测试数据。</p>
</body>
</html>', CAST(0x0000A57000000000 AS DateTime), 0, N'行政部', N'李正', 0, 1)
INSERT [dbo].[Portal_Announcements] ([ItemID], [ModuleID], [uid], [Title], [intro], [detail], [createdate], [istop], [releasedepartment], [username], [click], [catid]) VALUES (19, 3, 1, N'启明星门户网站发布V10.0 预览版', N'启明星门户系统发布V10.0预览版，新版优化了操作易用性，对过去复杂的权限设置进行了取消等。', N'<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>启明星门户系统发布V10.0预览版，新版优化了操作易用性，对过去复杂的权限设置进行了取消等。</p>
</body>
</html>', CAST(0x0000A57400000000 AS DateTime), 0, N'人事部', N'李正', 0, 1)
SET IDENTITY_INSERT [dbo].[Portal_Announcements] OFF
/****** Object:  UserDefinedFunction [dbo].[fun_getpagerootids]    Script Date: 12/20/2015 22:36:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fun_getpagerootids]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'create function [dbo].[fun_getpagerootids](@id int)
returns nvarchar(500)
as
begin
declare @c nvarchar(500)
declare @pid int
declare @level int
set @level=5
set @pid=-1
set @c=''''
set @pid=@id
while(@pid<>0 and @level>0)
begin
select @c=convert(nvarchar(5),id)+'',''+@c, @pid=parentid from portal_pages where id=@pid
set @level=@level-1
end
return @c 
end' 
END
GO
/****** Object:  UserDefinedFunction [dbo].[fun_getdeptfullname]    Script Date: 12/20/2015 22:36:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fun_getdeptfullname]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
execute dbo.sp_executesql @statement = N'create function [dbo].[fun_getdeptfullname](@id int)
returns nvarchar(500)
as
begin
declare @c nvarchar(500)
declare @pid int
declare @level int
set @level=5
set @pid=-1
set @c=''''
set @pid=@id
while(@pid<>0 and @level>0)
begin
select @c=pagename+@c, @pid=parentid from portal_pages where id=@pid
set @level=@level-1
end
return @c 
end' 
END
GO
/****** Object:  View [dbo].[v_documents]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_documents]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_documents]
AS
SELECT     dbo.Portal_Documents.ItemID, dbo.Portal_Documents.ModuleID, dbo.Portal_Documents.uid, dbo.Portal_Documents.Createdate, 
                      dbo.Portal_Documents.docname, dbo.Portal_Documents.ContentSize, dbo.Portal_Documents.ext, dbo.Portal_Documents.intro, 
                      dbo.Portal_Documents.path, dbo.Portal_Documents.categoryname, dbo.Portal_Documents.docorder, dbo.Portal_Documents.click, 
                      dbo.Portal_Documents.username, dbo.Portal_Documents.catid, dbo.portal_documentscat.catname, dbo.portal_documentscat.id
FROM         dbo.Portal_Documents INNER JOIN
                      dbo.portal_documentscat ON dbo.Portal_Documents.catid = dbo.portal_documentscat.id
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_documents', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Portal_Documents"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 277
               Right = 188
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_documentscat"
            Begin Extent = 
               Top = 6
               Left = 226
               Bottom = 193
               Right = 388
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 15
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_documents'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_documents', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_documents'
GO
/****** Object:  View [dbo].[v_Announcements]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_Announcements]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_Announcements]
AS
SELECT     dbo.Portal_Announcements.ItemID, dbo.Portal_Announcements.ModuleID, dbo.Portal_Announcements.uid, dbo.Portal_Announcements.Title, 
                      dbo.Portal_Announcements.intro, dbo.Portal_Announcements.detail, dbo.Portal_Announcements.createdate, dbo.Portal_Announcements.istop, 
                      dbo.Portal_Announcements.releasedepartment, dbo.Portal_Announcements.username, dbo.Portal_Announcements.click, dbo.portal_modules.tabid, 
                      dbo.Portal_Announcements.catid, dbo.Portal_Announcementscat.catname
FROM         dbo.Portal_Announcements INNER JOIN
                      dbo.portal_modules ON dbo.portal_modules.moduleid = dbo.Portal_Announcements.ModuleID INNER JOIN
                      dbo.Portal_Announcementscat ON dbo.Portal_Announcements.catid = dbo.Portal_Announcementscat.id
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_Announcements', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Portal_Announcements"
            Begin Extent = 
               Top = 25
               Left = 407
               Bottom = 247
               Right = 676
            End
            DisplayFlags = 280
            TopColumn = 1
         End
         Begin Table = "portal_modules"
            Begin Extent = 
               Top = 14
               Left = 67
               Bottom = 229
               Right = 395
            End
            DisplayFlags = 280
            TopColumn = 6
         End
         Begin Table = "Portal_Announcementscat"
            Begin Extent = 
               Top = 6
               Left = 759
               Bottom = 248
               Right = 916
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_Announcements'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_Announcements', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_Announcements'
GO
/****** Object:  View [dbo].[v_announcedept]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_announcedept]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_announcedept]
as

select    distinct(releasedepartment) from Portal_Announcements

'
GO
/****** Object:  View [dbo].[v_tab]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_tab]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_tab] AS SELECT portal_modules.*,tabname,accessroles,taborder,istop,url,target,sourcefile,intro,cachetime,friendlyname FROM portal_modules INNER JOIN portal_tabs ON portal_modules.tabid=portal_tabs.tabid INNER JOIN portal_moduledefinitions ON portal_moduledefinitions.moduledefid=portal_modules.moduledefid'
GO
/****** Object:  View [dbo].[v_portalpage]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_portalpage]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_portalpage]
as
select id, treeid, ''portal_pagedoc'' as tablename from portal_pagedoc union
select id, treeid, ''portal_pageimage'' as tablename from portal_pageimage union
select id, treeid, ''portal_pageform'' as tablename from portal_pageform union
select id, treeid, ''survery_lists'' as tablename from survery_lists 

'
GO
/****** Object:  View [dbo].[v_photoes]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_photoes]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_photoes]
AS
SELECT     dbo.portal_photoes.itemid, dbo.portal_photoes.title, dbo.portal_photoes.createdate, dbo.portal_photoes.username, dbo.portal_photoes.uid, dbo.portal_photoes.catid, 
                      dbo.portal_photoes.ispass, dbo.portal_photoes.groupid, dbo.portal_photoes.istop, dbo.portal_photoes.url, dbo.portal_photoes.thumpath, dbo.portal_photoes.picpath, 
                      dbo.portal_photoes.description, dbo.portal_photoes.focusnews, dbo.portal_photoes.orderid, dbo.portal_modules.tabid, dbo.portal_photocategory.moduleid, 
                      dbo.portal_photocategory.catname, dbo.portal_photoes.click
FROM         dbo.portal_photoes INNER JOIN
                      dbo.portal_photocategory ON dbo.portal_photoes.catid = dbo.portal_photocategory.catid INNER JOIN
                      dbo.portal_modules ON dbo.portal_modules.moduleid = dbo.portal_photocategory.moduleid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_photoes', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "portal_photoes"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 277
            End
            DisplayFlags = 280
            TopColumn = 13
         End
         Begin Table = "portal_photocategory"
            Begin Extent = 
               Top = 6
               Left = 210
               Bottom = 121
               Right = 572
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_modules"
            Begin Extent = 
               Top = 126
               Left = 38
               Bottom = 241
               Right = 183
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 18
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_photoes'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_photoes', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_photoes'
GO
/****** Object:  View [dbo].[v_pagevote]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_pagevote]'))
EXEC dbo.sp_executesql @statement = N'

CREATE VIEW  [dbo].[v_pagevote]
AS
SELECT     dbo.survery_defineactive.title, dbo.survery_lists.username, dbo.survery_lists.dept, dbo.survery_lists.email, dbo.survery_lists.mobile, dbo.survery_lists.isdelete, 
                      dbo.survery_lists.createdate, dbo.survery_lists.id, dbo.survery_lists.activeid, dbo.survery_defineactive.treeid, dbo.survery_lists.ispass, dbo.survery_lists.uid, 
                      dbo.survery_lists.orderno, dbo.survery_lists.isfull, dbo.survery_lists.process,dbo.survery_lists.auditstatus
FROM         dbo.survery_lists LEFT OUTER JOIN
                      dbo.survery_defineactive ON dbo.survery_lists.activeid = dbo.survery_defineactive.id

'
GO
/****** Object:  View [dbo].[v_news]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_news]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_news]
AS
SELECT     TOP (1000) dbo.portal_news.catid, dbo.portal_news.moduleid, dbo.portal_news.title, dbo.portal_news.itemid, dbo.portal_news.adddate, 
                      dbo.portal_news.url, dbo.portal_news.tags, dbo.portal_news.titleimg, dbo.portal_news.littletitle, dbo.portal_news.intro, dbo.portal_news.click, 
                      dbo.portal_news.remarkcounts, dbo.portal_news.uid, dbo.portal_news.username, dbo.portal_modules.tabid, dbo.portal_newscategory.catname, 
                      dbo.portal_news.isdeleted, dbo.portal_news.source, dbo.portal_news.sourcelink
FROM         dbo.portal_news INNER JOIN
                      dbo.portal_modules ON dbo.portal_news.moduleid = dbo.portal_modules.moduleid INNER JOIN
                      dbo.portal_newscategory ON dbo.portal_newscategory.catid = dbo.portal_news.catid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_news', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "portal_news"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 300
               Right = 184
            End
            DisplayFlags = 280
            TopColumn = 7
         End
         Begin Table = "portal_modules"
            Begin Extent = 
               Top = 6
               Left = 222
               Bottom = 121
               Right = 367
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_newscategory"
            Begin Extent = 
               Top = 6
               Left = 405
               Bottom = 121
               Right = 539
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_news'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_news', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_news'
GO
/****** Object:  View [dbo].[v_modules]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_modules]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_modules]
AS
SELECT     dbo.portal_modules.moduleid, dbo.portal_modules.modulename, dbo.portal_modules.editroles, dbo.portal_modules.moduledefid, 
                      dbo.portal_modules.panelname, dbo.portal_modules.cachetimeout, dbo.portal_modules.moduleorder, dbo.portal_modules.tabid, 
                      dbo.portal_modules.width, dbo.portal_modules.height, dbo.portal_modules.cssclass, dbo.portal_modules.showhand, dbo.portal_modules.css, 
                      dbo.portal_modules.isdelete, dbo.portal_moduledefinitions.sourcefile, dbo.portal_moduledefinitions.friendlyname, 
                      dbo.portal_moduledefinitions.cachetime, dbo.portal_moduledefinitions.intro
FROM         dbo.portal_modules INNER JOIN
                      dbo.portal_moduledefinitions ON dbo.portal_modules.moduledefid = dbo.portal_moduledefinitions.moduledefid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_modules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "portal_modules"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 183
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_moduledefinitions"
            Begin Extent = 
               Top = 6
               Left = 221
               Bottom = 121
               Right = 364
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_modules'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_modules', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_modules'
GO
/****** Object:  View [dbo].[v_forumsshort]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forumsshort]'))
EXEC dbo.sp_executesql @statement = N'

CREATE VIEW [dbo].[v_forumsshort]
AS
SELECT     dbo.portal_forums_post.smallid, dbo.portal_forums_menusmall.menuname, dbo.portal_forums_post.title, dbo.portal_forums_post.id, 
                      dbo.portal_forums_post.createdate, dbo.portal_forums_post.lastreplydate, dbo.portal_forums_post.click
FROM         dbo.portal_forums_post LEFT OUTER JOIN
                      dbo.portal_forums_menusmall ON dbo.portal_forums_post.smallid = dbo.portal_forums_menusmall.smallid

'
GO
/****** Object:  View [dbo].[v_forums_reply]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_reply]'))
EXEC dbo.sp_executesql @statement = N'
CREATE VIEW [dbo].[v_forums_reply]
AS
SELECT     dbo.portal_forums_reply.replyid, dbo.portal_forums_reply.contents, dbo.portal_forums_reply.replyuid, dbo.portal_forums_reply.replyusername, 
                      dbo.portal_forums_reply.replydate, dbo.portal_forums_reply.postid, dbo.users_users.avtor
FROM         dbo.portal_forums_reply LEFT OUTER JOIN
                      dbo.users_users ON dbo.portal_forums_reply.replyuid = dbo.users_users.uid

'
GO
/****** Object:  View [dbo].[v_forums_post]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_post]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_forums_post]
AS
SELECT     dbo.portal_forums_post.id, dbo.portal_forums_post.title, dbo.portal_forums_post.senderid, dbo.portal_forums_post.senderusername, 
                      dbo.portal_forums_post.smallid, dbo.portal_forums_post.posttype, dbo.portal_forums_post.lastreplyuserid, 
                      dbo.portal_forums_post.lastreplyusername, dbo.portal_forums_post.replycount, dbo.portal_forums_post.click, dbo.portal_forums_post.createdate, 
                      dbo.portal_forums_post.lastreplydate, dbo.portal_forums_post.hearttype, dbo.portal_forums_post.style, dbo.portal_forums_post.islock, 
                      dbo.portal_forums_menusmall.bigid
FROM         dbo.portal_forums_post LEFT OUTER JOIN
                      dbo.portal_forums_menusmall ON dbo.portal_forums_post.smallid = dbo.portal_forums_menusmall.smallid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_forums_post', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[20] 4[41] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "portal_forums_post"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 300
               Right = 208
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_forums_menusmall"
            Begin Extent = 
               Top = 6
               Left = 245
               Bottom = 121
               Right = 393
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_forums_post'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_forums_post', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_forums_post'
GO
/****** Object:  View [dbo].[v_forums_pid]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_pid]'))
EXEC dbo.sp_executesql @statement = N'create view [dbo].[v_forums_pid]
as
select count(*) as todaynew,createdate,smallid from portal_forums_pid
group by  smallid,createdate
'
GO
/****** Object:  View [dbo].[v_forums_nav]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_nav]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_forums_nav]
AS
SELECT     dbo.portal_forums_menusmall.smallid, dbo.portal_forums_menusmall.menuname AS smallmenuname, dbo.portal_forums_menubig.bigid, 
                      dbo.portal_forums_menubig.menuname AS bigmenuname
FROM         dbo.portal_forums_menusmall RIGHT OUTER JOIN
                      dbo.portal_forums_menubig ON dbo.portal_forums_menubig.bigid = dbo.portal_forums_menusmall.bigid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_forums_nav', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "portal_forums_menusmall"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 186
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_forums_menubig"
            Begin Extent = 
               Top = 6
               Left = 224
               Bottom = 121
               Right = 357
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_forums_nav'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_forums_nav', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_forums_nav'
GO
/****** Object:  View [dbo].[v_forums_menubig]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_menubig]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_forums_menubig] AS SELECT bigid,menuname AS bigmenuname,intro,orderid AS bigorderid FROM portal_forums_menubig'
GO
/****** Object:  View [dbo].[v_forums_menu]    Script Date: 12/20/2015 22:36:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[v_forums_menu]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[v_forums_menu]
AS
SELECT     dbo.portal_forums_menubig.bigid, dbo.portal_forums_menubig.menuname AS bigmenuname, dbo.portal_forums_menubig.intro, 
                      dbo.portal_forums_menubig.orderid AS bigorderid, dbo.portal_forums_menusmall.smallid, dbo.portal_forums_menusmall.imgurl, 
                      dbo.portal_forums_menusmall.menuname AS smallmenuname, dbo.portal_forums_menusmall.description, dbo.portal_forums_menusmall.totalsubject, 
                      dbo.portal_forums_menusmall.totalreply, dbo.portal_forums_menusmall.lastreplyuid, dbo.portal_forums_menusmall.lastreplyname, 
                      dbo.portal_forums_menusmall.lastpost, dbo.portal_forums_menusmall.lastpostid, dbo.portal_forums_menusmall.borderids, 
                      dbo.portal_forums_menusmall.bordernames, dbo.portal_forums_menusmall.orderid AS smallorderid, dbo.portal_forums_menusmall.isshow, 
                      dbo.portal_forums_menusmall.lastreplydate, dbo.portal_forums_menusmall.style, dbo.v_forums_pid.todaynew
FROM         dbo.portal_forums_menubig LEFT OUTER JOIN
                      dbo.portal_forums_menusmall ON dbo.portal_forums_menubig.bigid = dbo.portal_forums_menusmall.bigid LEFT OUTER JOIN
                      dbo.v_forums_pid ON dbo.v_forums_pid.smallid = dbo.portal_forums_menusmall.smallid
'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'v_forums_menu', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[43] 4[4] 2[37] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "portal_forums_menubig"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 121
               Right = 171
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "portal_forums_menusmall"
            Begin Extent = 
               Top = 6
               Left = 209
               Bottom = 121
               Right = 357
            End
            DisplayFlags = 280
            TopColumn = 14
         End
         Begin Table = "v_forums_pid"
            Begin Extent = 
               Top = 6
               Left = 395
               Bottom = 106
               Right = 529
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_forums_menu'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'v_forums_menu', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'v_forums_menu'
GO
