Directory structure SaltOS
SaltOS uses the following folder structure:
- cache: for temporary files
- css: for style files
- doc: for documentation
- files: for attachments and configuration
- img: for images (icons and other graphic elements)
- inbox: for incoming mail (RFC822 format and .eml)
- install: for the installation wizard
- lib: for third-party libraries
- outbox: for outgoing mail (in RFC822 format and .eml)
- php: for PHP codes
- action: for PHP codes classified as actions
- database: PHP drivers for access to databases
- xml: for XML configuration files
- common: for common XML files in other XML files
- lang: for XML files that provide each language literals
- xsl: for XSLT transformation files to HTML
Structure requests SaltOS
SaltOS uses 3 variables in requests to the server to indicate that task to perform:
- page: this variable tells jumps application to use.
- for a value of page to be valid, there must be a file with the same name in XML format and in the xml directory.
- action: this variable tells jumps node XML that defines the application you want to use.
- for a value of action to be valid, there must be a file with the same name in PHP format and in the php/action directory.
- id: this variable tells SaltOS on that record is desired to operate. It can contain three possible ranges:
- negative: a negative value for the id, please hops must show query view.
- zero: a negative value for the id, please SaltOS should show the view to create new records.
- positive: a positive value for the id, please SaltOS should show the view to modify records.
In the previous examples they have been explained the "actions" that come by default in the core of jumps, but if a developer needs to create new actions, you can do simply:
/* AQUI HACER LO QUE SE DESEE USANDO PHP */
This is a piece of PHP code and you can see the following characteristics:
- The first useful line of code checks whether the user is active on the system, that is, if you have done previously and successfully login.
- The second line is used to detect this Actión only be run when the origin is the example page.
- At the end of the action, you must end the script execution via die(). Otherwise SaltOS would show an error message indicating that it has not found any valid action.