+ $networkData = getNetworkDataById(getRequestParameter('network'));
+
+ // Init disabled list
+ $GLOBALS['network_types_disabled'] = array();
+
+ // Load all advert types for given network
+ $result = SQL_QUERY_ESC("SELECT
+ `network_type_id`, `network_type_handle`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url`
+FROM
+ `{?_MYSQL_PREFIX?}_network_types`
+WHERE
+ `network_id`=%s
+ORDER BY
+ `network_type_handle` ASC",
+ array(getRequestParameter('network')), __FILE__, __LINE__);
+
+ // Do we have entries?
+ if (!SQL_HASZERONUMS($result)) {
+ // List all entries
+ $OUT = '';
+ while ($row = SQL_FETCHARRAY($result)) {
+ // Add/translate some data
+ $row['network_type_banner_url'] = fixNullEmptyToDashes($row['network_type_banner_url'], 3);
+
+ // Set disabled entry
+ $GLOBALS['network_types_disabled'][$row['network_type_handle']] = true;
+
+ // Add row template and switch color
+ $OUT .= loadTemplate('admin_list_network_types_row', true, $row);
+ } // END - while
+
+ // Load main template
+ loadTemplate('admin_list_network_types', false, $OUT);
+ } else {
+ // No entries found
+ displayMessage(getMaskedMessage('ADMIN_NETWORK_TYPES_404', $networkData['network_title']));
+ }
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Add form for adding new types
+ loadTemplate('admin_add_network_type', false, $networkData);