+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+ }
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('raw_userid_column_key', $attributes);
+ //$GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['raw_userid_column_key'] = $attributes['VALUE'];
+}
+
+//-----------------------------------------------------------------------------
+// Call-back functions for listing of data in admin area
+//-----------------------------------------------------------------------------
+
+// Handles the XML node 'admin-list-data'
+function doXmlAdminListData ($resource, $attributes) {
+ // There should be no attributes
+ if (count($attributes) > 0) {
+ // Please don't add any attributes to foo-list nodes
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+ } // END - if
+}
+
+// Handles the XML node 'data-tables'
+function doXmlDataTables ($resource, $attributes) {
+ // There should be no attributes
+ if (count($attributes) > 0) {
+ // Please don't add any attributes to foo-list nodes
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes, got ' . count($attributes));
+ } // END - if
+}
+
+// Handles the XML node 'data-table'
+function doXmlDataTable ($resource, $attributes) {
+ // There are three attributes, by default
+ if (count($attributes) != 3) {
+ // Not the right count
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 3 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['VALUE'])) {
+ // 'VALUE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+ // No valid type
+ debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+ } elseif (!isset($attributes['ALIAS'])) {
+ // 'ALIAS' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+ // Not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+ } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
+ // Not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. ALIAS=' . $attributes['ALIAS']);
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.');
+ }
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('data_table', $attributes);
+}
+
+// Handles the XML node 'select-data-from-list'
+function doXmlSelectDataFromList ($resource, $attributes) {
+ // There should be no attributes
+ if (count($attributes) > 0) {
+ // Please don't add any attributes to foo-list nodes
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+ }
+
+ // Add an empty list
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'] = array();
+}
+
+// Handles the XML node 'select-data-from-list-entry'
+function doXmlSelectDataFromListEntry ($resource, $attributes) {
+ // There are five attributes, by default
+ if (count($attributes) != 5) {
+ // Not the right count
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['VALUE'])) {
+ // 'VALUE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+ // No valid type
+ debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+ } elseif (!isset($attributes['ALIAS'])) {
+ // 'ALIAS' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ALIAS not found.');
+ } elseif (!isset($attributes['FUNCTION'])) {
+ // 'FUNCTION' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute FUNCTION not found.');
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+ // 'VALUE' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+ } elseif ((trim($attributes['ALIAS']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['ALIAS']))) {
+ // 'ALIAS' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ALIAS does not validate. ALIAS=' . $attributes['ALIAS']);
+ } elseif ((trim($attributes['FUNCTION']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['FUNCTION']))) {
+ // 'FUNCTION' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute FUNCTION does not validate. FUNCTION=' . $attributes['FUNCTION']);
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/select-data-from-list not included around this node. Please fix your XML.');
+ }
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('data_column_list', $attributes);
+}
+
+// Handles the XML node 'where-select-from-list'
+function doXmlWhereSelectFromList ($resource, $attributes) {
+ // There should be no attributes
+ if (count($attributes) > 0) {
+ // Please don't add any attributes to foo-list nodes
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+ }
+
+ // Add an empty list
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['where_select_list'] = array();
+}
+
+// Handles the XML node 'where-select-from-list-entry'
+function doXmlWhereSelectFromListEntry ($resource, $attributes) {
+ // There are five attributes, by default
+ if (count($attributes) != 5) {
+ // Not the right count
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (!isset($attributes['TABLE'])) {
+ // 'TABLE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
+ } elseif (!isset($attributes['VALUE'])) {
+ // 'VALUE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+ } elseif (!isset($attributes['CONDITION'])) {
+ // 'CONDITION' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute CONDITION not found.');
+ } elseif (!isset($attributes['LOOK-FOR'])) {
+ // 'LOOK-FOR' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute LOOK-FOR not found.');
+ } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+ // No valid type
+ debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+ } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
+ // 'TABLE' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE'])) {
+ // 'VALUE' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['CONDITION'])) {
+ // 'CONDITION' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CONDITION does not validate. CONDITION=' . $attributes['CONDITION']);
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['LOOK-FOR'])) {
+ // 'LOOK-FOR' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute LOOK-FOR does not validate. LOOK-FOR=' . $attributes['LOOK-FOR']);
+ } elseif (!isXmlConditionValid($attributes['CONDITION'])) {
+ // 'CONDITION' is not known
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute CONDITION is not valid. LOOK-FOR=' . $attributes['CONDITION']);
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');
+ }
+
+ // Add the entry to the array
+ addXmlValueToCallbackAttributes('where_select_list', $attributes);
+}
+
+// Handles the XML node 'order-by-list'
+function doXmlOrderByList ($resource, $attributes) {
+ // There should be no attributes
+ if (count($attributes) > 0) {
+ // Please don't add any attributes to foo-list nodes
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes));
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_table'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-table not included around this node. Please fix your XML.');
+ }
+
+ // Add an empty list
+ $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['order_by_list'] = array();
+}
+
+// Handles the XML node 'order-by-list-entry'
+function doXmlOrderByListEntry ($resource, $attributes) {
+ // There are four attributes, by default
+ if (count($attributes) != 4) {
+ // Not the right count
+ debug_report_bug(__FUNCTION__, __LINE__, 'Expected 5 attributes, got ' . count($attributes));
+ } elseif (!isset($attributes['ORDER'])) {
+ // 'ORDER' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute ORDER not found.');
+ } elseif (!isset($attributes['TYPE'])) {
+ // 'TYPE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TYPE not found.');
+ } elseif (!isset($attributes['TABLE'])) {
+ // 'TABLE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute TABLE not found.');
+ } elseif (!isset($attributes['VALUE'])) {
+ // 'VALUE' not found
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required attribute VALUE not found.');
+ } elseif (!isInvalidXmlType($attributes['TYPE'])) {
+ // No valid type
+ debug_report_bug(__FUNCTION__, __LINE__, 'TYPE is not valid, got: ' . $attributes['TYPE']);
+ } elseif (!isXmlValueValid($attributes['TYPE'], $attributes['ORDER'])) {
+ // 'ORDER' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute ORDER does not validate. ORDER=' . $attributes['ORDER']);
+ } elseif ((trim($attributes['TABLE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['TABLE']))) {
+ // 'TABLE' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute TABLE does not validate. TABLE=' . $attributes['TABLE']);
+ } elseif ((trim($attributes['VALUE']) != '') && (!isXmlValueValid($attributes['TYPE'], $attributes['VALUE']))) {
+ // 'VALUE' not valid/verifyable
+ debug_report_bug(__FUNCTION__, __LINE__, 'Attribute VALUE does not validate. VALUE=' . $attributes['VALUE']);
+ } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['data_column_list'])) {
+ // doXmlCallbackFunction is missing
+ debug_report_bug(__FUNCTION__, __LINE__, 'Required XML node callback-function/data-column-list not included around this node. Please fix your XML.');