All of a site's page and template information is held within a database stored on a mysql server. The name of the database is the same as the site's working directory that is also a folder under the apache web server's /var/www directory.
A site called 'sample' for a website at 'www.sample.co.uk' would be stored under /var/www/sample and it's database would be called 'sample'.
The php code detects it's working directory and uses that to deduce the database name. In this way, a machine (or virtual machine) running the ucms.php system can be used to maintain code for several websites.
There are two tables in each site database. 'pages' holds any page or piece of content that will form the website, 'templates' holds a list of templates that indicate the combination of page elements that are needed for each page.
At least two templates are required for each website, one called 'code' that describes pages that are stored and edited as plain text (such as any css, javascript or other plain text elements), and one for the main html body each standard web page.
Each 'page' contains Name, Title, Description, Keywords, area, level, link, mainlink and PageType as well as a content area (the body of standard pages).
Name is the actual file name (index.html, styles.css, example.js etc.)
Area is the Directory or Folder the page is stored in or blank if it its in the main 'root' directory of the web site. The ucms.php system can (as it is) handle 1 level of directory under the root (/, /help, /downloads, etc.).
Title, Description, and Keywords are used to populate the web page header section.
mainlink is for the text used to link the page if a link on the main link section of the page is required.
link is for the text used to link the page if a link on the current area link section of the page is required.
level sets the priority of a page in any menu scheme. Low numbers appear first in a menu. As pages can appear both in main menu and sub-menus, where there are several areas, start each area with a large number (200, 400, 600) and use lower increments for pages within areas (410, 420, 430). As this number is only used to decide the order of any links in a menu, if a page is not listed or the order of any menus does not matter, leave it at 0.
PageType is the name of any template used. If this name is 'code', then the showPage.php will not try to use the xinha editor for the body of the page. All other templates the editor is used. When a page is built, if its page type is 'code' and that template has a page type of '0' then the content of the page will just be stored as is. All others will be built as html pages with headers added.