+ loadTemplate('admin_settings_unsaved', false, getMessage('ADMIN_NETWORK_TYPES_NOTHING_FOUND'));
+ }
+ } // END - if
+}
+
+// Handle network request parameter form
+function doAdminNetworkProcessHandlerequestparamsForm () {
+ // Do we have selections?
+ if (countPostSelection() > 0) {
+ // Init cache array
+ $GLOBALS['network_params_disabled'] = array();
+
+ // Load network data
+ $networkData = getNetworkDataById(getRequestParameter('network'));
+
+ // Something has been selected, so start displaying one by one
+ $SW = 2; $OUT = '';
+ foreach (postRequestParameter('sel') as $id => $sel) {
+ // Is this selected?
+ if ($sel == 1) {
+ // Load this network's data
+ $networkRequestData = getNetworkRequestParamsDataById($id);
+
+ // Do we have found the network?
+ if (count($networkRequestData) > 0) {
+ // Add color
+ $networkRequestData['sw'] = $SW;
+
+ if (isPostRequestParameterSet('edit')) {
+ // Add options list for network type
+ $networkRequestData['type_options'] = generateNetworkTypeOptions($networkRequestData['network_type_id']);
+
+ // Add options list for request key
+ $networkRequestData['key_options'] = generateNetworkRequestKeyOptions($networkRequestData['request_param_key']);
+
+ // Add row template for deleting
+ $OUT .= loadTemplate('admin_edit_network_params_row', true, $networkRequestData);
+ } elseif (isPostRequestParameterSet('del')) {
+ // Fix empty banner URL
+ if (trim($networkRequestData['request_param_default']) == '') $networkRequestData['request_param_default'] = '---';
+
+ // Get type data
+ $networkRequestData['network_type_data'] = getNetworkTypeDataById($networkRequestData['network_type_id']);
+
+ // Add row template for deleting
+ $OUT .= loadTemplate('admin_del_network_params_row', true, $networkRequestData);
+ } else {
+ // Problem!
+ debug_report_bug('Cannot detect edit/del.');
+ }
+
+ // Switch colors
+ $SW = 3 - $SW;
+ } // END - if
+ } // END - if
+ } // END - foreach
+
+ // If we have no rows, we don't need to display the edit form
+ if (!empty($OUT)) {
+ // Prepare content for template
+ $content = array(
+ 'rows' => $OUT,
+ 'network_data' => getNetworkDataById(getRequestParameter('network'))
+ );
+
+ // Output main template
+ if (isPostRequestParameterSet('edit')) {
+ loadTemplate('admin_edit_network_params', false, $content);
+ } elseif (isPostRequestParameterSet('del')) {
+ loadTemplate('admin_del_network_params', false, $content);
+ } else {
+ // Problem!
+ debug_report_bug('Cannot detect edit/del.');
+ }
+
+ // Don't display the list/add new form
+ $GLOBALS['network_display'] = false;
+ } else {
+ // Nothing selected/found
+ loadTemplate('admin_settings_unsaved', false, getMessage('ADMIN_NETWORK_REQUEST_PARAMS_NOTHING_FOUND'));