Core database layout
From XtConcordia
Overview of all present database tables from the core. Module and panel specific modules are not listed in here. The prefix of each table can be configured in core/config.php ($DB_PREF).
| Table of contents |
Constants
User configurable parameters are stored inside this table. Pretty much all of them are required. An overview of available names/values can be found here.
`Constants_ID` int(11) NOT NULL
auto_increment, PRIMARY KEY
`Constants_Name` varchar(50)
The name of the constant
`Constants_Value` longtext
The value of the constant
`Constants_Descr` varchar(255)
Short description of the constant. This text is displayed when consulting modules/admin_constants.php. This is a user interface to easily change all constants.
`Constants_Admin` char(1)
If this flag is 1, then the constant is configurable using modules/admin_constants.php. Otherwise it won't be listed in that user interface.
Content
If a new page has to be created, this table is your starting point.
`Content_ID` int(11) NOT NULL
auto_increment, PRIMARY KEY
`Content_Module` varchar(128)
The filename (without the .php extension !) of the module which is associated to the content.
`Content_Descr` text
An optional description which is shown/edited when using modules/admin_content.php. It has no value for ordinairy users.
`Content_Extra` int(11)
This flag is optional (otherwise 0) and is intended to associate with module specific code. For example: if this flag is 1 when using modules/static.php then content is shown inside a window, otherwise it isn't. Consult the module documentation to see which values are supported in here.
`Content_Public` int(1)
This flags controls which authentication method is used to access the content. Possible values are:
- 0 --> the access is controlled by ACL/groups (default)
- 1 --> content is publically accessable
- 2 --> content is exclusive publically accessable (no access if logged in)
Groups
Groups for access control are created in here.
`Groups_ID` int(11)
auto_increment, PRIMARY KEY
`Groups_Name` varchar(64)
The groupname (doh)
`Groups_Descr` varchar(254)
Here you can put an optional description for the group
`Groups_Hidden` int(1)
If this flag is 1, then the group will only be visible to administrators.
Groupbind
Use this table to bind users to groups. A user can be member of multiple groups. Group nesting is not possible.
`Groupbind_ID` int(1)
auto_increment, PRIMARY KEY
`Groupbind_UserID` int(11)
The user id to bind to the group
`Groupbind_GroupID` int(11)
The group id to bind to
ACL
This table holds the access control lists. Groups are mapped against the content id's to which they have access. Multiple groups can be defined for one content id.
`ACL_ID` int(11)
auto_increment, PRIMARY KEY
`ACL_ContentID` int(11)
the content id for which access is granted
`ACL_GroupID` int(11)
the group id which may access the content id
Lans
Your LAN-party events can be created in this table. Very important if you edit this table manually: only one LAN-party may be marked activate !
`Lans_ID` int(11)
auto_increment, PRIMARY KEY
`Lans_Name` varchar(128)
The name of your lan party
`Lans_Places` int(128)
The available amount of gamer seats
`Lans_Active` int(1)
Active a lan by setting this flag true (1)
`Lans_Fee` int(11)
The entrance fee to pay (pre-payed)
`Lans_Feelate` int(11)
The entrance fee to pay if not payed in advance
`Lans_Account` varchar(128)
The bank account number to wire transfer entrance fees in advance
`Lans_Location` varchar(255)
Description of the physical location where your lan party will be held
The following fields are there, but will change in the future:
- `Lans_Date_en` varchar(255)
- `Lans_Date_nl` varchar(255)
- `Lans_Reg_en`
- `Lans_Reg_nl`
- `Lans_Regmail_en`
- `Lans_Regmail_nl`
- `Lans_Paymail_en`
- `Lans_Paymail_nl`
- `Lans_Open` int(1)
Logins
This table is used to audit all logins.
`Logins_ID` int(11)
auto_increment, PRIMARY KEY
`Logins_Subs_ID` int(11)
The logged in user id
`Logins_Timestamp` timestamp(14)
Timestamp when logged in
`Logins_IP` varchar(128)
The IP-address from which the loggin has been initiated. This one can be the ip of the proxy server used.
Navlevel1
Site layout and navigation are controlled by the navlevel tables, which are devided into two levels (1 and 2). The navigation tree starts in this table.
`Navlevel1_ID` int(11)
auto_increment, PRIMARY KEY
Titles for the 4 language sets:
- `Navlevel1_Title_1` varchar(50)
- `Navlevel1_Title_2` varchar(50)
- `Navlevel1_Title_3` varchar(50)
- `Navlevel1_Title_4` varchar(50)
`Navlevel1_Order` int(1)
This integer is used to order navlevel1 entries
Navlevel2
Site layout and navigation are controlled by the navlevel tables, which are devided into two levels (1 and 2). This table holds the second level where content id's are mapped.
`Navlevel2_ID` int(11)
auto_increment, PRIMARY KEY
Titles for the 4 language sets:
- `Navlevel2_Title_1` varchar(50)
- `Navlevel2_Title_2` varchar(50)
- `Navlevel2_Title_3` varchar(50)
- `Navlevel2_Title_4` varchar(50)
`Navlevel2_Navlevel1_ID` int(11)
The navlevel1 id to which the navlevel2 belongs
`Navlevel2_Content_ID` int(11)
The content id which is associated to this level
`Navlevel2_Order` int(1)
This integer is used to order navlevel2 entries
`Navlevel2_URL` decimal(1,0)
If you want to make an external link, this flag should be set to true (1)
`Navlevel2_URL_Str` varchar(100)
External links are put in here (ex http://www.google.com)
Topmenu
If enable_topmenu is true (1) in table Constants, then a topmenu will be shown between the topbanner code and the rest of the page. This table controls which links should be added to it.
`Topmenu_ContentID` int(11)
The associated content id
`Topmenu_Order` int(11)
This integer controls the link order
Panels
This table controls which panels to display in the left or right panel area's. For a complete list of panels, check out this page (to do). Pay attention to also activate the left or right panel area itself. Some panels are not displayed even if they are active in this table. This behaviour depends on the panel code itself.
`Panels_ID` int(11)
auto_increment, PRIMARY KEY
`Panels_Name` varchar(64)
The filename of the panel code (without the .php extension !)
`Panels_Active` int(1)
Set to true (1) if the panel should be activated
`Panels_Location` int(1)
Possible values are:
- 1 --> display in left panel area
- 2 --> display in right panel area
`Panels_Order` int(11)
This integer is used to order the panels inside the panel areas
Users
User accounts are stored in this table.
`Users_ID` int(11)
auto_increment, PRIMARY KEY
`Users_Login` varchar(128)
The login should always be a valid e-mail address
`Users_Barcode` varchar(32)
Barcode which can be used to automate gamer reception
`Users_Pwd` varchar(128)
The login password (hashed using sha1)
User information which can't be altered after registration:
- `Users_Name` varchar(128)
- `Users_Surname` varchar(128)
- `Users_Gender` int(1) --> male = 0, female = 1
- `Users_Birthday` date
User information which can be altered by modules/profile.php:
- `Users_Street` varchar(128)
- `Users_Streetnr` int(11)
- `Users_Streetbus` int(11)
- `Users_Zip` varchar(64)
- `Users_Country` varchar(128)
- `Users_City` varchar(128)
- `Users_Nick` varchar(128)
- `Users_Tel` varchar(64)
- `Users_GSM` varchar(64)
- `Users_Website` varchar(255)
- `Users_Clan` varchar(128)
- `Users_MSN` varchar(255)
- `Users_Lang` char(2) --> prefered language, used to generate e-mails in the correct language
`Users_MagicNumber` varchar(255)
This random number is used to validate the registered e-mail address
`Users_Valid` int(1)
Users can only login if this is set true (1) (when the e-mail address is validated)
`Users_Admin` int(1)
Set to true (1) for site admins
`Users_Crew` int(1)
Set to true (1) for crew members (this one is used for some specific modules)
`Users_Creditcard` varchar(255)
The credit card barcode for XtPaydesk integration
`Users_CCActive` int(1)
Set to true (1) to activate the credit card function
`Users_CCBlocked` int(1)
User controlled to block the credit card when stolen
`Users_MP3Block` int(1)
If set to true (1) the user won't be able to upload mp3 when using modules/mp3stream.php
Subs_new
This table manages the user subscription for the lan party events. The modules name should change to Subs again.
`Subsnew_ID` int(11)
auto_increment, PRIMARY KEY
`Subsnew_LansID` int(11)
The lan party id to which the user is subscribed
`Subsnew_UserID` int(11)
The user id
`Subsnew_State` int(1)
- 0 --> not payed
- 1 --> payed
- 2 --> crew
`Subsnew_Arrived` int(1)
Users can only login into the intranet system if they have arrived at the lan party. (if lan_mode is set to true in table Constants)
- 0 --> not arrived
- 1 --> arrived
`Subsnew_Payed` date
The date when the payment was registered

