Loading...
 

Built-in session variables

To print the current state of all session variables from the event use the following:
PHP
print_r ($_SESSION);
Note: <table name> in the variable name should be replaced with the actual table name i.e. $_SESSION["<table name>_SelectedSQL"] becomes $_SESSION["Cars_SelectedSQL"].
PHP variable nameASP variable nameDescription
$_SESSION["UserID"]SESSION("UserID")Logged user ID
$_SESSION["GroupID"]SESSION("GroupID")GroupID that user belongs to. Populated if User Group Security turned on (used for static permissions only).
$_SESSION["UserRights"]["<table name>"]SESSION("UserRights")("<table name>")User permissions for selected table (used for dynamic permissions). To get the value of this variable use special function GetUserPermissions("<table name>") that returns set of permissions for current user in the AEDSPIM format, where A - add, E - edit, D - delete, S - search/list, P - print/export, I - import, M -admin group.
PHP
$permissions = GetUserPermissions("Cars");
ASP
permissions = GetUserPermissions("Cars")
If you need to assign the value to the variable, use the variable directly.
PHP
$_SESSION["UserRights"]["Cars"] = "AEDSPI";
ASP
Session("UserRights")("Cars") = "AEDSPI"
$_SESSION["language"]SESSION("language")Current selected language e.g. "English" or "Spanish". To get the value of this variable use special function mlang_getcurrentlang() that returns current selected language. If you need to assign the value to the variable, use the variable directly.
PHP
$_SESSION["language"]="English";
ASP
Session("language")="English"
$_SESSION["MyURL"]SESSION("MyURL")If user is trying to access one of password-protected pages directly e.g. pagename_edit.php?editid1=3 this page address is saved in this variable and user is redirected to the login page. After successful login user will be redirected to that page.
$_SESSION["AccessLevel"]SESSION("AccessLevel")AccessLevel values: ACCESS_LEVEL_GUEST - guest user; ACCESS_LEVEL_USER - regular user; ACCESS_LEVEL_ADMINGROUP - user belongs to the admin group; ACCESS_LEVEL_ADMIN - admin user. Obsolete.
$_SESSION["OwnerID"]SESSION("OwnerID")OwnerID value from the login table. Obsolete.
$_SESSION["_<table name>_OwnerID"]SESSION("_<table name>_OwnerID")OwnerID value from the login table that applies to <table name> table.

Other session variables

PHP variable nameASP variable nameDescription
$_SESSION["<table name>_search"]SESSION("<table name>_search")0 - show all records; 1 - basic search; 2 - advanced search.
$_SESSION["<table name>_searchfield"]SESSION("<table name>_searchfield")Basic search field.
$_SESSION["<table name>_searchoption"]SESSION("<table name>_searchoption")Basic search option (Equals, Contains, etc).
$_SESSION["<table name>_searchfor"]SESSION("<table name>_searchfor")Basic search for phrase.
$_SESSION["<table name>_pagenumber"]SESSION("<table name>_pagenumber")Current page number.
$_SESSION["<table name>_asearchnot"]SESSION("<table name>_asearchnot")Advanced search - array with NOT option value for each field.
$_SESSION["<table name>_asearchopt"]SESSION("<table name>_asearchopt")Advanced search - array with search option value for each field (Equals, Contains etc).
$_SESSION["<table name>_asearchfor"]SESSION("<table name>_asearchfor")Advanced search - array with with search for value for each field.
$_SESSION["<table name>_asearchfor2"]SESSION("<table name>_asearchfor")Advanced search - array with with second search for value for each field (Between search).
$_SESSION["<table name>_asearchfortype"]SESSION("<table name>_asearchfortype")AND or OR search.
$_SESSION["<table name>_mastertable"]SESSION("<table name>_mastertable")Master table name.
$_SESSION["<table name>_masterkey1"], $_SESSION["<table name>_masterkey2"] etcSESSION("<table name>_masterkey1"), SESSION("<table name>_masterkey2") etcMaster table foreign key values.
$_SESSION["<table name>_orderby"]SESSION("<table name>_orderby")Order by clause (aFieldName or dFieldName). "a" means ascending, "d" means descending sort order.
$_SESSION["<table name>_pagesize"]SESSION("<table name>_pagesize")Number of records per page. Readonly. If you need to change page size programmatically add the following code to After table initialized event:
PHP
global $tables_data, $strTableName;
$tables_data[$strTableName][".pageSize"] = 100;
ASP
tables_data(strTableName)(".pageSize") = 100
$_SESSION["<table name>_sql"]SESSION("<table name>_sql")SQL query without WHERE and ORDER BY. Populated on the list page to be used on Print/Export pages.
$_SESSION["<table name>_where"]SESSION("<table name>_where")WHERE clause. Populated on the list page to be used on Print/Export pages.
$_SESSION["<table name>_order"]SESSION("<table name>_order")ORDER By clause ("Order by make asc"). Populated on the list page to be used on Print/Export pages.
$_SESSION["BackURL"]SESSION("BackURL")URL to return after password was changed.
$_SESSION["<table name>_SelectedSQL"]SESSION("<table name>_SelectedSQL")Export page - SQL query when page is in "export selected" mode.
$_SESSION["<table name>_SelectedWhere"]SESSION("<table name>_SelectedWhere")Export page - WHERE clause when page is in "export selected" mode.