2018-11-30 09:33:03 +00:00
|
|
|
.. index:: scripts
|
|
|
|
.. index:: PHP
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
================
|
|
|
|
Global Variables
|
|
|
|
================
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
As the modules this website includes have to communicate together there are some global variables defined as arrays
|
2018-11-28 23:54:17 +00:00
|
|
|
|
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. index:: $_REQUEST
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
:php:global:`$_REQUEST`
|
|
|
|
=======================
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_REQUEST['action']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['cert']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['domid']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['id']
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. php:global:: $_REQUEST["lang"]
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_REQUEST['memid']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['oldid']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['orgid']`
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['process']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['showdetails']
|
|
|
|
|
|
|
|
.. php:global:: $_REQUEST['ticketno']
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. index:: $_SERVER
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
:php:global:`$_SERVER`
|
|
|
|
======================
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. php:global:: $_SERVER['HTTP_ACCEPT_LANGUAGE']
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
.. php:global:: $_SERVER['HTTP_HOST']
|
|
|
|
|
|
|
|
Contains the recent host-header from the actual request (if sent). Is set by system.
|
|
|
|
|
|
|
|
This variable is used in :file:`includes/general.php`
|
|
|
|
|
|
|
|
.. php:global: $_SERVER['HTTPS']
|
|
|
|
|
|
|
|
Contains a non-empty value if the script is called by HTTPS. It is assumed to be the value "on".
|
|
|
|
|
|
|
|
This variable is used in :file:`includes/general.php`
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SERVER['PHP_SELF']
|
|
|
|
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. index:: $_SESSION
|
2018-11-28 23:54:17 +00:00
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
:php:global:`$_SESSION`
|
|
|
|
========================
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['mconn']
|
|
|
|
|
|
|
|
This global variable defines the status of the database connection
|
|
|
|
|
|
|
|
* TRUE if a connection could be established
|
|
|
|
* FALSE otherwise
|
|
|
|
|
|
|
|
.. index:: $_SESSION['_config']
|
|
|
|
|
|
|
|
----------------------------------
|
|
|
|
:php:global:`$_SESSION['_config']`
|
|
|
|
----------------------------------
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['errmsg']
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
This global variable is initialized in :file:`includes/general.php` with the value ''.
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['filepath']
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
This global variable is initialized in :file:`includes/general.php` with the value '/www'. Meant is the root direcory.
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['header']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['_config']['language']
|
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['normalhostname']
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
This global variable defines the main CAcert-website, it is set in :file:`/includes/mysql.php`.
|
2018-11-30 09:33:03 +00:00
|
|
|
|
|
|
|
* "www.cacert.org" for production
|
|
|
|
* "test.cacert.org" for testing
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['recode']
|
|
|
|
|
2018-11-30 09:33:03 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['securehostname']
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
This global variable defines the secure CAcert-website, it is set in :file:`/includes/mysql.php`.
|
2018-11-30 09:33:03 +00:00
|
|
|
|
|
|
|
* "secure.cacert.org" for production
|
|
|
|
* " cacert.org" for testing
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
.. php:global:: $_SESSION['_config']['tverify']
|
2018-12-03 12:37:14 +00:00
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
This global variable defines TVERIFY, it is set in :file:`/includes/mysql.php`.
|
2018-12-03 12:37:14 +00:00
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
* "tverify.cacert.org" for production
|
|
|
|
* " " for testing
|
2018-11-30 09:33:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.. todo:: checkout what TVERIFY means, check names for test-system
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. index:: $_SESSION['profile']
|
|
|
|
|
|
|
|
----------------------------------
|
|
|
|
:php:global:`$_SESSION['profile']`
|
|
|
|
----------------------------------
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['adadmin']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['admin']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['assurer']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['dob']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['email']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['fname']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['id']
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
Here the internal representation of the user is stored. It is used for database accesses. 'user'
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SESSION['profile']['lname']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['locadmin']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['mname']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['orgadmin']
|
|
|
|
|
|
|
|
.. php:global:: $_SESSION['profile']['points']
|
|
|
|
|
2018-12-16 17:11:36 +00:00
|
|
|
Contains the total number of points for the user; calculated from :ref:`notary`.
|
|
|
|
|
2018-12-03 12:37:14 +00:00
|
|
|
.. php:global:: $_SESSION['profile']['suffix']
|
|
|
|
|
|
|
|
.. index:: globalConstants
|
|
|
|
|
|
|
|
================
|
|
|
|
Global Constants
|
|
|
|
================
|
|
|
|
|
|
|
|
.. php:const:: NULL_DATETIME
|
|
|
|
|
|
|
|
This constant has the value '0000-00-00 00:00:00'
|
|
|
|
|
|
|
|
.. php:const:: THAWTE_REVOCATION_DATETIME
|
|
|
|
|
|
|
|
This constant has the value '2010-11-16 00:00:00'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
==========
|
|
|
|
Exceptions
|
|
|
|
==========
|
|
|
|
|
|
|
|
.. php:exception:: E_USER_NOTICE
|
|
|
|
|
|
|
|
.. php:exception:: E_USER_WARNING
|
|
|
|
|
|
|
|
.. php:exception:: E_USER_ERROR
|
2018-11-30 09:33:03 +00:00
|
|
|
|
|
|
|
|
2018-11-28 23:54:17 +00:00
|
|
|
|
|
|
|
|