]> git.mxchange.org Git - mailer.git/blobdiff - inc/callback-functions.php
Continued a bit:
[mailer.git] / inc / callback-functions.php
index d6d2b927e52ec1bc0fa543f5ca3f1c61bdf24b5e..9ce22d67cfa74a181422e39fec43ceb3ddc83987 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Call-Back-Funktionen fuer XML-Templates          *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -43,7 +38,16 @@ if (!defined('__SECURITY')) {
 // Handles the XML node 'admin-entry-meta-data'
 function doXmlAdminEntryMetaData ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'member-entry-meta-data'
+function doXmlMemberEntryMetaData ($resource, $attributes) {
+       // There should be no attributes
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
        } // END - if
@@ -109,7 +113,7 @@ function doXmlDatabaseTable ($resource, $attributes) {
 // Handles the XML node 'database-column-list'
 function doXmlDatabaseColumnList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
@@ -163,7 +167,7 @@ function doXmlDatabaseColumnListEntry ($resource, $attributes) {
 // Handles the XML node 'callback-function-list'
 function doXmlCallbackFunctionList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
@@ -205,7 +209,7 @@ function doXmlCallbackFunctionListEntry ($resource, $attributes) {
 // Handles the XML node 'extra-parameter-list'
 function doXmlExtraParameterList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
@@ -247,7 +251,7 @@ function doXmlExtraParameterListEntry ($resource, $attributes) {
 // Handles the XML node 'time-columns-list'
 function doXmlTimeColumnsList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } // END - if
@@ -289,7 +293,7 @@ function doXmlTimeColumnsListEntry ($resource, $attributes) {
 // Handles the XML node 'extra-parameter-member-list'
 function doXmlExtraParameterMemberList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['member_list'])) {
@@ -301,7 +305,7 @@ function doXmlExtraParameterMemberList ($resource, $attributes) {
 // Handles the XML node 'extra-parameter-reload-list'
 function doXmlExtraParameterReloadList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['reload_list'])) {
@@ -310,6 +314,18 @@ function doXmlExtraParameterReloadList ($resource, $attributes) {
        }
 }
 
+// Handles the XML node 'extra-parameter-waiting-list'
+function doXmlExtraParameterWaitingList ($resource, $attributes) {
+       // There should be no attributes
+       if (isFilledArray($attributes)) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['waiting_list'])) {
+               // This list should be created already
+               reportBug(__FUNCTION__, __LINE__, 'waiting_list should be already created.');
+       }
+}
+
 // Handles the XML node 'extra-parameter-member-list-entry'
 function doXmlExtraParameterMemberListEntry ($resource, $attributes) {
        // There are three attributes, by default
@@ -370,10 +386,40 @@ function doXmlExtraParameterReloadListEntry ($resource, $attributes) {
        addXmlValueToCallbackAttributes('extra_list', $attributes, 'reload_list');
 }
 
+// Handles the XML node 'extra-parameter-waiting-list-entry'
+function doXmlExtraParameterWaitingListEntry ($resource, $attributes) {
+       // There are three attributes, by default
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+               // No valid type
+               reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+       } elseif (!isset($attributes['VALUE'])) {
+               // 'VALUE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               // Not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. TYPE=' . $attributes['TYPE'] . ',VALUE=' . $attributes['VALUE']);
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['waiting_list'])) {
+               // doXmlCallbackFunction is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/extra-parameter-list/waiting-list not included around this node. Please fix your XML.');
+       }
+
+       // Add the entry to the list
+       addXmlValueToCallbackAttributes('extra_list', $attributes, 'waiting_list');
+}
+
 // Handles the XML node 'extra-parameter-added-list'
 function doXmlExtraParameterAddedList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['added_list'])) {
@@ -415,7 +461,7 @@ function doXmlExtraParameterAddedListEntry ($resource, $attributes) {
 // Handles the XML node 'extra-parameter-created-list'
 function doXmlExtraParameterCreatedList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['extra_list']['created_list'])) {
@@ -487,13 +533,16 @@ function doXmlStatusChangeColumn ($resource, $attributes) {
 // Handles the XML node 'status-change-list'
 function doXmlStatusChangeList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
-       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) {
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
                // doXmlCallbackFunction is missing
-               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.');
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
+
+       // Add the entry to the list
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'] = array();
 }
 
 // Handles the XML node 'status-change-list-entry'
@@ -686,7 +735,16 @@ function doXmlCacheFile ($resource, $attributes) {
 // Handles the XML node 'admin-list-data'
 function doXmlAdminListData ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'member-list-data'
+function doXmlMemberListData ($resource, $attributes) {
+       // There should be no attributes
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
        } // END - if
@@ -695,7 +753,7 @@ function doXmlAdminListData ($resource, $attributes) {
 // Handles the XML node 'data-tables'
 function doXmlDataTables ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
        } // END - if
@@ -730,14 +788,172 @@ function doXmlDataTable ($resource, $attributes) {
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
        }
 
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'] = array();
+
        // Add the entry to the array
        addXmlValueToCallbackAttributes('data_table', $attributes);
 }
 
+// Handles the XML node 'table-join-condition'
+function doXmlTableJoinCondition ($resource, $attributes) {
+       // There should be no attributes
+       if (isFilledArray($attributes)) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'table-join-type'
+function doXmlTableJoinType ($resource, $attributes) {
+       if (count($attributes) != 1) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_type'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node table-join-type already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_type'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('table_join_type', $attributes);
+}
+
+// Handles the XML node 'table-join-name'
+function doXmlTableJoinName ($resource, $attributes) {
+       if (count($attributes) != 2) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['ALIAS'])) {
+               // 'ALIAS' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_name'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node table-join-name already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['table_join_name'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('table_join_name', $attributes);
+}
+
+// Handles the XML node 'join-on'
+function doXmlJoinOn ($resource, $attributes) {
+       // There should be no attributes
+       if (isFilledArray($attributes)) {
+               // Please don't add any attributes to foo-list nodes
+               reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+       } // END - if
+}
+
+// Handles the XML node 'join-on-left-table'
+function doXmlJoinOnLeftTable ($resource, $attributes) {
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['COLUMN'])) {
+               // 'COLUMN' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['NAME'])) {
+               // 'NAME' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute NAME does not validate. NAME=' . $attributes['NAME']);
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['COLUMN'])) {
+               // 'COLUMN' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute COLUMN does not validate. COLUMN=' . $attributes['COLUMN']);
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_left_table'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-left-table already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_left_table'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('join_on_left_table', $attributes);
+}
+
+// Handles the XML node 'join-on-right-table'
+function doXmlJoinOnRightTable ($resource, $attributes) {
+       if (count($attributes) != 3) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['NAME'])) {
+               // 'NAME' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isset($attributes['COLUMN'])) {
+               // 'COLUMN' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['NAME'])) {
+               // 'NAME' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute NAME does not validate. NAME=' . $attributes['NAME']);
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['COLUMN'])) {
+               // 'COLUMN' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute COLUMN does not validate. COLUMN=' . $attributes['COLUMN']);
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_right_table'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-right-table already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_right_table'] = array();
+
+       // Add the entry to the array
+       addXmlValueToCallbackAttributes('join_on_right_table', $attributes);
+}
+
+// Handles the XML node 'join-on-condition'
+function doXmlJoinOnCondition ($resource, $attributes) {
+       if (count($attributes) != 2) {
+               // Not the right count
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
+       } elseif (!isset($attributes['TYPE'])) {
+               // 'TYPE' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+       } elseif (!isset($attributes['CONDITION'])) {
+               // 'CONDITION' not found
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
+               // 'CONDITION' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
+       } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
+               // 'CONDITION' is not known
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
+       } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_condition'])) {
+               // Array is already defined
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node join-on-condition already set. Only one JOIN is currently supported.');
+       }
+
+       // Init array
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['join_on_condition'] = array();
+
+       // Add the entry to the array
+       //die('<pre>'.print_r($attributes,true).'</pre>');
+       addXmlValueToCallbackAttributes('join_on_condition', $attributes);
+}
+
 // Handles the XML node 'select-data-from-list'
 function doXmlSelectDataFromList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
