SiteMaker
Version 1.1
Cobsoft(科本软件)
Copyright (C) 2010, Cobsoft.
All rights reserved.
FEATURE
> root directory is a page selector by using query_string(id=ddd) to specified a page
> each sub directories of root are a page templates by using query_string(id=ddd) to specified a page
> page templates consist of page elements and HTML objects
> page selector own a database table
> each page template has a seperate database table
> each page element has a seperate database table
> there is a template database table to store the information of all the templates
> there has a page element table to store the information of all the page elements
DESIGN
> how to install elements and pages is a problem, dynamical or statical
> there has two step of setup, first setup config, second init database
> init database need to input default administrator account
> only page and template need default indicator
> db_table of element is private, and not identify to others
> db_table of page is private, so not identify to others
> element may embed other elements
> page may embed elements or not
SETUP steps
STEP 1 - Config Database Access Information
> when config first time ('config.inc.php' not found), config need not to be certificated.
> when config next time, config need to be operated in administrator logged in
STEP 2 - Create/Restore Default Database Table and Insert it's Default Content
> when initialized first (no user exist or db not exist), init need not to be operated and need
to input default administrator account
> when initialized already, init need to be operated in administrator logged in
DATABASE DICTIONARY
> page(id, title, is_default, template_id, query_string_id)
> template(id, title, name, private_table_name, url)
> element(id, title, name, master_file, db_file, private_table_name, func)
> template_xxx(id, ...)
> element_xxx(id, ...)
FILE
> index.php - template master file(each root or sub root directory has one template file)
THE FOLLOWING FILES ARE ALL IN /admin/ directory
> default.inc.php - default config file
> config.inc.php - local config file
> driver.inc.php - database client driver(default use MySQL)
> text.inc.php - format text output module
> url.inc.php - get absoluted/related url
> http.inc.php - http relative module
> db_page.inc.php - access page_list db table
> db_template.inc.php - access template_list db table
> db_element.inc.php - access element_list db table
> db_template_xxx.inc.php - template xxx private data access
> db_element_xxx.inc.php - access elelents xxx private db table
> html_element_xxx.inc.php - html view file of element xxx
> select_element_xxx.inc.php - select file of element xxx
> create_element_xxx.inc.php - create file of element xxx