' Alwa7 tables and HowTos
' ////////////////////////////////////// Files
User default pictures
Any file found as /Assets/Images/Userxx.ext
Will be added to list of user default images in User profile
Old Alwah Users images
Files in /Assets/UserUploads/Usr_xxxx.ext
Where xxxx is the User ID from Old Alwah users table
' ////////////////////////////////////// Table columns
Alwa7Users
[nesrnet_main].[Alwa7Users](DummyID, UserID, UserEmail, UserPwd, UserFolder, UserID_OldAlwah, UserStatus, DateAdded, DateLastLogin, DateLastPwdChanged)
Users can register with Email address for now
UserStatus 01 = User just joined, not verified
02 = User from Alwah, added manually, not yes registered
07 = User is disabled, or account is locked
11 = User is active
UserID_OldAlwah: If that user has ID from previous version of Alwa7
Once user registered wit hsame email ID, old alwah will be automatically restored in his account
If login using same username/password, user will be able to see all old alwah
Admin IDs are defined hard-coded inside Parts1_Lib.asp in UserID_Admins array
If UserID is one of them, then it will be assigned to UserID_Admin
Alwa7Posts
[nesrnet_main].[Alwa7Posts](DummyID, PostID, PostName, PostBody, PostUserID, PostAuther, PostStatus, DateAdded)
PostAuther
If PostAuther is null, then Auther is the name from PostUserID
Should only be a name, a source, or a link to a post
PostStatus 01 = Draft
02 = Moved from Old Alwah
11 = Active, published
12 = Active, private (not public)
Alwa7Sites
[nesrnet_main].[Alwa7Sites](DummyID, SiteID, SiteName, SiteURL, SiteDescription, SiteUserID, SiteStatus, DateAdded)
SiteStatus 01 = Site just added
11 = Verified by admin
12 = Verified by user ...
Alwa7Cats
[nesrnet_main].[Alwa7Cats](DummyID, CatID, CatName, CatDescription, CatStatus, DateAdded)
CatStatus 01 =
02 =
Alwa7Settings
[nesrnet_main].[Alwa7Settings](DummyID, ObjectID, SettingName, SettingValue, SettingDescription, DateAdded)
ObjectID
ID of this User, Site, Post
= 'Global' for Settings of Alwa7 in general
SettingName starts with User- = Setting is for single user
User_Editor : Selected editor for this user
User_OldAlwah_RegistrationCode : Code for each user, import from MySQL database
User_OldAlwah_Subdomain
User_OldAlwah_Subline
User-Alwa7Name : Name of blog in Alwa7
User-Subline : second line = subline
Starts with Post_ = Setting is for Post
Post_Theme : Theme of this post (like youtube vid, poem, picture, etc..)
Post_x_Cat : Category for certain Post (PostID x CatID)
: List of IDs of Category for this post
Starts with Site_ = Setting is for Site
Site_x_Cat : Category of this site
' ////////////////////////////////////// SQL commands for Table structure
USE [nesrnet_alwa7]
GO
DROP TABLE [nesrnet_main].[Alwa7Cats]
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7Cats](
[DummyID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[CatID] [varchar](50) NOT NULL,
[CatName] [nvarchar](250) NULL,
[CatDescription] [nvarchar](250) NULL,
[CatStatus] [nvarchar](2) NULL,
[DateAdded] [datetime] NULL,
) ON [PRIMARY]
GO
USE [nesrnet_alwa7]
GO
DROP TABLE [nesrnet_main].[Alwa7Sites]
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7Sites](
[DummyID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[SiteID] [varchar](50) NOT NULL,
[SiteName] [nvarchar](250) NULL,
[SiteURL] [ntext] NULL,
[SiteDescription] [nvarchar](250) NULL,
[SiteStatus] [nvarchar](2) NULL,
[SiteUserID] [nvarchar](50) NULL,
[DateAdded] [datetime] NULL,
) ON [PRIMARY]
GO
USE [nesrnet_alwa7]
GO
DROP TABLE [nesrnet_main].[Alwa7Posts]
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7Posts](
[DummyID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[PostID] [varchar](50) NOT NULL,
[PostName] [nvarchar](250) NULL,
[PostBody] [ntext] NULL,
[PostUserID] [nvarchar](50) Not NULL,
[PostAuther] [nvarchar](250) NULL,
[PostStatus] [nvarchar](2) NULL,
[DateAdded] [datetime] NULL,
) ON [PRIMARY]
GO
USE [nesrnet_alwa7]
GO
--DROP TABLE [nesrnet_main].[Alwa7Settings]
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7Settings](
[DummyID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[ObjectID] [varchar](50) NOT NULL,
[SettingName] [nvarchar](250) NULL,
[SettingValue] [ntext] NULL,
[SettingDescription] [ntext] NULL,
[DateAdded] [datetime] NULL,
) ON [PRIMARY]
GO
USE [nesrnet_alwa7]
GO
DROP TABLE [nesrnet_main].[Alwa7Users]
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7Users](
[DummyID] [numeric](18, 0) IDENTITY(1,1) NOT NULL,
[UserID] [varchar](50) NOT NULL,
[UserEmail] [nvarchar](100) NULL,
[UserPwd] [nvarchar](50) NULL,
[UserFolder] [nvarchar](50) NULL,
[UserID_OldAlwah] [nvarchar](50) NULL,
[UserStatus] [nvarchar](2) NULL,
[DateAdded] [datetime] NULL,
[DateLastLogin] [datetime] NULL,
[DateLastPwdChanged] [datetime] NULL
) ON [PRIMARY]
GO
USE [nesrnet_alwa7]
GO /****** Object: Table [nesrnet_main].[Alwa7PostsFree_OldAlwah] Script Date: 1/2/2020 9:35:37 AM ******/
DROP TABLE [nesrnet_main].[Alwa7PostsFree_OldAlwah]
GO /****** Object: Table [nesrnet_main].[Alwa7PostsFree_OldAlwah] Script Date: 1/2/2020 9:35:37 AM ******/
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7PostsFree_OldAlwah](
[Id] [decimal](18, 0) NOT NULL,
[UserID] [int] NULL,
[CatID] [int] NULL,
[Name] [ntext] NULL,
[Auther] [ntext] NULL,
[Date] [datetime] NULL,
[Body] [ntext] NULL,
[DateAdded] [datetime] NULL,
[IP] [nvarchar](50) NULL,
[Status] [nvarchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
USE [nesrnet_alwa7]
GO /****** Object: Table [nesrnet_main].[Alwa7Posts_OldAlwah] Script Date: 1/2/2020 9:37:03 AM ******/
DROP TABLE [nesrnet_main].[Alwa7Posts_OldAlwah]
GO /****** Object: Table [nesrnet_main].[Alwa7Posts_OldAlwah] Script Date: 1/2/2020 9:37:03 AM ******/
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [nesrnet_main].[Alwa7Posts_OldAlwah](
[Id] [decimal](18, 0) NOT NULL,
[UserID] [int] NULL,
[Name] [ntext] NULL,
[Post] [ntext] NULL,
[IP] [nvarchar](50) NULL,
[DateAdded] [datetime] NULL,
[TimeAdded] [nvarchar](50) NULL,
[Status] [nvarchar](50) NULL,
[PID] [nvarchar](50) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO