global.php
Bring in the config file We need $session_name config.php $version depends on strings.php.
strings.php sets $PHP_SELF.
returns true if current php version is at mimimum a.b.c
Called: check_php_version(4,1)
returns true if the current internal SM version is at minimum a.b.c These are plain integer comparisons, as our internal version is constructed by us, as an array of 3 ints.
Called: check_sm_version(1,3,3)
Determine if there are lines in a file longer than a given length
Detect whether or not we have a SSL secured (HTTPS) connection to the browser
It is thought to be so if you have 'SSLOptions +StdEnvVars' in your Apache configuration, OR if you have HTTPS set to a non-empty value (except "off") in your HTTP_SERVER_VARS, OR if you have HTTP_X_FORWARDED_PROTO=https in your HTTP_SERVER_VARS, OR if you are on port 443.
Note: HTTP_X_FORWARDED_PROTO could be sent from the client and therefore possibly spoofed/hackable - for now, the administrator can tell SM to ignore this value by setting $sq_ignore_http_x_forwarded_headers to boolean TRUE in config/config_local.php, but in the future we may want to default this to TRUE and make administrators who use proxy systems turn it off (see 1.5.2+).
Note: It is possible to run SSL on a port other than 443, and if that is the case, the administrator should set $sq_https_port to the applicable port number in config/config_local.php
Search for the var $name in $_SESSION, $_POST, $_GET, $_COOKIE, or $_SERVER and set it in provided var.
If $search is not provided, or == SQ_INORDER, it will search $_SESSION, then $_POST, then $_GET. Otherwise, use one of the defined constants to look for a var in one place specifically.
Note: $search is an int value equal to one of the constants defined above.
example: sqgetGlobalVar('username',$username,SQ_SESSION); -- no quotes around last param!
Deletes an existing session, more advanced than the standard PHP session_destroy(), it explicitly deletes the cookies and global vars.
Function to verify a session has been started. If it hasn't
start a session up. php.net doesn't tell you that $_SESSION (even though autoglobal), is not created unless a session is started, unlike $_POST, $_GET and such
Checks to see if a variable has already been registered in the session.
Add a variable to the session.
Function to start the session and store the cookie with the session_id as
HttpOnly cookie which means that the cookie isn't accessible by javascript (IE6 only) Note that as sqsession_is_active() no longer discriminates as to when it calls this function, session_start() has to have E_NOTICE suppression (thus the @ sign). Update: with PHP7.2+, session_set_cookie_params() is similarly affected.
Delete a variable from the session.
Set a cookie
Recursively strip slashes from the values of an array.
Squelch error output to screen (only) for the given function.
This provides an alternative to the @ error-suppression operator where errors will not be shown in the interface but will show up in the server log file (assuming the administrator has configured PHP logging).
Documentation generated on Mon, 13 Jan 2020 04:24:40 +0100 by phpDocumentor 1.4.3