_init_page.php
pages-array
structure of array pages[$_GET[page]]:
- url
- helpurl
- login
- datadefID
- layout
- js_display (masterdata1 or html1)
- headtitle
- headdescription
- head
- contentPHP
- foot
Check cookie and login
If a login-cookie is set and the $_SESSION[userID] is lost, the user is logged in by the cookie again.
If an pages which requires a login is called, a redirect to the login is executed.
language support
the language can set by:
- $_SESSSION[domain_language]
- $_GET[domain_language]
- $_SERVER['HTTP_ACCEPT_LANGUAGE']
Only languages set in the global array "domain_languages" are accepted.
masterdata/_init.php
Global variables:
- for domain
- title and description
- language
- name and email
- for include
- domain_datadeffiles
- domain_selectfiles
- [domain_includes]
The include files allows to write individual project code in your project folder
_prepare_head.php
The datadefinition is loaded. The head meta data are prepared here:
This are the dependencies with a datadefinition:
- datadefID set:
- keyvalue set
- headertitlecolumn
- headerdescriptioncolumn
- else
- headertitle
- headerdescription
- else
- domain_name
- domain_description
more dependencies with a datadefinition:
- head
[this array lines are inserted into <head>]
- head_include
[all php array elements are includes into <head>]
- foot
[this array lines are inserted at the end]
If you insert an Javascript file at the end ("foot") this replaces the Standard Javascript file "example.js". So you have to append the elements by your self to the right html tags.
_head_js.php, Javascript variables from PHP
Here are variables from the PHP Locals trasferred to get a sophisticated date and number formatting.
The settings of the datadefinitions are also defined here.
_header.php, the navigation
2 Options:
- menu with PHP and HTML
- menu by JavaScript with js/menu.js