Responsive web Framework

DOCUMENTATION

Env

Information about the environment in which the system is running

NOT AVAILABLE FOR TINY SCREENS

(minimum width: 480px)

Purpose

This object retrieves data from the environment, like where the system is installed, providing information about variables, directories, cookies, security codes, allowed actions (siteup), languages supported and provides information through established methods.

The object variable $env is reserved for this.

Values

The system internally stores certain values throughout its existence, some accessible only by the corresponding method.

$str_AVAILABLEACTIONS
Available action options.
$str_AVAILABLELANGS
Supported languages.
$str_SECCODE
Security code. Is created while installing and do not change along the use.
$str_FULLDOMAIN
Full domain, including subdomain.
$str_CPDOMAIN
control panel domain.
$str_CGIDIR
Script directory, usually cgi-bin. If your system uses another directory, please change it.
$str_HOME
Home (~/) of the user
$str_TEMP
Temporary directory (~/tmp/) not available via web. Used for temporary downloads.
$str_HTDOCS
Html documents directory (~/public_html/).
$str_ADMCP
Path to administrative panel (~/public_html/subdom/subdir/)
$str_USRCP
Path tu user panel (~/public_html/subdom/subdir/)
$str_LOCALTEMP
Local temporary directoy available for web use (~/public_html/subdom/subdir/temp/).
$str_LANG
Current language.
$str_IP
IP address of the client

Description

The object $env, belongs to class EnvData and is created only once, offering the following methods:

envAction(opt)
Returns the current action. If you pass as a parameter the word "available" returns the value of all possible actions.
envLang(opt)
Returns the current language. If you pass as a parameter the word "available" returns the value of all languages supported.
envSecCode()
No parameters required. It returns the security key This functionality should be used only for internal processes, never deployed to the screen or change its value.
envDir(str)
Returns some of the directory values according to the indicated option (cgi, home, temp, htdocs, admcp, usrcp, ltemp). By default it returns the value of the current directory.
envCgi(opt)
If it is indicated as parameter the value of "method" returns the method used to call cgi (POST | GET). Otherwise returns the value of the cgis directory.
envGet(str)
According to the indicated parameter (str) the value of ip (ip) or domain (fulldomain) or the name or privileges corresponding to the service or current subservice (servicename, serviceprivileged, subservicename, subserviceprivileged). In case of being some other value, it tries to return the default value or the one indicated as parameter. Note that this follows a different logic to the following three methods.
envDefault(str)
Returns the default value as parameter (str).
envParam(str)
Returns the parameter value (str).
envCookie(str)
Returns de cookie value (str).

Use

Requiere de la carga previa de los objetos $db y $usr.

See it! icon execute code