@@ -791,7 +1007,7 @@ function doXmlSelectDataFromListEntry ($resource, $attributes) {
 // Handles the XML node 'where-select-from-list'
 function doXmlWhereSelectFromList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
@@ -836,12 +1052,9 @@ function doXmlWhereSelectFromListEntry ($resource, $attributes) {
        } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
                // 'CONDITION' not valid/verifyable
                reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
-       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['LOOK-FOR'])) {
-               // 'LOOK-FOR' not valid/verifyable
-               reportBug(__FUNCTION__, __LINE__, 'Attribute LOOK-FOR does not validate. LOOK-FOR=' . $attributes['LOOK-FOR']);
        } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
                // 'CONDITION' is not known
-               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
                // doXmlCallbackFunction is missing
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
@@ -866,6 +1079,12 @@ function doXmlWhereCondition ($resource, $attributes) {
        } elseif (!isset($attributes['NAME'])) {
                // 'NAME' not found
                reportBug(__FUNCTION__, __LINE__, 'Required attribute NAME not found.');
+       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
+               // 'CONDITION' not valid/verifyable
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
+       } elseif ((!empty($attributes['CONDITION'])) && (!isXmlConditionValid($attributes['CONDITION']))) {
+               // 'CONDITION' is not known
+               reportBug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. CONDITION=' . $attributes['CONDITION']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
                // doXmlCallbackFunction is missing
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
@@ -878,7 +1097,7 @@ function doXmlWhereCondition ($resource, $attributes) {
 // Handles the XML node 'order-by-list'
 function doXmlOrderByList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
@@ -986,7 +1205,7 @@ function doXmlListRowTemplate ($resource, $attributes) {
 // Handles the XML node 'column-callback-list'
 function doXmlColumnCallbackList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
@@ -1001,7 +1220,7 @@ function doXmlColumnCallbackList ($resource, $attributes) {
 // Handles the XML node 'column-callback-list-entry'
 function doXmlColumnCallbackListEntry ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
@@ -1046,7 +1265,7 @@ function doXmlColumnCallbackData ($resource, $attributes) {
 // Handles the XML node 'callback-extra-parameter-list'
 function doXmlCallbackExtraParameterList ($resource, $attributes) {
        // There should be no attributes
-       if (count($attributes) > 0) {
+       if (isFilledArray($attributes)) {
                // Please don't add any attributes to foo-list nodes
                reportBug(__FUNCTION__, __LINE__, 'Expected 1 attributes because this is a named foo-list node, got ' . count($attributes));
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_callback_list'])) {
@@ -1066,7 +1285,7 @@ function doXmlCallbackExtraParameterListEntry ($resource, $attributes) {
        // There are three attributes, by default
        if (count($attributes) != 3) {
                // Not the right count
-               reportBug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['COLUMN'])) {
                // 'COLUMN' not found
                reportBug(__FUNCTION__, __LINE__, 'Required attribute COLUMN not found.');
@@ -1076,15 +1295,18 @@ function doXmlCallbackExtraParameterListEntry ($resource, $attributes) {
        } elseif (!isInvalidXmlType($attributes['TYPE'])) {
                // No valid type
                reportBug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
-       } elseif (!isset($attributes['VALUE'])) {
+       } elseif ((!isset($attributes['VALUE'])) && (!isset($attributes['DATA']))) {
                // 'VALUE' not found
-               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
-       } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+               reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE/DATA not found.');
+       } elseif ((isset($attributes['VALUE'])) && (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE']))) {
                // 'VALUE' not valid/verifyable
                reportBug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
        } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['__EXTRA_PARAMETER'])) {
-               // doXmlCallbackFunction is missing
+               // doXmlCallbackFunction/__EXTRA_PARAMETER is missing
                reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/__EXTRA_PARAMETER not included around this node. Please fix your XML.');
+       } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
+               // doXmlCallbackFunction/data_column_list is missing
+               reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data_column_list not included around this node.');
        }
 
        // Add the entry to the array
@@ -1096,7 +1318,7 @@ function doXmlNoEntryFoundMessage ($resource, $attributes) {
        // There are two attributes, by default
        if (count($attributes) != 2) {
                // Not the right count
-               reportBug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+               reportBug(__FUNCTION__, __LINE__, 'Expected 2 attributes, got ' . count($attributes));
        } elseif (!isset($attributes['VALUE'])) {
                // 'VALUE' not found
                reportBug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
@@ -1125,7 +1347,7 @@ function doXmlNoEntryFoundMessage ($resource, $attributes) {
 // Checks for string without any added extra data
 function isXmlTypeString ($value) {
        // Just let SQL_ESCAPE() do the job
-       return ($value == SQL_ESCAPE($value));
+       return ($value == sqlEscapeString($value));
 }
 
 // Fake-check for array type
@@ -1169,18 +1391,18 @@ function isXmlTypeCallback ($value) {
 function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', $key = '') {
        //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - ENTERED!');
        // Is it boolean type?
-       if (($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
+       if ((isset($attributes['TYPE'])) && ($attributes['TYPE'] == 'bool') && (isset($attributes['VALUE']))) {
                // Then convert VALUE
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CONVERTING!');
                $attributes['VALUE'] = convertStringToBoolean($attributes['VALUE']);
-       } elseif ($attributes['TYPE'] == 'callback') {
+       } elseif ((isset($attributes['TYPE'])) && ($attributes['TYPE'] == 'callback')) {
                // It is a simple call-back type
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element . ' - CALLING!');
                $attributes['VALUE'] = call_user_func($attributes['VALUE']);
        }
 
        // What do we need to add?
-       if ($attributes['TYPE'] == 'array') {
+       if ((isset($attributes['TYPE'])) && ($attributes['TYPE'] == 'array')) {
                // Another nested array
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TYPE=' . $attributes['TYPE'] . ',element=' . $element);
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['VALUE'] . '_list'] = array();
@@ -1190,7 +1412,10 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                if (trim($attributes['NAME']) == '') {
                        // Numerical index
                        //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
-                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][] = $attributes['VALUE'];
+                       if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey])) {
+                               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey] = array();
+                       } // END - if
+                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$extraKey])] = $attributes['VALUE'];
                } elseif (!empty($key)) {
                        // Use from $key
                        //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - KEY! (key=' . $attributes[$key] . ')');
@@ -1212,7 +1437,7 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                } // END - if
 
                // Init array
-               $array =  array(
+               $array = array(
                        'column'   => trim($attributes['VALUE']),
                        'alias'    => trim($attributes['ALIAS']),
                        'function' => trim($attributes['FUNCTION']),
@@ -1222,11 +1447,30 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
 
                // Add the entry
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',ALIAS[' . gettype($attributes['ALIAS']) . ']=' . $attributes['ALIAS'] . ',FUNCTION[' . gettype($attributes['FUNCTION']) . ']=' . $attributes['FUNCTION'] . ' - FUNCTION! (VALUE=' . $attributes['VALUE'] . ')');
-               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
+               if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])) {
+                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element] = array();
+               } // END - if
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
+       } elseif ((isset($attributes['NAME'])) && (isset($attributes['ALIAS']))) {
+               // NAME/ALIAS detected
+               $array = array(
+                       'name'  => trim($attributes['NAME']),
+                       'alias' => trim($attributes['ALIAS'])
+               );
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',NAME=' . $attributes['NAME'] . ',ALIAS[' . gettype($attributes['ALIAS']) . ']=' . $attributes['ALIAS']);
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
+       } elseif ((isset($attributes['VALUE'])) && (isset($attributes['ALIAS']))) {
+               // NAME/ALIAS detected
+               $array = array(
+                       'value' => trim($attributes['VALUE']),
+                       'alias' => trim($attributes['ALIAS'])
+               );
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',NAME=' . $attributes['VALUE'] . ',ALIAS[' . gettype($attributes['ALIAS']) . ']=' . $attributes['ALIAS']);
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
        } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['LOOK-FOR']))) {
                // CONDITION/LOOK-FOR detected
                // Init array
-               $array =  array(
+               $array = array(
                        'column'    => trim($attributes['VALUE']),
                        'table'     => trim($attributes['TABLE']),
                        'condition' => convertXmlContion(trim($attributes['CONDITION'])),
@@ -1234,11 +1478,18 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                );
 
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',LOOK-FOR[' . gettype($attributes['LOOK-FOR']) . ']=' . $attributes['LOOK-FOR'] . ' - CONDITION! (VALUE=' . $attributes['VALUE'] . ')');
-               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $array;
+               if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])) {
+                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element] = array();
+               } // END - if
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
        } elseif ((isset($attributes['CONDITION'])) && (isset($attributes['NAME']))) {
                // CONDITION/NAME detected
-               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION!');
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - CONDITION-NAME!');
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['CONDITION'];
+       } elseif (isset($attributes['CONDITION'])) {
+               // CONDITION detected
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CONDITION[' . gettype($attributes['CONDITION']) . ']=' . $attributes['CONDITION'] . ' - CONDITION!');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = convertXmlContion(trim($attributes['CONDITION']));
        } elseif (isset($attributes['CALLBACK'])) {
                // CALLBACK/VALUE detected
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',CALLBACK[' . gettype($attributes['CALLBACK']) . ']=' . $attributes['CALLBACK'] . ' - CALLBACK! (VALUE=' . $attributes['VALUE'] . ')');
@@ -1247,21 +1498,50 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
                // ORDER/TABLE detected
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',ORDER[' . gettype($attributes['ORDER']) . ']=' . $attributes['ORDER'] . ' - ORDER! (VALUE=' . $attributes['VALUE'] . ')');
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['ORDER']][$attributes['TABLE']] = $attributes['VALUE'];
-       } elseif (isset($attributes['COLUMN'])) {
+       } elseif ((isset($attributes['TYPE'])) && (isset($attributes['NAME'])) && (isset($attributes['COLUMN']))) {
+               // TYPE/NAME/COLUMN detected
+               // Init array
+               $array = array(
+                       'name'   => trim($attributes['NAME']),
+                       'column' => trim($attributes['COLUMN'])
+               );
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',TYPE=' . $attributes['TYPE'] . ',NAME[' . gettype($attributes['NAME']) . ']=' . $attributes['NAME'] . ' - TYPE-COLUMN! (COLUMN=' . $attributes['COLUMN'] . ')');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $array;
+       } elseif ((isset($attributes['COLUMN'])) && (isset($attributes['VALUE']))) {
                // COLUMN/VALUE detected
-               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ',COLUMN[' . gettype($attributes['COLUMN']) . ']=' . $attributes['COLUMN'] . ' - COLUMN!');
-               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']][] = $attributes['VALUE'];
-       } elseif ((!isset($attributes['NAME'])) || (trim($attributes['NAME']) == '')) {
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ',COLUMN[' . gettype($attributes['COLUMN']) . ']=' . $attributes['COLUMN'] . ' - COLUMN/VALUE!');
+               if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']])) {
+                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']] = array();
+               } // END - if
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']])] = $attributes['VALUE'];
+       } elseif ((isset($attributes['COLUMN'])) && (isset($attributes['DATA']))) {
+               // COLUMN/DATA detected
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',DATA[' . gettype($attributes['DATA']) . ']=' . $attributes['DATA'] . ',COLUMN[' . gettype($attributes['COLUMN']) . ']=' . $attributes['COLUMN'] . ' - COLUMN/DATA!');
+               if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']])) {
+                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']] = array();
+               } // END - if
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['COLUMN']])] = $attributes['VALUE'];
+       } elseif (((!isset($attributes['NAME'])) || (trim($attributes['NAME']) == '')) && (isset($attributes['VALUE']))) {
                // Numerical index
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NUMERICAL!');
-               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $attributes['VALUE'];
+               if (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])) {
+                       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element] = array();
+               } // END - if
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $attributes['VALUE'];
+       } elseif ((count($attributes) == 1) && (isset($attributes['TYPE']))) {
+               // Only TYPE found
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',TYPE[' . gettype($attributes['TYPE']) . ']=' . $attributes['TYPE'] . ' - TYPE-ONLY!');
+               $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][count($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element])] = $attributes['TYPE'];
        } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) {
                // Already created
-               reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, true) . '</pre>');
-       } else {
-               // Use from NAME
+               reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=<pre>' . print_r($attributes, TRUE) . '</pre>');
+       } elseif ((isset($attributes['NAME'])) && (isset($attributes['VALUE']))) {
+               // Use from NAME/VALUE
                //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',NAME=' . $attributes['NAME'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME!');
                $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']] = $attributes['VALUE'];
+       } else {
+               // Unknown stage
+               reportBug(__FUNCTION__, __LINE__, 'Unexpected stage detected. element=' . $element . ',attributes()=' . count($attributes));
        }
        //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',extraKey=' . $extraKey . ',key=' . $key . ' - EXIT!');
 }
