Script and Variables
This page show you how to use the Alinous-Script. The Alinous-Script is like javascript and the variable is based on the DOM(Document Object Model) model.
- Set of Alinous-Script and html
- Basic script and html
- Script variables
- Type of variables
- The Array variables
- Reserved variables
Set of Alinous-Script and html
The Alinous-Module consists of Alinous-Script and HTML, and sometimes HTML does not exist.
When you write sctipt to download module, or module to redirecting other page, the html file is not necessary.
The execution order is
- Execute Alinous-Script
- Render HTML with the result of Alinous-Script
Basic script and html
You can make variables in the Alinous-Script.
This script returns 0, then the exexution process goes to the html file.
When returned value is not 0
if the value of return value is not 0, then the page will forwarded to other page.
Script variables
The script variable is DOM liked, and you can use the parent-children structure by separating with ".".
Existance check of variables
When the variable does not exists, the it is same with having null value.
Type of variables
There are 3 type of Alinous-Script variable.
- String
- Integer
- Double
The type of value is decided when substituting value.
You can watch them by using debugger.
The Array variables
You can use array variables. The variables in the array is automatically allocated on substitutions.
You can watch it with debugger.
Reserved variables
Some variables are reserved by Alinous-Core server. These are below.
Variable name | Description |
$IN | Parameters of GET or POST method in HTTP protocol |
$SESSION | Session key and stored values in the session |
$HTTP | HTTP Header |