@@ -1271,17 +1551,28 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '',
 //-----------------------------------------------------------------------------
 
 // Execute function for doXmlCallbackFunction()
-function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) {
+function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex, $content) {
        // Is 'id_index' set and form sent?
        if ((isset($args['id_index'])) && (isFormSent())) {
                // Prepare 'id_index'
                $args['id_index'] = postRequestElement($args['id_index']);
        } // END - if
 
+       // Add content
+       $args['_content'] = $content;
+
        // Just call it
-       //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=<pre>'.print_r($args, true).'</pre>');
+       //* DEBUG: */ die(__FUNCTION__.':callbackFunction=' . $callbackName . ',<br />columnIndex=' . $columnIndex . ',<br />args(' . count($args) . ')=<pre>'.print_r($args, TRUE).'</pre>');
+       //* DEBUG: */ reportBug(__FUNCTION__, __LINE__, 'Called!');
        call_user_func_array($callbackName, $args);
 }
 
+// For 'doing' add referral level, the column-index is required
+function addXmlSpecialAdminAddDoReferralLevels () {
+       // So set it all here
+       $GLOBALS['__COLUMN_INDEX']['doXmlCallbackFunction']  = 'column';
+       $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['column_index'] = 'column';
+}
+
 // [EOF]
 ?>